Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167693
b: refs/heads/master
c: 43a04fd
h: refs/heads/master
i:
  167691: 0f30682
v: v3
  • Loading branch information
Sathya Perla authored and David S. Miller committed Oct 15, 2009
1 parent 6e04436 commit 733df49
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 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: 73d540f282c0d8ce48fafd7fcc844e91f31d4103
refs/heads/master: 43a04fdc369ce4fb6718b95e1c930ff8661e65c1
25 changes: 18 additions & 7 deletions trunk/drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,26 @@ static int be_POST_stage_get(struct be_adapter *adapter, u16 *stage)

int be_cmd_POST(struct be_adapter *adapter)
{
u16 stage, error;
u16 stage;
int status, timeout = 0;

error = be_POST_stage_get(adapter, &stage);
if (error || stage != POST_STAGE_ARMFW_RDY) {
dev_err(&adapter->pdev->dev, "POST failed.\n");
return -1;
}
do {
status = be_POST_stage_get(adapter, &stage);
if (status) {
dev_err(&adapter->pdev->dev, "POST error; stage=0x%x\n",
stage);
return -1;
} else if (stage != POST_STAGE_ARMFW_RDY) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(2 * HZ);
timeout += 2;
} else {
return 0;
}
} while (timeout < 20);

return 0;
dev_err(&adapter->pdev->dev, "POST timeout; stage=0x%x\n", stage);
return -1;
}

static inline void *embedded_payload(struct be_mcc_wrb *wrb)
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2058,6 +2058,10 @@ static int be_hw_up(struct be_adapter *adapter)
if (status)
return status;

status = be_cmd_reset_function(adapter);
if (status)
return status;

status = be_cmd_get_fw_ver(adapter, adapter->fw_ver);
if (status)
return status;
Expand Down Expand Up @@ -2111,10 +2115,6 @@ static int __devinit be_probe(struct pci_dev *pdev,
if (status)
goto free_netdev;

status = be_cmd_reset_function(adapter);
if (status)
goto ctrl_clean;

status = be_stats_init(adapter);
if (status)
goto ctrl_clean;
Expand Down

0 comments on commit 733df49

Please sign in to comment.