diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-03-15 18:24:44 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-03-15 18:24:44 -0400 |
commit | a7dee8f45fa2948b74d8e84ba24e435c87fd0acf (patch) | |
tree | 06ec1c93334f581e341cf74f5639ce645266fc14 | |
parent | 7ee7895c93d1d6cafad2f5d187f0a9369e91eaec (diff) | |
parent | 5ecee0a3ee8d74b6950cb41e8989b0c2174568d4 (diff) |
Merge branch 'fixes' into misc
-rw-r--r-- | drivers/md/dm.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 2 | ||||
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 1 | ||||
-rw-r--r-- | drivers/scsi/ipr.c | 5 | ||||
-rw-r--r-- | drivers/scsi/scsi_lib.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 3 | ||||
-rw-r--r-- | drivers/scsi/storvsc_drv.c | 5 |
8 files changed, 17 insertions, 4 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 5df40480228b..dd834927bc66 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -1191,6 +1191,8 @@ static void dm_unprep_request(struct request *rq) | |||
1191 | 1191 | ||
1192 | if (clone) | 1192 | if (clone) |
1193 | free_rq_clone(clone); | 1193 | free_rq_clone(clone); |
1194 | else if (!tio->md->queue->mq_ops) | ||
1195 | free_rq_tio(tio); | ||
1194 | } | 1196 | } |
1195 | 1197 | ||
1196 | /* | 1198 | /* |
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index b6639ea0bf18..f6e4d9718035 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -2232,6 +2232,7 @@ err_irq: | |||
2232 | dma_release_channel(host->tx_chan); | 2232 | dma_release_channel(host->tx_chan); |
2233 | if (host->rx_chan) | 2233 | if (host->rx_chan) |
2234 | dma_release_channel(host->rx_chan); | 2234 | dma_release_channel(host->rx_chan); |
2235 | pm_runtime_dont_use_autosuspend(host->dev); | ||
2235 | pm_runtime_put_sync(host->dev); | 2236 | pm_runtime_put_sync(host->dev); |
2236 | pm_runtime_disable(host->dev); | 2237 | pm_runtime_disable(host->dev); |
2237 | if (host->dbclk) | 2238 | if (host->dbclk) |
@@ -2253,6 +2254,7 @@ static int omap_hsmmc_remove(struct platform_device *pdev) | |||
2253 | dma_release_channel(host->tx_chan); | 2254 | dma_release_channel(host->tx_chan); |
2254 | dma_release_channel(host->rx_chan); | 2255 | dma_release_channel(host->rx_chan); |
2255 | 2256 | ||
2257 | pm_runtime_dont_use_autosuspend(host->dev); | ||
2256 | pm_runtime_put_sync(host->dev); | 2258 | pm_runtime_put_sync(host->dev); |
2257 | pm_runtime_disable(host->dev); | 2259 | pm_runtime_disable(host->dev); |
2258 | device_init_wakeup(&pdev->dev, false); | 2260 | device_init_wakeup(&pdev->dev, false); |
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index e89a0f8d2c6e..f05e7737107d 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
@@ -4493,6 +4493,7 @@ put_shost: | |||
4493 | scsi_host_put(phba->shost); | 4493 | scsi_host_put(phba->shost); |
4494 | free_kset: | 4494 | free_kset: |
4495 | iscsi_boot_destroy_kset(phba->boot_kset); | 4495 | iscsi_boot_destroy_kset(phba->boot_kset); |
4496 | phba->boot_kset = NULL; | ||
4496 | return -ENOMEM; | 4497 | return -ENOMEM; |
4497 | } | 4498 | } |
4498 | 4499 | ||
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 3b3e0998fa6e..d6a691e27d33 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -4002,6 +4002,7 @@ static ssize_t ipr_store_update_fw(struct device *dev, | |||
4002 | struct ipr_sglist *sglist; | 4002 | struct ipr_sglist *sglist; |
4003 | char fname[100]; | 4003 | char fname[100]; |
4004 | char *src; | 4004 | char *src; |
4005 | char *endline; | ||
4005 | int result, dnld_size; | 4006 | int result, dnld_size; |
4006 | 4007 | ||
4007 | if (!capable(CAP_SYS_ADMIN)) | 4008 | if (!capable(CAP_SYS_ADMIN)) |
@@ -4009,6 +4010,10 @@ static ssize_t ipr_store_update_fw(struct device *dev, | |||
4009 | 4010 | ||
4010 | snprintf(fname, sizeof(fname), "%s", buf); | 4011 | snprintf(fname, sizeof(fname), "%s", buf); |
4011 | 4012 | ||
4013 | endline = strchr(fname, '\n'); | ||
4014 | if (endline) | ||
4015 | *endline = '\0'; | ||
4016 | |||
4012 | if (request_firmware(&fw_entry, fname, &ioa_cfg->pdev->dev)) { | 4017 | if (request_firmware(&fw_entry, fname, &ioa_cfg->pdev->dev)) { |
4013 | dev_err(&ioa_cfg->pdev->dev, "Firmware file %s not found\n", fname); | 4018 | dev_err(&ioa_cfg->pdev->dev, "Firmware file %s not found\n", fname); |
4014 | return -EIO; | 4019 | return -EIO; |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index d46193a5e246..8106515d1df8 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -1344,6 +1344,7 @@ scsi_prep_return(struct request_queue *q, struct request *req, int ret) | |||
1344 | 1344 | ||
1345 | switch (ret) { | 1345 | switch (ret) { |
1346 | case BLKPREP_KILL: | 1346 | case BLKPREP_KILL: |
1347 | case BLKPREP_INVALID: | ||
1347 | req->errors = DID_NO_CONNECT << 16; | 1348 | req->errors = DID_NO_CONNECT << 16; |
1348 | /* release the command and kill it */ | 1349 | /* release the command and kill it */ |
1349 | if (req->special) { | 1350 | if (req->special) { |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index d749da765df1..5a5457ac9cdb 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -648,7 +648,7 @@ static void sd_config_discard(struct scsi_disk *sdkp, unsigned int mode) | |||
648 | */ | 648 | */ |
649 | if (sdkp->lbprz) { | 649 | if (sdkp->lbprz) { |
650 | q->limits.discard_alignment = 0; | 650 | q->limits.discard_alignment = 0; |
651 | q->limits.discard_granularity = 1; | 651 | q->limits.discard_granularity = logical_block_size; |
652 | } else { | 652 | } else { |
653 | q->limits.discard_alignment = sdkp->unmap_alignment * | 653 | q->limits.discard_alignment = sdkp->unmap_alignment * |
654 | logical_block_size; | 654 | logical_block_size; |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 5e820674432c..ae7d9bdf409c 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -652,7 +652,8 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos) | |||
652 | else | 652 | else |
653 | hp->dxfer_direction = (mxsize > 0) ? SG_DXFER_FROM_DEV : SG_DXFER_NONE; | 653 | hp->dxfer_direction = (mxsize > 0) ? SG_DXFER_FROM_DEV : SG_DXFER_NONE; |
654 | hp->dxfer_len = mxsize; | 654 | hp->dxfer_len = mxsize; |
655 | if (hp->dxfer_direction == SG_DXFER_TO_DEV) | 655 | if ((hp->dxfer_direction == SG_DXFER_TO_DEV) || |
656 | (hp->dxfer_direction == SG_DXFER_TO_FROM_DEV)) | ||
656 | hp->dxferp = (char __user *)buf + cmd_size; | 657 | hp->dxferp = (char __user *)buf + cmd_size; |
657 | else | 658 | else |
658 | hp->dxferp = NULL; | 659 | hp->dxferp = NULL; |
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 292c04eec9ad..3ddcabb790a8 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c | |||
@@ -914,8 +914,9 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, | |||
914 | do_work = true; | 914 | do_work = true; |
915 | process_err_fn = storvsc_remove_lun; | 915 | process_err_fn = storvsc_remove_lun; |
916 | break; | 916 | break; |
917 | case (SRB_STATUS_ABORTED | SRB_STATUS_AUTOSENSE_VALID): | 917 | case SRB_STATUS_ABORTED: |
918 | if ((asc == 0x2a) && (ascq == 0x9)) { | 918 | if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID && |
919 | (asc == 0x2a) && (ascq == 0x9)) { | ||
919 | do_work = true; | 920 | do_work = true; |
920 | process_err_fn = storvsc_device_scan; | 921 | process_err_fn = storvsc_device_scan; |
921 | /* | 922 | /* |