|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1 |
|
| #
4a54903f |
| 02-May-2023 |
Shannon Nelson <[email protected]> |
ionic: catch failure from devlink_alloc
Add a check for NULL on the alloc return. If devlink_alloc() fails and we try to use devlink_priv() on the NULL return, the kernel gets very unhappy and pani
ionic: catch failure from devlink_alloc
Add a check for NULL on the alloc return. If devlink_alloc() fails and we try to use devlink_priv() on the NULL return, the kernel gets very unhappy and panics. With this fix, the driver load will still fail, but at least it won't panic the kernel.
Fixes: df69ba43217d ("ionic: Add basic framework for IONIC Network device driver") Signed-off-by: Shannon Nelson <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8 |
|
| #
226bf980 |
| 29-Nov-2022 |
Vincent Mailhol <[email protected]> |
net: devlink: let the core report the driver name instead of the drivers
The driver name is available in device_driver::name. Right now, drivers still have to report this piece of information themse
net: devlink: let the core report the driver name instead of the drivers
The driver name is available in device_driver::name. Right now, drivers still have to report this piece of information themselves in their devlink_ops::info_get callback function.
In order to factorize code, make devlink_nl_info_fill() add the driver name attribute.
Now that the core sets the driver name attribute, drivers are not supposed to call devlink_info_driver_name_put() anymore. Remove devlink_info_driver_name_put() and clean-up all the drivers using this function in their callback.
Signed-off-by: Vincent Mailhol <[email protected]> Tested-by: Ido Schimmel <[email protected]> # mlxsw Reviewed-by: Jacob Keller <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4 |
|
| #
ac73d4bf |
| 02-Nov-2022 |
Jiri Pirko <[email protected]> |
net: make drivers to use SET_NETDEV_DEVLINK_PORT to set devlink_port
Benefit from the previously implemented tracking of netdev events in devlink code and instead of calling devlink_port_type_eth_s
net: make drivers to use SET_NETDEV_DEVLINK_PORT to set devlink_port
Benefit from the previously implemented tracking of netdev events in devlink code and instead of calling devlink_port_type_eth_set() and devlink_port_type_clear() to set devlink port type and link to related netdev, use SET_NETDEV_DEVLINK_PORT() macro to assign devlink_port pointer to netdevice which is about to be registered.
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6, v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1, v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7, v5.15-rc6 |
|
| #
d1f24712 |
| 12-Oct-2021 |
Shannon Nelson <[email protected]> |
ionic: no devlink_unregister if not registered
Don't try to unregister the devlink if it hasn't been registered yet. This bit of error cleanup code got missed in the recent devlink registration cha
ionic: no devlink_unregister if not registered
Don't try to unregister the devlink if it hasn't been registered yet. This bit of error cleanup code got missed in the recent devlink registration changes.
Fixes: 7911c8bd546f ("ionic: Move devlink registration to be last devlink command") Signed-off-by: Shannon Nelson <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v5.15-rc5, v5.15-rc4, v5.15-rc3 |
|
| #
7911c8bd |
| 25-Sep-2021 |
Leon Romanovsky <[email protected]> |
ionic: Move devlink registration to be last devlink command
This change prevents from users to access device before devlink is fully configured.
Signed-off-by: Leon Romanovsky <[email protected]> S
ionic: Move devlink registration to be last devlink command
This change prevents from users to access device before devlink is fully configured.
Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
db4278c5 |
| 22-Sep-2021 |
Leon Romanovsky <[email protected]> |
devlink: Make devlink_register to be void
devlink_register() can't fail and always returns success, but all drivers are obligated to check returned status anyway. This adds a lot of boilerplate code
devlink: Make devlink_register to be void
devlink_register() can't fail and always returns success, but all drivers are obligated to check returned status anyway. This adds a lot of boilerplate code to handle impossible flow.
Make devlink_register() void and simplify the drivers that use that API call.
Signed-off-by: Leon Romanovsky <[email protected]> Acked-by: Simon Horman <[email protected]> Acked-by: Vladimir Oltean <[email protected]> # dsa Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7, v5.14-rc6, v5.14-rc5 |
|
| #
919d13a7 |
| 08-Aug-2021 |
Leon Romanovsky <[email protected]> |
devlink: Set device as early as possible
All kernel devlink implementations call to devlink_alloc() during initialization routine for specific device which is used later as a parent device for devli
devlink: Set device as early as possible
All kernel devlink implementations call to devlink_alloc() during initialization routine for specific device which is used later as a parent device for devlink_register().
Such late device assignment causes to the situation which requires us to call to device_register() before setting other parameters, but that call opens devlink to the world and makes accessible for the netlink users.
Any attempt to move devlink_register() to be the last call generates the following error due to access to the devlink->dev pointer.
[ 8.758862] devlink_nl_param_fill+0x2e8/0xe50 [ 8.760305] devlink_param_notify+0x6d/0x180 [ 8.760435] __devlink_params_register+0x2f1/0x670 [ 8.760558] devlink_params_register+0x1e/0x20
The simple change of API to set devlink device in the devlink_alloc() instead of devlink_register() fixes all this above and ensures that prior to call to devlink_register() everything already set.
Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.14-rc4, v5.14-rc3 |
|
| #
c2255ff4 |
| 21-Jul-2021 |
Leon Romanovsky <[email protected]> |
ionic: cleanly release devlink instance
The failure to register devlink will leave the system with dangled devlink resource, which is not cleaned if devlink_port_register() fails.
In order to remov
ionic: cleanly release devlink instance
The failure to register devlink will leave the system with dangled devlink resource, which is not cleaned if devlink_port_register() fails.
In order to remove access to ".registered" field of struct devlink_port, require both devlink_register and devlink_port_register to success and check it through device pointer.
Fixes: fbfb8031533c ("ionic: Add hardware init and device commands") Reviewed-by: Moshe Shemesh <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Acked-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.14-rc2, v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1, v5.12, v5.12-rc8, v5.12-rc7, v5.12-rc6, v5.12-rc5, v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1, v5.12-rc1-dontuse, v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4, v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10, v5.10-rc7, v5.10-rc6, v5.10-rc5 |
|
| #
b44cfd4f |
| 18-Nov-2020 |
Jacob Keller <[email protected]> |
devlink: move request_firmware out of driver
All drivers which implement the devlink flash update support, with the exception of netdevsim, use either request_firmware or request_firmware_direct to
devlink: move request_firmware out of driver
All drivers which implement the devlink flash update support, with the exception of netdevsim, use either request_firmware or request_firmware_direct to locate the firmware file. Rather than having each driver do this separately as part of its .flash_update implementation, perform the request_firmware within net/core/devlink.c
Replace the file_name parameter in the struct devlink_flash_update_params with a pointer to the fw object.
Use request_firmware rather than request_firmware_direct. Although most Linux distributions today do not have the fallback mechanism implemented, only about half the drivers used the _direct request, as compared to the generic request_firmware. In the event that a distribution does support the fallback mechanism, the devlink flash update ought to be able to use it to provide the firmware contents. For distributions which do not support the fallback userspace mechanism, there should be essentially no difference between request_firmware and request_firmware_direct.
Signed-off-by: Jacob Keller <[email protected]> Acked-by: Shannon Nelson <[email protected]> Acked-by: Vasundhara Volam <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v5.10-rc4, v5.10-rc3, v5.10-rc2, v5.10-rc1, v5.9, v5.9-rc8, v5.9-rc7 |
|
| #
bc75c054 |
| 25-Sep-2020 |
Jacob Keller <[email protected]> |
devlink: convert flash_update to use params structure
The devlink core recently gained support for checking whether the driver supports a flash_update parameter, via `supported_flash_update_params`.
devlink: convert flash_update to use params structure
The devlink core recently gained support for checking whether the driver supports a flash_update parameter, via `supported_flash_update_params`. However, parameters are specified as function arguments. Adding a new parameter still requires modifying the signature of the .flash_update callback in all drivers.
Convert the .flash_update function to take a new `struct devlink_flash_update_params` instead. By using this structure, and the `supported_flash_update_params` bit field, a new parameter to flash_update can be added without requiring modification to existing drivers.
As before, all parameters except file_name will require driver opt-in. Because file_name is a necessary field to for the flash_update to make sense, no "SUPPORTED" bitflag is provided and it is always considered valid. All future additional parameters will require a new bit in the supported_flash_update_params bitfield.
Signed-off-by: Jacob Keller <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Cc: Jiri Pirko <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Michael Chan <[email protected]> Cc: Bin Luo <[email protected]> Cc: Saeed Mahameed <[email protected]> Cc: Leon Romanovsky <[email protected]> Cc: Ido Schimmel <[email protected]> Cc: Danielle Ratson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
22ec3d23 |
| 25-Sep-2020 |
Jacob Keller <[email protected]> |
devlink: check flash_update parameter support in net core
When implementing .flash_update, drivers which do not support per-component update are manually checking the component parameter to verify t
devlink: check flash_update parameter support in net core
When implementing .flash_update, drivers which do not support per-component update are manually checking the component parameter to verify that it is NULL. Without this check, the driver might accept an update request with a component specified even though it will not honor such a request.
Instead of having each driver check this, move the logic into net/core/devlink.c, and use a new `supported_flash_update_params` field in the devlink_ops. Drivers which will support per-component update must now specify this by setting DEVLINK_SUPPORT_FLASH_UPDATE_COMPONENT in the supported_flash_update_params in their devlink_ops.
This helps ensure that drivers do not forget to check for a NULL component if they do not support per-component update. This also enables a slightly better error message by enabling the core stack to set the netlink bad attribute message to indicate precisely the unsupported attribute in the message.
Going forward, any new additional parameter to flash update will require a bit in the supported_flash_update_params bitfield.
Signed-off-by: Jacob Keller <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Cc: Jiri Pirko <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Michael Chan <[email protected]> Cc: Bin Luo <[email protected]> Cc: Saeed Mahameed <[email protected]> Cc: Leon Romanovsky <[email protected]> Cc: Ido Schimmel <[email protected]> Cc: Danielle Ratson <[email protected]> Cc: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.9-rc6 |
|
| #
30b5191a |
| 18-Sep-2020 |
Shannon Nelson <[email protected]> |
ionic: add devlink firmware update
Add support for firmware update through the devlink interface. This update copies the firmware object into the device, asks the current firmware to install it, the
ionic: add devlink firmware update
Add support for firmware update through the devlink interface. This update copies the firmware object into the device, asks the current firmware to install it, then asks the firmware to select the new firmware for the next boot-up.
The install and select steps are launched as asynchronous requests, which are then followed up with status request commands. These status request commands will be answered with an EAGAIN return value and will try again until the request has completed or reached the timeout specified.
Signed-off-by: Shannon Nelson <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.9-rc5, v5.9-rc4, v5.9-rc3 |
|
| #
30b87ab4 |
| 27-Aug-2020 |
Shannon Nelson <[email protected]> |
ionic: remove lif list concept
As we aren't yet supporting multiple lifs, we can remove complexity by removing the list concept and related code, to be re-engineered later when actually needed.
Sig
ionic: remove lif list concept
As we aren't yet supporting multiple lifs, we can remove complexity by removing the list concept and related code, to be re-engineered later when actually needed.
Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.9-rc2, v5.9-rc1, v5.8, v5.8-rc7, v5.8-rc6, v5.8-rc5 |
|
| #
71ad8d55 |
| 09-Jul-2020 |
Danielle Ratson <[email protected]> |
devlink: Replace devlink_port_attrs_set parameters with a struct
Currently, devlink_port_attrs_set accepts a long list of parameters, that most of them are devlink port's attributes.
Use the devlin
devlink: Replace devlink_port_attrs_set parameters with a struct
Currently, devlink_port_attrs_set accepts a long list of parameters, that most of them are devlink port's attributes.
Use the devlink_port_attrs struct to replace the relevant parameters.
Signed-off-by: Danielle Ratson <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.8-rc4, v5.8-rc3, v5.8-rc2, v5.8-rc1 |
|
| #
77f972a7 |
| 11-Jun-2020 |
Shannon Nelson <[email protected]> |
ionic: remove support for mgmt device
We no longer support the mgmt device in the ionic driver, so remove the device id and related code.
Fixes: b3f064e9746d ("ionic: add support for device id 0x10
ionic: remove support for mgmt device
We no longer support the mgmt device in the ionic driver, so remove the device id and related code.
Fixes: b3f064e9746d ("ionic: add support for device id 0x1004") Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.7, v5.7-rc7, v5.7-rc6, v5.7-rc5, v5.7-rc4, v5.7-rc3, v5.7-rc2, v5.7-rc1, v5.6, v5.6-rc7 |
|
| #
ecd2d8b0 |
| 17-Mar-2020 |
Shannon Nelson <[email protected]> |
ionic: stop devlink warn on mgmt device
If we don't set a port type, the devlink code will eventually print a WARN in the kernel log. Because the mgmt device is not really a useful port, don't regi
ionic: stop devlink warn on mgmt device
If we don't set a port type, the devlink code will eventually print a WARN in the kernel log. Because the mgmt device is not really a useful port, don't register it as a devlink port.
Fixes: b3f064e9746d ("ionic: add support for device id 0x1004") Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.6-rc6, v5.6-rc5 |
|
| #
b3f064e9 |
| 07-Mar-2020 |
Shannon Nelson <[email protected]> |
ionic: add support for device id 0x1004
Add support for the management port device id. This is to capture the device and set it up for devlink use, but not set it up for network operations. We sti
ionic: add support for device id 0x1004
Add support for the management port device id. This is to capture the device and set it up for devlink use, but not set it up for network operations. We still use a netdev object in order to use the napi infrasucture for processing adminq and notifyq messages, we just don't register the netdev.
Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.6-rc4, v5.6-rc3, v5.6-rc2, v5.6-rc1, v5.5, v5.5-rc7, v5.5-rc6, v5.5-rc5, v5.5-rc4, v5.5-rc3, v5.5-rc2, v5.5-rc1, v5.4, v5.4-rc8, v5.4-rc7, v5.4-rc6, v5.4-rc5, v5.4-rc4, v5.4-rc3, v5.4-rc2 |
|
| #
da0729e8 |
| 01-Oct-2019 |
Shannon Nelson <[email protected]> |
ionic: simplify returns in devlink info
There is no need for a goto in this bit of code.
Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
|
|
Revision tags: v5.4-rc1, v5.3, v5.3-rc8 |
|
| #
beead698 |
| 03-Sep-2019 |
Shannon Nelson <[email protected]> |
ionic: Add the basic NDO callbacks for netdev support
Set up the initial NDO structure and callbacks for netdev to use, and register the netdev. This will allow us to do a few basic operations on t
ionic: Add the basic NDO callbacks for netdev support
Set up the initial NDO structure and callbacks for netdev to use, and register the netdev. This will allow us to do a few basic operations on the device, but no traffic yet.
Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
fbfb8031 |
| 03-Sep-2019 |
Shannon Nelson <[email protected]> |
ionic: Add hardware init and device commands
The ionic device has a small set of PCI registers, including a device control and data space, and a large set of message commands.
Also adds new DEVLINK
ionic: Add hardware init and device commands
The ionic device has a small set of PCI registers, including a device control and data space, and a large set of message commands.
Also adds new DEVLINK_INFO_VERSION_GENERIC tags for ASIC_ID, ASIC_REV, and FW.
Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
df69ba43 |
| 03-Sep-2019 |
Shannon Nelson <[email protected]> |
ionic: Add basic framework for IONIC Network device driver
This patch adds a basic driver framework for the Pensando IONIC network device. There is no functionality right now other than the ability
ionic: Add basic framework for IONIC Network device driver
This patch adds a basic driver framework for the Pensando IONIC network device. There is no functionality right now other than the ability to load and unload.
Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|