lkml.org 
[lkml]   [2003]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH][2.6.0-test2] fix ata_probe driver autoloading (another module failing to autoload - ide-cd)
Date
> > On Saturday 02 August 2003 21:54, David Walser
> >
> > wrote:
> > > I think in 2.4 I had ide-cd as a module, but I
> >
> > didn't
> >
> > > have to do anything special to get it loaded to
> >
> > use
> >
> > > 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--- ../tmp/linux-2.6.0-test2/drivers/ide/ide-probe.c 2003-07-27 22:33:36.000000000 +0400
+++ linux-2.6.0-test2-smp/drivers/ide/ide-probe.c 2003-08-03 15:17:10.000000000 +0400
@@ -1134,6 +1134,8 @@ static int ata_lock(dev_t dev, void *dat
return 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, int
ide_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, int
if (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);
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.035 / U:1.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site