Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82165
b: refs/heads/master
c: a14dc57
h: refs/heads/master
i:
  82163: aac7653
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 1, 2008
1 parent 99e2693 commit 97b2a55
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 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: e84e7ea7c4d0a6d7fbaecab2d85df0298cd9e3b4
refs/heads/master: a14dc57495899175a0827673fe23ed17b5653896
27 changes: 13 additions & 14 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ static void hwif_release_dev (struct device *dev)
complete(&hwif->gendev_rel_comp);
}

static void hwif_register (ide_hwif_t *hwif)
static void ide_register_port(ide_hwif_t *hwif)
{
int ret;

Expand Down Expand Up @@ -742,7 +742,9 @@ static int ide_probe_port(ide_hwif_t *hwif)
{
unsigned long flags;
unsigned int irqd;
int unit;
int unit, rc = -ENODEV;

BUG_ON(hwif->present);

if (hwif->noprobe)
return -EACCES;
Expand All @@ -767,14 +769,8 @@ static int ide_probe_port(ide_hwif_t *hwif)
ide_drive_t *drive = &hwif->drives[unit];
drive->dn = (hwif->channel ? 2 : 0) + unit;
(void) probe_for_drive(drive);
if (drive->present && !hwif->present) {
hwif->present = 1;
if (hwif->chipset != ide_4drives ||
!hwif->mate ||
!hwif->mate->present) {
hwif_register(hwif);
}
}
if (drive->present)
rc = 0;
}
if (hwif->io_ports[IDE_CONTROL_OFFSET] && hwif->reset) {
printk(KERN_WARNING "%s: reset\n", hwif->name);
Expand All @@ -791,10 +787,7 @@ static int ide_probe_port(ide_hwif_t *hwif)
if (irqd)
enable_irq(irqd);

if (!hwif->present)
return -ENODEV;

return 0;
return rc;
}

static void ide_port_tune_devices(ide_hwif_t *hwif)
Expand Down Expand Up @@ -1319,6 +1312,12 @@ int ide_device_add_all(u8 *idx)
continue;
}

hwif->present = 1;

if (hwif->chipset != ide_4drives || !hwif->mate ||
!hwif->mate->present)
ide_register_port(hwif);

ide_port_tune_devices(hwif);
}

Expand Down

0 comments on commit 97b2a55

Please sign in to comment.