Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154107
b: refs/heads/master
c: 96f2ebd
h: refs/heads/master
i:
  154105: de14e10
  154103: 588e54e
v: v3
  • Loading branch information
Dhananjay Phadke authored and David S. Miller committed Jun 23, 2009
1 parent 57a3dab commit 4fbda57
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01542cd1bbf995f951e2c2383d7911e96b12bec6
refs/heads/master: 96f2ebd2e10417da151202c750d8664767a2194b
37 changes: 20 additions & 17 deletions trunk/drivers/net/netxen/netxen_nic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,28 +944,31 @@ int netxen_phantom_init(struct netxen_adapter *adapter, int pegtune_val)
u32 val = 0;
int retries = 60;

if (!pegtune_val) {
do {
val = NXRD32(adapter, CRB_CMDPEG_STATE);
if (pegtune_val)
return 0;

if (val == PHAN_INITIALIZE_COMPLETE ||
val == PHAN_INITIALIZE_ACK)
return 0;
do {
val = NXRD32(adapter, CRB_CMDPEG_STATE);

msleep(500);
switch (val) {
case PHAN_INITIALIZE_COMPLETE:
case PHAN_INITIALIZE_ACK:
return 0;
case PHAN_INITIALIZE_FAILED:
goto out_err;
default:
break;
}

} while (--retries);
msleep(500);

if (!retries) {
pegtune_val = NXRD32(adapter,
NETXEN_ROMUSB_GLB_PEGTUNE_DONE);
printk(KERN_WARNING "netxen_phantom_init: init failed, "
"pegtune_val=%x\n", pegtune_val);
return -1;
}
}
} while (--retries);

return 0;
NXWR32(adapter, CRB_CMDPEG_STATE, PHAN_INITIALIZE_FAILED);

out_err:
dev_warn(&adapter->pdev->dev, "firmware init failed\n");
return -EIO;
}

static int
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ netxen_start_firmware(struct netxen_adapter *adapter, int request_fw)
first_driver = (adapter->ahw.pci_func == 0);

if (!first_driver)
return 0;
goto wait_init;

first_boot = NXRD32(adapter, NETXEN_CAM_RAM(0x1fc));

Expand Down Expand Up @@ -752,6 +752,7 @@ netxen_start_firmware(struct netxen_adapter *adapter, int request_fw)
| (_NETXEN_NIC_LINUX_SUBVERSION);
NXWR32(adapter, CRB_DRIVER_VERSION, val);

wait_init:
/* Handshake with the card before we register the devices. */
err = netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
if (err) {
Expand Down

0 comments on commit 4fbda57

Please sign in to comment.