[Open-FCoE] [RFC PATCH 14/15] libfc: Clean up fc_rport_error

Robert Love robert.w.love at intel.com
Tue Sep 2 22:38:06 UTC 2008


Signed-off-by: Robert Love <robert.w.love at intel.com>
---

 drivers/scsi/libfc/fc_rport.c |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 159c365..9a4570c 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -739,22 +739,28 @@ static void fc_rport_timeout(struct work_struct *work)
 	put_device(&rp->dev);
 }
 
-/*
- * Handle error from a sequence issued by the rport state machine.
+/**
+ * fc_rport_error - Handler for any errors
+ * @rp: The fc_rport object
+ * @fp: The frame pointer
+ *
+ * Locking Note: The lock is expect to be held before calling
+ * this routine
  */
-static void fc_rport_error(struct fc_rport *rport, struct fc_frame *fp)
+static void fc_rport_error(struct fc_rport *rp, struct fc_frame *fp)
 {
-	struct fc_rport_libfc_priv *rp = rport->dd_data;
+	struct fc_rport_libfc_priv *rpp = rp->dd_data;
+
 	if (fc_rp_debug)
 		FC_DBG("state %d error %ld retries %d\n",
-		       rp->rp_state, PTR_ERR(fp), rp->retries);
+		       rpp->rp_state, PTR_ERR(fp), rpp->retries);
 
 	if (((!fp) || (PTR_ERR(fp) == -FC_EX_TIMEOUT)) &&
-	    rp->retries < rp->local_port->max_retry_count) {
-		get_device(&rport->dev);
-		schedule_delayed_work(&rp->retry_work, 0);
+	    rpp->retries < rpp->local_port->max_retry_count) {
+		get_device(&rp->dev);
+		schedule_delayed_work(&rpp->retry_work, 0);
 	} else
-		fc_rport_reject(rport);
+		fc_rport_reject(rp);
 }
 
 /**




More information about the devel mailing list