Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/dev/pci Pull up revision 1.17 (requested by bouyer in...
details: https://anonhg.NetBSD.org/src/rev/2011a96d2432
branches: netbsd-3
changeset: 576322:2011a96d2432
user: tron <tron%NetBSD.org@localhost>
date: Sun Jun 26 11:24:34 2005 +0000
description:
Pull up revision 1.17 (requested by bouyer in ticket #498):
Add quirk for SIS 96x that masquerade as a SIS503. Based on patch sent by
Robert Fuller in kern/30431, information found in the linux kernel.
While here, add SIS 965 to the table (from FreeBSD).
diffstat:
sys/dev/pci/siside.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diffs (42 lines):
diff -r 6861fb6a60fb -r 2011a96d2432 sys/dev/pci/siside.c
--- a/sys/dev/pci/siside.c Sun Jun 26 11:24:27 2005 +0000
+++ b/sys/dev/pci/siside.c Sun Jun 26 11:24:34 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siside.c,v 1.14 2005/02/27 00:27:34 perry Exp $ */
+/* $NetBSD: siside.c,v 1.14.2.1 2005/06/26 11:24:34 tron Exp $ */
/*
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -151,6 +151,7 @@
{PCI_PRODUCT_SIS_962, 0x00, 6, "962", SIS_TYPE_133NEW},
{PCI_PRODUCT_SIS_963, 0x00, 6, "963", SIS_TYPE_133NEW},
{PCI_PRODUCT_SIS_964, 0x00, 6, "964", SIS_TYPE_133NEW},
+ {PCI_PRODUCT_SIS_965, 0x00, 6, "965", SIS_TYPE_133NEW},
};
static struct sis_hostbr_type *sis_hostbr_type_match;
@@ -159,9 +160,24 @@
sis_hostbr_match(struct pci_attach_args *pa)
{
int i;
+ pcireg_t id, reg;
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_SIS)
return 0;
+ if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_SIS_85C503) {
+ reg = pci_conf_read(pa->pa_pc, pa->pa_tag, SIS96x_DETECT);
+ pci_conf_write(pa->pa_pc, pa->pa_tag, SIS96x_DETECT,
+ reg | SIS96x_DETECT_MASQ);
+ id = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_ID_REG);
+ if (((PCI_PRODUCT(id) & 0xfff0) != 0x0960)
+ && (PCI_PRODUCT(id) != 0x0018)) {
+ pci_conf_write(pa->pa_pc, pa->pa_tag, SIS96x_DETECT,
+ reg);
+ } else {
+ pa->pa_id = id;
+ }
+ }
+
sis_hostbr_type_match = NULL;
for (i = 0;
i < sizeof(sis_hostbr_type) / sizeof(sis_hostbr_type[0]);
Home |
Main Index |
Thread Index |
Old Index