summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/csiostor/csio_rnode.c
diff options
context:
space:
mode:
authorArvind Bhushan2013-03-14 06:09:07 +0100
committerDavid S. Miller2013-03-14 16:36:00 +0100
commitd69630e8a42220b04318995d8ed0637ea79a717e (patch)
tree3e08568d2f0a4032aea5ad721f9d76ab819aa13d /drivers/scsi/csiostor/csio_rnode.c
parentcsiostor: Add T5 adapter operations. (diff)
downloadkernel-qcow2-linux-d69630e8a42220b04318995d8ed0637ea79a717e.tar.gz
kernel-qcow2-linux-d69630e8a42220b04318995d8ed0637ea79a717e.tar.xz
kernel-qcow2-linux-d69630e8a42220b04318995d8ed0637ea79a717e.zip
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 51c6a388de2b..e9c3b045f587 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"