summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-02-16net: sh_eth: add the value of tsu to the SH7757's GETHERYoshihiro Shimoda
The SH7757's GETHER has TSU registers. So, this patch adds the value of ".tsu = 1" in the sh_eth_cpu_data. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-nextDavid S. Miller
2012-02-16sfc: Add SR-IOV back-end support for SFC9000 familyBen Hutchings
On the SFC9000 family, each port has 1024 Virtual Interfaces (VIs), each with an RX queue, a TX queue, an event queue and a mailbox register. These may be assigned to up to 127 SR-IOV virtual functions per port, with up to 64 VIs per VF. We allocate an extra channel (IRQ and event queue only) to receive requests from VF drivers. There is a per-port limit of 4 concurrent RX queue flushes, and queue flushes may be initiated by the MC in response to a Function Level Reset (FLR) of a VF. Therefore, when SR-IOV is in use, we submit all flush requests via the MC. The RSS indirection table is shared with VFs, so the number of RX queues used in the PF is limited to the number of VIs per VF. This is almost entirely the work of Steve Hodgson, formerly shodgson@solarflare.com. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Allocate SRAM between buffer table and descriptor caches at init timeBen Hutchings
Each port has a block of 64-bit SRAM that is divided between buffer table and descriptor cache regions at initialisation time. Currently we use a fixed allocation, but it needs to be changed to support larger numbers of queues. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Pass NIC structure into efx_wanted_parallelism()Ben Hutchings
This lets us identify the NIC affected in case of failure, and will be necessary to adjust for SR-IOV constraints. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Add support for 'extra' channel typesBen Hutchings
Abstract some of the channel operations to allow for 'extra' channels that do not have RX or TX queues. - Try to assign a channel to each extra channel type that is enabled for the NIC, but gracefully degrade if we can't allocate sufficient MSI-X vectors - Allow each extra channel type to generate its own channel name - Allow channel types to disable reallocation and reinitialisation of their channels Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Make all CPU/IRQ/channel/queue counts unsignedBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Make buffer table indices and counts consistently unsignedBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Disable flow control during flushesSteve Hodgson
The TX DMA engine issues upstream read requests when there is room in the TX FIFO for the completion. However, the fetches for the rest of the packet might be delayed by any back pressure. Since a flush must wait for an EOP, the entire flush may be delayed by back pressure. Mitigate this by disabling flow control before the flushes are started. Since PF and VF flushes run in parallel introduce fc_disable, a reference count of the number of flushes outstanding. The same principle could be applied to Falcon, but that would bring with it its own testing. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Generalise event generation to cover VF-owned event queuesBen Hutchings
For SR-IOV we will need to send events to event queues that belong to VFs serviced by other drivers. Change the parameters of efx_generate_event() to allow this and declare it extern. While we're at it, remove the existing declaration under the wrong name efx_nic_generate_event(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Use proper function to test for RX channel in efx_poll()Ben Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Leave interrupts and event queues enabled whenever we canBen Hutchings
When SR-IOV is enabled we may receive FLR (Function-Level Reset) events, associated queue flush events and requests from VF drivers at any time. Therefore we need to keep event queues and interrupts enabled whenever possible. Currently we stop interrupt-driven event processing before flushing RX and TX queues; efx_nic_flush_queues() then polls event queues for flush events and discards any others it finds. Change it to work with the regular event handling functions. Currently efx_start_channel() fills RX queues synchronously when a device is brought up. This could now race with NAPI, so change it to send fill events. This was almost entirely written by Steve Hodgson, formerly shodgson@solarflare.com. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Generate RX fill events based on RX queues, not channelsBen Hutchings
This makes it harder to accidentally send such events to TX-only channels. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Generalise driver event generationBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Correct MAC filter bitfield definitionsBen Hutchings
The RMFT_DEST_MAC and TMFT_SRC_MAC register fields were previously documented as 44 bits wide, whereas a MAC address has 48 bits. Thankfully the hardware uses the correct width and the driver has used separate definitions that divide each of these into 32-bit and 16-bit fields. Fix the initial definitions for these fields and rewrite the latter definitions to use them. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Add support for TX MAC filtersBen Hutchings
On Siena each TX queue can be configured to send only packets for which there is a TX MAC filter that matches the source MAC address, queue ID, and optionally VID. This will be used to implement the 'spoofchk' feature for SR-IOV virtual functions. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Add support for configuring RX unicast/multicast default filtersBen Hutchings
On Siena all received packets that don't match a more specific filter will match the unicast or multicast default filter. Currently we leave these set to the default values (RSS with base queue number of 0). Allow them to be reconfigured to select a single RX queue. These default filters are programmed through the FILTER_CTL register, but we represent them internally as an additional table of size 2. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-15cxgb3: update firmware versionDivy Le Ray
Hi Dave, This patch is sent in conjunction with the cxgb3 firmware update submission on linux-firmware. (https://lkml.org/lkml/2012/2/13/27) Cheers, Divy From: Divy Le Ray <divy@chelsio.com> This patch updates the firmware version cxgb3 is requesting to 7.12.0. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15renesas/sh_eth.c: fix linux/interrupt.h included twiceDanny Kukawka
Remove double include of linux/interrupt.h. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15net: use eth_hw_addr_random() and reset addr_assign_typeDanny Kukawka
Use eth_hw_addr_random() instead of calling random_ether_addr() to set addr_assign_type correctly to NET_ADDR_RANDOM. Reset the state to NET_ADDR_PERM as soon as the MAC get changed via .ndo_set_mac_address. v2: adapt to renamed eth_hw_addr_random() Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15net: replace random_ether_addr() with eth_hw_addr_random()Danny Kukawka
Replace usage of random_ether_addr() with eth_hw_addr_random() to set addr_assign_type correctly to NET_ADDR_RANDOM. Change the trivial cases. v2: adapt to renamed eth_hw_addr_random() Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15bnx2x: allow all functions to display the phy FW versionMintz Yuval
The phy FW version is stored in regular memory, no MDC-MDIO access or any special locks are required to read it in the current implementation. 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-02-15bnx2x: removed code re-checking memory base after device openMintz Yuval
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-02-15bnx2x: allow BCM84833 phy to advertise 100Base-T speedsMintz Yuval
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-02-15bnx2x: notify cnic of address of info-to-the-mcpMintz Yuval
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-02-15bnx2x: allocate smaller Rx rings for 1G functionsMintz Yuval
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-02-15bnx2x: allocate memory dynamically in ethtool self-test.Mintz Yuval
From: Merav Sicron <meravs@broadcom.com> Current ethtool self tests usesa large buffer on stack. This patch replaces that array by dynamically allocated memory Signed-off-by: Merav Sicron <meravs@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15bnx2x: force 10G on 84833 phy should be autoneg with only 10G advertisedMintz Yuval
From: Yaniv Rosner <yaniv.rosner@broadcom.com> Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15bnx2x: added autoneg-restart after link advertisement changesMintz Yuval
From: Yaniv Rosner <yaniv.rosner@broadcom.com> Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15bnx2x: ethtool publishes link partners speed and FCMintz Yuval
Following the changes in the ethtool source code, this patch enables the bnx2x driver to publish the Link partner's capabilities s, when ethtool is used on an interface which completed autoneg. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15bnx2x: half duplex support added for several boardsMintz Yuval
From: Yaniv Rosner <yaniv.rosner@broadcom.com> Several boards require an additional HW bit written in-order to enable half duplex. Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15bnx2x: consistent statistics after internal driver reloadMintz Yuval
Currently bnx2x statistics are reset by inner driver reload, e.g. by MTU change. This patch fixes this issue - from now on statistics should only be reset upon device closure. Thanks to Michal Schmidt <mschmidt@redhat.com> for his initial patch regarding this issue. 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-02-14mlx4: add unicast steering entries to resource_trackerEugenia Emantayev
Add unicast steering entries to resource tracker. Do qp_detach also for these entries when VF doesn't shut down gracefully. Otherwise there is leakage of these resources, since they are not tracked. Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il> Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14mlx4: attach multicast with correct flagEugenia Emantayev
mlx4_multicast_attach/detach() should use always MLX4_MC_STEER flag Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il> Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14mlx4: remove redundant adding of steering type to gidEugenia Emantayev
mlx4_uc_steer_add/release() should not add MLX4_UC_STEER flag to gid. It is added in mlx4_unicast_attach/detach(). Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il> Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14mlx4: remove unnecessary variables and argumentsEugenia Emantayev
mlx4_qp_attach/detach_common() don't use hash variable, move it to find_entry() static find_entry() in mcg.c doesn't use steer argument Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il> Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14mlx4: remove unused field high_priosEugenia Emantayev
Remove unnecessary field high_prios from mlx4_steer struct and initialization Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il> Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14mlx4: fix QP tree trashingEugenia Emantayev
When adding new unicast steer entry, before moving qp to state ready, actually before calling mlx4_RST2INIT_QP_wrapper(), there were added a lot of entries with local_qpn=0 into radix tree. This fact impacted the get_res() function and proper functioning of resource tracker in addition to adding trash entries into radix tree. Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il> Reviewed-by: Yevgeny Petrilin <yevgenyp@melllanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14mlx4_core: fix buffer overrunEugenia Emantayev
When passing MLX4_UC_STEER=1 it was translated to value 2 after mlx4_QP_ATTACH_wrapper. Therefore in new_steering_entry() unicast steer entries were added to index 2 of array of size 2. Fixing this bug by shift right to one position. Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il> Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14tg3: Update copyrightMatt Carlson
This patch updates the copyright dates in the tg3 driver. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14tg3: Use *_UNKNOWN ethtool definitionsMatt Carlson
This patch replaces tg3's private SPEED_INVALID and DUPLEX_INVALID definitions with SPEED_UNKNOWN and DUPLEX_UNKNOWN respectively. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14tg3: Remove unneeded link_config.orig_... membersMatt Carlson
This patch removes the unneeded link_config.orig_* members. When the phy is in a low power state, the TG3_PHYFLG_IS_LOW_POWER flag solely determines how the link is configured. When the phy is powered back up, it can resume using the original settings. For the phylib case, the link configuration still needs to be saved, but since the phylib maintains its own configuration, we can repurpose the (unused in this case) tg3 link configuration members. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14tg3: Remove unused link config codeMatt Carlson
When tg3 devices are shutdown, the driver uses the TG3_PHYFLG_IS_LOW_POWER flag to enable a static phy configuration. Any attempt to use the link configuration variables is dead code. This patch removes such code. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14tg3: Consolidate ASIC rev detection codeMatt Carlson
Detecting the ASIC revision of a device is getting to be an increasingly complex process. This patch consolidates all the ASIC rev detection code to a single routine for better maintainability. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14tg3: Reduce UMP event collision windowMatt Carlson
The tg3 driver needs to submit a few phy register values to the UMP firmware each time the link state changes. Up until now, the driver would wait for the previous event to complete, then proceed to gather data through a series of phy accesses. Since phy accesses are relatively slow, it is possible for another thread to attempt to submit its own event while the UMP code is still construction its message. This patch seeks to minimize the collision window as much as possible by preloading the phy data. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14tg3: Fix NVRAM page writes on newer devicesMatt Carlson
On newer devices, the hardware expects the NVRAM address register to be written only once per NVRAM page. To do otherwise causes NVRAM corruption. This patch fixes the problem. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14tg3: Fix copper autoneg adv checksMatt Carlson
When checking the autoneg advertisements, the driver failed to include the master and master enable bits for the bcm5701. This patch fixes the problem. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14tg3: Fix stats while interface is downMatt Carlson
If the tg3 interface is down, the driver will return ethtool stats uninitialized. This patch zeroes out the destination stat buffer in such a case. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-14tg3: Disable new DMA engine for 57766Matt Carlson
A bug was found in the new DMA engine for the 57766. This patch disables it, which causes the device to fallback to the old DMA engine. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-13Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next