diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_dbf.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index a86117b0d6e1..2cdd6b28ff7f 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -154,7 +154,6 @@ void _zfcp_dbf_hba_fsf_response(const char *tag2, int level, | |||
154 | scsi_cmnd = (struct scsi_cmnd *)fsf_req->data; | 154 | scsi_cmnd = (struct scsi_cmnd *)fsf_req->data; |
155 | if (scsi_cmnd) { | 155 | if (scsi_cmnd) { |
156 | response->u.fcp.cmnd = (unsigned long)scsi_cmnd; | 156 | response->u.fcp.cmnd = (unsigned long)scsi_cmnd; |
157 | response->u.fcp.serial = scsi_cmnd->serial_number; | ||
158 | response->u.fcp.data_dir = | 157 | response->u.fcp.data_dir = |
159 | qtcb->bottom.io.data_direction; | 158 | qtcb->bottom.io.data_direction; |
160 | } | 159 | } |
@@ -330,7 +329,6 @@ static void zfcp_dbf_hba_view_response(char **p, | |||
330 | break; | 329 | break; |
331 | zfcp_dbf_out(p, "data_direction", "0x%04x", r->u.fcp.data_dir); | 330 | zfcp_dbf_out(p, "data_direction", "0x%04x", r->u.fcp.data_dir); |
332 | zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd); | 331 | zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd); |
333 | zfcp_dbf_out(p, "scsi_serial", "0x%016Lx", r->u.fcp.serial); | ||
334 | *p += sprintf(*p, "\n"); | 332 | *p += sprintf(*p, "\n"); |
335 | break; | 333 | break; |
336 | 334 | ||
@@ -482,7 +480,7 @@ static int zfcp_dbf_rec_view_format(debug_info_t *id, struct debug_view *view, | |||
482 | zfcp_dbf_out(&p, "fcp_lun", "0x%016Lx", r->u.trigger.fcp_lun); | 480 | zfcp_dbf_out(&p, "fcp_lun", "0x%016Lx", r->u.trigger.fcp_lun); |
483 | zfcp_dbf_out(&p, "adapter_status", "0x%08x", r->u.trigger.as); | 481 | zfcp_dbf_out(&p, "adapter_status", "0x%08x", r->u.trigger.as); |
484 | zfcp_dbf_out(&p, "port_status", "0x%08x", r->u.trigger.ps); | 482 | zfcp_dbf_out(&p, "port_status", "0x%08x", r->u.trigger.ps); |
485 | zfcp_dbf_out(&p, "unit_status", "0x%08x", r->u.trigger.us); | 483 | zfcp_dbf_out(&p, "lun_status", "0x%08x", r->u.trigger.ls); |
486 | break; | 484 | break; |
487 | case ZFCP_REC_DBF_ID_ACTION: | 485 | case ZFCP_REC_DBF_ID_ACTION: |
488 | zfcp_dbf_out(&p, "erp_action", "0x%016Lx", r->u.action.action); | 486 | zfcp_dbf_out(&p, "erp_action", "0x%016Lx", r->u.action.action); |
@@ -600,19 +598,20 @@ void zfcp_dbf_rec_port(char *id, void *ref, struct zfcp_port *port) | |||
600 | } | 598 | } |
601 | 599 | ||
602 | /** | 600 | /** |
603 | * zfcp_dbf_rec_unit - trace event for unit state change | 601 | * zfcp_dbf_rec_lun - trace event for LUN state change |
604 | * @id: identifier for trigger of state change | 602 | * @id: identifier for trigger of state change |
605 | * @ref: additional reference (e.g. request) | 603 | * @ref: additional reference (e.g. request) |
606 | * @unit: unit | 604 | * @sdev: SCSI device |
607 | */ | 605 | */ |
608 | void zfcp_dbf_rec_unit(char *id, void *ref, struct zfcp_unit *unit) | 606 | void zfcp_dbf_rec_lun(char *id, void *ref, struct scsi_device *sdev) |
609 | { | 607 | { |
610 | struct zfcp_port *port = unit->port; | 608 | struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev); |
609 | struct zfcp_port *port = zfcp_sdev->port; | ||
611 | struct zfcp_dbf *dbf = port->adapter->dbf; | 610 | struct zfcp_dbf *dbf = port->adapter->dbf; |
612 | 611 | ||
613 | zfcp_dbf_rec_target(id, ref, dbf, &unit->status, | 612 | zfcp_dbf_rec_target(id, ref, dbf, &zfcp_sdev->status, |
614 | &unit->erp_counter, port->wwpn, port->d_id, | 613 | &zfcp_sdev->erp_counter, port->wwpn, port->d_id, |
615 | unit->fcp_lun); | 614 | zfcp_scsi_dev_lun(sdev)); |
616 | } | 615 | } |
617 | 616 | ||
618 | /** | 617 | /** |
@@ -624,11 +623,11 @@ void zfcp_dbf_rec_unit(char *id, void *ref, struct zfcp_unit *unit) | |||
624 | * @action: address of error recovery action struct | 623 | * @action: address of error recovery action struct |
625 | * @adapter: adapter | 624 | * @adapter: adapter |
626 | * @port: port | 625 | * @port: port |
627 | * @unit: unit | 626 | * @sdev: SCSI device |
628 | */ | 627 | */ |
629 | void zfcp_dbf_rec_trigger(char *id2, void *ref, u8 want, u8 need, void *action, | 628 | void zfcp_dbf_rec_trigger(char *id2, void *ref, u8 want, u8 need, void *action, |
630 | struct zfcp_adapter *adapter, struct zfcp_port *port, | 629 | struct zfcp_adapter *adapter, struct zfcp_port *port, |
631 | struct zfcp_unit *unit) | 630 | struct scsi_device *sdev) |
632 | { | 631 | { |
633 | struct zfcp_dbf *dbf = adapter->dbf; | 632 | struct zfcp_dbf *dbf = adapter->dbf; |
634 | struct zfcp_dbf_rec_record *r = &dbf->rec_buf; | 633 | struct zfcp_dbf_rec_record *r = &dbf->rec_buf; |
@@ -647,9 +646,10 @@ void zfcp_dbf_rec_trigger(char *id2, void *ref, u8 want, u8 need, void *action, | |||
647 | r->u.trigger.ps = atomic_read(&port->status); | 646 | r->u.trigger.ps = atomic_read(&port->status); |
648 | r->u.trigger.wwpn = port->wwpn; | 647 | r->u.trigger.wwpn = port->wwpn; |
649 | } | 648 | } |
650 | if (unit) | 649 | if (sdev) |
651 | r->u.trigger.us = atomic_read(&unit->status); | 650 | r->u.trigger.ls = atomic_read(&sdev_to_zfcp(sdev)->status); |
652 | r->u.trigger.fcp_lun = unit ? unit->fcp_lun : ZFCP_DBF_INVALID_LUN; | 651 | r->u.trigger.fcp_lun = sdev ? zfcp_scsi_dev_lun(sdev) : |
652 | ZFCP_DBF_INVALID_LUN; | ||
653 | debug_event(dbf->rec, action ? 1 : 4, r, sizeof(*r)); | 653 | debug_event(dbf->rec, action ? 1 : 4, r, sizeof(*r)); |
654 | spin_unlock_irqrestore(&dbf->rec_lock, flags); | 654 | spin_unlock_irqrestore(&dbf->rec_lock, flags); |
655 | } | 655 | } |
@@ -879,7 +879,6 @@ void _zfcp_dbf_scsi(const char *tag, const char *tag2, int level, | |||
879 | } | 879 | } |
880 | rec->scsi_result = scsi_cmnd->result; | 880 | rec->scsi_result = scsi_cmnd->result; |
881 | rec->scsi_cmnd = (unsigned long)scsi_cmnd; | 881 | rec->scsi_cmnd = (unsigned long)scsi_cmnd; |
882 | rec->scsi_serial = scsi_cmnd->serial_number; | ||
883 | memcpy(rec->scsi_opcode, scsi_cmnd->cmnd, | 882 | memcpy(rec->scsi_opcode, scsi_cmnd->cmnd, |
884 | min((int)scsi_cmnd->cmd_len, | 883 | min((int)scsi_cmnd->cmd_len, |
885 | ZFCP_DBF_SCSI_OPCODE)); | 884 | ZFCP_DBF_SCSI_OPCODE)); |
@@ -948,7 +947,6 @@ static int zfcp_dbf_scsi_view_format(debug_info_t *id, struct debug_view *view, | |||
948 | zfcp_dbf_out(&p, "scsi_lun", "0x%08x", r->scsi_lun); | 947 | zfcp_dbf_out(&p, "scsi_lun", "0x%08x", r->scsi_lun); |
949 | zfcp_dbf_out(&p, "scsi_result", "0x%08x", r->scsi_result); | 948 | zfcp_dbf_out(&p, "scsi_result", "0x%08x", r->scsi_result); |
950 | zfcp_dbf_out(&p, "scsi_cmnd", "0x%0Lx", r->scsi_cmnd); | 949 | zfcp_dbf_out(&p, "scsi_cmnd", "0x%0Lx", r->scsi_cmnd); |
951 | zfcp_dbf_out(&p, "scsi_serial", "0x%016Lx", r->scsi_serial); | ||
952 | zfcp_dbf_outd(&p, "scsi_opcode", r->scsi_opcode, ZFCP_DBF_SCSI_OPCODE, | 950 | zfcp_dbf_outd(&p, "scsi_opcode", r->scsi_opcode, ZFCP_DBF_SCSI_OPCODE, |
953 | 0, ZFCP_DBF_SCSI_OPCODE); | 951 | 0, ZFCP_DBF_SCSI_OPCODE); |
954 | zfcp_dbf_out(&p, "scsi_retries", "0x%02x", r->scsi_retries); | 952 | zfcp_dbf_out(&p, "scsi_retries", "0x%02x", r->scsi_retries); |