aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-07-10lance: remove unnecessary setting of skb->devJon Mason1-3/+2
skb->dev is being unnecessarily set during ring init. It is already being set to the proper value when eth_type_trans is called on packet receive, and the skb->dev is not referenced anywhere else in the code. Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-10vxge/s2io: remove dead URLsJon Mason1-3/+1
URLs to neterion.com and s2io.com no longer resolve. Remove all references to these URLs in the driver source and documentation. Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-10drivers/net/ethernet: Fix non-kernel-doc comments with kernel-doc start markersBen Hutchings36-892/+342
Convert doxygen (or similar) formatted comments to kernel-doc or unformatted comment. Delete a few that are content-free. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-10drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functionsBen Hutchings44-410/+378
Fix incorrect start markers, wrapped summary lines, missing section breaks, incorrect separators, and some name mismatches. Delete a few that are content-free. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-10net: Properly define functions with no parametersBen Hutchings1-1/+1
Defining a function with no parameters as 'T foo()' is the deprecated K&R style, and is not strictly equivalent to defining it as 'T foo(void)'. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-10r8169: fix argument in rtl_hw_init_8168g.Hayes Wang1-2/+2
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
2012-07-09Merge branch 'davem-next.r8169' of git://violet.fr.zoreil.com/romieu/linuxDavid S. Miller1-318/+666
Francois Romieu (4): r8169: mdio_ops signature change. r8169: csi_ops signature change. r8169: ephy, eri and efuse functions signature changes. r8169: abstract out loop conditions. Hayes Wang (2): r8169: add RTL8106E support. r8169: support RTL8168G Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09gianfar: fix potential sk_wmem_alloc imbalanceEric Dumazet1-4/+3
commit db83d136d7f753 (gianfar: Fix missing sock reference when processing TX time stamps) added a potential sk_wmem_alloc imbalance If the new skb has a different truesize than old one, we can get a negative sk_wmem_alloc once new skb is orphaned at TX completion. Now we no longer early orphan skbs in dev_hard_start_xmit(), this probably can lead to fatal bugs. Signed-off-by: Eric Dumazet <edumazet@google.com> Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Manfred Rudigier <manfred.rudigier@omicron.at> Cc: Claudiu Manoil <claudiu.manoil@freescale.com> Cc: Jiajun Wu <b06378@freescale.com> Cc: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09drivers/net/ethernet/broadcom/cnic.c: remove invalid reference to list iterator variableJulia Lawall1-1/+2
If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. There does not seem to be a meaningful value to provide to netdev_warn. Replace with pr_warn, since pr_err is used elsewhere. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09drivers/isdn/mISDN/stack.c: remove invalid reference to list iterator variableJulia Lawall1-2/+2
If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. The dereferences are just deleted from the debugging statement. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09net/fsl_pq_mdio: use spin_event_timeout() to poll the indicator registerTimur Tabi1-10/+19
Macro spin_event_timeout() was designed for simple polling of hardware registers with a timeout, so use it when we poll the MIIMIND register. This allows us to return an error code instead of polling indefinitely. Note that PHY_INIT_TIMEOUT is a count of loop iterations, so we can't use it for spin_event_timeout(), which asks for microseconds. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09bonding: debugfs and network namespaces are incompatibleEric W. Biederman1-1/+1
The bonding debugfs support has been broken in the presence of network namespaces since it has been added. The debugfs support does not handle multiple bonding devices with the same name in different network namespaces. I haven't had any bug reports, and I'm not interested in getting any. Disable the debugfs support when network namespaces are enabled. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09bonding: Manage /proc/net/bonding/ entries from the netdev eventsEric W. Biederman1-3/+6
It was recently reported that moving a bonding device between network namespaces causes warnings from /proc. It turns out after the move we were trying to add and to remove the /proc/net/bonding entries from the wrong network namespace. Move the bonding /proc registration code into the NETDEV_REGISTER and NETDEV_UNREGISTER events where the proc registration and unregistration will always happen at the right time. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09smsc95xx: support ethtool get_regsEmeric Vigier1-0/+31
Inspired by implementation in smsc911x.c and smsc9420.c Tested on ARM/pandaboard running android Signed-off-by: Emeric Vigier <emeric.vigier@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09r6040: use module_pci_driver macroDevendra Naga1-14/+1
as the manual of module_pci_driver says that it can be used when the init and exit functions of the module does nothing but the pci_register_driver and pci_unregister_driver. use it for rdc's r6040 driver, as the init and exit paths does as above, and also this reduces a little amount of code. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09bnx2x: populate skb->l4_rxhashEric Dumazet2-4/+16
l4_rxhash is set on skb when rxhash is obtained from canonical 4-tuple over transport ports/addresses. We can set skb->l4_rxhash for all incoming TCP packets on bnx2x for free, as cqe status contains a hash type information. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Willem de Bruijn <willemb@google.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09r8169: support RTL8168GHayes Wang1-0/+291
For RTL8111G, the settings of phy and firmware are replaced with ocp functions. r8168g_mdio_{write / read} redirects the relative settings to suitable ocp functions. A per-device variable is needed to evaluate the real address of ocp functions. rtl_writephy(tp, 0x1f, xxxx) is dedicated to keeping said variable up-to-date. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09r8169: abstract out loop conditions.Francois Romieu1-181/+186
Twelve functions can fail silently. Now they have a chance to complain. Macro and pasting abuse has been kept at a level where tags and friends should not be hurt. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09r8169: ephy, eri and efuse functions signature changes.Francois Romieu1-111/+100
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09r8169: csi_ops signature change.Francois Romieu1-11/+12
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09r8169: mdio_ops signature change.Francois Romieu1-20/+26
Further changes need more context down in the call stack. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09r8169: add RTL8106E support.Hayes Wang1-0/+56
Signed-off-by: Hayes Wang <hayeswang@realtek.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09stmmac: Fix for higher mtu size handlingDeepak Sikri1-1/+2
For the higher mtu sizes requiring the buffer size greater than 8192, the buffers are sent or received using multiple dma descriptors/ same descriptor with option of multi buffer handling. It was observed during tests that the driver was missing on data packets during the normal ping operations if the data buffers being used catered to jumbo frame handling. The memory barrriers are added in between preparation of dma descriptors in the jumbo frame handling path to ensure all instructions before enabling the dma are complete. Signed-off-by: Deepak Sikri <deepak.sikri@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09stmmac: Fix for nfs hang on multiple rebootDeepak Sikri1-0/+3
It was observed that during multiple reboots nfs hangs. The status of receive descriptors shows that all the descriptors were in control of CPU, and none were assigned to DMA. Also the DMA status register confirmed that the Rx buffer is unavailable. This patch adds the fix for the same by adding the memory barriers to ascertain that the all instructions before enabling the Rx or Tx DMA are completed which involves the proper setting of the ownership bit in DMA descriptors. Signed-off-by: Deepak Sikri <deepak.sikri@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davemJohn W. Linville4-11/+10
2012-07-09iwlegacy: don't mess up the SCD when removing a keyEmmanuel Grumbach1-2/+2
When we remove a key, we put a key index which was supposed to tell the fw that we are actually removing the key. But instead the fw took that index as a valid index and messed up the SRAM of the device. This memory corruption on the device mangled the data of the SCD. The impact on the user is that SCD queue 2 got stuck after having removed keys. Reported-by: Paul Bolle <pebolle@tiscali.nl> Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09iwlegacy: always monitor for stuck queuesStanislaw Gruszka1-8/+6
This is iwlegacy version of: commit 342bbf3fee2fa9a18147e74b2e3c4229a4564912 Author: Johannes Berg <johannes.berg@intel.com> Date: Sun Mar 4 08:50:46 2012 -0800 iwlwifi: always monitor for stuck queues If we only monitor while associated, the following can happen: - we're associated, and the queue stuck check runs, setting the queue "touch" time to X - we disassociate, stopping the monitoring, which leaves the time set to X - almost 2s later, we associate, and enqueue a frame - before the frame is transmitted, we monitor for stuck queues, and find the time set to X, although it is now later than X + 2000ms, so we decide that the queue is stuck and erroneously restart the device Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09rt2x00usb: fix indexes ordering on RX queue kickStanislaw Gruszka1-1/+1
On rt2x00_dmastart() we increase index specified by Q_INDEX and on rt2x00_dmadone() we increase index specified by Q_INDEX_DONE. So entries between Q_INDEX_DONE and Q_INDEX are those we currently process in the hardware. Entries between Q_INDEX and Q_INDEX_DONE are those we can submit to the hardware. According to that fix rt2x00usb_kick_queue(), as we need to submit RX entries that are not processed by the hardware. It worked before only for empty queue, otherwise was broken. Note that for TX queues indexes ordering are ok. We need to kick entries that have filled skb, but was not submitted to the hardware, i.e. started from Q_INDEX_DONE and have ENTRY_DATA_PENDING bit set. From practical standpoint this fixes RX queue stall, usually reproducible in AP mode, like for example reported here: https://bugzilla.redhat.com/show_bug.cgi?id=828824 Reported-and-tested-by: Franco Miceli <fmiceli@plan.ceibal.edu.uy> Reported-and-tested-by: Tom Horsley <horsley1953@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09mwifiex: fix Coverity SCAN CID 709078: Resource leak (RESOURCE_LEAK)Bing Zhao1-0/+1
> *. CID 709078: Resource leak (RESOURCE_LEAK) > - drivers/net/wireless/mwifiex/cfg80211.c, line: 935 > Assigning: "bss_cfg" = storage returned from "kzalloc(132UL, 208U)" > - but was not free > drivers/net/wireless/mwifiex/cfg80211.c:935 Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09cnic: Don't use netdev->base_addrMichael Chan1-2/+5
commit c0357e975afdbbedab5c662d19bef865f02adc17 bnx2: stop using net_device.{base_addr, irq}. removed netdev->base_addr so we need to update cnic to get the MMIO base address from pci_resource_start(). Otherwise, mmap of the uio device will fail. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09net: qmi_wwan: add ZTE MF60Bjørn Mork1-0/+18
Adding a device with limited QMI support. It does not support normal QMI_WDS commands for connection management. Instead, sending a QMI_CTL SET_INSTANCE_ID command is required to enable the network interface: 01 0f 00 00 00 00 00 00 20 00 04 00 01 01 00 00 A number of QMI_DMS and QMI_NAS commands are also supported for optional device management. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09be2net: Fix EndianLi RongQing1-1/+1
ETH_P_IP is host Endian, skb->protocol is big Endian, when compare them, we should change ETH_P_IP from host endian to big endian, htons, not ntohs. CC: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Acked-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09netdev/phy: Fixup lockdep warnings in mdio-mux.cDavid Daney1-2/+8
With lockdep enabled we get: ============================================= [ INFO: possible recursive locking detected ] 3.4.4-Cavium-Octeon+ #313 Not tainted --------------------------------------------- kworker/u:1/36 is trying to acquire lock: (&bus->mdio_lock){+.+...}, at: [<ffffffff813da7e8>] mdio_mux_read+0x38/0xa0 but task is already holding lock: (&bus->mdio_lock){+.+...}, at: [<ffffffff813d79e4>] mdiobus_read+0x44/0x88 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&bus->mdio_lock); lock(&bus->mdio_lock); *** DEADLOCK *** May be due to missing lock nesting notation . . . This is a false positive, since we are indeed using 'nested' locking, we need to use mutex_lock_nested(). Now in theory we can stack multiple MDIO multiplexers, but that would require passing the nesting level (which is difficult to know) to mutex_lock_nested(). Instead we assume the simple case of a single level of nesting. Since these are only warning messages, it isn't so important to solve the general case. Signed-off-by: David Daney <david.daney@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09bcm87xx: fix reg-init comment typoPeter Korsgaard1-1/+1
broadcom, not marvell. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: David Daney <david.daney@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09phylib: Support registering a bunch of driversChristian Hohnstaedt15-431/+157
If registering of one of them fails, all already registered drivers of this module will be unregistered. Use the new register/unregister functions in all drivers registering more than one driver. amd.c, realtek.c: Simplify: directly return registration result. Tested with broadcom.c All others compile-tested. Signed-off-by: Christian Hohnstaedt <chohnstaedt@innominate.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09ixgbe: DCB and SR-IOV can not co-exist and will cause hangsAlexander Duyck1-0/+5
DCB and SR-IOV cannot currently be enabled at the same time as the queueing schemes are incompatible. If they are both enabled it will result in Tx hangs since only the first Tx queue will be able to transmit any traffic. This simple fix for this is to block us from enabling TCs in ixgbe_setup_tc if SR-IOV is enabled. This change will be reverted once we can support SR-IOV and DCB coexistence. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09bcm87xx: disable autonegotiation by defaultPeter Korsgaard1-0/+1
The bcm87xx phys don't support autonegotiation, so don't use it by default, as otherwise phy_state_machine() will try to enable it (using c22 requests, which also don't make any sense for the bcm78xx). Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09sky2: Fix for interrupt handlerMirko Lindner1-1/+3
Re-enable interrupts if it is not our interrupt Signed-off-by: Mirko Lindner <mlindner@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09sky2: Added support for Optima EEEMirko Lindner2-1/+18
This patch adds support for the Optima EEE chipset. Signed-off-by: Mirko Lindner <mlindner@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09net/macb: manage carrier state with call to netif_carrier_{on|off}()Nicolas Ferre1-2/+11
OFF carrier state is setup in probe() open() and suspend() functions. The carrier ON state is managed in macb_handle_link_change(). Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-08atl1c: fix issue of transmit queue 0 timed outCloud Ren1-1/+0
some people report atl1c could cause system hang with following kernel trace info: --------------------------------------- WARNING: at.../net/sched/sch_generic.c:258 dev_watchdog+0x1db/0x1d0() ... NETDEV WATCHDOG: eth0 (atl1c): transmit queue 0 timed out ... --------------------------------------- This is caused by netif_stop_queue calling when cable Link is down. So remove netif_stop_queue, because link_watch will take it over. Signed-off-by: xiong <xiong@qca.qualcomm.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Cloud Ren <cjren@qca.qualcomm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-08net: dont use __netdev_alloc_skb for bounce bufferEric Dumazet2-3/+3
commit a1c7fff7e1 (net: netdev_alloc_skb() use build_skb()) broke b44 on some 64bit machines. It appears b44 and b43 use __netdev_alloc_skb() instead of alloc_skb() for their bounce buffers. There is no need to add an extra NET_SKB_PAD reservation for bounce buffers : - In TX path, NET_SKB_PAD is useless - In RX path in b44, we force a copy of incoming frames if GFP_DMA allocations were needed. Reported-and-bisected-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-08bnx2i: use strlcpy() instead of memcpy() for stringsDan Carpenter1-1/+1
DRV_MODULE_VERSION here is "2.7.2.2" which is only 8 chars but we copy 12 bytes from the stack so it's a small information leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Michael Chan <mchan@broadcom.com> Acked-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-07Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-nextDavid S. Miller3-18/+57
2012-07-07asix: avoid copies in tx pathEric Dumazet1-4/+24
I noticed excess calls to skb_copy_expand() or memmove() in asix driver. This driver needs to push 4 bytes in front of frame (packet_len) and maybe add 4 bytes after the end (if padlen is 4) So it should set needed_headroom & needed_tailroom to avoid copies. But its not enough, because many packets are cloned before entering asix_tx_fixup() and this driver use skb_cloned() as a lazy way to check if it can push and put additional bytes in frame. Avoid skb_copy_expand() expensive call, using following rules : - We are allowed to push 4 bytes in headroom if skb_header_cloned() is false (and if we have 4 bytes of headroom) - We are allowed to put 4 bytes at tail if skb_cloned() is false (and if we have 4 bytes of tailroom) TCP packets for example are cloned, but skb_header_release() was called in tcp stack, allowing us to use headroom for our needs. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Allan Chou <allan@asix.com.tw> Cc: Trond Wuellner <trond@chromium.org> Cc: Grant Grundler <grundler@chromium.org> Cc: Paul Stewart <pstew@chromium.org> Cc: Ming Lei <tom.leiming@gmail.com> Tested-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-07net/mlx4_en: Add support for drop action through ethtoolHadar Hen Zion4-2/+42
The drop action is implemented by allocating a QP and keeping it in a reset state such that the HW drops any packets which are steered to that QP. When a drop action is requested, we attach the relevant flow to that QP. Sign-off-by: Hadar Hen Zion <hadarh@mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-07net/mlx4_en: Manage flow steering rules with ethtoolHadar Hen Zion2-0/+389
Implement the ethtool APIs for attaching L2/L3/L4 based flow steering rules to the netdevice RX rings. Added set_rxnfc callback and enhanced the existing get_rxnfc callback. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.co.il> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-07net/mlx4: Implement promiscuous mode with device managed flow-steeringHadar Hen Zion2-0/+101
The device managed flow steering API has three promiscuous modes: 1. Uplink - captures all the packets that arrive to the port. 2. Allmulti - captures all multicast packets arriving to the port. 3. Function port - for future use, this mode is not implemented yet. Use these modes with the flow_attach and flow_detach firmware commands according to the promiscuous state of the netdevice. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-07net/mlx4_core: Add resource tracking for device managed flow steering rulesHadar Hen Zion2-8/+125
As with other device resources, the resource tracker is needed for supporting device managed flow steering rules under SRIOV: make sure virtual functions delete only rules created by them, and clean all rules attached by a crashed VF. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-07{NET, IB}/mlx4: Add device managed flow steering firmware APIHadar Hen Zion13-76/+655
The driver is modified to support three operation modes. If supported by firmware use the device managed flow steering API, that which we call device managed steering mode. Else, if the firmware supports the B0 steering mode use it, and finally, if none of the above, use the A0 steering mode. When the steering mode is device managed, the code is modified such that L2 based rules set by the mlx4_en driver for Ethernet unicast and multicast, and the IB stack multicast attach calls done through the mlx4_ib driver are all routed to use the device managed API. When attaching rule using device managed flow steering API, the firmware returns a 64 bit registration id, which is to be provided during detach. Currently the firmware is always programmed during HCA initialization to use standard L2 hashing. Future work should be done to allow configuring the flow-steering hash function with common, non proprietary means. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>