lkml.org 
[lkml]   [2004]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH][2.6] units= parameter for ide-scsi
On 2004.01.10 10:02, Mikael Pettersson wrote:
> This is my patch to add a "units=" parameter to ide-scsi.
> It's useful for people that, like me, have more than one
> ATAPI device in a machine. Sample usage:

I found that if only the existing hdx=ide-scsi mechanism had been
strictly enforced, this functionality had already existed:

--- linux-2.6.1/drivers/scsi/ide-scsi.c 2003-12-17 21:59:05.000000000 -0500
+++ /tmp/ide-scsi.c 2004-01-10 15:44:35.000000000 -0500
@@ -54,6 +54,9 @@
#include "hosts.h"
#include <scsi/sg.h>

+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Scsi emulator for ATAPI Tape and MO devices");
+
#define IDESCSI_DEBUG_LOG 0

typedef struct idescsi_pc_s {
@@ -954,17 +957,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;
@@ -1000,4 +1004,3 @@

module_init(init_idescsi_module);
module_exit(exit_idescsi_module);
-MODULE_LICENSE("GPL");

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

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.386 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site