Commit Graph

24636 Commits (ab532cf32b4055028ad095d3c1fee9eec28ed25e)

Author SHA1 Message Date
Tom Herbert ab532cf32b bnx2x: Support for managing RX indirection table
Support fetching and retrieving RX indirection table via ethtool.

Signed-off-by: Tom Herbert <therbert@google.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-17 12:49:45 -08:00
David S. Miller f878b995b0 Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6 2011-02-15 12:25:19 -08:00
David S. Miller 29e1846a6b Merge branch 'fec' of git://git.pengutronix.de/git/ukl/linux-2.6 2011-02-15 12:08:24 -08:00
Ben Hutchings 94b274bf5f sfc: Add TX queues for high-priority traffic
Implement the ndo_setup_tc() operation with 2 traffic classes.

Current Solarstorm controllers do not implement TX queue priority, but
they do allow queues to be 'paced' with an enforced delay between
packets.  Paced and unpaced queues are scheduled in round-robin within
two separate hardware bins (paced queues with a large delay may be
placed into a third bin temporarily, but we won't use that).  If there
are queues in both bins, the TX scheduler will alternate between them.

If we make high-priority queues unpaced and best-effort queues paced,
and high-priority queues are mostly empty, a single high-priority queue
can then instantly take 50% of the packet rate regardless of how many
of the best-effort queues have descriptors outstanding.

We do not actually want an enforced delay between packets on best-
effort queues, so we set the pace value to a reserved value that
actually results in a delay of 0.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-02-15 19:45:35 +00:00
Ben Hutchings 525da9072c sfc: Distinguish queue lookup from test for queue existence
efx_channel_get_{rx,tx}_queue() currently return NULL if the channel
isn't used for traffic in that direction.  In most cases this is a
bug, but some callers rely on it as an existence test.

Add existence test functions efx_channel_has_{rx_queue,tx_queues}()
and use them as appropriate.

Change efx_channel_get_{rx,tx}_queue() to assert that the requested
queue exists.

Remove now-redundant initialisation from efx_set_channels().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-02-15 19:45:34 +00:00
Ben Hutchings 60031fcc17 sfc: Move TX queue core queue mapping into tx.c
efx_hard_start_xmit() needs to implement a mapping which is the
inverse of tx_queue::core_txq.  Move the initialisation of
tx_queue::core_txq next to efx_hard_start_xmit() to make the
connection more obvious.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-02-15 19:45:34 +00:00
Uwe Kleine-König cd1f402c18 net/fec: enable flow control and length check on enet-mac
Also optimize not to reread the value written to FEC_R_CNTRL.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:31 +01:00
Uwe Kleine-König b3cde36cf1 net/fec: postpone unsetting driver data until the hardware is stopped
Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:31 +01:00
Uwe Kleine-König d1ab1f54a1 net/fec: provide device for dma functions and matching sizes for map and unmap
This fixes warnings when CONFIG_DMA_API_DEBUG=y:

	NULL NULL: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x000000004781a020] [size=64 bytes]
	net eth0: DMA-API: device driver frees DMA memory with different size [device address=0x000000004781a020] [map size=2048 bytes] [unmap size=64 bytes]

Moreover pass the platform device to dma_{,un}map_single which makes
more sense because the logical network device doesn't know anything
about dma.

Passing the platform device was a suggestion by Lothar Waßmann.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:30 +01:00
Uwe Kleine-König 45993653bd net/fec: reorder functions a bit allows removing forward declarations
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:30 +01:00
Uwe Kleine-König db8880bc92 net/fec: some whitespace cleanup
A few of these were found and reported by Lothar Waßmann.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:30 +01:00
Uwe Kleine-König c556167f81 net/fec: consistenly name struct net_device pointers "ndev"
A variable named "dev" usually (usually subjective) points to a struct
device.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:30 +01:00
Uwe Kleine-König e497ba825b net/fec: add phy_stop to fec_enet_close
This undoes the effects of phy_start in fec_enet_open.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:29 +01:00
Uwe Kleine-König 085e79ed88 net/fec: consolidate all i.MX options to CONFIG_ARM
Moreover stop listing all i.MX platforms featuring a FEC, and use
the platform's config symbol that selects registration of a fec device
instead.  This might make it easier to add new platforms.

Set default = y for ARMs having a fec to reduce defconfig sizes.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:29 +01:00
Uwe Kleine-König 24e531b401 net/fec: put the ioremap cookie immediately into a void __iomem pointer
Saving it first into struct net_device->base_addr (which is an unsigned
long) is pointless and only needs to use more casts than necessary.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:29 +01:00
Uwe Kleine-König 8b06dc2b1c net/fec: no need to memzero private data
alloc_etherdev internally uses kzalloc, so the private data is already
zerod out.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:28 +01:00
Uwe Kleine-König 04e5216d44 net/fec: no need to check for validity of ndev in suspend and resume
dev_set_drvdata is called unconditionally in the probe function and so
it cannot be NULL.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:28 +01:00
Uwe Kleine-König b2b09ad63c net/fec: don't free an irq that failed to be requested
Reported-by: Lothar Waßmann <LW@KARO-elektronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:28 +01:00
Uwe Kleine-König 28e2188efc net/fec: release mem_region requested in probe in error path and remove
Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:28 +01:00
Uwe Kleine-König 8a73b0bc86 net/fec: no need to cast arguments for memcpy
memcpy takes a const void * as 2nd argument.  So the argument is
converted automatically to void * anyhow.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-02-15 09:26:27 +01:00
Baruch Siach d606ef3fe0 phy/micrel: add ability to support 50MHz RMII clock on KZS8051RNL
Platform code can now set the MICREL_PHY_50MHZ_CLK bit of dev_flags in a fixup
routine (registered with phy_register_fixup_for_uid()), to make the KZS8051RNL
PHY work with 50MHz RMII reference clock.

Cc: David J. Choi <david.choi@micrel.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-14 17:38:30 -08:00
Bhupesh Sharma 881ff67ad4 can: c_can: Added support for Bosch C_CAN controller
Bosch C_CAN controller is a full-CAN implementation which is compliant
to CAN protocol version 2.0 part A and B. Bosch C_CAN user manual can be
obtained from:

http://www.semiconductors.bosch.de/media/en/pdf/ipmodules_1/c_can/users_manual_c_can.pdf

This patch adds the support for this controller.
The following are the design choices made while writing the controller
driver:
1. Interface Register set IF1 has be used only in the current design.
2. Out of the 32 Message objects available, 16 are kept aside for RX
   purposes and the rest for TX purposes.
3. NAPI implementation is such that both the TX and RX paths function
   in polling mode.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 22:51:44 -08:00
Guo-Fu Tseng c906041412 jme: Advance driver version
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 21:44:44 -08:00
Guo-Fu Tseng c00cd82641 jme: Don't show UDP Checksum error if HW misjudged
Some JMicron Chip treat 0 as error checksum for UDP packets.
Which should be "No checksum needed".

Reported-by: Adam Swift <Adam.Swift@omnitude.net>
Confirmed-by: "Aries Lee" <arieslee@jmicron.com>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 21:44:43 -08:00
Guo-Fu Tseng 8b53abae58 jme: Refill receive unicase MAC addr after resume
The value of the register which holds receive Unicast MAC Address
sometimes get messed-up after resume.
This patch refill it before enabling the hardware filter.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 20:43:23 -08:00
Guo-Fu Tseng 854a2e7c33 jme: Safer MAC processor reset sequence
Adding control to clk_rx, and makes the control of clk_{rx|tx|tcp}
with safer sequence.
This sequence is provided by JMicron.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 20:43:22 -08:00
Guo-Fu Tseng 3903c02357 jme: Fix hardware action of full-duplex
Clear Transmit Timer/Retry setting while full-duplex.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 20:43:22 -08:00
Guo-Fu Tseng 5175457237 jme: Rename phyfifo function for easier understand
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 20:43:21 -08:00
Guo-Fu Tseng 3c2368d96f jme: Fix bit typo of JMC250A2 workaround
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 20:43:21 -08:00
Guo-Fu Tseng 4872b11fdb jme: PHY Power control for new chip
After main chip rev 5, the hardware support more power saving
control registers.
Some Non-Linux drivers might turn off the phy power with new
interfaces, this patch makes it possible for Linux to turn it
on again.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 20:43:20 -08:00
Guo-Fu Tseng 19d96017d1 jme: Extract main and sub chip revision
Get the main and sub chip revision for later workaround use.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 20:43:20 -08:00
Jiri Pirko 9232ecca3e bond: implement [add/del]_slave ops
allow enslaving/releasing using netlink interface

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 16:58:40 -08:00
Sakari Ailus f45437efff tlan: Fix bugs introduced by the last tlan cleanup patch
Fix two bugs introduced by the commit
c659c38b27 ("tlan: Code cleanup:
checkpatch.pl is relatively happy now.") In that change,
TLAN_CSTAT_READY was considered as a bit mask containing a single bit
set while it was actually had two set instead.

Many thanks to Dan Carpenter for finding the mistake.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 11:06:13 -08:00
Jiri Pirko 1765a57533 net: make dev->master general
dev->master is now tightly connected to bonding driver. This patch makes
this pointer more general and ready to be used by others.

 - netdev_set_master() - bond specifics moved to new function
   netdev_set_bond_master()
 - introduced netif_is_bond_slave() to check if device is a bonding slave

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-13 10:42:07 -08:00
hartleys d5e219c3a2 phy: Remove unneeded depends on PHYLIB
Remove unneeded depends on PHYLIB.  The config selection is already in
an if PHYLIB / endif block.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 22:01:08 -08:00
Ajit Khaparde dcf96f1ff6 be2net: restrict WOL to PFs only.
WOL is not supported for Vrtual Functions.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:49 -08:00
Ajit Khaparde 9b037f3811 be2net: detect a UE even when a interface is down.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:49 -08:00
Ajit Khaparde 7acc2087fa be2net: gracefully handle situations when UE is detected
Avoid accessing the hardware when UE is detected.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:48 -08:00
Ajit Khaparde a4ca055fc3 be2net: fix be_suspend/resume/shutdown
> call pci msix disable in be_suspend
	> call pci msix enable in be_resume
	> stop worker thread in be_suspend
	> start worker thread in be_resume
	> stop worker thread in be_shutdown

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:48 -08:00
Ajit Khaparde fae21a4da5 be2net: pass proper hdr_size while flashing redboot.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:47 -08:00
Ajit Khaparde 60964dd708 be2net: Fix broken priority setting when vlan tagging is enabled.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:47 -08:00
Ajit Khaparde a4b4dfab6c be2net: Allow VFs to call be_cmd_reset_function.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:46 -08:00
Ajit Khaparde f8617e0860 be2net: pass domain numbers for pmac_add/del functions
be_cmd_pmac_add/del functions need to pass domain number to the firmware.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:46 -08:00
Ajit Khaparde 7a2414a50b be2net: For the VF MAC, use the OUI from current MAC address
Currently we are always using the Emulex OUI for a VF MAC address
while generating MAC for a VF.  Use OUI from current MAC instead.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:45 -08:00
Ajit Khaparde 7ab8b0b432 be2net: Cleanup the VF interface handles
The PF needs to cleanup all the interface handles that it created for the VFs.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:45 -08:00
Ajit Khaparde e63193652b be2net: call be_vf_eth_addr_config() after register_netdev
This is to avoid the completion processing for be_vf_eth_addr_config
to consume the link status notification before netdev_register.
Otherwise this causes the PF miss its first link status update.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:44 -08:00
Ajit Khaparde c99ac3e7e4 be2net: Initialize and cleanup sriov resources only if pci_enable_sriov has succeeded.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:44 -08:00
Ajit Khaparde 658681f725 be2net: Use domain id when be_cmd_if_destroy is called.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:43 -08:00
Ajit Khaparde 6bff57a7a6 be2net: endianness fix in be_cmd_set_qos().
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:43 -08:00
Ajit Khaparde 856c40125a be2net: While configuring QOS for VF, pass proper domain id
While configuring QOS for VFs, the VF number should be translated
to domain number correctly.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:42 -08:00