]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.22.15/forcedeth-boot-delay-fix.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.22.15 / forcedeth-boot-delay-fix.patch
1 From 9e555930bd873d238f5f7b9d76d3bf31e6e3ce93 Mon Sep 17 00:00:00 2001
2 From: Ayaz Abdulla <aabdulla@nvidia.com>
3 Date: Wed, 21 Nov 2007 15:02:58 -0800
4 Subject: forcedeth boot delay fix
5
6 From: Ayaz Abdulla <aabdulla@nvidia.com>
7
8 patch 9e555930bd873d238f5f7b9d76d3bf31e6e3ce93 in mainline.
9
10 Fix a long boot delay in the forcedeth driver. During initialization, the
11 timeout for the handshake between mgmt unit and driver can be very long.
12 The patch reduces the timeout by eliminating a extra loop around the
13 timeout logic.
14
15 Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9308
16
17 Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
18 Cc: Alex Howells <astinus@gentoo.org>
19 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
20 Signed-off-by: Jeff Garzik <jeff@garzik.org>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
22
23 ---
24 drivers/net/forcedeth.c | 22 +++++++++-------------
25 1 file changed, 9 insertions(+), 13 deletions(-)
26
27 --- a/drivers/net/forcedeth.c
28 +++ b/drivers/net/forcedeth.c
29 @@ -5283,19 +5283,15 @@ static int __devinit nv_probe(struct pci
30 if (readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_PHY_INIT) {
31 np->mac_in_use = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_MGMT_ST;
32 dprintk(KERN_INFO "%s: mgmt unit is running. mac in use %x.\n", pci_name(pci_dev), np->mac_in_use);
33 - for (i = 0; i < 5000; i++) {
34 - msleep(1);
35 - if (nv_mgmt_acquire_sema(dev)) {
36 - /* management unit setup the phy already? */
37 - if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) ==
38 - NVREG_XMITCTL_SYNC_PHY_INIT) {
39 - /* phy is inited by mgmt unit */
40 - phyinitialized = 1;
41 - dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev));
42 - } else {
43 - /* we need to init the phy */
44 - }
45 - break;
46 + if (nv_mgmt_acquire_sema(dev)) {
47 + /* management unit setup the phy already? */
48 + if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) ==
49 + NVREG_XMITCTL_SYNC_PHY_INIT) {
50 + /* phy is inited by mgmt unit */
51 + phyinitialized = 1;
52 + dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev));
53 + } else {
54 + /* we need to init the phy */
55 }
56 }
57 }