> On Sep 24, 2015, at 8:23 PM, Brian King <brking@xxxxxxxxxxxxxxxxxx> wrote: > On 09/24/2015 02:38 PM, Matthew R. Ochs wrote: >> diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c >> index 3e3ccf1..6e85c77 100644 >> --- a/drivers/scsi/cxlflash/main.c >> +++ b/drivers/scsi/cxlflash/main.c >> @@ -2383,16 +2397,14 @@ static pci_ers_result_t cxlflash_pci_error_detected(struct pci_dev *pdev, >> switch (state) { >> case pci_channel_io_frozen: >> cfg->state = STATE_LIMBO; >> - >> - /* Turn off legacy I/O */ >> scsi_block_requests(cfg->host); >> + drain_ioctls(cfg); > > I don't see this addressing the deadlock with an outstanding read_cap16 during EEH I identified > in the previous review. Am I missing something here? I'll submit this in a separate patch in v4. >> /** >> + * check_state() - checks and responds to the current adapter state >> + * @cfg: Internal structure associated with the host. >> + * @ioctl: Indicates if on an ioctl thread. >> + * >> + * This routine can block and should only be used on process context. >> + * When blocking on an ioctl thread, the ioctl read semaphore should be >> + * let up to allow for draining actively running ioctls. Also note that >> + * when waking up from waiting in reset, the state is unknown and must >> + * be checked again before proceeding. >> + * >> + * Return: 0 on success, -errno on failure >> + */ >> +static int check_state(struct cxlflash_cfg *cfg, bool ioctl) > > Looks like you missed this cleanup. The second parameter is not needed, since all > the callers set it to true. Yep, this was my mistake. I'll correct in a v4 as the change will ripple to the next patch in the series. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html