Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3cbd814ef3d4c80392377e6ce5816058258f1484
Commit:     3cbd814ef3d4c80392377e6ce5816058258f1484
Parent:     a1c6d28c2b3ec919c37cb7026ed8af70fe7cb098
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 24 15:23:43 2007 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Mon Dec 24 15:23:43 2007 +0100

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-cd.c |    5 ++++-
 drivers/ide/ide-cd.h |    3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 92ac658..249834b 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)
        if (!CDROM_CONFIG_FLAGS(drive)->ram)
                devinfo->mask |= CDC_RAM;
 
+       if (CDROM_CONFIG_FLAGS(drive)->no_speed_select)
+               devinfo->mask |= CDC_SELECT_SPEED;
+
        devinfo->disk = info->disk;
        return register_cdrom(devinfo);
 }
@@ -3161,7 +3164,7 @@ int ide_cdrom_setup (ide_drive_t *drive)
                CDROM_CONFIG_FLAGS(drive)->limit_nframes = 1;
        /* the 3231 model does not support the SET_CD_SPEED command */
        else if (!strcmp(drive->id->model, "SAMSUNG CD-ROM SCR-3231"))
-               cdi->mask |= CDC_SELECT_SPEED;
+               CDROM_CONFIG_FLAGS(drive)->no_speed_select = 1;
 
 #if ! STANDARD_ATAPI
        /* 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 228b29c..1b302fe 100644
--- a/drivers/ide/ide-cd.h
+++ b/drivers/ide/ide-cd.h
@@ -91,7 +91,8 @@ struct ide_cd_config_flags {
        __u8 close_tray         : 1; /* can close the tray */
        __u8 writing            : 1; /* pseudo write in progress */
        __u8 mo_drive           : 1; /* drive is an MO device */
-       __u8 reserved           : 2;
+       __u8 no_speed_select    : 1; /* SET_CD_SPEED command is unsupported. */
+       __u8 reserved           : 1;
        byte max_speed;              /* Max speed of the drive */
 };
 #define CDROM_CONFIG_FLAGS(drive) (&(((struct cdrom_info 
*)(drive->driver_data))->config_flags))
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to