summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_sisreg.h
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2003-07-09 02:09:09 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2003-07-09 02:09:09 +0000
commitd0fac13d5eee2d09ec9bad252924e89e06641805 (patch)
tree880bdb14c9ee021e33878cc584b57ec875899305 /sys/dev/pci/if_sisreg.h
parentf627d46b9636131a36e23618f0ea65fbe59decfa (diff)
Fix problems with ICS1893 PHY and some sis chipsets.
Partial re-sync with FreeBSD, from Jeorg Sonnenberger. Tested by Jeorg, Henning@, Paul de Weerd, Otto@, and myself. ok henning@ deraadt@
Diffstat (limited to 'sys/dev/pci/if_sisreg.h')
-rw-r--r--sys/dev/pci/if_sisreg.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/sys/dev/pci/if_sisreg.h b/sys/dev/pci/if_sisreg.h
index 43bf524f640..c47be3299ca 100644
--- a/sys/dev/pci/if_sisreg.h
+++ b/sys/dev/pci/if_sisreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sisreg.h,v 1.12 2003/06/30 02:52:09 avsm Exp $ */
+/* $OpenBSD: if_sisreg.h,v 1.13 2003/07/09 02:09:08 krw Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@@ -120,6 +120,10 @@
#define SIS_EECTL_CLK 0x00000004
#define SIS_EECTL_CSEL 0x00000008
+#define SIS_MII_CLK 0x00000040
+#define SIS_MII_DIR 0x00000020
+#define SIS_MII_DATA 0x00000010
+
#define SIS_EECMD_WRITE 0x140
#define SIS_EECMD_READ 0x180
#define SIS_EECMD_ERASE 0x1c0
@@ -380,6 +384,23 @@ struct sis_type {
char *sis_name;
};
+struct sis_mii_frame {
+ u_int8_t mii_stdelim;
+ u_int8_t mii_opcode;
+ u_int8_t mii_phyaddr;
+ u_int8_t mii_regaddr;
+ u_int8_t mii_turnaround;
+ u_int16_t mii_data;
+};
+
+/*
+ * MII constants
+ */
+#define SIS_MII_STARTDELIM 0x01
+#define SIS_MII_READOP 0x02
+#define SIS_MII_WRITEOP 0x01
+#define SIS_MII_TURNAROUND 0x02
+
#define SIS_TYPE_900 1
#define SIS_TYPE_7016 2
#define SIS_TYPE_83815 3