From acebe0cb2c70f287b34b770fa4e5917edadafb6a Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sun, 14 Nov 2004 20:17:01 +0000 Subject: [PATCH] Commit more debugging output. This is a little bit of using a large hammer, but sk(4) is so prevalent on AMD64 motherboards we need to reduce the number of round trips in the mailing lists trying to get sufficient information to make sure we've got a handle on all the problems and are working towards making sk(4) solid. Submitted by: bz --- sys/dev/sk/if_sk.c | 10 ++++++++++ sys/pci/if_sk.c | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index ab4bdd14c0d..7f577d7390f 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -1598,6 +1598,10 @@ skc_attach(dev) } sc->sk_rboff = SK_RBOFF_0; } + device_printf(dev, "type = %s\n", + (sc->sk_type == SK_GENESIS) ? "GENESIS" : "YUKON"); + device_printf(dev, "SK_EPROM0 = 0x%02x\n", skrs); + device_printf(dev, "SRAM size = 0x%06x\n", sc->sk_ramsize); /* Read and save physical media type */ switch(sk_win_read_1(sc, SK_PMDTYPE)) { @@ -1650,6 +1654,12 @@ skc_attach(dev) } } } + + /* read CHIPVER 0xb1. */ + device_printf(dev, "chip ver 0x%02x\n", sk_win_read_1(sc, SK_CHIPVER)); + /* read CONFIG 0x73. */ + device_printf(dev, "chip conf 0x%02x\n", sk_win_read_1(sc, SK_CONFIG)); + sc->sk_devs[SK_PORT_A] = device_add_child(dev, "sk", -1); port = malloc(sizeof(int), M_DEVBUF, M_NOWAIT); *port = SK_PORT_A; diff --git a/sys/pci/if_sk.c b/sys/pci/if_sk.c index ab4bdd14c0d..7f577d7390f 100644 --- a/sys/pci/if_sk.c +++ b/sys/pci/if_sk.c @@ -1598,6 +1598,10 @@ skc_attach(dev) } sc->sk_rboff = SK_RBOFF_0; } + device_printf(dev, "type = %s\n", + (sc->sk_type == SK_GENESIS) ? "GENESIS" : "YUKON"); + device_printf(dev, "SK_EPROM0 = 0x%02x\n", skrs); + device_printf(dev, "SRAM size = 0x%06x\n", sc->sk_ramsize); /* Read and save physical media type */ switch(sk_win_read_1(sc, SK_PMDTYPE)) { @@ -1650,6 +1654,12 @@ skc_attach(dev) } } } + + /* read CHIPVER 0xb1. */ + device_printf(dev, "chip ver 0x%02x\n", sk_win_read_1(sc, SK_CHIPVER)); + /* read CONFIG 0x73. */ + device_printf(dev, "chip conf 0x%02x\n", sk_win_read_1(sc, SK_CONFIG)); + sc->sk_devs[SK_PORT_A] = device_add_child(dev, "sk", -1); port = malloc(sizeof(int), M_DEVBUF, M_NOWAIT); *port = SK_PORT_A;