Commit af4c0be5 authored by Jeff Garzik's avatar Jeff Garzik

[libata] only reset if ATA_FLAG_SATA_RESET is present

parent dc84a4e4
...@@ -1058,10 +1058,12 @@ void sata_phy_reset(struct ata_port *ap) ...@@ -1058,10 +1058,12 @@ void sata_phy_reset(struct ata_port *ap)
u32 sstatus; u32 sstatus;
unsigned long timeout = jiffies + (HZ * 5); unsigned long timeout = jiffies + (HZ * 5);
scr_write(ap, SCR_CONTROL, 0x301); /* issue phy wake/reset */ if (ap->flags & ATA_FLAG_SATA_RESET) {
scr_read(ap, SCR_CONTROL); /* dummy read; flush */ scr_write(ap, SCR_CONTROL, 0x301); /* issue phy wake/reset */
udelay(400); /* FIXME: a guess */ scr_read(ap, SCR_STATUS); /* dummy read; flush */
scr_write(ap, SCR_CONTROL, 0x300); /* issue phy wake/reset */ udelay(400); /* FIXME: a guess */
}
scr_write(ap, SCR_CONTROL, 0x300); /* issue phy wake/clear reset */
/* wait for phy to become ready, if necessary */ /* wait for phy to become ready, if necessary */
do { do {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment