linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission
@ 2014-08-08  4:59 Jay Kallickal
  2014-08-08  4:59 ` [PATCH 2/5] be2iscsi: Fix the copyright year Jay Kallickal
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Jay Kallickal @ 2014-08-08  4:59 UTC (permalink / raw)
  To: jbottomley, linux-scsi, michaelc; +Cc: Jayamohan Kallickal, John Soni Jose

From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

 commit 73af08e11c6638e2abd6b1fa13cdab58c2bbdbf8
 Author: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
 Date:   Mon May 5 21:41:26 2014 -0400

  be2iscsi: Fix interrupt Coalescing mechanism.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
 drivers/scsi/be2iscsi/be_cmds.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h
index cc7405c..4e8cb61 100644
--- a/drivers/scsi/be2iscsi/be_cmds.h
+++ b/drivers/scsi/be2iscsi/be_cmds.h
@@ -26,9 +26,9 @@
  * The commands are serviced by the ARM processor in the OneConnect's MPU.
  */
 struct be_sge {
-	u32 pa_lo;
-	u32 pa_hi;
-	u32 len;
+	__le32 pa_lo;
+	__le32 pa_hi;
+	__le32 len;
 };
 
 #define MCC_WRB_SGE_CNT_SHIFT 3	/* bits 3 - 7 of dword 0 */
@@ -624,11 +624,11 @@ static inline struct be_sge *nonembedded_sgl(struct be_mcc_wrb *wrb)
 /******************** Modify EQ Delay *******************/
 struct be_cmd_req_modify_eq_delay {
 	struct be_cmd_req_hdr hdr;
-	u32 num_eq;
+	__le32 num_eq;
 	struct {
-		u32 eq_id;
-		u32 phase;
-		u32 delay_multiplier;
+		__le32 eq_id;
+		__le32 phase;
+		__le32 delay_multiplier;
 	} delay[MAX_CPUS];
 } __packed;
 
-- 
1.8.5.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/5] be2iscsi: Fix the copyright year
  2014-08-08  4:59 [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission Jay Kallickal
@ 2014-08-08  4:59 ` Jay Kallickal
  2014-08-27 13:50   ` Hannes Reinecke
  2014-08-08  5:00 ` [PATCH 3/5] be2iscsi: Fix updating the boot enteries in sysfs Jay Kallickal
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Jay Kallickal @ 2014-08-08  4:59 UTC (permalink / raw)
  To: jbottomley, linux-scsi, michaelc; +Cc: Jayamohan Kallickal, John Soni Jose

From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

 Change the copyright year to 2014

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
 drivers/scsi/be2iscsi/be.h       | 2 +-
 drivers/scsi/be2iscsi/be_cmds.c  | 2 +-
 drivers/scsi/be2iscsi/be_cmds.h  | 2 +-
 drivers/scsi/be2iscsi/be_iscsi.c | 2 +-
 drivers/scsi/be2iscsi/be_iscsi.h | 2 +-
 drivers/scsi/be2iscsi/be_main.c  | 2 +-
 drivers/scsi/be2iscsi/be_main.h  | 2 +-
 drivers/scsi/be2iscsi/be_mgmt.c  | 2 +-
 drivers/scsi/be2iscsi/be_mgmt.h  | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be.h b/drivers/scsi/be2iscsi/be.h
index 860f527..81e83a6 100644
--- a/drivers/scsi/be2iscsi/be.h
+++ b/drivers/scsi/be2iscsi/be.h
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2005 - 2013 Emulex
+ * Copyright (C) 2005 - 2014 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
index 1432ed5..ea4477f 100644
--- a/drivers/scsi/be2iscsi/be_cmds.c
+++ b/drivers/scsi/be2iscsi/be_cmds.c
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2005 - 2013 Emulex
+ * Copyright (C) 2005 - 2014 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h
index 4e8cb61..ccda0b6 100644
--- a/drivers/scsi/be2iscsi/be_cmds.h
+++ b/drivers/scsi/be2iscsi/be_cmds.h
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2005 - 2013 Emulex
+ * Copyright (C) 2005 - 2014 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index 8616281..e25203e 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2005 - 2013 Emulex
+ * Copyright (C) 2005 - 2014 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/drivers/scsi/be2iscsi/be_iscsi.h b/drivers/scsi/be2iscsi/be_iscsi.h
index 31ddc84..e0b3b2d 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.h
+++ b/drivers/scsi/be2iscsi/be_iscsi.h
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2005 - 2013 Emulex
+ * Copyright (C) 2005 - 2014 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 56467df..d6465ed 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2005 - 2013 Emulex
+ * Copyright (C) 2005 - 2014 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
index 9ceab42..0ca9d2d 100644
--- a/drivers/scsi/be2iscsi/be_main.h
+++ b/drivers/scsi/be2iscsi/be_main.h
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2005 - 2013 Emulex
+ * Copyright (C) 2005 - 2014 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index a3e5648..785deb3 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2005 - 2013 Emulex
+ * Copyright (C) 2005 - 2014 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
diff --git a/drivers/scsi/be2iscsi/be_mgmt.h b/drivers/scsi/be2iscsi/be_mgmt.h
index 24a8fc5..bd81446 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.h
+++ b/drivers/scsi/be2iscsi/be_mgmt.h
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2005 - 2013 Emulex
+ * Copyright (C) 2005 - 2014 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
-- 
1.8.5.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/5] be2iscsi: Fix updating the boot enteries in sysfs
  2014-08-08  4:59 [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission Jay Kallickal
  2014-08-08  4:59 ` [PATCH 2/5] be2iscsi: Fix the copyright year Jay Kallickal
@ 2014-08-08  5:00 ` Jay Kallickal
  2014-08-27 13:52   ` Hannes Reinecke
  2014-08-08  5:00 ` [PATCH 4/5] be2iscsi: Fix processing CQE before connection resources are freed Jay Kallickal
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Jay Kallickal @ 2014-08-08  5:00 UTC (permalink / raw)
  To: jbottomley, linux-scsi, michaelc
  Cc: Jayamohan Kallickal, Minh Tran, John Soni Jose

From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

 During port async event driver should check if there is any boot target
 configured on the adapter. Update sysfs enteries with the boot target
 parameters.

Signed-off-by: Minh Tran <minhduc.tran@emulex.com>
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
 drivers/scsi/be2iscsi/be_cmds.c | 38 ++++++++++++++++++++++++++++++++++++--
 drivers/scsi/be2iscsi/be_cmds.h |  8 ++++++++
 drivers/scsi/be2iscsi/be_main.c | 17 +++++++++++++++++
 drivers/scsi/be2iscsi/be_main.h |  1 +
 4 files changed, 62 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
index ea4477f..80d97f3 100644
--- a/drivers/scsi/be2iscsi/be_cmds.c
+++ b/drivers/scsi/be2iscsi/be_cmds.c
@@ -275,6 +275,19 @@ bool is_link_state_evt(u32 trailer)
 		  ASYNC_EVENT_CODE_LINK_STATE);
 }
 
+static bool is_iscsi_evt(u32 trailer)
+{
+	return ((trailer >> ASYNC_TRAILER_EVENT_CODE_SHIFT) &
+		  ASYNC_TRAILER_EVENT_CODE_MASK) ==
+		  ASYNC_EVENT_CODE_ISCSI;
+}
+
+static int iscsi_evt_type(u32 trailer)
+{
+	return (trailer >> ASYNC_TRAILER_EVENT_TYPE_SHIFT) &
+		 ASYNC_TRAILER_EVENT_TYPE_MASK;
+}
+
 static inline bool be_mcc_compl_is_new(struct be_mcc_compl *compl)
 {
 	if (compl->flags != 0) {
@@ -438,7 +451,7 @@ void beiscsi_async_link_state_process(struct beiscsi_hba *phba,
 	} else if ((evt->port_link_status & ASYNC_EVENT_LINK_UP) ||
 		    ((evt->port_link_status & ASYNC_EVENT_LOGICAL) &&
 		     (evt->port_fault == BEISCSI_PHY_LINK_FAULT_NONE))) {
-		phba->state = BE_ADAPTER_LINK_UP;
+		phba->state = BE_ADAPTER_LINK_UP | BE_ADAPTER_CHECK_BOOT;
 
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_INIT,
@@ -461,7 +474,28 @@ int beiscsi_process_mcc(struct beiscsi_hba *phba)
 				/* Interpret compl as a async link evt */
 				beiscsi_async_link_state_process(phba,
 				   (struct be_async_event_link_state *) compl);
-			else
+			else if (is_iscsi_evt(compl->flags)) {
+				switch (iscsi_evt_type(compl->flags)) {
+				case ASYNC_EVENT_NEW_ISCSI_TGT_DISC:
+				case ASYNC_EVENT_NEW_ISCSI_CONN:
+				case ASYNC_EVENT_NEW_TCP_CONN:
+					phba->state |= BE_ADAPTER_CHECK_BOOT;
+					beiscsi_log(phba, KERN_ERR,
+						    BEISCSI_LOG_CONFIG |
+						    BEISCSI_LOG_MBOX,
+						    "BC_%d : Async iscsi Event,"
+						    " flags handled = 0x%08x\n",
+						    compl->flags);
+					break;
+				default:
+					beiscsi_log(phba, KERN_ERR,
+						    BEISCSI_LOG_CONFIG |
+						    BEISCSI_LOG_MBOX,
+						    "BC_%d : Unsupported Async"
+						    " Event, flags = 0x%08x\n",
+						    compl->flags);
+				}
+			} else
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_CONFIG |
 					    BEISCSI_LOG_MBOX,
diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h
index ccda0b6..9889743 100644
--- a/drivers/scsi/be2iscsi/be_cmds.h
+++ b/drivers/scsi/be2iscsi/be_cmds.h
@@ -118,6 +118,14 @@ struct be_mcc_compl {
 #define ASYNC_TRAILER_EVENT_CODE_SHIFT	8	/* bits 8 - 15 */
 #define ASYNC_TRAILER_EVENT_CODE_MASK	0xFF
 #define ASYNC_EVENT_CODE_LINK_STATE	0x1
+#define ASYNC_EVENT_CODE_ISCSI		0x4
+
+#define ASYNC_TRAILER_EVENT_TYPE_SHIFT	16	/* bits 16 - 23 */
+#define ASYNC_TRAILER_EVENT_TYPE_MASK	0xF
+#define ASYNC_EVENT_NEW_ISCSI_TGT_DISC	0x4
+#define ASYNC_EVENT_NEW_ISCSI_CONN	0x5
+#define ASYNC_EVENT_NEW_TCP_CONN	0x7
+
 struct be_async_event_trailer {
 	u32 code;
 };
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index d6465ed..8f9f625 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4379,6 +4379,10 @@ static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
 {
 	struct iscsi_boot_kobj *boot_kobj;
 
+	/* it has been created previously */
+	if (phba->boot_kset)
+		return 0;
+
 	/* get boot info using mgmt cmd */
 	if (beiscsi_get_boot_info(phba))
 		/* Try to see if we can carry on without this */
@@ -5337,6 +5341,14 @@ static void be_eqd_update(struct beiscsi_hba *phba)
 	}
 }
 
+static void be_check_boot_session(struct beiscsi_hba *phba)
+{
+	if (beiscsi_setup_boot_info(phba))
+		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
+			    "BM_%d : Could not set up "
+			    "iSCSI boot info on async event.\n");
+}
+
 /*
  * beiscsi_hw_health_check()- Check adapter health
  * @work: work item to check HW health
@@ -5352,6 +5364,11 @@ beiscsi_hw_health_check(struct work_struct *work)
 
 	be_eqd_update(phba);
 
+	if (phba->state & BE_ADAPTER_CHECK_BOOT) {
+		phba->state &= ~BE_ADAPTER_CHECK_BOOT;
+		be_check_boot_session(phba);
+	}
+
 	beiscsi_ue_detect(phba);
 
 	schedule_delayed_work(&phba->beiscsi_hw_check_task,
diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
index 0ca9d2d..1e3428a 100644
--- a/drivers/scsi/be2iscsi/be_main.h
+++ b/drivers/scsi/be2iscsi/be_main.h
@@ -104,6 +104,7 @@
 #define BE_ADAPTER_LINK_DOWN	0x002
 #define BE_ADAPTER_PCI_ERR	0x004
 #define BE_ADAPTER_STATE_SHUTDOWN	0x008
+#define BE_ADAPTER_CHECK_BOOT	0x010
 
 
 #define BEISCSI_CLEAN_UNLOAD	0x01
-- 
1.8.5.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/5] be2iscsi: Fix processing CQE before connection resources are freed
  2014-08-08  4:59 [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission Jay Kallickal
  2014-08-08  4:59 ` [PATCH 2/5] be2iscsi: Fix the copyright year Jay Kallickal
  2014-08-08  5:00 ` [PATCH 3/5] be2iscsi: Fix updating the boot enteries in sysfs Jay Kallickal
@ 2014-08-08  5:00 ` Jay Kallickal
  2014-08-27 13:53   ` Hannes Reinecke
  2014-08-08  5:00 ` [PATCH 5/5] be2iscsi: Bump the driver version Jay Kallickal
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Jay Kallickal @ 2014-08-08  5:00 UTC (permalink / raw)
  To: jbottomley, linux-scsi, michaelc; +Cc: Jayamohan Kallickal, John Soni Jose

From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

 Driver should process the completion queue entries before a connection
 resources are freed. While running mixed traffic due to latency, driver
 processes the CQE after the connection resources are freed. This fix
 processes all the completion queue before the connection resources are
 freed.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
 drivers/scsi/be2iscsi/be_iscsi.c | 29 +++++++++++++++++++++++++++++
 drivers/scsi/be2iscsi/be_main.c  | 15 ++++++++++++++-
 drivers/scsi/be2iscsi/be_main.h  |  3 +++
 3 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index e25203e..b7391a3 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -1274,6 +1274,31 @@ int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms)
 }
 
 /**
+ * beiscsi_flush_cq()- Flush the CQ created.
+ * @phba: ptr device priv structure.
+ *
+ * Before the connection resource are freed flush
+ * all the CQ enteries
+ **/
+static void beiscsi_flush_cq(struct beiscsi_hba *phba)
+{
+	uint16_t i;
+	struct be_eq_obj *pbe_eq;
+	struct hwi_controller *phwi_ctrlr;
+	struct hwi_context_memory *phwi_context;
+
+	phwi_ctrlr = phba->phwi_ctrlr;
+	phwi_context = phwi_ctrlr->phwi_ctxt;
+
+	for (i = 0; i < phba->num_cpus; i++) {
+		pbe_eq = &phwi_context->be_eq[i];
+		blk_iopoll_disable(&pbe_eq->iopoll);
+		beiscsi_process_cq(pbe_eq);
+		blk_iopoll_enable(&pbe_eq->iopoll);
+	}
+}
+
+/**
  * beiscsi_close_conn - Upload the  connection
  * @ep: The iscsi endpoint
  * @flag: The type of connection closure
@@ -1294,6 +1319,10 @@ static int beiscsi_close_conn(struct  beiscsi_endpoint *beiscsi_ep, int flag)
 	}
 
 	ret = beiscsi_mccq_compl(phba, tag, NULL, NULL);
+
+	/* Flush the CQ entries */
+	beiscsi_flush_cq(phba);
+
 	return ret;
 }
 
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 8f9f625..cbc9fc2 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -2068,7 +2068,7 @@ static void  beiscsi_process_mcc_isr(struct beiscsi_hba *phba)
  * return
  *     Number of Completion Entries processed.
  **/
-static unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq)
+unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq)
 {
 	struct be_queue_info *cq;
 	struct sol_cqe *sol;
@@ -2110,6 +2110,18 @@ static unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq)
 
 		cri_index = BE_GET_CRI_FROM_CID(cid);
 		ep = phba->ep_array[cri_index];
+
+		if (ep == NULL) {
+			/* connection has already been freed
+			 * just move on to next one
+			 */
+			beiscsi_log(phba, KERN_WARNING,
+				    BEISCSI_LOG_INIT,
+				    "BM_%d : proc cqe of disconn ep: cid %d\n",
+				    cid);
+			goto proc_next_cqe;
+		}
+
 		beiscsi_ep = ep->dd_data;
 		beiscsi_conn = beiscsi_ep->conn;
 
@@ -2219,6 +2231,7 @@ static unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq)
 			break;
 		}
 
+proc_next_cqe:
 		AMAP_SET_BITS(struct amap_sol_cqe, valid, sol, 0);
 		queue_tail_inc(cq);
 		sol = queue_tail_node(cq);
diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
index 1e3428a..5f8b0fc 100644
--- a/drivers/scsi/be2iscsi/be_main.h
+++ b/drivers/scsi/be2iscsi/be_main.h
@@ -840,6 +840,9 @@ void beiscsi_free_mgmt_task_handles(struct beiscsi_conn *beiscsi_conn,
 void hwi_ring_cq_db(struct beiscsi_hba *phba,
 		     unsigned int id, unsigned int num_processed,
 		     unsigned char rearm, unsigned char event);
+
+unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq);
+
 static inline bool beiscsi_error(struct beiscsi_hba *phba)
 {
 	return phba->ue_detected || phba->fw_timeout;
-- 
1.8.5.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/5] be2iscsi: Bump the driver version
  2014-08-08  4:59 [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission Jay Kallickal
                   ` (2 preceding siblings ...)
  2014-08-08  5:00 ` [PATCH 4/5] be2iscsi: Fix processing CQE before connection resources are freed Jay Kallickal
@ 2014-08-08  5:00 ` Jay Kallickal
  2014-08-27 13:53   ` Hannes Reinecke
  2014-08-08  5:00 ` [PATCH 0/5] be2iscsi: Update to 10.4.74.0 Jay Kallickal
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Jay Kallickal @ 2014-08-08  5:00 UTC (permalink / raw)
  To: jbottomley, linux-scsi, michaelc; +Cc: Jayamohan Kallickal, John Soni Jose

From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

 Bump the driver version

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
 drivers/scsi/be2iscsi/be_main.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
index 5f8b0fc..3605631 100644
--- a/drivers/scsi/be2iscsi/be_main.h
+++ b/drivers/scsi/be2iscsi/be_main.h
@@ -36,7 +36,7 @@
 #include <scsi/scsi_transport_iscsi.h>
 
 #define DRV_NAME		"be2iscsi"
-#define BUILD_STR		"10.2.273.0"
+#define BUILD_STR		"10.4.74.0"
 #define BE_NAME			"Emulex OneConnect" \
 				"Open-iSCSI Driver version" BUILD_STR
 #define DRV_DESC		BE_NAME " " "Driver"
-- 
1.8.5.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 0/5] be2iscsi: Update to 10.4.74.0
  2014-08-08  4:59 [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission Jay Kallickal
                   ` (3 preceding siblings ...)
  2014-08-08  5:00 ` [PATCH 5/5] be2iscsi: Bump the driver version Jay Kallickal
@ 2014-08-08  5:00 ` Jay Kallickal
  2014-08-08 18:55   ` Mike Christie
  2014-08-19 17:27 ` [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission Christoph Hellwig
  2014-08-27 13:50 ` Hannes Reinecke
  6 siblings, 1 reply; 13+ messages in thread
From: Jay Kallickal @ 2014-08-08  5:00 UTC (permalink / raw)
  To: jbottomley, linux-scsi, michaelc; +Cc: Jayamohan Kallickal, Jayamohan Kallickal

From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

 This patchset updates be2iscsi driver to 10.4.74.0

These patches are based on for-next branch of scsi.git.

0001 - Fix the sparse warning  
0002 - Update the copyright year
0003 - Fix updating the boot enteries in sysfs
0004 - Fix processing CQE before freeing connection resources
0005 - Bump the driver version

Thanks
Jay

Signed-off-by: Jayamohan Kallickal <Jayamohan.Kallickal@emulex.com>
---

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/5] be2iscsi: Update to 10.4.74.0
  2014-08-08  5:00 ` [PATCH 0/5] be2iscsi: Update to 10.4.74.0 Jay Kallickal
@ 2014-08-08 18:55   ` Mike Christie
  0 siblings, 0 replies; 13+ messages in thread
From: Mike Christie @ 2014-08-08 18:55 UTC (permalink / raw)
  To: Jay Kallickal; +Cc: jbottomley, linux-scsi, Jayamohan Kallickal

On 08/08/2014 12:00 AM, Jay Kallickal wrote:
> From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
> 
>  This patchset updates be2iscsi driver to 10.4.74.0
> 
> These patches are based on for-next branch of scsi.git.
> 
> 0001 - Fix the sparse warning  
> 0002 - Update the copyright year
> 0003 - Fix updating the boot enteries in sysfs
> 0004 - Fix processing CQE before freeing connection resources
> 0005 - Bump the driver version
> 

Patches look ok to me. I am still behind on working on another fix for
4/5 which is more invasive, so that is ok with me.

Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission
  2014-08-08  4:59 [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission Jay Kallickal
                   ` (4 preceding siblings ...)
  2014-08-08  5:00 ` [PATCH 0/5] be2iscsi: Update to 10.4.74.0 Jay Kallickal
@ 2014-08-19 17:27 ` Christoph Hellwig
  2014-08-27 13:50 ` Hannes Reinecke
  6 siblings, 0 replies; 13+ messages in thread
From: Christoph Hellwig @ 2014-08-19 17:27 UTC (permalink / raw)
  To: Jay Kallickal
  Cc: jbottomley, linux-scsi, michaelc, Jayamohan Kallickal,
	John Soni Jose

Thanks,

applied the whole series to the drivers-for-3.18 tree.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission
  2014-08-08  4:59 [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission Jay Kallickal
                   ` (5 preceding siblings ...)
  2014-08-19 17:27 ` [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission Christoph Hellwig
@ 2014-08-27 13:50 ` Hannes Reinecke
  6 siblings, 0 replies; 13+ messages in thread
From: Hannes Reinecke @ 2014-08-27 13:50 UTC (permalink / raw)
  To: Jay Kallickal, jbottomley, linux-scsi, michaelc
  Cc: Jayamohan Kallickal, John Soni Jose

On 08/08/2014 06:59 AM, Jay Kallickal wrote:
> From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
>
>   commit 73af08e11c6638e2abd6b1fa13cdab58c2bbdbf8
>   Author: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
>   Date:   Mon May 5 21:41:26 2014 -0400
>
>    be2iscsi: Fix interrupt Coalescing mechanism.
>
> Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
> ---
>   drivers/scsi/be2iscsi/be_cmds.h | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h
> index cc7405c..4e8cb61 100644
> --- a/drivers/scsi/be2iscsi/be_cmds.h
> +++ b/drivers/scsi/be2iscsi/be_cmds.h
> @@ -26,9 +26,9 @@
>    * The commands are serviced by the ARM processor in the OneConnect's MPU.
>    */
>   struct be_sge {
> -	u32 pa_lo;
> -	u32 pa_hi;
> -	u32 len;
> +	__le32 pa_lo;
> +	__le32 pa_hi;
> +	__le32 len;
>   };
>
>   #define MCC_WRB_SGE_CNT_SHIFT 3	/* bits 3 - 7 of dword 0 */
> @@ -624,11 +624,11 @@ static inline struct be_sge *nonembedded_sgl(struct be_mcc_wrb *wrb)
>   /******************** Modify EQ Delay *******************/
>   struct be_cmd_req_modify_eq_delay {
>   	struct be_cmd_req_hdr hdr;
> -	u32 num_eq;
> +	__le32 num_eq;
>   	struct {
> -		u32 eq_id;
> -		u32 phase;
> -		u32 delay_multiplier;
> +		__le32 eq_id;
> +		__le32 phase;
> +		__le32 delay_multiplier;
>   	} delay[MAX_CPUS];
>   } __packed;
>
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/5] be2iscsi: Fix the copyright year
  2014-08-08  4:59 ` [PATCH 2/5] be2iscsi: Fix the copyright year Jay Kallickal
@ 2014-08-27 13:50   ` Hannes Reinecke
  0 siblings, 0 replies; 13+ messages in thread
From: Hannes Reinecke @ 2014-08-27 13:50 UTC (permalink / raw)
  To: Jay Kallickal, jbottomley, linux-scsi, michaelc
  Cc: Jayamohan Kallickal, John Soni Jose

On 08/08/2014 06:59 AM, Jay Kallickal wrote:
> From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
>
>   Change the copyright year to 2014
>
> Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
> ---
>   drivers/scsi/be2iscsi/be.h       | 2 +-
>   drivers/scsi/be2iscsi/be_cmds.c  | 2 +-
>   drivers/scsi/be2iscsi/be_cmds.h  | 2 +-
>   drivers/scsi/be2iscsi/be_iscsi.c | 2 +-
>   drivers/scsi/be2iscsi/be_iscsi.h | 2 +-
>   drivers/scsi/be2iscsi/be_main.c  | 2 +-
>   drivers/scsi/be2iscsi/be_main.h  | 2 +-
>   drivers/scsi/be2iscsi/be_mgmt.c  | 2 +-
>   drivers/scsi/be2iscsi/be_mgmt.h  | 2 +-
>   9 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be.h b/drivers/scsi/be2iscsi/be.h
> index 860f527..81e83a6 100644
> --- a/drivers/scsi/be2iscsi/be.h
> +++ b/drivers/scsi/be2iscsi/be.h
> @@ -1,5 +1,5 @@
>   /**
> - * Copyright (C) 2005 - 2013 Emulex
> + * Copyright (C) 2005 - 2014 Emulex
>    * All rights reserved.
>    *
>    * This program is free software; you can redistribute it and/or
> diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
> index 1432ed5..ea4477f 100644
> --- a/drivers/scsi/be2iscsi/be_cmds.c
> +++ b/drivers/scsi/be2iscsi/be_cmds.c
> @@ -1,5 +1,5 @@
>   /**
> - * Copyright (C) 2005 - 2013 Emulex
> + * Copyright (C) 2005 - 2014 Emulex
>    * All rights reserved.
>    *
>    * This program is free software; you can redistribute it and/or
> diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h
> index 4e8cb61..ccda0b6 100644
> --- a/drivers/scsi/be2iscsi/be_cmds.h
> +++ b/drivers/scsi/be2iscsi/be_cmds.h
> @@ -1,5 +1,5 @@
>   /**
> - * Copyright (C) 2005 - 2013 Emulex
> + * Copyright (C) 2005 - 2014 Emulex
>    * All rights reserved.
>    *
>    * This program is free software; you can redistribute it and/or
> diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
> index 8616281..e25203e 100644
> --- a/drivers/scsi/be2iscsi/be_iscsi.c
> +++ b/drivers/scsi/be2iscsi/be_iscsi.c
> @@ -1,5 +1,5 @@
>   /**
> - * Copyright (C) 2005 - 2013 Emulex
> + * Copyright (C) 2005 - 2014 Emulex
>    * All rights reserved.
>    *
>    * This program is free software; you can redistribute it and/or
> diff --git a/drivers/scsi/be2iscsi/be_iscsi.h b/drivers/scsi/be2iscsi/be_iscsi.h
> index 31ddc84..e0b3b2d 100644
> --- a/drivers/scsi/be2iscsi/be_iscsi.h
> +++ b/drivers/scsi/be2iscsi/be_iscsi.h
> @@ -1,5 +1,5 @@
>   /**
> - * Copyright (C) 2005 - 2013 Emulex
> + * Copyright (C) 2005 - 2014 Emulex
>    * All rights reserved.
>    *
>    * This program is free software; you can redistribute it and/or
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
> index 56467df..d6465ed 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -1,5 +1,5 @@
>   /**
> - * Copyright (C) 2005 - 2013 Emulex
> + * Copyright (C) 2005 - 2014 Emulex
>    * All rights reserved.
>    *
>    * This program is free software; you can redistribute it and/or
> diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
> index 9ceab42..0ca9d2d 100644
> --- a/drivers/scsi/be2iscsi/be_main.h
> +++ b/drivers/scsi/be2iscsi/be_main.h
> @@ -1,5 +1,5 @@
>   /**
> - * Copyright (C) 2005 - 2013 Emulex
> + * Copyright (C) 2005 - 2014 Emulex
>    * All rights reserved.
>    *
>    * This program is free software; you can redistribute it and/or
> diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
> index a3e5648..785deb3 100644
> --- a/drivers/scsi/be2iscsi/be_mgmt.c
> +++ b/drivers/scsi/be2iscsi/be_mgmt.c
> @@ -1,5 +1,5 @@
>   /**
> - * Copyright (C) 2005 - 2013 Emulex
> + * Copyright (C) 2005 - 2014 Emulex
>    * All rights reserved.
>    *
>    * This program is free software; you can redistribute it and/or
> diff --git a/drivers/scsi/be2iscsi/be_mgmt.h b/drivers/scsi/be2iscsi/be_mgmt.h
> index 24a8fc5..bd81446 100644
> --- a/drivers/scsi/be2iscsi/be_mgmt.h
> +++ b/drivers/scsi/be2iscsi/be_mgmt.h
> @@ -1,5 +1,5 @@
>   /**
> - * Copyright (C) 2005 - 2013 Emulex
> + * Copyright (C) 2005 - 2014 Emulex
>    * All rights reserved.
>    *
>    * This program is free software; you can redistribute it and/or
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/5] be2iscsi: Fix updating the boot enteries in sysfs
  2014-08-08  5:00 ` [PATCH 3/5] be2iscsi: Fix updating the boot enteries in sysfs Jay Kallickal
@ 2014-08-27 13:52   ` Hannes Reinecke
  0 siblings, 0 replies; 13+ messages in thread
From: Hannes Reinecke @ 2014-08-27 13:52 UTC (permalink / raw)
  To: Jay Kallickal, jbottomley, linux-scsi, michaelc
  Cc: Jayamohan Kallickal, Minh Tran, John Soni Jose

On 08/08/2014 07:00 AM, Jay Kallickal wrote:
> From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
>
>   During port async event driver should check if there is any boot target
>   configured on the adapter. Update sysfs enteries with the boot target
>   parameters.
>
> Signed-off-by: Minh Tran <minhduc.tran@emulex.com>
> Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
> ---
>   drivers/scsi/be2iscsi/be_cmds.c | 38 ++++++++++++++++++++++++++++++++++++--
>   drivers/scsi/be2iscsi/be_cmds.h |  8 ++++++++
>   drivers/scsi/be2iscsi/be_main.c | 17 +++++++++++++++++
>   drivers/scsi/be2iscsi/be_main.h |  1 +
>   4 files changed, 62 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
> index ea4477f..80d97f3 100644
> --- a/drivers/scsi/be2iscsi/be_cmds.c
> +++ b/drivers/scsi/be2iscsi/be_cmds.c
> @@ -275,6 +275,19 @@ bool is_link_state_evt(u32 trailer)
>   		  ASYNC_EVENT_CODE_LINK_STATE);
>   }
>
> +static bool is_iscsi_evt(u32 trailer)
> +{
> +	return ((trailer >> ASYNC_TRAILER_EVENT_CODE_SHIFT) &
> +		  ASYNC_TRAILER_EVENT_CODE_MASK) ==
> +		  ASYNC_EVENT_CODE_ISCSI;
> +}
> +
> +static int iscsi_evt_type(u32 trailer)
> +{
> +	return (trailer >> ASYNC_TRAILER_EVENT_TYPE_SHIFT) &
> +		 ASYNC_TRAILER_EVENT_TYPE_MASK;
> +}
> +
>   static inline bool be_mcc_compl_is_new(struct be_mcc_compl *compl)
>   {
>   	if (compl->flags != 0) {
> @@ -438,7 +451,7 @@ void beiscsi_async_link_state_process(struct beiscsi_hba *phba,
>   	} else if ((evt->port_link_status & ASYNC_EVENT_LINK_UP) ||
>   		    ((evt->port_link_status & ASYNC_EVENT_LOGICAL) &&
>   		     (evt->port_fault == BEISCSI_PHY_LINK_FAULT_NONE))) {
> -		phba->state = BE_ADAPTER_LINK_UP;
> +		phba->state = BE_ADAPTER_LINK_UP | BE_ADAPTER_CHECK_BOOT;
>
>   		beiscsi_log(phba, KERN_ERR,
>   			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_INIT,
> @@ -461,7 +474,28 @@ int beiscsi_process_mcc(struct beiscsi_hba *phba)
>   				/* Interpret compl as a async link evt */
>   				beiscsi_async_link_state_process(phba,
>   				   (struct be_async_event_link_state *) compl);
> -			else
> +			else if (is_iscsi_evt(compl->flags)) {
> +				switch (iscsi_evt_type(compl->flags)) {
> +				case ASYNC_EVENT_NEW_ISCSI_TGT_DISC:
> +				case ASYNC_EVENT_NEW_ISCSI_CONN:
> +				case ASYNC_EVENT_NEW_TCP_CONN:
> +					phba->state |= BE_ADAPTER_CHECK_BOOT;
> +					beiscsi_log(phba, KERN_ERR,
> +						    BEISCSI_LOG_CONFIG |
> +						    BEISCSI_LOG_MBOX,
> +						    "BC_%d : Async iscsi Event,"
> +						    " flags handled = 0x%08x\n",
> +						    compl->flags);
> +					break;
> +				default:
> +					beiscsi_log(phba, KERN_ERR,
> +						    BEISCSI_LOG_CONFIG |
> +						    BEISCSI_LOG_MBOX,
> +						    "BC_%d : Unsupported Async"
> +						    " Event, flags = 0x%08x\n",
> +						    compl->flags);
> +				}
> +			} else
>   				beiscsi_log(phba, KERN_ERR,
>   					    BEISCSI_LOG_CONFIG |
>   					    BEISCSI_LOG_MBOX,
> diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h
> index ccda0b6..9889743 100644
> --- a/drivers/scsi/be2iscsi/be_cmds.h
> +++ b/drivers/scsi/be2iscsi/be_cmds.h
> @@ -118,6 +118,14 @@ struct be_mcc_compl {
>   #define ASYNC_TRAILER_EVENT_CODE_SHIFT	8	/* bits 8 - 15 */
>   #define ASYNC_TRAILER_EVENT_CODE_MASK	0xFF
>   #define ASYNC_EVENT_CODE_LINK_STATE	0x1
> +#define ASYNC_EVENT_CODE_ISCSI		0x4
> +
> +#define ASYNC_TRAILER_EVENT_TYPE_SHIFT	16	/* bits 16 - 23 */
> +#define ASYNC_TRAILER_EVENT_TYPE_MASK	0xF
> +#define ASYNC_EVENT_NEW_ISCSI_TGT_DISC	0x4
> +#define ASYNC_EVENT_NEW_ISCSI_CONN	0x5
> +#define ASYNC_EVENT_NEW_TCP_CONN	0x7
> +
>   struct be_async_event_trailer {
>   	u32 code;
>   };
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
> index d6465ed..8f9f625 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -4379,6 +4379,10 @@ static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
>   {
>   	struct iscsi_boot_kobj *boot_kobj;
>
> +	/* it has been created previously */
> +	if (phba->boot_kset)
> +		return 0;
> +
>   	/* get boot info using mgmt cmd */
>   	if (beiscsi_get_boot_info(phba))
>   		/* Try to see if we can carry on without this */
> @@ -5337,6 +5341,14 @@ static void be_eqd_update(struct beiscsi_hba *phba)
>   	}
>   }
>
> +static void be_check_boot_session(struct beiscsi_hba *phba)
> +{
> +	if (beiscsi_setup_boot_info(phba))
> +		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> +			    "BM_%d : Could not set up "
> +			    "iSCSI boot info on async event.\n");
> +}
> +
>   /*
>    * beiscsi_hw_health_check()- Check adapter health
>    * @work: work item to check HW health
> @@ -5352,6 +5364,11 @@ beiscsi_hw_health_check(struct work_struct *work)
>
>   	be_eqd_update(phba);
>
> +	if (phba->state & BE_ADAPTER_CHECK_BOOT) {
> +		phba->state &= ~BE_ADAPTER_CHECK_BOOT;
> +		be_check_boot_session(phba);
> +	}
> +
>   	beiscsi_ue_detect(phba);
>
>   	schedule_delayed_work(&phba->beiscsi_hw_check_task,
> diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
> index 0ca9d2d..1e3428a 100644
> --- a/drivers/scsi/be2iscsi/be_main.h
> +++ b/drivers/scsi/be2iscsi/be_main.h
> @@ -104,6 +104,7 @@
>   #define BE_ADAPTER_LINK_DOWN	0x002
>   #define BE_ADAPTER_PCI_ERR	0x004
>   #define BE_ADAPTER_STATE_SHUTDOWN	0x008
> +#define BE_ADAPTER_CHECK_BOOT	0x010
>
>
>   #define BEISCSI_CLEAN_UNLOAD	0x01
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 4/5] be2iscsi: Fix processing CQE before connection resources are freed
  2014-08-08  5:00 ` [PATCH 4/5] be2iscsi: Fix processing CQE before connection resources are freed Jay Kallickal
@ 2014-08-27 13:53   ` Hannes Reinecke
  0 siblings, 0 replies; 13+ messages in thread
From: Hannes Reinecke @ 2014-08-27 13:53 UTC (permalink / raw)
  To: Jay Kallickal, jbottomley, linux-scsi, michaelc
  Cc: Jayamohan Kallickal, John Soni Jose

On 08/08/2014 07:00 AM, Jay Kallickal wrote:
> From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
>
>   Driver should process the completion queue entries before a connection
>   resources are freed. While running mixed traffic due to latency, driver
>   processes the CQE after the connection resources are freed. This fix
>   processes all the completion queue before the connection resources are
>   freed.
>
> Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
> ---
>   drivers/scsi/be2iscsi/be_iscsi.c | 29 +++++++++++++++++++++++++++++
>   drivers/scsi/be2iscsi/be_main.c  | 15 ++++++++++++++-
>   drivers/scsi/be2iscsi/be_main.h  |  3 +++
>   3 files changed, 46 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
> index e25203e..b7391a3 100644
> --- a/drivers/scsi/be2iscsi/be_iscsi.c
> +++ b/drivers/scsi/be2iscsi/be_iscsi.c
> @@ -1274,6 +1274,31 @@ int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms)
>   }
>
>   /**
> + * beiscsi_flush_cq()- Flush the CQ created.
> + * @phba: ptr device priv structure.
> + *
> + * Before the connection resource are freed flush
> + * all the CQ enteries
> + **/
> +static void beiscsi_flush_cq(struct beiscsi_hba *phba)
> +{
> +	uint16_t i;
> +	struct be_eq_obj *pbe_eq;
> +	struct hwi_controller *phwi_ctrlr;
> +	struct hwi_context_memory *phwi_context;
> +
> +	phwi_ctrlr = phba->phwi_ctrlr;
> +	phwi_context = phwi_ctrlr->phwi_ctxt;
> +
> +	for (i = 0; i < phba->num_cpus; i++) {
> +		pbe_eq = &phwi_context->be_eq[i];
> +		blk_iopoll_disable(&pbe_eq->iopoll);
> +		beiscsi_process_cq(pbe_eq);
> +		blk_iopoll_enable(&pbe_eq->iopoll);
> +	}
> +}
> +
> +/**
>    * beiscsi_close_conn - Upload the  connection
>    * @ep: The iscsi endpoint
>    * @flag: The type of connection closure
> @@ -1294,6 +1319,10 @@ static int beiscsi_close_conn(struct  beiscsi_endpoint *beiscsi_ep, int flag)
>   	}
>
>   	ret = beiscsi_mccq_compl(phba, tag, NULL, NULL);
> +
> +	/* Flush the CQ entries */
> +	beiscsi_flush_cq(phba);
> +
>   	return ret;
>   }
>
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
> index 8f9f625..cbc9fc2 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -2068,7 +2068,7 @@ static void  beiscsi_process_mcc_isr(struct beiscsi_hba *phba)
>    * return
>    *     Number of Completion Entries processed.
>    **/
> -static unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq)
> +unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq)
>   {
>   	struct be_queue_info *cq;
>   	struct sol_cqe *sol;
> @@ -2110,6 +2110,18 @@ static unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq)
>
>   		cri_index = BE_GET_CRI_FROM_CID(cid);
>   		ep = phba->ep_array[cri_index];
> +
> +		if (ep == NULL) {
> +			/* connection has already been freed
> +			 * just move on to next one
> +			 */
> +			beiscsi_log(phba, KERN_WARNING,
> +				    BEISCSI_LOG_INIT,
> +				    "BM_%d : proc cqe of disconn ep: cid %d\n",
> +				    cid);
> +			goto proc_next_cqe;
> +		}
> +
>   		beiscsi_ep = ep->dd_data;
>   		beiscsi_conn = beiscsi_ep->conn;
>
> @@ -2219,6 +2231,7 @@ static unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq)
>   			break;
>   		}
>
> +proc_next_cqe:
>   		AMAP_SET_BITS(struct amap_sol_cqe, valid, sol, 0);
>   		queue_tail_inc(cq);
>   		sol = queue_tail_node(cq);
> diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
> index 1e3428a..5f8b0fc 100644
> --- a/drivers/scsi/be2iscsi/be_main.h
> +++ b/drivers/scsi/be2iscsi/be_main.h
> @@ -840,6 +840,9 @@ void beiscsi_free_mgmt_task_handles(struct beiscsi_conn *beiscsi_conn,
>   void hwi_ring_cq_db(struct beiscsi_hba *phba,
>   		     unsigned int id, unsigned int num_processed,
>   		     unsigned char rearm, unsigned char event);
> +
> +unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq);
> +
>   static inline bool beiscsi_error(struct beiscsi_hba *phba)
>   {
>   	return phba->ue_detected || phba->fw_timeout;
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/5] be2iscsi: Bump the driver version
  2014-08-08  5:00 ` [PATCH 5/5] be2iscsi: Bump the driver version Jay Kallickal
@ 2014-08-27 13:53   ` Hannes Reinecke
  0 siblings, 0 replies; 13+ messages in thread
From: Hannes Reinecke @ 2014-08-27 13:53 UTC (permalink / raw)
  To: Jay Kallickal, jbottomley, linux-scsi, michaelc
  Cc: Jayamohan Kallickal, John Soni Jose

On 08/08/2014 07:00 AM, Jay Kallickal wrote:
> From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
>
>   Bump the driver version
>
> Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
> ---
>   drivers/scsi/be2iscsi/be_main.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
> index 5f8b0fc..3605631 100644
> --- a/drivers/scsi/be2iscsi/be_main.h
> +++ b/drivers/scsi/be2iscsi/be_main.h
> @@ -36,7 +36,7 @@
>   #include <scsi/scsi_transport_iscsi.h>
>
>   #define DRV_NAME		"be2iscsi"
> -#define BUILD_STR		"10.2.273.0"
> +#define BUILD_STR		"10.4.74.0"
>   #define BE_NAME			"Emulex OneConnect" \
>   				"Open-iSCSI Driver version" BUILD_STR
>   #define DRV_DESC		BE_NAME " " "Driver"
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-08-27 13:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-08  4:59 [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission Jay Kallickal
2014-08-08  4:59 ` [PATCH 2/5] be2iscsi: Fix the copyright year Jay Kallickal
2014-08-27 13:50   ` Hannes Reinecke
2014-08-08  5:00 ` [PATCH 3/5] be2iscsi: Fix updating the boot enteries in sysfs Jay Kallickal
2014-08-27 13:52   ` Hannes Reinecke
2014-08-08  5:00 ` [PATCH 4/5] be2iscsi: Fix processing CQE before connection resources are freed Jay Kallickal
2014-08-27 13:53   ` Hannes Reinecke
2014-08-08  5:00 ` [PATCH 5/5] be2iscsi: Bump the driver version Jay Kallickal
2014-08-27 13:53   ` Hannes Reinecke
2014-08-08  5:00 ` [PATCH 0/5] be2iscsi: Update to 10.4.74.0 Jay Kallickal
2014-08-08 18:55   ` Mike Christie
2014-08-19 17:27 ` [PATCH 1/5] be2iscsi: Fix the sparse warning introduced in previous submission Christoph Hellwig
2014-08-27 13:50 ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).