aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libiscsi_tcp.c3
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c58
-rw-r--r--drivers/scsi/qla2xxx/qla_mid.c1
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c7
-rw-r--r--drivers/scsi/scsi.c5
-rw-r--r--drivers/scsi/scsi_devinfo.c1
6 files changed, 46 insertions, 29 deletions
diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c
index a745f91d2928..e7705d3532c9 100644
--- a/drivers/scsi/libiscsi_tcp.c
+++ b/drivers/scsi/libiscsi_tcp.c
@@ -177,7 +177,6 @@ int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn,
177 struct iscsi_segment *segment, int recv, 177 struct iscsi_segment *segment, int recv,
178 unsigned copied) 178 unsigned copied)
179{ 179{
180 static unsigned char padbuf[ISCSI_PAD_LEN];
181 struct scatterlist sg; 180 struct scatterlist sg;
182 unsigned int pad; 181 unsigned int pad;
183 182
@@ -233,7 +232,7 @@ int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn,
233 debug_tcp("consume %d pad bytes\n", pad); 232 debug_tcp("consume %d pad bytes\n", pad);
234 segment->total_size += pad; 233 segment->total_size += pad;
235 segment->size = pad; 234 segment->size = pad;
236 segment->data = padbuf; 235 segment->data = segment->padbuf;
237 return 0; 236 return 0;
238 } 237 }
239 } 238 }
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 2d4f32b4df5c..9ad4d0968e5c 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1258,35 +1258,48 @@ qla2x00_init_rings(scsi_qla_host_t *vha)
1258{ 1258{
1259 int rval; 1259 int rval;
1260 unsigned long flags = 0; 1260 unsigned long flags = 0;
1261 int cnt; 1261 int cnt, que;
1262 struct qla_hw_data *ha = vha->hw; 1262 struct qla_hw_data *ha = vha->hw;
1263 struct req_que *req = ha->req_q_map[0]; 1263 struct req_que *req;
1264 struct rsp_que *rsp = ha->rsp_q_map[0]; 1264 struct rsp_que *rsp;
1265 struct scsi_qla_host *vp;
1265 struct mid_init_cb_24xx *mid_init_cb = 1266 struct mid_init_cb_24xx *mid_init_cb =
1266 (struct mid_init_cb_24xx *) ha->init_cb; 1267 (struct mid_init_cb_24xx *) ha->init_cb;
1267 1268
1268 spin_lock_irqsave(&ha->hardware_lock, flags); 1269 spin_lock_irqsave(&ha->hardware_lock, flags);
1269 1270
1270 /* Clear outstanding commands array. */ 1271 /* Clear outstanding commands array. */
1271 for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) 1272 for (que = 0; que < ha->max_queues; que++) {
1272 req->outstanding_cmds[cnt] = NULL; 1273 req = ha->req_q_map[que];
1274 if (!req)
1275 continue;
1276 for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS; cnt++)
1277 req->outstanding_cmds[cnt] = NULL;
1273 1278
1274 req->current_outstanding_cmd = 0; 1279 req->current_outstanding_cmd = 0;
1275 1280
1276 /* Clear RSCN queue. */ 1281 /* Initialize firmware. */
1277 vha->rscn_in_ptr = 0; 1282 req->ring_ptr = req->ring;
1278 vha->rscn_out_ptr = 0; 1283 req->ring_index = 0;
1284 req->cnt = req->length;
1285 }
1279 1286
1280 /* Initialize firmware. */ 1287 for (que = 0; que < ha->max_queues; que++) {
1281 req->ring_ptr = req->ring; 1288 rsp = ha->rsp_q_map[que];
1282 req->ring_index = 0; 1289 if (!rsp)
1283 req->cnt = req->length; 1290 continue;
1284 rsp->ring_ptr = rsp->ring; 1291 rsp->ring_ptr = rsp->ring;
1285 rsp->ring_index = 0; 1292 rsp->ring_index = 0;
1286 1293
1287 /* Initialize response queue entries */ 1294 /* Initialize response queue entries */
1288 qla2x00_init_response_q_entries(rsp); 1295 qla2x00_init_response_q_entries(rsp);
1296 }
1289 1297
1298 /* Clear RSCN queue. */
1299 list_for_each_entry(vp, &ha->vp_list, list) {
1300 vp->rscn_in_ptr = 0;
1301 vp->rscn_out_ptr = 0;
1302 }
1290 ha->isp_ops->config_rings(vha); 1303 ha->isp_ops->config_rings(vha);
1291 1304
1292 spin_unlock_irqrestore(&ha->hardware_lock, flags); 1305 spin_unlock_irqrestore(&ha->hardware_lock, flags);
@@ -3212,8 +3225,8 @@ qla2x00_loop_resync(scsi_qla_host_t *vha)
3212 int rval = QLA_SUCCESS; 3225 int rval = QLA_SUCCESS;
3213 uint32_t wait_time; 3226 uint32_t wait_time;
3214 struct qla_hw_data *ha = vha->hw; 3227 struct qla_hw_data *ha = vha->hw;
3215 struct req_que *req = ha->req_q_map[0]; 3228 struct req_que *req = ha->req_q_map[vha->req_ques[0]];
3216 struct rsp_que *rsp = ha->rsp_q_map[0]; 3229 struct rsp_que *rsp = req->rsp;
3217 3230
3218 atomic_set(&vha->loop_state, LOOP_UPDATE); 3231 atomic_set(&vha->loop_state, LOOP_UPDATE);
3219 clear_bit(ISP_ABORT_RETRY, &vha->dpc_flags); 3232 clear_bit(ISP_ABORT_RETRY, &vha->dpc_flags);
@@ -3492,6 +3505,7 @@ qla25xx_init_queues(struct qla_hw_data *ha)
3492 } 3505 }
3493 req = ha->req_q_map[i]; 3506 req = ha->req_q_map[i];
3494 if (req) { 3507 if (req) {
3508 /* Clear outstanding commands array. */
3495 req->options &= ~BIT_0; 3509 req->options &= ~BIT_0;
3496 ret = qla25xx_init_req_que(base_vha, req, req->options); 3510 ret = qla25xx_init_req_que(base_vha, req, req->options);
3497 if (ret != QLA_SUCCESS) 3511 if (ret != QLA_SUCCESS)
@@ -3500,7 +3514,7 @@ qla25xx_init_queues(struct qla_hw_data *ha)
3500 req->id)); 3514 req->id));
3501 else 3515 else
3502 DEBUG2_17(printk(KERN_WARNING 3516 DEBUG2_17(printk(KERN_WARNING
3503 "%s Rsp que:%d inited\n", __func__, 3517 "%s Req que:%d inited\n", __func__,
3504 req->id)); 3518 req->id));
3505 } 3519 }
3506 } 3520 }
@@ -4151,8 +4165,8 @@ qla24xx_configure_vhba(scsi_qla_host_t *vha)
4151 uint16_t mb[MAILBOX_REGISTER_COUNT]; 4165 uint16_t mb[MAILBOX_REGISTER_COUNT];
4152 struct qla_hw_data *ha = vha->hw; 4166 struct qla_hw_data *ha = vha->hw;
4153 struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); 4167 struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev);
4154 struct req_que *req = ha->req_q_map[0]; 4168 struct req_que *req = ha->req_q_map[vha->req_ques[0]];
4155 struct rsp_que *rsp = ha->rsp_q_map[0]; 4169 struct rsp_que *rsp = req->rsp;
4156 4170
4157 if (!vha->vp_idx) 4171 if (!vha->vp_idx)
4158 return -EINVAL; 4172 return -EINVAL;
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
index 886323130fcc..f53179c46423 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -629,6 +629,7 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options,
629 req->ring_index = 0; 629 req->ring_index = 0;
630 req->cnt = req->length; 630 req->cnt = req->length;
631 req->id = que_id; 631 req->id = que_id;
632 req->max_q_depth = ha->req_q_map[0]->max_q_depth;
632 mutex_unlock(&ha->vport_lock); 633 mutex_unlock(&ha->vport_lock);
633 634
634 ret = qla25xx_init_req_que(base_vha, req, options); 635 ret = qla25xx_init_req_que(base_vha, req, options);
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 4a71f522f925..cf32653fe01a 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1158,8 +1158,8 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)
1158 struct req_que *req; 1158 struct req_que *req;
1159 1159
1160 spin_lock_irqsave(&ha->hardware_lock, flags); 1160 spin_lock_irqsave(&ha->hardware_lock, flags);
1161 for (que = 0; que < QLA_MAX_HOST_QUES; que++) { 1161 for (que = 0; que < ha->max_queues; que++) {
1162 req = ha->req_q_map[vha->req_ques[que]]; 1162 req = ha->req_q_map[que];
1163 if (!req) 1163 if (!req)
1164 continue; 1164 continue;
1165 for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { 1165 for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) {
@@ -1193,7 +1193,7 @@ qla2xxx_slave_configure(struct scsi_device *sdev)
1193 scsi_qla_host_t *vha = shost_priv(sdev->host); 1193 scsi_qla_host_t *vha = shost_priv(sdev->host);
1194 struct qla_hw_data *ha = vha->hw; 1194 struct qla_hw_data *ha = vha->hw;
1195 struct fc_rport *rport = starget_to_rport(sdev->sdev_target); 1195 struct fc_rport *rport = starget_to_rport(sdev->sdev_target);
1196 struct req_que *req = ha->req_q_map[0]; 1196 struct req_que *req = ha->req_q_map[vha->req_ques[0]];
1197 1197
1198 if (sdev->tagged_supported) 1198 if (sdev->tagged_supported)
1199 scsi_activate_tcq(sdev, req->max_q_depth); 1199 scsi_activate_tcq(sdev, req->max_q_depth);
@@ -1998,7 +1998,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1998 return 0; 1998 return 0;
1999 1999
2000probe_failed: 2000probe_failed:
2001 qla2x00_free_que(ha, req, rsp);
2002 qla2x00_free_device(base_vha); 2001 qla2x00_free_device(base_vha);
2003 2002
2004 scsi_host_put(base_vha->host); 2003 scsi_host_put(base_vha->host);
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 42e72a2c1f98..cbcd3f681b62 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -1095,7 +1095,8 @@ EXPORT_SYMBOL(__starget_for_each_device);
1095 * Description: Looks up the scsi_device with the specified @lun for a given 1095 * Description: Looks up the scsi_device with the specified @lun for a given
1096 * @starget. The returned scsi_device does not have an additional 1096 * @starget. The returned scsi_device does not have an additional
1097 * reference. You must hold the host's host_lock over this call and 1097 * reference. You must hold the host's host_lock over this call and
1098 * any access to the returned scsi_device. 1098 * any access to the returned scsi_device. A scsi_device in state
1099 * SDEV_DEL is skipped.
1099 * 1100 *
1100 * Note: The only reason why drivers should use this is because 1101 * Note: The only reason why drivers should use this is because
1101 * they need to access the device list in irq context. Otherwise you 1102 * they need to access the device list in irq context. Otherwise you
@@ -1107,6 +1108,8 @@ struct scsi_device *__scsi_device_lookup_by_target(struct scsi_target *starget,
1107 struct scsi_device *sdev; 1108 struct scsi_device *sdev;
1108 1109
1109 list_for_each_entry(sdev, &starget->devices, same_target_siblings) { 1110 list_for_each_entry(sdev, &starget->devices, same_target_siblings) {
1111 if (sdev->sdev_state == SDEV_DEL)
1112 continue;
1110 if (sdev->lun ==lun) 1113 if (sdev->lun ==lun)
1111 return sdev; 1114 return sdev;
1112 } 1115 }
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index 4969e4ec75ea..099b5455bbce 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -224,6 +224,7 @@ static struct {
224 {"SGI", "TP9100", "*", BLIST_REPORTLUN2}, 224 {"SGI", "TP9100", "*", BLIST_REPORTLUN2},
225 {"SGI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, 225 {"SGI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
226 {"IBM", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, 226 {"IBM", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
227 {"SUN", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
227 {"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN | BLIST_INQUIRY_36}, 228 {"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN | BLIST_INQUIRY_36},
228 {"SONY", "CD-ROM CDU-8001", NULL, BLIST_BORKEN}, 229 {"SONY", "CD-ROM CDU-8001", NULL, BLIST_BORKEN},
229 {"SONY", "TSL", NULL, BLIST_FORCELUN}, /* DDS3 & DDS4 autoloaders */ 230 {"SONY", "TSL", NULL, BLIST_FORCELUN}, /* DDS3 & DDS4 autoloaders */