From d9e2d185bf01e20339158f77c3fca00b02014912 Mon Sep 17 00:00:00 2001 From: Mark Lord Date: Wed, 30 Nov 2005 22:30:23 +0100 Subject: b44: missing netif_wake_queue() in b44_open() This patch fixes a problem plaguing Dell notebooks with built-in b44 ethernet: The driver refuses to transmit packets of any kind until after the first 5-second tx_timeout occurs. This bug causes DHCP negotiation to fail (timeout) during installation of Ubuntu Linux. Signed-off-by: Mark Lord Signed-off-by: Andrew Morton --- drivers/net/b44.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/b44.c b/drivers/net/b44.c index c53848f787e..c8d9b4d6670 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -1417,6 +1417,7 @@ static int b44_open(struct net_device *dev) add_timer(&bp->timer); b44_enable_ints(bp); + netif_start_queue(dev); out: return err; } @@ -2113,6 +2114,7 @@ static int b44_resume(struct pci_dev *pdev) add_timer(&bp->timer); b44_enable_ints(bp); + netif_wake_queue(dev); return 0; } -- cgit v1.2.3 From 3410572d519b6c68505f746f25033de97809eaa1 Mon Sep 17 00:00:00 2001 From: Francois Romieu Date: Wed, 30 Nov 2005 22:32:13 +0100 Subject: b44: early return in dev->do_ioctl when the device is not up The device has not gone through a whole reset/init sequence until the device is up. Accessing the mii interface before this point is not safe. Signed-off-by: Francois Romieu --- drivers/net/b44.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/b44.c b/drivers/net/b44.c index c8d9b4d6670..e0ec777d96d 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -1838,12 +1838,15 @@ static int b44_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct mii_ioctl_data *data = if_mii(ifr); struct b44 *bp = netdev_priv(dev); - int err; + int err = -EINVAL; + + if (!netif_running(dev)) + goto out; spin_lock_irq(&bp->lock); err = generic_mii_ioctl(&bp->mii_if, data, cmd, NULL); spin_unlock_irq(&bp->lock); - +out: return err; } -- cgit v1.2.3 From 981d9c176dacf397d267215d44a4060c28663480 Mon Sep 17 00:00:00 2001 From: Francois Romieu Date: Wed, 30 Nov 2005 22:35:39 +0100 Subject: b44: increase version number Signed-off-by: Francois Romieu --- drivers/net/b44.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/b44.c b/drivers/net/b44.c index e0ec777d96d..7aa49b974dc 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -28,8 +28,8 @@ #define DRV_MODULE_NAME "b44" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "0.96" -#define DRV_MODULE_RELDATE "Nov 8, 2005" +#define DRV_MODULE_VERSION "0.97" +#define DRV_MODULE_RELDATE "Nov 30, 2005" #define B44_DEF_MSG_ENABLE \ (NETIF_MSG_DRV | \ -- cgit v1.2.3