aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-01-31drivers/net: Remove alloc_etherdev error messagesJoe Perches4-7/+1
alloc_etherdev has a generic OOM/unable to alloc message. Remove the duplicative messages after alloc_etherdev calls. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-31drivers/net: Remove unnecessary k.alloc/v.alloc OOM messagesJoe Perches2-6/+2
alloc failures use dump_stack so emitting an additional out-of-memory message is an unnecessary duplication. Remove the allocation failure messages. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-26bnx2x: Update version to 1.72.0 and copyrightsAriel Elior20-22/+22
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>
2012-01-26bnx2x: Recoverable and unrecoverable error statisticsAriel Elior3-3/+26
Add statistics for tracking parity errors from which we successfully recovered and those which were deemed unrecoverable. 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>
2012-01-26bnx2x: Recovery flow bug fixesAriel Elior3-48/+75
1. Sample mcp pulse and mcp sequence in nic load instead of in init_one as they may change by the time we want to use them. 2. Allow cnic to access device during nic load (by adding a new "LOADING" state to recovery flow). This prevents the unnecessary cnic timeout which resulted by cnic attempting to access because nic is loading, but being blocked because of the Recovery state. 3. Issue 'fake' driver load command to mcp when last driver unloads to prevent mcp from taking ownership. When recovery is complete unload fake driver to allow mcp to initialize the hardware before first driver loads. 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>
2012-01-26bnx2x: Track active PFs with bitmapAriel Elior3-33/+35
The recovery register (to which a hardware lock has been added in previous patch) is used amongst other things to track the active PFs. The old implementation which used a per path counter is not viable in a virtualized environment where a pf may increment the counter and then have the kernel crash around it preventing the counter from ever reaching zero. In the new implementation the scenario described will result in the PF timing out against the mcp, which will clear the PF's bit in the bitmask allowing recovery process to proceed. 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>
2012-01-26bnx2x: Lock PF-common resourcesAriel Elior4-38/+68
Use hardware locks to protect resources common to several Physical Functions. In a virtualized environment the RTNL lock only protects a PF's driver against the PFs sharing it's VMs with regard to device resources. Other PFs may reside in other VMs under other OSs, and are not subject to the lock. Such resources which were previously protected implicitly by the RTNL lock must now be protected explicitly with dedicated HW locks. 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>
2012-01-26bnx2x: Loaded Firmware Version ValidationAriel Elior1-0/+23
In a virtualized environment it is possible for a loading driver to discover that Firmware is already loaded to the device, and that this FW does not match its own. This can happen for example if different Physical Functions are Assigned to different VMs in which different driver versions are loaded. The code in this patch ensures that only drivers with matching FW are loaded over the device, and that in the case described above where the Firmware version doesn't match the driver load is aborted. 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>
2012-01-26bnx2x: Function Level Reset Final CleanupAriel Elior1-12/+16
1. Fix bug where return value is ignored 2. Improve printouts 3. Fix typos 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>
2012-01-26bnx2x: Obtain Bus Device Function from registerAriel Elior2-2/+18
BDF was obtained from kernel but since in virtualized environment (e.g. physical device assigment in KVM) the function number may not be the real one, the info must be obtained from the device. 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>
2012-01-26bnx2x: Removing indirect register accessAriel Elior2-30/+47
In virtualized environments indirect access to the device may not be supported (depending on the Hypervisor type). Indirect device access was used since in some harware contexts (i.e. certain chipset and BIOS) every access the driver makes across the pci is followed by a BIOS initiated Zero Length Read to the same address. When accessing widebus registers this zero length read corrupts the serialization of the read/write sequence resulting with errors. To avoid this problem widebus registers are always accessed via the DMAE or the indirect interface. However, the 57712x and 578xx devices intercept the zero length read and so using the indirect interface with these devices is not necessary. Since PDA is only supported for 57712x and 578xx the indirect access to device was restricted to 57710 and 57711x. 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>
2012-01-26bnx2x: Support Queue Per Cos in 5771xx devicesAriel Elior2-5/+6
Enable the use of up to three hardware queues for transmission. The queues are always dequed round robin (i.e. strict priority, PFC and ETS are not supported). This does allow the allocation of a seperate HW queue for low volume, high priority traffic which will be serviced more promptly. 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>
2012-01-25bnx2x: unlock before returning an errorDan Carpenter1-0/+1
We introduced a new return here but forgot to drop the lock. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-23tg3: fix ipv6 header length computationEric Dumazet1-7/+2
tg3_start_xmit() makes the wrong assumption for TSOV6 that skb->head doesnt include any payload data. if (skb_is_gso_v6(skb)) hdr_len = skb_headlen(skb) - ETH_HLEN; This is not true anymore after commit f07d960df3 (tcp: avoid frag allocation for small frames) We should instead use : skb_transport_offset(skb) + tcp_hdrlen(skb) Its also true for IPv4 Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Matt Carlson <mcarlson@broadcom.com> CC: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-23bnx2x: fix compilation error with SOE in fw_dumpYuval Mintz1-1/+1
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-23bnx2x: handle CHIP_REVISION during init_oneAriel Elior1-4/+5
The macro `CHIP_IS_E1x' requires `bp' to be initialized. As `bp' is not yet initialized during this phase of `bnx2x_init_dev', it accessed uninitialized fields in the struct. 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>
2012-01-23bnx2x: allow user to change ring size in ISCSI SD modeDmitry Kravkov1-1/+1
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-23bnx2x: fix Big-Endianess in ethtool -tDmitry Kravkov1-3/+2
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-23bnx2x: fixed ethtool statistics for MF modesYuval Mintz1-65/+41
Previosuly, in MF modes `ethtool -S' lacked some of the statistics which appeared in non-MF modes. This has been fixed. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-23bnx2x: credit-leakage fixup on vlan_mac_del_allYuval Mintz2-1/+54
Upon insertion of elements into the execution queue, it is validated that there are enough credits to support additional vlan-macs, and the credits are consumed. However, when removing a pending command in `bnx2x_vland_mac_del_all' the consumed credits are not released, which might cause leakage and eventually the inability to add new vlan-macs in certain scenarios. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17tg3: Fix single-vector MSI-X codeMatt Carlson1-13/+14
Kdump kernels leave MSI-X interrupts (as setup by the crashed kernel) enabled. However, kdump only enables one CPU in the new environment, thus causing tg3 to abort MSI-X setup. When the driver attempts to enable INTA or MSI interrupt modes on a kdump kernel, interrupt delivery fails. This patch attempts to workaround the problem by forcing the driver to enable a single MSI-X interrupt. In such a configuration, the device's multivector interrupt mode must be disabled. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bnx2x: Disable AN KR work-around for BCM57810Yaniv Rosner1-1/+9
Disable the work-around for the autoneg KR of the BCM57810 in case the Warpcore version is 0xD108 and above, which fixes this problem. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bnx2x: Remove AutoGrEEEn for BCM84833Yaniv Rosner1-6/+2
Disable the autoGrEEEn feature for BCM84833. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bnx2x: Remove 100Mb force speed for BCM84833Yaniv Rosner2-6/+21
Remove unsupported speed of 100Mb force for BCM84833 due to hardware limitation. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bnx2x: Fix PFC setting on BCM57840Yaniv Rosner2-10/+13
This patch handles the second port of a path in a 4-port device of BCM57840. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bnx2x: Fix Super-Isolate mode for BCM84833Yaniv Rosner1-113/+137
The Super-Isolate mode comes to isolate the BCM84833 PHY from the outside world. Not doing it correctly, made link partner see the link before the driver was loaded. This patch also involves SPIROM version fixes since it is used to determine whether the common init of the PHY was already executed, and the common init of this PHY is partially responsible for setting the Super-Isolate mode. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-10bcm63xx_enet: use an unique MDIO bus name.Florian Fainelli1-1/+1
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-10sb1250: use an unique MDIO bus name.Florian Fainelli1-1/+2
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-09bcm63xx: make ethtool_ops conststephen hemminger1-1/+1
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-05cnic: Improve error recovery on bnx2x devicesMichael Chan3-8/+74
When a bnx2x device encounters parity errors, it will not respond to all SPQ messages. As a result, the shutdown sequence before reset can take a long time as the ulp drivers (bnx2i/bnx2fc) have to wait for timeout of all such messages. To improve this scenario, when bnx2x returns error on the SPQ, we'll send an immediate response to the ulp drivers to avoid such lengthy timeouts. Adjust the return code of relevant functions to return error only if the message cannot be sent on the SPQ so that we'll generate an error completion to the ulp drivers. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-05cnic: Re-init dev->stats_addr after chip resetMichael Chan1-0/+1
because bnx2x frees the old and allocates new memory during chip reset. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-19net: fix assignment of 0/1 to bool variables.Rusty Russell1-4/+4
DaveM said: Please, this kind of stuff rots forever and not using bool properly drives me crazy. Joe Perches <joe@perches.com> gave me the spatch script: @@ bool b; @@ -b = 0 +b = false @@ bool b; @@ -b = 1 +b = true I merely installed coccinelle, read the documentation and took credit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-19tg3: Make the RSS indir tbl admin configurableMatt Carlson1-7/+101
This patch adds the ethtool callbacks necessary to change the rss indirection table from userspace. Should the number of interrupts change (e.g. across a close / open call, or through a reset) and any one of the indirection table values fall out-of-range, the driver will reset the indirection table to a default layout. [Integrated many suggestions made by Ben Hutchings.] Changes since v3 * Removed TG3_FLAG_SUPPORT_MSIX checks at the start of tg3_get_rxfh_indir() and tg3_set_rxfh_indir(). Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-19bnx2: Update driver to use new mips firmware.Michael Chan1-4/+4
bnx2-mips-06-6.2.3 and bnx2-mips-09-6.2.1.b New firmware fixes iSCSI problems with some LeftHand targets that don't set TTT=0xffffffff for Data-In according to spec. Firmware generates exception warnings for this condition and becomes very slow. This is fixed by suppressing these warnings when using default error mask. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-16ethtool: Define and apply a default policy for RX flow hash indirectionBen Hutchings1-1/+2
All drivers that support modification of the RX flow hash indirection table initialise it in the same way: RX rings are assigned to table entries in rotation. Make that default policy explicit by having them call a ethtool_rxfh_indir_default() function. In the ethtool core, add support for a zero size value for ETHTOOL_SRXFHINDIR, which resets the table to this default. Partly-suggested-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Shreyas N Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-16ethtool: Centralise validation of ETHTOOL_{G, S}RXFHINDIR parametersBen Hutchings1-25/+14
Add a new ethtool operation (get_rxfh_indir_size) to get the indirectional table size. Use this to validate the user buffer size before calling get_rxfh_indir or set_rxfh_indir. Use get_rxnfc to get the number of RX rings, and validate the contents of the new indirection table before calling set_rxfh_indir. Remove this validation from drivers. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-15tg3: Break out RSS indir table init and assignmentMatt Carlson2-23/+37
This patch creates a new device member to hold the RSS indirection table and separates out the code that initializes the table from the code that programs the table into device registers. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-15tg3: Use mii_advertise_flowctrlMatt Carlson1-19/+3
This patch replaces tg3's internal tg3_advert_flowctrl_1000T function with mii_advertise_flowctrl provided by the kernel headers. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-15tg3: Add 57766 ASIC rev supportMatt Carlson2-27/+58
This patch adds support for the 57766 ASIC revision. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-15tg3: Make the TX BD DMA limit configurableMatt Carlson2-8/+9
The 57766 ASIC rev will impose a new TX BD DMA limit on the driver. This patch prepares for 57766 support by making the tx BD DMA limit tunable. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-15tg3: Enable EEE support for capable 10/100 devsMatt Carlson1-10/+9
There are some devices in the 57765 ASIC rev that are EEE capable. Unfortunately the EEE setup code only gets executed if the device is gigabit capable. This patch fixes the problem. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-14bnx2x: handle vpd data longer than 128 bytesBarak Witkowski1-7/+28
Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-13bnx2x: properly update skb when mtu > 1500Dmitry Kravkov1-11/+11
Since commit e52fcb2462ac484e6dd6e68869536609f0216938 newly allocated skb for small packets are not updated properly and dropped by stack. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08bnx2x: properly initialize L5 featuresDmitry Kravkov2-6/+8
The code is missing initialization of NO_FCOE_FLAG and NO_ISCSI*FLAGS when CONFIG_CNIC is not selected. This causes panic during driver load since commit 1d187b34daaecbb87aa523ba46b92930a388cb21 where NO_FCOE tested unconditionally (outside #ifdef BCM_CNIC structure) and accessed fp[FCOE_IDX] which is not allocated. Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Update version to 3.122Matt Carlson1-2/+2
This patch updates the tg3 version to 3.122. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Return flowctrl config through ethtoolMatt Carlson1-2/+2
This patch changes the driver to return the flow control configuration rather than the flow control status through the ETHTOOL_GPAUSEPARAM ioctl. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Track LP advertisingMatt Carlson2-3/+38
This patch adds code to track the autonegotiation advertisements of the link partner and report them through ethtool. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Integrate flowctrl check into AN adv checkMatt Carlson1-56/+25
This patch integrates tg3_adv_1000T_flowctrl_ok() into tg3_copper_is_advertising_all() and renames the function tg3_phy_copper_an_config_ok(). Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Save stats across chip resetsMatt Carlson1-9/+17
Tg3 has a place to store stats, but doesn't really use it. This patch modifies the driver so that stats are saved across chip resets and gets cleared across close / open calls. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Remove ethtool stats member from dev structMatt Carlson2-8/+7
This patch removes the ethtool stats member from the tg3 device structure. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>