diff options
author | Eric Moore <eric.moore@lsi.com> | 2007-01-29 11:47:47 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-02-02 22:10:55 -0500 |
commit | cd2c61911dfe0d87cb872571739d5838cc233747 (patch) | |
tree | b6daf2d0d3208cc767ccc4482ad71f70f6c16d08 /drivers/message/fusion/mptbase.c | |
parent | 2ecce492290bf0d5eedc76cf0f4bf45f8c3f42bc (diff) |
[SCSI] fusion - error handling bug fix's
misc error handling bug fix's
- properly interpret iocstatus returned after task management request
- clear tmState after a failed doorbell
- cleanup mptscsih_taskmgmt_complete
Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptbase.c')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index e7aec3478a30..fcbce1c31d04 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -916,7 +916,7 @@ mpt_add_sge(char *pAddr, u32 flagslength, dma_addr_t dma_addr) | |||
916 | int | 916 | int |
917 | mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag) | 917 | mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag) |
918 | { | 918 | { |
919 | int r = 0; | 919 | int r = 0; |
920 | u8 *req_as_bytes; | 920 | u8 *req_as_bytes; |
921 | int ii; | 921 | int ii; |
922 | 922 | ||
@@ -3219,6 +3219,9 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) | |||
3219 | u32 diag1val = 0; | 3219 | u32 diag1val = 0; |
3220 | #endif | 3220 | #endif |
3221 | 3221 | ||
3222 | /* Clear any existing interrupts */ | ||
3223 | CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); | ||
3224 | |||
3222 | if (ioc->pcidev->device == MPI_MANUFACTPAGE_DEVID_SAS1078) { | 3225 | if (ioc->pcidev->device == MPI_MANUFACTPAGE_DEVID_SAS1078) { |
3223 | drsprintk((MYIOC_s_WARN_FMT "%s: Doorbell=%p; 1078 reset " | 3226 | drsprintk((MYIOC_s_WARN_FMT "%s: Doorbell=%p; 1078 reset " |
3224 | "address=%p\n", ioc->name, __FUNCTION__, | 3227 | "address=%p\n", ioc->name, __FUNCTION__, |
@@ -3238,7 +3241,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) | |||
3238 | " count=%d\n", | 3241 | " count=%d\n", |
3239 | ioc->name, doorbell, count)); | 3242 | ioc->name, doorbell, count)); |
3240 | if (doorbell == MPI_IOC_STATE_READY) { | 3243 | if (doorbell == MPI_IOC_STATE_READY) { |
3241 | return 0; | 3244 | return 1; |
3242 | } | 3245 | } |
3243 | 3246 | ||
3244 | /* wait 1 sec */ | 3247 | /* wait 1 sec */ |
@@ -3250,9 +3253,6 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) | |||
3250 | return -1; | 3253 | return -1; |
3251 | } | 3254 | } |
3252 | 3255 | ||
3253 | /* Clear any existing interrupts */ | ||
3254 | CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); | ||
3255 | |||
3256 | /* Use "Diagnostic reset" method! (only thing available!) */ | 3256 | /* Use "Diagnostic reset" method! (only thing available!) */ |
3257 | diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); | 3257 | diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); |
3258 | 3258 | ||
@@ -3968,7 +3968,7 @@ WaitForDoorbellAck(MPT_ADAPTER *ioc, int howlong, int sleepFlag) | |||
3968 | } | 3968 | } |
3969 | } else { | 3969 | } else { |
3970 | while (--cntdn) { | 3970 | while (--cntdn) { |
3971 | mdelay (1); | 3971 | udelay (1000); |
3972 | intstat = CHIPREG_READ32(&ioc->chip->IntStatus); | 3972 | intstat = CHIPREG_READ32(&ioc->chip->IntStatus); |
3973 | if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS)) | 3973 | if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS)) |
3974 | break; | 3974 | break; |
@@ -4020,7 +4020,7 @@ WaitForDoorbellInt(MPT_ADAPTER *ioc, int howlong, int sleepFlag) | |||
4020 | intstat = CHIPREG_READ32(&ioc->chip->IntStatus); | 4020 | intstat = CHIPREG_READ32(&ioc->chip->IntStatus); |
4021 | if (intstat & MPI_HIS_DOORBELL_INTERRUPT) | 4021 | if (intstat & MPI_HIS_DOORBELL_INTERRUPT) |
4022 | break; | 4022 | break; |
4023 | mdelay(1); | 4023 | udelay (1000); |
4024 | count++; | 4024 | count++; |
4025 | } | 4025 | } |
4026 | } | 4026 | } |