aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/hpt366.c2
-rw-r--r--drivers/ide/ide-eh.c5
-rw-r--r--drivers/ide/ide-io.c8
-rw-r--r--drivers/ide/ide-iops.c6
-rw-r--r--include/linux/ide.h2
5 files changed, 13 insertions, 10 deletions
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
index a2e9f6c65a93..7ce68ef6b904 100644
--- a/drivers/ide/hpt366.c
+++ b/drivers/ide/hpt366.c
@@ -727,7 +727,7 @@ static void hpt3xx_maskproc(ide_drive_t *drive, int mask)
727 struct pci_dev *dev = to_pci_dev(hwif->dev); 727 struct pci_dev *dev = to_pci_dev(hwif->dev);
728 struct hpt_info *info = hpt3xx_get_info(hwif->dev); 728 struct hpt_info *info = hpt3xx_get_info(hwif->dev);
729 729
730 if (drive->quirk_list == 0) 730 if ((drive->dev_flags & IDE_DFLAG_NIEN_QUIRK) == 0)
731 return; 731 return;
732 732
733 if (info->chip_type >= HPT370) { 733 if (info->chip_type >= HPT370) {
diff --git a/drivers/ide/ide-eh.c b/drivers/ide/ide-eh.c
index 39d589254d41..2b9141979613 100644
--- a/drivers/ide/ide-eh.c
+++ b/drivers/ide/ide-eh.c
@@ -407,8 +407,9 @@ static ide_startstop_t do_reset1(ide_drive_t *drive, int do_not_try_atapi)
407 /* more than enough time */ 407 /* more than enough time */
408 udelay(10); 408 udelay(10);
409 /* clear SRST, leave nIEN (unless device is on the quirk list) */ 409 /* clear SRST, leave nIEN (unless device is on the quirk list) */
410 tp_ops->write_devctl(hwif, (drive->quirk_list == 2 ? 0 : ATA_NIEN) | 410 tp_ops->write_devctl(hwif,
411 ATA_DEVCTL_OBS); 411 ((drive->dev_flags & IDE_DFLAG_NIEN_QUIRK) ? 0 : ATA_NIEN) |
412 ATA_DEVCTL_OBS);
412 /* more than enough time */ 413 /* more than enough time */
413 udelay(10); 414 udelay(10);
414 hwif->poll_timeout = jiffies + WAIT_WORSTCASE; 415 hwif->poll_timeout = jiffies + WAIT_WORSTCASE;
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 9654bd34cf52..243cf6561e7e 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -488,11 +488,15 @@ repeat:
488 488
489 if ((hwif->host->host_flags & IDE_HFLAG_SERIALIZE) && 489 if ((hwif->host->host_flags & IDE_HFLAG_SERIALIZE) &&
490 hwif != prev_port) { 490 hwif != prev_port) {
491 ide_drive_t *cur_dev =
492 prev_port ? prev_port->cur_dev : NULL;
493
491 /* 494 /*
492 * set nIEN for previous port, drives in the 495 * set nIEN for previous port, drives in the
493 * quirk_list may not like intr setups/cleanups 496 * quirk list may not like intr setups/cleanups
494 */ 497 */
495 if (prev_port && prev_port->cur_dev->quirk_list == 0) 498 if (cur_dev &&
499 (cur_dev->dev_flags & IDE_DFLAG_NIEN_QUIRK) == 0)
496 prev_port->tp_ops->write_devctl(prev_port, 500 prev_port->tp_ops->write_devctl(prev_port,
497 ATA_NIEN | 501 ATA_NIEN |
498 ATA_DEVCTL_OBS); 502 ATA_DEVCTL_OBS);
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index c55349537c27..fa047150a1c6 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -300,11 +300,9 @@ void ide_check_nien_quirk_list(ide_drive_t *drive)
300 300
301 for (list = nien_quirk_list; *list != NULL; list++) 301 for (list = nien_quirk_list; *list != NULL; list++)
302 if (strstr(m, *list) != NULL) { 302 if (strstr(m, *list) != NULL) {
303 drive->quirk_list = 2; 303 drive->dev_flags |= IDE_DFLAG_NIEN_QUIRK;
304 return; 304 return;
305 } 305 }
306
307 drive->quirk_list = 0;
308} 306}
309 307
310int ide_driveid_update(ide_drive_t *drive) 308int ide_driveid_update(ide_drive_t *drive)
@@ -389,7 +387,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
389 387
390 tp_ops->exec_command(hwif, ATA_CMD_SET_FEATURES); 388 tp_ops->exec_command(hwif, ATA_CMD_SET_FEATURES);
391 389
392 if (drive->quirk_list == 2) 390 if (drive->dev_flags & IDE_DFLAG_NIEN_QUIRK)
393 tp_ops->write_devctl(hwif, ATA_DEVCTL_OBS); 391 tp_ops->write_devctl(hwif, ATA_DEVCTL_OBS);
394 392
395 error = __ide_wait_stat(drive, drive->ready_stat, 393 error = __ide_wait_stat(drive, drive->ready_stat,
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 6caaae0c7743..a6c6a2fad7c8 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -499,6 +499,7 @@ enum {
499 /* write protect */ 499 /* write protect */
500 IDE_DFLAG_WP = (1 << 29), 500 IDE_DFLAG_WP = (1 << 29),
501 IDE_DFLAG_FORMAT_IN_PROGRESS = (1 << 30), 501 IDE_DFLAG_FORMAT_IN_PROGRESS = (1 << 30),
502 IDE_DFLAG_NIEN_QUIRK = (1 << 31),
502}; 503};
503 504
504struct ide_drive_s { 505struct ide_drive_s {
@@ -530,7 +531,6 @@ struct ide_drive_s {
530 u8 waiting_for_dma; /* dma currently in progress */ 531 u8 waiting_for_dma; /* dma currently in progress */
531 u8 dma; /* atapi dma flag */ 532 u8 dma; /* atapi dma flag */
532 533
533 u8 quirk_list; /* considered quirky, set for a specific host */
534 u8 init_speed; /* transfer rate set at boot */ 534 u8 init_speed; /* transfer rate set at boot */
535 u8 current_speed; /* current transfer rate set */ 535 u8 current_speed; /* current transfer rate set */
536 u8 desired_speed; /* desired transfer rate set */ 536 u8 desired_speed; /* desired transfer rate set */