aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-06-23 07:35:51 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-07 13:43:00 -0400
commit665d66e8fad60a5a162c4615f27f916ad1a6d567 (patch)
tree2e4f699f4fec1ca4010a39b9dd787fbd5f03b44d /include/linux/ide.h
parentfa56d4cb4022c8b313c3b99236e1b87effc3655b (diff)
ide: fix races in handling of user-space SET XFER commands
* Make cmd->tf_flags field 'u16' and add IDE_TFLAG_SET_XFER taskfile flag. * Update ide_finish_cmd() to set xfer / re-read id if the new flag is set. * Convert set_xfer_rate() (write handler for /proc/ide/hd?/current_speed) and ide_cmd_ioctl() (HDIO_DRIVE_CMD ioctl handler) to use the new flag. * Remove no longer needed disable_irq_nosync() + enable_irq() from ide_config_drive_speed(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index cb6cd0459a5e..803c1ae31237 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -258,6 +258,7 @@ enum {
258 IDE_TFLAG_DYN = (1 << 5), 258 IDE_TFLAG_DYN = (1 << 5),
259 IDE_TFLAG_FS = (1 << 6), 259 IDE_TFLAG_FS = (1 << 6),
260 IDE_TFLAG_MULTI_PIO = (1 << 7), 260 IDE_TFLAG_MULTI_PIO = (1 << 7),
261 IDE_TFLAG_SET_XFER = (1 << 8),
261}; 262};
262 263
263enum { 264enum {
@@ -294,7 +295,7 @@ struct ide_cmd {
294 } out, in; 295 } out, in;
295 } valid; 296 } valid;
296 297
297 u8 tf_flags; 298 u16 tf_flags;
298 u8 ftf_flags; /* for TASKFILE ioctl */ 299 u8 ftf_flags; /* for TASKFILE ioctl */
299 int protocol; 300 int protocol;
300 301