}
int ata_do_reset(struct ata_port *ap, ata_reset_fn_t reset,
- ata_postreset_fn_t postreset, unsigned int *classes)
+ unsigned int *classes)
{
int i, rc;
if (classes[i] == ATA_DEV_UNKNOWN)
classes[i] = ATA_DEV_NONE;
- if (postreset)
- postreset(ap, classes);
-
return 0;
}
probeinit(ap);
if (softreset && !sata_set_spd_needed(ap)) {
- rc = ata_do_reset(ap, softreset, postreset, classes);
+ rc = ata_do_reset(ap, softreset, classes);
if (rc == 0 && classes[0] != ATA_DEV_UNKNOWN)
goto done;
printk(KERN_INFO "ata%u: softreset failed, will try "
goto done;
while (1) {
- rc = ata_do_reset(ap, hardreset, postreset, classes);
+ rc = ata_do_reset(ap, hardreset, classes);
if (rc == 0) {
if (classes[0] != ATA_DEV_UNKNOWN)
goto done;
ap->id);
ssleep(5);
- rc = ata_do_reset(ap, softreset, postreset, classes);
+ rc = ata_do_reset(ap, softreset, classes);
}
done:
- if (rc == 0 && classes[0] == ATA_DEV_UNKNOWN)
- rc = -ENODEV;
+ if (rc == 0) {
+ if (postreset)
+ postreset(ap, classes);
+ if (classes[0] == ATA_DEV_UNKNOWN)
+ rc = -ENODEV;
+ }
return rc;
}
int force_pio0);
extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev);
extern int ata_do_reset(struct ata_port *ap, ata_reset_fn_t reset,
- ata_postreset_fn_t postreset, unsigned int *classes);
+ unsigned int *classes);
extern void ata_qc_free(struct ata_queued_cmd *qc);
extern void ata_qc_issue(struct ata_queued_cmd *qc);
extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);