aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_dbf.c
diff options
context:
space:
mode:
authorAndreas Herrmann <aherrman@de.ibm.com>2005-09-19 10:56:17 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-09-19 14:04:15 -0400
commit13e1e1f08c1c098c7574c1fa72bd8c67792dc89b (patch)
treeaa07ca5b3ac4d21cf76b5f9aa8059334756f4c7f /drivers/s390/scsi/zfcp_dbf.c
parentaef4a983090fa590481a86d9690dc3fa6bb121fa (diff)
[SCSI] zfcp: add additional fc_host attributes
this patch adds some fc host attributes and removes its equivalents from the zfcp_adapter structure and zfcp specific sysfs subtree. Furthermore it removes superfluous calls to fc_remort_port_delete when an adapter is set offline because rports will be removed by fc_remove_host anyway. Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_dbf.c')
-rw-r--r--drivers/s390/scsi/zfcp_dbf.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
index 64d9b90373fe..826fb3b00605 100644
--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -486,8 +486,7 @@ struct debug_view zfcp_hba_dbf_view = {
486 486
487inline void 487inline void
488_zfcp_san_dbf_event_common_ct(const char *tag, struct zfcp_fsf_req *fsf_req, 488_zfcp_san_dbf_event_common_ct(const char *tag, struct zfcp_fsf_req *fsf_req,
489 fc_id_t s_id, fc_id_t d_id, 489 u32 s_id, u32 d_id, void *buffer, int buflen)
490 void *buffer, int buflen)
491{ 490{
492 struct zfcp_send_ct *send_ct = (struct zfcp_send_ct *)fsf_req->data; 491 struct zfcp_send_ct *send_ct = (struct zfcp_send_ct *)fsf_req->data;
493 struct zfcp_port *port = send_ct->port; 492 struct zfcp_port *port = send_ct->port;
@@ -532,9 +531,9 @@ inline void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req)
532 struct zfcp_port *port = ct->port; 531 struct zfcp_port *port = ct->port;
533 struct zfcp_adapter *adapter = port->adapter; 532 struct zfcp_adapter *adapter = port->adapter;
534 533
535 _zfcp_san_dbf_event_common_ct("octc", 534 _zfcp_san_dbf_event_common_ct("octc", fsf_req,
536 fsf_req, adapter->s_id, port->d_id, 535 fc_host_port_id(adapter->scsi_host),
537 zfcp_sg_to_address(ct->req), 536 port->d_id, zfcp_sg_to_address(ct->req),
538 ct->req->length); 537 ct->req->length);
539} 538}
540 539
@@ -544,17 +543,16 @@ inline void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req)
544 struct zfcp_port *port = ct->port; 543 struct zfcp_port *port = ct->port;
545 struct zfcp_adapter *adapter = port->adapter; 544 struct zfcp_adapter *adapter = port->adapter;
546 545
547 _zfcp_san_dbf_event_common_ct("rctc", 546 _zfcp_san_dbf_event_common_ct("rctc", fsf_req, port->d_id,
548 fsf_req, port->d_id, adapter->s_id, 547 fc_host_port_id(adapter->scsi_host),
549 zfcp_sg_to_address(ct->resp), 548 zfcp_sg_to_address(ct->resp),
550 ct->resp->length); 549 ct->resp->length);
551} 550}
552 551
553static inline void 552static inline void
554_zfcp_san_dbf_event_common_els(const char *tag, int level, 553_zfcp_san_dbf_event_common_els(const char *tag, int level,
555 struct zfcp_fsf_req *fsf_req, 554 struct zfcp_fsf_req *fsf_req, u32 s_id,
556 fc_id_t s_id, fc_id_t d_id, u8 ls_code, 555 u32 d_id, u8 ls_code, void *buffer, int buflen)
557 void *buffer, int buflen)
558{ 556{
559 struct zfcp_adapter *adapter = fsf_req->adapter; 557 struct zfcp_adapter *adapter = fsf_req->adapter;
560 struct zfcp_san_dbf_record *rec = &adapter->san_dbf_buf; 558 struct zfcp_san_dbf_record *rec = &adapter->san_dbf_buf;
@@ -597,8 +595,9 @@ inline void zfcp_san_dbf_event_els_request(struct zfcp_fsf_req *fsf_req)
597{ 595{
598 struct zfcp_send_els *els = (struct zfcp_send_els *)fsf_req->data; 596 struct zfcp_send_els *els = (struct zfcp_send_els *)fsf_req->data;
599 597
600 _zfcp_san_dbf_event_common_els("oels", 2, 598 _zfcp_san_dbf_event_common_els("oels", 2, fsf_req,
601 fsf_req, els->adapter->s_id, els->d_id, 599 fc_host_port_id(els->adapter->scsi_host),
600 els->d_id,
602 *(u8 *) zfcp_sg_to_address(els->req), 601 *(u8 *) zfcp_sg_to_address(els->req),
603 zfcp_sg_to_address(els->req), 602 zfcp_sg_to_address(els->req),
604 els->req->length); 603 els->req->length);
@@ -608,8 +607,8 @@ inline void zfcp_san_dbf_event_els_response(struct zfcp_fsf_req *fsf_req)
608{ 607{
609 struct zfcp_send_els *els = (struct zfcp_send_els *)fsf_req->data; 608 struct zfcp_send_els *els = (struct zfcp_send_els *)fsf_req->data;
610 609
611 _zfcp_san_dbf_event_common_els("rels", 2, 610 _zfcp_san_dbf_event_common_els("rels", 2, fsf_req, els->d_id,
612 fsf_req, els->d_id, els->adapter->s_id, 611 fc_host_port_id(els->adapter->scsi_host),
613 *(u8 *) zfcp_sg_to_address(els->req), 612 *(u8 *) zfcp_sg_to_address(els->req),
614 zfcp_sg_to_address(els->resp), 613 zfcp_sg_to_address(els->resp),
615 els->resp->length); 614 els->resp->length);
@@ -623,9 +622,8 @@ inline void zfcp_san_dbf_event_incoming_els(struct zfcp_fsf_req *fsf_req)
623 int length = (int)status_buffer->length - 622 int length = (int)status_buffer->length -
624 (int)((void *)&status_buffer->payload - (void *)status_buffer); 623 (int)((void *)&status_buffer->payload - (void *)status_buffer);
625 624
626 _zfcp_san_dbf_event_common_els("iels", 1, 625 _zfcp_san_dbf_event_common_els("iels", 1, fsf_req, status_buffer->d_id,
627 fsf_req, status_buffer->d_id, 626 fc_host_port_id(adapter->scsi_host),
628 adapter->s_id,
629 *(u8 *) status_buffer->payload, 627 *(u8 *) status_buffer->payload,
630 (void *)status_buffer->payload, length); 628 (void *)status_buffer->payload, length);
631} 629}