diff options
author | emaste <emaste@FreeBSD.org> | 2008-04-01 20:53:32 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2008-04-01 20:53:32 +0000 |
commit | 40129db5502e314eafc68a73d874ad95b8d67165 (patch) | |
tree | 9d19b983b373dcfba5dc819e87fb49a7029edc09 /sys/dev/aac | |
parent | e00250d54df28554beb287ad715e9a5dd2e7cb65 (diff) | |
download | FreeBSD-src-40129db5502e314eafc68a73d874ad95b8d67165.zip FreeBSD-src-40129db5502e314eafc68a73d874ad95b8d67165.tar.gz |
Calling RequestSupplementAdapterInfo before RequestAdapterInfo appears
to trip a bug causing the latter to return a zeroed struct
aac_adapter_info. This causes two issues. One is cosmetic only --
a verbose boot prints information about the controller, and shows all
zero:
aac0: Unknown processor 0MHz, 0MB memory (0MB cache, 0MB execution),
unknown battery platform
The second problem is that the firmware version information is stored
away for aac_rev_check, for userland tools (like aaccli) to query via
the FSACTL_MINIPORT_REV_CHECK and FSACTL_LNX_MINIPORT_REV_CHECK ioctls.
When aaccli encounters this issue it prints
Command Error: <The current AFAAPI.DLL is too old to work with the
current controller software.>
Move the RequestSupplementAdapterInfo call after RequestAdapterInfo,
which seems to fix both problems.
Diffstat (limited to 'sys/dev/aac')
-rw-r--r-- | sys/dev/aac/aac.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 8f29262..a26397a 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -2768,22 +2768,6 @@ aac_describe_controller(struct aac_softc *sc) mtx_lock(&sc->aac_io_lock); aac_alloc_sync_fib(sc, &fib); - if (sc->supported_options & AAC_SUPPORTED_SUPPLEMENT_ADAPTER_INFO) { - fib->data[0] = 0; - if (aac_sync_fib(sc, RequestSupplementAdapterInfo, 0, fib, 1)) - device_printf(sc->aac_dev, - "RequestSupplementAdapterInfo failed\n"); - else - adapter_type = ((struct aac_supplement_adapter_info *) - &fib->data[0])->AdapterTypeText; - } - device_printf(sc->aac_dev, "%s, aac driver %d.%d.%d-%d\n", - adapter_type, - AAC_DRIVER_VERSION >> 24, - (AAC_DRIVER_VERSION >> 16) & 0xFF, - AAC_DRIVER_VERSION & 0xFF, - AAC_DRIVER_BUILD); - fib->data[0] = 0; if (aac_sync_fib(sc, RequestAdapterInfo, 0, fib, 1)) { device_printf(sc->aac_dev, "RequestAdapterInfo failed\n"); @@ -2796,7 +2780,6 @@ aac_describe_controller(struct aac_softc *sc) info = (struct aac_adapter_info *)&fib->data[0]; sc->aac_revision = info->KernelRevision; - if (bootverbose) { device_printf(sc->aac_dev, "%s %dMHz, %dMB memory " "(%dMB cache, %dMB execution), %s\n", @@ -2838,6 +2821,23 @@ aac_describe_controller(struct aac_softc *sc) "\23ARRAY64BIT" "\24HEATSENSOR"); } + + if (sc->supported_options & AAC_SUPPORTED_SUPPLEMENT_ADAPTER_INFO) { + fib->data[0] = 0; + if (aac_sync_fib(sc, RequestSupplementAdapterInfo, 0, fib, 1)) + device_printf(sc->aac_dev, + "RequestSupplementAdapterInfo failed\n"); + else + adapter_type = ((struct aac_supplement_adapter_info *) + &fib->data[0])->AdapterTypeText; + } + device_printf(sc->aac_dev, "%s, aac driver %d.%d.%d-%d\n", + adapter_type, + AAC_DRIVER_VERSION >> 24, + (AAC_DRIVER_VERSION >> 16) & 0xFF, + AAC_DRIVER_VERSION & 0xFF, + AAC_DRIVER_BUILD); + aac_release_sync_fib(sc); mtx_unlock(&sc->aac_io_lock); } |