Skip to contentSkip to conversation

net driver updates for .27

PATCH In review Jeff Garzik 3 participants 7 messages Jun 12, 2008

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net driver updates for .27

WARNING: my incoming email has been inaccessible for the past ~18 hours, so if it appears I missed something recently, I probably did...
...(but have backed up on an equally inaccessible backup-MX machine)

Please pull from 'davem-next' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-next

to receive the following updates:

 drivers/net/Kconfig            |   14 +-
 drivers/net/Makefile           |    2 +
 drivers/net/a2065.c            |    4 -
 drivers/net/atarilance.c       |    2 +-
 drivers/net/declance.c         |    4 -
 drivers/net/e1000e/netdev.c    |    5 +
 drivers/net/hplance.c          |    4 +-
 drivers/net/igb/igb_main.c     |    7 +-
 drivers/net/ixgbe/ixgbe_main.c |    7 +-
 drivers/net/lib8390.c          |    4 +
 drivers/net/mac8390.c          |    8 +-
 drivers/net/macb.c             |    6 +-
 drivers/net/macsonic.c         |   19 +-
 drivers/net/sh_eth.c           | 1174 +++++++++++++++++
 drivers/net/sh_eth.h           |  464 +++++++
 drivers/net/smc911x.c          |  423 +++----
 drivers/net/smc911x.h          |  495 ++++---
 drivers/net/sunlance.c         |    4 -
 drivers/net/usb/Kconfig        |   10 +
 drivers/net/usb/Makefile       |    1 +
 drivers/net/usb/hso.c          | 2836 ++++++++++++++++++++++++++++++++++++++++
 include/linux/smc911x.h        |   12 +
 22 files changed, 5017 insertions(+), 488 deletions(-)
 create mode 100644 drivers/net/sh_eth.c
 create mode 100644 drivers/net/sh_eth.h
 create mode 100644 drivers/net/usb/hso.c
 create mode 100644 include/linux/smc911x.h

Adrian Bunk (5):
make drivers/net/atarilance.c:lance_addr_list[] static make hplance_{init,cleanup}_module() static drivers/net/mac8390.c: make functions static drivers/net/: remove write-only "last_dev" drivers/net/macsonic.c: make functions static

Greg Kroah-Hartman (1):
HSO: add option hso driver

Jeff Kirsher (3):
ixbge: allow vlan devices to use TSO and TCP CSUM offload
igb: allow vlan devices to use TSO and TCP CSUM offload
e1000e: allow VLAN devices to use TSO and TCP CSUM offload

Magnus Damm (5):
smc911x: remove unused 8-bit I/O operations
smc911x: fix 16-bit I/O operations
smc911x: pass along private data and use iomem
smc911x: introduce platform data flags
smc911x: SuperH architecture support

Nobuhiro Iwamatsu (1):
net: sh_eth: add support for Renesas SuperH Ethernet

Stephen Rothwell (1):
[netdrvr] Fix 8390 build breakage

Sven Schnelle (1):
macb: use random mac if stored address in EEPROM is invalid

drivers/net/Kconfig +13 -1
index c537f53..40eb24d 100644
@@ -524,6 +524,18 @@ config STNIC
 
 	  If unsure, say N.
 
+config SH_ETH
+	tristate "Renesas SuperH Ethernet support"
+	depends on SUPERH && \
+		(CPU_SUBTYPE_SH7710 || CPU_SUBTYPE_SH7712)
+	select CRC32
+	select MII
+	select MDIO_BITBANG
+	select PHYLIB
+	help
+	  Renesas SuperH Ethernet device driver.
+	  This driver support SH7710 and SH7712.
+
 config SUNLANCE
 	tristate "Sun LANCE support"
 	depends on SBUS
@@ -955,7 +967,7 @@ config SMC911X
 	tristate "SMSC LAN911[5678] support"
 	select CRC32
 	select MII
-	depends on ARCH_PXA || SH_MAGIC_PANEL_R2
+	depends on ARCH_PXA || SUPERH
 	help
 	  This is a driver for SMSC's LAN911x series of Ethernet chipsets
 	  including the new LAN9115, LAN9116, LAN9117, and LAN9118.
drivers/net/Makefile +2 -0
index dcbfe84..c96fe20 100644
@@ -80,6 +80,7 @@ obj-$(CONFIG_VIA_RHINE) += via-rhine.o
 obj-$(CONFIG_VIA_VELOCITY) += via-velocity.o
 obj-$(CONFIG_ADAPTEC_STARFIRE) += starfire.o
 obj-$(CONFIG_RIONET) += rionet.o
+obj-$(CONFIG_SH_ETH) += sh_eth.o
 
 #
 # end link order section
@@ -236,6 +237,7 @@ obj-$(CONFIG_USB_CATC)          += usb/
 obj-$(CONFIG_USB_KAWETH)        += usb/
 obj-$(CONFIG_USB_PEGASUS)       += usb/
 obj-$(CONFIG_USB_RTL8150)       += usb/
+obj-$(CONFIG_USB_HSO)		+= usb/
 obj-$(CONFIG_USB_USBNET)        += usb/
 obj-$(CONFIG_USB_ZD1201)        += usb/
 
drivers/net/a2065.c +0 -4
index 6c5719a..9c08374 100644
@@ -475,16 +475,12 @@ static irqreturn_t lance_interrupt (int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-struct net_device *last_dev;
-
 static int lance_open (struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_regs *ll = lp->ll;
 	int ret;
 
-	last_dev = dev;
-
 	/* Stop the Lance */
 	ll->rap = LE_CSR0;
 	ll->rdp = LE_C0_STOP;
drivers/net/atarilance.c +1 -1
index 4cceaac..0860cc2 100644
@@ -243,7 +243,7 @@ struct lance_private {
 
 /* Possible memory/IO addresses for probing */
 
-struct lance_addr {
+static struct lance_addr {
 	unsigned long	memaddr;
 	unsigned long	ioaddr;
 	int				slow_flag;
drivers/net/declance.c +0 -4
index 6b1e77c..3e35064 100644
@@ -773,8 +773,6 @@ static irqreturn_t lance_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-struct net_device *last_dev = 0;
-
 static int lance_open(struct net_device *dev)
 {
 	volatile u16 *ib = (volatile u16 *)dev->mem_start;
@@ -782,8 +780,6 @@ static int lance_open(struct net_device *dev)
 	volatile struct lance_regs *ll = lp->ll;
 	int status = 0;
 
-	last_dev = dev;
-
 	/* Stop the Lance */
 	writereg(&ll->rap, LE_CSR0);
 	writereg(&ll->rdp, LE_C0_STOP);
drivers/net/e1000e/netdev.c +5 -0
index cab1835..ccb8ca2 100644
@@ -4343,6 +4343,11 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
 	netdev->features |= NETIF_F_TSO;
 	netdev->features |= NETIF_F_TSO6;
 
+	netdev->vlan_features |= NETIF_F_TSO;
+	netdev->vlan_features |= NETIF_F_TSO6;
+	netdev->vlan_features |= NETIF_F_HW_CSUM;
+	netdev->vlan_features |= NETIF_F_SG;
+
 	if (pci_using_dac)
 		netdev->features |= NETIF_F_HIGHDMA;
 
drivers/net/hplance.c +2 -2
index be6e5bc..2e80263 100644
@@ -220,12 +220,12 @@ static int hplance_close(struct net_device *dev)
         return 0;
 }
 
-int __init hplance_init_module(void)
+static int __init hplance_init_module(void)
 {
 	return dio_register_driver(&hplance_driver);
 }
 
-void __exit hplance_cleanup_module(void)
+static void __exit hplance_cleanup_module(void)
 {
         dio_unregister_driver(&hplance_driver);
 }
drivers/net/igb/igb_main.c +6 -1
index ae398f0..7b6b780 100644
@@ -967,8 +967,13 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 			   NETIF_F_HW_VLAN_FILTER;
 
 	netdev->features |= NETIF_F_TSO;
-
 	netdev->features |= NETIF_F_TSO6;
+
+	netdev->vlan_features |= NETIF_F_TSO;
+	netdev->vlan_features |= NETIF_F_TSO6;
+	netdev->vlan_features |= NETIF_F_HW_CSUM;
+	netdev->vlan_features |= NETIF_F_SG;
+
 	if (pci_using_dac)
 		netdev->features |= NETIF_F_HIGHDMA;
 
drivers/net/ixgbe/ixgbe_main.c +6 -1
index 7b85922..0d37c90 100644
@@ -3518,8 +3518,13 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
 			   NETIF_F_HW_VLAN_FILTER;
 
 	netdev->features |= NETIF_F_TSO;
-
 	netdev->features |= NETIF_F_TSO6;
+
+	netdev->vlan_features |= NETIF_F_TSO;
+	netdev->vlan_features |= NETIF_F_TSO6;
+	netdev->vlan_features |= NETIF_F_HW_CSUM;
+	netdev->vlan_features |= NETIF_F_SG;
+
 	if (pci_using_dac)
 		netdev->features |= NETIF_F_HIGHDMA;
 
drivers/net/lib8390.c +4 -0
index ed49527..00d59ab 100644
@@ -553,6 +553,8 @@ static void __ei_poll(struct net_device *dev)
 static void ei_tx_err(struct net_device *dev)
 {
 	unsigned long e8390_base = dev->base_addr;
+	/* ei_local is used on some platforms via the EI_SHIFT macro */
+	struct ei_device *ei_local __maybe_unused = netdev_priv(dev);
 	unsigned char txsr = ei_inb_p(e8390_base+EN0_TSR);
 	unsigned char tx_was_aborted = txsr & (ENTSR_ABT+ENTSR_FU);
 
@@ -815,6 +817,8 @@ static void ei_rx_overrun(struct net_device *dev)
 {
 	unsigned long e8390_base = dev->base_addr;
 	unsigned char was_txing, must_resend = 0;
+	/* ei_local is used on some platforms via the EI_SHIFT macro */
+	struct ei_device *ei_local __maybe_unused = netdev_priv(dev);
 
 	/*
 	 * Record whether a Tx was in progress and then issue the
drivers/net/mac8390.c +3 -5
index 9e70074..98e3eb2 100644
@@ -117,8 +117,6 @@ enum mac8390_access {
 	ACCESS_16,
 };
 
-extern enum mac8390_type mac8390_ident(struct nubus_dev * dev);
-extern int mac8390_memsize(unsigned long membase);
 extern int mac8390_memtest(struct net_device * dev);
 static int mac8390_initdev(struct net_device * dev, struct nubus_dev * ndev,
 			   enum mac8390_type type);
@@ -163,7 +161,7 @@ static void slow_sane_block_output(struct net_device *dev, int count,
 static void word_memcpy_tocard(void *tp, const void *fp, int count);
 static void word_memcpy_fromcard(void *tp, const void *fp, int count);
 
-enum mac8390_type __init mac8390_ident(struct nubus_dev * dev)
+static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
 {
 	switch (dev->dr_sw) {
 		case NUBUS_DRSW_3COM:
@@ -234,7 +232,7 @@ enum mac8390_type __init mac8390_ident(struct nubus_dev * dev)
 	return MAC8390_NONE;
 }
 
-enum mac8390_access __init mac8390_testio(volatile unsigned long membase)
+static enum mac8390_access __init mac8390_testio(volatile unsigned long membase)
 {
 	unsigned long outdata = 0xA5A0B5B0;
 	unsigned long indata =  0x00000000;
@@ -252,7 +250,7 @@ enum mac8390_access __init mac8390_testio(volatile unsigned long membase)
 	return ACCESS_UNKNOWN;
 }
 
-int __init mac8390_memsize(unsigned long membase)
+static int __init mac8390_memsize(unsigned long membase)
 {
 	unsigned long flags;
 	int i, j;
drivers/net/macb.c +5 -1
index 92dccd4..e346302 100644
@@ -80,8 +80,12 @@ static void __init macb_get_hwaddr(struct macb *bp)
 	addr[4] = top & 0xff;
 	addr[5] = (top >> 8) & 0xff;
 
-	if (is_valid_ether_addr(addr))
+	if (is_valid_ether_addr(addr)) {
 		memcpy(bp->dev->dev_addr, addr, sizeof(addr));
+	} else {
+		dev_info(&bp->pdev->dev, "invalid hw address, using random\n");
+		random_ether_addr(bp->dev->dev_addr);
+	}
 }
 
 static int macb_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
drivers/net/macsonic.c +8 -11
index b267161..e64c208 100644
@@ -83,9 +83,6 @@ static unsigned int sonic_debug = 1;
 
 static int sonic_version_printed;
 
-extern int mac_onboard_sonic_probe(struct net_device* dev);
-extern int mac_nubus_sonic_probe(struct net_device* dev);
-
 /* For onboard SONIC */
 #define ONBOARD_SONIC_REGISTERS	0x50F0A000
 #define ONBOARD_SONIC_PROM_BASE	0x50f08000
@@ -170,7 +167,7 @@ static int macsonic_close(struct net_device* dev)
 	return err;
 }
 
-int __init macsonic_init(struct net_device* dev)
+static int __init macsonic_init(struct net_device *dev)
 {
 	struct sonic_local* lp = netdev_priv(dev);
 
@@ -218,7 +215,7 @@ int __init macsonic_init(struct net_device* dev)
 	return 0;
 }
 
-int __init mac_onboard_sonic_ethernet_addr(struct net_device* dev)
+static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev)
 {
 	struct sonic_local *lp = netdev_priv(dev);
 	const int prom_addr = ONBOARD_SONIC_PROM_BASE;
@@ -284,7 +281,7 @@ int __init mac_onboard_sonic_ethernet_addr(struct net_device* dev)
 	} else return 0;
 }
 
-int __init mac_onboard_sonic_probe(struct net_device* dev)
+static int __init mac_onboard_sonic_probe(struct net_device *dev)
 {
 	/* Bwahahaha */
 	static int once_is_more_than_enough;
@@ -405,9 +402,9 @@ int __init mac_onboard_sonic_probe(struct net_device* dev)
 	return macsonic_init(dev);
 }
 
-int __init mac_nubus_sonic_ethernet_addr(struct net_device* dev,
-					 unsigned long prom_addr,
-					 int id)
+static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev,
+						unsigned long prom_addr,
+						int id)
 {
 	int i;
 	for(i = 0; i < 6; i++)
@@ -420,7 +417,7 @@ int __init mac_nubus_sonic_ethernet_addr(struct net_device* dev,
 	return 0;
 }
 
-int __init macsonic_ident(struct nubus_dev* ndev)
+static int __init macsonic_ident(struct nubus_dev *ndev)
 {
 	if (ndev->dr_hw == NUBUS_DRHW_ASANTE_LC &&
 	    ndev->dr_sw == NUBUS_DRSW_SONIC_LC)
@@ -445,7 +442,7 @@ int __init macsonic_ident(struct nubus_dev* ndev)
 	return -1;
 }
 
-int __init mac_nubus_sonic_probe(struct net_device* dev)
+static int __init mac_nubus_sonic_probe(struct net_device *dev)
 {
 	static int slots;
 	struct nubus_dev* ndev = NULL;
drivers/net/sh_eth.c new file +1174 -0

1,174 lines not on this page · raw message

drivers/net/sh_eth.h new file +464 -0

464 lines not on this page · raw message

drivers/net/smc911x.c +186 -237

1,107 lines not on this page · raw message

drivers/net/smc911x.h +279 -216

495 lines not on this page · raw message

drivers/net/sunlance.c +0 -4
index 26ade68..4e994f8 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/Kconfig +10 -0
index 0604f3f..68e198b 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/Makefile +1 -0
index 595a539..24800c1 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/hso.c new file +2836 -0

2,836 lines not on this page · raw message

include/linux/smc911x.h new file +12 -0
new file mode 100644
index 0000000..b58f54c

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#1 lore raw

Hi Jeff,

Quoted 3 lines · On Wed, 11 Jun 2008 22:30:46 -0400 Jeff Garzik <[email protected]> wrote:

Stephen Rothwell (1):
[netdrvr] Fix 8390 build breakage

That patch is actually from Tony Breeds ..

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
maintainer
#2 lore raw

From: Stephen Rothwell <[email protected]>
Date: Thu, 12 Jun 2008 13:38:42 +1000

Quoted 8 lines

Hi Jeff,

Quoted 3 lines · On Wed, 11 Jun 2008 22:30:46 -0400 Jeff Garzik <[email protected]> wrote:

Stephen Rothwell (1):
[netdrvr] Fix 8390 build breakage

That patch is actually from Tony Breeds ..

Jeff, there is still time to fix this. If you want, just fix up that patch in your tree to get the attribution and author field correct, and send me a new pull request.

Thanks.

#3 lore raw
Quoted 5 lines · David Miller

From: Stephen Rothwell <[email protected]>
Date: Thu, 12 Jun 2008 13:38:42 +1000

Quoted 2 lines

Hi Jeff,

Quoted 8 lines
Quoted 4 lines · On Wed, 11 Jun 2008 22:30:46 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 2 lines

Stephen Rothwell (1):
[netdrvr] Fix 8390 build breakage

That patch is actually from Tony Breeds ..

Jeff, there is still time to fix this. If you want, just fix up that patch in your tree to get the attribution and author field correct, and send me a new pull request.

Did you actually read the commit description? It's quite clear who originated the commit:

commit 0c1aa20fb87b796d904f4d89ad12e5a0c483127b

Author: Stephen Rothwell <[email protected]>
Date:   Thu May 29 22:39:28 2008 +1000

[netdrvr] Fix 8390 build breakage

From: [email protected] (Tony Breeds)

...

It's pretty hard to miss, and it accurately captures the entire audit trail:

1) who sent the patch?
2) who wrote the patch?
3) who committed the patch?

So, you want to eliminate part of that audit trail (#1), making the commit audit trail more hidden and opaque?

I respectfully disagree. We should capture the _entire_ audit trail, not hide bits of it.

Full credit is given, as you can see from looking at the commit.

Jeff

maintainer
#4 lore raw

From: Jeff Garzik <[email protected]>
Date: Thu, 12 Jun 2008 18:08:23 -0400

Quoted 11 lines

Did you actually read the commit description? It's quite clear who originated the commit:

commit 0c1aa20fb87b796d904f4d89ad12e5a0c483127b

Author: Stephen Rothwell <[email protected]>
Date:   Thu May 29 22:39:28 2008 +1000

[netdrvr] Fix 8390 build breakage

From: [email protected] (Tony Breeds)

To each their own, I suppose, but...

If you look at what happens when Andrew dumps a thousand patches to Linus this isn't how it is handled.

"Author" is always who wrote the patch, and I think it's important to be consistent in that area.

Stephen Rothwell isn't the "Author" of this patch any more than you are Jeff. By your own logic, you are saying that you could have just as equally put yourself in the Author field since hey, you're effectively submitting the patch to me via your tree right? :-)

#5 lore raw
Quoted 10 lines · David Miller

From: Jeff Garzik <[email protected]>
Date: Thu, 12 Jun 2008 18:08:23 -0400

Quoted 7 lines

Did you actually read the commit description? It's quite clear who originated the commit:

commit 0c1aa20fb87b796d904f4d89ad12e5a0c483127b

Author: Stephen Rothwell <[email protected]>
Date:   Thu May 29 22:39:28 2008 +1000
Quoted 8 lines
Quoted 3 lines

[netdrvr] Fix 8390 build breakage

From: [email protected] (Tony Breeds)

To each their own, I suppose, but...

If you look at what happens when Andrew dumps a thousand patches to Linus this isn't how it is handled.

Sure, Andrew has an alternate method of including himself the audit trail: adding a signed-off-by line.

sfr didn't do that, and I certainly am not going to add one on his behalf (and given email mess, the turnaround would have taken a long time if I had asked via email).

Quoted 2 lines

"Author" is always who wrote the patch, and I think it's important to be consistent in that area.

"always"? There are /plenty/ of occasions, usually at big corps, where the Author is not the person who wrote the patch, but rather the person who sent the patch.

And you'll note that all Linus's tools capture that -- author is patch sender -- albeit with optional From parsing from patch commit description.

Quoted 4 lines

Stephen Rothwell isn't the "Author" of this patch any more than you are Jeff. By your own logic, you are saying that you could have just as equally put yourself in the Author field since hey, you're effectively submitting the patch to me via your tree right? :-)

My own logic is merely that we should capture the entire audit trail.

You are welcome to pull netdev-2.6.git#davem-silly if you don't think the existing pull is sufficient, though.

Jeff

maintainer
#6 lore raw

From: Jeff Garzik <[email protected]>
Date: Thu, 12 Jun 2008 18:43:33 -0400

Quoted 10 lines
Quoted 2 lines · David Miller

"Author" is always who wrote the patch, and I think it's important to be consistent in that area.

"always"? There are /plenty/ of occasions, usually at big corps, where the Author is not the person who wrote the patch, but rather the person who sent the patch.

And you'll note that all Linus's tools capture that -- author is patch sender -- albeit with optional From parsing from patch commit description.

I guess that's a compelling enough argument. I'll pull your original tree, thanks Jeff.