summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/csiostor/csio_rnode.c
diff options
context:
space:
mode:
authorArvind Bhushan <arvindb@chelsio.com>2013-03-14 05:09:07 +0000
committerDavid S. Miller <davem@davemloft.net>2013-03-14 11:36:00 -0400
commitd69630e8a42220b04318995d8ed0637ea79a717e (patch)
tree3e08568d2f0a4032aea5ad721f9d76ab819aa13d /drivers/scsi/csiostor/csio_rnode.c
parent4a22edb593012041ee656a88ea7f9889837cb0d1 (diff)
csiostor: Header file modifications for chip support and bug fixes.
This patch defines the common operations to support multiple chips. It includes common header file modifications to support the current chips (T4 and T5). It also includes the following bug fixes: - reconfirms the rnode state after an implicit logo. - corrects the stats array size. - sets up and checks flags correctly when coming up as master and finding the card initialized Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Arvind Bhushan <arvindb@chelsio.com> Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi/csiostor/csio_rnode.c')
-rw-r--r--drivers/scsi/csiostor/csio_rnode.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/scsi/csiostor/csio_rnode.c b/drivers/scsi/csiostor/csio_rnode.c
index 51c6a388de2..e9c3b045f58 100644
--- a/drivers/scsi/csiostor/csio_rnode.c
+++ b/drivers/scsi/csiostor/csio_rnode.c
@@ -302,7 +302,7 @@ csio_confirm_rnode(struct csio_lnode *ln, uint32_t rdev_flowid,
{
uint8_t rport_type;
struct csio_rnode *rn, *match_rn;
- uint32_t vnp_flowid;
+ uint32_t vnp_flowid = 0;
__be32 *port_id;
port_id = (__be32 *)&rdevp->r_id[0];
@@ -350,6 +350,14 @@ csio_confirm_rnode(struct csio_lnode *ln, uint32_t rdev_flowid,
* Else, go ahead and alloc a new rnode.
*/
if (!memcmp(csio_rn_wwpn(match_rn), rdevp->wwpn, 8)) {
+ if (rn == match_rn)
+ goto found_rnode;
+ csio_ln_dbg(ln,
+ "nport_id:x%x and wwpn:%llx"
+ " match for ssni:x%x\n",
+ rn->nport_id,
+ wwn_to_u64(rdevp->wwpn),
+ rdev_flowid);
if (csio_is_rnode_ready(rn)) {
csio_ln_warn(ln,
"rnode is already"