Message ID | 1466684325-12658-1-git-send-email-tim.gardner@canonical.com |
---|---|
State | New |
Headers | show |
The good folks at IBM pointed out that I missed a patch. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1592114/comments/5 Added 9526f36026f778e82b5175249443854c03b2e660 (cxlflash: Fix regression issue with re-ordering patch) rtg
On 24.06.2016 18:34, Tim Gardner wrote: > The good folks at IBM pointed out that I missed a patch. > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1592114/comments/5 A lot of change but since those good folks will be the first benefiting or suffering from it and its limited to a driver which we already carry a load of stuff. And its all cherry-picks. -Stefan > > Added 9526f36026f778e82b5175249443854c03b2e660 (cxlflash: Fix regression issue with re-ordering patch) > > rtg > >
On Fri, Jun 24, 2016 at 10:34:54AM -0600, Tim Gardner wrote: > The good folks at IBM pointed out that I missed a patch. > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1592114/comments/5 > > Added 9526f36026f778e82b5175249443854c03b2e660 (cxlflash: Fix regression issue with re-ordering patch) > > rtg > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team Would have been nice to see some indication of positive testing with an Ubuntu kernel and these patches.
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index 2766b10..087bc92 100644 --- a/drivers/scsi/cxlflash/main.c +++ b/drivers/scsi/cxlflash/main.c @@ -1863,6 +1863,19 @@ static int afu_reset(struct cxlflash_cfg *cfg) } /** + * drain_ioctls() - wait until all currently executing ioctls have completed + * @cfg: Internal structure associated with the host. + * + * Obtain write access to read/write semaphore that wraps ioctl + * handling to 'drain' ioctls currently executing. + */ +static void drain_ioctls(struct cxlflash_cfg *cfg) +{ + down_write(&cfg->ioctl_rwsem); + up_write(&cfg->ioctl_rwsem); +} + +/** * cxlflash_eh_device_reset_handler() - reset a single LUN * @scp: SCSI command to send. * @@ -1933,6 +1946,7 @@ static int cxlflash_eh_host_reset_handler(struct scsi_cmnd *scp) switch (cfg->state) { case STATE_NORMAL: cfg->state = STATE_RESET; + drain_ioctls(cfg); cxlflash_mark_contexts_error(cfg); rcr = afu_reset(cfg); if (rcr) { @@ -2451,19 +2465,6 @@ out_remove: } /** - * drain_ioctls() - wait until all currently executing ioctls have completed - * @cfg: Internal structure associated with the host. - * - * Obtain write access to read/write semaphore that wraps ioctl - * handling to 'drain' ioctls currently executing. - */ -static void drain_ioctls(struct cxlflash_cfg *cfg) -{ - down_write(&cfg->ioctl_rwsem); - up_write(&cfg->ioctl_rwsem); -} - -/** * cxlflash_pci_error_detected() - called when a PCI error is detected * @pdev: PCI device struct. * @state: PCI channel state.