[libata] Update several PATA drivers for new ->cable_detect hook

All patches authored and signed-off-by Alan Cox, sent on Mar 7, 2007.
I merely combined them all into a single patch.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Jeff Garzik
2007-03-09 07:24:15 -05:00
parent 6a3d586d8e
commit a0fcdc0259
13 changed files with 68 additions and 133 deletions

View File

@@ -80,7 +80,7 @@
#define DRV_NAME "pata_it821x"
#define DRV_VERSION "0.3.4"
#define DRV_VERSION "0.3.6"
struct it821x_dev
{
@@ -112,31 +112,6 @@ struct it821x_dev
static int it8212_noraid;
/**
* it821x_pre_reset - probe
* @ap: ATA port
*
* Set the cable type
*/
static int it821x_pre_reset(struct ata_port *ap)
{
ap->cbl = ATA_CBL_PATA80;
return ata_std_prereset(ap);
}
/**
* it821x_error_handler - probe/reset
* @ap: ATA port
*
* Set the cable type and trigger a probe
*/
static void it821x_error_handler(struct ata_port *ap)
{
return ata_bmdma_drive_eh(ap, it821x_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
}
/**
* it821x_program - program the PIO/MWDMA registers
* @ap: ATA port
@@ -666,8 +641,9 @@ static struct ata_port_operations it821x_smart_port_ops = {
.freeze = ata_bmdma_freeze,
.thaw = ata_bmdma_thaw,
.error_handler = it821x_error_handler,
.error_handler = ata_bmdma_error_handler,
.post_internal_cmd = ata_bmdma_post_internal_cmd,
.cable_detect = ata_cable_unknown,
.bmdma_setup = ata_bmdma_setup,
.bmdma_start = ata_bmdma_start,
@@ -702,8 +678,9 @@ static struct ata_port_operations it821x_passthru_port_ops = {
.freeze = ata_bmdma_freeze,
.thaw = ata_bmdma_thaw,
.error_handler = it821x_error_handler,
.error_handler = ata_bmdma_error_handler,
.post_internal_cmd = ata_bmdma_post_internal_cmd,
.cable_detect = ata_cable_unknown,
.bmdma_setup = ata_bmdma_setup,
.bmdma_start = it821x_passthru_bmdma_start,