summaryrefslogtreecommitdiffstats
path: root/drivers/net
Commit message (Collapse)AuthorAgeFilesLines
* wil6210: boot loaderVladimir Kondratiev2015-02-277-50/+88
| | | | | | | | | | | | | | | | | | | Introduce boot loader. Instead of the operational firmware, very small boot loader is burned to the on-board flash. Boot loader initializes hardware upon reset, and prepares for low power mode. Boot loader reports MAC address and detects radio chip connected. Driver loads firmware only when bringing up interface. All information required to set up network interface, most important is MAC address, reported by the boot loader The firmware composed of 2 files: - wil6210.fw - firmware itself (compiled code + data) - wil6210.board - board file (various board and radio dependent calibrations and parameters) Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: fix usb tx data payload offset issueZhaoyang Liu2015-02-271-4/+4
| | | | | | | | | | | | | | | Commit 84b313b35f8158d7 ("mwifiex: make tx packet 64 byte DMA aligned") induced payload offset issue for USB interface. There is no USB interface header for tx packets, so there's no need to pull interface length while processing tx skb. This patch fixes this issue. Signed-off-by: Zhaoyang Liu <liuzy@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: DMA alignment for RX packetsAvinash Patil2015-02-275-4/+35
| | | | | | | | | | | | This patch adds support for DMA alignment of sk_buffs allocated for RX. Patch also adds support to modify skb allocation flags. Signed-off-by: Marc Yang <yangyang@marvell.com> Signed-off-by: Qingshui Gao <gaoqs@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: modify TX buff size for SD8887Avinash Patil2015-02-271-1/+1
| | | | | | | | | FW crash has been observed while running iperf TX with SD8887 devices. This is because of invalid TX buffer setting. SD8887 supports 2K buffer sizes. This patch fixes this issue. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: change datatype to bool for device capability flagsAvinash Patil2015-02-274-39/+39
| | | | | | | | This patch changes datatypes for device capability flags to bool. Patch also aggregates these variables at single place. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: do not process mgmt rx on uninitialized interfaceAvinash Patil2015-02-271-0/+7
| | | | | | | | | | This patch fixes a crash which was happening because of RX of management frames on uninitialzed interface. Now we drop management frames for interfaces where cfg80211 has not registered any management subtype reception or interface has no NL80211 iftype set. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: more_task flag for main_processShengzhen Li2015-02-272-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | This patch handles a corner case where TX packet would remain in driver queue till next packet comes in. Here is sequence: 1. TX packet is queued via hard_start_xmit and main_work is queued 2. SDIO interrupt comes in which directly call mwifiex_main_process. This starts executing main superloop. 3. Now work from step1 is scheduled but at first check itself it sees mwifiex_processing is set and exits. 4. Now if superloop from step2 has passed TX processing part of superloop this packet would remain in queue until next packet/command/SDIO interrupt arrives and queues main_work. This patch fixes this corner case by defining more_task flag which is set when mwifiex_processing is found to be true. At end of superloop we again check if more_task flag is set and if set, execute superloop again. Signed-off-by: Shengzhen Li <szli@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* libertas: remove unnecessary check before calling debugfs_removeBas Peters2015-02-271-2/+1
| | | | | | | | Debugfs_remove will check for error or NULL for us, so it is not necessary to do this here. Signed-off-by: Bas Peters <baspeters93@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: Modify some USB de-initialize code.Taehee Yoo2015-02-271-4/+7
| | | | | | | | | Delete SET_USB_STOP macro and rtl_usb_deinit because those are called twice in USB de-initialize routine. Add some de-initialize workqueue function in USB disconnect routine. Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k_htc: Add new USB IDLeon Nardella2015-02-261-0/+1
| | | | | | | | | | This device is a dongle made by Philips to enhance their TVs with wireless capabilities, but works flawlessly on any upstream kernel, provided that the ath9k_htc module is attached to it. It's correctly recognized by lsusb as "0471:209e Philips (or NXP) PTA01 Wireless Adapter" and the patch has been tested on real hardware. Signed-off-by: Leon Nardella <leon.nardella@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: Clear ACM_CTRL AC3_VO bit correctlyJes Sorensen2015-02-268-8/+8
| | | | | | | | | All hw driver components in the rtlwifi driver, except for the rtl8192de component has this bug. They would clear BE bit in the ACM_CTRL register instead of the VO bit when processing the VO queue. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: Fix escan timer causing oops.Hante Meuleman2015-02-261-6/+4
| | | | | | | | | | | | | | | In some rare circumstances the escan protection timer can expire before the setup completed (due to long timeouts on IOCTL). This patch avoids this situation by setting the timer after the setup completed correctly. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: Dont sleep when ctrl frames to transmit.Hante Meuleman2015-02-261-0/+1
| | | | | | | | | | | | | | | The SDIO watchdog will put the device in sleep mode when there is no activity for some time and nothing to do anymore. This check is incomplete and should also check if there is a control frame to transmit. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: make sdio suspend wait for threads to freezeArend van Spriel2015-02-263-63/+184
| | | | | | | | | | | | | Borrowed the idea of the PM freezer to make sdio suspend wait for watchdog and DPC thread to freeze at a safe point in their thread routine. The suspend takes 20-25 msec. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: add debugfs file containing revision infoArend van Spriel2015-02-261-0/+30
| | | | | | | | | | | | Make the revision info visible in debugfs. The new debugfs file is named 'revinfo'. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: Remove error print for invalid key index.Hante Meuleman2015-02-261-1/+0
| | | | | | | | | | | | When a key is set or cleared with an unsupported key index then brcmfmac will print an error. With most wpa_supplicants this is happening a lot. The error print is confusing and not needed. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: use helper function for changing SDIO stateArend van Spriel2015-02-263-26/+54
| | | | | | | | | | | | | Changing the SDIO state of the driver involves changing the bus interface state. Adding a helper function makes sure that knowledge is in one place. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: use alloc_workqueue's format strings capabilities for WQ namesAvinash Patil2015-02-261-10/+4
| | | | | | | | | | alloc_workqueue() has string format formation ability e.g. wqname%ifname will be treated as wqnameifname. Use this and remove string operations while defining strings for workqueue names. Reported-by: Kees Cook <keescook@chromium.org> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcm80211: drop unreachable else caseNicholas Mc Guire2015-02-261-9/+2
| | | | | | | | | | the if/elseif/else is exhaustive - there is no 4th case given the rssi_ctrl_mask = RADIO_2055_NBRSSI_SEL | RADIO_2055_WBRSSI_G1_SEL | RADIO_2055_WBRSSI_G2_SEL; so this unreachable else case (dead code) can be dropped. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: use msecs_to_jiffies for time conversionNicholas Mc Guire2015-02-261-3/+3
| | | | | | | | | This is only an API consolidation and should make things more readable it replaces var * HZ / 1000 by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Restart TSF2 timers on wakeupSujith Manoharan2015-02-261-0/+7
| | | | | | | | When coming out of WoW sleep, check and restart timers based on TSF2. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Clear additional WoW eventsSujith Manoharan2015-02-262-1/+6
| | | | | | | | The events for patterns 8..15 need to be cleared on wakeup. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Handle additional patterns on wakeupSujith Manoharan2015-02-262-5/+19
| | | | | | | | Handle the user-configured patterns in the range 8..15 when waking up and update wow_status correctly. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Check MCI PowerSave stateSujith Manoharan2015-02-262-1/+22
| | | | | | | | | | | The power save state of MCI has to be disabled when enabling WoW sleep, check this properly. ar9003_mci_state() doesn't handle MCI_STATE_GET_WLAN_PS_STATE right now, but this will be done later when proper support for MCI/PS is added. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Add new MCI statesSujith Manoharan2015-02-261-1/+29
| | | | | | | | Several new MCI states have to handled, add them to the list. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Set keep awake timerSujith Manoharan2015-02-261-0/+6
| | | | | | | | | | When MCI is enabled and WoW sleep is enabled, make sure that the RTC keep awake timer is set with the required value. This is also required when the AR_WA is programmed. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Fix descriptors for keep-alive frameSujith Manoharan2015-02-261-6/+5
| | | | | | | | | | Along with AR9462, AR9565 also has an extra field in the TX descriptor which needs to be zeroed out for the keep alive frame. This makes the earlier REG_WRITE redundant, so it can be removed. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* Merge branch 'master' of ↵David S. Miller2015-02-2516-189/+1130
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-02-24 This series contains updates to i40e and i40evf only, which bumps their versions to i40e 1.2.9 and i40evf 1.2.3. Paul fixes i40e_debug_aq() for big endian machines by adding the appropriate LExx_TO_CPU wrappers. Catherine adds a requested speed variable to the link_status to store the last speeds we requested from the firmware and use the advertised speed settings in get_settings in ethtool now that we have it. Due to the new code addition, she also refactors get_settings to improve readability and to accommodate some of the longer lines of code by adding two functions i40e_get_settings_link_up() and i40e_get_settings_link_down(). Carolyn adds a struct to the VSI struct to keep track of RXNFC settings done via ethtool. Adds more information to the interrupt vector names, specifically to the VF misc vector name so that we can distinguish between all the interrupts. Ashish enables the i40evf driver to enable debug prints via ethtool. Mitch updates i40e to enable packet split only when IOMMU is in use, since it shows a distinct advantage over the single-buffer path because it minimizes DMA mapping and unmapping. Also adds the receive routine in use to the features log message to be able to print the receive packet split status. Greg adds the ability to get, set and commit permanently the NPAR partition BW configuration through configfs. Enables an application to query the i40e driver's private flags to get the status of NPAR enablement via ethtool. Neerav adds support for bridge offload ndo_ops getlink and setlink to enable bridge hardware mode as per the mode set via IFLA_BRIDGE_MODE. The support is only enabled in the case of a PF VSI and not available for any other VSI type. Kevin fixes i40e by ensuring the BUF and FLAG_RD flags are set for indirect admin queue command. Vasu updates the driver to setup FCoE netdev device type as "fcoe", so that it shows up in sysfs as FCoE device. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * i40e/i40evf: Update driver versionsSravanthi Tangeda2015-02-242-3/+3
| | | | | | | | | | | | | | | | | | | | | | Bump i40e to 1.2.9 and i40evf 1.2.3 Also update the copyright year. Change-ID: I345d777e94abd0acffe6a28793f675d251a86299 Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40evf: Add more info to interrupt vector namesCarolyn Wyborny2015-02-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | This patch adds the netdev name to the VF misc vector name. Without this patch, all the interrupts show the same info, so it difficult to distinguish them. Change-ID: I247828697e1373ecfb5f8dc1bc9618e98a7f4942 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Use ethtool private flags to display NPAR statusGreg Rose2015-02-242-0/+44
| | | | | | | | | | | | | | | | | | | | | | Allow an application to query the i40e driver's private flags to get the status of NPAR enablement. This will be used by applications to determine if there are NPAR specific features available. Change-ID: Ia6d9477a48f9c4cb41ca022bd433f77da3f2146c Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Set FLAG_RD when sending buffer FW must readKevin Scott2015-02-241-1/+1
| | | | | | | | | | | | | | | | | | Set FLAG_RD for send_driver_version AQ command. Change-ID: I8253051eff85a1d4b5a4e12ce0395b65ceb91e62 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: print Rx packet split statusMitch Williams2015-02-241-2/+4
| | | | | | | | | | | | | | | | | | Add the RX routine in use to the features log message. Change-ID: Ifbbf28fb7f42b9a3d2828586488e9e6331107dd5 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: setup FCoE device typeVasu Dev2015-02-241-0/+6
| | | | | | | | | | | | | | | | | | | | Setup FCoE netdev device type as "fcoe", so that it shows up in sysfs as FCoE device. Change-ID: Ie13a1a332dba4d5802586926104ee01ef20da44f Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Set BUF flag for Set Version AQ commandKevin Scott2015-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | BUF flag must be set for indirect AQ command. Change-ID: I6819718a47baf69d1a91ebaed89f735ed6e86025 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Add support for getlink, setlink ndo opsNeerav Parikh2015-02-246-22/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for bridge offload ndo_ops getlink and setlink to enable bridge hardware mode as per the mode set via IFLA_BRIDGE_MODE. The support is only enabled in case of a PF VSI and not available for any other VSI type. By default the i40e driver inserts a bridge as part of the bring-up when a FDIR type VSI and/or a FCoE VSI is created. This bridge is created in VEB mode by default i.e. after creating the bridge using "Add VEB" AQ command the loopback for the PF's default VSI is enabled. The patch adds capability where all the VSIs created as downlink to the bridge inherits the loopback property and enables loopback only if the uplink bridge is operating in VEB mode. Hence, there is no need to explicitly enable loopback as part of allocating resources for SR-IOV VFs and call to do that has been removed. In case a user-request is made either via "bridge" utility or using the bridge netlink interface that requires to change the hardware bridge mode then that would require a PF reset and rebuild of the switch hierarchy. Also update the copyright year. Change-ID: I4d78fc1c83158efda29ba7be92239b74f75d6d25 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-By: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Implement configfs for NPAR BW configurationGreg Rose2015-02-244-8/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add configfs controls to get, set and commit NPAR BW configurations. We export three controls: min_bw - Can take a value from 0 to 100 inclusive max_bw - Can take a value from 1 to 100 inclusive commit - A write-only control that accepts only a value of 1 and will cause the BW settings to be permanently committed to NVM so that they are persistent across power cycles and system resets The BW values are relative and are expressed as percentages. For more information on the interpretation of the BW settings see the Dell specifications for NPAR. Also update the copyright year. Change-ID: Id7496ca65630b5037e32ba6a5a748fbc1632881b Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-By: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Add NPAR BW get and set functionsGreg Rose2015-02-245-1/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | We need to be able to get, set and commit permanently the NPAR partition BW configuration through configfs. These are necessary precursor functions for that feature. Also update the copyright year. Change-ID: I9d5ca160a9288145f1dd2042994028679fff55f3 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: enable packet split only when IOMMU presentMitch Williams2015-02-242-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | When an IOMMU is in use, the packet split receive path shows a distinct advantage over the single-buffer path because it minimizes DMA mapping and unmapping. However, this is not an advantage for systems with no IOMMU. At init time, check to see if an IOMMU is enabled and enable packet split receives. Change-ID: I4f70d2e9c31bbea3dc8fd0c5734959a6e6602210 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40evf: allow enabling of debug prints via ethtoolAshish Shah2015-02-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Copy setting from ethtool to the HW specific struct to actually enable prints. Change print from i40e to i40evf to differentiate drivers in bare metal scenarios. Also update the copyright year. Change-ID: I06fee26247299a08f2e1c70fc811a9ea0931c4dd Signed-off-by: Ashish Shah <ashish.n.shah@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Add method to keep track of current rxnfc settingsCarolyn Wyborny2015-02-242-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a struct to the VSI struct to keep track of rxnfc settings done via ethtool. Without this patch, the device can only list the options available, not the current settings and this is not clear to the user. Without current settings, the available settings never changing looks like a bug. Also update the copyright year. Change-ID: I087bbfdb33b330496a671630a7586773e3b3e589 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e/i40evf: Use advertised speed settings in ethtool and refactor get_settingsCatherine Sullivan2015-02-244-124/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a requested speed variable to the link_status struct to store the last speeds we requested from the firmware (the speeds the FW will be advertising with if autoneg is enabled). Use the advertised speed settings in get_settings in ethtool now that we have it. Also set the requested speed settings in set_settings in ethtool as they are requested and initialize them in probe based on what the firmware remembers as the last requested speeds. To accommodate some longer lines in this new code, and improve readability I have added two functions i40e_get_settings_link_up and i40e_get_settings_link_down which get_settings now calls first. It then does all of the settings that happen regardless of link state. Some PHY types that supported the same settings were also combined. Also update the copyright year. Change-ID: Ica0c5ac81b6069ea6a7406fce7482f7816d4455c Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e/i40evf: Fix output of i40e_debug_aq() for big endian machinesPaul M Stillwell Jr2015-02-242-23/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The function i40e_debug_aq() prints information helpful in debugging admin queue commands, but it doesn't do so correctly on big endian machines. This patch adds the appropriate LExx_TO_CPU wrappers for big endian architectures. Also update the copyright year. Change-ID: I4b2dc229ed5bf6dfe35632a58cddf53c21aff4b0 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | net: dsa: bcm_sf2: add HW bridging supportFlorian Fainelli2015-02-253-1/+171
|/ | | | | | | | | | | | | | | | | | | | | | | | | Implement the bridge join, leave and set_stp callbacks by making that we do the following: - when a port joins the bridge, all existing ports in the bridge get their VLAN control register updated with that joining port - the joining port is including all existing bridge ports in its own VLAN control register The leave operation is fairly similar, special care must be taken to make sure that port leaving the bridging is not removing itself from its own VLAN control register. Since the various BR_* states apply directly to our HW semantics, we just need to translate these constants into their corresponding HW settings, and voila! We make sure to trigger a fast-ageing process for ports that are joining/leaving the bridge and transition from incompatible states, this is equivalent to triggering an ARL flush for that port. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: via-rhine: add BQL supportTino Reichardt2015-02-241-9/+20
| | | | | | | | | | | Add Byte Queue Limits (BQL) support to via-rhine driver. [edumazet] tweaked patch and changed TX_RING_SIZE from 16 to 64 Signed-off-by: Tino Reichardt <milky-kernel@mcmilk.de> Tested-by: Jamie Gloudon <jamie.gloudon@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: Implement port churn-machine (AD standard 43.4.17).Mahesh Bandewar2015-02-242-7/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Churn Detection machines detect the situation where a port is operable, but the Actor and Partner have not attached the link to an Aggregator and brought the link into operation within a bound time period. Under normal operation of the LACP, agreement between Actor and Partner should be reached very rapidly. Continued failure to reach agreement can be symptomatic of device failure. Actor-churn-detection state-machine Reviewed-by: Nikolay Aleksandrov <nikolay@redhat.com> =================================== BEGIN=True + PortEnable=False | v +------------------------+ ActorPort.Sync=True +------------------+ | ACTOR_CHURN_MONITOR | ---------------------> | NO_ACTOR_CHURN | |========================| |==================| | ActorChurn=False | ActorPort.Sync=False | ActorChurn=False | | ActorChurn.Timer=Start | <--------------------- | | +------------------------+ +------------------+ | ^ | | ActorChurn.Timer=Expired | | ActorPort.Sync=True | | | +-----------------+ | | | ACTOR_CHURN | | | |=================| | +--------------> | ActorChurn=True | ------------+ | | +-----------------+ Similar for the Partner-churn-detection. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: Verify RX LACPDU has proper dest mac-addrMahesh Bandewar2015-02-241-0/+3
| | | | | | | | | | | | The 802.1AX standard states: "The DA in LACPDUs is the Slow_Protocols_Multicast address." This patch enforces that and drops LACPDUs with destination MAC addresses other than Slow_Protocols_Multicast address Signed-off-by: Mahesh Bandewar <maheshb@google.com> Reviewed-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2015-02-2438-1032/+2157
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-02-23 This series contains updates to e1000e, igbvf, i40e and i40evf. David adds support for i219 devices to the e1000e driver. Jeff (me) provides two patches to cleanup igbvf, first cleans up the whitespace issues found and the second cleans up the usage of msleep(), min() and max() with usleep_range(), min_t() and max_t() respectively. Kamil updates the shadow RAM read/write functions by refactoring them to prepare for future work. Shannon renames the debugfs command "clear_stats pf" to clear_stats port" to clarify what the function really does. Mitch refactors the receive routine, by splitting the receive hot path code into two, one for packet split and one for single buffer, which improves receive performance. Disables NAPI polling sooner when closing the interface to fix an occasional panic during close which was caused by the driver trying to delete and clean rings at the same time. Also refactors reset for i40evf, since a recent change to the shutdown flow messed up the reset flow. Since i40evf_down() now holds the critical section lock, we cannot call it from the reset handler, which also holds the lock. Nicholas restricts the virtual channel opcodes should remain consistent between updates to the opcode enum. Neerav converts the VSI connection type to use a #define instead of using a magic number. Anjali updates the registers file to remove registers no longer available. Also fixes the EMPR interrupt handling, so that we won't trigger another EMPR when we receive an EMPR event. Catherine cleans up the variable an_enable since it was set and never used. Greg fixes the netdev op that allows the operator to turn MAC/VLAN spoof checking on and off so that it includes the flag for VLAN spoof checking. v2: Updated patch #10 in the series to use test_and_clear_bit() as suggested by Sergei Shtylyov ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * i40evf: don't wait foreverMitch Williams2015-02-231-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under rare circumstances, after a reset, set_rx_mode might get called while the watchdog is running, which will cause a deadlock on the critical section lock. To correct this, add a counter and give up trying to get the lock after fifty tries. Log a message if this happens but don't take any other action. Because this happens after a reset, all of the Rx filters are still in place and the device won't lose connectivity. We can also get stuck during shutdown, if the PF has stopped communicating with us, or if a reset is occurring. If we can't get the lock after a reasonable amount of time, just error out. Something else bad is happening anyway, so adding this filter is the least of our concern right now. Change-ID: I159731e2a82a06b389ee31b34ce336548e05baa0 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40evf: refactor resetMitch Williams2015-02-231-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent change to the shutdown flow messed up the reset flow. Since i40evf_down now holds the critical section lock, we cannot call it from the reset handler, which also holds the lock. To do so causes a deadlock accompanied by wailing and gnashing of teeth. This is easily triggered by running an ethtool self-test on the PF device. Instead, we move the relevant portions of i40evf_down into the reset handler and bend them to our will. Additionally, we can optimize the reinit path by not deleting the MAC and VLAN filters and then adding them back again. Instead, we just set the 'add' flag and let the watchdog resynchronize the filter list with the PF driver. We also reword a few messages to make them more consistent with the rest of the driver. Change-ID: I03dd92ae736f7719fca3564b12a2cf9b98c6cb18 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>