Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82162
b: refs/heads/master
c: 9d50152
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 1, 2008
1 parent 6e13ed6 commit 91a9566
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 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: fbd130887a45341259cde02e134581fb3dac6e14
refs/heads/master: 9d501529b688dada3fd90d91b1517e48d5ac3e05
2 changes: 1 addition & 1 deletion trunk/drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ EXPORT_SYMBOL(ide_do_reset);

/*
* ide_wait_not_busy() waits for the currently selected device on the hwif
* to report a non-busy status, see comments in probe_hwif().
* to report a non-busy status, see comments in ide_probe_port().
*/
int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout)
{
Expand Down
16 changes: 7 additions & 9 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,24 +738,20 @@ void ide_undecoded_slave(ide_drive_t *drive1)

EXPORT_SYMBOL_GPL(ide_undecoded_slave);

/*
* This routine only knows how to look for drive units 0 and 1
* on an interface, so any setting of MAX_DRIVES > 2 won't work here.
*/
static void probe_hwif(ide_hwif_t *hwif)
static int ide_probe_port(ide_hwif_t *hwif)
{
unsigned long flags;
unsigned int irqd;
int unit;

if (hwif->noprobe)
return;
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;
return -EBUSY;
}

/*
Expand Down Expand Up @@ -804,7 +800,7 @@ static void probe_hwif(ide_hwif_t *hwif)

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

for (unit = 0; unit < MAX_DRIVES; unit++) {
Expand Down Expand Up @@ -840,6 +836,8 @@ static void probe_hwif(ide_hwif_t *hwif)
else
drive->no_io_32bit = drive->id->dword_io ? 1 : 0;
}

return 0;
}

#if MAX_HWIFS > 1
Expand Down Expand Up @@ -1311,7 +1309,7 @@ int ide_device_add_all(u8 *idx)
if (idx[i] == 0xff)
continue;

probe_hwif(&ide_hwifs[idx[i]]);
(void)ide_probe_port(&ide_hwifs[idx[i]]);
}

for (i = 0; i < MAX_HWIFS; i++) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/ide/pci/ns87415.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)

#ifdef __sparc_v9__
/*
* XXX: Reset the device, if we don't it will not respond
* to SELECT_DRIVE() properly during first probe_hwif().
* XXX: Reset the device, if we don't it will not respond to
* SELECT_DRIVE() properly during first ide_probe_port().
*/
timeout = 10000;
outb(12, hwif->io_ports[IDE_CONTROL_OFFSET]);
Expand Down

0 comments on commit 91a9566

Please sign in to comment.