pata_marvell: fix cable detection - take 2
PATCH 1/1 pata_marvell: fix cable detection - take 2
Last time I looked at the cable detection code, I fixed the "always detect cable as sata cable" case, but this is not enough. I didn't notice that the 80-pin cable was seen as a 40-pin cable. The appended patch fixes that.
---
drivers/ata/pata_marvell.c +2 -3
@@ -57,11 +57,10 @@ static int marvell_pre_reset(struct ata_switch (ap->port_no) {case 0 : -/* Might be backward, docs unclear */ if (inb (ap->ioaddr.bmdma_addr +1 ) &1 ) - ap->cbl =ATA_CBL_PATA80 ; -else ap->cbl =ATA_CBL_PATA40 ; +else + ap->cbl =ATA_CBL_PATA80 ;break ;case 1 :/* Legacy SATA port */
Quoted 5 lines · Arnaud Patard
Last time I looked at the cable detection code, I fixed the "always detect cable as sata cable" case, but this is not enough. I didn't notice that the 80-pin cable was seen as a 40-pin cable. The appended patch fixes that.
Thanks - the docs were a bit blank on which was which - have you checked this now detects right both ways around ?
Quoted 9 lines · Alan Cox
Quoted 5 lines · Arnaud Patard
Last time I looked at the cable detection code, I fixed the "always detect cable as sata cable" case, but this is not enough. I didn't notice that the 80-pin cable was seen as a 40-pin cable. The appended patch fixes that.
Thanks - the docs were a bit blank on which was which - have you checked this now detects right both ways around ?
yeah, I've tested on two boxes, with 40-pin and 80-pin cables :)