Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull misc SCSI patches from James Bottomley:
"This is a short patch set representing a couple of left overs from the
merge window (debug removal and MAINTAINER changes).

Plus one merge window regression (the local workqueue for hpsa) and a
set of bug fixes for several issues (two for scsi-mq and the rest an
assortment of long standing stuff, all cc'd to stable)"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
sg: fix EWOULDBLOCK errors with scsi-mq
sg: fix unkillable I/O wait deadlock with scsi-mq
sg: fix read() error reporting
wd719x: add missing .module to wd719x_template
hpsa: correct compiler warnings introduced by hpsa-add-local-workqueue patch
fixed invalid assignment of 64bit mask to host dma_boundary for scatter gather segment boundary limit.
fcoe: Transition maintainership to Vasu
am53c974: remove left-over debugging code

+36 -18
+1 -1
MAINTAINERS
··· 3937 3937 F: drivers/staging/fbtft/ 3938 3938 3939 3939 FCOE SUBSYSTEM (libfc, libfcoe, fcoe) 3940 - M: Robert Love <robert.w.love@intel.com> 3940 + M: Vasu Dev <vasu.dev@intel.com> 3941 3941 L: fcoe-devel@open-fcoe.org 3942 3942 W: www.Open-FCoE.org 3943 3943 S: Supported
-6
drivers/scsi/am53c974.c
··· 178 178 break; 179 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 183 * When there is a residual BCMPLT will never be set
-1
drivers/scsi/be2iscsi/be_main.c
··· 585 585 "beiscsi_hba_alloc - iscsi_host_alloc failed\n"); 586 586 return NULL; 587 587 } 588 - shost->dma_boundary = pcidev->dma_mask; 589 588 shost->max_id = BE2_MAX_SESSIONS; 590 589 shost->max_channel = 0; 591 590 shost->max_cmd_len = BEISCSI_MAX_CMD_LEN;
+1 -3
drivers/scsi/hpsa.c
··· 6831 6831 char *name) 6832 6832 { 6833 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); 6837 - wq = alloc_ordered_workqueue(wq_name, 0); 6835 + wq = alloc_ordered_workqueue("%s_%d_hpsa", 0, name, h->ctlr); 6838 6836 if (!wq) 6839 6837 dev_err(&h->pdev->dev, "failed to create %s workqueue\n", name); 6840 6838
+33 -7
drivers/scsi/sg.c
··· 546 546 sg_new_read(Sg_fd * sfp, char __user *buf, size_t count, Sg_request * srp) 547 547 { 548 548 sg_io_hdr_t *hp = &srp->header; 549 - int err = 0; 549 + int err = 0, err2; 550 550 int len; 551 551 552 552 if (count < SZ_SG_IO_HDR) { ··· 575 575 goto err_out; 576 576 } 577 577 err_out: 578 - err = sg_finish_rem_req(srp); 579 - return (0 == err) ? count : err; 578 + err2 = sg_finish_rem_req(srp); 579 + return err ? : err2 ? : count; 580 580 } 581 581 582 582 static ssize_t ··· 1335 1335 } 1336 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 1349 write_lock_irqsave(&sfp->rq_list_lock, iflags); 1339 1350 if (unlikely(srp->orphan)) { 1340 1351 if (sfp->keep_orphan) ··· 1680 1669 return -ENOMEM; 1681 1670 } 1682 1671 1683 - rq = blk_get_request(q, rw, GFP_ATOMIC); 1672 + /* 1673 + * NOTE 1674 + * 1675 + * With scsi-mq enabled, there are a fixed number of preallocated 1676 + * requests equal in number to shost->can_queue. If all of the 1677 + * preallocated requests are already in use, then using GFP_ATOMIC with 1678 + * blk_get_request() will return -EWOULDBLOCK, whereas using GFP_KERNEL 1679 + * will cause blk_get_request() to sleep until an active command 1680 + * completes, freeing up a request. Neither option is ideal, but 1681 + * GFP_KERNEL is the better choice to prevent userspace from getting an 1682 + * unexpected EWOULDBLOCK. 1683 + * 1684 + * With scsi-mq disabled, blk_get_request() with GFP_KERNEL usually 1685 + * does not sleep except under memory pressure. 1686 + */ 1687 + rq = blk_get_request(q, rw, GFP_KERNEL); 1684 1688 if (IS_ERR(rq)) { 1685 1689 kfree(long_cmdp); 1686 1690 return PTR_ERR(rq); ··· 1785 1759 SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp, 1786 1760 "sg_finish_rem_req: res_used=%d\n", 1787 1761 (int) srp->res_used)); 1788 - if (srp->rq) { 1789 - if (srp->bio) 1790 - ret = blk_rq_unmap_user(srp->bio); 1762 + if (srp->bio) 1763 + ret = blk_rq_unmap_user(srp->bio); 1791 1764 1765 + if (srp->rq) { 1792 1766 if (srp->rq->cmd != srp->rq->__cmd) 1793 1767 kfree(srp->rq->cmd); 1794 1768 blk_put_request(srp->rq);
+1
drivers/scsi/wd719x.c
··· 870 870 } 871 871 872 872 static struct scsi_host_template wd719x_template = { 873 + .module = THIS_MODULE, 873 874 .name = "Western Digital 719x", 874 875 .queuecommand = wd719x_queuecommand, 875 876 .eh_abort_handler = wd719x_abort,