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.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 6e7eaaf33679..6792cfae56e2 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -697,7 +697,6 @@ qla2x00_process_completed_request(struct scsi_qla_host *ha, uint32_t index)
697 697
698 if (ha->actthreads) 698 if (ha->actthreads)
699 ha->actthreads--; 699 ha->actthreads--;
700 sp->lun_queue->out_cnt--;
701 CMD_COMPL_STATUS(sp->cmd) = 0L; 700 CMD_COMPL_STATUS(sp->cmd) = 0L;
702 CMD_SCSI_STATUS(sp->cmd) = 0L; 701 CMD_SCSI_STATUS(sp->cmd) = 0L;
703 702
@@ -818,11 +817,8 @@ qla2x00_process_response_queue(struct scsi_qla_host *ha)
818static void 817static void
819qla2x00_status_entry(scsi_qla_host_t *ha, sts_entry_t *pkt) 818qla2x00_status_entry(scsi_qla_host_t *ha, sts_entry_t *pkt)
820{ 819{
821 int ret;
822 unsigned b, t, l; 820 unsigned b, t, l;
823 srb_t *sp; 821 srb_t *sp;
824 os_lun_t *lq;
825 os_tgt_t *tq;
826 fc_port_t *fcport; 822 fc_port_t *fcport;
827 struct scsi_cmnd *cp; 823 struct scsi_cmnd *cp;
828 uint16_t comp_status; 824 uint16_t comp_status;
@@ -872,21 +868,6 @@ qla2x00_status_entry(scsi_qla_host_t *ha, sts_entry_t *pkt)
872 if (ha->actthreads) 868 if (ha->actthreads)
873 ha->actthreads--; 869 ha->actthreads--;
874 870
875 if (sp->lun_queue == NULL) {
876 DEBUG2(printk("scsi(%ld): Status Entry invalid lun pointer.\n",
877 ha->host_no));
878 qla_printk(KERN_WARNING, ha,
879 "Status Entry invalid lun pointer.\n");
880
881 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
882 if (ha->dpc_wait && !ha->dpc_active)
883 up(ha->dpc_wait);
884
885 return;
886 }
887
888 sp->lun_queue->out_cnt--;
889
890 comp_status = le16_to_cpu(pkt->comp_status); 871 comp_status = le16_to_cpu(pkt->comp_status);
891 /* Mask of reserved bits 12-15, before we examine the scsi status */ 872 /* Mask of reserved bits 12-15, before we examine the scsi status */
892 scsi_status = le16_to_cpu(pkt->scsi_status) & SS_MASK; 873 scsi_status = le16_to_cpu(pkt->scsi_status) & SS_MASK;
@@ -901,8 +882,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, sts_entry_t *pkt)
901 t = cp->device->id; 882 t = cp->device->id;
902 l = cp->device->lun, 883 l = cp->device->lun,
903 884
904 tq = sp->tgt_queue; 885 fcport = sp->fcport;
905 lq = sp->lun_queue;
906 886
907 /* Check for any FCP transport errors. */ 887 /* Check for any FCP transport errors. */
908 if (scsi_status & SS_RESPONSE_INFO_LEN_VALID) { 888 if (scsi_status & SS_RESPONSE_INFO_LEN_VALID) {
@@ -1096,7 +1076,6 @@ qla2x00_status_entry(scsi_qla_host_t *ha, sts_entry_t *pkt)
1096 * Target with DID_NO_CONNECT ELSE Queue the IOs in the 1076 * Target with DID_NO_CONNECT ELSE Queue the IOs in the
1097 * retry_queue. 1077 * retry_queue.
1098 */ 1078 */
1099 fcport = sp->fclun->fcport;
1100 DEBUG2(printk("scsi(%ld:%d:%d): status_entry: Port Down " 1079 DEBUG2(printk("scsi(%ld:%d:%d): status_entry: Port Down "
1101 "pid=%ld, compl status=0x%x, port state=0x%x\n", 1080 "pid=%ld, compl status=0x%x, port state=0x%x\n",
1102 ha->host_no, t, l, cp->serial_number, comp_status, 1081 ha->host_no, t, l, cp->serial_number, comp_status,
@@ -1137,8 +1116,6 @@ qla2x00_status_entry(scsi_qla_host_t *ha, sts_entry_t *pkt)
1137 1116
1138 cp->result = DID_BUS_BUSY << 16; 1117 cp->result = DID_BUS_BUSY << 16;
1139 1118
1140 fcport = lq->fclun->fcport;
1141
1142 /* Check to see if logout occurred */ 1119 /* Check to see if logout occurred */
1143 if ((le16_to_cpu(pkt->status_flags) & SF_LOGOUT_SENT)) { 1120 if ((le16_to_cpu(pkt->status_flags) & SF_LOGOUT_SENT)) {
1144 qla2x00_mark_device_lost(ha, fcport, 1); 1121 qla2x00_mark_device_lost(ha, fcport, 1);
@@ -1154,16 +1131,6 @@ qla2x00_status_entry(scsi_qla_host_t *ha, sts_entry_t *pkt)
1154 1131
1155 cp->result = DID_OK << 16 | lscsi_status; 1132 cp->result = DID_OK << 16 | lscsi_status;
1156 1133
1157 /* TODO: ??? */
1158 /* Adjust queue depth */
1159 ret = scsi_track_queue_full(cp->device,
1160 sp->lun_queue->out_cnt - 1);
1161 if (ret) {
1162 qla_printk(KERN_INFO, ha,
1163 "scsi(%ld:%d:%d:%d): Queue depth adjusted to %d.\n",
1164 ha->host_no, cp->device->channel, cp->device->id,
1165 cp->device->lun, ret);
1166 }
1167 break; 1134 break;
1168 1135
1169 default: 1136 default:
@@ -1268,8 +1235,6 @@ qla2x00_error_entry(scsi_qla_host_t *ha, sts_entry_t *pkt)
1268 ha->outstanding_cmds[pkt->handle] = NULL; 1235 ha->outstanding_cmds[pkt->handle] = NULL;
1269 if (ha->actthreads) 1236 if (ha->actthreads)
1270 ha->actthreads--; 1237 ha->actthreads--;
1271 sp->lun_queue->out_cnt--;
1272
1273 /* Bad payload or header */ 1238 /* Bad payload or header */
1274 if (pkt->entry_status & 1239 if (pkt->entry_status &
1275 (RF_INV_E_ORDER | RF_INV_E_COUNT | 1240 (RF_INV_E_ORDER | RF_INV_E_COUNT |