Re: [linux-pm] Re: [RFC] Implementation of SCSI dynamic power management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 8 Jan 2008, Pavel Machek wrote:

> > In fact suspend methods already do take an argument specifying the
> > reason they were called.  It wouldn't be hard to add a couple of extra 
> > PM_EVENT_* values for manual suspend and autosuspend.  The problem is 
> > that resume methods don't take a corresponding argument.
> 
> Well, you could store the value in struct device or something.
> 
> There's other problem: if autosuspend is != NULL, you know device
> supports autosuspend.
> 
> If you call existing suspend(PMSG_AUTOSUSPEND), and driver does not
> support it, it will crash and burn.

That's right.  The problem doesn't arise in SCSI because there only the
sd driver supports suspend at all -- and now it supports autosuspend as
well.  In USB I had to add an extra "supports_autosuspend" bitflag to
the usb_driver structure.

Alan Stern

-
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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux