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.
This commit is contained in:
parent
d44c4da7eb
commit
55aa113659
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177845
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user