mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-10 13:28:44 +00:00
SCSI fixes on 20170816
A couple of minor fixes (st, ses) and some bigger driver fixes for qla2xxx (crash triggered by fw dump) and ipr (lockdep problems with mq). Signed-off-by: James E.J. Bottomley <jejb@linux.vnet.ibm.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJZlMN9AAoJEAVr7HOZEZN4DwgP+wbHTOp4zTguEyV39urlBf5h qTshTNnT+W3ETvnPdva7WdHtNn3R1I2C4ePhMIs4jtJ82TooK4VXAO9QWncQwx71 0nz5Y7rlQEobqS/m5a7b/ma6S6JJUAKGHnqh/SNL5RvZkaQZzKNiW4HH1FAKZYx9 JF/QosBW5hgtJJnDCbXPr0/xB/6MGymbpv1AcB9i8bOLBx2PugwpJ9KRl5xviLZy Y9rJA7a7ls8AwrO7eXDyVOPNJ9ap4tjOUn0N6SjsLmDrneEdUaCbRmk6IotG9eUc yXwFrYxN4drtizXUBZ1ZD+/2bnGpbDDa28UBBq9tMQEdIpH1YwxMfXf2Whbx1DKq oDm0b4aBJXk4+AhBSvyjylNgW2itkc77K9yOnHiF4ye916VlcdGCzz4icMA86/HF bf+eXBu1EcR37z/hxbxbIG3TX9eKCzEV/exXZ3oy+UvOi36lx3MP/fb7yEaRtIM+ uwIKJbl0J+Nr5P7PIsyh0ciVsxxeZNabwwnwc642YuarfQc+P1PNhf2UUCZVKfwL RifDqn52RcM4rvzWbgnt5NKEr03ldZ42sN6t0Jf2j1hiH/VHa5/5dUcVhNL8Gsn+ SqfWjeFCBWkVJftSYtP7p+w/AhnHUeca9E9pGtv/8V+UizNnb+t8Y0jUuUQJu6yT tiZ4OaSijyy+O7xmITf2 =gE+M -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "A couple of minor fixes (st, ses) and some bigger driver fixes for qla2xxx (crash triggered by fw dump) and ipr (lockdep problems with mq)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ses: Fix wrong page error scsi: ipr: Fix scsi-mq lockdep issue scsi: st: fix blk_get_queue usage scsi: qla2xxx: Fix system crash while triggering FW dump
This commit is contained in:
commit
ac9a40905a
@ -3351,6 +3351,16 @@ static void ipr_worker_thread(struct work_struct *work)
|
||||
return;
|
||||
}
|
||||
|
||||
if (ioa_cfg->scsi_unblock) {
|
||||
ioa_cfg->scsi_unblock = 0;
|
||||
ioa_cfg->scsi_blocked = 0;
|
||||
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
|
||||
scsi_unblock_requests(ioa_cfg->host);
|
||||
spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
|
||||
if (ioa_cfg->scsi_blocked)
|
||||
scsi_block_requests(ioa_cfg->host);
|
||||
}
|
||||
|
||||
if (!ioa_cfg->scan_enabled) {
|
||||
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
|
||||
return;
|
||||
@ -7211,9 +7221,8 @@ static int ipr_ioa_bringdown_done(struct ipr_cmnd *ipr_cmd)
|
||||
ENTER;
|
||||
if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
|
||||
ipr_trace;
|
||||
spin_unlock_irq(ioa_cfg->host->host_lock);
|
||||
scsi_unblock_requests(ioa_cfg->host);
|
||||
spin_lock_irq(ioa_cfg->host->host_lock);
|
||||
ioa_cfg->scsi_unblock = 1;
|
||||
schedule_work(&ioa_cfg->work_q);
|
||||
}
|
||||
|
||||
ioa_cfg->in_reset_reload = 0;
|
||||
@ -7287,13 +7296,7 @@ static int ipr_ioa_reset_done(struct ipr_cmnd *ipr_cmd)
|
||||
list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
|
||||
wake_up_all(&ioa_cfg->reset_wait_q);
|
||||
|
||||
spin_unlock(ioa_cfg->host->host_lock);
|
||||
scsi_unblock_requests(ioa_cfg->host);
|
||||
spin_lock(ioa_cfg->host->host_lock);
|
||||
|
||||
if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].allow_cmds)
|
||||
scsi_block_requests(ioa_cfg->host);
|
||||
|
||||
ioa_cfg->scsi_unblock = 1;
|
||||
schedule_work(&ioa_cfg->work_q);
|
||||
LEAVE;
|
||||
return IPR_RC_JOB_RETURN;
|
||||
@ -9249,8 +9252,11 @@ static void _ipr_initiate_ioa_reset(struct ipr_ioa_cfg *ioa_cfg,
|
||||
spin_unlock(&ioa_cfg->hrrq[i]._lock);
|
||||
}
|
||||
wmb();
|
||||
if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa)
|
||||
if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
|
||||
ioa_cfg->scsi_unblock = 0;
|
||||
ioa_cfg->scsi_blocked = 1;
|
||||
scsi_block_requests(ioa_cfg->host);
|
||||
}
|
||||
|
||||
ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
|
||||
ioa_cfg->reset_cmd = ipr_cmd;
|
||||
@ -9306,9 +9312,8 @@ static void ipr_initiate_ioa_reset(struct ipr_ioa_cfg *ioa_cfg,
|
||||
wake_up_all(&ioa_cfg->reset_wait_q);
|
||||
|
||||
if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
|
||||
spin_unlock_irq(ioa_cfg->host->host_lock);
|
||||
scsi_unblock_requests(ioa_cfg->host);
|
||||
spin_lock_irq(ioa_cfg->host->host_lock);
|
||||
ioa_cfg->scsi_unblock = 1;
|
||||
schedule_work(&ioa_cfg->work_q);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
|
@ -1488,6 +1488,8 @@ struct ipr_ioa_cfg {
|
||||
u8 cfg_locked:1;
|
||||
u8 clear_isr:1;
|
||||
u8 probe_done:1;
|
||||
u8 scsi_unblock:1;
|
||||
u8 scsi_blocked:1;
|
||||
|
||||
u8 revid;
|
||||
|
||||
|
@ -401,9 +401,6 @@ qla27xx_fwdt_entry_t263(struct scsi_qla_host *vha,
|
||||
for (i = 0; i < vha->hw->max_req_queues; i++) {
|
||||
struct req_que *req = vha->hw->req_q_map[i];
|
||||
|
||||
if (!test_bit(i, vha->hw->req_qid_map))
|
||||
continue;
|
||||
|
||||
if (req || !buf) {
|
||||
length = req ?
|
||||
req->length : REQUEST_ENTRY_CNT_24XX;
|
||||
@ -418,9 +415,6 @@ qla27xx_fwdt_entry_t263(struct scsi_qla_host *vha,
|
||||
for (i = 0; i < vha->hw->max_rsp_queues; i++) {
|
||||
struct rsp_que *rsp = vha->hw->rsp_q_map[i];
|
||||
|
||||
if (!test_bit(i, vha->hw->rsp_qid_map))
|
||||
continue;
|
||||
|
||||
if (rsp || !buf) {
|
||||
length = rsp ?
|
||||
rsp->length : RESPONSE_ENTRY_CNT_MQ;
|
||||
@ -660,9 +654,6 @@ qla27xx_fwdt_entry_t274(struct scsi_qla_host *vha,
|
||||
for (i = 0; i < vha->hw->max_req_queues; i++) {
|
||||
struct req_que *req = vha->hw->req_q_map[i];
|
||||
|
||||
if (!test_bit(i, vha->hw->req_qid_map))
|
||||
continue;
|
||||
|
||||
if (req || !buf) {
|
||||
qla27xx_insert16(i, buf, len);
|
||||
qla27xx_insert16(1, buf, len);
|
||||
@ -675,9 +666,6 @@ qla27xx_fwdt_entry_t274(struct scsi_qla_host *vha,
|
||||
for (i = 0; i < vha->hw->max_rsp_queues; i++) {
|
||||
struct rsp_que *rsp = vha->hw->rsp_q_map[i];
|
||||
|
||||
if (!test_bit(i, vha->hw->rsp_qid_map))
|
||||
continue;
|
||||
|
||||
if (rsp || !buf) {
|
||||
qla27xx_insert16(i, buf, len);
|
||||
qla27xx_insert16(1, buf, len);
|
||||
|
@ -99,7 +99,7 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code,
|
||||
|
||||
ret = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, bufflen,
|
||||
NULL, SES_TIMEOUT, SES_RETRIES, NULL);
|
||||
if (unlikely(!ret))
|
||||
if (unlikely(ret))
|
||||
return ret;
|
||||
|
||||
recv_page_code = ((unsigned char *)buf)[0];
|
||||
|
@ -4299,11 +4299,11 @@ static int st_probe(struct device *dev)
|
||||
kref_init(&tpnt->kref);
|
||||
tpnt->disk = disk;
|
||||
disk->private_data = &tpnt->driver;
|
||||
disk->queue = SDp->request_queue;
|
||||
/* SCSI tape doesn't register this gendisk via add_disk(). Manually
|
||||
* take queue reference that release_disk() expects. */
|
||||
if (!blk_get_queue(disk->queue))
|
||||
if (!blk_get_queue(SDp->request_queue))
|
||||
goto out_put_disk;
|
||||
disk->queue = SDp->request_queue;
|
||||
tpnt->driver = &st_template;
|
||||
|
||||
tpnt->device = SDp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user