Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89710
b: refs/heads/master
c: d79a83d
h: refs/heads/master
v: v3
  • Loading branch information
Martin Peschke authored and James Bottomley committed Apr 7, 2008
1 parent 0c3ed94 commit f887543
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 10223c60daf226ee2248b772892abc83cd875aa7
refs/heads/master: d79a83dbffe2e49e73f2903c350937faf2e0c2f1
1 change: 1 addition & 0 deletions trunk/drivers/s390/scsi/zfcp_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,7 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device)
spin_lock_init(&adapter->hba_dbf_lock);
spin_lock_init(&adapter->san_dbf_lock);
spin_lock_init(&adapter->scsi_dbf_lock);
spin_lock_init(&adapter->rec_dbf_lock);

retval = zfcp_adapter_debug_register(adapter);
if (retval)
Expand Down
42 changes: 42 additions & 0 deletions trunk/drivers/s390/scsi/zfcp_dbf.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,36 @@ static struct debug_view zfcp_hba_dbf_view = {
NULL
};

static const char *zfcp_rec_dbf_tags[] = {
};

static const char *zfcp_rec_dbf_ids[] = {
};

static int zfcp_rec_dbf_view_format(debug_info_t *id, struct debug_view *view,
char *buf, const char *_rec)
{
struct zfcp_rec_dbf_record *r = (struct zfcp_rec_dbf_record *)_rec;
char *p = buf;

zfcp_dbf_outs(&p, "tag", zfcp_rec_dbf_tags[r->id]);
zfcp_dbf_outs(&p, "hint", zfcp_rec_dbf_ids[r->id2]);
zfcp_dbf_out(&p, "id", "%d", r->id2);
switch (r->id) {
}
sprintf(p, "\n");
return (p - buf) + 1;
}

static struct debug_view zfcp_rec_dbf_view = {
"structured",
NULL,
&zfcp_dbf_view_header,
&zfcp_rec_dbf_view_format,
NULL,
NULL
};

static void
_zfcp_san_dbf_event_common_ct(const char *tag, struct zfcp_fsf_req *fsf_req,
u32 s_id, u32 d_id, void *buffer, int buflen)
Expand Down Expand Up @@ -934,6 +964,16 @@ int zfcp_adapter_debug_register(struct zfcp_adapter *adapter)
debug_register_view(adapter->erp_dbf, &debug_hex_ascii_view);
debug_set_level(adapter->erp_dbf, 3);

/* debug feature area which records recovery activity */
sprintf(dbf_name, "zfcp_%s_rec", zfcp_get_busid_by_adapter(adapter));
adapter->rec_dbf = debug_register(dbf_name, dbfsize, 1,
sizeof(struct zfcp_rec_dbf_record));
if (!adapter->rec_dbf)
goto failed;
debug_register_view(adapter->rec_dbf, &debug_hex_ascii_view);
debug_register_view(adapter->rec_dbf, &zfcp_rec_dbf_view);
debug_set_level(adapter->rec_dbf, 3);

/* debug feature area which records HBA (FSF and QDIO) conditions */
sprintf(dbf_name, "zfcp_%s_hba", zfcp_get_busid_by_adapter(adapter));
adapter->hba_dbf = debug_register(dbf_name, dbfsize, 1,
Expand Down Expand Up @@ -981,10 +1021,12 @@ void zfcp_adapter_debug_unregister(struct zfcp_adapter *adapter)
debug_unregister(adapter->scsi_dbf);
debug_unregister(adapter->san_dbf);
debug_unregister(adapter->hba_dbf);
debug_unregister(adapter->rec_dbf);
debug_unregister(adapter->erp_dbf);
adapter->scsi_dbf = NULL;
adapter->san_dbf = NULL;
adapter->hba_dbf = NULL;
adapter->rec_dbf = NULL;
adapter->erp_dbf = NULL;
}

Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/s390/scsi/zfcp_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ struct zfcp_erp_dbf_record {
u8 dummy[16];
} __attribute__ ((packed));

struct zfcp_rec_dbf_record {
u8 id;
u8 id2;
union {
} u;
} __attribute__ ((packed));

struct zfcp_hba_dbf_record_response {
u32 fsf_command;
u64 fsf_reqid;
Expand Down Expand Up @@ -917,14 +924,17 @@ struct zfcp_adapter {
for memory */
struct zfcp_port *nameserver_port; /* adapter's nameserver */
debug_info_t *erp_dbf;
debug_info_t *rec_dbf;
debug_info_t *hba_dbf;
debug_info_t *san_dbf; /* debug feature areas */
debug_info_t *scsi_dbf;
spinlock_t erp_dbf_lock;
spinlock_t rec_dbf_lock;
spinlock_t hba_dbf_lock;
spinlock_t san_dbf_lock;
spinlock_t scsi_dbf_lock;
struct zfcp_erp_dbf_record erp_dbf_buf;
struct zfcp_rec_dbf_record rec_dbf_buf;
struct zfcp_hba_dbf_record hba_dbf_buf;
struct zfcp_san_dbf_record san_dbf_buf;
struct zfcp_scsi_dbf_record scsi_dbf_buf;
Expand Down

0 comments on commit f887543

Please sign in to comment.