diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-12-06 20:39:33 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 08:39:43 -0800 |
commit | aaeab80bdbc0d10a98adc6fa76c29ca2f1816553 (patch) | |
tree | 834f6a62ad9ba24da6aceeacacba93c3cc66b369 /drivers/scsi/ide-scsi.c | |
parent | 2ee91f197c0bc654b24eed5831fd12aa0d566a7d (diff) | |
download | kernel_samsung_espresso10-aaeab80bdbc0d10a98adc6fa76c29ca2f1816553.zip kernel_samsung_espresso10-aaeab80bdbc0d10a98adc6fa76c29ca2f1816553.tar.gz kernel_samsung_espresso10-aaeab80bdbc0d10a98adc6fa76c29ca2f1816553.tar.bz2 |
[PATCH] ide_scsi: allow it to be used for non CD only
Some people want to use ide_cd for CD-ROM but still dynamically load
ide-scsi for things like tape drives. If you compile in the CD driver this
works out but if you want them modular you need an option to ensure that
whoever loads first the right things happen.
This replaces the original draft patch which leaked a scsi host reference
[akpm@osdl.org: add MODULE_PARM_DESC]
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r-- | drivers/scsi/ide-scsi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 1427a41..8f6b5bf 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -110,6 +110,7 @@ typedef struct ide_scsi_obj { } idescsi_scsi_t; static DEFINE_MUTEX(idescsi_ref_mutex); +static int idescsi_nocd; /* Set by module param to skip cd */ #define ide_scsi_g(disk) \ container_of((disk)->private_data, struct ide_scsi_obj, driver) @@ -1127,6 +1128,9 @@ static int ide_scsi_probe(ide_drive_t *drive) warned = 1; } + if (idescsi_nocd && drive->media == ide_cdrom) + return -ENODEV; + if (!strstr("ide-scsi", drive->driver_req) || !drive->present || drive->media == ide_disk || @@ -1187,6 +1191,8 @@ static void __exit exit_idescsi_module(void) driver_unregister(&idescsi_driver.gen_driver); } +module_param(idescsi_nocd, int, 0600); +MODULE_PARM_DESC(idescsi_nocd, "Disable handling of CD-ROMs so they may be driven by ide-cd"); module_init(init_idescsi_module); module_exit(exit_idescsi_module); MODULE_LICENSE("GPL"); |