Commit Graph

17950 Commits (108316c1bd0a75ba855ce4a6540c530e1562bfb0)

Author SHA1 Message Date
Giuseppe CAVALLARO 108316c1bd stmmac: update the driver's module version
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:12 -08:00
Giuseppe CAVALLARO 7187c1ad1a stmmac: improve Kconfig help
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:11 -08:00
Giuseppe CAVALLARO 5e33c79123 stmmac: include netdevice.h into the common.h header
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:11 -08:00
Giuseppe CAVALLARO 21d437cc66 stmmac: rename the gmac as dwmac1000 and split core and dma parts
Use dwmac1000 naming instead of gmac.
The patch also splits the gmac.c file in two new ones:
dwmac1000_core.c and dwmac1000_dma.c.
This could actually help on some architectures where different
DMA engines are used.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:10 -08:00
Giuseppe CAVALLARO 7e848ae113 stmmac: rename mac100 as dwmac100 and fix spare coding style
This patch renames the mac100.[ch] as dwmac100.[ch]; this
looks more specific and appropriate for these chip series.
The patch also fixes some spare coding style issues.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:09 -08:00
Giuseppe CAVALLARO aec7ff2781 stmmac: move the dma out from the main
This patch moves the dma related functions (interrupt, start, stop etc.)
out from the main driver code. This will help to support new DMA
engines.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:09 -08:00
Giuseppe CAVALLARO db98a0b001 stmmac: reorganise class operations.
This patch reorganises the internal stmmac ops structure.
The stmmac_ops has been splitted into other three structures named:
 stmmac_ops
 stmmac_dma_ops
 stmmac_desc_ops

This makes the code more clear and also helps the next work to
make the driver more generic.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:08 -08:00
Giuseppe CAVALLARO 65818fa744 stmmac: do not call fix_mac_speed if NULL
On some platforms, fix_mac_speed is used for
configuring some sysconf registers according
to the working speed.
This patch fixes the fix_mac_speed invocation
that cannot be done if it is a NULL pointer.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:08 -08:00
Giuseppe CAVALLARO ca5f12c1a8 stmmac: perform hw bus configuration
On some platforms it can be required a different
configuration of the bus. This can be done
by invoking the bus_setup. It is defined
for all the platforms that needs this kind of
configuration.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:07 -08:00
Giuseppe CAVALLARO ee7946a778 stmmac: rewiew platform data
This patch rewiews and reorganises all the data
come from the platform removing any dependency
from the stm code.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:07 -08:00
Giuseppe CAVALLARO 609634799e stmmac: convert unicast addr list to list_head
This patch converts unicast address list to standard list_head using
previously introduced struct netdev_hw_addr.

Note: this patch also removes a debug printk used for displaying the
mac addresses. Indeed, it's is possible to dump the registers with
ethtool.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:06 -08:00
Giuseppe CAVALLARO 109cdd6648 stmmac: use MII_BUS_ID_SIZE instead of BUS_ID_SIZE
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 17:06:05 -08:00
hartleys 596a530bb3 drivers/net/skfp/skfddi.c: use %pMF to show MAC address
Use the %pMF kernel extension to display the MAC address.

The address will still be displayed in the FDDI Canonical format.

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>
2010-01-07 16:58:09 -08:00
hartleys 69d279eaf8 drivers/net/defxx.c: use %pMF to show MAC address
Use the %pMF kernel extension to display the MAC address.

The address will still be displayed in the FDDI Canonical format.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 16:58:09 -08:00
hartleys 4754b3de93 drivers/net/wimax/i2400m/driver.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address.

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>
2010-01-07 01:14:01 -08:00
hartleys fcb635e8c6 drivers/net/qlge/qlge_main.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address.

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>
2010-01-07 01:14:01 -08:00
hartleys 1b8e664d34 drivers/net/atl1e/atl1e_main.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation.

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>
2010-01-07 01:14:00 -08:00
hartleys 595acf270e drivers/net/wimax/i2400m/fw.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address.

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>
2010-01-07 01:14:00 -08:00
hartleys 829911725f drivers/net/atl1c/atl1c_main.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation.

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>
2010-01-07 01:13:59 -08:00
hartleys bf54e73691 drivers/net/vxge/vxge-main.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address.

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>
2010-01-07 01:13:58 -08:00
hartleys ce7194d889 drivers/net/ixgbe/ixgbe_common.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation.

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>
2010-01-07 01:13:55 -08:00
Márton Németh d160439e77 8139too: make PCI device ids constant
The id_table field of the struct pci_driver is constant in <linux/pci.h>
so it is worth to make pci_device_id also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier I1, I2, x;
@@
	struct I1 {
	  ...
	  const struct I2 *x;
	  ...
	};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
	struct I1 y = {
	  .x = E,
	};
@c@
identifier r.I2;
identifier s.E;
@@
	const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+	const
	struct I2 E[] = ...;
// </smpl>

Signed-off-by: Márton Németh <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 00:31:51 -08:00
Joe Perches f6de7acc42 drivers/net/mac8390.c: Add mac8390_init function
Reduce indentation, make code a little neater.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-06 20:44:04 -08:00
Joe Perches 8e4d9696b4 drivers/net/mac8390.c: Checkpatch cleanups
Use #include <linux/ not #include <asm/
Add spaces after arguments
Comment neatening
Make a couple of arrays static const
Align function arguments
Wrap text at 80 columns where reasonable
Cuddle brace else

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-06 20:44:04 -08:00
Joe Perches 18c0019102 drivers/net/mac8390.c: Convert printk(KERN_<level> to pr_<level>(
Use printk_once
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Convert printks without KERN_<level> to pr_info and pr_cont

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-06 20:44:03 -08:00
Joe Perches 5c7fffd0e3 drivers/net/mac8390.c: Remove useless memcpy casting
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-06 20:44:02 -08:00
Joe Perches 35076402a9 drivers/net/mac8390.c: Indent case labels
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-06 20:44:02 -08:00
Giuseppe Cavallaro 698244ace8 phy: SMSC device Energy Detect power-down mode
SMSC Ethernet Transceivers (LAN88710, LAN8710, LAN8720, LAN8187,
LAN8700, LAN83C185) provide a mechanism to conserve power when
the device is not connected to an active link partner
(Energy Detect Mode).
So this patch enables the Energy Detect power-down mode
for these Transceivers.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-06 20:35:14 -08:00
Ron Mercer 6352671308 qlge: Add napi gro frags interface.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-06 20:30:35 -08:00
Ron Mercer 4f848c0a9c qlge: Add RX frame handlers for non-split frames.
New handlers are added here to handle:
1) Small frames (<256 bytes) in a single small buffer.  Allocate a new
skb and copy the frame.

2) Large frame (>256 bytes) in a page chunk. Allocate an skb, tack it on frags,
post to napi_gro_receive().

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-06 20:30:34 -08:00
Ron Mercer 572c526fb1 qlge: Turn on RX header split based on platform.
Using 4-byte aligned headers is problematic for some architectures.
Since qlge uses 4-byte aligned rx buffers we split headers for these
architectures into a separate buffer and then recopy to align on 2-byte boundary.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-06 20:30:33 -08:00
Mike McCormack c36531b9b2 sky2: Lock transmit queue while disabling device
netif_device_detach() does not take the tx_lock, so it's possible that
a call to sky2_xmit_frame is still in progress after
netif_device_detach() is complete.

Take netif_tx_lock() to make sure all transmits have stopped while
we're disabling the devices and that no other CPU is still
transmitting a frame after we've disabling the device.

Proposed fix for "sky2 panic under load" reported by Berck E. Nash.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-06 20:26:14 -08:00
Mike McCormack c32bbff81c sky2: Refactor sky2_get_regs into two functions
Separate code deciding which registers can be accessed out of
sky2_get_regs in preparation for adding more conditions into it.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-06 20:26:13 -08:00
Ken Kawasaki ceba0b29e0 axnet_cs: remove unnecessary spin_unlock_irqrestore
axnet_cs:
    remove unnecessary spin_unlock_irqrestore,spin_lock_irqsave.

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-03 21:52:44 -08:00
Julia Lawall 75ed0a8972 drivers/net/cxgb3: Use kzalloc for allocating only one thing
Use kzalloc rather than kcalloc(1,...)

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-03 21:22:28 -08:00
Andy Gospodarek 1f3c8804ac bonding: allow arp_ip_targets on separate vlans to use arp validation
This allows a bond device to specify an arp_ip_target as a host that is
not on the same vlan as the base bond device and still use arp
validation.  A configuration like this, now works:

BONDING_OPTS="mode=active-backup arp_interval=1000 arp_ip_target=10.0.100.1 arp_validate=3"

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
    link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
    link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
8: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
    link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::213:21ff:febe:33e9/64 scope link
       valid_lft forever preferred_lft forever
9: bond0.100@bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
    link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
    inet 10.0.100.2/24 brd 10.0.100.255 scope global bond0.100
    inet6 fe80::213:21ff:febe:33e9/64 scope link
       valid_lft forever preferred_lft forever

Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
ARP Polling Interval (ms): 1000
ARP IP target/s (n.n.n.n form): 10.0.100.1

Slave Interface: eth1
MII Status: up
Link Failure Count: 1
Permanent HW addr: 00:40:05:30:ff:30

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:13:21:be:33:e9

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-03 21:17:16 -08:00
David S. Miller 3a999e6eb5 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-12-30 13:51:29 -08:00
John W. Linville 891dc5e737 Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/libertas/scan.c
2009-12-30 15:25:08 -05:00
H Hartley Sweeten 6cd9b49d73 Subject: drivers/net/sh_eth.c: use %pM to shown MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29 20:10:35 -08:00
H Hartley Sweeten 30a6ae8d47 drivers/net/r8169.c: use %pM to shown MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29 20:10:01 -08:00
H Hartley Sweeten e583482091 drivers/net/octeon/octeon_mgmt.c: use %pM to shown MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29 20:09:07 -08:00
H Hartley Sweeten fa876b474a drivers/net/smc911x.c: use %pM to shown MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29 20:08:09 -08:00
H Hartley Sweeten b18fe4777f drivers/net/sunvnet.c: use %pM to shown MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29 20:07:27 -08:00
H Hartley Sweeten 3b8dff3622 drivers/net/usb/catc.c: use %pM to shown MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29 20:06:45 -08:00
H Hartley Sweeten 5491f3a562 drivers/net/xilinx_emaclite.c: use %pM to shown MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29 20:04:53 -08:00
H Hartley Sweeten aa7c68a5f7 drivers/net/via-velocity.c: use %pM to shown MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29 20:04:14 -08:00
H Hartley Sweeten d649a2844e drivers/net/usb/rtl8150.c: use %pM to shown MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29 20:03:28 -08:00
H Hartley Sweeten 753cdc3304 drivers/net/igbvf/netdev.c: use %pM to shown MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29 20:02:29 -08:00
H Hartley Sweeten 557b0bbd62 drivers/net/lib82596.c: use %pM to shown MAC address
Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation instead of
space-separated.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29 20:01:46 -08:00
John W. Linville 55afc80b2a Revert "b43: Enforce DMA descriptor memory constraints"
This reverts commit 9bd568a50c.

That commit is shown to cause allocation failures during initialization
on some machines.

http://bugzilla.kernel.org/show_bug.cgi?id=14844

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-29 14:07:42 -05:00