Commit 6bff9bb8 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Five small fixes.  Four in drivers:

   - hisi_sas: fix internal queue timeout

   - be2iscsi: revert a prior fix causing problems

   - bnx2i: add missing dependency

   - storvsc: late arriving revert of a problem fix

  and one in the core.

  The core one is a minor change to stop paying attention to the busy
  count when returning out of resources because there's a race window
  where the queue might not restart due to missing returning I/O"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  Revert "scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback()"
  scsi: hisi_sas: Select a suitable queue for internal I/Os
  scsi: core: Fix race between handling STS_RESOURCE and completion
  scsi: be2iscsi: Revert "Fix a theoretical leak in beiscsi_create_eqs()"
  scsi: bnx2i: Requires MMU
parents 5ee595d9 4da3a54f
...@@ -3020,7 +3020,6 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba, ...@@ -3020,7 +3020,6 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
goto create_eq_error; goto create_eq_error;
} }
mem->dma = paddr;
mem->va = eq_vaddress; mem->va = eq_vaddress;
ret = be_fill_queue(eq, phba->params.num_eq_entries, ret = be_fill_queue(eq, phba->params.num_eq_entries,
sizeof(struct be_eq_entry), eq_vaddress); sizeof(struct be_eq_entry), eq_vaddress);
...@@ -3030,6 +3029,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba, ...@@ -3030,6 +3029,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
goto create_eq_error; goto create_eq_error;
} }
mem->dma = paddr;
ret = beiscsi_cmd_eq_create(&phba->ctrl, eq, ret = beiscsi_cmd_eq_create(&phba->ctrl, eq,
BEISCSI_EQ_DELAY_DEF); BEISCSI_EQ_DELAY_DEF);
if (ret) { if (ret) {
...@@ -3086,7 +3086,6 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba, ...@@ -3086,7 +3086,6 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
goto create_cq_error; goto create_cq_error;
} }
mem->dma = paddr;
ret = be_fill_queue(cq, phba->params.num_cq_entries, ret = be_fill_queue(cq, phba->params.num_cq_entries,
sizeof(struct sol_cqe), cq_vaddress); sizeof(struct sol_cqe), cq_vaddress);
if (ret) { if (ret) {
...@@ -3096,6 +3095,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba, ...@@ -3096,6 +3095,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
goto create_cq_error; goto create_cq_error;
} }
mem->dma = paddr;
ret = beiscsi_cmd_cq_create(&phba->ctrl, cq, eq, false, ret = beiscsi_cmd_cq_create(&phba->ctrl, cq, eq, false,
false, 0); false, 0);
if (ret) { if (ret) {
......
...@@ -4,6 +4,7 @@ config SCSI_BNX2_ISCSI ...@@ -4,6 +4,7 @@ config SCSI_BNX2_ISCSI
depends on NET depends on NET
depends on PCI depends on PCI
depends on (IPV6 || IPV6=n) depends on (IPV6 || IPV6=n)
depends on MMU
select SCSI_ISCSI_ATTRS select SCSI_ISCSI_ATTRS
select NETDEVICES select NETDEVICES
select ETHERNET select ETHERNET
......
...@@ -452,6 +452,12 @@ static int hisi_sas_task_prep(struct sas_task *task, ...@@ -452,6 +452,12 @@ static int hisi_sas_task_prep(struct sas_task *task,
blk_tag = blk_mq_unique_tag(scmd->request); blk_tag = blk_mq_unique_tag(scmd->request);
dq_index = blk_mq_unique_tag_to_hwq(blk_tag); dq_index = blk_mq_unique_tag_to_hwq(blk_tag);
*dq_pointer = dq = &hisi_hba->dq[dq_index]; *dq_pointer = dq = &hisi_hba->dq[dq_index];
} else if (hisi_hba->shost->nr_hw_queues) {
struct Scsi_Host *shost = hisi_hba->shost;
struct blk_mq_queue_map *qmap = &shost->tag_set.map[HCTX_TYPE_DEFAULT];
int queue = qmap->mq_map[raw_smp_processor_id()];
*dq_pointer = dq = &hisi_hba->dq[queue];
} else { } else {
*dq_pointer = dq = sas_dev->dq; *dq_pointer = dq = sas_dev->dq;
} }
......
...@@ -2452,6 +2452,11 @@ static int interrupt_init_v3_hw(struct hisi_hba *hisi_hba) ...@@ -2452,6 +2452,11 @@ static int interrupt_init_v3_hw(struct hisi_hba *hisi_hba)
rc = -ENOENT; rc = -ENOENT;
goto free_irq_vectors; goto free_irq_vectors;
} }
cq->irq_mask = pci_irq_get_affinity(pdev, i + BASE_VECTORS_V3_HW);
if (!cq->irq_mask) {
dev_err(dev, "could not get cq%d irq affinity!\n", i);
return -ENOENT;
}
} }
return 0; return 0;
......
...@@ -1703,8 +1703,7 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx, ...@@ -1703,8 +1703,7 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
break; break;
case BLK_STS_RESOURCE: case BLK_STS_RESOURCE:
case BLK_STS_ZONE_RESOURCE: case BLK_STS_ZONE_RESOURCE:
if (atomic_read(&sdev->device_busy) || if (scsi_device_blocked(sdev))
scsi_device_blocked(sdev))
ret = BLK_STS_DEV_RESOURCE; ret = BLK_STS_DEV_RESOURCE;
break; break;
default: default:
......
...@@ -1246,11 +1246,6 @@ static void storvsc_on_channel_callback(void *context) ...@@ -1246,11 +1246,6 @@ static void storvsc_on_channel_callback(void *context)
request = (struct storvsc_cmd_request *) request = (struct storvsc_cmd_request *)
((unsigned long)desc->trans_id); ((unsigned long)desc->trans_id);
if (hv_pkt_datalen(desc) < sizeof(struct vstor_packet) - vmscsi_size_delta) {
dev_err(&device->device, "Invalid packet len\n");
continue;
}
if (request == &stor_device->init_request || if (request == &stor_device->init_request ||
request == &stor_device->reset_request) { request == &stor_device->reset_request) {
memcpy(&request->vstor_packet, packet, memcpy(&request->vstor_packet, packet,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment