ahci_start_engine(ap);
- *class = ATA_DEV_NONE;
if (online)
*class = ahci_dev_classify(ap);
/* vt8251 doesn't clear BSY on signature FIS reception,
* request follow-up softreset.
*/
- *class = ATA_DEV_NONE;
return online ? -EAGAIN : rc;
}
if (rc)
ahci_kick_engine(ap, 0);
}
- *class = ATA_DEV_NONE;
return rc;
}
/* do hardreset */
rc = sata_link_hardreset(link, timing, deadline, &online, NULL);
- *class = ATA_DEV_NONE;
return online ? -EAGAIN : rc;
}
if (rc)
return rc;
- /* If any class isn't ATA_DEV_UNKNOWN, consider classification
- * is complete and convert all ATA_DEV_UNKNOWN to
- * ATA_DEV_NONE.
- */
+ /* convert all ATA_DEV_UNKNOWN to ATA_DEV_NONE */
ata_link_for_each_dev(dev, link)
- if (classes[dev->devno] != ATA_DEV_UNKNOWN)
- break;
-
- if (dev) {
- ata_link_for_each_dev(dev, link) {
- if (classes[dev->devno] == ATA_DEV_UNKNOWN)
- classes[dev->devno] = ATA_DEV_NONE;
- }
- }
+ if (classes[dev->devno] == ATA_DEV_UNKNOWN)
+ classes[dev->devno] = ATA_DEV_NONE;
return 0;
}
{
if (link->flags & ATA_LFLAG_NO_SRST)
return 0;
- if (rc == -EAGAIN)
- return 1;
+ if (rc == -EAGAIN) {
+ if (classify)
+ return 1;
+ rc = 0;
+ }
if (rc != 0)
return 0;
if ((link->ap->flags & ATA_FLAG_PMP) && ata_is_host_link(link))
return 1;
- if (classify && !(link->flags & ATA_LFLAG_ASSUME_CLASS) &&
- classes[0] == ATA_DEV_UNKNOWN)
- return 1;
return 0;
}
rc = sata_link_hardreset(link, timing, deadline, &online,
ata_sff_check_ready);
- *class = ATA_DEV_NONE;
if (online)
*class = ata_sff_dev_classify(link->device, 1, NULL);