Skip to content

Commit

Permalink
pata_scc: add proper cable detection method
Browse files Browse the repository at this point in the history
Use standard ata_cable_80wire() method for the cable detection,
as a bonus this allows us to use the default ->prereset method.

Acked-by: Kou Ishizaki <[email protected]>
Acked-by: Akira Iguchi <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
  • Loading branch information
bzolnier authored and Jeff Garzik committed Oct 14, 2011
1 parent 90f0adf commit 9f8abf8
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/ata/pata_scc.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,18 +825,6 @@ static unsigned int scc_data_xfer (struct ata_device *dev, unsigned char *buf,
return words << 1;
}

/**
* scc_pata_prereset - prepare for reset
* @ap: ATA port to be reset
* @deadline: deadline jiffies for the operation
*/

static int scc_pata_prereset(struct ata_link *link, unsigned long deadline)
{
link->ap->cbl = ATA_CBL_PATA80;
return ata_sff_prereset(link, deadline);
}

/**
* scc_postreset - standard postreset callback
* @ap: the target ata_port
Expand Down Expand Up @@ -946,7 +934,7 @@ static struct ata_port_operations scc_pata_ops = {
.bmdma_status = scc_bmdma_status,
.sff_data_xfer = scc_data_xfer,

.prereset = scc_pata_prereset,
.cable_detect = ata_cable_80wire,
.softreset = scc_softreset,
.postreset = scc_postreset,

Expand Down

0 comments on commit 9f8abf8

Please sign in to comment.