Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/e1000/if_em.c
Show First 20 Lines • Show All 841 Lines • ▼ Show 20 Lines | scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_TSO | | ||||
CSUM_IP6_TCP | CSUM_IP6_UDP; | CSUM_IP6_TCP | CSUM_IP6_UDP; | ||||
if (adapter->hw.mac.type != e1000_82575) | if (adapter->hw.mac.type != e1000_82575) | ||||
scctx->isc_tx_csum_flags |= CSUM_SCTP | CSUM_IP6_SCTP; | scctx->isc_tx_csum_flags |= CSUM_SCTP | CSUM_IP6_SCTP; | ||||
/* | /* | ||||
** Some new devices, as with ixgbe, now may | ** Some new devices, as with ixgbe, now may | ||||
** use a different BAR, so we need to keep | ** use a different BAR, so we need to keep | ||||
** track of which is used. | ** track of which is used. | ||||
*/ | */ | ||||
scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); | scctx->isc_msix_bar = pci_msix_table_bar(dev); | ||||
if (pci_read_config(dev, scctx->isc_msix_bar, 4) == 0) | |||||
scctx->isc_msix_bar += 4; | |||||
} else if (adapter->hw.mac.type >= em_mac_min) { | } 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_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); | scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); | ||||
scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); | scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); | ||||
scctx->isc_rxd_size[0] = sizeof(union e1000_rx_desc_extended); | scctx->isc_rxd_size[0] = sizeof(union e1000_rx_desc_extended); | ||||
scctx->isc_txrx = &em_txrx; | scctx->isc_txrx = &em_txrx; | ||||
scctx->isc_tx_tso_segments_max = EM_MAX_SCATTER; | scctx->isc_tx_tso_segments_max = EM_MAX_SCATTER; | ||||
scctx->isc_tx_tso_size_max = EM_TSO_SIZE; | scctx->isc_tx_tso_size_max = EM_TSO_SIZE; | ||||
Show All 17 Lines | if (adapter->hw.mac.type >= igb_mac_min) { | ||||
*/ | */ | ||||
scctx->isc_capenable &= ~(IFCAP_TSO4 | IFCAP_VLAN_HWTSO); | scctx->isc_capenable &= ~(IFCAP_TSO4 | IFCAP_VLAN_HWTSO); | ||||
scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO; | scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO; | ||||
/* | /* | ||||
* We support MSI-X with 82574 only, but indicate to iflib(4) | * We support MSI-X with 82574 only, but indicate to iflib(4) | ||||
* that it shall give MSI at least a try with other devices. | * that it shall give MSI at least a try with other devices. | ||||
*/ | */ | ||||
if (adapter->hw.mac.type == e1000_82574) { | if (adapter->hw.mac.type == e1000_82574) { | ||||
scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); | scctx->isc_msix_bar = pci_msix_table_bar(dev);; | ||||
} else { | } else { | ||||
scctx->isc_msix_bar = -1; | scctx->isc_msix_bar = -1; | ||||
scctx->isc_disable_msix = 1; | scctx->isc_disable_msix = 1; | ||||
} | } | ||||
} else { | } else { | ||||
scctx->isc_txqsizes[0] = roundup2((scctx->isc_ntxd[0] + 1) * sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); | scctx->isc_txqsizes[0] = roundup2((scctx->isc_ntxd[0] + 1) * sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); | ||||
scctx->isc_rxqsizes[0] = roundup2((scctx->isc_nrxd[0] + 1) * sizeof(struct e1000_rx_desc), EM_DBA_ALIGN); | scctx->isc_rxqsizes[0] = roundup2((scctx->isc_nrxd[0] + 1) * sizeof(struct e1000_rx_desc), EM_DBA_ALIGN); | ||||
scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); | scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); | ||||
▲ Show 20 Lines • Show All 3,749 Lines • Show Last 20 Lines |