aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAyaz Abdulla <aabdulla@nvidia.com>2007-11-21 18:02:58 -0500
committerJeff Garzik <jeff@garzik.org>2007-11-23 20:59:59 -0500
commit9e555930bd873d238f5f7b9d76d3bf31e6e3ce93 (patch)
treee4ad71dcf2d316d1b76b922306fb72afc010f815 /drivers
parent490dde8990c55662596a4be71b5070bd7d382d4a (diff)
forcedeth boot delay fix
Fix a long boot delay in the forcedeth driver. During initialization, the timeout for the handshake between mgmt unit and driver can be very long. The patch reduces the timeout by eliminating a extra loop around the timeout logic. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9308 Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Cc: Alex Howells <astinus@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/forcedeth.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index f9ba0ac92af0..a96583cceb5e 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5286,19 +5286,15 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5286 if (readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_PHY_INIT) { 5286 if (readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_PHY_INIT) {
5287 np->mac_in_use = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_MGMT_ST; 5287 np->mac_in_use = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_MGMT_ST;
5288 dprintk(KERN_INFO "%s: mgmt unit is running. mac in use %x.\n", pci_name(pci_dev), np->mac_in_use); 5288 dprintk(KERN_INFO "%s: mgmt unit is running. mac in use %x.\n", pci_name(pci_dev), np->mac_in_use);
5289 for (i = 0; i < 5000; i++) { 5289 if (nv_mgmt_acquire_sema(dev)) {
5290 msleep(1); 5290 /* management unit setup the phy already? */
5291 if (nv_mgmt_acquire_sema(dev)) { 5291 if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) ==
5292 /* management unit setup the phy already? */ 5292 NVREG_XMITCTL_SYNC_PHY_INIT) {
5293 if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) == 5293 /* phy is inited by mgmt unit */
5294 NVREG_XMITCTL_SYNC_PHY_INIT) { 5294 phyinitialized = 1;
5295 /* phy is inited by mgmt unit */ 5295 dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev));
5296 phyinitialized = 1; 5296 } else {
5297 dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev)); 5297 /* we need to init the phy */
5298 } else {
5299 /* we need to init the phy */
5300 }
5301 break;
5302 } 5298 }
5303 } 5299 }
5304 } 5300 }