aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-iops.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-06-23 07:29:11 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-07 13:42:59 -0400
commitfa56d4cb4022c8b313c3b99236e1b87effc3655b (patch)
treeb51b1e66ac75b1412f57f7e41e3aff4bc8f0f0f7 /drivers/ide/ide-iops.c
parent2d5abcedeb41f4af9582c60cef70749c3ab90a3b (diff)
ide: allow ide_dev_read_id() to be called from the IRQ context
* Un-static __ide_wait_stat(). * Allow ide_dev_read_id() helper to be called from the IRQ context by adding irq_ctx flag and using mdelay()/__ide_wait_stat() when needed. * Switch ide_driveid_update() to set irq_ctx flag. This change is needed for the consecutive patch which fixes races in handling of user-space SET XFER commands but for improved bisectability and clarity it is better to do it in a separate patch. 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 2892b242bbe1..b99873845d21 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -102,8 +102,8 @@ EXPORT_SYMBOL(ide_fixstring);
102 * setting a timer to wake up at half second intervals thereafter, 102 * setting a timer to wake up at half second intervals thereafter,
103 * until timeout is achieved, before timing out. 103 * until timeout is achieved, before timing out.
104 */ 104 */
105static int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad, 105int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad,
106 unsigned long timeout, u8 *rstat) 106 unsigned long timeout, u8 *rstat)
107{ 107{
108 ide_hwif_t *hwif = drive->hwif; 108 ide_hwif_t *hwif = drive->hwif;
109 const struct ide_tp_ops *tp_ops = hwif->tp_ops; 109 const struct ide_tp_ops *tp_ops = hwif->tp_ops;
@@ -316,7 +316,7 @@ int ide_driveid_update(ide_drive_t *drive)
316 return 0; 316 return 0;
317 317
318 SELECT_MASK(drive, 1); 318 SELECT_MASK(drive, 1);
319 rc = ide_dev_read_id(drive, ATA_CMD_ID_ATA, id); 319 rc = ide_dev_read_id(drive, ATA_CMD_ID_ATA, id, 1);
320 SELECT_MASK(drive, 0); 320 SELECT_MASK(drive, 0);
321 321
322 if (rc) 322 if (rc)