aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_sil.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-11-01 04:38:52 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-01 22:41:31 -0500
commitefdaedc443e935eda82e9e78a6e65d1f993d242f (patch)
tree8bcdc05ec85f7a9e7b0a5b1e5014ec21cf4e8aac /drivers/ata/sata_sil.c
parentad616ffbda8caf3ce76d2b43027e789d732abf48 (diff)
[PATCH] libata: implement ATA_EHI_PRINTINFO
Implement ehi flag ATA_EHI_PRINTINFO. This flag is set when device configuration needs to print out device info. This used to be handled by @print_info argument to ata_dev_configure() but LLDs also need to know about it in ->dev_config() callback. This patch replaces @print_info w/ ATA_EHI_PRINTINFO and make sata_sil print workaround messages only on the initial configuration. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_sil.c')
-rw-r--r--drivers/ata/sata_sil.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index ca8d99312472..f844a1faba18 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -534,6 +534,7 @@ static void sil_thaw(struct ata_port *ap)
534 */ 534 */
535static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) 535static void sil_dev_config(struct ata_port *ap, struct ata_device *dev)
536{ 536{
537 int print_info = ap->eh_context.i.flags & ATA_EHI_PRINTINFO;
537 unsigned int n, quirks = 0; 538 unsigned int n, quirks = 0;
538 unsigned char model_num[41]; 539 unsigned char model_num[41];
539 540
@@ -549,16 +550,18 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev)
549 if (slow_down || 550 if (slow_down ||
550 ((ap->flags & SIL_FLAG_MOD15WRITE) && 551 ((ap->flags & SIL_FLAG_MOD15WRITE) &&
551 (quirks & SIL_QUIRK_MOD15WRITE))) { 552 (quirks & SIL_QUIRK_MOD15WRITE))) {
552 ata_dev_printk(dev, KERN_INFO, "applying Seagate errata fix " 553 if (print_info)
553 "(mod15write workaround)\n"); 554 ata_dev_printk(dev, KERN_INFO, "applying Seagate "
555 "errata fix (mod15write workaround)\n");
554 dev->max_sectors = 15; 556 dev->max_sectors = 15;
555 return; 557 return;
556 } 558 }
557 559
558 /* limit to udma5 */ 560 /* limit to udma5 */
559 if (quirks & SIL_QUIRK_UDMA5MAX) { 561 if (quirks & SIL_QUIRK_UDMA5MAX) {
560 ata_dev_printk(dev, KERN_INFO, 562 if (print_info)
561 "applying Maxtor errata fix %s\n", model_num); 563 ata_dev_printk(dev, KERN_INFO, "applying Maxtor "
564 "errata fix %s\n", model_num);
562 dev->udma_mask &= ATA_UDMA5; 565 dev->udma_mask &= ATA_UDMA5;
563 return; 566 return;
564 } 567 }