lkml.org 
[lkml]   [2011]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2011-11-10 16:43    [W:0.097 / U:1.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site