aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-09-21 04:55:44 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:42 -0400
commitb6d6c74628767e1bd33c735b3b2ee7b132b4198e (patch)
treeba96a354766e1b16690bd567fb1b569e61610000 /drivers/ata
parent1e582ba4ef6264dd8cb73250ebff767d0624d684 (diff)
sata_via: kill SATA_PATA_SHARING register handling
The SATA_PATA_SHARING register doesn't have anything to do with the SATA part of the controller. It indicates whether an extern SATA PHY is attached to the PATA part of the controller and if so how it is wired. As the PATA part is driven by pata_via, sata_via has no reason to care about that. Also, pata_via should work fine under all configurations. This patch removes unnecessary attach failures. It seems recent via chipsets are defaulting to different values or are actually connected to SATA PHY triggering this more often. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_via.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index f0757023ce9d..1dc9b4f2b2dc 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -57,7 +57,6 @@ enum {
57 SATA_CHAN_ENAB = 0x40, /* SATA channel enable */ 57 SATA_CHAN_ENAB = 0x40, /* SATA channel enable */
58 SATA_INT_GATE = 0x41, /* SATA interrupt gating */ 58 SATA_INT_GATE = 0x41, /* SATA interrupt gating */
59 SATA_NATIVE_MODE = 0x42, /* Native mode enable */ 59 SATA_NATIVE_MODE = 0x42, /* Native mode enable */
60 SATA_PATA_SHARING = 0x49, /* PATA/SATA sharing func ctrl */
61 PATA_UDMA_TIMING = 0xB3, /* PATA timing for DMA/ cable detect */ 60 PATA_UDMA_TIMING = 0xB3, /* PATA timing for DMA/ cable detect */
62 PATA_PIO_TIMING = 0xAB, /* PATA timing register */ 61 PATA_PIO_TIMING = 0xAB, /* PATA timing register */
63 62
@@ -68,7 +67,6 @@ enum {
68 NATIVE_MODE_ALL = (1 << 7) | (1 << 6) | (1 << 5) | (1 << 4), 67 NATIVE_MODE_ALL = (1 << 7) | (1 << 6) | (1 << 5) | (1 << 4),
69 68
70 SATA_EXT_PHY = (1 << 6), /* 0==use PATA, 1==ext phy */ 69 SATA_EXT_PHY = (1 << 6), /* 0==use PATA, 1==ext phy */
71 SATA_2DEV = (1 << 5), /* SATA is master/slave */
72}; 70};
73 71
74static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); 72static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -508,7 +506,6 @@ static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
508 struct ata_host *host; 506 struct ata_host *host;
509 int board_id = (int) ent->driver_data; 507 int board_id = (int) ent->driver_data;
510 const int *bar_sizes; 508 const int *bar_sizes;
511 u8 tmp8;
512 509
513 if (!printed_version++) 510 if (!printed_version++)
514 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); 511 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
@@ -517,19 +514,10 @@ static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
517 if (rc) 514 if (rc)
518 return rc; 515 return rc;
519 516
520 if (board_id == vt6420) { 517 if (board_id == vt6420)
521 pci_read_config_byte(pdev, SATA_PATA_SHARING, &tmp8);
522 if (tmp8 & SATA_2DEV) {
523 dev_printk(KERN_ERR, &pdev->dev,
524 "SATA master/slave not supported (0x%x)\n",
525 (int) tmp8);
526 return -EIO;
527 }
528
529 bar_sizes = &svia_bar_sizes[0]; 518 bar_sizes = &svia_bar_sizes[0];
530 } else { 519 else
531 bar_sizes = &vt6421_bar_sizes[0]; 520 bar_sizes = &vt6421_bar_sizes[0];
532 }
533 521
534 for (i = 0; i < ARRAY_SIZE(svia_bar_sizes); i++) 522 for (i = 0; i < ARRAY_SIZE(svia_bar_sizes); i++)
535 if ((pci_resource_start(pdev, i) == 0) || 523 if ((pci_resource_start(pdev, i) == 0) ||