Commit 46801ba6 authored by Vikas Chaudhary's avatar Vikas Chaudhary Committed by James Bottomley

[SCSI] qla4xxx: Proper detection of firmware abort error code for ISP82xx

Signed-off-by: default avatarVikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent badc5b99
...@@ -150,8 +150,6 @@ ...@@ -150,8 +150,6 @@
#define QL4_SESS_RECOVERY_TMO 120 /* iSCSI session */ #define QL4_SESS_RECOVERY_TMO 120 /* iSCSI session */
/* recovery timeout */ /* recovery timeout */
#define MSB(x) ((uint8_t)((uint16_t)(x) >> 8))
#define LSW(x) ((uint16_t)(x))
#define LSDW(x) ((u32)((u64)(x))) #define LSDW(x) ((u32)((u64)(x)))
#define MSDW(x) ((u32)((((u64)(x)) >> 16) >> 16)) #define MSDW(x) ((u32)((((u64)(x)) >> 16) >> 16))
......
...@@ -623,6 +623,7 @@ struct crb_addr_pair { ...@@ -623,6 +623,7 @@ struct crb_addr_pair {
#define ADDR_ERROR ((unsigned long) 0xffffffff) #define ADDR_ERROR ((unsigned long) 0xffffffff)
#define MAX_CTL_CHECK 1000 #define MAX_CTL_CHECK 1000
#define QLA82XX_FWERROR_CODE(code) ((code >> 8) & 0x1fffff)
/*************************************************************************** /***************************************************************************
* PCI related defines. * PCI related defines.
......
...@@ -2165,7 +2165,7 @@ void qla4_8xxx_watchdog(struct scsi_qla_host *ha) ...@@ -2165,7 +2165,7 @@ void qla4_8xxx_watchdog(struct scsi_qla_host *ha)
halt_status = qla4_8xxx_rd_32(ha, halt_status = qla4_8xxx_rd_32(ha,
QLA82XX_PEG_HALT_STATUS1); QLA82XX_PEG_HALT_STATUS1);
if (LSW(MSB(halt_status)) == 0x67) if (QLA82XX_FWERROR_CODE(halt_status) == 0x67)
ql4_printk(KERN_ERR, ha, "%s:" ql4_printk(KERN_ERR, ha, "%s:"
" Firmware aborted with" " Firmware aborted with"
" error code 0x00006700." " error code 0x00006700."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment