* [PATCH] pata_marvell: fix cable detection - take 2
@ 2006-11-20 20:20 Arnaud Patard
2006-11-20 20:42 ` Alan Cox
0 siblings, 1 reply; 3+ messages in thread
From: Arnaud Patard @ 2006-11-20 20:20 UTC (permalink / raw)
To: linux-ide; +Cc: alan
[-- Attachment #1: Type: text/plain, Size: 281 bytes --]
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.
Signed-off-by: Arnaud Patard <apatard@mandriva.com>
---
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pata_marvell_fix_cable_detection_take2.patch --]
[-- Type: text/x-patch, Size: 534 bytes --]
Index: libata-dev/drivers/ata/pata_marvell.c
===================================================================
--- libata-dev.orig/drivers/ata/pata_marvell.c
+++ libata-dev/drivers/ata/pata_marvell.c
@@ -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 */
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] pata_marvell: fix cable detection - take 2
2006-11-20 20:20 [PATCH] pata_marvell: fix cable detection - take 2 Arnaud Patard
@ 2006-11-20 20:42 ` Alan Cox
2006-11-21 10:28 ` Arnaud Patard
0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2006-11-20 20:42 UTC (permalink / raw)
To: Arnaud Patard; +Cc: linux-ide, alan
On Mon, Nov 20, 2006 at 09:20:44PM +0100, Arnaud Patard wrote:
>
> 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 ?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pata_marvell: fix cable detection - take 2
2006-11-20 20:42 ` Alan Cox
@ 2006-11-21 10:28 ` Arnaud Patard
0 siblings, 0 replies; 3+ messages in thread
From: Arnaud Patard @ 2006-11-21 10:28 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-ide
Alan Cox <alan@redhat.com> writes:
> On Mon, Nov 20, 2006 at 09:20:44PM +0100, Arnaud Patard wrote:
>>
>> 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 :)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-21 10:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-20 20:20 [PATCH] pata_marvell: fix cable detection - take 2 Arnaud Patard
2006-11-20 20:42 ` Alan Cox
2006-11-21 10:28 ` Arnaud Patard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).