Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42918
b: refs/heads/master
c: aaeab80
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Dec 7, 2006
1 parent 693e20c commit 84714ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2ee91f197c0bc654b24eed5831fd12aa0d566a7d
refs/heads/master: aaeab80bdbc0d10a98adc6fa76c29ca2f1816553
6 changes: 6 additions & 0 deletions trunk/drivers/scsi/ide-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 ||
Expand Down Expand Up @@ -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");

0 comments on commit 84714ad

Please sign in to comment.