linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][2.6.0-test2] fix ata_probe driver autoloading (another module failing to autoload - ide-cd)
       [not found] <20030802185054.35243.qmail@web14006.mail.yahoo.com>
@ 2003-08-03 11:33 ` Andrey Borzenkov
  2003-08-03 21:04   ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Borzenkov @ 2003-08-03 11:33 UTC (permalink / raw)
  To: David Walser; +Cc: linux-kernel, Olivier Thauvin

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

> > 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

[-- Attachment #2: 2.6.0-test2-ata_probe.patch --]
[-- Type: text/x-diff, Size: 985 bytes --]

--- ../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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][2.6.0-test2] fix ata_probe driver autoloading (another module failing to autoload - ide-cd)
  2003-08-03 11:33 ` [PATCH][2.6.0-test2] fix ata_probe driver autoloading (another module failing to autoload - ide-cd) Andrey Borzenkov
@ 2003-08-03 21:04   ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2003-08-03 21:04 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: David Walser, Linux Kernel Mailing List, Olivier Thauvin

On Sul, 2003-08-03 at 12:33, Andrey Borzenkov wrote:
> Apply this patch :). Apparently drive->driver is never NULL now but defaults 
> to default driver.

Looks good to me


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-03 21:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030802185054.35243.qmail@web14006.mail.yahoo.com>
2003-08-03 11:33 ` [PATCH][2.6.0-test2] fix ata_probe driver autoloading (another module failing to autoload - ide-cd) Andrey Borzenkov
2003-08-03 21:04   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).