summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* cxgb4: use zlib deflate to compress firmware dumpRahul Lakkireddy2018-01-197-3/+169
| | | | | | | | | | Use zlib deflate to compress firmware dump. Collect and compress as much firmware dump as possible into a 32 MB buffer. Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Vishal Kulkarni <vishal@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: update dump collection logic to use compressionRahul Lakkireddy2018-01-196-147/+207
| | | | | | | | | | | Update firmware dump collection logic to use compression when available. Let collection logic attempt to do compression, instead of returning out of memory early. Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Vishal Kulkarni <vishal@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Make function mlxsw_sp_kvdl_part_occ() staticWei Yongjun2018-01-191-1/+1
| | | | | | | | | | | Fixes the following sparse warning: drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:289:5: warning: symbol 'mlxsw_sp_kvdl_part_occ' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* forcedeth: remove unused variableZhu Yanjun2018-01-191-5/+3
| | | | | | | | | | The variable miistat is not used. So it is removed. CC: Srinivas Eeda <srinivas.eeda@oracle.com> CC: Joe Jin <joe.jin@oracle.com> CC: Junxiao Bi <junxiao.bi@oracle.com> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge tag 'linux-can-next-for-4.16-20180119' of ↵David S. Miller2018-01-191-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2018-01-16 this is a pull request for net-next/master consisting of 1 patch. This patch by Arnd Bergmann for the m_can driver silences a compiler warning if CONFIG_PM is not selected. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * can: m_can: mark runtime-PM handlers as __maybe_unusedArnd Bergmann2018-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Building without CONFIG_PM results in a harmless warning: drivers/net/can/m_can/m_can.c:1763:12: error: 'm_can_runtime_resume' defined but not used [-Werror=unused-function] drivers/net/can/m_can/m_can.c:1752:12: error: 'm_can_runtime_suspend' defined but not used [-Werror=unused-function] Marking the functions as __maybe_unused lets the compiler silently drop them instead. Fixes: cdf8259d6573 ("can: m_can: Add PM Support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* | Merge tag 'wireless-drivers-next-for-davem-2018-01-19' of ↵David S. Miller2018-01-1924-232/+873
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.16 Final few patches before the merge window, nothing really special. ath9k * add MSI support (not enabled by default yet) rtlwifi * support A-MSDU in A-MPDU aggregation ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtlwifi: Support A-MSDU in A-MPDU capabilityPing-Ke Shih2018-01-181-0/+1
| | | | | | | | | | | | | | | | | | Due to the fact that A-MSDU deaggregation is done in software, we set this flag to support the A-MSDU in A-MPDU Signed-off-by: Steven Ting <steventing@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoex: add rfe_type parameter to btcoexPing-Ke Shih2018-01-172-0/+12
| | | | | | | | | | | | | | btcoex configure antenna by rfe_type that is RF type programmed in efuse. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoex: Add common function for qeurying BT informationPing-Ke Shih2018-01-173-33/+380
| | | | | | | | | | | | | | | | | | | | This commit implement the common function to sort old features, and add more new features that are get_supported_feature, get_supported_version, get_ant_det_val, ble_scan_type, ble_scan_para, bt_dev_info, forbidden_slot_val, afh_map and etc. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoex: Remove typedef statementsLarry Finger2018-01-171-67/+31
| | | | | | | | | | | | | | | | | | Each of these typedefs are only referenced in a single location later in this header. Thus, they are easily removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoex: Remove global variables from btcoexPing-Ke Shih2018-01-176-78/+217
| | | | | | | | | | | | | | | | Remove global variables, so btcoexist can support multiple instances simultaneously. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoex: Add power_on_setting routinePing-Ke Shih2018-01-174-0/+9
| | | | | | | | | | | | | | | | | | After mac power-on sequence, wifi will start to work so notify btcoex the event to configure registers especially related to antenna. This will not only help to assign antenna but also to yield better user experience. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: unlink bss when un-associationTsang-Shian Lin2018-01-171-0/+18
| | | | | | | | | | | | | | | | | | | | | | When AP change bandwidth setting from 20M to 40M, STA may use old 20M AP information to association with AP. Driver unlink bss in the .bss_info_changed of ieee80211_ops to make sure that later scan can get correct AP bandwidth capability. Signed-off-by: Tsang-Shian Lin <thlin@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: fix scan channel 1 fail after IPSPing-Ke Shih2018-01-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | If there is no connection, driver will enter IPS state. Meanwhile, it fails to scan channel 1 by the command 'iw dev wlan0 scan freq 2412', because hardware channel setting lose after IPS. Thus, restore channel setting from hw->conf.channel set by last rtl_op_config(). Signed-off-by: Tim Lee <timlee@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: Use mutex to replace spin_lock to protect IPS and LPSPing-Ke Shih2018-01-174-27/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enter/leavel IPS and LPS are large critical section, and they can't use sleep function because running in atomic-context, which own a spin_lock. In commit ba9f93f82aba ("rtlwifi: Fix enter/exit power_save"), it moves LPS functions to thread-context, so this commit can simply change LPS's spin lock to mutex. Considering IPS functions, rtl_ips_nic_on() may be called by TX tasklet (softirq-context) that check whether packet is auth frame. Fortunately, current mac80211 will ask driver to leave IPS using op_config with changed flag IEEE80211_CONF_CHANGE_IDLE, before issuing auth frame, so IPS functions can run in thread-context and use mutex to protect critical section, too. Also, this commit removes some useless spin locks. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi()Lorenzo Bianconi2018-01-171-1/+1
| | | | | | | | | | | | | | | | | | Verify wcid is not NULL before dereferencing the pointer to initialize txwi rate/power info Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e") Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()Lorenzo Bianconi2018-01-171-1/+3
| | | | | | | | | | | | | | | | | | Initialize mt76_txq pointer after ieee80211_txq pointer check. Remove space after the pointer cast Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e") Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.gitKalle Valo2018-01-1610-19/+178
| |\ | | | | | | | | | | | | | | | | | | | | | ath.git patches for 4.16. Major changes: ath9k * add MSI support (not enabled by default yet)
| | * ath10k: fix recently introduced checkpatch warningsKalle Valo2018-01-163-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checkpatch found these issues: drivers/net/wireless/ath/ath10k/ce.h:324: Please use a blank line after function/struct/union/enum declarations drivers/net/wireless/ath/ath10k/core.c:1321: Please don't use multiple blank lines drivers/net/wireless/ath/ath10k/htt.h:1859: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| | * ath10k: remove redundant -ve check against u32 integer sizeColin Ian King2018-01-161-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variable section_table.size is a u32 and so cannot be less than zero, hence the less than zero check is redundant and can be removed. Detected by CoverityScan, CID#1463855 ("Unsigned compared against 0") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| | * ath10k: fix spelling mistake: "addrress" -> "address"Colin Ian King2018-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Trivial fix to spelling mistake in warning message text. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| | * ath10k: add sanity check to ie_len before parsing fw/board ieRyan Hsu2018-01-161-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | Validate ie_len after the alignment padding before access the buffer to avoid potential overflow. Signed-off-by: Ryan Hsu <ryanhsu@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| | * ath9k: add a quirk to set use_msi automaticallyAceLan Kao2018-01-161-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some platform(BIOS) blocks legacy interrupts (INTx), and only allows MSI for WLAN device. So adding a quirk to list those machines and set use_msi automatically. Adding the following platforms to the quirk. Dell Inspiron 24-3460 Dell Inspiron 3472 Dell Inspiron 14-3473 Dell Vostro 3262 Dell Vostro 15-3572 Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| | * ath9k: add MSI supportRussell Hu2018-01-166-8/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On new Intel platforms like ApolloLake, legacy interrupt mechanism (INTx) is not supported, so WLAN modules are not working because interrupts are missing, therefore this patch is to add MSI support to ath9k. With module paremeter "use_msi=1", ath9k driver would try to use MSI instead of INTx. Signed-off-by: Russell Hu <rhu@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | mwifiex: resolve reset vs. remove()/shutdown() deadlocksBrian Norris2018-01-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()") resolves races between driver reset and removal, but it introduces some new deadlock problems. If we see a timeout while we've already started suspending, removing, or shutting down the driver, we might see: (a) a worker thread, running mwifiex_pcie_work() -> mwifiex_pcie_card_reset_work() -> pci_reset_function() (b) a removal thread, running mwifiex_pcie_remove() -> mwifiex_free_adapter() -> mwifiex_unregister() -> mwifiex_cleanup_pcie() -> cancel_work_sync(&card->work) Unfortunately, mwifiex_pcie_remove() already holds the device lock that pci_reset_function() is now requesting, and so we see a deadlock. It's necessary to cancel and synchronize our outstanding work before tearing down the driver, so we can't have this work wait indefinitely for the lock. It's reasonable to only "try" to reset here, since this will mostly happen for cases where it's already difficult to reset the firmware anyway (e.g., while we're suspending or powering off the system). And if reset *really* needs to happen, we can always try again later. Fixes: b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()") Cc: <stable@vger.kernel.org> Cc: Xinming Hu <huxm@marvell.com> Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | Revert "mwifiex: cancel pcie/sdio work in remove/shutdown handler"Brian Norris2018-01-162-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b713bbf1471b56b572ce26bd02b81a85c2b007f4. The "fix" in question does not actually fix all related problems, and it also introduces new deadlock possibilities. Since commit b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()"), the race in question is actually resolved (PCIe reset cannot happen at the same time as remove()). Instead, this "fix" just introduces a deadlock where mwifiex_pcie_card_reset_work() is waiting on device_lock, which is held by PCIe device remove(), which is waiting on...mwifiex_pcie_card_reset_work(). The proper thing to do is just to fix the deadlock. Patch for this will come separately. Cc: Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtlwifi: btcoexist: remove redundant variable fw_ps_stateColin Ian King2018-01-161-2/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Variable fw_ps_state is assigned a value but it is never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:736:2: warning: Value stored to 'fw_ps_state' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | net/mlx5e: Fix trailing semicolonLuis de Bethencourt2018-01-181-1/+1
| | | | | | | | | | | | | | | | | | The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt <luisbg@kernel.org> Reviewed-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge tag 'linux-can-next-for-4.16-20180116' of ↵David S. Miller2018-01-172-67/+161
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2018-01-16 this is a pull request for net-next/master consisting of 9 patches. This is a series of patches, some of them initially by Franklin S Cooper Jr, which was picked up by Faiz Abbas. Faiz Abbas added some patches while working on this series, I contributed one as well. The first two patches add support to CAN device infrastructure to limit the bitrate of a CAN adapter if the used CAN-transceiver has a certain maximum bitrate. The remaining patches improve the m_can driver. They add support for bitrate limiting to the driver, clean up the driver and add support for runtime PM. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | can: m_can: Add call to of_can_transceiverFranklin S Cooper Jr2018-01-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add call to new generic functions that provides support via a binding to limit the arbitration rate and/or data rate imposed by the physical transceiver connected to the MCAN peripheral. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * | can: m_can: Add PM SupportFaiz Abbas2018-01-161-38/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for CONFIG_PM which is the new way to handle managing clocks. Move the clock management to pm_runtime_resume() and pm_runtime_suspend() callbacks for the driver. CONFIG_PM is required by OMAP based devices to handle clock management. Therefore, this allows future Texas Instruments SoCs that have the MCAN IP to work with this driver. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * | can: m_can: get rid of function free_m_can_dev()Marc Kleine-Budde2018-01-161-7/+2
| | | | | | | | | | | | | | | | | | | | | As the previous patch removed alloc_m_can_dev(), let's get rid of the corresponding free_m_can_dev() and call free_candev() directly. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * | can: m_can: Move allocation of net device to probeFaiz Abbas2018-01-161-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the version no longer required to allocate the net device, it can be moved to probe and the alloc_m_can_dev() function can be simplified. Therefore, move the allocation of net device to probe and change alloc_m_can_dev() to setup_m_can_dev(). Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * | can: m_can: Remove check for version when allocating m_can net deviceFaiz Abbas2018-01-161-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the m_can version is used to set the tx_fifo_count to 1 when allocating the net device. However, this is redundant as a value of 1 for the tx_fifo_count needs to be provided in the bosch,mram-cfg property of the device tree node anyway. Therefore, remove check for version when allocating the net device. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * | can: m_can: Support higher speed CAN-FD bitratesFranklin S Cooper Jr2018-01-161-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During test transmitting using CAN-FD at high bitrates (> 2 Mbps) would fail. Scoping the signals I noticed that only a single bit was being transmitted and with a bit more investigation realized the actual MCAN IP would go back to initialization mode automatically. It appears this issue is due to the MCAN needing to use the Transmitter Delay Compensation Mode with the correct value for the transmitter delay compensation offset (tdco). What impacts the tdco value isn't 100% clear but to calculate it you use an equation defined in the MCAN User's Guide. The user guide mentions that this register needs to be set based on clock values, secondary sample point and the data bitrate. One of the key variables that can't automatically be determined is the secondary sample point (ssp). This ssp is similar to the sp but is specific to this transmitter delay compensation mode. The guidelines for configuring ssp is rather vague but via some CAN test it appears for DRA76x that putting the value same as data sampling point works. The CAN-CIA's "Bit Time Requirements for CAN FD" paper presented at the International CAN Conference 2013 indicates that this TDC mode is only needed for data bit rates above 2.5 Mbps. Therefore, only enable this mode when the data bit rate is above 2.5 Mbps. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * | can: dev: Add support for limiting configured bitrateFranklin S Cooper Jr2018-01-161-1/+44
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various CAN or CAN-FD IP may be able to run at a faster rate than what the transceiver the CAN node is connected to. This can lead to unexpected errors. However, CAN transceivers typically have fixed limitations and provide no means to discover these limitations at runtime. Therefore, add support for a can-transceiver node that can be reused by other CAN peripheral drivers to determine for both CAN and CAN-FD what the max bitrate that can be used. If the user tries to configure CAN to pass these maximum bitrates it will throw an error. Also add support for reading bitrate_max via the netlink interface. Reviewed-by: Suman Anna <s-anna@ti.com> Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> [nsekhar@ti.com: fix build error with !CONFIG_OF] Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* | cxgb4: restructure VF mgmt codeGanesh Goudar2018-01-172-204/+190
| | | | | | | | | | | | | | | | | | | | | | restructure the code which adds support for configuring PCIe VF via mgmt netdevice. which was added by commit 7829451c695e ("cxgb4: Add control net_device for configuring PCIe VF") Original work by: Casey Leedom <leedom@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tun: allow to attach ebpf socket filterJason Wang2018-01-171-4/+34
| | | | | | | | | | | | | | | | | | | | This patch allows userspace to attach eBPF filter to tun. This will allow to implement VM dataplane filtering in a more efficient way compared to cBPF filter by allowing either qemu or libvirt to attach eBPF filter to tun. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tuntap: rename struct tun_steering_prog to struct tun_progJason Wang2018-01-171-16/+16
| | | | | | | | | | | | | | To be reused by other eBPF program other than queue selection. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | mlxsw: spectrum_acl: Pass mlxsw_sp_port down to ruleset bind/unbind opsJiri Pirko2018-01-173-20/+17
| | | | | | | | | | | | | | | | No need to convert from mlxsw_sp_port to net_device and back again. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | mlxsw: spectrum_acl: Implement TC block sharingJiri Pirko2018-01-174-95/+401
| | | | | | | | | | | | | | | | | | | | | | Benefit from the prepared TC and in-driver ACL infrastructure and introduce block sharing offload. For that, a new struct "block" is introduced in spectrum_acl in order to hold a list of specific block-port bindings. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | mlxsw: spectrum_acl: Don't store netdev and ingress for ruleset unbindJiri Pirko2018-01-173-21/+24
| | | | | | | | | | | | | | | | Instead, pass netdev and ingress flag to ruleset unbind op. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | mlxsw: spectrum_acl: Reshuffle code around mlxsw_sp_acl_ruleset_create/destroyJiri Pirko2018-01-171-56/+46
| | | | | | | | | | | | | | | | | | | | In order to prepare for follow-up changes, make the bind/unbind helpers very simple. That required move of ht insertion/removal and bind/unbind calls into mlxsw_sp_acl_ruleset_create/destroy. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | bnxt_en: export a common switchdev PARENT_ID for all reps of an adapterSathya Perla2018-01-175-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | Currently the driver exports different switchdev PARENT_IDs for representors belonging to different SR-IOV PF-pools of an adapter. This is not correct as the adapter can switch across all vports of an adapter. This patch fixes this by exporting a common switchdev PARENT_ID for all reps of an adapter. The PCIE DSN is used as the id. Signed-off-by: Sathya Perla <sathya.perla@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | bnxt_en: Add cache line size setting to optimize performance.Michael Chan2018-01-171-0/+24
| | | | | | | | | | | | | | | | | | The chip supports 64-byte and 128-byte cache line size for more optimal DMA performance when matched to the CPU cache line size. The default is 64. If the system is using 128-byte cache line size, set it to 128. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | bnxt_en: Forward VF MAC address to the PF.Vasundhara Volam2018-01-173-7/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward hwrm_func_vf_cfg command from VF to PF driver, to store VF MAC address in PF's context. This will allow "ip link show" to display all VF MAC addresses. Maintain 2 locations of MAC address in VF info structure, one for a PF assigned MAC and one for VF assigned MAC. Display VF assigned MAC in "ip link show", only if PF assigned MAC is not valid. Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | bnxt_en: Add BCM5745X NPAR device IDsVasundhara Volam2018-01-171-0/+4
| | | | | | | | | | | | Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | bnxt_en: Expand bnxt_check_rings() to check all resources.Michael Chan2018-01-171-9/+84
| | | | | | | | | | | | | | | | | | | | | | | | bnxt_check_rings() is called by ethtool, XDP setup, and ndo_setup_tc() to see if there are enough resources to support the new configuration. Expand the call to test all resources if the firmware supports the new API. With the more flexible resource allocation scheme, this call must be made to check that all resources are available before committing to allocate the resources. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | bnxt_en: Implement new method for the PF to assign SRIOV resources.Michael Chan2018-01-173-5/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of the old method of evenly dividing the resources to the VFs, use the new firmware API to specify min and max resources for each VF. This way, there is more flexibility for each VF to allocate more or less resources. The min is the absolute minimum for each VF to function. The max is the global resources minus the resources used by the PF. Each VF is guaranteed the min. Up to max resources may be available for some VFs. The PF driver can use one of 2 strategies specified in NVRAM to assign the resources. The old legacy strategy of evenly dividing the resources or the new flexible strategy. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>