aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-01-06ethtool: fix drvinfo strings set in driversJiri Pirko68-207/+227
Use strlcpy where possible to ensure the string is \0 terminated. Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN and custom defines. Use snprintf instead of sprint. Remove unnecessary inits of ->fw_version Remove unnecessary inits of drvinfo struct. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-06ethoc: fix mac address setJiri Pirko1-11/+11
Function ethoc_set_mac_address() was incorrectly using passed pointer as pointer to address, that is not correct. Struct sockaddr have to be be used here. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-06tg3: Remove IS_ENABLED(CONFIG_HWMON) checkNithin Nayak Sujir2-6/+4
Commit de0a41484c47d783dd4d442914815076aa2caac2 added Kconfig logic to select HWMON and removed all the IS_ENABLED(CONFIG_HWMON) checks in the tg3.c file. It missed this one check in the header. Update version to 3.129 and update copyright year. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-06tg3: Improve PCI function number detection.Michael Chan1-11/+8
Simplify the code to detect PCI function number on 5717, 5719, and 5720. If shared memory does not have proper signature, read the function number from register directly. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-06tg3: Add NVRAM support for 5762Michael Chan2-1/+110
Detect NVRAM types for 5762 and read OTP firmware version. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-06tg3: Add support for new 5762 ASICMichael Chan2-25/+81
Add basic support for 5762 which is a 57765_PLUS class device. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-04NET: FEC: dynamtic check DMA desc buff typeFrank Li4-87/+116
MX6 and mx28 support enhanced DMA descriptor buff to support 1588 ptp. But MX25, MX3x, MX5x can't support enhanced DMA descriptor buff. Check fec type and choose correct DMA descriptor buff type. Remove static config CONFIG_FEC_PTP. ptp function will be auto detected. Signed-off-by: Frank Li <Frank.Li@freescale.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-04ethernet/broadcom/tg3: Fix sparse warning: constant 0x7fffffffffffffff is so big it is long longPeter Hüwe1-1/+1
Sparse complains that: drivers/net/ethernet/broadcom/tg3.c:5670:55: sparse: constant 0x7fffffffffffffff is so big it is long long (on x86/32 bit) so we suffix the constant with LL in the header file. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-04smsc95xx: enable dynamic autosuspendSteve Glendinning1-1/+150
This patch enables USB dynamic autosuspend for LAN9500A. This saves very little power in itself, but it allows power saving in upstream hubs/hosts. The earlier devices in this family (LAN9500/9512/9514) do not support this feature. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-04smsc95xx: eliminate duplicate warnings on io failureSteve Glendinning1-217/+67
The register read/write functions already log a warning if an access fails, so this patch removes the additional warnings logged by callers that don't add any more information. This patch makes the resulting driver smaller by not containing as many warning strings. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-04bonding: remove usage of dev->masterJiri Pirko4-64/+80
Benefit from new upper dev list and free bonding from dev->master usage. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-04qlcnic: guard __vlan_find_dev_deep() by rcu_read_lockJiri Pirko1-0/+2
rcu_read_lock was missing here Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-04cxgb3: remove usage of dev->masterJiri Pirko1-4/+7
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-04team: remove usage of netdev_set_master()Jiri Pirko1-6/+7
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-04macvlan: add link to upper deviceJiri Pirko1-1/+8
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-03ll_temac: fix mac address settingJiri Pirko1-14/+17
Previously, when invalid address was passed to ndo_set_mac_address, random mac was generated and set. Fix this by returning -EADDRNOTAVAIL in this situation. Also polish the code around a bit. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-03net: remove unnecessary NET_ADDR_RANDOM "bitclean"Jiri Pirko22-26/+2
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>
2013-01-03net: set dev->addr_assign_type correctlyJiri Pirko4-4/+4
Not a bitfield, but a plain value. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-03team: update master carrier stateFlavio Leitner1-2/+22
Update master's carrier state when there is any change with its ports. Signed-off-by: Flavio Leitner <fbl@redhat.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-03qlcnic: fix build errorSony Chacko1-2/+1
Fix the following error reported by kbuild test robot. static declaration of 'qlcnic_restore_indev_addr' follows non-static declaration. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-03qlcnic: do not duplicate infrastructure functionsStephen Rothwell1-19/+1
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: update driver versionSigned-off-by: Sony Chacko1-2/+2
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: remove unused definitions from header fileShahed Shaikh3-134/+4
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: 83xx ethtool interface routinesSony Chacko6-193/+750
83xx ethtool interface routines Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: 83xx register dump routinesSony Chacko6-155/+529
Add 83xx register dump routines Update 82xx register dump routines Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: enable 83xx virtual NIC modeSony Chacko6-7/+285
Enable 83xx virtual NIC mode Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: flash template based firmware reset recoverySony Chacko5-0/+538
Flash template provides instructions to stop, restart and initalize the firmware. These instructions are abstracted as a series of read, write and poll operations on hardware registers. Register information and operation specifics are not exposed to the driver. Driver reads the template from flash and executes the instructions located at pre-defined offsets. Template based firmware reset recovery and initialization mechanism minimize driver changes as firmware evolves. Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: 83xx CNA inter driver communication mechanismSony Chacko6-19/+1830
Inter Driver Communication (IDC) module. CNA function drivers(ISCSI, FCOE and NIC) which shares the adapter relies on IDC mechanism for gracefull shut down, restart and firmware error recovery. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: 83xx adpater flash interface routinesSony Chacko3-0/+443
83xx adapter flash memory map, data structures and interface routines Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: 83xx sysfs routinesSony Chacko6-122/+266
Add 83xx sysfs interface routines Update 82xx sysfs interface routines Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: 83xx base driverSony Chacko3-175/+330
Enable base 83xx adapter driver. Common driver interface routines like probe, interface up/down routines, irq and resource allocation routines are modified to add support for 83xx adapter. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: 83xx data path routinesSony Chacko7-133/+676
Add 83xx adapter data path routines Update few 82xx adapter data path routines Modify datapath resource allocation routines Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: 83xx memory map and HW access routinesSony Chacko9-32/+2094
83xx adapter register map. 83xx hardware interface routines. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: macros for common register accessHimanshu Madhani3-80/+107
Refactor 82xx driver to support new adapter - Qlogic 83XX CNA Use QLC_SHARED_REG_RD32 and QLC__SHARED_REG_WR32 macros for 82xx and 83xx common register access. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02qlcnic: change driver hardware interface mechanismSony Chacko9-518/+1035
Refactor 82xx driver to support new adapter - Qlogic 83XX CNA Create adapter abstraction layer and seperate 82xx hardware access routines. Create mailbox based HW interface mechanism Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Add VF device ids and enable featureAriel Elior3-10/+99
Add the various VF device ids (of all supported hardware) Add the calls to enable_sriov and disable_sriov to enable the SR-IOV feature. This patch also advances the version and release date of the bnx2x module. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Support PF <-> VF Bulletin BoardAriel Elior8-2/+320
The PF <-> VF Bulletin Board is a simple interface between the PF and the VF. The main reason for the Bulletin Board is to allow the PF to be the initiator. The VF publishes at 'acquire' stage the GPA of a Bulletin Board structure it has allocated. The PF notes this GPA in the VF database. The VF samples the Bulletin Board periodically for new messages. The latest version of the BB is always used. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Support VF FLRAriel Elior6-7/+321
The FLR indication arrives as an attention from the management processor. Upon VF flr all FLRed function in the indication have already been released by Firmware and now we basically need to free the resources allocated to those VFs, and clean any remainders from the device (FLR final cleanup). Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Support of PF driver of a VF release requestAriel Elior5-1/+170
The 'release' request is the opposite of the 'acquire' request. At release, all the resources allocated to the VF are reclaimed. The release flow applies the close flow if applicable. Note that there are actually two types of release: 1. The VF has been removed, and so issued a 'release' request over the VF <-> PF Channel. 2. The PF is going down and so has to release all of it's VFs. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Support of PF driver of a VF close requestAriel Elior3-0/+119
The 'close' command is the opposite of an init request. Here the queues of the VF are closed (if any are opened) and released. This flow applies the 'q_teardown' flow on all the queues. The VF state is changed by this request. Interrupts are disabled for the VF when closed. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Support of PF driver of a VF q_teardown requestAriel Elior3-0/+295
The 'q_teardown' request is basically the opposite of the 'q_setup'. Here the PF driver removes from the device the queue it opened against the VF fastpath ring at 'setup_q' stage, along with all related rx_mode info. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Support of PF driver of a VF q_filters requestAriel Elior3-0/+589
The VF driver uses the 'q_filters' message on the VF <-> PF channel for configuring an open queue, for example when the rxmode changes. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Support of PF driver of a VF setup_q requestAriel Elior5-177/+1071
Upon receiving a 'setup_q' request from the VF over the VF <-> PF channel the PF driver will open a corresponding queue in the device. The PF driver configures the queue with appropriate mac address, vlan configuration, etc from the VF. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Support statistics collection for VFs by the PFAriel Elior6-93/+217
Statistics are collected by the PF driver. The collection is performed via a query sent to the device which is basically an array of 3-tuples of the form (statistics client, function, DMAE address). In this patch the PF driver adds to the query, on top of the statistics clients it is maintaining for itself (rss queues, storage, etc), the 3-tuples for the VFs it is maintaining. The addresses used are the GPAs of the statistics buffers supplied by the VF in the init message on the VF <-> PF channel. The function parameter ensures that the iommu will translate the GPA to the correct physical address. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Support of PF driver of a VF init requestAriel Elior6-3/+190
The VF driver will send an 'init' request as part of its nic load flow. This message is used by the VF to publish the GPA's of its status blocks, slow path ring and statistics buffer. The PF driver notes all this down in the VF database, and also uses this message to transfer the VF to VF_INIT state internally. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Support of PF driver of a VF acquire requestAriel Elior6-11/+476
When a VF is probed by the VF driver, the VF driver sends an 'acquire' request over the VF <-> PF channel for the resources it needs to operate (interrupts, queues, etc). The PF driver either ratifies the request and allocates the resources, responds with the maximum values it will allow the VF to acquire, or fails the request entirely if there is a problem. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Infrastructure for VF <-> PF request on PF sideAriel Elior5-45/+664
Support interrupt from device which indicates VF has placed A request on the VF <-> PF channel. The PF driver issues a DMAE to retrieve the request from the VM memory (the Ghost Physical Address of the request is contained in the interrupt. The PF driver uses the GPA in the DMAE request, which is translated by the IOMMU to the correct physical address). The request which arrives is examined to recognize the sending VF. The PF driver allocates a workitem to handle the VF Operation (vfop). Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Prepare device and initialize VF databaseAriel Elior8-51/+535
At nic load of the PF, if VFs may be present, prepare the device for the VFs. Initialize the VF database in preparation of VF arrival. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: Allocate VF database in PF when VFs are presentAriel Elior6-1/+570
When A PF determines that it may have to manage SRIOV VFs it allocates a database for this purpose. The database is intended to keep track of the VF state, the resources allocated for each VF (queues, interrupt vectors, etc), the state of the VF's queues. When the VF loads the database is updated accordingly. When A VF closes the database is consulted to determine which resources need to be released (close queues against device, reclaim interrupt vectors, etc). Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-02bnx2x: VF fastpathAriel Elior3-51/+50
When VF driver is transmitting it must supply the correct mac address in the parsing BD. This is used for firmware validation and enforcement and also for tx-switching. Refactor interrupt ack flow to allow for different BAR addresses of the hardware in the PF BAR vs the VF BAR. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>