* [PATCH 2.6.19-rc4-mm2] sata_sis: slave support on SiS965
@ 2006-11-08 8:57 Uwe Koziolek
2006-11-08 13:24 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Koziolek @ 2006-11-08 8:57 UTC (permalink / raw)
To: jeff, Tejun Heo; +Cc: linux-ide
SiS965 and SiS180 chips must support slave mode,
SiS965L and SiS964 chips must not support slave mode.
SCR_STATUS for SATA ports in powerdown state fixed.
Now returning 0x0113 instead of 0x0117. Avoids problem
on detecting sata_sis controller.
Signed-off-by: Uwe Koziolek <uwe.koziolek@gmx.net>
--- a/drivers/ata/sata_sis.c 2006-11-04 22:54:37.000000000 +0100
+++ b/drivers/ata/sata_sis.c 2006-11-07 21:32:31.000000000 +0100
@@ -173,7 +173,7 @@
if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED))
pci_read_config_dword(pdev, cfg_addr+0x10, &val2);
- return val|val2;
+ return (val|val2) & 0xfffffffb; /* avoid problems with powerdowned ports */
}
static void sis_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val)
@@ -212,7 +212,7 @@
if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED))
val2 = inl(ap->ioaddr.scr_addr + (sc_reg * 4) + 0x10);
- return val | val2;
+ return (val | val2) & 0xfffffffb;
}
static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
@@ -239,7 +239,7 @@
static int printed_version;
struct ata_probe_ent *probe_ent = NULL;
int rc;
- u32 genctl;
+ u32 genctl, val;
struct ata_port_info pi = sis_port_info, *ppi[2] = { &pi, &pi };
int pci_dev_busy = 0;
u8 pmr;
@@ -285,17 +285,24 @@
if (ent->device != 0x182) {
if ((pmr & SIS_PMR_COMBINED) == 0) {
dev_printk(KERN_INFO, &pdev->dev,
- "Detected SiS 180/181 chipset in SATA mode\n");
+ "Detected SiS 180/181/964 chipset in SATA mode\n");
port2_start = 64;
}
else {
dev_printk(KERN_INFO, &pdev->dev,
"Detected SiS 180/181 chipset in combined mode\n");
port2_start=0;
+ pi.flags |= ATA_FLAG_SLAVE_POSS;
}
}
else {
- dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 182 chipset\n");
+ pci_read_config_dword ( pdev, 0x6C, &val);
+ if (val & (1L << 31)) {
+ dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 182/965 chipset\n");
+ pi.flags |= ATA_FLAG_SLAVE_POSS;
+ }
+ else
+ dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 182/965L chipset\n");
port2_start = 0x20;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.6.19-rc4-mm2] sata_sis: slave support on SiS965
2006-11-08 8:57 [PATCH 2.6.19-rc4-mm2] sata_sis: slave support on SiS965 Uwe Koziolek
@ 2006-11-08 13:24 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2006-11-08 13:24 UTC (permalink / raw)
To: Uwe Koziolek; +Cc: Tejun Heo, linux-ide
Uwe Koziolek wrote:
> SiS965 and SiS180 chips must support slave mode,
> SiS965L and SiS964 chips must not support slave mode.
>
> SCR_STATUS for SATA ports in powerdown state fixed.
> Now returning 0x0113 instead of 0x0117. Avoids problem
> on detecting sata_sis controller.
>
> Signed-off-by: Uwe Koziolek <uwe.koziolek@gmx.net>
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-08 13:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-08 8:57 [PATCH 2.6.19-rc4-mm2] sata_sis: slave support on SiS965 Uwe Koziolek
2006-11-08 13:24 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).