Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33533
b: refs/heads/master
c: 9dd9c16
h: refs/heads/master
i:
  33531: 18f23e6
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Aug 24, 2006
1 parent bf61059 commit 20c6df7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3745a3f9fa39fa3c62f7d5b8549ee787d2c6848
refs/heads/master: 9dd9c16465c82d1385f97d2a245641464fcb7894
21 changes: 20 additions & 1 deletion trunk/drivers/scsi/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,11 @@ MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(pci, piix_pci_tbl);
MODULE_VERSION(DRV_VERSION);

static int force_pcs = 0;
module_param(force_pcs, int, 0444);
MODULE_PARM_DESC(force_pcs, "force honoring or ignoring PCS to work around "
"device mis-detection (0=default, 1=ignore PCS, 2=honor PCS)");

/**
* piix_pata_cbl_detect - Probe host controller cable detect info
* @ap: Port for which cable detect info is desired
Expand Down Expand Up @@ -812,6 +817,7 @@ static int __devinit piix_check_450nx_errata(struct pci_dev *ata_dev)
}

static void __devinit piix_init_pcs(struct pci_dev *pdev,
struct ata_port_info *pinfo,
const struct piix_map_db *map_db)
{
u16 pcs, new_pcs;
Expand All @@ -825,6 +831,18 @@ static void __devinit piix_init_pcs(struct pci_dev *pdev,
pci_write_config_word(pdev, ICH5_PCS, new_pcs);
msleep(150);
}

if (force_pcs == 1) {
dev_printk(KERN_INFO, &pdev->dev,
"force ignoring PCS (0x%x)\n", new_pcs);
pinfo[0].host_flags |= PIIX_FLAG_IGNORE_PCS;
pinfo[1].host_flags |= PIIX_FLAG_IGNORE_PCS;
} else if (force_pcs == 2) {
dev_printk(KERN_INFO, &pdev->dev,
"force honoring PCS (0x%x)\n", new_pcs);
pinfo[0].host_flags &= ~PIIX_FLAG_IGNORE_PCS;
pinfo[1].host_flags &= ~PIIX_FLAG_IGNORE_PCS;
}
}

static void __devinit piix_init_sata_map(struct pci_dev *pdev,
Expand Down Expand Up @@ -933,7 +951,8 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if (host_flags & ATA_FLAG_SATA) {
piix_init_sata_map(pdev, port_info,
piix_map_db_table[ent->driver_data]);
piix_init_pcs(pdev, piix_map_db_table[ent->driver_data]);
piix_init_pcs(pdev, port_info,
piix_map_db_table[ent->driver_data]);
}

/* On ICH5, some BIOSen disable the interrupt using the
Expand Down

0 comments on commit 20c6df7

Please sign in to comment.