|
@@ -1790,6 +1790,56 @@ err_out_nosup:
|
|
return rc;
|
|
return rc;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * ata_cable_40wire - return 40pin cable type
|
|
|
|
+ * @ap: port
|
|
|
|
+ *
|
|
|
|
+ * Helper method for drivers which want to hardwire 40 pin cable
|
|
|
|
+ * detection.
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+int ata_cable_40wire(struct ata_port *ap)
|
|
|
|
+{
|
|
|
|
+ return ATA_CBL_PATA40;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * ata_cable_80wire - return 40pin cable type
|
|
|
|
+ * @ap: port
|
|
|
|
+ *
|
|
|
|
+ * Helper method for drivers which want to hardwire 80 pin cable
|
|
|
|
+ * detection.
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+int ata_cable_80wire(struct ata_port *ap)
|
|
|
|
+{
|
|
|
|
+ return ATA_CBL_PATA80;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * ata_cable_unknown - return unknown PATA cable.
|
|
|
|
+ * @ap: port
|
|
|
|
+ *
|
|
|
|
+ * Helper method for drivers which have no PATA cable detection.
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+int ata_cable_unknown(struct ata_port *ap)
|
|
|
|
+{
|
|
|
|
+ return ATA_CBL_PATA_UNK;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * ata_cable_sata - return SATA cable type
|
|
|
|
+ * @ap: port
|
|
|
|
+ *
|
|
|
|
+ * Helper method for drivers which have SATA cables
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+int ata_cable_sata(struct ata_port *ap)
|
|
|
|
+{
|
|
|
|
+ return ATA_CBL_SATA;
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* ata_bus_probe - Reset and probe ATA bus
|
|
* ata_bus_probe - Reset and probe ATA bus
|
|
* @ap: Bus to probe
|
|
* @ap: Bus to probe
|
|
@@ -1860,6 +1910,10 @@ int ata_bus_probe(struct ata_port *ap)
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* Now ask for the cable type as PDIAG- should have been released */
|
|
|
|
+ if (ap->ops->cable_detect)
|
|
|
|
+ ap->cbl = ap->ops->cable_detect(ap);
|
|
|
|
+
|
|
/* After the identify sequence we can now set up the devices. We do
|
|
/* After the identify sequence we can now set up the devices. We do
|
|
this in the normal order so that the user doesn't get confused */
|
|
this in the normal order so that the user doesn't get confused */
|
|
|
|
|
|
@@ -6453,3 +6507,8 @@ EXPORT_SYMBOL_GPL(ata_dummy_irq_on);
|
|
EXPORT_SYMBOL_GPL(ata_irq_ack);
|
|
EXPORT_SYMBOL_GPL(ata_irq_ack);
|
|
EXPORT_SYMBOL_GPL(ata_dummy_irq_ack);
|
|
EXPORT_SYMBOL_GPL(ata_dummy_irq_ack);
|
|
EXPORT_SYMBOL_GPL(ata_dev_try_classify);
|
|
EXPORT_SYMBOL_GPL(ata_dev_try_classify);
|
|
|
|
+
|
|
|
|
+EXPORT_SYMBOL_GPL(ata_cable_40wire);
|
|
|
|
+EXPORT_SYMBOL_GPL(ata_cable_80wire);
|
|
|
|
+EXPORT_SYMBOL_GPL(ata_cable_unknown);
|
|
|
|
+EXPORT_SYMBOL_GPL(ata_cable_sata);
|