diff options
author | David S. Miller <davem@davemloft.net> | 2015-03-03 21:16:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-03 21:16:48 -0500 |
commit | 71a83a6db6138b9d41d8a0b6b91cb59f6dc4742c (patch) | |
tree | f74b6e4e48257ec6ce40b95645ecb8533b9cc1f8 /drivers/scsi | |
parent | b97526f3ff95f92b107f0fb52cbb8627e395429b (diff) | |
parent | a6c5170d1edea97c538c81e377e56c7b5c5b7e63 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/rocker/rocker.c
The rocker commit was two overlapping changes, one to rename
the ->vport member to ->pport, and another making the bitmask
expression use '1ULL' instead of plain '1'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/am53c974.c | 6 | ||||
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 1 | ||||
-rw-r--r-- | drivers/scsi/hpsa.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.c | 4 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 40 | ||||
-rw-r--r-- | drivers/scsi/virtio_scsi.c | 6 | ||||
-rw-r--r-- | drivers/scsi/wd719x.c | 1 |
7 files changed, 42 insertions, 20 deletions
diff --git a/drivers/scsi/am53c974.c b/drivers/scsi/am53c974.c index aa3e2c7cd83c..a6f5ee80fadc 100644 --- a/drivers/scsi/am53c974.c +++ b/drivers/scsi/am53c974.c | |||
@@ -178,12 +178,6 @@ static void pci_esp_dma_drain(struct esp *esp) | |||
178 | break; | 178 | break; |
179 | cpu_relax(); | 179 | cpu_relax(); |
180 | } | 180 | } |
181 | if (resid > 1) { | ||
182 | /* FIFO not cleared */ | ||
183 | shost_printk(KERN_INFO, esp->host, | ||
184 | "FIFO not cleared, %d bytes left\n", | ||
185 | resid); | ||
186 | } | ||
187 | 181 | ||
188 | /* | 182 | /* |
189 | * When there is a residual BCMPLT will never be set | 183 | * When there is a residual BCMPLT will never be set |
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 96241b20fd2c..a7cc61837818 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
@@ -585,7 +585,6 @@ static struct beiscsi_hba *beiscsi_hba_alloc(struct pci_dev *pcidev) | |||
585 | "beiscsi_hba_alloc - iscsi_host_alloc failed\n"); | 585 | "beiscsi_hba_alloc - iscsi_host_alloc failed\n"); |
586 | return NULL; | 586 | return NULL; |
587 | } | 587 | } |
588 | shost->dma_boundary = pcidev->dma_mask; | ||
589 | shost->max_id = BE2_MAX_SESSIONS; | 588 | shost->max_id = BE2_MAX_SESSIONS; |
590 | shost->max_channel = 0; | 589 | shost->max_channel = 0; |
591 | shost->max_cmd_len = BEISCSI_MAX_CMD_LEN; | 590 | shost->max_cmd_len = BEISCSI_MAX_CMD_LEN; |
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 95d581c45413..a1cfbd3dda47 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -6831,10 +6831,8 @@ static struct workqueue_struct *hpsa_create_controller_wq(struct ctlr_info *h, | |||
6831 | char *name) | 6831 | char *name) |
6832 | { | 6832 | { |
6833 | struct workqueue_struct *wq = NULL; | 6833 | struct workqueue_struct *wq = NULL; |
6834 | char wq_name[20]; | ||
6835 | 6834 | ||
6836 | snprintf(wq_name, sizeof(wq_name), "%s_%d_hpsa", name, h->ctlr); | 6835 | wq = alloc_ordered_workqueue("%s_%d_hpsa", 0, name, h->ctlr); |
6837 | wq = alloc_ordered_workqueue(wq_name, 0); | ||
6838 | if (!wq) | 6836 | if (!wq) |
6839 | dev_err(&h->pdev->dev, "failed to create %s workqueue\n", name); | 6837 | dev_err(&h->pdev->dev, "failed to create %s workqueue\n", name); |
6840 | 6838 | ||
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 73f9feecda72..99f43b7fc9ab 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c | |||
@@ -1570,9 +1570,7 @@ static int tcm_qla2xxx_check_initiator_node_acl( | |||
1570 | * match the format by tcm_qla2xxx explict ConfigFS NodeACLs. | 1570 | * match the format by tcm_qla2xxx explict ConfigFS NodeACLs. |
1571 | */ | 1571 | */ |
1572 | memset(&port_name, 0, 36); | 1572 | memset(&port_name, 0, 36); |
1573 | snprintf(port_name, 36, "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", | 1573 | snprintf(port_name, sizeof(port_name), "%8phC", fc_wwpn); |
1574 | fc_wwpn[0], fc_wwpn[1], fc_wwpn[2], fc_wwpn[3], fc_wwpn[4], | ||
1575 | fc_wwpn[5], fc_wwpn[6], fc_wwpn[7]); | ||
1576 | /* | 1574 | /* |
1577 | * Locate our struct se_node_acl either from an explict NodeACL created | 1575 | * Locate our struct se_node_acl either from an explict NodeACL created |
1578 | * via ConfigFS, or via running in TPG demo mode. | 1576 | * via ConfigFS, or via running in TPG demo mode. |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 0cbc1fb45f10..2270bd51f9c2 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -546,7 +546,7 @@ static ssize_t | |||
546 | sg_new_read(Sg_fd * sfp, char __user *buf, size_t count, Sg_request * srp) | 546 | sg_new_read(Sg_fd * sfp, char __user *buf, size_t count, Sg_request * srp) |
547 | { | 547 | { |
548 | sg_io_hdr_t *hp = &srp->header; | 548 | sg_io_hdr_t *hp = &srp->header; |
549 | int err = 0; | 549 | int err = 0, err2; |
550 | int len; | 550 | int len; |
551 | 551 | ||
552 | if (count < SZ_SG_IO_HDR) { | 552 | if (count < SZ_SG_IO_HDR) { |
@@ -575,8 +575,8 @@ sg_new_read(Sg_fd * sfp, char __user *buf, size_t count, Sg_request * srp) | |||
575 | goto err_out; | 575 | goto err_out; |
576 | } | 576 | } |
577 | err_out: | 577 | err_out: |
578 | err = sg_finish_rem_req(srp); | 578 | err2 = sg_finish_rem_req(srp); |
579 | return (0 == err) ? count : err; | 579 | return err ? : err2 ? : count; |
580 | } | 580 | } |
581 | 581 | ||
582 | static ssize_t | 582 | static ssize_t |
@@ -1335,6 +1335,17 @@ sg_rq_end_io(struct request *rq, int uptodate) | |||
1335 | } | 1335 | } |
1336 | /* Rely on write phase to clean out srp status values, so no "else" */ | 1336 | /* Rely on write phase to clean out srp status values, so no "else" */ |
1337 | 1337 | ||
1338 | /* | ||
1339 | * Free the request as soon as it is complete so that its resources | ||
1340 | * can be reused without waiting for userspace to read() the | ||
1341 | * result. But keep the associated bio (if any) around until | ||
1342 | * blk_rq_unmap_user() can be called from user context. | ||
1343 | */ | ||
1344 | srp->rq = NULL; | ||
1345 | if (rq->cmd != rq->__cmd) | ||
1346 | kfree(rq->cmd); | ||
1347 | __blk_put_request(rq->q, rq); | ||
1348 | |||
1338 | write_lock_irqsave(&sfp->rq_list_lock, iflags); | 1349 | write_lock_irqsave(&sfp->rq_list_lock, iflags); |
1339 | if (unlikely(srp->orphan)) { | 1350 | if (unlikely(srp->orphan)) { |
1340 | if (sfp->keep_orphan) | 1351 | if (sfp->keep_orphan) |
@@ -1669,7 +1680,22 @@ sg_start_req(Sg_request *srp, unsigned char *cmd) | |||
1669 | return -ENOMEM; | 1680 | return -ENOMEM; |
1670 | } | 1681 | } |
1671 | 1682 | ||
1672 | rq = blk_get_request(q, rw, GFP_ATOMIC); | 1683 | /* |
1684 | * NOTE | ||
1685 | * | ||
1686 | * With scsi-mq enabled, there are a fixed number of preallocated | ||
1687 | * requests equal in number to shost->can_queue. If all of the | ||
1688 | * preallocated requests are already in use, then using GFP_ATOMIC with | ||
1689 | * blk_get_request() will return -EWOULDBLOCK, whereas using GFP_KERNEL | ||
1690 | * will cause blk_get_request() to sleep until an active command | ||
1691 | * completes, freeing up a request. Neither option is ideal, but | ||
1692 | * GFP_KERNEL is the better choice to prevent userspace from getting an | ||
1693 | * unexpected EWOULDBLOCK. | ||
1694 | * | ||
1695 | * With scsi-mq disabled, blk_get_request() with GFP_KERNEL usually | ||
1696 | * does not sleep except under memory pressure. | ||
1697 | */ | ||
1698 | rq = blk_get_request(q, rw, GFP_KERNEL); | ||
1673 | if (IS_ERR(rq)) { | 1699 | if (IS_ERR(rq)) { |
1674 | kfree(long_cmdp); | 1700 | kfree(long_cmdp); |
1675 | return PTR_ERR(rq); | 1701 | return PTR_ERR(rq); |
@@ -1759,10 +1785,10 @@ sg_finish_rem_req(Sg_request *srp) | |||
1759 | SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp, | 1785 | SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp, |
1760 | "sg_finish_rem_req: res_used=%d\n", | 1786 | "sg_finish_rem_req: res_used=%d\n", |
1761 | (int) srp->res_used)); | 1787 | (int) srp->res_used)); |
1762 | if (srp->rq) { | 1788 | if (srp->bio) |
1763 | if (srp->bio) | 1789 | ret = blk_rq_unmap_user(srp->bio); |
1764 | ret = blk_rq_unmap_user(srp->bio); | ||
1765 | 1790 | ||
1791 | if (srp->rq) { | ||
1766 | if (srp->rq->cmd != srp->rq->__cmd) | 1792 | if (srp->rq->cmd != srp->rq->__cmd) |
1767 | kfree(srp->rq->cmd); | 1793 | kfree(srp->rq->cmd); |
1768 | blk_put_request(srp->rq); | 1794 | blk_put_request(srp->rq); |
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index c52bb5dfaedb..f164f24a4a55 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c | |||
@@ -950,6 +950,12 @@ static int virtscsi_probe(struct virtio_device *vdev) | |||
950 | u32 num_queues; | 950 | u32 num_queues; |
951 | struct scsi_host_template *hostt; | 951 | struct scsi_host_template *hostt; |
952 | 952 | ||
953 | if (!vdev->config->get) { | ||
954 | dev_err(&vdev->dev, "%s failure: config access disabled\n", | ||
955 | __func__); | ||
956 | return -EINVAL; | ||
957 | } | ||
958 | |||
953 | /* We need to know how many queues before we allocate. */ | 959 | /* We need to know how many queues before we allocate. */ |
954 | num_queues = virtscsi_config_get(vdev, num_queues) ? : 1; | 960 | num_queues = virtscsi_config_get(vdev, num_queues) ? : 1; |
955 | 961 | ||
diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c index 7702664d7ed3..289ad016d925 100644 --- a/drivers/scsi/wd719x.c +++ b/drivers/scsi/wd719x.c | |||
@@ -870,6 +870,7 @@ fail_free_params: | |||
870 | } | 870 | } |
871 | 871 | ||
872 | static struct scsi_host_template wd719x_template = { | 872 | static struct scsi_host_template wd719x_template = { |
873 | .module = THIS_MODULE, | ||
873 | .name = "Western Digital 719x", | 874 | .name = "Western Digital 719x", |
874 | .queuecommand = wd719x_queuecommand, | 875 | .queuecommand = wd719x_queuecommand, |
875 | .eh_abort_handler = wd719x_abort, | 876 | .eh_abort_handler = wd719x_abort, |