diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 54f38c21dd95..ef5e6b6e6e69 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -1036,6 +1036,7 @@ static int ahci_deinit_port(struct ata_port *ap, const char **emsg) | |||
1036 | static int ahci_reset_controller(struct ata_host *host) | 1036 | static int ahci_reset_controller(struct ata_host *host) |
1037 | { | 1037 | { |
1038 | struct pci_dev *pdev = to_pci_dev(host->dev); | 1038 | struct pci_dev *pdev = to_pci_dev(host->dev); |
1039 | struct ahci_host_priv *hpriv = host->private_data; | ||
1039 | void __iomem *mmio = host->iomap[AHCI_PCI_BAR]; | 1040 | void __iomem *mmio = host->iomap[AHCI_PCI_BAR]; |
1040 | u32 tmp; | 1041 | u32 tmp; |
1041 | 1042 | ||
@@ -1078,8 +1079,10 @@ static int ahci_reset_controller(struct ata_host *host) | |||
1078 | 1079 | ||
1079 | /* configure PCS */ | 1080 | /* configure PCS */ |
1080 | pci_read_config_word(pdev, 0x92, &tmp16); | 1081 | pci_read_config_word(pdev, 0x92, &tmp16); |
1081 | tmp16 |= 0xf; | 1082 | if ((tmp16 & hpriv->port_map) != hpriv->port_map) { |
1082 | pci_write_config_word(pdev, 0x92, tmp16); | 1083 | tmp16 |= hpriv->port_map; |
1084 | pci_write_config_word(pdev, 0x92, tmp16); | ||
1085 | } | ||
1083 | } | 1086 | } |
1084 | 1087 | ||
1085 | return 0; | 1088 | return 0; |