diff options
author | Sean Bruno <sbruno@FreeBSD.org> | 2017-01-12 14:18:52 +0000 |
---|---|---|
committer | Sean Bruno <sbruno@FreeBSD.org> | 2017-01-12 14:18:52 +0000 |
commit | 8bc3dfc424be63d68c4e7220e41b75d87ac19158 (patch) | |
tree | 453b104a9b89e59a3de2bc28d607fc59554e40db /sys/dev/e1000 | |
parent | 58223d5b7a5a168eeff5ae7ca2bf85cb185746ca (diff) | |
download | src-8bc3dfc424be63d68c4e7220e41b75d87ac19158.tar.gz src-8bc3dfc424be63d68c4e7220e41b75d87ac19158.zip |
Attempt to use the "new" BAR address for newer igb(4) devices. This code
was dropped during the IFLIB migration.
Reported by: olivier
Reviewed by: mmacy@nextbsd.org
Notes
Notes:
svn path=/head/; revision=311978
Diffstat (limited to 'sys/dev/e1000')
-rw-r--r-- | sys/dev/e1000/if_em.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 629ae91025d3..c498354b7f86 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -770,6 +770,8 @@ em_if_attach_pre(if_ctx_t ctx) if (adapter->hw.mac.type >= igb_mac_min) { + int try_second_bar; + scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); scctx->isc_txrx = &igb_txrx; @@ -779,6 +781,15 @@ em_if_attach_pre(if_ctx_t ctx) if (adapter->hw.mac.type != e1000_82575) scctx->isc_tx_csum_flags |= CSUM_SCTP | CSUM_IP6_SCTP; + /* + ** Some new devices, as with ixgbe, now may + ** use a different BAR, so we need to keep + ** track of which is used. + */ + try_second_bar = pci_read_config(dev, scctx->isc_msix_bar, 4); + if (try_second_bar == 0) + scctx->isc_msix_bar += 4; + } else if (adapter->hw.mac.type >= em_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); |