Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139453
b: refs/heads/master
c: a9d5a97
h: refs/heads/master
i:
  139451: 5e89e59
v: v3
  • Loading branch information
TOMARI Hisanobu authored and Bartlomiej Zolnierkiewicz committed Mar 31, 2009
1 parent 3be1f93 commit e03088a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: fdd88f0af616db59a6a36bdf0185181d2b779f53
refs/heads/master: a9d5a97fa3828e7cbc577805eba3d0a0d35dd5a0
12 changes: 10 additions & 2 deletions trunk/drivers/ide/pmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -919,10 +919,18 @@ static u8 pmac_ide_cable_detect(ide_hwif_t *hwif)
(pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent);
struct device_node *np = pmif->node;
const char *cable = of_get_property(np, "cable-type", NULL);
struct device_node *root = of_find_node_by_path("/");
const char *model = of_get_property(root, "model", NULL);

/* Get cable type from device-tree. */
if (cable && !strncmp(cable, "80-", 3))
return ATA_CBL_PATA80;
if (cable && !strncmp(cable, "80-", 3)) {
/* Some drives fail to detect 80c cable in PowerBook */
/* These machine use proprietary short IDE cable anyway */
if (!strncmp(model, "PowerBook", 9))
return ATA_CBL_PATA40_SHORT;
else
return ATA_CBL_PATA80;
}

/*
* G5's seem to have incorrect cable type in device-tree.
Expand Down

0 comments on commit e03088a

Please sign in to comment.