diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 12:01:28 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 12:01:28 -0500 |
commit | 9db73724453a9350e1c22dbe732d427e2939a5c9 (patch) | |
tree | 15e3ead6413ae97398a54292acc199bee0864d42 /drivers/ata/sata_sis.c | |
parent | 4c1ac1b49122b805adfa4efc620592f68dccf5db (diff) | |
parent | e62438630ca37539c8cc1553710bbfaa3cf960a7 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/ata/libata-scsi.c
include/linux/libata.h
Futher merge of Linus's head and compilation fixups.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/ata/sata_sis.c')
-rw-r--r-- | drivers/ata/sata_sis.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c index 9d1235ba06b1..9c25a1e91730 100644 --- a/drivers/ata/sata_sis.c +++ b/drivers/ata/sata_sis.c | |||
@@ -173,7 +173,7 @@ static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg) | |||
173 | if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) | 173 | if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) |
174 | pci_read_config_dword(pdev, cfg_addr+0x10, &val2); | 174 | pci_read_config_dword(pdev, cfg_addr+0x10, &val2); |
175 | 175 | ||
176 | return val|val2; | 176 | return (val|val2) & 0xfffffffb; /* avoid problems with powerdowned ports */ |
177 | } | 177 | } |
178 | 178 | ||
179 | static void sis_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val) | 179 | static void sis_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val) |
@@ -212,7 +212,7 @@ static u32 sis_scr_read (struct ata_port *ap, unsigned int sc_reg) | |||
212 | if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) | 212 | if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) |
213 | val2 = inl(ap->ioaddr.scr_addr + (sc_reg * 4) + 0x10); | 213 | val2 = inl(ap->ioaddr.scr_addr + (sc_reg * 4) + 0x10); |
214 | 214 | ||
215 | return val | val2; | 215 | return (val | val2) & 0xfffffffb; |
216 | } | 216 | } |
217 | 217 | ||
218 | static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | 218 | static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) |
@@ -239,7 +239,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
239 | static int printed_version; | 239 | static int printed_version; |
240 | struct ata_probe_ent *probe_ent = NULL; | 240 | struct ata_probe_ent *probe_ent = NULL; |
241 | int rc; | 241 | int rc; |
242 | u32 genctl; | 242 | u32 genctl, val; |
243 | struct ata_port_info pi = sis_port_info, *ppi[2] = { &pi, &pi }; | 243 | struct ata_port_info pi = sis_port_info, *ppi[2] = { &pi, &pi }; |
244 | int pci_dev_busy = 0; | 244 | int pci_dev_busy = 0; |
245 | u8 pmr; | 245 | u8 pmr; |
@@ -285,17 +285,24 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
285 | if (ent->device != 0x182) { | 285 | if (ent->device != 0x182) { |
286 | if ((pmr & SIS_PMR_COMBINED) == 0) { | 286 | if ((pmr & SIS_PMR_COMBINED) == 0) { |
287 | dev_printk(KERN_INFO, &pdev->dev, | 287 | dev_printk(KERN_INFO, &pdev->dev, |
288 | "Detected SiS 180/181 chipset in SATA mode\n"); | 288 | "Detected SiS 180/181/964 chipset in SATA mode\n"); |
289 | port2_start = 64; | 289 | port2_start = 64; |
290 | } | 290 | } |
291 | else { | 291 | else { |
292 | dev_printk(KERN_INFO, &pdev->dev, | 292 | dev_printk(KERN_INFO, &pdev->dev, |
293 | "Detected SiS 180/181 chipset in combined mode\n"); | 293 | "Detected SiS 180/181 chipset in combined mode\n"); |
294 | port2_start=0; | 294 | port2_start=0; |
295 | pi.flags |= ATA_FLAG_SLAVE_POSS; | ||
295 | } | 296 | } |
296 | } | 297 | } |
297 | else { | 298 | else { |
298 | dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 182 chipset\n"); | 299 | pci_read_config_dword ( pdev, 0x6C, &val); |
300 | if (val & (1L << 31)) { | ||
301 | dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 182/965 chipset\n"); | ||
302 | pi.flags |= ATA_FLAG_SLAVE_POSS; | ||
303 | } | ||
304 | else | ||
305 | dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 182/965L chipset\n"); | ||
299 | port2_start = 0x20; | 306 | port2_start = 0x20; |
300 | } | 307 | } |
301 | 308 | ||