* [PATCH] Selective attach for ide-scsi
@ 2004-02-08 22:42 Willem Riede
2004-02-09 8:24 ` Mikael Pettersson
0 siblings, 1 reply; 7+ messages in thread
From: Willem Riede @ 2004-02-08 22:42 UTC (permalink / raw)
To: linux-kernel
Today, if you boot 2.6.x with hdd=ide-scsi, ide-scsi will attach to
all your Atapi drives, not just hdd, unless you explicitely specified
another driver for those.
Given that we don't want people to use ide-scsi for cdroms and cd-writers,
that behavior is IMHO suboptimal.
The patch below makes ide-scsi attach ONLY to those drives that you tell
it to. So if you want it to handle hdb and hdd, but not hdc, you boot
with hdb=ide-scsi hdd=ide-scsi.
Regards, Willem Riede.
--- p0/drivers/scsi/ide-scsi.c 2004-01-31 10:29:11.000000000 -0500
+++ a1/drivers/scsi/ide-scsi.c 2004-02-08 16:40:19.000000000 -0500
@@ -955,17 +955,18 @@
static int warned;
int err;
- if (!warned && drive->media == ide_cdrom) {
- printk(KERN_WARNING "ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device\n");
- warned = 1;
- }
-
- if (!strstr("ide-scsi", drive->driver_req) ||
+ if (!drive->driver_req ||
+ !strstr(drive->driver_req, "ide-scsi") ||
!drive->present ||
drive->media == ide_disk ||
!(host = scsi_host_alloc(&idescsi_template,sizeof(idescsi_scsi_t))))
return 1;
+ if (!warned && drive->media == ide_cdrom) {
+ printk(KERN_WARNING "ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device\n");
+ warned = 1;
+ }
+
host->max_id = 1;
host->max_lun = 1;
drive->driver_data = host;
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] Selective attach for ide-scsi 2004-02-08 22:42 [PATCH] Selective attach for ide-scsi Willem Riede @ 2004-02-09 8:24 ` Mikael Pettersson 2004-02-10 0:02 ` Willem Riede 0 siblings, 1 reply; 7+ messages in thread From: Mikael Pettersson @ 2004-02-09 8:24 UTC (permalink / raw) To: wrlk; +Cc: linux-kernel Willem Riede writes: > Today, if you boot 2.6.x with hdd=ide-scsi, ide-scsi will attach to > all your Atapi drives, not just hdd, unless you explicitely specified > another driver for those. > > Given that we don't want people to use ide-scsi for cdroms and cd-writers, > that behavior is IMHO suboptimal. > > The patch below makes ide-scsi attach ONLY to those drives that you tell > it to. So if you want it to handle hdb and hdd, but not hdc, you boot > with hdb=ide-scsi hdd=ide-scsi. 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. /Mikael ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Selective attach for ide-scsi 2004-02-09 8:24 ` Mikael Pettersson @ 2004-02-10 0:02 ` Willem Riede 2004-02-11 20:11 ` Patrick Mansfield 0 siblings, 1 reply; 7+ messages in thread From: Willem Riede @ 2004-02-10 0:02 UTC (permalink / raw) To: Mikael Pettersson; +Cc: linux-kernel On 2004.02.09 03:24, Mikael Pettersson wrote: > Willem Riede writes: > > Today, if you boot 2.6.x with hdd=ide-scsi, ide-scsi will attach to > > all your Atapi drives, not just hdd, unless you explicitely specified > > another driver for those. > > > > Given that we don't want people to use ide-scsi for cdroms and cd-writers, > > that behavior is IMHO suboptimal. > > > > The patch below makes ide-scsi attach ONLY to those drives that you tell > > it to. So if you want it to handle hdb and hdd, but not hdc, you boot > > with hdb=ide-scsi hdd=ide-scsi. > > 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. 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. Since it can very easily be adjusted to achieve the desired selectivety, I believe it is the mechanism of choice. Does anyone else have an opinion? Thanks, Willem Riede. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Selective attach for ide-scsi 2004-02-10 0:02 ` Willem Riede @ 2004-02-11 20:11 ` Patrick Mansfield 2004-02-14 22:06 ` Willem Riede 0 siblings, 1 reply; 7+ messages in thread From: Patrick Mansfield @ 2004-02-11 20:11 UTC (permalink / raw) To: Willem Riede; +Cc: Mikael Pettersson, linux-kernel 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. -- Patrick Mansfield ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Selective attach for ide-scsi 2004-02-11 20:11 ` Patrick Mansfield @ 2004-02-14 22:06 ` Willem Riede 2004-02-14 22:54 ` Bartlomiej Zolnierkiewicz 0 siblings, 1 reply; 7+ messages in thread From: Willem Riede @ 2004-02-14 22:06 UTC (permalink / raw) To: Patrick Mansfield; +Cc: Mikael Pettersson, linux-kernel 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. Regards, Willem Riede. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Selective attach for ide-scsi 2004-02-14 22:06 ` Willem Riede @ 2004-02-14 22:54 ` Bartlomiej Zolnierkiewicz 2004-02-14 23:03 ` Willem Riede 0 siblings, 1 reply; 7+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2004-02-14 22:54 UTC (permalink / raw) To: wrlk, Patrick Mansfield; +Cc: Mikael Pettersson, linux-kernel 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Selective attach for ide-scsi 2004-02-14 22:54 ` Bartlomiej Zolnierkiewicz @ 2004-02-14 23:03 ` Willem Riede 0 siblings, 0 replies; 7+ messages in thread From: Willem Riede @ 2004-02-14 23:03 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz Cc: Patrick Mansfield, Mikael Pettersson, linux-kernel On 2004.02.14 17:54, Bartlomiej Zolnierkiewicz wrote: > > > > 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. Nothing. I was actually arguing that we _don't_ need a new mechanism. And, given that there is a /proc entry to change it (which I didn't realize), there is no downside to the current mechanism. Thanks, Willem Riede. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-02-14 23:03 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-02-08 22:42 [PATCH] Selective attach for ide-scsi Willem Riede 2004-02-09 8:24 ` Mikael Pettersson 2004-02-10 0:02 ` Willem Riede 2004-02-11 20:11 ` Patrick Mansfield 2004-02-14 22:06 ` Willem Riede 2004-02-14 22:54 ` Bartlomiej Zolnierkiewicz 2004-02-14 23:03 ` Willem Riede
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox