Re: [PATCH 10/12] libata-hp-prep: implement sata_phy_debounce()

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

 



Tejun Heo wrote:
Jeff Garzik wrote:
Tejun Heo wrote:
With hotplug, PHY always needs to be debounced before a reset as any
reset might find new devices.  Extract PHY waiting code from
sata_phy_resume() and extend it to include SStatus debouncing.  Note
that sata_phy_debounce() is superset of what used to be done inside
sata_phy_resume().

Three default debounce timing parameters are defined to be used by
hot/boot plug.  As resume failure during probing will be properly
handled as errors, timeout doesn't have to be long as before.
probeinit() uses the same timeout to retain the original behavior.

Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>

NAK, changes behavior. We want to preserve the old order of operations because some PHYs (sata_via and sata_mv come to mind) are a bit sensitive to being pounded immediately after wakeup.

The following is what the original sata_phy_resume() did

1. read SControl
2. write SControl (wake)
3. msleep(200)
4. read SStatus
5. if condition not met, goto #3

The new code does...

1. read SControl
2. write SControl (wake)
3. read SStatus
4. msleep(interval_msec)
5. read SStatus
6. if condition not met, goto #4

How about putting msleep(200) before calling sata_phy_debounce() from sata_phy_resume(). This will add msleep(200) between #2 and #3 and the only difference left would be the duration of interval_msec in #4 which is 5ms during boot, 25ms during EH. The wait is in the millisecs range and it's difficult to imagine the change would cause any problem.

As long as the delay following #2 remains, I'm happy...

	Jeff



-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux