aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libata-core.c19
-rw-r--r--include/linux/libata.h8
2 files changed, 23 insertions, 4 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 1f78e246f5e0..147e1461062d 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1485,7 +1485,24 @@ static int ata_bus_probe(struct ata_port *ap)
1485{ 1485{
1486 unsigned int i, found = 0; 1486 unsigned int i, found = 0;
1487 1487
1488 ap->ops->phy_reset(ap); 1488 if (ap->ops->probe_reset) {
1489 unsigned int classes[ATA_MAX_DEVICES];
1490 int rc;
1491
1492 ata_port_probe(ap);
1493
1494 rc = ap->ops->probe_reset(ap, classes);
1495 if (rc == 0) {
1496 for (i = 0; i < ATA_MAX_DEVICES; i++)
1497 ap->device[i].class = classes[i];
1498 } else {
1499 printk(KERN_ERR "ata%u: probe reset failed, "
1500 "disabling port\n", ap->id);
1501 ata_port_disable(ap);
1502 }
1503 } else
1504 ap->ops->phy_reset(ap);
1505
1489 if (ap->flags & ATA_FLAG_PORT_DISABLED) 1506 if (ap->flags & ATA_FLAG_PORT_DISABLED)
1490 goto err_out; 1507 goto err_out;
1491 1508
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 45646f6ebbf5..a84d1c3a5429 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -148,9 +148,9 @@ enum {
148 ATA_FLAG_PORT_DISABLED = (1 << 2), /* port is disabled, ignore it */ 148 ATA_FLAG_PORT_DISABLED = (1 << 2), /* port is disabled, ignore it */
149 ATA_FLAG_SATA = (1 << 3), 149 ATA_FLAG_SATA = (1 << 3),
150 ATA_FLAG_NO_LEGACY = (1 << 4), /* no legacy mode check */ 150 ATA_FLAG_NO_LEGACY = (1 << 4), /* no legacy mode check */
151 ATA_FLAG_SRST = (1 << 5), /* use ATA SRST, not E.D.D. */ 151 ATA_FLAG_SRST = (1 << 5), /* (obsolete) use ATA SRST, not E.D.D. */
152 ATA_FLAG_MMIO = (1 << 6), /* use MMIO, not PIO */ 152 ATA_FLAG_MMIO = (1 << 6), /* use MMIO, not PIO */
153 ATA_FLAG_SATA_RESET = (1 << 7), /* use COMRESET */ 153 ATA_FLAG_SATA_RESET = (1 << 7), /* (obsolete) use COMRESET */
154 ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */ 154 ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */
155 ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once 155 ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once
156 * proper HSM is in place. */ 156 * proper HSM is in place. */
@@ -419,7 +419,9 @@ struct ata_port_operations {
419 u8 (*check_altstatus)(struct ata_port *ap); 419 u8 (*check_altstatus)(struct ata_port *ap);
420 void (*dev_select)(struct ata_port *ap, unsigned int device); 420 void (*dev_select)(struct ata_port *ap, unsigned int device);
421 421
422 void (*phy_reset) (struct ata_port *ap); 422 void (*phy_reset) (struct ata_port *ap); /* obsolete */
423 int (*probe_reset) (struct ata_port *ap, unsigned int *classes);
424
423 void (*post_set_mode) (struct ata_port *ap); 425 void (*post_set_mode) (struct ata_port *ap);
424 426
425 int (*check_atapi_dma) (struct ata_queued_cmd *qc); 427 int (*check_atapi_dma) (struct ata_queued_cmd *qc);