aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-01-09bnx2x: prevent WARN during driver unloadYuval Mintz2-18/+38
Starting with commit 80c33dd "net: add might_sleep() call to napi_disable" bnx2x fails the might_sleep tests causing a stack trace to appear whenever the driver is unloaded, as local_bh_disable() is being called before napi_disable(). This changes the locking schematics related to CONFIG_NET_RX_BUSY_POLL, preventing the need for calling local_bh_disable() and thus eliminating the issue. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06bgmac: fix typosHauke Mehrtens1-2/+2
This fixes some typos found by Sergei. Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller10-158/+257
Conflicts: drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c net/ipv6/ip6_tunnel.c net/ipv6/ip6_vti.c ipv6 tunnel statistic bug fixes conflicting with consolidation into generic sw per-cpu net stats. qlogic conflict between queue counting bug fix and the addition of multiple MAC address support. Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05bnx2x: fix VLAN configuration for VFs.Yuval Mintz5-112/+174
If the hypervisor configures a vlan for the VF via the PF, the expected result is that only packets tagged by said vlan will be received by the VF (and that vlan will be silently removed). Due to an incorrect manipulation of vlan filters in the driver, the VF can receive untagged traffic even if the hypervisor configured some vlan for it. This patch corrects the behaviour. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05bnx2x: fix AFEX memory overflowYuval Mintz1-1/+4
There are 2 different (related) flows in the slowpath configuration that utilize the same pointer and cast it to different structs; This is obviously incorrect as the intended allocated memory is that of the smaller struct, possibly causing the flow utilizing the larger struct to corrupt other slowpath configuration. Since both flows are exclusive, set the allocated memory to be a union of both structs. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05bnx2x: Clean before update RSS arrivesMichal Kalderon2-1/+7
When a PF receives a VF message indicating a change in RSS properties it should clean the flags' bit-fields; Otherwise, it's possible that some random values will be considered as flags by the lower layers configuring the RSS in FW. Signed-off-by: Michal Kalderon <michals@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05bnx2x: Correct number of MSI-X vectors for VFsMichal Kalderon1-3/+6
Number of VFs in PCIe configuration space is zero-based. Driver incorrectly sets the number of VFs to be larger by one than what actually is feasible by HW, which might cause later VFs to fail to allocate their MSI-X interrupts. Signed-off-by: Michal Kalderon <michals@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05bnx2x: limit number of interrupt vectors for 57711Dmitry Kravkov2-3/+5
Original straightforward division may lead to zeroing number of SB and null-pointer dereference when device is short of MSIX vectors or lacks MSIX capabilities. Reported-by: Vladislav Zolotarov <vladz@cloudius-systems.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04bgmac: add support for Northstar SoC (BCM4707, BCM53018)Hauke Mehrtens2-18/+46
This adds support for the Northstar SoC. This SoC does not have a PMU in bcma and no register on it should be called. In addition it support 2.5 GBit/s Ethernet to the PHY. This GMAC core is not fully working there are still problems with the DMA controller. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04bgmac: reset all cores on Northstar SoCHauke Mehrtens1-0/+21
On the Northstar SoC (BCM4707 and BCM53018) we have to enable all GMAC cores when we just want to use on. We iterate over all the cores and activate them. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04bgmac: add support for new BGMAC_CMDCFG_SR position on core rev >= 4Hauke Mehrtens2-5/+7
The BGMAC_CMDCFG_SR register is at a different position on core rev >= 4 We do not know where this register is on a rev 5 or higher core, I have newer seen such a core. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04bgmac: initialize the DMA controller of core rev >= 4Hauke Mehrtens2-0/+73
The DMA controller used in the device supported by GMAC with core rev >= 4 has some new options which are now set to the default values used in the Broadcom SDK. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-03tg3: Update version to 3.136Nithin Sujir1-2/+2
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-03tg3: Poll cpmu link state on APE + ASF enabled devicesNithin Sujir2-0/+12
On ASF enabled devices where the mgmt firmware runs on the application processing engine, there is a race between the tg3 driver processing a link change event and the ASF firmware clearing the link changed bit in the EMAC status register. This leads to link notifications to the driver sometimes getting lost. Poll the CPMU link state as a backup for the normal interrupt path update if ASF is enabled. 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>
2014-01-03tg3: Set the MAC clock to the fastest speed during boot code loadNithin Sujir2-4/+54
On the 5717, 5718 and 5719 devices, the bootcode runs slower when any port doesn't have a link due to clock speed slowing down as part of the link-aware feature. This leads to the driver timing out waiting for the bootcode signature. This patch overrides the clock policy to the highest frequency just before reset and restores it after the bootcode is up. 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>
2014-01-03tg3: Add unicast filtering support.Michael Chan1-0/+21
Up to 3 additional unicast addresses can be added to the perfect match filter table. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-03tg3: Refactor __tg3_set_mac_addr()Michael Chan1-13/+22
so that individual MAC address filter entries can be set. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bnx2x: Fix KR2 work-around detection of BCM8073Yaniv Rosner1-1/+1
KR2 work-around is based on detecting non-KR2 devices which may not link up in this mode. One such link-partner is the BCM8073 which has specific advertisement characteristics in specific mode, and this condition was not set correctly. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bnx2x: Fix incorrect link-up reportYaniv Rosner1-0/+4
Fix a problem where link is reported to be up when SFP+ module is plugged in without cable. This occurs with specific module types which may generate temporary TX_FAULT indication. Solution is to avoid changing any link parameters when checking TX_FAULT indication while physical link is down. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bnx2x: Fix Duplex setting for 54618seYaniv Rosner1-26/+28
BCM54618SE is used to advertise half-duplex even if HD was not requested by the user. This change makes the legacy speed/duplex advertisement for this PHY exactly according to the requested speed and duplex. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bnx2x: Fix passive DAC cable detectionYaniv Rosner1-9/+12
Fix Passive DAC detection for specific cables, such that even in case SFP_CABLE_TECHNOLOGY option is not set in the EEPROM (offset 8), treat it as a passive DAC cable, since some cables don't have this indication. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-01bnx2x: Fix 578xx-KR 1G linkYaniv Rosner2-0/+14
Fix a problem where 578xx-KR is unable to get link when connected to 1G link partner. Two fixes were required: One was to force CL37 sync_status low to prevent Warpcore from getting stuck in CL73 parallel detect loop while link partner is sending. Second fix was to enable auto-detect mode, thus allowing the Warpcore to select the higher speed protocol between 10G-KR (over CL73), or go down to 1G over CL73 when there's indication for it. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> 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>
2013-12-31net: bnx2x: slight optimization of addr comparedingtianhong3-8/+6
Use the possibly more efficient ether_addr_equal or ether_addr_equal_unaligned to instead of memcmp. Cc: Ariel Elior <ariele@broadcom.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-27bgmac: use phy_mii_ioctl in ioctl handlerHauke Mehrtens1-21/+5
This works pretty much the same way, so avoid duplicating the code. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-27bgmac: drop duplicated PHY definesRafał Miłecki2-25/+2
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-27tg3: Expand 4g_overflow_test workaround to skb fragments of any size.Nithin Sujir1-1/+1
The current driver assumes that an skb fragment can only be upto jumbo size. Presumably this was a fast-path optimization. This assumption is no longer true as fragments can be upto 32k. v2: Remove unnecessary parantheses per Eric Dumazet. Cc: stable@vger.kernel.org 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-12-26bnx2x: Fix build with SRIOV disabled.David S. Miller1-0/+2
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c: In function 'bnx2x_drv_info_ether_stat': drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:3302:46: error: dereferencing pointer to incomplete type make[6]: *** [drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.o] Error 1 Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-26bnx2x: add VF Multicast filters supportYuval Mintz3-19/+39
This patch adds the necessary support for configuring (and removing) multicast filters to VFs. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-26bnx2x: Add num of VFs to Management statisticsYuval Mintz1-0/+2
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-26bnx2x: no error when RSS configuration failsYuval Mintz1-4/+8
It's possible for VMs with older versions of bnx2x to run over a hypervisor with latest driver. If a VF in such a VM does not support RSS configuration, the PF driver in the hypervisor will print an error message to system logs. This changes the error message into a debug message, as this is very likely a false alarm for an older VF (i.e., VF manages to work properly; PF simply cannot configure the additional queues for it). Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-26bnx2x: add Big-Endian ethtool commentYuval Mintz1-0/+6
There's a known issue that using `ethtool -e' flips the endianity of the written data, i.e., using `ethtool -E' to dump eeprom image and than using `ethtool -e' to re-write that same image will result in an image where the data has the opposite endianity. Sadly, this cannot be fixed as there are already various tools deployed based on the endianity of the eeprom read/write. Instead, a comment is added to the code to help explain why this is un-fixable. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-26bnx2x: Add AER support (missing bits)Yuval Mintz2-0/+30
This function adds several OS calls required to fully enable PCIe AER support - pci_enable_pcie_error_reporting() and pci_cleanup_aer_uncorrect_error_status(). Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-26bnx2x: Add support for Multi-Function UNDIYuval Mintz4-12/+87
This adds the ability for bnx2x to load after UNDI is used in the preboot environment on a multi-function interface which is not the first interface of a given device. Notice a side-effect is that the order by which the functions are probed and thus interfaces appear might change, as this patch utilizes the EPROBE_DEFER return value (and mechanism). Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: use fixed PHY device if we do not find anyHauke Mehrtens2-1/+18
The ADM6996L switch and some Broadcom switches with two MII interfaces like the BCM5325F connected to two MACs on the SoC, used on some routers do not return a valid value when reading the PHY id register and Linux thinks there is no PHY at all, but that is wrong. This patch registers a fixed phy in the arch code and then searches it when there is no other phy in the Ethernet driver code. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: do not set PHY address to 30 for every ext PHYHauke Mehrtens1-2/+5
b44_phy_reset() will fail for an external PHY and only work with the internal PHY, this was an old workaround when the detection of an external switch based on the PHY address failed and it is not needed any more. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: activate PHY when MAC is offHauke Mehrtens1-1/+4
Without this patch we can not access the PHY when the MAC is switched off. This PHY access is needed to configure the switch, which is done through PHY registers. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: add phylib supportHauke Mehrtens3-5/+189
Most of the older home routers based on the Broadcom BCM47XX SoC series are using a MAC that is supported by b44. On most of these routers not the internal PHY of this MAC core is used, but a switch sometimes on an external chip or integrated into the same SoC as the Ethernet core. For this switch a special PHY driver is needed which should not be integrated into b44 as the same switches are also used by other Broadcom home networking SoCs which are using different Ethernet MAC drivers. This was tested with the b53 switch driver which is currently on its way to mainline. If the internal PHY is not used, b44 will now search on the MDIO bus for a phy and use the Linux phylib subsystem to register a driver. Support for the internal PHY must stay here, because there are some device which are suing the internal phy. With this patch we scan the mdio bus when the sprom or nvram says that the PHY address is 30, if a PHY was found at this address b44 uses it. This was tested with a BCM4704, BCM4712 and BCM5354. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: rename b44_mii_{read, write} to b44_mdio_{read, write}_miiHauke Mehrtens1-5/+5
The next patch will add these functions for phylib, and we should rename the old ones before. This now indicates that these functions are used for the mdio registers and on the mii interface. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: abort when no PHY is available at allHauke Mehrtens2-0/+7
When the phy address is 31, this means that there is no PHY connected to this MAC at all, no internal and no external PHY. Reading these PHY registers causes a system reset on some routers. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: rename B44_PHY_ADDR_NO_PHY to B44_PHY_ADDR_NO_LOCAL_PHYHauke Mehrtens2-4/+4
The PHY address 30 means there is no local PHY, but there could be an external PHY like a switch connected via MII. This is the case on most embedded home routers where this driver is used. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: check register instead of PHY address to detect external PHYHauke Mehrtens2-10/+10
The Ethernet core supported by b44 supports an internal PHY integrated into the mac core, which is supported by the b44 driver and an external PHY to which the mac core is connected. This external PHY could be a switch connected through MII, which is often the case when this core is used on home routers. The usage of an external PHY was assumed when the PHY address 30 was used and an internal PHY was assumed when the PHY address was different. To verify that b44_phy_reset() was called and checked if it worked, otherwise PHY address 30 was assumed, an external PHY. It is better to check the register which says which PHY is connected to the MAC instead of checking the PHY address. The interface to an external PHY was only activated when this register was set. This also changes B44_FLAG_INTERNAL_PHY to B44_FLAG_EXTERNAL_PHY, it is easier to check. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-19bnx2x: cleanup skb_set_hashTom Herbert2-13/+12
Save pkt_hash_types in tpa structure. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-19bnx2x: downgrade "valid ME register value" message levelMichal Schmidt1-1/+1
"valid ME register value" is not an error. It should be logged for debugging only. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Acked-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+3
Conflicts: drivers/net/ethernet/intel/i40e/i40e_main.c drivers/net/macvtap.c Both minor merge hassles, simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-18net: bnx2x calls skb_set_hashTom Herbert1-4/+7
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>