Re: [PATCH] Selective attach for ide-scsi

From: Bartlomiej Zolnierkiewicz
Date: Sat Feb 14 2004 - 17:50:48 EST


On Saturday 14 of February 2004 23:06, Willem Riede wrote:
> On 2004.02.11 15:11, Patrick Mansfield wrote:
> > On Mon, Feb 09, 2004 at 07:02:05PM -0500, Willem Riede wrote:
> > > On 2004.02.09 03:24, Mikael Pettersson wrote:
> > > > Willem Riede writes:
> > > >
> > > > The patch I posted, which you apparently didn't like, doesn't
> > > > require the use of boot-only options: it instead adds a module_param
> > > > to ide-scsi which allows for greater flexibility.
> > > >
> > > > Personally I never liked that butt-ugly hdX=ide-scsi hack.
> > >
> > > I hear you. There are certainly advantages to use a module parameter
> > > rather than a boot argument.
> >
> > But module_param allows module arguments when built as a module, and boot
> > arguments when built into the kernel.
> >
> > > However, there should not be two mechanisms to achieve the same goal.
> > > For better or for worse, the hdX=<driver> construction exists, and
> > > people are using it. Its use is not limited to ide-scsi.
> >
> > So does module_param not work because the usage is across modules? That
> > seems odd.
>
> I wasn't making myself clear, it seems.
>
> The hdX= construct applies to the entire ide subsystem, which for the vast
> majority of people means it has to be specified at boot time, as ide is
> compiled in.
>
> If we were to have an ide-scsi module option to tell it which hdX units to
> attach to, that would be more flexible than having to tell ide, since I can
> then rmmod/insmod ide-scsi if I want to change my mind, whereas I must
> reboot if I need to change what I tell ide.
>
> The advantage of the hdX ide parameter is that it applies to the entire ide
> subsystem, and therefor influences ide-cd, ide-scsi, ide-tape.
>
> The main reason I see for sticking with the hdX= construct is that I think
> that introducing competing mechanisms that achieve much the same objective
> is a bad thing.

$ echo ide-scsi>/proc/ide/hdX/driver
or
$ echo "ide-scsi:1">/proc/ide/hdX/settings
or
use HDIO_SET_IDE_SCSI ioctl

and you can change driver from ide-{cd,floppy,tape} to ide-scsi in-fly.
You can also use it in reverse direction (ie. from ide-scsi to ide-cd).

What more crap do you need? There is already one /proc setting too much.

Cheers,
--bart

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/