Skip to content

Commit 7df5358

Browse files
committed
Merge branch 'qed-iscsi'
Manish Rangankar says: ==================== Add QLogic FastLinQ iSCSI (qedi) driver. This series introduces hardware offload iSCSI initiator driver for the 41000 Series Converged Network Adapters (579xx chip) by Qlogic. The overall driver design includes a common module ('qed') and protocol specific dependent modules ('qedi' for iSCSI). This is an open iSCSI driver, modifications to open iSCSI user components 'iscsid', 'iscsiuio', etc. are required for the solution to work. The user space changes are also in the process of being submitted. https://groups.google.com/forum/#!forum/open-iscsi The 'qed' common module, under drivers/net/ethernet/qlogic/qed/, is enhanced with functionality required for the iSCSI support. This series is based on: net tree base: Merge of net and net-next as of 11/29/2016 Changes from RFC v2: 1. qedi patches are squashed into single patch to prevent krobot warning. 2. Fixed 'hw_p_cpuq' incompatible pointer type. 3. Fixed sparse incompatible types in comparison expression. 4. Misc fixes with latest 'checkpatch --strict' option. 5. Remove int_mode option from MODULE_PARAM. 6. Prefix all MODULE_PARAM params with qedi_*. 7. Use CONFIG_QED_ISCSI instead of CONFIG_QEDI 8. Added bad task mem access fix. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents b14945a + 1d6cff4 commit 7df5358

File tree

15 files changed

+2833
-29
lines changed

15 files changed

+2833
-29
lines changed

drivers/net/ethernet/qlogic/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,7 @@ config QEDE
110110
config QED_RDMA
111111
bool
112112

113+
config QED_ISCSI
114+
bool
115+
113116
endif # NET_VENDOR_QLOGIC

drivers/net/ethernet/qlogic/qed/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ qed-y := qed_cxt.o qed_dev.o qed_hw.o qed_init_fw_funcs.o qed_init_ops.o \
66
qed-$(CONFIG_QED_SRIOV) += qed_sriov.o qed_vf.o
77
qed-$(CONFIG_QED_LL2) += qed_ll2.o
88
qed-$(CONFIG_QED_RDMA) += qed_roce.o
9+
qed-$(CONFIG_QED_ISCSI) += qed_iscsi.o qed_ooo.o

drivers/net/ethernet/qlogic/qed/qed.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ extern const struct qed_common_ops qed_common_ops_pass;
3535

3636
#define QED_WFQ_UNIT 100
3737

38+
#define ISCSI_BDQ_ID(_port_id) (_port_id)
3839
#define QED_WID_SIZE (1024)
3940
#define QED_PF_DEMS_SIZE (4)
4041

@@ -382,7 +383,9 @@ struct qed_hwfn {
382383
/* Protocol related */
383384
bool using_ll2;
384385
struct qed_ll2_info *p_ll2_info;
386+
struct qed_ooo_info *p_ooo_info;
385387
struct qed_rdma_info *p_rdma_info;
388+
struct qed_iscsi_info *p_iscsi_info;
386389
struct qed_pf_params pf_params;
387390

388391
bool b_rdma_enabled_in_prs;
@@ -581,6 +584,8 @@ struct qed_dev {
581584
/* Linux specific here */
582585
struct qede_dev *edev;
583586
struct pci_dev *pdev;
587+
u32 flags;
588+
#define QED_FLAG_STORAGE_STARTED (BIT(0))
584589
int msg_enable;
585590

586591
struct pci_params pci_params;
@@ -594,6 +599,7 @@ struct qed_dev {
594599
union {
595600
struct qed_common_cb_ops *common;
596601
struct qed_eth_cb_ops *eth;
602+
struct qed_iscsi_cb_ops *iscsi;
597603
} protocol_ops;
598604
void *ops_cookie;
599605

@@ -603,7 +609,7 @@ struct qed_dev {
603609
struct qed_cb_ll2_info *ll2;
604610
u8 ll2_mac_address[ETH_ALEN];
605611
#endif
606-
612+
DECLARE_HASHTABLE(connections, 10);
607613
const struct firmware *firmware;
608614

609615
u32 rdma_max_sge;

drivers/net/ethernet/qlogic/qed/qed_dev.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
#include "qed_hw.h"
3030
#include "qed_init_ops.h"
3131
#include "qed_int.h"
32+
#include "qed_iscsi.h"
3233
#include "qed_ll2.h"
3334
#include "qed_mcp.h"
35+
#include "qed_ooo.h"
3436
#include "qed_reg_addr.h"
3537
#include "qed_sp.h"
3638
#include "qed_sriov.h"
@@ -146,6 +148,10 @@ void qed_resc_free(struct qed_dev *cdev)
146148
#ifdef CONFIG_QED_LL2
147149
qed_ll2_free(p_hwfn, p_hwfn->p_ll2_info);
148150
#endif
151+
if (p_hwfn->hw_info.personality == QED_PCI_ISCSI) {
152+
qed_iscsi_free(p_hwfn, p_hwfn->p_iscsi_info);
153+
qed_ooo_free(p_hwfn, p_hwfn->p_ooo_info);
154+
}
149155
qed_iov_free(p_hwfn);
150156
qed_dmae_info_free(p_hwfn);
151157
qed_dcbx_info_free(p_hwfn, p_hwfn->p_dcbx_info);
@@ -402,6 +408,8 @@ int qed_qm_reconf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
402408

403409
int qed_resc_alloc(struct qed_dev *cdev)
404410
{
411+
struct qed_iscsi_info *p_iscsi_info;
412+
struct qed_ooo_info *p_ooo_info;
405413
#ifdef CONFIG_QED_LL2
406414
struct qed_ll2_info *p_ll2_info;
407415
#endif
@@ -507,6 +515,16 @@ int qed_resc_alloc(struct qed_dev *cdev)
507515
p_hwfn->p_ll2_info = p_ll2_info;
508516
}
509517
#endif
518+
if (p_hwfn->hw_info.personality == QED_PCI_ISCSI) {
519+
p_iscsi_info = qed_iscsi_alloc(p_hwfn);
520+
if (!p_iscsi_info)
521+
goto alloc_no_mem;
522+
p_hwfn->p_iscsi_info = p_iscsi_info;
523+
p_ooo_info = qed_ooo_alloc(p_hwfn);
524+
if (!p_ooo_info)
525+
goto alloc_no_mem;
526+
p_hwfn->p_ooo_info = p_ooo_info;
527+
}
510528

511529
/* DMA info initialization */
512530
rc = qed_dmae_info_alloc(p_hwfn);
@@ -560,6 +578,10 @@ void qed_resc_setup(struct qed_dev *cdev)
560578
if (p_hwfn->using_ll2)
561579
qed_ll2_setup(p_hwfn, p_hwfn->p_ll2_info);
562580
#endif
581+
if (p_hwfn->hw_info.personality == QED_PCI_ISCSI) {
582+
qed_iscsi_setup(p_hwfn, p_hwfn->p_iscsi_info);
583+
qed_ooo_setup(p_hwfn, p_hwfn->p_ooo_info);
584+
}
563585
}
564586
}
565587

0 commit comments

Comments
 (0)