Skip to content

Commit a7dee8f

Browse files
committed
Merge branch 'fixes' into misc
2 parents 7ee7895 + 5ecee0a commit a7dee8f

File tree

8 files changed

+17
-4
lines changed

8 files changed

+17
-4
lines changed

drivers/md/dm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,8 @@ static void dm_unprep_request(struct request *rq)
11911191

11921192
if (clone)
11931193
free_rq_clone(clone);
1194+
else if (!tio->md->queue->mq_ops)
1195+
free_rq_tio(tio);
11941196
}
11951197

11961198
/*

drivers/mmc/host/omap_hsmmc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2232,6 +2232,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
22322232
dma_release_channel(host->tx_chan);
22332233
if (host->rx_chan)
22342234
dma_release_channel(host->rx_chan);
2235+
pm_runtime_dont_use_autosuspend(host->dev);
22352236
pm_runtime_put_sync(host->dev);
22362237
pm_runtime_disable(host->dev);
22372238
if (host->dbclk)
@@ -2253,6 +2254,7 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
22532254
dma_release_channel(host->tx_chan);
22542255
dma_release_channel(host->rx_chan);
22552256

2257+
pm_runtime_dont_use_autosuspend(host->dev);
22562258
pm_runtime_put_sync(host->dev);
22572259
pm_runtime_disable(host->dev);
22582260
device_init_wakeup(&pdev->dev, false);

drivers/scsi/be2iscsi/be_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4493,6 +4493,7 @@ static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
44934493
scsi_host_put(phba->shost);
44944494
free_kset:
44954495
iscsi_boot_destroy_kset(phba->boot_kset);
4496+
phba->boot_kset = NULL;
44964497
return -ENOMEM;
44974498
}
44984499

drivers/scsi/ipr.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4002,13 +4002,18 @@ static ssize_t ipr_store_update_fw(struct device *dev,
40024002
struct ipr_sglist *sglist;
40034003
char fname[100];
40044004
char *src;
4005+
char *endline;
40054006
int result, dnld_size;
40064007

40074008
if (!capable(CAP_SYS_ADMIN))
40084009
return -EACCES;
40094010

40104011
snprintf(fname, sizeof(fname), "%s", buf);
40114012

4013+
endline = strchr(fname, '\n');
4014+
if (endline)
4015+
*endline = '\0';
4016+
40124017
if (request_firmware(&fw_entry, fname, &ioa_cfg->pdev->dev)) {
40134018
dev_err(&ioa_cfg->pdev->dev, "Firmware file %s not found\n", fname);
40144019
return -EIO;

drivers/scsi/scsi_lib.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,6 +1344,7 @@ scsi_prep_return(struct request_queue *q, struct request *req, int ret)
13441344

13451345
switch (ret) {
13461346
case BLKPREP_KILL:
1347+
case BLKPREP_INVALID:
13471348
req->errors = DID_NO_CONNECT << 16;
13481349
/* release the command and kill it */
13491350
if (req->special) {

drivers/scsi/sd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ static void sd_config_discard(struct scsi_disk *sdkp, unsigned int mode)
648648
*/
649649
if (sdkp->lbprz) {
650650
q->limits.discard_alignment = 0;
651-
q->limits.discard_granularity = 1;
651+
q->limits.discard_granularity = logical_block_size;
652652
} else {
653653
q->limits.discard_alignment = sdkp->unmap_alignment *
654654
logical_block_size;

drivers/scsi/sg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,8 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
652652
else
653653
hp->dxfer_direction = (mxsize > 0) ? SG_DXFER_FROM_DEV : SG_DXFER_NONE;
654654
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))
656657
hp->dxferp = (char __user *)buf + cmd_size;
657658
else
658659
hp->dxferp = NULL;

drivers/scsi/storvsc_drv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -914,8 +914,9 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,
914914
do_work = true;
915915
process_err_fn = storvsc_remove_lun;
916916
break;
917-
case (SRB_STATUS_ABORTED | SRB_STATUS_AUTOSENSE_VALID):
918-
if ((asc == 0x2a) && (ascq == 0x9)) {
917+
case SRB_STATUS_ABORTED:
918+
if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID &&
919+
(asc == 0x2a) && (ascq == 0x9)) {
919920
do_work = true;
920921
process_err_fn = storvsc_device_scan;
921922
/*

0 commit comments

Comments
 (0)