]> git.hungrycats.org Git - linux/commitdiff
[PATCH] update SG_IO command table
authorJens Axboe <axboe@suse.de>
Mon, 23 Aug 2004 06:30:42 +0000 (23:30 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 06:30:42 +0000 (23:30 -0700)
Here's a better table of acceptable commands, I've added some more
commands.  Should be pretty complete from the cd/dvd side now.

drivers/block/scsi_ioctl.c
include/linux/cdrom.h

index 5f9db0bf49ce7bb645528d2bff0c9af2a88ad0cb..134305d148e3e62b4b17ecf42af1de2763ff5cf8 100644 (file)
@@ -127,12 +127,16 @@ static int verify_command(struct file *file, unsigned char *cmd)
                safe_for_read(MODE_SENSE),
                safe_for_read(MODE_SENSE_10),
                safe_for_read(START_STOP),
+               safe_for_read(GPCMD_VERIFY_10),
+               safe_for_read(VERIFY_16),
+               safe_for_read(READ_BUFFER),
 
                /* Audio CD commands */
                safe_for_read(GPCMD_PLAY_CD),
                safe_for_read(GPCMD_PLAY_AUDIO_10),
                safe_for_read(GPCMD_PLAY_AUDIO_MSF),
                safe_for_read(GPCMD_PLAY_AUDIO_TI),
+               safe_for_read(GPCMD_PAUSE_RESUME),
 
                /* CD/DVD data reading */
                safe_for_read(GPCMD_READ_CD),
@@ -146,6 +150,12 @@ static int verify_command(struct file *file, unsigned char *cmd)
                safe_for_read(GPCMD_READ_TOC_PMA_ATIP),
                safe_for_read(GPCMD_REPORT_KEY),
                safe_for_read(GPCMD_SCAN),
+               safe_for_read(GPCMD_GET_CONFIGURATION),
+               safe_for_read(GPCMD_READ_FORMAT_CAPACITIES),
+               safe_for_read(GPCMD_GET_EVENT_STATUS_NOTIFICATION),
+               safe_for_read(GPCMD_GET_PERFORMANCE),
+               safe_for_read(GPCMD_SEEK),
+               safe_for_read(GPCMD_STOP_PLAY_SCAN),
 
                /* Basic writing commands */
                safe_for_write(WRITE_6),
@@ -155,6 +165,23 @@ static int verify_command(struct file *file, unsigned char *cmd)
                safe_for_write(WRITE_VERIFY_12),
                safe_for_write(WRITE_16),
                safe_for_write(WRITE_LONG),
+               safe_for_write(ERASE),
+               safe_for_write(GPCMD_MODE_SELECT_10),
+               safe_for_write(MODE_SELECT),
+               safe_for_write(GPCMD_BLANK),
+               safe_for_write(GPCMD_CLOSE_TRACK),
+               safe_for_write(GPCMD_FLUSH_CACHE),
+               safe_for_write(GPCMD_FORMAT_UNIT),
+               safe_for_write(GPCMD_REPAIR_RZONE_TRACK),
+               safe_for_write(GPCMD_RESERVE_RZONE_TRACK),
+               safe_for_write(GPCMD_SEND_DVD_STRUCTURE),
+               safe_for_write(GPCMD_SEND_EVENT),
+               safe_for_write(GPCMD_SEND_KEY),
+               safe_for_write(GPCMD_SEND_OPC),
+               safe_for_write(GPCMD_SET_SPEED),
+               safe_for_write(GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL),
+               safe_for_write(GPCMD_LOAD_UNLOAD),
+               safe_for_write(GPCMD_SET_STREAMING),
        };
        unsigned char type = cmd_type[cmd[0]];
 
index 0e46b2d0de0bfe7ae9a51d3c88cf6f6104b7161b..bcc9410761d90ea871178e000eb1af8b4b4b656b 100644 (file)
@@ -466,9 +466,10 @@ struct cdrom_generic_command
 #define GPCMD_REPORT_KEY                   0xa4
 #define GPCMD_REQUEST_SENSE                0x03
 #define GPCMD_RESERVE_RZONE_TRACK          0x53
+#define GPCMD_SEND_CUE_SHEET               0x5d
 #define GPCMD_SCAN                         0xba
 #define GPCMD_SEEK                         0x2b
-#define GPCMD_SEND_DVD_STRUCTURE           0xad
+#define GPCMD_SEND_DVD_STRUCTURE           0xbf
 #define GPCMD_SEND_EVENT                   0xa2
 #define GPCMD_SEND_KEY                     0xa3
 #define GPCMD_SEND_OPC                     0x54