Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ixl/if_ixl.c
| Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | |||||
| static int ixl_if_media_change(if_ctx_t ctx); | static int ixl_if_media_change(if_ctx_t ctx); | ||||
| static int ixl_if_promisc_set(if_ctx_t ctx, int flags); | static int ixl_if_promisc_set(if_ctx_t ctx, int flags); | ||||
| static void ixl_if_timer(if_ctx_t ctx, uint16_t qid); | static void ixl_if_timer(if_ctx_t ctx, uint16_t qid); | ||||
| static void ixl_if_vlan_register(if_ctx_t ctx, u16 vtag); | static void ixl_if_vlan_register(if_ctx_t ctx, u16 vtag); | ||||
| static void ixl_if_vlan_unregister(if_ctx_t ctx, u16 vtag); | static void ixl_if_vlan_unregister(if_ctx_t ctx, u16 vtag); | ||||
| static uint64_t ixl_if_get_counter(if_ctx_t ctx, ift_counter cnt); | static uint64_t ixl_if_get_counter(if_ctx_t ctx, ift_counter cnt); | ||||
| static int ixl_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req); | static int ixl_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req); | ||||
| static int ixl_if_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data); | static int ixl_if_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data); | ||||
| static bool ixl_if_needs_restart(if_ctx_t ctx, enum iflib_restart_event event); | |||||
| #ifdef PCI_IOV | #ifdef PCI_IOV | ||||
| static void ixl_if_vflr_handle(if_ctx_t ctx); | static void ixl_if_vflr_handle(if_ctx_t ctx); | ||||
| #endif | #endif | ||||
| /*** Other ***/ | /*** Other ***/ | ||||
| static u_int ixl_mc_filter_apply(void *, struct sockaddr_dl *, u_int); | static u_int ixl_mc_filter_apply(void *, struct sockaddr_dl *, u_int); | ||||
| static void ixl_save_pf_tunables(struct ixl_pf *); | static void ixl_save_pf_tunables(struct ixl_pf *); | ||||
| static int ixl_allocate_pci_resources(struct ixl_pf *); | static int ixl_allocate_pci_resources(struct ixl_pf *); | ||||
| ▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | static device_method_t ixl_if_methods[] = { | ||||
| DEVMETHOD(ifdi_media_change, ixl_if_media_change), | DEVMETHOD(ifdi_media_change, ixl_if_media_change), | ||||
| DEVMETHOD(ifdi_promisc_set, ixl_if_promisc_set), | DEVMETHOD(ifdi_promisc_set, ixl_if_promisc_set), | ||||
| DEVMETHOD(ifdi_timer, ixl_if_timer), | DEVMETHOD(ifdi_timer, ixl_if_timer), | ||||
| DEVMETHOD(ifdi_vlan_register, ixl_if_vlan_register), | DEVMETHOD(ifdi_vlan_register, ixl_if_vlan_register), | ||||
| DEVMETHOD(ifdi_vlan_unregister, ixl_if_vlan_unregister), | DEVMETHOD(ifdi_vlan_unregister, ixl_if_vlan_unregister), | ||||
| DEVMETHOD(ifdi_get_counter, ixl_if_get_counter), | DEVMETHOD(ifdi_get_counter, ixl_if_get_counter), | ||||
| DEVMETHOD(ifdi_i2c_req, ixl_if_i2c_req), | DEVMETHOD(ifdi_i2c_req, ixl_if_i2c_req), | ||||
| DEVMETHOD(ifdi_priv_ioctl, ixl_if_priv_ioctl), | DEVMETHOD(ifdi_priv_ioctl, ixl_if_priv_ioctl), | ||||
| DEVMETHOD(ifdi_needs_restart, ixl_if_needs_restart), | |||||
| #ifdef PCI_IOV | #ifdef PCI_IOV | ||||
| DEVMETHOD(ifdi_iov_init, ixl_if_iov_init), | DEVMETHOD(ifdi_iov_init, ixl_if_iov_init), | ||||
| DEVMETHOD(ifdi_iov_uninit, ixl_if_iov_uninit), | DEVMETHOD(ifdi_iov_uninit, ixl_if_iov_uninit), | ||||
| DEVMETHOD(ifdi_iov_vf_add, ixl_if_iov_vf_add), | DEVMETHOD(ifdi_iov_vf_add, ixl_if_iov_vf_add), | ||||
| DEVMETHOD(ifdi_vflr_handle, ixl_if_vflr_handle), | DEVMETHOD(ifdi_vflr_handle, ixl_if_vflr_handle), | ||||
| #endif | #endif | ||||
| // ifdi_led_func | // ifdi_led_func | ||||
| // ifdi_debug | // ifdi_debug | ||||
| ▲ Show 20 Lines • Show All 1,447 Lines • ▼ Show 20 Lines | if (ifd->ifd_cmd == I40E_NVM_ACCESS) { | ||||
| error = EINVAL; | error = EINVAL; | ||||
| } | } | ||||
| break; | break; | ||||
| default: | default: | ||||
| error = EOPNOTSUPP; | error = EOPNOTSUPP; | ||||
| } | } | ||||
| return (error); | return (error); | ||||
| } | |||||
| /* ixl_if_needs_restart - Tell iflib when the driver needs to be reinitialized | |||||
| * @ctx: iflib context | |||||
| * @event: event code to check | |||||
| * | |||||
| * Defaults to returning false for every event. | |||||
| * | |||||
| * @returns true if iflib needs to reinit the interface, false otherwise | |||||
| */ | |||||
| static bool | |||||
| ixl_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event) | |||||
| { | |||||
| switch (event) { | |||||
| case IFLIB_RESTART_VLAN_CONFIG: | |||||
| default: | |||||
| return (false); | |||||
| } | |||||
| } | } | ||||
| static u_int | static u_int | ||||
| ixl_mc_filter_apply(void *arg, struct sockaddr_dl *sdl, u_int count __unused) | ixl_mc_filter_apply(void *arg, struct sockaddr_dl *sdl, u_int count __unused) | ||||
| { | { | ||||
| struct ixl_vsi *vsi = arg; | struct ixl_vsi *vsi = arg; | ||||
| ixl_add_mc_filter(vsi, (u8*)LLADDR(sdl)); | ixl_add_mc_filter(vsi, (u8*)LLADDR(sdl)); | ||||
| ▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines | |||||