From: Andrey Borzenkov <arvidjaar@mail.ru>
To: David Walser <luigiwalser@yahoo.com>
Cc: linux-kernel@vger.kernel.org,
Olivier Thauvin <olivier.thauvin@aerov.jussieu.fr>
Subject: [PATCH][2.6.0-test2] fix ata_probe driver autoloading (another module failing to autoload - ide-cd)
Date: Sun, 3 Aug 2003 15:33:37 +0400 [thread overview]
Message-ID: <200308031533.37745.arvidjaar@mail.ru> (raw)
In-Reply-To: <20030802185054.35243.qmail@web14006.mail.yahoo.com>
[-- 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);
next parent reply other threads:[~2003-08-03 11:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20030802185054.35243.qmail@web14006.mail.yahoo.com>
2003-08-03 11:33 ` Andrey Borzenkov [this message]
2003-08-03 21:04 ` [PATCH][2.6.0-test2] fix ata_probe driver autoloading (another module failing to autoload - ide-cd) Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200308031533.37745.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=luigiwalser@yahoo.com \
--cc=olivier.thauvin@aerov.jussieu.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox