[PATCH] drivers/net/b44.c: fix regressions in error recovery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The changes in b44 driver commit
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fedb0eefe286a6409aa2c6c6f2353c595e68d33d
cause a regression. It changes b44_halt() to disable the PHY but this function gets called in 2 error recovery situations and some configuration changes. IMHO disabling the PHY in those cases is a total waste of time. This patch reverts those cases to the old behavior.

(please CC: me on replies as I'm not subscribed to the list)


Signed-off-by: Christiaan Welvaart <cjw@xxxxxxxxxxxxxxxxx>

diff -pruN a/drivers/net/b44.c b/drivers/net/b44.c
--- a/drivers/net/b44.c	2009-03-28 14:12:30.087884295 +0100
+++ b/drivers/net/b44.c	2009-03-28 14:11:57.293902007 +0100
@@ -124,6 +124,7 @@ MODULE_DEVICE_TABLE(ssb, b44_ssb_tbl);

 static void b44_halt(struct b44 *);
 static void b44_init_rings(struct b44 *);
+static void b44_chip_reset(struct b44 *bp, int reset_kind);

 #define B44_FULL_RESET		1
 #define B44_FULL_RESET_SKIP_PHY	2
@@ -865,7 +866,8 @@ static int b44_poll(struct napi_struct *
 		unsigned long flags;

 		spin_lock_irqsave(&bp->lock, flags);
-		b44_halt(bp);
+		b44_disable_ints(bp);
+		b44_chip_reset(bp, B44_CHIP_RESET_FULL);
 		b44_init_rings(bp);
 		b44_init_hw(bp, B44_FULL_RESET_SKIP_PHY);
 		netif_wake_queue(bp->dev);
@@ -935,7 +937,8 @@ static void b44_tx_timeout(struct net_de

 	spin_lock_irq(&bp->lock);

-	b44_halt(bp);
+	b44_disable_ints(bp);
+	b44_chip_reset(bp, B44_CHIP_RESET_FULL);
 	b44_init_rings(bp);
 	b44_init_hw(bp, B44_FULL_RESET);

@@ -1052,7 +1055,8 @@ static int b44_change_mtu(struct net_dev
 	}

 	spin_lock_irq(&bp->lock);
-	b44_halt(bp);
+	b44_disable_ints(bp);
+	b44_chip_reset(bp, B44_CHIP_RESET_FULL);
 	dev->mtu = new_mtu;
 	b44_init_rings(bp);
 	b44_init_hw(bp, B44_FULL_RESET);
@@ -1917,7 +1921,8 @@ static int b44_set_ringparam(struct net_
 	bp->rx_pending = ering->rx_pending;
 	bp->tx_pending = ering->tx_pending;

-	b44_halt(bp);
+	b44_disable_ints(bp);
+	b44_chip_reset(bp, B44_CHIP_RESET_FULL);
 	b44_init_rings(bp);
 	b44_init_hw(bp, B44_FULL_RESET);
 	netif_wake_queue(bp->dev);
@@ -1960,7 +1965,8 @@ static int b44_set_pauseparam(struct net
 	else
 		bp->flags &= ~B44_FLAG_TX_PAUSE;
 	if (bp->flags & B44_FLAG_PAUSE_AUTO) {
-		b44_halt(bp);
+		b44_disable_ints(bp);
+		b44_chip_reset(bp, B44_CHIP_RESET_FULL);
 		b44_init_rings(bp);
 		b44_init_hw(bp, B44_FULL_RESET);
 	} else {
--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux