err = devl_port_fn_devlink_set(&dyn_port->devlink_port, devlink); if (err) {
dev_err(dev, "Can't link devlink instance to SF devlink port"); goto err_netdev_decfg;
}
/** * ice_sf_driver_register - Register new auxiliary subfunction driver * * Return: zero on success or an error code on failure.
*/ int ice_sf_driver_register(void)
{ return auxiliary_driver_register(&ice_sf_driver);
}
/** * ice_sf_dev_release - Release device associated with auxiliary device * @device: pointer to the device * * Since most of the code for subfunction deactivation is handled in * the remove handler, here just free tracking resources.
*/ staticvoid ice_sf_dev_release(struct device *device)
{ struct auxiliary_device *adev = to_auxiliary_dev(device); struct ice_sf_dev *sf_dev = ice_adev_to_sf_dev(adev);
/** * ice_sf_eth_activate - Activate Ethernet subfunction port * @dyn_port: the dynamic port instance for this subfunction * @extack: extack for reporting error messages * * Activate the dynamic port as an Ethernet subfunction. Setup the netdev * resources associated and initialize the auxiliary device. * * Return: zero on success or an error code on failure.
*/ int
ice_sf_eth_activate(struct ice_dynamic_port *dyn_port, struct netlink_ext_ack *extack)
{ struct ice_pf *pf = dyn_port->pf; struct ice_sf_dev *sf_dev; struct pci_dev *pdev; int err;
u32 id;
err = xa_alloc(&ice_sf_aux_id, &id, NULL, xa_limit_32b,
GFP_KERNEL); if (err) {
NL_SET_ERR_MSG_MOD(extack, "Could not allocate SF ID"); return err;
}
sf_dev = kzalloc(sizeof(*sf_dev), GFP_KERNEL); if (!sf_dev) {
err = -ENOMEM;
NL_SET_ERR_MSG_MOD(extack, "Could not allocate SF memory"); goto xa_erase;
}
pdev = pf->pdev;
/** * ice_sf_eth_deactivate - Deactivate Ethernet subfunction port * @dyn_port: the dynamic port instance for this subfunction * * Deactivate the Ethernet subfunction, removing its auxiliary device and the * associated resources.
*/ void ice_sf_eth_deactivate(struct ice_dynamic_port *dyn_port)
{ struct ice_sf_dev *sf_dev = dyn_port->sf_dev;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.