Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ixgbe/if_ix.c
| Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | |||||
| static int ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, | static int ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, | ||||
| uint64_t *paddrs, int nrxqs, int nrxqsets); | uint64_t *paddrs, int nrxqs, int nrxqsets); | ||||
| static void ixgbe_if_queues_free(if_ctx_t ctx); | static void ixgbe_if_queues_free(if_ctx_t ctx); | ||||
| static void ixgbe_if_timer(if_ctx_t ctx, uint16_t); | static void ixgbe_if_timer(if_ctx_t ctx, uint16_t); | ||||
| static void ixgbe_if_update_admin_status(if_ctx_t ctx); | static void ixgbe_if_update_admin_status(if_ctx_t ctx); | ||||
| static void ixgbe_if_vlan_register(if_ctx_t ctx, u16 vtag); | static void ixgbe_if_vlan_register(if_ctx_t ctx, u16 vtag); | ||||
| static void ixgbe_if_vlan_unregister(if_ctx_t ctx, u16 vtag); | static void ixgbe_if_vlan_unregister(if_ctx_t ctx, u16 vtag); | ||||
| static int ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req); | static int ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req); | ||||
| static bool ixgbe_if_needs_restart(if_ctx_t ctx, enum iflib_restart_event event); | |||||
| int ixgbe_intr(void *arg); | int ixgbe_intr(void *arg); | ||||
| /************************************************************************ | /************************************************************************ | ||||
| * Function prototypes | * Function prototypes | ||||
| ************************************************************************/ | ************************************************************************/ | ||||
| #if __FreeBSD_version >= 1100036 | #if __FreeBSD_version >= 1100036 | ||||
| static uint64_t ixgbe_if_get_counter(if_ctx_t, ift_counter); | static uint64_t ixgbe_if_get_counter(if_ctx_t, ift_counter); | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | static device_method_t ixgbe_if_methods[] = { | ||||
| DEVMETHOD(ifdi_media_status, ixgbe_if_media_status), | DEVMETHOD(ifdi_media_status, ixgbe_if_media_status), | ||||
| DEVMETHOD(ifdi_media_change, ixgbe_if_media_change), | DEVMETHOD(ifdi_media_change, ixgbe_if_media_change), | ||||
| DEVMETHOD(ifdi_promisc_set, ixgbe_if_promisc_set), | DEVMETHOD(ifdi_promisc_set, ixgbe_if_promisc_set), | ||||
| DEVMETHOD(ifdi_timer, ixgbe_if_timer), | DEVMETHOD(ifdi_timer, ixgbe_if_timer), | ||||
| DEVMETHOD(ifdi_vlan_register, ixgbe_if_vlan_register), | DEVMETHOD(ifdi_vlan_register, ixgbe_if_vlan_register), | ||||
| DEVMETHOD(ifdi_vlan_unregister, ixgbe_if_vlan_unregister), | DEVMETHOD(ifdi_vlan_unregister, ixgbe_if_vlan_unregister), | ||||
| DEVMETHOD(ifdi_get_counter, ixgbe_if_get_counter), | DEVMETHOD(ifdi_get_counter, ixgbe_if_get_counter), | ||||
| DEVMETHOD(ifdi_i2c_req, ixgbe_if_i2c_req), | DEVMETHOD(ifdi_i2c_req, ixgbe_if_i2c_req), | ||||
| DEVMETHOD(ifdi_needs_restart, ixgbe_if_needs_restart), | |||||
| #ifdef PCI_IOV | #ifdef PCI_IOV | ||||
| DEVMETHOD(ifdi_iov_init, ixgbe_if_iov_init), | DEVMETHOD(ifdi_iov_init, ixgbe_if_iov_init), | ||||
| DEVMETHOD(ifdi_iov_uninit, ixgbe_if_iov_uninit), | DEVMETHOD(ifdi_iov_uninit, ixgbe_if_iov_uninit), | ||||
| DEVMETHOD(ifdi_iov_vf_add, ixgbe_if_iov_vf_add), | DEVMETHOD(ifdi_iov_vf_add, ixgbe_if_iov_vf_add), | ||||
| #endif /* PCI_IOV */ | #endif /* PCI_IOV */ | ||||
| DEVMETHOD_END | DEVMETHOD_END | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 945 Lines • ▼ Show 20 Lines | ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req) | ||||
| if (hw->phy.ops.read_i2c_byte == NULL) | if (hw->phy.ops.read_i2c_byte == NULL) | ||||
| return (ENXIO); | return (ENXIO); | ||||
| for (i = 0; i < req->len; i++) | for (i = 0; i < req->len; i++) | ||||
| hw->phy.ops.read_i2c_byte(hw, req->offset + i, | hw->phy.ops.read_i2c_byte(hw, req->offset + i, | ||||
| req->dev_addr, &req->data[i]); | req->dev_addr, &req->data[i]); | ||||
| return (0); | return (0); | ||||
| } /* ixgbe_if_i2c_req */ | } /* ixgbe_if_i2c_req */ | ||||
| /* ixgbe_if_needs_restart - Tell iflib when the driver needs to be reinitialized | |||||
| * @ctx: iflib context | |||||
| * @event: event code to check | |||||
| * | |||||
| * Defaults to returning true for unknown events. | |||||
| * | |||||
| * @returns true if iflib needs to reinit the interface | |||||
| */ | |||||
| static bool | |||||
| ixgbe_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event) | |||||
| { | |||||
| switch (event) { | |||||
| case IFLIB_RESTART_VLAN_CONFIG: | |||||
| return (false); | |||||
| default: | |||||
| return (true); | |||||
| } | |||||
| } | |||||
| /************************************************************************ | /************************************************************************ | ||||
| * ixgbe_add_media_types | * ixgbe_add_media_types | ||||
| ************************************************************************/ | ************************************************************************/ | ||||
| static void | static void | ||||
| ixgbe_add_media_types(if_ctx_t ctx) | ixgbe_add_media_types(if_ctx_t ctx) | ||||
| { | { | ||||
| struct adapter *adapter = iflib_get_softc(ctx); | struct adapter *adapter = iflib_get_softc(ctx); | ||||
| ▲ Show 20 Lines • Show All 3,323 Lines • Show Last 20 Lines | |||||