#
cbdd50ec |
| 11-Jan-2024 |
Dmitry Antipov <dmantipov@yandex.ru> |
net: liquidio: fix clang-specific W=1 build warnings
When compiling with clang-18 and W=1, I've noticed the following warnings:
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1493:16: warn
net: liquidio: fix clang-specific W=1 build warnings
When compiling with clang-18 and W=1, I've noticed the following warnings:
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1493:16: warning: cast from 'void (*)(struct octeon_device *, struct octeon_mbox_cmd *, void *)' to 'octeon_mbox_callback_t' (aka 'void (*)(void *, void *, void *)') converts to incompatible function type [-Wcast-function-type-strict] 1493 | mbox_cmd.fn = (octeon_mbox_callback_t)cn23xx_get_vf_stats_callback; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and:
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:432:16: warning: cast from 'void (*)(struct octeon_device *, struct octeon_mbox_cmd *, void *)' to 'octeon_mbox_callback_t' (aka 'void (*)(void *, void *, void *)') converts to incompatible function type [-Wcast-function-type-strict] 432 | mbox_cmd.fn = (octeon_mbox_callback_t)octeon_pfvf_hs_callback; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix both of the above by adjusting 'octeon_mbox_callback_t' to match actual callback definitions (at the cost of adding an extra forward declaration).
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20240111162432.124014-1-dmantipov@yandex.ru Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
f71be9d0 |
| 06-Jun-2023 |
Masahiro Yamada <masahiroy@kernel.org> |
net: liquidio: fix mixed module-builtin object
With CONFIG_LIQUIDIO=m and CONFIG_LIQUIDIO_VF=y (or vice versa), $(common-objs) are linked to a module and also to vmlinux even though the expected CFL
net: liquidio: fix mixed module-builtin object
With CONFIG_LIQUIDIO=m and CONFIG_LIQUIDIO_VF=y (or vice versa), $(common-objs) are linked to a module and also to vmlinux even though the expected CFLAGS are different between builtins and modules.
This is the same situation as fixed by commit 637a642f5ca5 ("zstd: Fixing mixed module-builtin objects").
Introduce the new module, liquidio-core, to provide the common functions to liquidio and liquidio-vf.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
bb269633 |
| 27-May-2023 |
Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
liquidio: Use vzalloc()
Use vzalloc() instead of hand writing it with vmalloc()+memset(). This is less verbose.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Simon
liquidio: Use vzalloc()
Use vzalloc() instead of hand writing it with vmalloc()+memset(). This is less verbose.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/93b010824d9d92376e8d49b9eb396a0fa0c0ac80.1685216322.git.christophe.jaillet@wanadoo.fr Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
e7efc2ce |
| 14-Jul-2021 |
Colin Ian King <colin.king@canonical.com> |
liquidio: Fix unintentional sign extension issue on left shift of u16
Shifting the u16 integer oct->pcie_port by CN23XX_PKT_INPUT_CTL_MAC_NUM_POS (29) bits will be promoted to a 32 bit signed int an
liquidio: Fix unintentional sign extension issue on left shift of u16
Shifting the u16 integer oct->pcie_port by CN23XX_PKT_INPUT_CTL_MAC_NUM_POS (29) bits will be promoted to a 32 bit signed int and then sign-extended to a u64. In the cases where oct->pcie_port where bit 2 is set (e.g. 3..7) the shifted value will be sign extended and the top 32 bits of the result will be set.
Fix this by casting the u16 values to a u64 before the 29 bit left shift.
Addresses-Coverity: ("Unintended sign extension")
Fixes: 3451b97cce2d ("liquidio: CN23XX register setup") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
aa027850 |
| 02-Aug-2020 |
Tianjia Zhang <tianjia.zhang@linux.alibaba.com> |
liquidio: Fix wrong return value in cn23xx_get_pf_num()
On an error exit path, a negative error code should be returned instead of a positive return value.
Fixes: 0c45d7fe12c7e ("liquidio: fix use
liquidio: Fix wrong return value in cn23xx_get_pf_num()
On an error exit path, a negative error code should be returned instead of a positive return value.
Fixes: 0c45d7fe12c7e ("liquidio: fix use of pf in pass-through mode in a virtual machine") Cc: Rick Farrington <ricardo.farrington@cavium.com> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
bf9d787b |
| 16-Feb-2019 |
YueHaibing <yuehaibing@huawei.com> |
liquidio: using NULL instead of plain integer
Fix following warning:
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1453:35: warning: Using plain integer as NULL pointer drivers/net/ethern
liquidio: using NULL instead of plain integer
Fix following warning:
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1453:35: warning: Using plain integer as NULL pointer drivers/net/ethernet/cavium/liquidio/lio_main.c:2910:23: warning: Using plain integer as NULL pointer
Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
c87fffc5 |
| 30-Jul-2018 |
YueHaibing <yuehaibing@huawei.com> |
liquidio: remove redundant function cn23xx_dump_iq_regs
There are no in-tree callers of cn23xx_dump_iq_regs.
Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@
liquidio: remove redundant function cn23xx_dump_iq_regs
There are no in-tree callers of cn23xx_dump_iq_regs.
Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
ac13d6d8 |
| 13-Jul-2018 |
Rick Farrington <ricardo.farrington@cavium.com> |
liquidio: fix hang when re-binding VF host drv after running DPDK VF driver
When configuring SLI_PKTn_OUTPUT_CONTROL, VF driver was assuming that IPTR mode was disabled by reset, which was not true.
liquidio: fix hang when re-binding VF host drv after running DPDK VF driver
When configuring SLI_PKTn_OUTPUT_CONTROL, VF driver was assuming that IPTR mode was disabled by reset, which was not true. Since DPDK driver had set IPTR mode previously, the VF driver (which uses buf-ptr-only mode) was not properly handling DROQ packets (i.e. it saw zero-length packets).
This represented an invalid hardware configuration which the driver could not handle.
Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
c33c9973 |
| 28-Apr-2018 |
Intiyaz Basha <intiyaz.basha@cavium.com> |
liquidio: enhanced ethtool --set-channels feature
Enhancing driver to accept max supported queues for ethtool --set-channels
Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com> Acked-by: Derek
liquidio: enhanced ethtool --set-channels feature
Enhancing driver to accept max supported queues for ethtool --set-channels
Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com> Acked-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
cea395ac |
| 19-Apr-2018 |
Intiyaz Basha <intiyaz.basha@cavium.com> |
liquidio: Added ndo_get_vf_stats support
Added the ndo to gather VF statistics through the PF.
Collect VF statistics via mailbox from VF.
Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com> Si
liquidio: Added ndo_get_vf_stats support
Added the ndo to gather VF statistics through the PF.
Collect VF statistics via mailbox from VF.
Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
acfb98b9 |
| 30-Aug-2017 |
Rick Farrington <ricardo.farrington@cavium.com> |
liquidio: fix crash in presence of zeroed-out base address regs
Fix crash in linux PF driver when BARs have been cleared/de-programmed; fail early init (prior to mapping BARs) if the BAR0 or BAR1 re
liquidio: fix crash in presence of zeroed-out base address regs
Fix crash in linux PF driver when BARs have been cleared/de-programmed; fail early init (prior to mapping BARs) if the BAR0 or BAR1 registers are zero.
This situation can arise when the PF is added to a VM (PCI pass-through), then a PF FLR is issued (in the VM). After this occurs, the BAR registers will be zero. If we attempt to load the PF driver in the host (after VM has been shutdown), the host can reset.
Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
b2854772 |
| 22-Aug-2017 |
Felix Manlunas <felix.manlunas@cavium.com> |
liquidio: change manner of detecting whether or not NIC firmware is loaded
In the NIC firmware, the 1-bit flag indicating "firmware is loaded" moved from SLI_SCRATCH_1 to SLI_SCRATCH_2 (these are Oc
liquidio: change manner of detecting whether or not NIC firmware is loaded
In the NIC firmware, the 1-bit flag indicating "firmware is loaded" moved from SLI_SCRATCH_1 to SLI_SCRATCH_2 (these are Octeon general-purpose scratch registers). Make the PF driver conform to this change.
Remove code that sets the "firmware is loaded" flag because it's now the firmware's job to do that.
In the code that detects whether or not the firmware is loaded, don't just rely on checking the "firmware is loaded" flag because that may cause a rare false negative. Add code that deduces whether or not the firmware is loaded; that will never give a false negative.
Also bump up driver version to match newer NIC firmware.
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
0c45d7fe |
| 19-Aug-2017 |
Rick Farrington <ricardo.farrington@cavium.com> |
liquidio: fix use of pf in pass-through mode in a virtual machine
Fix problem when PF is used in pass-through mode in a VM (w/embedded f/w).
If host error reading PF num from CN23XX_PCIE_SRIOV_FDL
liquidio: fix use of pf in pass-through mode in a virtual machine
Fix problem when PF is used in pass-through mode in a VM (w/embedded f/w).
If host error reading PF num from CN23XX_PCIE_SRIOV_FDL reg, try to retrieve PF num from SLI_PKT(0)_INPUT_CONTROL (initialized by f/w).
Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
05a6b4ca |
| 05-Jul-2017 |
Derek Chickles <derek.chickles@cavium.com> |
liquidio: fix bug in soft reset failure detection
The code that detects a failed soft reset of Octeon is comparing the wrong value against the reset value of the Octeon SLI_SCRATCH_1 register, resul
liquidio: fix bug in soft reset failure detection
The code that detects a failed soft reset of Octeon is comparing the wrong value against the reset value of the Octeon SLI_SCRATCH_1 register, resulting in an inability to detect a soft reset failure. Fix it by using the correct value in the comparison, which is any non-zero value.
Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters") Fixes: c0eab5b3580a ("liquidio: CN23XX firmware download") Signed-off-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: Satanand Burla <satananda.burla@cavium.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
c4ee5d81 |
| 18-Jun-2017 |
Prasad Kanneganti <prasad.kanneganti@cavium.com> |
liquidio: replace info-pointer mode with buffer-pointer-only mode
Each Octeon output ring can DMA packets to host memory in two modes: info- pointer mode and buffer-pointer-only mode. In info-poin
liquidio: replace info-pointer mode with buffer-pointer-only mode
Each Octeon output ring can DMA packets to host memory in two modes: info- pointer mode and buffer-pointer-only mode. In info-pointer mode, Octeon takes two buffer pointers for each packet and places the length of the packet along with specified number of bytes from the beginning of the packet into one buffer and the rest of the packet in a separate buffer. In buffer-pointer-only mode, Octeon takes single buffer pointer and places the length of the packet at the beginning of the buffer followed by the packet data.
This patch switches all Octeon output rings from info-pointer mode to buffer-pointer-only mode. This results in fewer DMA setups and cache line snoops.
Signed-off-by: Prasad Kanneganti <pkanneganti@cavium.com> Signed-off-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: Satanand Burla <satananda.burla@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
50579d3d |
| 14-Nov-2016 |
Raghu Vatsavayi <rvatsavayi@caviumnetworks.com> |
liquidio CN23XX: copyrights changes and alignment
Updated copyrights comments and also changed some other comments alignments.
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Si
liquidio CN23XX: copyrights changes and alignment
Updated copyrights comments and also changed some other comments alignments.
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
86dea55b |
| 14-Nov-2016 |
Raghu Vatsavayi <rvatsavayi@caviumnetworks.com> |
liquidio CN23XX: VF related operations
Adds support for VF related operations like mac address vlan and link changes.
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-
liquidio CN23XX: VF related operations
Adds support for VF related operations like mac address vlan and link changes.
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
5d65556b |
| 14-Nov-2016 |
Raghu Vatsavayi <rvatsavayi@caviumnetworks.com> |
liquidio CN23XX: mailbox interrupt processing
Adds support for mailbox interrupt processing of various commands.
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: D
liquidio CN23XX: mailbox interrupt processing
Adds support for mailbox interrupt processing of various commands.
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
d13520c7 |
| 14-Nov-2016 |
Raghu Vatsavayi <rvatsavayi@caviumnetworks.com> |
liquidio CN23XX: HW config for VF support
Adds support for configuring HW for creating VFs.
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: Derek Chickles <derek.
liquidio CN23XX: HW config for VF support
Adds support for configuring HW for creating VFs.
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
10f6c4d6 |
| 13-Oct-2016 |
Dan Carpenter <dan.carpenter@oracle.com> |
liquidio: CN23XX: fix a loop timeout
This is supposed to loop 1000 times and then give up. The problem is it's a post-op and after the loop we test if "loop" is zero when really it would be -1. Fi
liquidio: CN23XX: fix a loop timeout
This is supposed to loop 1000 times and then give up. The problem is it's a post-op and after the loop we test if "loop" is zero when really it would be -1. Fix this by making it a pre-op.
Fixes: 1b7c55c4538b ("liquidio: CN23XX queue manipulation") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
9bdd4609 |
| 01-Sep-2016 |
Raghu Vatsavayi <rvatsavayi@caviumnetworks.com> |
liquidio: CN23XX IQ access
Adds support for Instruction Queue(IQ) index manipulation routines through bar1 of cn23xx.
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by
liquidio: CN23XX IQ access
Adds support for Instruction Queue(IQ) index manipulation routines through bar1 of cn23xx.
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
c0eab5b3 |
| 31-Aug-2016 |
Raghu Vatsavayi <rvatsavayi@caviumnetworks.com> |
liquidio: CN23XX firmware download
Add firmware download support for cn23xx device.
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@
liquidio: CN23XX firmware download
Add firmware download support for cn23xx device.
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
5b07aee1 |
| 31-Aug-2016 |
Raghu Vatsavayi <rvatsavayi@caviumnetworks.com> |
liquidio: MSIX support for CN23XX
This patch adds support msix interrupt for cn23xx device.
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satanand
liquidio: MSIX support for CN23XX
This patch adds support msix interrupt for cn23xx device.
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
1b7c55c4 |
| 31-Aug-2016 |
Raghu Vatsavayi <rvatsavayi@caviumnetworks.com> |
liquidio: CN23XX queue manipulation
This patch adds support for cn23xx queue manipulation.
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda
liquidio: CN23XX queue manipulation
This patch adds support for cn23xx queue manipulation.
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
3451b97c |
| 31-Aug-2016 |
Raghu Vatsavayi <rvatsavayi@caviumnetworks.com> |
liquidio: CN23XX register setup
Adds support for initializing cn23xx device registers related to mac, input/output and pf global config.
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks
liquidio: CN23XX register setup
Adds support for initializing cn23xx device registers related to mac, input/output and pf global config.
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|