diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-06-23 07:35:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-07 13:43:00 -0400 |
commit | 665d66e8fad60a5a162c4615f27f916ad1a6d567 (patch) | |
tree | 2e4f699f4fec1ca4010a39b9dd787fbd5f03b44d /drivers/ide/ide-iops.c | |
parent | fa56d4cb4022c8b313c3b99236e1b87effc3655b (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 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index b99873845d21..b14fa9a87c49 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -363,14 +363,6 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
363 | * this point (lost interrupt). | 363 | * this point (lost interrupt). |
364 | */ | 364 | */ |
365 | 365 | ||
366 | /* | ||
367 | * FIXME: we race against the running IRQ here if | ||
368 | * this is called from non IRQ context. If we use | ||
369 | * disable_irq() we hang on the error path. Work | ||
370 | * is needed. | ||
371 | */ | ||
372 | disable_irq_nosync(hwif->irq); | ||
373 | |||
374 | udelay(1); | 366 | udelay(1); |
375 | tp_ops->dev_select(drive); | 367 | tp_ops->dev_select(drive); |
376 | SELECT_MASK(drive, 1); | 368 | SELECT_MASK(drive, 1); |
@@ -394,8 +386,6 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
394 | 386 | ||
395 | SELECT_MASK(drive, 0); | 387 | SELECT_MASK(drive, 0); |
396 | 388 | ||
397 | enable_irq(hwif->irq); | ||
398 | |||
399 | if (error) { | 389 | if (error) { |
400 | (void) ide_dump_status(drive, "set_drive_speed_status", stat); | 390 | (void) ide_dump_status(drive, "set_drive_speed_status", stat); |
401 | return error; | 391 | return error; |