summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2007-03-21 16:40:37 +0000
committerkmacy <kmacy@FreeBSD.org>2007-03-21 16:40:37 +0000
commit0fdeee32deeba8bdafa7b3b73c4c2d765a4c19f0 (patch)
tree52785e06a140c95d8ad9a3221ca2d93d2bd9bf40 /sys/dev/cxgb
parent6a79d7c31122477bdfd44c16b5a210a66e445b67 (diff)
downloadFreeBSD-src-0fdeee32deeba8bdafa7b3b73c4c2d765a4c19f0.zip
FreeBSD-src-0fdeee32deeba8bdafa7b3b73c4c2d765a4c19f0.tar.gz
move call to t3_prep_adapter earlier in attach before msi-x setup occurs
this works around the fact that pci_config_{save,restore} doesn't adequately restore state for msi-x MFC after: 3 days
Diffstat (limited to 'sys/dev/cxgb')
-rw-r--r--sys/dev/cxgb/cxgb_main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c
index e5e7152..bb4d0cf 100644
--- a/sys/dev/cxgb/cxgb_main.c
+++ b/sys/dev/cxgb/cxgb_main.c
@@ -330,6 +330,12 @@ cxgb_controller_attach(device_t dev)
sc->bt = rman_get_bustag(sc->regs_res);
sc->bh = rman_get_bushandle(sc->regs_res);
sc->mmio_len = rman_get_size(sc->regs_res);
+
+ ai = cxgb_get_adapter_info(dev);
+ if (t3_prep_adapter(sc, ai, 1) < 0) {
+ error = ENODEV;
+ goto out;
+ }
/* Allocate the BAR for doing MSI-X. If it succeeds, try to allocate
* enough messages for the queue sets. If that fails, try falling
@@ -401,11 +407,6 @@ cxgb_controller_attach(device_t dev)
/* Create a periodic callout for checking adapter status */
callout_init_mtx(&sc->cxgb_tick_ch, &sc->lock, CALLOUT_RETURNUNLOCKED);
- ai = cxgb_get_adapter_info(dev);
- if (t3_prep_adapter(sc, ai, 1) < 0) {
- error = ENODEV;
- goto out;
- }
if (t3_check_fw_version(sc) != 0) {
/*
* Warn user that a firmware update will be attempted in init.
OpenPOWER on IntegriCloud