Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82163
b: refs/heads/master
c: 139ddfc
h: refs/heads/master
i:
  82161: 6e13ed6
  82159: 746f06e
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 1, 2008
1 parent 91a9566 commit aac7653
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 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: 9d501529b688dada3fd90d91b1517e48d5ac3e05
refs/heads/master: 139ddfcab50e5eabcc88341c8743a990ac1be6a2
23 changes: 12 additions & 11 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,13 +747,6 @@ static int ide_probe_port(ide_hwif_t *hwif)
if (hwif->noprobe)
return -EACCES;

if ((hwif->chipset != ide_4drives || !hwif->mate || !hwif->mate->present) &&
(ide_hwif_request_regions(hwif))) {
printk(KERN_ERR "%s: ports already in use, skipping probe\n",
hwif->name);
return -EBUSY;
}

/*
* We must always disable IRQ, as probe_for_drive will assert IRQ, but
* we'll install our IRQ driver much later...
Expand Down Expand Up @@ -798,10 +791,8 @@ static int ide_probe_port(ide_hwif_t *hwif)
if (irqd)
enable_irq(irqd);

if (!hwif->present) {
ide_hwif_release_regions(hwif);
if (!hwif->present)
return -ENODEV;
}

for (unit = 0; unit < MAX_DRIVES; unit++) {
ide_drive_t *drive = &hwif->drives[unit];
Expand Down Expand Up @@ -1309,7 +1300,17 @@ int ide_device_add_all(u8 *idx)
if (idx[i] == 0xff)
continue;

(void)ide_probe_port(&ide_hwifs[idx[i]]);
hwif = &ide_hwifs[idx[i]];

if ((hwif->chipset != ide_4drives || !hwif->mate ||
!hwif->mate->present) && ide_hwif_request_regions(hwif)) {
printk(KERN_ERR "%s: ports already in use, "
"skipping probe\n", hwif->name);
continue;
}

if (ide_probe_port(hwif) < 0)
ide_hwif_release_regions(hwif);
}

for (i = 0; i < MAX_HWIFS; i++) {
Expand Down

0 comments on commit aac7653

Please sign in to comment.