aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2010-02-17 05:18:54 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-02-17 18:46:27 -0500
commitd21e9daa63e009ce5b87bbcaa6d11ce48e07bbbe (patch)
treee09b0f6c6e6016ad0a425afe0a7e10b89c3138ac
parent22ed130719987d1081831dc1481160b216224ffd (diff)
[SCSI] zfcp: Dont use 0 to indicate invalid LUN in rec trace
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>
-rw-r--r--drivers/s390/scsi/zfcp_dbf.c12
-rw-r--r--drivers/s390/scsi/zfcp_dbf.h2
2 files changed, 8 insertions, 6 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
index 818b6ad935ad..c8d68fec6334 100644
--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -576,7 +576,8 @@ void zfcp_dbf_rec_adapter(char *id, void *ref, struct zfcp_dbf *dbf)
576 struct zfcp_adapter *adapter = dbf->adapter; 576 struct zfcp_adapter *adapter = dbf->adapter;
577 577
578 zfcp_dbf_rec_target(id, ref, dbf, &adapter->status, 578 zfcp_dbf_rec_target(id, ref, dbf, &adapter->status,
579 &adapter->erp_counter, 0, 0, 0); 579 &adapter->erp_counter, 0, 0,
580 ZFCP_DBF_INVALID_LUN);
580} 581}
581 582
582/** 583/**
@@ -590,8 +591,8 @@ void zfcp_dbf_rec_port(char *id, void *ref, struct zfcp_port *port)
590 struct zfcp_dbf *dbf = port->adapter->dbf; 591 struct zfcp_dbf *dbf = port->adapter->dbf;
591 592
592 zfcp_dbf_rec_target(id, ref, dbf, &port->status, 593 zfcp_dbf_rec_target(id, ref, dbf, &port->status,
593 &port->erp_counter, port->wwpn, port->d_id, 594 &port->erp_counter, port->wwpn, port->d_id,
594 0); 595 ZFCP_DBF_INVALID_LUN);
595} 596}
596 597
597/** 598/**
@@ -642,10 +643,9 @@ void zfcp_dbf_rec_trigger(char *id2, void *ref, u8 want, u8 need, void *action,
642 r->u.trigger.ps = atomic_read(&port->status); 643 r->u.trigger.ps = atomic_read(&port->status);
643 r->u.trigger.wwpn = port->wwpn; 644 r->u.trigger.wwpn = port->wwpn;
644 } 645 }
645 if (unit) { 646 if (unit)
646 r->u.trigger.us = atomic_read(&unit->status); 647 r->u.trigger.us = atomic_read(&unit->status);
647 r->u.trigger.fcp_lun = unit->fcp_lun; 648 r->u.trigger.fcp_lun = unit ? unit->fcp_lun : ZFCP_DBF_INVALID_LUN;
648 }
649 debug_event(dbf->rec, action ? 1 : 4, r, sizeof(*r)); 649 debug_event(dbf->rec, action ? 1 : 4, r, sizeof(*r));
650 spin_unlock_irqrestore(&dbf->rec_lock, flags); 650 spin_unlock_irqrestore(&dbf->rec_lock, flags);
651} 651}
diff --git a/drivers/s390/scsi/zfcp_dbf.h b/drivers/s390/scsi/zfcp_dbf.h
index e4b5317fe902..ca841ee44c15 100644
--- a/drivers/s390/scsi/zfcp_dbf.h
+++ b/drivers/s390/scsi/zfcp_dbf.h
@@ -30,6 +30,8 @@
30#define ZFCP_DBF_TAG_SIZE 4 30#define ZFCP_DBF_TAG_SIZE 4
31#define ZFCP_DBF_ID_SIZE 7 31#define ZFCP_DBF_ID_SIZE 7
32 32
33#define ZFCP_DBF_INVALID_LUN 0xFFFFFFFFFFFFFFFFull
34
33struct zfcp_dbf_dump { 35struct zfcp_dbf_dump {
34 u8 tag[ZFCP_DBF_TAG_SIZE]; 36 u8 tag[ZFCP_DBF_TAG_SIZE];
35 u32 total_size; /* size of total dump data */ 37 u32 total_size; /* size of total dump data */