aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-12-24 09:23:43 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-12-24 09:23:43 -0500
commit3cbd814ef3d4c80392377e6ce5816058258f1484 (patch)
treef802449b993b889f9075959bd81a83fa7c797ff8 /drivers/ide
parenta1c6d28c2b3ec919c37cb7026ed8af70fe7cb098 (diff)
ide-cd: fix SAMSUNG CD-ROM SCR-3231 quirk
cdi->mask is cleared by ide_cdrom_register() which is called after the quirk. Fix it by adding new ->no_speed_select flag to struct ide_cd_config_flags and using it in ide_cdrom_register() to set CDC_SELECT_SPEED flag. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-cd.c5
-rw-r--r--drivers/ide/ide-cd.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 92ac658dac33..249834b024f5 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -2909,6 +2909,9 @@ static int ide_cdrom_register (ide_drive_t *drive, int nslots)
2909 if (!CDROM_CONFIG_FLAGS(drive)->ram) 2909 if (!CDROM_CONFIG_FLAGS(drive)->ram)
2910 devinfo->mask |= CDC_RAM; 2910 devinfo->mask |= CDC_RAM;
2911 2911
2912 if (CDROM_CONFIG_FLAGS(drive)->no_speed_select)
2913 devinfo->mask |= CDC_SELECT_SPEED;
2914
2912 devinfo->disk = info->disk; 2915 devinfo->disk = info->disk;
2913 return register_cdrom(devinfo); 2916 return register_cdrom(devinfo);
2914} 2917}
@@ -3161,7 +3164,7 @@ int ide_cdrom_setup (ide_drive_t *drive)
3161 CDROM_CONFIG_FLAGS(drive)->limit_nframes = 1; 3164 CDROM_CONFIG_FLAGS(drive)->limit_nframes = 1;
3162 /* the 3231 model does not support the SET_CD_SPEED command */ 3165 /* the 3231 model does not support the SET_CD_SPEED command */
3163 else if (!strcmp(drive->id->model, "SAMSUNG CD-ROM SCR-3231")) 3166 else if (!strcmp(drive->id->model, "SAMSUNG CD-ROM SCR-3231"))
3164 cdi->mask |= CDC_SELECT_SPEED; 3167 CDROM_CONFIG_FLAGS(drive)->no_speed_select = 1;
3165 3168
3166#if ! STANDARD_ATAPI 3169#if ! STANDARD_ATAPI
3167 /* by default Sanyo 3 CD changer support is turned off and 3170 /* by default Sanyo 3 CD changer support is turned off and
diff --git a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h
index 228b29c5d2e4..1b302fe2724d 100644
--- a/drivers/ide/ide-cd.h
+++ b/drivers/ide/ide-cd.h
@@ -91,7 +91,8 @@ struct ide_cd_config_flags {
91 __u8 close_tray : 1; /* can close the tray */ 91 __u8 close_tray : 1; /* can close the tray */
92 __u8 writing : 1; /* pseudo write in progress */ 92 __u8 writing : 1; /* pseudo write in progress */
93 __u8 mo_drive : 1; /* drive is an MO device */ 93 __u8 mo_drive : 1; /* drive is an MO device */
94 __u8 reserved : 2; 94 __u8 no_speed_select : 1; /* SET_CD_SPEED command is unsupported. */
95 __u8 reserved : 1;
95 byte max_speed; /* Max speed of the drive */ 96 byte max_speed; /* Max speed of the drive */
96}; 97};
97#define CDROM_CONFIG_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->config_flags)) 98#define CDROM_CONFIG_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->config_flags))