fix ata_probe driver autoloading (another module failing to autoload - ide-cd)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 fix ata_probe driver autoloading (another module failing to autoload - ide-cd)
Quoted 9 lines
Quoted 9 lines
On Saturday 02 August 2003 21:54, David Walser
Quoted 1 line · wrote:
I think in 2.4 I had ide-cd as a module, but I
didn't
Quoted 1 line
have to do anything special to get it loaded to
Quoted 7 lines
Quoted 7 lines
use
Quoted 4 lines
IDE CD-ROM devices.
I just noticed in 2.6 I have to load it manually.
What's the best way to handle this?
Apply this patch :). Apparently drive->driver is never NULL now but defaults to default driver.
thank you
-andrey
drivers/ide/ide-probe.c renamed from tmp/linux-2.6.0-test2/drivers/ide/ide-probe.c +4 -2
@@ -1134,6 +1134,8 @@ static int ata_lock(dev_t dev, void *datreturn 0 ; } +extern ide_driver_t idedefault_driver; +struct kobject *ata_probe (dev_t dev,int *part,void *data) {ide_hwif_t *hwif = data;
@@ -1141,7 +1143,7 @@ struct kobject *ata_probe(dev_t dev, intide_drive_t *drive = &hwif->drives[unit];if (!drive->present)return NULL ; -if (!drive->driver) { +if (drive->driver == &idedefault_driver) {if (drive->media == ide_disk) (void )request_module ("ide-disk" );if (drive->scsi)
@@ -1153,7 +1155,7 @@ struct kobject *ata_probe(dev_t dev, intif (drive->media == ide_floppy) (void )request_module ("ide-floppy" ); } -if (!drive->driver) +if (drive->driver == &idedefault_driver)return NULL ; *part &= (1 <<PARTN_BITS ) -1 ;return get_disk (drive->disk);
Quoted 2 lines · Andrey Borzenkov
Apply this patch :). Apparently
drive->driveris never NULL now but defaults to default driver.
Looks good to me