Lines 153-159
Link Here
|
153 |
#include <asm/uaccess.h> |
153 |
#include <asm/uaccess.h> |
154 |
#include <asm/system.h> |
154 |
#include <asm/system.h> |
155 |
|
155 |
|
156 |
#if 0 |
156 |
#if 1 |
157 |
#define dprintk printk |
157 |
#define dprintk printk |
158 |
#else |
158 |
#else |
159 |
#define dprintk(x...) do { } while (0) |
159 |
#define dprintk(x...) do { } while (0) |
Lines 5278-5285
static int __devinit nv_probe(struct pci
Link Here
|
5278 |
np->mac_in_use = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_MGMT_ST; |
5278 |
np->mac_in_use = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_MGMT_ST; |
5279 |
dprintk(KERN_INFO "%s: mgmt unit is running. mac in use %x.\n", pci_name(pci_dev), np->mac_in_use); |
5279 |
dprintk(KERN_INFO "%s: mgmt unit is running. mac in use %x.\n", pci_name(pci_dev), np->mac_in_use); |
5280 |
for (i = 0; i < 5000; i++) { |
5280 |
for (i = 0; i < 5000; i++) { |
|
|
5281 |
dprintk(KERN_INFO "in loop, i=%d\n", i); |
5281 |
msleep(1); |
5282 |
msleep(1); |
5282 |
if (nv_mgmt_acquire_sema(dev)) { |
5283 |
if (nv_mgmt_acquire_sema(dev)) { |
|
|
5284 |
dprintk(KERN_INFO "acquired sema\n"); |
5283 |
/* management unit setup the phy already? */ |
5285 |
/* management unit setup the phy already? */ |
5284 |
if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) == |
5286 |
if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) == |
5285 |
NVREG_XMITCTL_SYNC_PHY_INIT) { |
5287 |
NVREG_XMITCTL_SYNC_PHY_INIT) { |
Lines 5287-5292
static int __devinit nv_probe(struct pci
Link Here
|
5287 |
phyinitialized = 1; |
5289 |
phyinitialized = 1; |
5288 |
dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev)); |
5290 |
dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev)); |
5289 |
} else { |
5291 |
} else { |
|
|
5292 |
dprintk(KERN_INFO "we need to init phy\n"); |
5290 |
/* we need to init the phy */ |
5293 |
/* we need to init the phy */ |
5291 |
} |
5294 |
} |
5292 |
break; |
5295 |
break; |
Lines 5295-5304
static int __devinit nv_probe(struct pci
Link Here
|
5295 |
} |
5298 |
} |
5296 |
} |
5299 |
} |
5297 |
|
5300 |
|
|
|
5301 |
dprintk(KERN_INFO "now look for phy\n"); |
5298 |
/* find a suitable phy */ |
5302 |
/* find a suitable phy */ |
5299 |
for (i = 1; i <= 32; i++) { |
5303 |
for (i = 1; i <= 32; i++) { |
5300 |
int id1, id2; |
5304 |
int id1, id2; |
5301 |
int phyaddr = i & 0x1F; |
5305 |
int phyaddr = i & 0x1F; |
|
|
5306 |
dprintk(KERN_INFO "in phy loop, i=%d\n", i); |
5302 |
|
5307 |
|
5303 |
spin_lock_irq(&np->lock); |
5308 |
spin_lock_irq(&np->lock); |
5304 |
id1 = mii_rw(dev, phyaddr, MII_PHYSID1, MII_READ); |
5309 |
id1 = mii_rw(dev, phyaddr, MII_PHYSID1, MII_READ); |