A couple fixes got clobbered, putting them back.
This commit is contained in:
parent
1a4e34498c
commit
aa26851c4f
@ -120,9 +120,9 @@ static int ixgbe_allocate_legacy(struct adapter *);
|
|||||||
static int ixgbe_allocate_queues(struct adapter *);
|
static int ixgbe_allocate_queues(struct adapter *);
|
||||||
static int ixgbe_setup_msix(struct adapter *);
|
static int ixgbe_setup_msix(struct adapter *);
|
||||||
static void ixgbe_free_pci_resources(struct adapter *);
|
static void ixgbe_free_pci_resources(struct adapter *);
|
||||||
static void ixgbe_local_timer(void *);
|
static void ixgbe_local_timer(void *);
|
||||||
static void ixgbe_setup_interface(device_t, struct adapter *);
|
static int ixgbe_setup_interface(device_t, struct adapter *);
|
||||||
static void ixgbe_config_link(struct adapter *);
|
static void ixgbe_config_link(struct adapter *);
|
||||||
|
|
||||||
static int ixgbe_allocate_transmit_buffers(struct tx_ring *);
|
static int ixgbe_allocate_transmit_buffers(struct tx_ring *);
|
||||||
static int ixgbe_setup_transmit_structures(struct adapter *);
|
static int ixgbe_setup_transmit_structures(struct adapter *);
|
||||||
@ -258,7 +258,7 @@ TUNABLE_INT("hw.ixgbe.enable_msix", &ixgbe_enable_msix);
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Header split: this causes the hardware to DMA
|
* Header split: this causes the hardware to DMA
|
||||||
* the header into a seperate mbuf from the payload,
|
* the header into a separate mbuf from the payload,
|
||||||
* it can be a performance win in some workloads, but
|
* it can be a performance win in some workloads, but
|
||||||
* in others it actually hurts, its off by default.
|
* in others it actually hurts, its off by default.
|
||||||
*/
|
*/
|
||||||
@ -519,6 +519,15 @@ ixgbe_attach(device_t dev)
|
|||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Allocate multicast array memory. */
|
||||||
|
adapter->mta = malloc(sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS *
|
||||||
|
MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT);
|
||||||
|
if (adapter->mta == NULL) {
|
||||||
|
device_printf(dev, "Can not allocate multicast setup array\n");
|
||||||
|
error = ENOMEM;
|
||||||
|
goto err_late;
|
||||||
|
}
|
||||||
|
|
||||||
/* Initialize the shared code */
|
/* Initialize the shared code */
|
||||||
error = ixgbe_init_shared_code(hw);
|
error = ixgbe_init_shared_code(hw);
|
||||||
if (error == IXGBE_ERR_SFP_NOT_PRESENT) {
|
if (error == IXGBE_ERR_SFP_NOT_PRESENT) {
|
||||||
@ -581,7 +590,8 @@ ixgbe_attach(device_t dev)
|
|||||||
goto err_late;
|
goto err_late;
|
||||||
|
|
||||||
/* Setup OS specific network interface */
|
/* Setup OS specific network interface */
|
||||||
ixgbe_setup_interface(dev, adapter);
|
if (ixgbe_setup_interface(dev, adapter) != 0)
|
||||||
|
goto err_late;
|
||||||
|
|
||||||
/* Sysctl for limiting the amount of work done in the taskqueue */
|
/* Sysctl for limiting the amount of work done in the taskqueue */
|
||||||
ixgbe_add_rx_process_limit(adapter, "rx_processing_limit",
|
ixgbe_add_rx_process_limit(adapter, "rx_processing_limit",
|
||||||
@ -627,7 +637,10 @@ err_late:
|
|||||||
ixgbe_free_transmit_structures(adapter);
|
ixgbe_free_transmit_structures(adapter);
|
||||||
ixgbe_free_receive_structures(adapter);
|
ixgbe_free_receive_structures(adapter);
|
||||||
err_out:
|
err_out:
|
||||||
|
if (adapter->ifp != NULL)
|
||||||
|
if_free(adapter->ifp);
|
||||||
ixgbe_free_pci_resources(adapter);
|
ixgbe_free_pci_resources(adapter);
|
||||||
|
free(adapter->mta, M_DEVBUF);
|
||||||
return (error);
|
return (error);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -698,6 +711,7 @@ ixgbe_detach(device_t dev)
|
|||||||
|
|
||||||
ixgbe_free_transmit_structures(adapter);
|
ixgbe_free_transmit_structures(adapter);
|
||||||
ixgbe_free_receive_structures(adapter);
|
ixgbe_free_receive_structures(adapter);
|
||||||
|
free(adapter->mta, M_DEVBUF);
|
||||||
|
|
||||||
IXGBE_CORE_LOCK_DESTROY(adapter);
|
IXGBE_CORE_LOCK_DESTROY(adapter);
|
||||||
return (0);
|
return (0);
|
||||||
@ -1791,7 +1805,7 @@ static void
|
|||||||
ixgbe_set_multi(struct adapter *adapter)
|
ixgbe_set_multi(struct adapter *adapter)
|
||||||
{
|
{
|
||||||
u32 fctrl;
|
u32 fctrl;
|
||||||
u8 mta[MAX_NUM_MULTICAST_ADDRESSES * IXGBE_ETH_LENGTH_OF_ADDRESS];
|
u8 *mta;
|
||||||
u8 *update_ptr;
|
u8 *update_ptr;
|
||||||
struct ifmultiaddr *ifma;
|
struct ifmultiaddr *ifma;
|
||||||
int mcnt = 0;
|
int mcnt = 0;
|
||||||
@ -1799,6 +1813,10 @@ ixgbe_set_multi(struct adapter *adapter)
|
|||||||
|
|
||||||
IOCTL_DEBUGOUT("ixgbe_set_multi: begin");
|
IOCTL_DEBUGOUT("ixgbe_set_multi: begin");
|
||||||
|
|
||||||
|
mta = adapter->mta;
|
||||||
|
bzero(mta, sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS *
|
||||||
|
MAX_NUM_MULTICAST_ADDRESSES);
|
||||||
|
|
||||||
fctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_FCTRL);
|
fctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_FCTRL);
|
||||||
fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
|
fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
|
||||||
if (ifp->if_flags & IFF_PROMISC)
|
if (ifp->if_flags & IFF_PROMISC)
|
||||||
@ -2345,7 +2363,7 @@ mem:
|
|||||||
* Setup networking device structure and register an interface.
|
* Setup networking device structure and register an interface.
|
||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
static void
|
static int
|
||||||
ixgbe_setup_interface(device_t dev, struct adapter *adapter)
|
ixgbe_setup_interface(device_t dev, struct adapter *adapter)
|
||||||
{
|
{
|
||||||
struct ixgbe_hw *hw = &adapter->hw;
|
struct ixgbe_hw *hw = &adapter->hw;
|
||||||
@ -2354,8 +2372,10 @@ ixgbe_setup_interface(device_t dev, struct adapter *adapter)
|
|||||||
INIT_DEBUGOUT("ixgbe_setup_interface: begin");
|
INIT_DEBUGOUT("ixgbe_setup_interface: begin");
|
||||||
|
|
||||||
ifp = adapter->ifp = if_alloc(IFT_ETHER);
|
ifp = adapter->ifp = if_alloc(IFT_ETHER);
|
||||||
if (ifp == NULL)
|
if (ifp == NULL) {
|
||||||
panic("%s: can not if_alloc()\n", device_get_nameunit(dev));
|
device_printf(dev, "can not allocate ifnet structure\n");
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
||||||
ifp->if_mtu = ETHERMTU;
|
ifp->if_mtu = ETHERMTU;
|
||||||
ifp->if_baudrate = 1000000000;
|
ifp->if_baudrate = 1000000000;
|
||||||
@ -2415,7 +2435,7 @@ ixgbe_setup_interface(device_t dev, struct adapter *adapter)
|
|||||||
ifmedia_add(&adapter->media, IFM_ETHER | IFM_AUTO, 0, NULL);
|
ifmedia_add(&adapter->media, IFM_ETHER | IFM_AUTO, 0, NULL);
|
||||||
ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO);
|
ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO);
|
||||||
|
|
||||||
return;
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -3663,7 +3683,7 @@ ixgbe_setup_receive_ring(struct rx_ring *rxr)
|
|||||||
|
|
||||||
rxbuf = &rxr->rx_buffers[j];
|
rxbuf = &rxr->rx_buffers[j];
|
||||||
/*
|
/*
|
||||||
** Dont allocate mbufs if not
|
** Don't allocate mbufs if not
|
||||||
** doing header split, its wasteful
|
** doing header split, its wasteful
|
||||||
*/
|
*/
|
||||||
if (rxr->hdr_split == FALSE)
|
if (rxr->hdr_split == FALSE)
|
||||||
@ -4495,14 +4515,14 @@ ixgbe_enable_intr(struct adapter *adapter)
|
|||||||
/* With RSS we use auto clear */
|
/* With RSS we use auto clear */
|
||||||
if (adapter->msix_mem) {
|
if (adapter->msix_mem) {
|
||||||
mask = IXGBE_EIMS_ENABLE_MASK;
|
mask = IXGBE_EIMS_ENABLE_MASK;
|
||||||
/* Dont autoclear Link */
|
/* Don't autoclear Link */
|
||||||
mask &= ~IXGBE_EIMS_OTHER;
|
mask &= ~IXGBE_EIMS_OTHER;
|
||||||
mask &= ~IXGBE_EIMS_LSC;
|
mask &= ~IXGBE_EIMS_LSC;
|
||||||
IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask);
|
IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Now enable all queues, this is done seperately to
|
** Now enable all queues, this is done separately to
|
||||||
** allow for handling the extended (beyond 32) MSIX
|
** allow for handling the extended (beyond 32) MSIX
|
||||||
** vectors that can be used by 82599
|
** vectors that can be used by 82599
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user