Make probe_hwif() return an error value.
While at it:
* Remove comment about MAX_DRIVES == 2 limitation (it is not special to
probe_hwif(), it is a general assumption taken by a lot of IDE code).
* Rename probe_hwif() to ide_probe_port().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/*
* ide_wait_not_busy() waits for the currently selected device on the hwif
/*
* 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)
{
*/
int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout)
{
EXPORT_SYMBOL_GPL(ide_undecoded_slave);
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)
{
unsigned long flags;
unsigned int irqd;
int unit;
if (hwif->noprobe)
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);
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);
if (!hwif->present) {
ide_hwif_release_regions(hwif);
if (!hwif->present) {
ide_hwif_release_regions(hwif);
}
for (unit = 0; unit < MAX_DRIVES; unit++) {
}
for (unit = 0; unit < MAX_DRIVES; unit++) {
else
drive->no_io_32bit = drive->id->dword_io ? 1 : 0;
}
else
drive->no_io_32bit = drive->id->dword_io ? 1 : 0;
}
if (idx[i] == 0xff)
continue;
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++) {
}
for (i = 0; i < MAX_HWIFS; i++) {
- * 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]);
*/
timeout = 10000;
outb(12, hwif->io_ports[IDE_CONTROL_OFFSET]);