Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185792
b: refs/heads/master
c: a13e486
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and David S. Miller committed Jan 19, 2010
1 parent fd6da42 commit 6578bcd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76937fa765bd65c052b87812e46d5b90094e57b8
refs/heads/master: a13e4865fac374f2edf2666b66f2f88e527db2b7
10 changes: 7 additions & 3 deletions trunk/drivers/ide/via82cxxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#define VIA_NO_UNMASK 0x08 /* Doesn't work with IRQ unmasking on */
#define VIA_BAD_ID 0x10 /* Has wrong vendor ID (0x1107) */
#define VIA_BAD_AST 0x20 /* Don't touch Address Setup Timing */
#define VIA_SATA_PATA 0x80 /* SATA/PATA combined configuration */

enum {
VIA_IDFLAG_SINGLE = (1 << 1), /* single channel controller */
Expand All @@ -71,9 +72,9 @@ static struct via_isa_bridge {
u8 udma_mask;
u8 flags;
} via_isa_bridges[] = {
{ "vx855", PCI_DEVICE_ID_VIA_VX855, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
{ "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
{ "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
{ "vx855", PCI_DEVICE_ID_VIA_VX855, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST | VIA_SATA_PATA },
{ "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST | VIA_SATA_PATA },
{ "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST | VIA_SATA_PATA },
{ "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
{ "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
{ "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
Expand Down Expand Up @@ -366,6 +367,9 @@ static u8 via82cxxx_cable_detect(ide_hwif_t *hwif)
if (via_cable_override(pdev))
return ATA_CBL_PATA40_SHORT;

if ((vdev->via_config->flags & VIA_SATA_PATA) && hwif->channel == 0)
return ATA_CBL_SATA;

if ((vdev->via_80w >> hwif->channel) & 1)
return ATA_CBL_PATA80;
else
Expand Down

0 comments on commit 6578bcd

Please sign in to comment.