Skip to content

Commit

Permalink
[PATCH] pata_via: Cable detect error
Browse files Browse the repository at this point in the history
The UDMA66 VIA hardware has no controller side cable detect bits we can
use. This patch minimally fixes the problem by reporting unknown in this
case and using drive side detection.

The old drivers/ide code does some additional tricks but those aren't
appropriate now we are in -rc.

Without this update UDMA66 via controllers run slowly. They don't fail so
it's a borderline call whether this is -rc material or not.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Alan authored and Jeff Garzik committed Dec 16, 2006
1 parent 2bfc361 commit 5c9a761
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/ata/pata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,15 @@ static int via_pre_reset(struct ata_port *ap)
return -ENOENT;
}

if ((config->flags & VIA_UDMA) >= VIA_UDMA_66)
if ((config->flags & VIA_UDMA) >= VIA_UDMA_100)
ap->cbl = via_cable_detect(ap);
else
/* The UDMA66 series has no cable detect so do drive side detect */
else if ((config->flags & VIA_UDMA) < VIA_UDMA_66)
ap->cbl = ATA_CBL_PATA40;
else
ap->cbl = ATA_CBL_PATA_UNK;


return ata_std_prereset(ap);
}

Expand Down

0 comments on commit 5c9a761

Please sign in to comment.