Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-11 Thread Chris Wright
* Daniele Venzano ([EMAIL PROTECTED]) wrote:
> 
> I have been acting maintainer for more than a year now, and I'm 
> completely fine with the patch.

Thanks.
-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-11 Thread Jeff Garzik
On Fri, Mar 11, 2005 at 08:29:50PM +0100, Daniele Venzano wrote:
> I have been acting maintainer for more than a year now, and I'm 
> completely fine with the patch.
> 
> A lot of time ago (2.6.6) I proposed a patch to update MAINTAINERS, but 
> Jeff said he wanted to wait some time. I don't know if such change is 
> now possible/wanted.
> AFAIK Ollie's email address bounces.

Feel free to send a patch to MAINTAINERS

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-11 Thread Daniele Venzano
On 10/mar/05, at 22:39, Chris Wright wrote:
* Jeff Garzik ([EMAIL PROTECTED]) wrote:
Chris Wright wrote:
* Jeff Garzik ([EMAIL PROTECTED]) wrote:

This will update the following files:
drivers/net/sis900.c|   41 
+
drivers/net/via-rhine.c |3 +++

The via-rhine fix is already in the stable queue.  But the sis900 
oops
fix does not apply to the stable tree.  It relies on a few 
intermediate
patches.  Appears to still be an issue for the older version which 
is in
2.6.11.  Here's a stab at a backport.  Would you like to 
review/validate
or drop this one?
The backport looks correct to me, though it would be nice to get a
via-rhine owner to ACK the patch before it goes in...
OK, thanks.  ITYM sis900 maintainer, is that still Ollie Lho as listed 
in
MAINTAINERS (that's looking old)?
I have been acting maintainer for more than a year now, and I'm 
completely fine with the patch.

A lot of time ago (2.6.6) I proposed a patch to update MAINTAINERS, but 
Jeff said he wanted to wait some time. I don't know if such change is 
now possible/wanted.
AFAIK Ollie's email address bounces.

--
Daniele Venzano
http://www.brownhat.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-11 Thread Daniele Venzano
On 10/mar/05, at 22:39, Chris Wright wrote:
* Jeff Garzik ([EMAIL PROTECTED]) wrote:
Chris Wright wrote:
* Jeff Garzik ([EMAIL PROTECTED]) wrote:

This will update the following files:
drivers/net/sis900.c|   41 
+
drivers/net/via-rhine.c |3 +++

The via-rhine fix is already in the stable queue.  But the sis900 
oops
fix does not apply to the stable tree.  It relies on a few 
intermediate
patches.  Appears to still be an issue for the older version which 
is in
2.6.11.  Here's a stab at a backport.  Would you like to 
review/validate
or drop this one?
The backport looks correct to me, though it would be nice to get a
via-rhine owner to ACK the patch before it goes in...
OK, thanks.  ITYM sis900 maintainer, is that still Ollie Lho as listed 
in
MAINTAINERS (that's looking old)?
I have been acting maintainer for more than a year now, and I'm 
completely fine with the patch.

A lot of time ago (2.6.6) I proposed a patch to update MAINTAINERS, but 
Jeff said he wanted to wait some time. I don't know if such change is 
now possible/wanted.
AFAIK Ollie's email address bounces.

--
Daniele Venzano
http://www.brownhat.org
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-11 Thread Jeff Garzik
On Fri, Mar 11, 2005 at 08:29:50PM +0100, Daniele Venzano wrote:
 I have been acting maintainer for more than a year now, and I'm 
 completely fine with the patch.
 
 A lot of time ago (2.6.6) I proposed a patch to update MAINTAINERS, but 
 Jeff said he wanted to wait some time. I don't know if such change is 
 now possible/wanted.
 AFAIK Ollie's email address bounces.

Feel free to send a patch to MAINTAINERS

Jeff



-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-11 Thread Chris Wright
* Daniele Venzano ([EMAIL PROTECTED]) wrote:
 
 I have been acting maintainer for more than a year now, and I'm 
 completely fine with the patch.

Thanks.
-chris
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-10 Thread Chris Wright
* Jeff Garzik ([EMAIL PROTECTED]) wrote:
> Chris Wright wrote:
> >* Jeff Garzik ([EMAIL PROTECTED]) wrote:
> >
> >
> >>This will update the following files:
> >>
> >>drivers/net/sis900.c|   41 +
> >>drivers/net/via-rhine.c |3 +++
> >
> >
> >The via-rhine fix is already in the stable queue.  But the sis900 oops
> >fix does not apply to the stable tree.  It relies on a few intermediate
> >patches.  Appears to still be an issue for the older version which is in
> >2.6.11.  Here's a stab at a backport.  Would you like to review/validate
> >or drop this one?
> 
> The backport looks correct to me, though it would be nice to get a 
> via-rhine owner to ACK the patch before it goes in...

OK, thanks.  ITYM sis900 maintainer, is that still Ollie Lho as listed in
MAINTAINERS (that's looking old)?

thanks,
-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [BK PATCHES] 2.6.x net driver oops fixes

2005-03-10 Thread Greg KH
On Thu, Mar 10, 2005 at 12:31:12PM -0800, Greg KH wrote:
> On Thu, Mar 10, 2005 at 12:25:48PM -0800, Chris Wright wrote:
> > * Jeff Garzik ([EMAIL PROTECTED]) wrote:
> > 
> > > This will update the following files:
> > > 
> > >  drivers/net/sis900.c|   41 +
> > >  drivers/net/via-rhine.c |3 +++
> > 
> > The via-rhine fix is already in the stable queue.  But the sis900 oops
> > fix does not apply to the stable tree.  It relies on a few intermediate
> > patches.  Appears to still be an issue for the older version which is in
> > 2.6.11.  Here's a stab at a backport.  Would you like to review/validate
> > or drop this one?
> 
> The pci_name() portion of this patch is not necessary for the -stable
> tree.  Care to remove it?

Oh nevermind, I was completly wrong, it's fine.

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [BK PATCHES] 2.6.x net driver oops fixes

2005-03-10 Thread Greg KH
On Thu, Mar 10, 2005 at 12:25:48PM -0800, Chris Wright wrote:
> * Jeff Garzik ([EMAIL PROTECTED]) wrote:
> 
> > This will update the following files:
> > 
> >  drivers/net/sis900.c|   41 +
> >  drivers/net/via-rhine.c |3 +++
> 
> The via-rhine fix is already in the stable queue.  But the sis900 oops
> fix does not apply to the stable tree.  It relies on a few intermediate
> patches.  Appears to still be an issue for the older version which is in
> 2.6.11.  Here's a stab at a backport.  Would you like to review/validate
> or drop this one?

The pci_name() portion of this patch is not necessary for the -stable
tree.  Care to remove it?

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-10 Thread Jeff Garzik
Chris Wright wrote:
* Jeff Garzik ([EMAIL PROTECTED]) wrote:

This will update the following files:
drivers/net/sis900.c|   41 +
drivers/net/via-rhine.c |3 +++

The via-rhine fix is already in the stable queue.  But the sis900 oops
fix does not apply to the stable tree.  It relies on a few intermediate
patches.  Appears to still be an issue for the older version which is in
2.6.11.  Here's a stab at a backport.  Would you like to review/validate
or drop this one?
The backport looks correct to me, though it would be nice to get a 
via-rhine owner to ACK the patch before it goes in...

Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-10 Thread Chris Wright
* Jeff Garzik ([EMAIL PROTECTED]) wrote:

> This will update the following files:
> 
>  drivers/net/sis900.c|   41 +
>  drivers/net/via-rhine.c |3 +++

The via-rhine fix is already in the stable queue.  But the sis900 oops
fix does not apply to the stable tree.  It relies on a few intermediate
patches.  Appears to still be an issue for the older version which is in
2.6.11.  Here's a stab at a backport.  Would you like to review/validate
or drop this one?

thanks,
-chris

= drivers/net/sis900.c 1.62 vs edited =
--- 1.62/drivers/net/sis900.c   2005-01-10 08:52:27 -08:00
+++ edited/drivers/net/sis900.c 2005-03-10 12:23:49 -08:00
@@ -236,7 +236,7 @@ static int __devinit sis900_get_mac_addr
signature = (u16) read_eeprom(ioaddr, EEPROMSignature);
if (signature == 0x || signature == 0x) {
printk (KERN_INFO "%s: Error EERPOM read %x\n", 
-   net_dev->name, signature);
+   pci_name(pci_dev), signature);
return 0;
}
 
@@ -268,7 +268,7 @@ static int __devinit sis630e_get_mac_add
if (!isa_bridge)
isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0018, 
isa_bridge);
if (!isa_bridge) {
-   printk("%s: Can not find ISA bridge\n", net_dev->name);
+   printk("%s: Can not find ISA bridge\n", pci_name(pci_dev));
return 0;
}
pci_read_config_byte(isa_bridge, 0x48, );
@@ -456,10 +456,6 @@ static int __devinit sis900_probe(struct
net_dev->tx_timeout = sis900_tx_timeout;
net_dev->watchdog_timeo = TX_TIMEOUT;
net_dev->ethtool_ops = _ethtool_ops;
-   
-   ret = register_netdev(net_dev);
-   if (ret)
-   goto err_unmap_rx;

/* Get Mac address according to the chip revision */
pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, );
@@ -476,7 +472,7 @@ static int __devinit sis900_probe(struct
 
if (ret == 0) {
ret = -ENODEV;
-   goto err_out_unregister;
+   goto err_unmap_rx;
}

/* 630ET : set the mii access mode as software-mode */
@@ -486,7 +482,7 @@ static int __devinit sis900_probe(struct
/* probe for mii transceiver */
if (sis900_mii_probe(net_dev) == 0) {
ret = -ENODEV;
-   goto err_out_unregister;
+   goto err_unmap_rx;
}
 
/* save our host bridge revision */
@@ -496,6 +492,10 @@ static int __devinit sis900_probe(struct
pci_dev_put(dev);
}
 
+   ret = register_netdev(net_dev);
+   if (ret)
+   goto err_unmap_rx;
+
/* print some information about our NIC */
printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ", net_dev->name,
   card_name, ioaddr, net_dev->irq);
@@ -505,8 +505,6 @@ static int __devinit sis900_probe(struct
 
return 0;
 
- err_out_unregister:
-   unregister_netdev(net_dev);
  err_unmap_rx:
pci_free_consistent(pci_dev, RX_TOTAL_SIZE, sis_priv->rx_ring,
sis_priv->rx_ring_dma);
@@ -533,6 +531,7 @@ static int __devinit sis900_probe(struct
 static int __init sis900_mii_probe(struct net_device * net_dev)
 {
struct sis900_private * sis_priv = net_dev->priv;
+   const char *dev_name = pci_name(sis_priv->pci_dev);
u16 poll_bit = MII_STAT_LINK, status = 0;
unsigned long timeout = jiffies + 5 * HZ;
int phy_addr;
@@ -582,21 +581,20 @@ static int __init sis900_mii_probe(struc
mii_phy->phy_types =
(mii_status & (MII_STAT_CAN_TX_FDX 
| MII_STAT_CAN_TX)) ? LAN : HOME;
printk(KERN_INFO "%s: %s transceiver found at 
address %d.\n",
-  net_dev->name, mii_chip_table[i].name,
+  dev_name, mii_chip_table[i].name,
   phy_addr);
break;
}

if( !mii_chip_table[i].phy_id1 ) {
printk(KERN_INFO "%s: Unknown PHY transceiver found at 
address %d.\n",
-  net_dev->name, phy_addr);
+  dev_name, phy_addr);
mii_phy->phy_types = UNKNOWN;
}
}

if (sis_priv->mii == NULL) {
-   printk(KERN_INFO "%s: No MII transceivers found!\n",
-   net_dev->name);
+   printk(KERN_INFO "%s: No MII transceivers found!\n", dev_name);
return 0;
}
 
@@ -621,7 +619,7 @@ static int __init sis900_mii_probe(struc
poll_bit ^= (mdio_read(net_dev, sis_priv->cur_phy, 
MII_STATUS) & poll_bit);
if 

Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-10 Thread Chris Wright
* Jeff Garzik ([EMAIL PROTECTED]) wrote:

 This will update the following files:
 
  drivers/net/sis900.c|   41 +
  drivers/net/via-rhine.c |3 +++

The via-rhine fix is already in the stable queue.  But the sis900 oops
fix does not apply to the stable tree.  It relies on a few intermediate
patches.  Appears to still be an issue for the older version which is in
2.6.11.  Here's a stab at a backport.  Would you like to review/validate
or drop this one?

thanks,
-chris

= drivers/net/sis900.c 1.62 vs edited =
--- 1.62/drivers/net/sis900.c   2005-01-10 08:52:27 -08:00
+++ edited/drivers/net/sis900.c 2005-03-10 12:23:49 -08:00
@@ -236,7 +236,7 @@ static int __devinit sis900_get_mac_addr
signature = (u16) read_eeprom(ioaddr, EEPROMSignature);
if (signature == 0x || signature == 0x) {
printk (KERN_INFO %s: Error EERPOM read %x\n, 
-   net_dev-name, signature);
+   pci_name(pci_dev), signature);
return 0;
}
 
@@ -268,7 +268,7 @@ static int __devinit sis630e_get_mac_add
if (!isa_bridge)
isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0018, 
isa_bridge);
if (!isa_bridge) {
-   printk(%s: Can not find ISA bridge\n, net_dev-name);
+   printk(%s: Can not find ISA bridge\n, pci_name(pci_dev));
return 0;
}
pci_read_config_byte(isa_bridge, 0x48, reg);
@@ -456,10 +456,6 @@ static int __devinit sis900_probe(struct
net_dev-tx_timeout = sis900_tx_timeout;
net_dev-watchdog_timeo = TX_TIMEOUT;
net_dev-ethtool_ops = sis900_ethtool_ops;
-   
-   ret = register_netdev(net_dev);
-   if (ret)
-   goto err_unmap_rx;

/* Get Mac address according to the chip revision */
pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, revision);
@@ -476,7 +472,7 @@ static int __devinit sis900_probe(struct
 
if (ret == 0) {
ret = -ENODEV;
-   goto err_out_unregister;
+   goto err_unmap_rx;
}

/* 630ET : set the mii access mode as software-mode */
@@ -486,7 +482,7 @@ static int __devinit sis900_probe(struct
/* probe for mii transceiver */
if (sis900_mii_probe(net_dev) == 0) {
ret = -ENODEV;
-   goto err_out_unregister;
+   goto err_unmap_rx;
}
 
/* save our host bridge revision */
@@ -496,6 +492,10 @@ static int __devinit sis900_probe(struct
pci_dev_put(dev);
}
 
+   ret = register_netdev(net_dev);
+   if (ret)
+   goto err_unmap_rx;
+
/* print some information about our NIC */
printk(KERN_INFO %s: %s at %#lx, IRQ %d, , net_dev-name,
   card_name, ioaddr, net_dev-irq);
@@ -505,8 +505,6 @@ static int __devinit sis900_probe(struct
 
return 0;
 
- err_out_unregister:
-   unregister_netdev(net_dev);
  err_unmap_rx:
pci_free_consistent(pci_dev, RX_TOTAL_SIZE, sis_priv-rx_ring,
sis_priv-rx_ring_dma);
@@ -533,6 +531,7 @@ static int __devinit sis900_probe(struct
 static int __init sis900_mii_probe(struct net_device * net_dev)
 {
struct sis900_private * sis_priv = net_dev-priv;
+   const char *dev_name = pci_name(sis_priv-pci_dev);
u16 poll_bit = MII_STAT_LINK, status = 0;
unsigned long timeout = jiffies + 5 * HZ;
int phy_addr;
@@ -582,21 +581,20 @@ static int __init sis900_mii_probe(struc
mii_phy-phy_types =
(mii_status  (MII_STAT_CAN_TX_FDX 
| MII_STAT_CAN_TX)) ? LAN : HOME;
printk(KERN_INFO %s: %s transceiver found at 
address %d.\n,
-  net_dev-name, mii_chip_table[i].name,
+  dev_name, mii_chip_table[i].name,
   phy_addr);
break;
}

if( !mii_chip_table[i].phy_id1 ) {
printk(KERN_INFO %s: Unknown PHY transceiver found at 
address %d.\n,
-  net_dev-name, phy_addr);
+  dev_name, phy_addr);
mii_phy-phy_types = UNKNOWN;
}
}

if (sis_priv-mii == NULL) {
-   printk(KERN_INFO %s: No MII transceivers found!\n,
-   net_dev-name);
+   printk(KERN_INFO %s: No MII transceivers found!\n, dev_name);
return 0;
}
 
@@ -621,7 +619,7 @@ static int __init sis900_mii_probe(struc
poll_bit ^= (mdio_read(net_dev, sis_priv-cur_phy, 
MII_STATUS)  poll_bit);
if (time_after_eq(jiffies, timeout)) {
  

Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-10 Thread Jeff Garzik
Chris Wright wrote:
* Jeff Garzik ([EMAIL PROTECTED]) wrote:

This will update the following files:
drivers/net/sis900.c|   41 +
drivers/net/via-rhine.c |3 +++

The via-rhine fix is already in the stable queue.  But the sis900 oops
fix does not apply to the stable tree.  It relies on a few intermediate
patches.  Appears to still be an issue for the older version which is in
2.6.11.  Here's a stab at a backport.  Would you like to review/validate
or drop this one?
The backport looks correct to me, though it would be nice to get a 
via-rhine owner to ACK the patch before it goes in...

Jeff
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [BK PATCHES] 2.6.x net driver oops fixes

2005-03-10 Thread Greg KH
On Thu, Mar 10, 2005 at 12:25:48PM -0800, Chris Wright wrote:
 * Jeff Garzik ([EMAIL PROTECTED]) wrote:
 
  This will update the following files:
  
   drivers/net/sis900.c|   41 +
   drivers/net/via-rhine.c |3 +++
 
 The via-rhine fix is already in the stable queue.  But the sis900 oops
 fix does not apply to the stable tree.  It relies on a few intermediate
 patches.  Appears to still be an issue for the older version which is in
 2.6.11.  Here's a stab at a backport.  Would you like to review/validate
 or drop this one?

The pci_name() portion of this patch is not necessary for the -stable
tree.  Care to remove it?

thanks,

greg k-h
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [stable] [BK PATCHES] 2.6.x net driver oops fixes

2005-03-10 Thread Chris Wright
* Jeff Garzik ([EMAIL PROTECTED]) wrote:
 Chris Wright wrote:
 * Jeff Garzik ([EMAIL PROTECTED]) wrote:
 
 
 This will update the following files:
 
 drivers/net/sis900.c|   41 +
 drivers/net/via-rhine.c |3 +++
 
 
 The via-rhine fix is already in the stable queue.  But the sis900 oops
 fix does not apply to the stable tree.  It relies on a few intermediate
 patches.  Appears to still be an issue for the older version which is in
 2.6.11.  Here's a stab at a backport.  Would you like to review/validate
 or drop this one?
 
 The backport looks correct to me, though it would be nice to get a 
 via-rhine owner to ACK the patch before it goes in...

OK, thanks.  ITYM sis900 maintainer, is that still Ollie Lho as listed in
MAINTAINERS (that's looking old)?

thanks,
-chris
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[BK PATCHES] 2.6.x net driver oops fixes

2005-03-09 Thread Jeff Garzik
 Please do a

bk pull bk://gkernel.bkbits.net/net-drivers-2.6

This will update the following files:

 drivers/net/sis900.c|   41 +
 drivers/net/via-rhine.c |3 +++
 2 files changed, 24 insertions(+), 20 deletions(-)

through these ChangeSets:

Herbert Xu:
  o sis900 kernel oops fix

Olof Johansson:
  o [VIA RHINE] older chips oops on shutdown

diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c
--- a/drivers/net/sis900.c  2005-03-09 15:16:53 -05:00
+++ b/drivers/net/sis900.c  2005-03-09 15:16:53 -05:00
@@ -245,7 +245,7 @@
signature = (u16) read_eeprom(ioaddr, EEPROMSignature);
if (signature == 0x || signature == 0x) {
printk (KERN_WARNING "%s: Error EERPOM read %x\n", 
-   net_dev->name, signature);
+   pci_name(pci_dev), signature);
return 0;
}
 
@@ -277,7 +277,8 @@
if (!isa_bridge)
isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0018, 
isa_bridge);
if (!isa_bridge) {
-   printk(KERN_WARNING "%s: Can not find ISA bridge\n", 
net_dev->name);
+   printk(KERN_WARNING "%s: Can not find ISA bridge\n",
+  pci_name(pci_dev));
return 0;
}
pci_read_config_byte(isa_bridge, 0x48, );
@@ -396,6 +397,7 @@
long ioaddr;
int i, ret;
char *card_name = card_names[pci_id->driver_data];
+   const char *dev_name = pci_name(pci_dev);
 
 /* when built into the kernel, we only print version if device is found */
 #ifndef MODULE
@@ -473,17 +475,13 @@
sis_priv->msg_enable = sis900_debug;
else
sis_priv->msg_enable = SIS900_DEF_MSG;
-
-   ret = register_netdev(net_dev);
-   if (ret)
-   goto err_unmap_rx;

/* Get Mac address according to the chip revision */
pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, 
&(sis_priv->chipset_rev));
if(netif_msg_probe(sis_priv))
printk(KERN_DEBUG "%s: detected revision %2.2x, "
"trying to get MAC address...\n",
-   net_dev->name, sis_priv->chipset_rev);
+   dev_name, sis_priv->chipset_rev);

ret = 0;
if (sis_priv->chipset_rev == SIS630E_900_REV)
@@ -496,9 +494,9 @@
ret = sis900_get_mac_addr(pci_dev, net_dev);
 
if (ret == 0) {
-   printk(KERN_WARNING "%s: Cannot read MAC address.\n", 
net_dev->name);
+   printk(KERN_WARNING "%s: Cannot read MAC address.\n", dev_name);
ret = -ENODEV;
-   goto err_out_unregister;
+   goto err_unmap_rx;
}

/* 630ET : set the mii access mode as software-mode */
@@ -507,9 +505,10 @@
 
/* probe for mii transceiver */
if (sis900_mii_probe(net_dev) == 0) {
-   printk(KERN_WARNING "%s: Error probing MII device.\n", 
net_dev->name);
+   printk(KERN_WARNING "%s: Error probing MII device.\n",
+  dev_name);
ret = -ENODEV;
-   goto err_out_unregister;
+   goto err_unmap_rx;
}
 
/* save our host bridge revision */
@@ -519,6 +518,10 @@
pci_dev_put(dev);
}
 
+   ret = register_netdev(net_dev);
+   if (ret)
+   goto err_unmap_rx;
+
/* print some information about our NIC */
printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ", net_dev->name,
   card_name, ioaddr, net_dev->irq);
@@ -528,8 +531,6 @@
 
return 0;
 
- err_out_unregister:
-   unregister_netdev(net_dev);
  err_unmap_rx:
pci_free_consistent(pci_dev, RX_TOTAL_SIZE, sis_priv->rx_ring,
sis_priv->rx_ring_dma);
@@ -556,6 +557,7 @@
 static int __init sis900_mii_probe(struct net_device * net_dev)
 {
struct sis900_private * sis_priv = net_dev->priv;
+   const char *dev_name = pci_name(sis_priv->pci_dev);
u16 poll_bit = MII_STAT_LINK, status = 0;
unsigned long timeout = jiffies + 5 * HZ;
int phy_addr;
@@ -576,7 +578,7 @@
if (netif_msg_probe(sis_priv))
printk(KERN_DEBUG "%s: MII at address %d"
" not accessible\n",
-   net_dev->name, phy_addr);
+   dev_name, phy_addr);
continue;
}

@@ -609,7 +611,7 @@
(mii_status & (MII_STAT_CAN_TX_FDX 
| MII_STAT_CAN_TX)) ? LAN : HOME;
printk(KERN_INFO "%s: %s transceiver found "
"at address %d.\n",
-  

[BK PATCHES] 2.6.x net driver oops fixes

2005-03-09 Thread Jeff Garzik
 Please do a

bk pull bk://gkernel.bkbits.net/net-drivers-2.6

This will update the following files:

 drivers/net/sis900.c|   41 +
 drivers/net/via-rhine.c |3 +++
 2 files changed, 24 insertions(+), 20 deletions(-)

through these ChangeSets:

Herbert Xu:
  o sis900 kernel oops fix

Olof Johansson:
  o [VIA RHINE] older chips oops on shutdown

diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c
--- a/drivers/net/sis900.c  2005-03-09 15:16:53 -05:00
+++ b/drivers/net/sis900.c  2005-03-09 15:16:53 -05:00
@@ -245,7 +245,7 @@
signature = (u16) read_eeprom(ioaddr, EEPROMSignature);
if (signature == 0x || signature == 0x) {
printk (KERN_WARNING %s: Error EERPOM read %x\n, 
-   net_dev-name, signature);
+   pci_name(pci_dev), signature);
return 0;
}
 
@@ -277,7 +277,8 @@
if (!isa_bridge)
isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0018, 
isa_bridge);
if (!isa_bridge) {
-   printk(KERN_WARNING %s: Can not find ISA bridge\n, 
net_dev-name);
+   printk(KERN_WARNING %s: Can not find ISA bridge\n,
+  pci_name(pci_dev));
return 0;
}
pci_read_config_byte(isa_bridge, 0x48, reg);
@@ -396,6 +397,7 @@
long ioaddr;
int i, ret;
char *card_name = card_names[pci_id-driver_data];
+   const char *dev_name = pci_name(pci_dev);
 
 /* when built into the kernel, we only print version if device is found */
 #ifndef MODULE
@@ -473,17 +475,13 @@
sis_priv-msg_enable = sis900_debug;
else
sis_priv-msg_enable = SIS900_DEF_MSG;
-
-   ret = register_netdev(net_dev);
-   if (ret)
-   goto err_unmap_rx;

/* Get Mac address according to the chip revision */
pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, 
(sis_priv-chipset_rev));
if(netif_msg_probe(sis_priv))
printk(KERN_DEBUG %s: detected revision %2.2x, 
trying to get MAC address...\n,
-   net_dev-name, sis_priv-chipset_rev);
+   dev_name, sis_priv-chipset_rev);

ret = 0;
if (sis_priv-chipset_rev == SIS630E_900_REV)
@@ -496,9 +494,9 @@
ret = sis900_get_mac_addr(pci_dev, net_dev);
 
if (ret == 0) {
-   printk(KERN_WARNING %s: Cannot read MAC address.\n, 
net_dev-name);
+   printk(KERN_WARNING %s: Cannot read MAC address.\n, dev_name);
ret = -ENODEV;
-   goto err_out_unregister;
+   goto err_unmap_rx;
}

/* 630ET : set the mii access mode as software-mode */
@@ -507,9 +505,10 @@
 
/* probe for mii transceiver */
if (sis900_mii_probe(net_dev) == 0) {
-   printk(KERN_WARNING %s: Error probing MII device.\n, 
net_dev-name);
+   printk(KERN_WARNING %s: Error probing MII device.\n,
+  dev_name);
ret = -ENODEV;
-   goto err_out_unregister;
+   goto err_unmap_rx;
}
 
/* save our host bridge revision */
@@ -519,6 +518,10 @@
pci_dev_put(dev);
}
 
+   ret = register_netdev(net_dev);
+   if (ret)
+   goto err_unmap_rx;
+
/* print some information about our NIC */
printk(KERN_INFO %s: %s at %#lx, IRQ %d, , net_dev-name,
   card_name, ioaddr, net_dev-irq);
@@ -528,8 +531,6 @@
 
return 0;
 
- err_out_unregister:
-   unregister_netdev(net_dev);
  err_unmap_rx:
pci_free_consistent(pci_dev, RX_TOTAL_SIZE, sis_priv-rx_ring,
sis_priv-rx_ring_dma);
@@ -556,6 +557,7 @@
 static int __init sis900_mii_probe(struct net_device * net_dev)
 {
struct sis900_private * sis_priv = net_dev-priv;
+   const char *dev_name = pci_name(sis_priv-pci_dev);
u16 poll_bit = MII_STAT_LINK, status = 0;
unsigned long timeout = jiffies + 5 * HZ;
int phy_addr;
@@ -576,7 +578,7 @@
if (netif_msg_probe(sis_priv))
printk(KERN_DEBUG %s: MII at address %d
 not accessible\n,
-   net_dev-name, phy_addr);
+   dev_name, phy_addr);
continue;
}

@@ -609,7 +611,7 @@
(mii_status  (MII_STAT_CAN_TX_FDX 
| MII_STAT_CAN_TX)) ? LAN : HOME;
printk(KERN_INFO %s: %s transceiver found 
at address %d.\n,
-   net_dev-name,
+