aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_sis.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_sis.c')
-rw-r--r--drivers/ata/sata_sis.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c
index ac24f66897f6..9b17375d8056 100644
--- a/drivers/ata/sata_sis.c
+++ b/drivers/ata/sata_sis.c
@@ -128,7 +128,7 @@ static const struct ata_port_operations sis_ops = {
128 128
129static struct ata_port_info sis_port_info = { 129static struct ata_port_info sis_port_info = {
130 .sht = &sis_sht, 130 .sht = &sis_sht,
131 .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, 131 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
132 .pio_mask = 0x1f, 132 .pio_mask = 0x1f,
133 .mwdma_mask = 0x7, 133 .mwdma_mask = 0x7,
134 .udma_mask = 0x7f, 134 .udma_mask = 0x7f,
@@ -158,7 +158,7 @@ static unsigned int get_scr_cfg_addr(unsigned int port_no, unsigned int sc_reg,
158 158
159static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg) 159static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg)
160{ 160{
161 struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); 161 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
162 unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, sc_reg, pdev->device); 162 unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, sc_reg, pdev->device);
163 u32 val, val2 = 0; 163 u32 val, val2 = 0;
164 u8 pmr; 164 u8 pmr;
@@ -178,7 +178,7 @@ static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg)
178 178
179static void sis_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val) 179static void sis_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val)
180{ 180{
181 struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); 181 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
182 unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, scr, pdev->device); 182 unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, scr, pdev->device);
183 u8 pmr; 183 u8 pmr;
184 184
@@ -195,7 +195,7 @@ static void sis_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val)
195 195
196static u32 sis_scr_read (struct ata_port *ap, unsigned int sc_reg) 196static u32 sis_scr_read (struct ata_port *ap, unsigned int sc_reg)
197{ 197{
198 struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); 198 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
199 u32 val, val2 = 0; 199 u32 val, val2 = 0;
200 u8 pmr; 200 u8 pmr;
201 201
@@ -217,7 +217,7 @@ static u32 sis_scr_read (struct ata_port *ap, unsigned int sc_reg)
217 217
218static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) 218static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
219{ 219{
220 struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); 220 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
221 u8 pmr; 221 u8 pmr;
222 222
223 if (sc_reg > SCR_CONTROL) 223 if (sc_reg > SCR_CONTROL)
@@ -275,17 +275,17 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
275 /* check and see if the SCRs are in IO space or PCI cfg space */ 275 /* check and see if the SCRs are in IO space or PCI cfg space */
276 pci_read_config_dword(pdev, SIS_GENCTL, &genctl); 276 pci_read_config_dword(pdev, SIS_GENCTL, &genctl);
277 if ((genctl & GENCTL_IOMAPPED_SCR) == 0) 277 if ((genctl & GENCTL_IOMAPPED_SCR) == 0)
278 probe_ent->host_flags |= SIS_FLAG_CFGSCR; 278 probe_ent->port_flags |= SIS_FLAG_CFGSCR;
279 279
280 /* if hardware thinks SCRs are in IO space, but there are 280 /* if hardware thinks SCRs are in IO space, but there are
281 * no IO resources assigned, change to PCI cfg space. 281 * no IO resources assigned, change to PCI cfg space.
282 */ 282 */
283 if ((!(probe_ent->host_flags & SIS_FLAG_CFGSCR)) && 283 if ((!(probe_ent->port_flags & SIS_FLAG_CFGSCR)) &&
284 ((pci_resource_start(pdev, SIS_SCR_PCI_BAR) == 0) || 284 ((pci_resource_start(pdev, SIS_SCR_PCI_BAR) == 0) ||
285 (pci_resource_len(pdev, SIS_SCR_PCI_BAR) < 128))) { 285 (pci_resource_len(pdev, SIS_SCR_PCI_BAR) < 128))) {
286 genctl &= ~GENCTL_IOMAPPED_SCR; 286 genctl &= ~GENCTL_IOMAPPED_SCR;
287 pci_write_config_dword(pdev, SIS_GENCTL, genctl); 287 pci_write_config_dword(pdev, SIS_GENCTL, genctl);
288 probe_ent->host_flags |= SIS_FLAG_CFGSCR; 288 probe_ent->port_flags |= SIS_FLAG_CFGSCR;
289 } 289 }
290 290
291 pci_read_config_byte(pdev, SIS_PMR, &pmr); 291 pci_read_config_byte(pdev, SIS_PMR, &pmr);
@@ -306,7 +306,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
306 port2_start = 0x20; 306 port2_start = 0x20;
307 } 307 }
308 308
309 if (!(probe_ent->host_flags & SIS_FLAG_CFGSCR)) { 309 if (!(probe_ent->port_flags & SIS_FLAG_CFGSCR)) {
310 probe_ent->port[0].scr_addr = 310 probe_ent->port[0].scr_addr =
311 pci_resource_start(pdev, SIS_SCR_PCI_BAR); 311 pci_resource_start(pdev, SIS_SCR_PCI_BAR);
312 probe_ent->port[1].scr_addr = 312 probe_ent->port[1].scr_addr =