summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cisco
Commit message (Collapse)AuthorAgeFilesLines
...
* enic: use pci_zalloc_consistentJoe Perches2014-08-091-5/+3Star
| | | | | | | | | | | | | Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Christian Benvenuti <benve@cisco.com> Cc: Sujith Sankar <ssujith@cisco.com> Cc: Govindarajulu Varadarajan <_govind@gmx.com> Cc: Neel Patel <neepatel@cisco.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* enic: Add ethtool support to show classifier filters added by the driverGovindarajulu Varadarajan2014-07-223-0/+117
| | | | | | | | This patch impliments ethtool_ops->get_rxnfc() to display the classifier filter added by the driver. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: remove #ifdef CONFIG_RFS_ACCEL around filter structuresGovindarajulu Varadarajan2014-07-223-45/+51
| | | | | | | | | | | This patch removes the #ifdef CONFIG_RFS_ACCEL around the classifier filter structures. This makes the filter structures available when CONFIG_RFS_ACCEL = n. Introduce enic_rfs_timer_start() & enic_rfs_timer_stop() to start/stop the timer. These two functions are nop when CONFIG_RFS_ACCEL = n. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: fix return values in enic_set_coalesceGovindarajulu Varadarajan2014-07-082-17/+12Star
| | | | | | | | | | | | | | | | | | | | | | | 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>
* enic: Make dummy rfs functions inline to fix !CONFIG_RFS_ACCEL buildGeert Uytterhoeven2014-06-262-10/+3Star
| | | | | | | | | | | | | | | | | | If CONFIG_RFS_ACCEL=n: drivers/net/ethernet/cisco/enic/enic_main.c: In function 'enic_open': drivers/net/ethernet/cisco/enic/enic_main.c:1603:2: error: implicit declaration of function 'enic_rfs_flw_tbl_init' [-Werror=implicit-function-declaration] drivers/net/ethernet/cisco/enic/enic_main.c: In function 'enic_stop': drivers/net/ethernet/cisco/enic/enic_main.c:1630:2: error: implicit declaration of function 'enic_rfs_flw_tbl_free' [-Werror=implicit-function-declaration] Introduced in commit a145df23ef32c7b933875f334ba28791ee75766e ("enic: Add Accelerated RFS support"). Dummy functions are provided, but their prototypes are missing, causing the build failure. Provide dummy static inline functions instead to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: Kill unused variable in enic_rfs_flw_tbl_init().David S. Miller2014-06-231-1/+1
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: do tx cleanup in napi pollGovindarajulu Varadarajan2014-06-232-36/+54
| | | | | | | | | | | | | Till now enic had been doing tx clean in isr. Using napi infrastructure to move the tx clean up out of isr to softirq. Now, wq isr schedules napi poll. In enic_poll_msix_wq we clean up the tx queus. This is applicable only on MSIX. In INTx and MSI we use single napi to clean both rx & tx queues. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: add low latency socket busy_poll supportGovindarajulu Varadarajan2014-06-232-12/+195
| | | | | | | | | | | | | | | | | | | This patch adds support for low latency busy_poll. * Introduce drivers ndo_busy_poll function enic_busy_poll, which is called by socket waiting for data. * Introduce locking between napi_poll nad busy_poll * enic_busy_poll cleans up all the rx pkts possible. While in busy_poll, rq holds the state ENIC_POLL_STATE_POLL. While in napi_poll, rq holds the state ENIC_POLL_STATE_NAPI. * in napi_poll we return if we are in busy_poll. Incase of INTx & msix, we just service wq and return if busy_poll is going on. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: fix lockdep around devcmd_lockTony Camuso2014-06-234-52/+52
| | | | | | | | | | | | | | | | | | | | | | | | We were experiencing occasional "BUG: scheduling while atomic" splats in our testing. Enabling DEBUG_SPINLOCK and DEBUG_LOCKDEP in the kernel exposed a lockdep in the enic driver. enic 0000:0b:00.0 eth2: Link UP ====================================================== [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ] 3.12.0-rc1.x86_64-dbg+ #2 Tainted: GF W ------------------------------------------------------ NetworkManager/4209 [HC0[0]:SC0[2]:HE1:SE0] is trying to acquire: (&(&enic->devcmd_lock)->rlock){+.+...}, at: [<ffffffffa026b7e4>] enic_dev_packet_filter+0x44/0x90 [enic] The fix was to replace spin_lock with spin_lock_bh for the enic devcmd_lock, so that soft irqs would be disabled while the lock is held. Signed-off-by: Sujith Sankar <ssujith@cisco.com> Signed-off-by: Tony Camuso <tcamuso@redhat.com> Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: Add Accelerated RFS supportGovindarajulu Varadarajan2014-06-236-0/+279
| | | | | | | | | | | | | | | | | | This patch adds supports for Accelerated Receive Flow Steering. When the desired rx is different from current rq, for a flow, kernel calls the driver function enic_rx_flow_steer(). enic_rx_flow_steer adds a IP-TCP/UDP hardware filter. Driver registers a timer function enic_flow_may_expire. This function is called every HZ/4 seconds. In this function we check if the added filter has expired by calling rps_may_expire_flow(). If the flow has expired, it removes the hw filter. As of now adaptor supports only IPv4 - TCP/UDP filters. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: alloc/free rx_cpu_rmapGovindarajulu Varadarajan2014-06-231-0/+43
| | | | | | | | | | | | | rx_cpu_rmap provides the reverse irq cpu affinity. This patch allocates and sets drivers netdev->rx_cpu_rmap accordingly. rx_cpu_rmap is set in enic_request_intr() which is called by enic_open and rx_cpu_rmap is freed in enic_free_intr() which is called by enic_stop. This is used by Accelerated RFS. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: devcmd for adding IP 5 tuple hardware filtersGovindarajulu Varadarajan2014-06-236-1/+145
| | | | | | | | | | | This patch adds interface to add and delete IP 5 tuple filter. This interface is used by Accelerated RFS code to steer a flow to corresponding receive queue. As of now adaptor supports only ipv4 + tcp/udp packet steering. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: fix return value in _vnic_dev_cmdGovindarajulu Varadarajan2014-06-231-2/+2
| | | | | | | | Hardware (in readq(&devcmd->args[0])) returns positive number in case of error. But _vnic_dev_cmd should return a negative value in case of error. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriateJiri Pirko2014-06-071-2/+2
| | | | | Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: Update driver to use __dev_uc/mc_sync/unsync callsAlexander Duyck2014-06-026-118/+73Star
| | | | | | | | | | | | | | | | | | | | | This change updates the enic driver to make use of __dev_uc_sync and __dev_mc_sync calls. Previously the driver was doing its own list management by storing the mc_addr and uc_addr list in a 32 address array. With this change the sync data is stored in the netdev_addr_list structures and instead we just track how many addresses we have written to the device. When we encounter 32 we stop and print a message as occurred previously with the old approach. Other than the core change the only other bit needed was to propagate the constant attribute with the MAC address as there were several spots where is twas only passed as a u8 * instead of a const u8 *. This patch is meant to maintain the original functionality without the use of the mc_addr and uc_addr arrays. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: Fix 64 bit divide on 32bit systemGovindarajulu Varadarajan2014-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | Division of a 32 bit number by a 64 bit number causes the following link error introduced by 7c2ce6e60f703 "enic: Add support for adaptive interrupt coalescing" drivers/built-in.o: In function `enic_poll_msix': enic_main.c:(.text+0x48710a): undefined reference to `__udivdi3' make: *** [vmlinux] Error 1 Since numerator is 32 bit, convert denominator to 32 bit accordingly. Fixes: 7c2ce6e60f703 ("enic: Add support for adaptive interrupt coalescing") Reported-by: Jim Davis <jim.epost@gmail.com> Cc: Christian Benvenuti <benve@cisco.com> Cc: Sujith Sankar <ssujith@cisco.com> Cc: Neel Patel <neepatel@cisco.com> Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: Add support for adaptive interrupt coalescingSujith Sankar2014-05-214-6/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for adaptive interrupt coalescing. For small pkts with low pkt rate, we can decrease the coalescing interrupt dynamically which decreases the latency. This however increases the cpu utilization. Based on testing with different coal intr and pkt rate we came up with a table(mod_table) with rx_rate and coalescing interrupt value where we get low latency without significant increase in cpu. mod_table table stores the coalescing timer percentage value for different throughputs. Function enic_calc_int_moderation() calculates the desired coalescing intr timer value. This function is called in driver rx napi_poll. The actual value is set by enic_set_int_moderation() which is called when napi_poll is complete. i.e when we unmask the rx intr. Adaptive coal intr is support only when driver is using msix intr. Because intr is not shared. Struct mod_range is used to store only the default adaptive coalescing intr value. Adaptive coal intr calue is calculated by timer = range_start + ((rx_coal->range_end - range_start) * mod_table[index].range_percent / 100); rx_coal->range_end is the rx-usecs-high value set using ethtool. range_start is rx-usecs-low, set using ethtool, if rx_small_pkt_bytes_cnt is greater than 2 * rx_large_pkt_bytes_cnt. i.e small pkts are dominant. Else its rx-usecs-low + 3. Cc: Christian Benvenuti <benve@cisco.com> Cc: Neel Patel <neepatel@cisco.com> Signed-off-by: Sujith Sankar <ssujith@cisco.com> Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: get rid of SET_ETHTOOL_OPSWilfried Klaebe2014-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I'd seriously wonder if this broke anything. Suggested-by: Dave Miller <davem@davemloft.net> Signed-off-by: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: enic: include irq.h for irqreturn_t definitionsJosh Boyer2014-04-031-0/+1
| | | | | | | | | | | | | | | The enic driver fails to build on ARM with: In file included from drivers/net/ethernet/cisco/enic/enic_res.c:40:0: drivers/net/ethernet/cisco/enic/enic.h:48:2: error: expected specifier-qualifier-list before 'irqreturn_t' irqreturn_t (*isr)(int, void *); ^ Nothing in the driver is explicitly including the irq definitions, so we add an include of linux/irq.h to pick them up. Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: Call dev_kfree_skb_any instead of dev_kfree_skb.Eric W. Biederman2014-03-251-2/+2
| | | | | | | | | Replace dev_kfree_skb with dev_kfree_skb_any in enic_hard_start_xmit that can be called in hard irq and other contexts. enic_hard_start_xmit only frees the skb when dropping it. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
* enic: Don't receive packets when the napi budget == 0Eric W. Biederman2014-03-151-6/+8
| | | | | | | | | | | Processing any incoming packets with a with a napi budget of 0 is incorrect driver behavior. This matters as netpoll will shortly call drivers with a budget of 0 to avoid receive packet processing happening in hard irq context. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: Use pci_enable_msix_range() instead of pci_enable_msix()Alexander Gordeev2014-02-181-2/+4
| | | | | | | | | | | | | | | | | | As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() and pci_enable_msix_range() interfaces. Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Cc: Christian Benvenuti <benve@cisco.com> Cc: Sujith Sankar <ssujith@cisco.com> Cc: Govindarajulu Varadarajan <govindarajulu90@gmail.com> Cc: Neel Patel <neepatel@cisco.com> Cc: netdev@vger.kernel.org Cc: linux-pci@vger.kernel.org Acked-by: Govindarajulu Varadarajan <govindarajulu90@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: enic: slight optimization of addr comparedingtianhong2013-12-311-1/+1
| | | | | | | | | | | | | | Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Christian Benvenuti <benve@cisco.com> Cc: Sujith Sankar <ssujith@cisco.com> Cc: Govindarajulu Varadarajan <govindarajulu90@gmail.com> Cc: Neel Patel <neepatel@cisco.com> Cc: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Acked-by: Govindarajulu Varadarajan <govindarajulu90@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: cisco-enic calls skb_set_hashTom Herbert2013-12-181-5/+6
| | | | | | | | Drivers should call skb_set_hash to set the hash and its type in an skbuff. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: enic: remove unnecessary pci_set_drvdata()Jingoo Han2013-10-181-2/+0Star
| | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* driver/net: enic: update enic maintainers and drivergovindarajulu.v2013-09-051-1/+1
| | | | | | | | Signed-off-by: Govindarajulu Varadarajan <govindarajulu90@gmail.com> Signed-off-by: Sujith Sankar <ssujith@cisco.com> Signed-off-by: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* driver/net: enic: Exposing symbols for Cisco's low latency drivergovindarajulu.v2013-09-052-0/+11
| | | | | | | | | | This patch exposes symbols for usnic low latency driver that can be used to register and unregister vNics as well to traverse the resources on vNics. Signed-off-by: Upinder Malhi <umalhi@cisco.com> Signed-off-by: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* driver/net: enic: Try DMA 64 first, then failover to DMAgovindarajulu.v2013-09-051-4/+4
| | | | | | | | | | | | | | In servers with more than 1.1 TB of RAM, the existing 40/32 bit DMA could cause failure as the DMA-able address could go outside the range addressable using 40/32 bits. The following patch first tried 64 bit DMA if possible, failover to 32 bit. Signed-off-by: Sujith Sankar <ssujith@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: Govindarajulu Varadarajan <govindarajulu90@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* driver/net: enic: record q_number and rss_hash for skbgovindarajulu.v2013-09-051-0/+11
| | | | | | | | | | | The following patch sets the skb->rxhash and skb->q_number. This is used by RPS and RFS. Kernel can make use of hw provided hash instead of calculating the hash. Signed-off-by: Govindarajulu Varadarajan <govindarajulu90@gmail.com> Signed-off-by: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* driver/net: enic: Add multi tx support for enicgovindarajulu.v2013-09-052-13/+25
| | | | | | | | | The following patch adds multi tx support for enic. Signed-off-by: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: Govindarajulu Varadarajan <govindarajulu90@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: enic: Generate notification of hardware crashNeel Patel2013-08-202-1/+2
| | | | | | | | | | | | | This patch generates a hardware crash notification (NETDEV_REBOOT) during reset. After a hardware crash, ENIC resets all its resources including queue pair filters programmed by USNIC. USNIC registers for this notification, and on receiving it, reprograms the queue pair filters. Signed-off-by: Neel Patel <neepatel@cisco.com> Signed-off-by: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: enic: Add an interface for USNIC to interact with firmwareNeel Patel2013-08-205-1/+83
| | | | | | | | | | This patch adds an interface for USNIC to proxy firmware commands through ENIC. Signed-off-by: Neel Patel <neepatel@cisco.com> Signed-off-by: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: enic: Adding support for Cisco Low Latency NICNeel Patel2013-08-207-17/+197
| | | | | | | | | | | This patch, - Adds new firmware commands for the new Cisco Low Latency NIC (aka. USNIC). Signed-off-by: Neel Patel <neepatel@cisco.com> Signed-off-by: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: enic: Move ethtool code to a separate fileNeel Patel2013-07-255-270/+309
| | | | | | | | | | This patch moves all enic ethtool hooks from enic_main.c to a new file enic_ethtool.c Signed-off-by: Neel Patel <neepatel@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: enic: release rtnl_lock on error-pathKonstantin Khlebnikov2013-07-091-0/+2
| | | | | | | | | | | enic_change_mtu_work() must call rtnl_unlock() on all exiting paths. Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Christian Benvenuti <benve@cisco.com> Cc: Roopa Prabhu <roprabhu@cisco.com> Cc: Neel Patel <neepatel@cisco.com> Cc: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: vlan: add protocol argument to packet tagging functionsPatrick McHardy2013-04-191-1/+1
| | | | | | | | | | Add a protocol argument to the VLAN packet tagging functions. In case of HW tagging, we need that protocol available in the ndo_start_xmit functions, so it is stored in a new field in the skb. The new field fits into a hole (on 64 bit) and doesn't increase the sks's size. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: vlan: prepare for 802.1ad VLAN filtering offloadPatrick McHardy2013-04-192-4/+4
| | | | | | | | | Change the rx_{add,kill}_vid callbacks to take a protocol argument in preparation of 802.1ad support. The protocol argument used so far is always htons(ETH_P_8021Q). Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: vlan: rename NETIF_F_HW_VLAN_* feature flags to NETIF_F_HW_VLAN_CTAG_*Patrick McHardy2013-04-191-2/+2
| | | | | | | | | | Rename the hardware VLAN acceleration features to include "CTAG" to indicate that they only support CTAGs. Follow up patches will introduce 802.1ad server provider tagging (STAGs) and require the distinction for hardware not supporting acclerating both. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: be less verbose about non-critical firmware errorsStefan Assmann2013-04-081-0/+3
| | | | | | | | | If a feature is not supported by firmware no need to print an error message. This surpresses the following harmless message on boot up and ethtool query. enic: Error 1 devcmd 36 Signed-off-by: Stefan Assmann <sassmann@kpanic.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: change sprintf() to snprintf()Dan Carpenter2013-01-181-4/+8
| | | | | | | | | | | | These are copying data into 16 char arrays. They all specify that the first string can't be more than 11 characters but once you add on the "-rx-" and the NUL character there isn't space for the %d. The first string is probably never going to be 11 characters, but if it is then let's truncate the string instead of corrupting memory. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: remove unnecessary NET_ADDR_RANDOM "bitclean"Jiri Pirko2013-01-041-1/+0Star
| | | | | | | | NET_ADDR_SET is set in dev_set_mac_address() no need to alter dev->addr_assign_type value in drivers. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: fix up function prototypes after __dev* removalsGreg Kroah-Hartman2012-12-071-2/+1Star
| | | | | | | | | | | | The __dev* removal patches for the network drivers ended up messing up the function prototypes for a bunch of drivers. This patch fixes all of them back up to be properly aligned. Bonus is that this almost removes 100 lines of code, always a nice surprise. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: remove __dev* attributesBill Pemberton2012-12-031-3/+3
| | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Christian Benvenuti <benve@cisco.com> Cc: Roopa Prabhu <roprabhu@cisco.com> Cc: Neel Patel <neepatel@cisco.com> Cc: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* net: Remove bogus dependencies on INETBen Hutchings2012-11-202-2/+2
| | | | | | | | | Various drivers depend on INET because they used to select INET_LRO, but they have all been converted to use GRO which has no such dependency. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: remove unnecessary setting of skb->devJon Mason2012-07-111-2/+0Star
| | | | | | | | | | | | | skb->dev is being unnecessarily set after calling eth_type_trans. eth_type_trans already sets skb->dev to the proper value, thus making this unnecessary. Signed-off-by: Jon Mason <jdmason@kudzu.us> Cc: Christian Benvenuti <benve@cisco.com> Cc: Roopa Prabhu <roprabhu@cisco.com> Cc: Neel Patel <neepatel@cisco.com> Cc: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: Convert compare_ether_addr to ether_addr_equalJoe Perches2012-05-111-8/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Done via cocci script: $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: replace open-coded ARRAY_SIZE with macroJim Cromie2012-04-131-1/+1
| | | | | Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: Stop using NLA_PUT*().David S. Miller2012-04-021-12/+10Star
| | | | | | | These macros contain a hidden goto, and are thus extremely error prone and make code hard to audit. Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: Fix addr valid check in enic_set_vf_macRoopa Prabhu2012-03-082-2/+2
| | | | | | | | | | zero mac address is a valid address for VIC dynamic vnic and sriov Vf's. Fix the check in enic_set_vf_mac appropriately Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: Sujith Sankar <ssujith@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2012-03-012-2/+2
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/broadcom/tg3.c Conflicts in the statistics regression bug fix from 'net', but happily Matt Carlson originally posted the fix against 'net-next' so I used that to resolve this. Signed-off-by: David S. Miller <davem@davemloft.net>