Skip to content

Commit f76da4d

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "Two small(ish) fixes, both in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: fnic: Finish scsi_cmnd before dropping the spinlock scsi: mpt3sas: Page fault in reply q processing
2 parents 97e9c8e + 733ab7e commit f76da4d

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

drivers/scsi/fnic/fnic_scsi.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -986,8 +986,6 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic,
986986
CMD_SP(sc) = NULL;
987987
CMD_FLAGS(sc) |= FNIC_IO_DONE;
988988

989-
spin_unlock_irqrestore(io_lock, flags);
990-
991989
if (hdr_status != FCPIO_SUCCESS) {
992990
atomic64_inc(&fnic_stats->io_stats.io_failures);
993991
shost_printk(KERN_ERR, fnic->lport->host, "hdr status = %s\n",
@@ -996,8 +994,6 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic,
996994

997995
fnic_release_ioreq_buf(fnic, io_req, sc);
998996

999-
mempool_free(io_req, fnic->io_req_pool);
1000-
1001997
cmd_trace = ((u64)hdr_status << 56) |
1002998
(u64)icmnd_cmpl->scsi_status << 48 |
1003999
(u64)icmnd_cmpl->flags << 40 | (u64)sc->cmnd[0] << 32 |
@@ -1021,6 +1017,12 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic,
10211017
} else
10221018
fnic->lport->host_stats.fcp_control_requests++;
10231019

1020+
/* Call SCSI completion function to complete the IO */
1021+
scsi_done(sc);
1022+
spin_unlock_irqrestore(io_lock, flags);
1023+
1024+
mempool_free(io_req, fnic->io_req_pool);
1025+
10241026
atomic64_dec(&fnic_stats->io_stats.active_ios);
10251027
if (atomic64_read(&fnic->io_cmpl_skip))
10261028
atomic64_dec(&fnic->io_cmpl_skip);
@@ -1049,9 +1051,6 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic,
10491051
if(io_duration_time > atomic64_read(&fnic_stats->io_stats.current_max_io_time))
10501052
atomic64_set(&fnic_stats->io_stats.current_max_io_time, io_duration_time);
10511053
}
1052-
1053-
/* Call SCSI completion function to complete the IO */
1054-
scsi_done(sc);
10551054
}
10561055

10571056
/* fnic_fcpio_itmf_cmpl_handler

drivers/scsi/mpt3sas/mpt3sas_base.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,9 +2011,10 @@ mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc, u8 poll)
20112011
enable_irq(reply_q->os_irq);
20122012
}
20132013
}
2014+
2015+
if (poll)
2016+
_base_process_reply_queue(reply_q);
20142017
}
2015-
if (poll)
2016-
_base_process_reply_queue(reply_q);
20172018
}
20182019

20192020
/**

0 commit comments

Comments
 (0)