Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194325
b: refs/heads/master
c: bbd8c6a
h: refs/heads/master
i:
  194323: 8b656c2
v: v3
  • Loading branch information
Amit Kumar Salecha authored and David S. Miller committed Apr 22, 2010
1 parent 60c8c61 commit 719a9ad
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 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: 8ae6df978b986a5ce099e7e7118f127563d2cbbe
refs/heads/master: bbd8c6a45b0f8557a8fc38fc763d7a51fac4459d
22 changes: 11 additions & 11 deletions trunk/drivers/net/qlcnic/qlcnic_hdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -694,27 +694,27 @@ enum {
#define QLCNIC_CRB_DRV_STATE (QLCNIC_CAM_RAM(0x144))
#define QLCNIC_CRB_DRV_SCRATCH (QLCNIC_CAM_RAM(0x148))
#define QLCNIC_CRB_DEV_PARTITION_INFO (QLCNIC_CAM_RAM(0x14c))
#define QLCNIC_CRB_DRV_IDC_VER (QLCNIC_CAM_RAM(0x14c))
#define QLCNIC_CRB_DRV_IDC_VER (QLCNIC_CAM_RAM(0x174))
#define QLCNIC_ROM_DEV_INIT_TIMEOUT (0x3e885c)
#define QLCNIC_ROM_DRV_RESET_TIMEOUT (0x3e8860)

/* Device State */
#define QLCNIC_DEV_COLD 1
#define QLCNIC_DEV_INITALIZING 2
#define QLCNIC_DEV_READY 3
#define QLCNIC_DEV_NEED_RESET 4
#define QLCNIC_DEV_NEED_QUISCENT 5
#define QLCNIC_DEV_FAILED 6
/* Device State */
#define QLCNIC_DEV_COLD 0x1
#define QLCNIC_DEV_INITIALIZING 0x2
#define QLCNIC_DEV_READY 0x3
#define QLCNIC_DEV_NEED_RESET 0x4
#define QLCNIC_DEV_NEED_QUISCENT 0x5
#define QLCNIC_DEV_FAILED 0x6
#define QLCNIC_DEV_QUISCENT 0x7

#define QLCNIC_RCODE_DRIVER_INFO 0x20000000
#define QLCNIC_RCODE_DRIVER_CAN_RELOAD 0x40000000
#define QLCNIC_RCODE_FATAL_ERROR 0x80000000
#define QLCNIC_FWERROR_PEGNUM(code) ((code) & 0xff)
#define QLCNIC_FWERROR_CODE(code) ((code >> 8) & 0xfffff)

#define FW_POLL_DELAY (2 * HZ)
#define FW_FAIL_THRESH 3
#define FW_POLL_THRESH 10
#define FW_POLL_DELAY (1 * HZ)
#define FW_FAIL_THRESH 2

#define ISR_MSI_INT_TRIGGER(FUNC) (QLCNIC_PCIX_PS_REG(PCIX_MSI_F(FUNC)))
#define ISR_LEGACY_INT_TRIGGERED(VAL) (((VAL) & 0x300) == 0x200)
Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/net/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2054,7 +2054,7 @@ qlcnic_can_start_firmware(struct qlcnic_adapter *adapter)
switch (prev_state) {
case QLCNIC_DEV_COLD:
start_fw:
QLCWR32(adapter, QLCNIC_CRB_DEV_STATE, QLCNIC_DEV_INITALIZING);
QLCWR32(adapter, QLCNIC_CRB_DEV_STATE, QLCNIC_DEV_INITIALIZING);
qlcnic_api_unlock(adapter);
return 1;

Expand All @@ -2077,6 +2077,10 @@ qlcnic_can_start_firmware(struct qlcnic_adapter *adapter)
case QLCNIC_DEV_FAILED:
qlcnic_api_unlock(adapter);
return -1;

case QLCNIC_DEV_INITIALIZING:
case QLCNIC_DEV_QUISCENT:
break;
}

qlcnic_api_unlock(adapter);
Expand Down Expand Up @@ -2208,7 +2212,8 @@ qlcnic_dev_request_reset(struct qlcnic_adapter *adapter)

state = QLCRD32(adapter, QLCNIC_CRB_DEV_STATE);

if (state != QLCNIC_DEV_INITALIZING && state != QLCNIC_DEV_NEED_RESET) {
if (state != QLCNIC_DEV_INITIALIZING &&
state != QLCNIC_DEV_NEED_RESET) {
QLCWR32(adapter, QLCNIC_CRB_DEV_STATE, QLCNIC_DEV_NEED_RESET);
set_bit(__QLCNIC_START_FW, &adapter->state);
QLCDB(adapter, DRV, "NEED_RESET state set\n");
Expand Down

0 comments on commit 719a9ad

Please sign in to comment.