[PATCH v4 10/20] qedn: Add qedn probe

Christoph Hellwig hch at lst.de
Thu Jul 1 06:48:50 PDT 2021


On Tue, Jun 29, 2021 at 03:47:33PM +0300, Prabhakar Kushwaha wrote:
> From: Shai Malin <smalin at marvell.com>
> 
> This patch introduces the functionality of loading and unloading
> physical function.
> qedn_probe() loads the offload device PF(physical function), and
> initialize the HW and the FW with the PF parameters using the
> HW ops->qed_nvmetcp_ops, which are similar to other "qed_*_ops" which
> are used by the qede, qedr, qedf and qedi device drivers.
> qedn_remove() unloads the offload device PF, re-initialize the HW and
> the FW with the PF parameters.
> 
> The struct qedn_ctx is per PF container for PF-specific attributes and
> resources.
> 
> Acked-by: Igor Russkikh <irusskikh at marvell.com>
> Signed-off-by: Dean Balandin <dbalandin at marvell.com>
> Signed-off-by: Prabhakar Kushwaha <pkushwaha at marvell.com>
> Signed-off-by: Omkar Kulkarni <okulkarni at marvell.com>
> Signed-off-by: Michal Kalderon <mkalderon at marvell.com>
> Signed-off-by: Ariel Elior <aelior at marvell.com>
> Signed-off-by: Shai Malin <smalin at marvell.com>
> Reviewed-by: Hannes Reinecke <hare at suse.de>
> ---
>  drivers/nvme/hw/Kconfig          |   1 +
>  drivers/nvme/hw/qedn/qedn.h      |  26 ++++++
>  drivers/nvme/hw/qedn/qedn_main.c | 155 ++++++++++++++++++++++++++++++-
>  3 files changed, 177 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/nvme/hw/Kconfig b/drivers/nvme/hw/Kconfig
> index 374f1f9dbd3d..91b1bd6f07d8 100644
> --- a/drivers/nvme/hw/Kconfig
> +++ b/drivers/nvme/hw/Kconfig
> @@ -2,6 +2,7 @@
>  config NVME_QEDN
>  	tristate "Marvell NVM Express over Fabrics TCP offload"
>  	depends on NVME_TCP_OFFLOAD
> +	select QED_NVMETCP

This makes kconfig unhappy:

WARNING: unmet direct dependencies detected for QED_NVMETCP
  Depends on [n]: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_QLOGIC [=n]
  Selected by [y]:
  - NVME_QEDN [=y] && NVME_TCP_OFFLOAD [=y]

While we're at unhappy:  without pinpointing it to the pointlessly
split patches, this series generates tons of sparse warnings:


drivers/nvme/hw/qedn/qedn_main.c:17:30: warning: symbol 'qed_ops' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_main.c:38:24: warning: symbol 'qedn_add_llh_filter' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_main.c:90:6: warning: symbol 'qedn_dec_llh_filter' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_main.c:493:6: warning: symbol 'qedn_fw_cq_fp_handler' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_main.c:813:58: warning: incorrect type in assignment (different base types)
drivers/nvme/hw/qedn/qedn_main.c:813:58:    expected restricted __le32 [usertype] hi
drivers/nvme/hw/qedn/qedn_main.c:813:58:    got unsigned int [usertype]
drivers/nvme/hw/qedn/qedn_main.c:814:58: warning: incorrect type in assignment (different base types)
drivers/nvme/hw/qedn/qedn_main.c:814:58:    expected restricted __le32 [usertype] lo
drivers/nvme/hw/qedn/qedn_main.c:814:58:    got unsigned int [usertype]
drivers/nvme/hw/qedn/qedn_task.c:358:6: warning: symbol 'qedn_return_task_to_pool' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_task.c:422:5: warning: symbol 'qedn_send_read_cmd' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_task.c:502:32: warning: incorrect type in assignment (different base types)
drivers/nvme/hw/qedn/qedn_task.c:502:32:    expected unsigned short [usertype] host_cccid
drivers/nvme/hw/qedn/qedn_task.c:502:32:    got restricted __le16 [usertype]
drivers/nvme/hw/qedn/qedn_task.c:471:5: warning: symbol 'qedn_send_write_cmd' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_task.c:553:24: warning: incorrect type in return expression (different base types)
drivers/nvme/hw/qedn/qedn_task.c:553:24:    expected int
drivers/nvme/hw/qedn/qedn_task.c:553:24:    got restricted blk_status_t [usertype]
drivers/nvme/hw/qedn/qedn_task.c:576:24: warning: incorrect type in return expression (different base types)
drivers/nvme/hw/qedn/qedn_task.c:576:24:    expected int
drivers/nvme/hw/qedn/qedn_task.c:576:24:    got restricted blk_status_t [usertype]
drivers/nvme/hw/qedn/qedn_task.c:586:22: warning: symbol 'qedn_cqe_get_active_task' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_task.c:629:5: warning: symbol 'qedn_process_nvme_cqe' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_task.c:646:5: warning: symbol 'qedn_complete_c2h' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_task.c: note: in included file (through drivers/nvme/hw/qedn/qedn.h):
drivers/nvme/hw/qedn/../../host/tcp-offload.h:207:45: error: marked inline, but without a definition
drivers/nvme/hw/qedn/qedn_conn.c:107:22: warning: incorrect type in assignment (different base types)
drivers/nvme/hw/qedn/qedn_conn.c:107:22:    expected unsigned short [usertype] src_port
drivers/nvme/hw/qedn/qedn_conn.c:107:22:    got restricted __be16 [usertype] sin_port
drivers/nvme/hw/qedn/qedn_conn.c:98:5: warning: symbol 'qedn_fill_ep_addr4' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_conn.c:126:22: warning: incorrect type in assignment (different base types)
drivers/nvme/hw/qedn/qedn_conn.c:126:22:    expected unsigned short [usertype] src_port
drivers/nvme/hw/qedn/qedn_conn.c:126:22:    got restricted __be16 [usertype] sin6_port
drivers/nvme/hw/qedn/qedn_conn.c:116:5: warning: symbol 'qedn_fill_ep_addr6' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_conn.c:557:23: warning: cast from restricted __le16
drivers/nvme/hw/qedn/qedn_conn.c:560:27: warning: cast from restricted __le32
drivers/nvme/hw/qedn/qedn_conn.c:629:6: warning: symbol 'qedn_error_recovery' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_conn.c:727:6: warning: symbol 'qedn_prep_db_data' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_conn.c:933:6: warning: symbol 'qedn_cleanup_all_fw_tasks' was not declared. Should it be static?
drivers/nvme/hw/qedn/qedn_conn.c:976:6: warning: symbol 'qedn_destroy_connection' was not declared. Should it be static?



More information about the Linux-nvme mailing list