On 01/08/2014 10:19 AM, Phillip Susi wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 01/07/2014 09:11 PM, Aaron Lu wrote: >> I thought that feature is used to control if a disk should be spun >> up once powered from the host side. > > That *is* what it sounds like, only ATA disks either spin up as soon > as power is applied, or wait for an actual command issued by higher > layers. There doesn't seem to be any low level SATA mechanism to spin > the drive up that the SSS feature could toggle, so it seems to simply > be a hint to libata, and possibly the bios. I think the host controller can decide not to power all its ports, only when a specific reg in the port's memory range is set, it will give power to that port and thus spin up the drive. Makes sense? > >> Too bad for a jumper, that's beyond our control. And about the >> hdparm, does the setting survive a power cycle? > > Yes, otherwise there wouldn't be much point to a setting that only > matters at power on ;) Oh, of course, my stupid :-) Then I suddenly think my patches can kind of work - let's say we have done the hdparm setting thing before suspend and the disk will be spun up in standby mode next time it is powered. Then during system resume phase, remove the pm_request_resume call in both SCSI and ATA's system resume callback, - if the disk is powered, it will be in standby mode and its runtime status is RPM_SUSPENDED, match its real status(sort of); - if the disk is not powered due to some host feature or whatever, it will be in unpowered mode and its runtime status is RPM_SUSPENDED, still match its real status. -- 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