summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* net/hsr: Move slave init to hsr_slave.c.Arvid Brodin2014-07-086-164/+205
| | | | | | | | | Also try to prevent some possible slave dereference race conditions. This is finalized in the next patch, which abandons the slave array in favour of a list_head list and list RCU. Signed-off-by: Arvid Brodin <arvid.brodin@alten.se> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/hsr: Operstate handling cleanup.Arvid Brodin2014-07-083-22/+30
| | | | | Signed-off-by: Arvid Brodin <arvid.brodin@alten.se> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/hsr: Move to per-hsr device prune timer.Arvid Brodin2014-07-085-27/+15
| | | | | Signed-off-by: Arvid Brodin <arvid.brodin@alten.se> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/hsr: Switch from dev_add_pack() to netdev_rx_handler_register()Arvid Brodin2014-07-086-247/+283
| | | | | | | Also move the frame receive handler to hsr_slave.c. Signed-off-by: Arvid Brodin <arvid.brodin@alten.se> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/hsr: Better variable names and update of contact info.Arvid Brodin2014-07-088-305/+304
| | | | | Signed-off-by: Arvid Brodin <arvid.brodin@alten.se> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: increase the tx timeouthayeswang2014-07-081-1/+1
| | | | | | | | | When the system is too busy to complete the urb, the tx timout function would be called. This causes the other tx urbs would be killed, too. Increase the tx timeout to avoid it. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipconfig: add static to local variableFabian Frederick2014-07-081-1/+1
| | | | | | | | | | ic_dev_xid is only used in ipconfig.c Cc: "David S. Miller" <davem@davemloft.net> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: netdev@vger.kernel.org Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'amd-xgbe-next'David S. Miller2014-07-076-101/+145
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tom Lendacky says: ==================== amd-xgbe: AMD 10Gb Ethernet driver updates The following series fixes some bugs and provides new/changed support in the driver. - Fix a debugfs backward compatibility issue introduced by a previous patch - Write to the interrupt enablement register, not the status register when setting MTL interrupts - Call netif_napi_del whenever the ndo_stop operation is called (to match the call to netif_napi_add on ndo_open) - Peformance enhancements: - Adjusted default coalescing settings - AXI DMA changes (burst length size and cache settings) - ioread/iowrite reduction during interrupt - Napi poll updates - AXI DMA settings based on device tree property to account for a change in the ARM64 default cache operations assignment This patch series is based on net-next. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * amd-xgbe: Base AXI DMA cache settings on device treeLendacky, Thomas2014-07-073-18/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default cache operations for ARM64 were changed during 3.15. To use coherent operations a "dma-coherent" device tree property is required. If that property is not present in the device tree node then the non-coherent operations are assigned for the device. Add support to the amd-xgbe driver to assign the AXI DMA cache settings based on whether the "dma-coherent" property is present in the device node. If present, use settings that work with the caches. If not present, use settings that do not look at the caches. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * amd-xgbe: Performance enhancementsLendacky, Thomas2014-07-074-78/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides some general performance enhancements for the driver: - Modify the default coalescing settings (reduce usec, increase frames) - Change the AXI burst length to 256 bytes (default was 16 bytes which was smaller than a cache line) - Change the AXI cache settings to write-back/write-allocate which allocate cache entries for received packets during the DMA since the packet will be processed soon afterwards - Combine ioread/iowrite when disabling both the Tx and Rx interrupts - Change to processing the Tx/Rx channels in pairs - Only recycle the Rx descriptors when a threshold of dirty descriptors is reached Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * amd-xgbe: Call netif_napi_del on ndo_stop operationLendacky, Thomas2014-07-071-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Currently the napi context is added using netif_napi_add each time the ndo_open operation is called. However, there is not a corresponding netif_napi_del call during the ndo_stop operation. If the device ndo_open operation was called more than once an infinite loop occurs during module unload. Add a call to netif_napi_del during the ndo_stop operation. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * amd-xgbe: Clear the proper MTL interrupt registerLendacky, Thomas2014-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | When initializing the MTL interrupts the interrupt status register is written to instead of the interrupt enable register. Since no MTL interrupts are being enabled and the default state is for MTL interrupts to be disabled this did not cause a problem, but needs to be fixed to target the correct register. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * amd-xgbe: Fix debugfs compatibility change with kstrtouintLendacky, Thomas2014-07-071-2/+2
|/ | | | | | | | | | | | | | | | | The initial change from sscanf to kstrtouint broke backward compatbility by using a base of "0" in the kstrtouint call. This allowed for entering decimal, hexadecimal or octal as input where previously the sscanf always interpreted the input as hexadecimal. Additionally, -EIO was returned on error prior to this change and now it is whatever the error value that is returned by kstrtouint. Change the base value of the kstrtouint from 0 to 16 and return -EIO on error. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Reported-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: arcnet: Remove "#define bool int"Rasmus Villemoes2014-07-071-7/+3
| | | | | | | | | | | | | | | | | | | | | The header file include/linux/arcdevice.h #defines bool to int, if bool is not already #defined. However, the files which use that header file seem to rely on that #define (unconditionally) being in effect: the prototypes for the functions arcrimi_reset, com20020_reset, com90io_reset, com90xx_reset (whose addresses are assigned to the hw.reset member of struct arcnet_local) use int explicitly. Moreover, that #define is an accident waiting to happen (scenario: inclusion of arcdevice.h followed by inclusion of some header which declares function prototypes using bool). Also, #include <linux/types.h> must appear before #include <linux/arcdevice.h> (the compiler wouldn't like "typedef _Bool int"). Since none of the files using arcdevice.h declare variables of type "bool", the patch is actually quite simple, unlike the commit message. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: fix return values in enic_set_coalesceGovindarajulu Varadarajan2014-07-072-17/+12
| | | | | | | | | | | | | | | | | | | | | | | enic_set_coalesce() has two problems. * It should return -EINVAL and not -EOPNOTSUPP for invalid coalesce values. * In case of MSIX, enic_set_coalesce return error after applying requested coalescing setting partially. We should either apply all the setting requeste and return success or apply non and return error. * This patch also simplifies the algo. This was introduced by '7c2ce6e60f703 enic: Add support for adaptive interrupt coalescing' These changes were suggested by Ben Hutchings here http://www.spinics.net/lists/netdev/msg283972.html Also change enic driver version. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: remove no longer relevant vlan warningsJiri Pirko2014-07-071-7/+0
| | | | | | | | | | | | These warnings are no longer relevant. Even when last slave is removed, there is a valid address assigned to bond (random). The correct functionality of vlans is ensured by maintaining unicast list in vlan_sync_address(). Suggested-by: Jay Vosburgh <jay.vosburgh@canonical.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Veaceslav Falico <vfalico@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'at86rf230-next'David S. Miller2014-07-074-554/+990
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alexander Aring says: ==================== at86rf230: rework driver implementation this patch series includes a rework of the at86rf230 driver. There are several changes: - Add regmap support. - Merge at86rf212 operations with generic at86rf2xx operations, all chips supports these operations. - Drop of irqworker. This is a workqueue which will scheduled by an irq to handle synchronous spi handling. Instead using asynchronous spi handling, then no scheduler is involved at irq handling. - Also detected some bugs by receiving frame like CRC can be correct and a 802.15.4 frame length could be above 127 bytes. This would crash the whole kernel (but should be handled by the mac layer). Another bug is the handling with RX_SAFE_MODE which protect the frame buffer after a readout. This is currently not working because we read out the buffer twice and the first one to get the frame size. Solution is to readout always the whole frame buffer. - Added some timing relevants things from the datasheet for state changes And IEEE 802.15.4 standard like interframe spacing. Interframe spacing is needed to insert some receiving space time between frame transmitting. This should be also handled by MAC layer, but it's currently a workaround to add this inside the driver layer. - Add some callback setting for chip specific handling, instead of runtime decisions if (is_chip_type()). Callbacks are set only once at probe time. - We don't using a force state change anymore. A force state change will do a abort of receiving frames while we want to transmit a new frame. This should decrease the drop rate of packets. - And many others changes and bug fixes... changes since v3: - fix irq polarity in patch ("at86rf230: rework irq_pol setting"). changes since v2: - add check if necessary functions are implemented when hw flags are set in patch ("mac802154: at86rf230: add hw flags and merge ops"). I choosed the second variant. - remove unnecessary includes for workqueue and mutex in patch ("at86rf230: rework transmit and receive"). - remove unnecessary cast in patch ("at86rf230: rework transmit and receive"). - acivate regmap cache with REGCACHE_RBTREE in patch ("at86rf230: add regmap support"). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: add new authorAlexander Aring2014-07-071-0/+1
| | | | | | | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: add sleep cycle timingAlexander Aring2014-07-071-1/+6
| | | | | | | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: add timing for channel switchAlexander Aring2014-07-071-1/+7
| | | | | | | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: rework reset to trx_off state changeAlexander Aring2014-07-071-1/+15
| | | | | | | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: rework state change and start/stopAlexander Aring2014-07-071-59/+67
| | | | | | | | | | | | | | | | | | | | This patch removes the current synchron state change function and add a new function for a state assert. Change the start and stop callbacks to use this new synchron state change behaviour. It's a wrapper around the async state change function. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: rework irq_pol settingAlexander Aring2014-07-071-5/+2
| | | | | | | | | | | | | | | | | | | | | | This patch rework the irq_pol register setting for rising and falling interrupt settings only. The default behaviour should be rising flag. Also use IRQ_TYPE_* defines instead of IRQF_* defines. There is no functionality change but irq_get_trigger_type returns IRQ_TYPE_* defines. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: move RX_SAFE_MODE setting to hw_initAlexander Aring2014-07-071-5/+4
| | | | | | | | | | | | | | | | There is no need to set this bit in start callback which could be called more than once. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: rework transmit and receive handlingAlexander Aring2014-07-071-268/+571
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a complete reimplementation of transmit and receive handling for the at86rf230 driver. It solves also six bugs: First: The RX_SAFE_MODE is enabled and the transceiver doesn't leave the receive state while the framebuffer isn't read by a CMD_FB command. This is useful to read out the frame and don't get into another receive or transmit state, otherwise the frame would be overwritten. The current driver do twice CMD_FB calls, the first one leaves this protection. Second: Sometimes the CRC calculation is correct and the length field is greater 127. The current mac802154 layer and filter of a at86rf2xx doesn't check on this and the kernel crashes. In this case the frame is corrupted, we send the whole receive buffer to the next layer which can be useful for sniffing. Thrid: There is a undocumented race condition. When we are go into the RX_AACK_ON state the transceiver could be changed into RX_AACK_BUSY state. This is a normal behaviour. In this case the transceiver received a SHR while assert wasn't finished. Fourth: It also handle some more "correct" state changes. In aret mode the transceiver need to go to TX_ON before the transceiver go into RX_AACK_ON. Fifth: The programming model [0] describes also a error handling in ARET mode if the trac status is different than zero. This is patch adds support for handling this. Sixth: In receive handling the transceiver should also get the trac status according [0]. The driver could use the trac status as error statistic handling, but the driver doesn't use this currently. There is maybe some timing behaviour or the read of this register change some transceiver states. In addition the irqworker is removed. Instead we do async spi calls and no scheduling is involved anymore. The transmit function is also asynchron but with a wait_for_completion handling. The mac802154 layer doesn't support asynchron transmit handling right now. The state change behaviour is now changes, before it was: 1. assert while(!STATE_TRANSITION_IN_PROGRESS) 2. state change 3. assert while(!STATE_TRANSITION_IN_PROGRESS) 4. assert once(wanted state != current state) Sometimes a unexcepted state change occurs when 4. assert was violated. The new state change behaviour is: 1. assert while(!STATE_TRANSITION_IN_PROGRESS) 2. state change 3. wait state change timing according datasheet 4. assert once(wanted state != current state) This behaviour is described in the at86rf231 software programming model [0]. The state change documentation in this programming guide should also valid for at86rf212 and at86rf233 chips. The transceiver don't do a FORCE_TX_ON while we want to transmit a PDU. The new behaviour is a TX_ON and wait a receiving time (tFrame + tPAck). If we are still in RX_AACK_BUSY then we transmit a FORCE_TX_ON as timeout handling. The different is that FORCE_TX_ON aborts receiving and TX_ON waits if RX_AACK_BUSY is finished. This should decrease the drop rate of packets. [0] http://www.atmel.com/Images/AVR2022_swpm231-2.0.zip Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: add support for at86rf23x desenseAlexander Aring2014-07-071-4/+18
| | | | | | | | | | | | | | | | | | To set the CCA_ED_THRES register the calculation for at86rf23x is different than for at86rf212. This patch adds a new callback for this calculation in chip data struct. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: remove is212 and add driver dataAlexander Aring2014-07-071-23/+36
| | | | | | | | | | | | | | | | | | This patch adds a new at86rf2xx_chip_data structure which holds device specific attributes. Instead of runtime decisions "if (is212())" we set callbacks/attributes while device detection. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: rework detect device handlingAlexander Aring2014-07-071-107/+76
| | | | | | | | | | | | | | | | | | This patch drops the current lowlevel spi calls for the detect device function instead we handle this via regmap. Also put the detection of in a seperate function and set all device specific attributes while detection. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at86rf230: add regmap supportAlexander Aring2014-07-072-105/+168
| | | | | | | | | | | | | | | | This patch adds regmap support for the at86rf230 driver and drop the lowlevel spi access functions and use the regmap access functions. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * mac802154: at86rf230: add hw flags and merge opsAlexander Aring2014-07-073-58/+102
|/ | | | | | | | | | | | | | This patch adds new mac802154 hw flags for transmit power, csma and listen before transmit (lbt). These flags indicates that the transceiver supports these features. If the flags are set and the driver doesn't implement the necessary functions, then ieee802154_register_device returns -ENOSYS "Function not implemented". This patch merges also all at86rf230 operations into one operations structure and set the right hw flags for the at86rf230 transceivers. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2014-07-0715-176/+731
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2014-07-02 This series contains updates to i40e and i40evf. Anjali fixes a possible race where we were trying to free the dummy packet buffer in the function that created it, so cleanup the dummy packet buffer in i40e_clean_tx_ring() instead. Also fixes an issue where the filter program routine was not checking if there were descriptors available for programming a filter. Mitch fixes unnecessary delays when sending the admin queue commands by moving a declaration up one level so we do not dereference it out of scope. Fixes an issue with the VF where if the admin queue interrupts get lost for some reason, the VF communication will stall as the VFs have no way of reaching the PF. To alleviate this condition, go ahead and check the ARQ every time we run the service task. Updates i40evf to allow the watchdog to fire vector 0 via software, which makes the driver tolerant of dropped interrupts on that vector. Paul fixes a shifted '1' to be unsigned to avoid shifting a signed integer. Jesse disables TPH by default since it is currently not enabled in the current hardware. Also finishes the i40e implementation of get_settings for ethtool. Catherine adds a new variable (hw.phy.link_info.an_enabled) to track whether auto-negotiation is enabled, along with the functionality to update the variable. Adds the functionality to set the requested flow control mode. Adds i40e implementation of setpauseparam and set_settings to ethtool. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * i40e/i40evf: Bump i40e to 0.4.21 and i40evf to 0.9.40Catherine Sullivan2014-07-022-2/+2
| | | | | | | | | | | | | | | | | | Bump. Change-ID: Ie0c36583ffd9997679f46bdf89bc462d3e992995 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Implement set_settings for ethtoolCatherine Sullivan2014-07-021-0/+158
| | | | | | | | | | | | | | | | | | Implement set_settings for ethtool in i40e. Change-ID: Ie3c3fe18e8ff86c3f25b842844b3d9aabc9bba57 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Add set_pauseparam to ethtoolCatherine Sullivan2014-07-021-0/+76
| | | | | | | | | | | | | | | | | | Add i40e implementation of setpauseparam to ethtool. Change-ID: Ie7766b2091ec8f934737573c9ffd426081966718 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e/i40evf: Add set_fc and init of FC settingsCatherine Sullivan2014-07-025-56/+154
| | | | | | | | | | | | | | | | | | | | | | | | Add function set_fc to set the requested FC mode. This patch also adds the init of FC setting to get_link_info and replaces the init code to set FC off by default in main. Also adds i40e_set_phy_config to support this. Change-ID: I7b25bbaec81f15777137ab324a095f916e44351d Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: move nway resetJesse Brandeburg2014-07-021-19/+19
| | | | | | | | | | | | | | | | | | Just move nway reset up, will be used in the next patch. Change-ID: Ice3b631fa2044debc5c4541b42872a48163f8452 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e/i40evf: Add new HW link info variable an_enabled and function ↵Catherine Sullivan2014-07-025-2/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | update_link_info Add a new variable, hw.phy.link_info.an_enabled, to track whether autoneg is enabled. Also add a new function update_link_info that will update that variable as well as calling get_link_info to update the rest of the link info. Also add get_phy_capabilities to support this. Change-ID: I5157ef03492b6dd8ec5e608ba0cf9b0db9c01710 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Finish implementation of ethtool get settingsJesse Brandeburg2014-07-021-23/+127
| | | | | | | | | | | | | | | | | | | | Finish the i40e implementation of get_settings for ethtool. Change-ID: Iec81835aa9380723ae9288bcb79b30a6a1ecd498 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: disable TPHJesse Brandeburg2014-07-022-8/+0
| | | | | | | | | | | | | | | | | | | | TPH is not currently enabled in this product, make sure it isn't enabled by default. Change-ID: Ibb1a10799c33c4c76dec06fcd53b1d6efa13c1f5 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Fix a boundary condition and turning off of ntupleAnjali Singhai Jain2014-07-021-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | When turning off ntuple with a FD table full situation, the driver would have auto disabled FD filter additions. Clear the auto disable flag for FD_SB so that when the feature is turned on again using "ethtool -K ethx ntuple on" we can start adding filters once again. Change-ID: I036a32e7331bcae765b657c8abb4fa070940b163 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40evf: invite vector 0 to the interrupt partyMitch Williams2014-07-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i40evf_irq_enable and i40evf_fire_sw_interrupt functions were unfairly discriminating against MSI-X vector 0, just because it doesn't handle traffic. That doesn't mean it's not essential to the operation of the driver. This change allows the watchdog to fire vector 0 via software, which makes the driver tolerant of dropped interrupts on that vector. Buck up, vector 0! You can be part of our gang! Change-ID: I37131d955018a6b3e711e1732d21428acd0d767e Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: tolerate lost interruptsMitch Williams2014-07-021-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the AQ interrupt gets lost for some reason, VF communications will stall as the VFs have no way of reaching the PF, which is essentially deaf. The VFs end up waiting forever for a reply that will never come. To alleviate this condition, go ahead and check the ARQ every time we run the service task. Remove the check for a pending event, and get rid of a chatty error message that is now meaningless. Change-ID: I0fc9d18169cd45c98f60188aef872cd6cee9a027 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e/i40evf: Force a shifted '1' to be unsignedPaul M Stillwell Jr2014-07-022-4/+4
| | | | | | | | | | | | | | | | | | Force a shifted '1' to be unsiged to avoid shifting a signed int Change-ID: I688cbd082af0f2e1df548fda25847a5ca04babcf Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40evf: don't violate scopeMitch Williams2014-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Move a declaration up one level so we don't dereference it out of scope. This didn't cause any panics, but the details->async field would mysteriously disappear, causing unnecessary delays when sending AQ commands. Also, the code is just plain wrong. Change-ID: I753f64f13c55e5d75ea4351e29b14fb53b2f0104 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e/i40evf: Do not free the dummy packet buffer synchronouslyAnjali Singhai Jain2014-07-025-52/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HW still needs to consume it and freeing it in the function that created it would mean we will be racing with the HW. The i40e_clean_tx_ring() routine will free up the buffer attached once the HW has consumed it. The clean_fdir_tx_irq function had to be fixed to handle the freeing correctly. Cases where we program more than one filter per flow (Ipv4), the code had to be changed to allocate dummy buffer multiple times since it will be freed by the clean routine. This also fixes an issue where the filter program routine was not checking if there were descriptors available for programming a filter. Change-ID: Idf72028fd873221934e319d021ef65a1e51acaf7 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | Merge branch 'fec-next'David S. Miller2014-07-072-59/+79
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Russell King says: ==================== Freescale ethernet driver updates Here's the first batch of patches for the Freescale FEC ethernet driver. They require the previously applied "net: fec: Don't clear IPV6 header checksum field when IP accelerator enable" patch. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: fix missing kmalloc() failure check in fec_enet_alloc_buffers()Russell King2014-07-071-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fec_enet_alloc_buffers() assumes that kmalloc() will never fail, which is an invalid assumption. Fix this by implementing a common error cleanup path, and use it to also clean up after failed bounce buffer allocation. Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: ensure fec_enet_free_buffers() properly cleans the ringsRussell King2014-07-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that we do not double-free any allocations, and that any transmit skbuffs are properly freed when we clean up the rings. Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: clean up transmit descriptor setupRussell King2014-07-071-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid writing any state until we're certain we can proceed with the transmission: this avoids writing mapping error address values to the descriptors, or setting the skbuff pointer until we have successfully mapped the skb. Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: make rx skb handling more robustRussell King2014-07-071-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allocate, and then map the receive skb before writing any data to the ring descriptor or storing the skb. When freeing the receive ring entries, unmap and free the skb, and then clear the stored skb pointer. This means we have ring data and skb pointer in one of two states: either both fully setup, or nothing setup. This simplifies the cleanup, as we can use just the skb pointer to indicate whether the descriptor is setup, and thus avoids potentially calling dma_unmap_single() on a DMA error value. Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud