aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-02-17lantiq_etop: set addr_assign_type if random_ether_addr() usedDanny Kukawka1-0/+7
Set addr_assign_type correctly to NET_ADDR_RANDOM in case a random MAC address was generated and assigned to the netdevice. v2: added comment, renamed bool variable to random_mac Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-17au1000_eth: use eth_hw_addr_random() instead of random_ether_addr()Danny Kukawka1-4/+5
Use eth_hw_addr_random() instead of calling random_ether_addr() to set addr_assign_type correctly to NET_ADDR_RANDOM. v2: adapt to eth_hw_addr_random() Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-16net: sh_eth: add support for VLAN tag filteringYoshihiro Shimoda2-0/+64
Some controllers have TSU. It can register one VLAN tag, and it can filter other VLAN tag by hardware. If vlan_rx_add_vid() is called twice or more, the driver will disable the filtering. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-16net: sh_eth: add support for multicast filteringYoshihiro Shimoda2-5/+286
Some controllers have TSU. It can filter multicast by hardware. This patch supports it. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-16net: sh_eth: modify a condition of ioremap for TSUYoshihiro Shimoda1-11/+14
If the controller has TSU, the each channel needs TSU registers. This patch also fixes the iounmap condition in the sh_eth_drv_remove(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-16net: sh_eth: change the condition of initializationYoshihiro Shimoda1-2/+2
The SH7757 has 2 Fast Ethernet and 2 Gigabit Ethernet, and the first Gigabit channel needs the initialization. So, this patch adds the parameter of "needs_init", and if the sh_eth_plat_data is set it to 1, the driver will initialize the channel. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-16net: sh_eth: add the value of tsu to the SH7757's GETHERYoshihiro Shimoda1-0/+1
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. Miller21-604/+3170
2012-02-16sfc: Add SR-IOV back-end support for SFC9000 familyBen Hutchings13-26/+2192
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 Hutchings6-14/+50
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 Hutchings1-4/+4
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 Hutchings3-108/+239
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 Hutchings2-9/+11
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Make buffer table indices and counts consistently unsignedBen Hutchings2-3/+3
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Disable flow control during flushesSteve Hodgson3-0/+9
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 Hutchings2-6/+7
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 Hutchings1-1/+1
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Leave interrupts and event queues enabled whenever we canBen Hutchings4-318/+308
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 Hutchings3-9/+13
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 Hutchings1-24/+27
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-16sfc: Correct MAC filter bitfield definitionsBen Hutchings1-10/+10
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 Hutchings2-5/+72
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 Hutchings3-47/+214
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 Ray1-2/+2
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 Kukawka1-1/+0
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 Kukawka14-12/+25
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 Kukawka22-25/+24
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 Yuval3-12/+6
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 Yuval1-11/+0
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 Yuval1-0/+5
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 Yuval1-0/+5
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 Yuval1-0/+7
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 Yuval1-2/+11
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 Yuval1-8/+1
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 Yuval1-1/+1
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 Yuval3-79/+272
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 Yuval2-0/+4
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 Yuval6-236/+374
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 Emantayev1-7/+11
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 Emantayev1-12/+4
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 Emantayev1-2/+0
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 Emantayev1-12/+10
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 Emantayev2-4/+1
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 Emantayev1-0/+1
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 Emantayev1-1/+1
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-13tg3: Update copyrightMatt Carlson2-2/+2
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-13tg3: Use *_UNKNOWN ethtool definitionsMatt Carlson2-23/+20
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-13tg3: Remove unneeded link_config.orig_... membersMatt Carlson2-35/+12
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-13tg3: Remove unused link config codeMatt Carlson1-5/+1
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-13tg3: Consolidate ASIC rev detection codeMatt Carlson1-80/+79
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>