Skip to content

Commit 46801ba

Browse files
Vikas ChaudharyJames Bottomley
authored andcommitted
[SCSI] qla4xxx: Proper detection of firmware abort error code for ISP82xx
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
1 parent badc5b9 commit 46801ba

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

drivers/scsi/qla4xxx/ql4_def.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@
150150
#define QL4_SESS_RECOVERY_TMO 120 /* iSCSI session */
151151
/* recovery timeout */
152152

153-
#define MSB(x) ((uint8_t)((uint16_t)(x) >> 8))
154-
#define LSW(x) ((uint16_t)(x))
155153
#define LSDW(x) ((u32)((u64)(x)))
156154
#define MSDW(x) ((u32)((((u64)(x)) >> 16) >> 16))
157155

drivers/scsi/qla4xxx/ql4_nx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ struct crb_addr_pair {
623623

624624
#define ADDR_ERROR ((unsigned long) 0xffffffff)
625625
#define MAX_CTL_CHECK 1000
626+
#define QLA82XX_FWERROR_CODE(code) ((code >> 8) & 0x1fffff)
626627

627628
/***************************************************************************
628629
* PCI related defines.

drivers/scsi/qla4xxx/ql4_os.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,7 @@ void qla4_8xxx_watchdog(struct scsi_qla_host *ha)
21652165
halt_status = qla4_8xxx_rd_32(ha,
21662166
QLA82XX_PEG_HALT_STATUS1);
21672167

2168-
if (LSW(MSB(halt_status)) == 0x67)
2168+
if (QLA82XX_FWERROR_CODE(halt_status) == 0x67)
21692169
ql4_printk(KERN_ERR, ha, "%s:"
21702170
" Firmware aborted with"
21712171
" error code 0x00006700."

0 commit comments

Comments
 (0)