aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_isr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index bf41887cdd65..fc4bfa7f839c 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -391,9 +391,9 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
391 break; 391 break;
392 392
393 case MBA_LIP_OCCURRED: /* Loop Initialization Procedure */ 393 case MBA_LIP_OCCURRED: /* Loop Initialization Procedure */
394 DEBUG2(printk("scsi(%ld): LIP occured (%x).\n", ha->host_no, 394 DEBUG2(printk("scsi(%ld): LIP occurred (%x).\n", ha->host_no,
395 mb[1])); 395 mb[1]));
396 qla_printk(KERN_INFO, ha, "LIP occured (%x).\n", mb[1]); 396 qla_printk(KERN_INFO, ha, "LIP occurred (%x).\n", mb[1]);
397 397
398 if (atomic_read(&ha->loop_state) != LOOP_DOWN) { 398 if (atomic_read(&ha->loop_state) != LOOP_DOWN) {
399 atomic_set(&ha->loop_state, LOOP_DOWN); 399 atomic_set(&ha->loop_state, LOOP_DOWN);
@@ -460,7 +460,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
460 DEBUG2(printk("scsi(%ld): Asynchronous LIP RESET (%x).\n", 460 DEBUG2(printk("scsi(%ld): Asynchronous LIP RESET (%x).\n",
461 ha->host_no, mb[1])); 461 ha->host_no, mb[1]));
462 qla_printk(KERN_INFO, ha, 462 qla_printk(KERN_INFO, ha,
463 "LIP reset occured (%x).\n", mb[1]); 463 "LIP reset occurred (%x).\n", mb[1]);
464 464
465 if (atomic_read(&ha->loop_state) != LOOP_DOWN) { 465 if (atomic_read(&ha->loop_state) != LOOP_DOWN) {
466 atomic_set(&ha->loop_state, LOOP_DOWN); 466 atomic_set(&ha->loop_state, LOOP_DOWN);
@@ -543,7 +543,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
543 543
544 case MBA_PORT_UPDATE: /* Port database update */ 544 case MBA_PORT_UPDATE: /* Port database update */
545 /* 545 /*
546 * If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET 546 * If PORT UPDATE is global (received LIP_OCCURRED/LIP_RESET
547 * event etc. earlier indicating loop is down) then process 547 * event etc. earlier indicating loop is down) then process
548 * it. Otherwise ignore it and Wait for RSCN to come in. 548 * it. Otherwise ignore it and Wait for RSCN to come in.
549 */ 549 */
@@ -589,7 +589,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
589 "scsi(%ld): RSCN database changed -- %04x %04x %04x.\n", 589 "scsi(%ld): RSCN database changed -- %04x %04x %04x.\n",
590 ha->host_no, mb[1], mb[2], mb[3])); 590 ha->host_no, mb[1], mb[2], mb[3]));
591 591
592 rscn_entry = (mb[1] << 16) | mb[2]; 592 rscn_entry = ((mb[1] & 0xff) << 16) | mb[2];
593 host_pid = (ha->d_id.b.domain << 16) | (ha->d_id.b.area << 8) | 593 host_pid = (ha->d_id.b.domain << 16) | (ha->d_id.b.area << 8) |
594 ha->d_id.b.al_pa; 594 ha->d_id.b.al_pa;
595 if (rscn_entry == host_pid) { 595 if (rscn_entry == host_pid) {
@@ -600,6 +600,8 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
600 break; 600 break;
601 } 601 }
602 602
603 /* Ignore reserved bits from RSCN-payload. */
604 rscn_entry = ((mb[1] & 0x3ff) << 16) | mb[2];
603 rscn_queue_index = ha->rscn_in_ptr + 1; 605 rscn_queue_index = ha->rscn_in_ptr + 1;
604 if (rscn_queue_index == MAX_RSCN_COUNT) 606 if (rscn_queue_index == MAX_RSCN_COUNT)
605 rscn_queue_index = 0; 607 rscn_queue_index = 0;
@@ -1060,8 +1062,9 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
1060 resid = resid_len; 1062 resid = resid_len;
1061 /* Use F/W calculated residual length. */ 1063 /* Use F/W calculated residual length. */
1062 if (IS_FWI2_CAPABLE(ha)) { 1064 if (IS_FWI2_CAPABLE(ha)) {
1063 if (scsi_status & SS_RESIDUAL_UNDER && 1065 if (!(scsi_status & SS_RESIDUAL_UNDER)) {
1064 resid != fw_resid_len) { 1066 lscsi_status = 0;
1067 } else if (resid != fw_resid_len) {
1065 scsi_status &= ~SS_RESIDUAL_UNDER; 1068 scsi_status &= ~SS_RESIDUAL_UNDER;
1066 lscsi_status = 0; 1069 lscsi_status = 0;
1067 } 1070 }