aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 1427a41e8441..8f6b5bf580f6 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -110,6 +110,7 @@ typedef struct ide_scsi_obj {
110} idescsi_scsi_t; 110} idescsi_scsi_t;
111 111
112static DEFINE_MUTEX(idescsi_ref_mutex); 112static DEFINE_MUTEX(idescsi_ref_mutex);
113static int idescsi_nocd; /* Set by module param to skip cd */
113 114
114#define ide_scsi_g(disk) \ 115#define ide_scsi_g(disk) \
115 container_of((disk)->private_data, struct ide_scsi_obj, driver) 116 container_of((disk)->private_data, struct ide_scsi_obj, driver)
@@ -1127,6 +1128,9 @@ static int ide_scsi_probe(ide_drive_t *drive)
1127 warned = 1; 1128 warned = 1;
1128 } 1129 }
1129 1130
1131 if (idescsi_nocd && drive->media == ide_cdrom)
1132 return -ENODEV;
1133
1130 if (!strstr("ide-scsi", drive->driver_req) || 1134 if (!strstr("ide-scsi", drive->driver_req) ||
1131 !drive->present || 1135 !drive->present ||
1132 drive->media == ide_disk || 1136 drive->media == ide_disk ||
@@ -1187,6 +1191,8 @@ static void __exit exit_idescsi_module(void)
1187 driver_unregister(&idescsi_driver.gen_driver); 1191 driver_unregister(&idescsi_driver.gen_driver);
1188} 1192}
1189 1193
1194module_param(idescsi_nocd, int, 0600);
1195MODULE_PARM_DESC(idescsi_nocd, "Disable handling of CD-ROMs so they may be driven by ide-cd");
1190module_init(init_idescsi_module); 1196module_init(init_idescsi_module);
1191module_exit(exit_idescsi_module); 1197module_exit(exit_idescsi_module);
1192MODULE_LICENSE("GPL"); 1198MODULE_LICENSE("GPL");