]> Pileus Git - ~andy/linux/commitdiff
[SCSI] zfcp: Dont use 0 to indicate invalid LUN in rec trace
authorChristof Schmitt <christof.schmitt@de.ibm.com>
Wed, 17 Feb 2010 10:18:54 +0000 (11:18 +0100)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 17 Feb 2010 23:46:27 +0000 (17:46 -0600)
0 is a valid value for a LUN. It is slightly confusing to also see 0
in the trace entries relating to adapter and port. Change this to use
0xFFFFFFFFFFFFFFFF in the LUN field when the trace entry does not
relate to a LUN or unit.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/s390/scsi/zfcp_dbf.c
drivers/s390/scsi/zfcp_dbf.h

index 818b6ad935ad21243f7c2933a653ad3800c301d5..c8d68fec633455273319c081e919a29553f5927a 100644 (file)
@@ -576,7 +576,8 @@ void zfcp_dbf_rec_adapter(char *id, void *ref, struct zfcp_dbf *dbf)
        struct zfcp_adapter *adapter = dbf->adapter;
 
        zfcp_dbf_rec_target(id, ref, dbf, &adapter->status,
-                                 &adapter->erp_counter, 0, 0, 0);
+                           &adapter->erp_counter, 0, 0,
+                           ZFCP_DBF_INVALID_LUN);
 }
 
 /**
@@ -590,8 +591,8 @@ void zfcp_dbf_rec_port(char *id, void *ref, struct zfcp_port *port)
        struct zfcp_dbf *dbf = port->adapter->dbf;
 
        zfcp_dbf_rec_target(id, ref, dbf, &port->status,
-                                 &port->erp_counter, port->wwpn, port->d_id,
-                                 0);
+                           &port->erp_counter, port->wwpn, port->d_id,
+                           ZFCP_DBF_INVALID_LUN);
 }
 
 /**
@@ -642,10 +643,9 @@ void zfcp_dbf_rec_trigger(char *id2, void *ref, u8 want, u8 need, void *action,
                r->u.trigger.ps = atomic_read(&port->status);
                r->u.trigger.wwpn = port->wwpn;
        }
-       if (unit) {
+       if (unit)
                r->u.trigger.us = atomic_read(&unit->status);
-               r->u.trigger.fcp_lun = unit->fcp_lun;
-       }
+       r->u.trigger.fcp_lun = unit ? unit->fcp_lun : ZFCP_DBF_INVALID_LUN;
        debug_event(dbf->rec, action ? 1 : 4, r, sizeof(*r));
        spin_unlock_irqrestore(&dbf->rec_lock, flags);
 }
index e4b5317fe902a0cd4829ee338e089b66c858a640..ca841ee44c15c195bbdf41cd2477ef3823657f53 100644 (file)
@@ -30,6 +30,8 @@
 #define ZFCP_DBF_TAG_SIZE      4
 #define ZFCP_DBF_ID_SIZE       7
 
+#define ZFCP_DBF_INVALID_LUN   0xFFFFFFFFFFFFFFFFull
+
 struct zfcp_dbf_dump {
        u8 tag[ZFCP_DBF_TAG_SIZE];
        u32 total_size;         /* size of total dump data */