aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-01-02mlx4_en: Only cycle port if HW timestamp config changesShawn Bohrer1-0/+4
If the hwtstamp_config matches what is currently set for the device then simply return. Without this change any program that tries to enable hardware timestamps will cause the link to cycle even if hardware timstamps were already enabled. Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com> Acked-By: Hadar Hen Zion <hadarh@mellanox.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-02mlx4_en: Add PTP hardware clockShawn Bohrer4-8/+198
This adds a PHC to the mlx4_en driver. We use reader/writer spinlocks to protect the timecounter since every packet received needs to call timecounter_cycle2time() when timestamping is enabled. This can become a performance bottleneck with RSS and multiple receive queues if normal spinlocks are used. This driver has been tested with both Documentation/ptp/testptp and the linuxptp project (http://linuxptp.sourceforge.net/) on a Mellanox ConnectX-3 card. Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com> Acked-By: Hadar Hen Zion <hadarh@mellanox.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-02hamradio: 6pack: fix error return codeJulia Lawall1-1/+2
Set the return variable to an error code as done elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-02net: fix error return codeJulia Lawall1-7/+11
Set the return variable to propagate any error code as done elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-02tun, rfs: fix the incorrect hash valueZhi Yong Wu1-1/+1
The code incorrectly save the queue index as the hash, so this patch is fixing it with the hash received in the stack receive path. Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bonding: make more functions staticstephen hemminger2-6/+3
More functions in bonding that can be declared static because they are only used in one file. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01stmicro: make local variables staticstephen hemminger3-6/+4
Make variables only used in one file static. Also avoids possible namespace collisions. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-nextDavid S. Miller22-0/+16092
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates This series implements the Linux Virtual Function (VF) driver for the Intel Ethernet Controller XL710 family. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bonding: use ether_addr_equal_64bits to instead of ether_addr_equaldingtianhong1-2/+2
The net_device.dev_addr have more than 2 bytes of additional data after the mac addr, so it is safe to use the ether_addr_equal_64bits(). Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bonding: remove the return value for bond_3ad_bind_slave()dingtianhong2-22/+16
I'm sure the operand slave and bond for the function will not be NULL, so the check for the bond will not make any sense, so remove the judgement, and the return value was useless here, remove the unwanted return value. The comments for the bond 3ad is too old, cleanup some errors and warming. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bonding: remove unwanted return value for bond_dev_queue_xmit()dingtianhong2-4/+2
The return value for bond_dev_queue_xmit() will not be used anymore, so remove the return value. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bonding: slight optimizztion for bond_slave_override()dingtianhong1-12/+8
When the skb is xmit by the function bond_slave_override(), it will have duplicate judgement for slave state, and I think it will consumes a little performance, maybe it is negligible, so I simplify the function and remove the unwanted judgement. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bonding: slight optimization for bond_alb_xmit()dingtianhong1-7/+5
The bond_alb_xmit will check the return value for bond_dev_queue_xmit() every time, but the bond_dev_queue_xmit() is always return 0, it is no need to check the value every time, so remove the unneed judgement for the xmit path. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bonding: slight optimization for bond_3ad_xmit_xor()dingtianhong1-11/+11
The bond_dev_queue_xmit() will always return 0, and as a fast path, it is inappropriate to check the res value when xmit every package, so remove the res check and avoid once judgement for xmit. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bonding: use ether_addr_equal_unaligned for bond addr comparedingtianhong1-29/+33
Use possibly more efficient ether_addr_equal_64bits to instead of memcmp. Modify the MAC_ADDR_COMPARE to MAC_ADDR_EQUAL, this looks more appropriate. The comments for the bond 3ad is too old, cleanup some errors and warming. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01r8152: support RTL8153hayeswang3-6/+621
Support new chip RTL8153 which is the USB 3.0 giga ethernet adapter. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01r8152: split rtl8152_enablehayeswang1-3/+15
Split the contents of rtl8152_enable() into rtl_set_eee_plus() and rtl_enable(). Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01r8152: add rtl_opshayeswang1-7/+50
The different chips may have different settings. This makes it easy to let different chips have the same flow with differnt settings. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01r8152: change some definitionshayeswang1-11/+16
Replace RX_BUF_THR with RX_THR_HIGH. Replace RWSUME_INDICATE with RESUME_INDICATE. Add CRC_SIZE, TX_ALIGN, and RX_ALIGN. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01r8152: modify the method of accessing PHYhayeswang1-34/+18
The old method to access PHY is through mdio channel. Replace it with the OCP channel. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01r8152: move rtl8152_unload and ocp_reg_writehayeswang1-29/+29
Change the locations of rtl8152_unload() and ocp_reg_write(). Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-nextDavid S. Miller92-3481/+4340
John W. Linville says: ==================== pull request: wireless-next 2014-01-01 These patches were tucked-in with me for my long winter's nap! Please pull them for the 3.14 stream... For the mac80211 bits, Johannes says: "Here I just have a collection of fixes/improvements/cleanups, very little really stands out apart from CSA fixes, vendor command support and the RCU speedups." For the iwlwifi bits, Emmanuel says: "I have hear quite a few things. Alex continues his work on power management. Arik is reworking the transport API by unifying redudant APIs and making error handling more generic. Eyal keeps on digging in the rate scaling code. We also have two new features - Max is using the brand new generic cipher infrastructure in mac80211, and Lilach implements the smart fifo which allows to save power by making interrupt coalescing smarter." Along with those, Arend and company bring a batch of brcmfmac. Sujith and Felix bring the usual high level of ath9k activity as well. Bing gives mwifiex some love as well, and a handful of other bits get updates here and there. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01cnic: Add a signature to indicate valid doorbell offset.Eddie Wai3-2/+5
The buffer that is used to pass doorbell offset to the userspace UIO driver may contain nonzero value in older versions of bnx2x driver. Userspace cannot easily tell whether it contains a valid doorbell offset or not. With the added signature, userspace will only use the doorbell offset if the signature is present. Update version to 2.5.19. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bnx2: Update version to 2.2.5.Michael Chan1-2/+2
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bnx2: Report MDI/MDIX status to ethtool.Michael Chan2-0/+20
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bnx2: Enable auto-mdix when autoneg is disabled.Michael Chan2-3/+15
Auto-mdix currently only works if autoneg is enabled. This patch enables auto-mdix all the time by setting a bit in a PHY register. Define meaningful constants for this PHY registers. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bnx2: Advertise nothing when speed is forcedMichael Chan1-11/+13
The current code does not reset the advertisement register when the speed is forced, leaving the default advertisement value of 10 Mbps. This does not work with some link partners when the next patch enables auto-mdix. Set advertisement register to 0 if the speed is forced. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davemJohn W. Linville92-3481/+4340
2013-12-31i40evf: A0 silicon specificGreg Rose3-6/+36
A0 stepping silicon specific code Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31i40evf: add driver to kernel build systemGreg Rose3-0/+53
Modify the existing Kconfig, Makefile, and MAINTAINERS to add the driver to the kernel. Add a Makefile and a documentation Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31i40evf: init code and hardware supportGreg Rose11-0/+9868
This patch implements the hardware specific init and management. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31i40evf: driver core headersGreg Rose3-0/+689
This patch contains the main driver header files, containing structures and data types specific to the linux driver. i40e_osdep.h contains some code that helps us adapt our OS agnostic code to Linux. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31i40evf: virtual channel interfaceGreg Rose2-0/+1136
This PCI-E SR-IOV virtual function (VF) driver is dependant upon the physical function (PF) driver (i40e) for nearly all of its hardware configuration. Requests from the VF driver are passed to the PF using the hardware's Admin Queue. This patch contains the functionality for communicating with the PF driver. Because of the delay inherent in this communications channel, most of the replies from the PF driver are handled asynchronously. The exceptions are the "send API version" and "get VF config" messages, which busy-wait because they are done so early during init that interrupts are not yet configured. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31i40evf: core ethtool functionalityGreg Rose1-0/+390
This patch contains the ethtool interface and related functionality. Since the VF driver is mostly unaware of link, much of that functionality is unused. The driver implements ethtool hooks for statistics, driver info, and some basic non-link-related driver settings. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31i40evf: transmit and receive functionalityGreg Rose1-0/+1573
This file contains the transmit, receive, and NAPI functionality. Some of the functions in this module are extracted from the i40e driver but functions that are not appropriate for virtual function devices have been removed. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31i40evf: main driver coreGreg Rose1-0/+2353
This is the driver for the Intel(R) XL710 X710 Virtual Function. This patch contains the main driver entry points, but does not include transmit and receive or ethtool functionality, which are presented as separate patches in this series. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-31net: plip: slight optimization of addr comparedingtianhong1-2/+2
Use possibly more efficient ether_addr_equal_64bits to instead of memcmp. Cc: "David S. Miller" <davem@davemloft.net> Suggested-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: fddi: slight optimization of addr comparedingtianhong1-1/+2
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: ti: slight optimization of addr comparedingtianhong1-1/+1
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: sun: optimization of addr comparedingtianhong1-1/+1
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: seeq: slight optimization of addr comparedingtianhong1-1/+1
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: renesas: slight optimization of addr comparedingtianhong1-1/+1
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: qlcnic: slight optimization of addr comparedingtianhong3-6/+6
Use the possibly more efficient ether_addr_equal or ether_addr_equal_unaligned to instead of memcmp. Cc: Himanshu Madhani <himanshu.madhani@qlogic.com> Cc: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: netxen: slight optimization of addr comparedingtianhong1-1/+1
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Manish Chopra <manish.chopra@qlogic.com> Cc: Sony Chacko <sony.chacko@qlogic.com> Cc: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: packetengines: slight optimization of addrdingtianhong1-7/+10
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: vxge: slight optimization of addr comparedingtianhong1-1/+1
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Jon Mason <jdmason@kudzu.us> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: ksz884x: slight optimization of addr comparedingtianhong1-5/+4
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: mlx4: slight optimization of addr comparedingtianhong2-3/+3
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Amir Vadai <amirv@mellanox.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Acked-By: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: ixgbe: slight optimization of addr comparedingtianhong1-2/+1
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> Cc: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: igbvf: slight optimization of addr comparedingtianhong1-1/+1
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> Cc: Carolyn Wyborny <carolyn.wyborny@intel.com> Cc: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>