aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/pci/sis5513.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 45666b45231a..f9117a83fcf0 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/ide/pci/sis5513.c Version 0.29 Aug 1, 2007 2 * linux/drivers/ide/pci/sis5513.c Version 0.30 Aug 9, 2007
3 * 3 *
4 * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org> 4 * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org>
5 * Copyright (C) 2002 Lionel Bouton <Lionel.Bouton@inet6.fr>, Maintainer 5 * Copyright (C) 2002 Lionel Bouton <Lionel.Bouton@inet6.fr>, Maintainer
@@ -522,20 +522,19 @@ static void sis_program_timings(ide_drive_t *drive, const u8 mode)
522 sis_ata133_program_timings(drive, mode); 522 sis_ata133_program_timings(drive, mode);
523} 523}
524 524
525/* Enables per-drive prefetch and postwrite */
526static void config_drive_art_rwp (ide_drive_t *drive) 525static void config_drive_art_rwp (ide_drive_t *drive)
527{ 526{
528 ide_hwif_t *hwif = HWIF(drive); 527 ide_hwif_t *hwif = HWIF(drive);
529 struct pci_dev *dev = hwif->pci_dev; 528 struct pci_dev *dev = hwif->pci_dev;
530
531 u8 reg4bh = 0; 529 u8 reg4bh = 0;
532 u8 rw_prefetch = (0x11 << drive->dn); 530 u8 rw_prefetch = 0;
533 531
534 if (drive->media != ide_disk)
535 return;
536 pci_read_config_byte(dev, 0x4b, &reg4bh); 532 pci_read_config_byte(dev, 0x4b, &reg4bh);
537 533
538 if ((reg4bh & rw_prefetch) != rw_prefetch) 534 if (drive->media == ide_disk)
535 rw_prefetch = 0x11 << drive->dn;
536
537 if ((reg4bh & (0x11 << drive->dn)) != rw_prefetch)
539 pci_write_config_byte(dev, 0x4b, reg4bh|rw_prefetch); 538 pci_write_config_byte(dev, 0x4b, reg4bh|rw_prefetch);
540} 539}
541 540