Messages in this thread | | | Date | Thu, 10 Nov 2011 10:40:21 -0500 (EST) | From | Alan Stern <> | Subject | Re: [PATCH v2 4/4] ata: add ata port runtime PM callbacks |
| |
On Thu, 10 Nov 2011, Lin Ming wrote:
> Add ata port runtime suspend/resume/idle callbacks. > Set ->eh_noresume to skip the runtime PM calls on scsi host > in the error handler to avoid dead lock.
...
> --- a/drivers/ata/libata-scsi.c > +++ b/drivers/ata/libata-scsi.c > @@ -3377,6 +3377,7 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht) > if (!shost) > goto err_alloc; > > + shost->eh_noresume = 1; > *(struct ata_port **)&shost->hostdata[0] = ap; > ap->scsi_host = shost;
Are you really sure you want to keep this flag set throughout the lifetime of the port?
What happens if a command fails, then the port suspends, and then the error handler is invoked to take care of the failed command?
Alan Stern
| |