Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc831825 authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller
Browse files

qed: Add support for hardware offloaded iSCSI.



This adds the backbone required for the various HW initalizations
which are necessary for the iSCSI driver (qedi) for QLogic FastLinQ
4xxxx line of adapters - FW notification, resource initializations, etc.

Signed-off-by: default avatarArun Easi <arun.easi@cavium.com>
Signed-off-by: default avatarYuval Mintz <yuval.mintz@cavium.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b14945ac
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -110,4 +110,7 @@ config QEDE
config QED_RDMA
	bool

config QED_ISCSI
	bool

endif # NET_VENDOR_QLOGIC
+1 −0
Original line number Diff line number Diff line
@@ -6,3 +6,4 @@ qed-y := qed_cxt.o qed_dev.o qed_hw.o qed_init_fw_funcs.o qed_init_ops.o \
qed-$(CONFIG_QED_SRIOV) += qed_sriov.o qed_vf.o
qed-$(CONFIG_QED_LL2) += qed_ll2.o
qed-$(CONFIG_QED_RDMA) += qed_roce.o
qed-$(CONFIG_QED_ISCSI) += qed_iscsi.o
+6 −1
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ extern const struct qed_common_ops qed_common_ops_pass;

#define QED_WFQ_UNIT	100

#define ISCSI_BDQ_ID(_port_id) (_port_id)
#define QED_WID_SIZE            (1024)
#define QED_PF_DEMS_SIZE        (4)

@@ -383,6 +384,7 @@ struct qed_hwfn {
	bool				using_ll2;
	struct qed_ll2_info		*p_ll2_info;
	struct qed_rdma_info		*p_rdma_info;
	struct qed_iscsi_info		*p_iscsi_info;
	struct qed_pf_params		pf_params;

	bool b_rdma_enabled_in_prs;
@@ -581,6 +583,8 @@ struct qed_dev {
	/* Linux specific here */
	struct  qede_dev		*edev;
	struct  pci_dev			*pdev;
	u32 flags;
#define QED_FLAG_STORAGE_STARTED	(BIT(0))
	int				msg_enable;

	struct pci_params		pci_params;
@@ -594,6 +598,7 @@ struct qed_dev {
	union {
		struct qed_common_cb_ops	*common;
		struct qed_eth_cb_ops		*eth;
		struct qed_iscsi_cb_ops		*iscsi;
	} protocol_ops;
	void				*ops_cookie;

@@ -603,7 +608,7 @@ struct qed_dev {
	struct qed_cb_ll2_info		*ll2;
	u8				ll2_mac_address[ETH_ALEN];
#endif

	DECLARE_HASHTABLE(connections, 10);
	const struct firmware		*firmware;

	u32 rdma_max_sge;
+12 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include "qed_hw.h"
#include "qed_init_ops.h"
#include "qed_int.h"
#include "qed_iscsi.h"
#include "qed_ll2.h"
#include "qed_mcp.h"
#include "qed_reg_addr.h"
@@ -146,6 +147,8 @@ void qed_resc_free(struct qed_dev *cdev)
#ifdef CONFIG_QED_LL2
		qed_ll2_free(p_hwfn, p_hwfn->p_ll2_info);
#endif
		if (p_hwfn->hw_info.personality == QED_PCI_ISCSI)
			qed_iscsi_free(p_hwfn, p_hwfn->p_iscsi_info);
		qed_iov_free(p_hwfn);
		qed_dmae_info_free(p_hwfn);
		qed_dcbx_info_free(p_hwfn, p_hwfn->p_dcbx_info);
@@ -402,6 +405,7 @@ int qed_qm_reconf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)

int qed_resc_alloc(struct qed_dev *cdev)
{
	struct qed_iscsi_info *p_iscsi_info;
#ifdef CONFIG_QED_LL2
	struct qed_ll2_info *p_ll2_info;
#endif
@@ -507,6 +511,12 @@ int qed_resc_alloc(struct qed_dev *cdev)
			p_hwfn->p_ll2_info = p_ll2_info;
		}
#endif
		if (p_hwfn->hw_info.personality == QED_PCI_ISCSI) {
			p_iscsi_info = qed_iscsi_alloc(p_hwfn);
			if (!p_iscsi_info)
				goto alloc_no_mem;
			p_hwfn->p_iscsi_info = p_iscsi_info;
		}

		/* DMA info initialization */
		rc = qed_dmae_info_alloc(p_hwfn);
@@ -560,6 +570,8 @@ void qed_resc_setup(struct qed_dev *cdev)
		if (p_hwfn->using_ll2)
			qed_ll2_setup(p_hwfn, p_hwfn->p_ll2_info);
#endif
		if (p_hwfn->hw_info.personality == QED_PCI_ISCSI)
			qed_iscsi_setup(p_hwfn, p_hwfn->p_iscsi_info);
	}
}

+1277 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading