aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMartin Peschke <mp3@de.ibm.com>2008-03-27 09:21:55 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-07 13:19:03 -0400
commitc15450e33d198334291d50b5a95337c6b90cdab0 (patch)
treecabb41b4c3f441beba520aabb4d28007b6c86718 /drivers
parentd5cdc9898b5589acc77db91a1e9c0feb9f32abef (diff)
[SCSI] zfcp: Introduce a helper function that dumps hex data to a zfcp trace.
Signed-off-by: Martin Peschke <mp3@de.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/scsi/zfcp_dbf.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
index 701046c9bb33..0faadb0cda24 100644
--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -31,6 +31,24 @@ MODULE_PARM_DESC(dbfsize,
31 31
32#define ZFCP_LOG_AREA ZFCP_LOG_AREA_OTHER 32#define ZFCP_LOG_AREA ZFCP_LOG_AREA_OTHER
33 33
34static void zfcp_dbf_hexdump(debug_info_t *dbf, void *to, int to_len,
35 int level, char *from, int from_len)
36{
37 int offset;
38 struct zfcp_dbf_dump *dump = to;
39 int room = to_len - sizeof(*dump);
40
41 for (offset = 0; offset < from_len; offset += dump->size) {
42 memset(to, 0, to_len);
43 strncpy(dump->tag, "dump", ZFCP_DBF_TAG_SIZE);
44 dump->total_size = from_len;
45 dump->offset = offset;
46 dump->size = min(from_len - offset, room);
47 memcpy(dump->data, from + offset, dump->size);
48 debug_event(dbf, level, dump, dump->size);
49 }
50}
51
34static int 52static int
35zfcp_dbf_stck(char *out_buf, const char *label, unsigned long long stck) 53zfcp_dbf_stck(char *out_buf, const char *label, unsigned long long stck)
36{ 54{
:100C4000002800930029004F002A0084002B006533 :100C5000002F008E003200D90034023300360075B8 :100C60000039010B003C01FD003F00A0004102489B :100C7000004401950048019E004901C6004A01D088 :100C8000005502260056022E0060000A0061002A6C :100C90000062003000630030006400300065003006 :100CA0000066003000670030006800370069003FD0 :100CB000006A0047006B0047006C0047006D00476A :100CC000006E0047006F0047007000470073025F2E :100CD000007B024100000005000000050000000547 :100CE00000000005000000050000000500000005F0 :100CF00000000005000000050000000500000005E0 :100D000000000005000000050000000500000005CF :100D100000000005000000050000000500000005BF :100D200000000005000000050000000500000005AF :100D3000000000050000000500000005000000059F :00000001FF