aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-iops.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-15 13:01:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-15 13:01:16 -0400
commit0cb583fd2862f19ea88b02eb307d11c09e51e2f8 (patch)
tree740769ab145ed72af4d00ea8e4d55ebcef337fce /drivers/ide/ide-iops.c
parent723e9db7a46e328527cc3da2b478b831184fe828 (diff)
parenta2d10568fd3965fffeb29a3a6f29966dd3801727 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6: ide: fixup for fujitsu disk ide: convert to ->proc_fops at91_ide: remove headers specific for at91sam9263 IDE: palm_bk3710: convert clock usage after clkdev conversion ide: fix races in handling of user-space SET XFER commands ide: allow ide_dev_read_id() to be called from the IRQ context ide: ide-taskfile.c fix style problems drivers/ide/ide-cd.c: Use DIV_ROUND_CLOSEST ide-tape: fix handling of postponed rqs ide-tape: convert to ide_debug_log macro ide-tape: fix debug call ide: Fix annoying warning in ide_pio_bytes(). IDE: Save a call to PageHighMem()
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r--drivers/ide/ide-iops.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 2892b242bbe1..222c1ef65fb9 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;
@@ -292,6 +292,7 @@ static const char *nien_quirk_list[] = {
292 "QUANTUM FIREBALLP KX27.3", 292 "QUANTUM FIREBALLP KX27.3",
293 "QUANTUM FIREBALLP LM20.4", 293 "QUANTUM FIREBALLP LM20.4",
294 "QUANTUM FIREBALLP LM20.5", 294 "QUANTUM FIREBALLP LM20.5",
295 "FUJITSU MHZ2160BH G2",
295 NULL 296 NULL
296}; 297};
297 298
@@ -316,7 +317,7 @@ int ide_driveid_update(ide_drive_t *drive)
316 return 0; 317 return 0;
317 318
318 SELECT_MASK(drive, 1); 319 SELECT_MASK(drive, 1);
319 rc = ide_dev_read_id(drive, ATA_CMD_ID_ATA, id); 320 rc = ide_dev_read_id(drive, ATA_CMD_ID_ATA, id, 1);
320 SELECT_MASK(drive, 0); 321 SELECT_MASK(drive, 0);
321 322
322 if (rc) 323 if (rc)
@@ -363,14 +364,6 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
363 * this point (lost interrupt). 364 * this point (lost interrupt).
364 */ 365 */
365 366
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); 367 udelay(1);
375 tp_ops->dev_select(drive); 368 tp_ops->dev_select(drive);
376 SELECT_MASK(drive, 1); 369 SELECT_MASK(drive, 1);
@@ -394,8 +387,6 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
394 387
395 SELECT_MASK(drive, 0); 388 SELECT_MASK(drive, 0);
396 389
397 enable_irq(hwif->irq);
398
399 if (error) { 390 if (error) {
400 (void) ide_dump_status(drive, "set_drive_speed_status", stat); 391 (void) ide_dump_status(drive, "set_drive_speed_status", stat);
401 return error; 392 return error;