Skip to content
This repository has been archived by the owner on Aug 6, 2019. It is now read-only.

Commit

Permalink
5740 mr_sas driver - add additional sdt probes
Browse files Browse the repository at this point in the history
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Dan McDonald <danmcd@omniti.com>
  • Loading branch information
citrus-it authored and Dan McDonald committed Mar 28, 2015
1 parent ff38cf9 commit 091932b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion usr/src/uts/common/io/mr_sas/mr_sas_tbolt.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <sys/atomic.h>
#include <sys/scsi/scsi.h>
#include <sys/byteorder.h>
#include <sys/sdt.h>
#include "ld_pd_map.h"
#include "mr_sas.h"
#include "fusion.h"
Expand Down Expand Up @@ -1166,6 +1167,9 @@ mrsas_tbolt_tran_start(struct scsi_address *ap, struct scsi_pkt *pkt)
if (instance->fw_outstanding > instance->max_fw_cmds) {
dev_err(instance->dip, CE_WARN,
"Command Queue Full... Returning BUSY");
DTRACE_PROBE2(tbolt_start_tran_err,
uint16_t, instance->fw_outstanding,
uint16_t, instance->max_fw_cmds);
return_raid_msg_pkt(instance, cmd);
return (TRAN_BUSY);
}
Expand All @@ -1183,6 +1187,9 @@ mrsas_tbolt_tran_start(struct scsi_address *ap, struct scsi_pkt *pkt)
instance->func_ptr->issue_cmd(cmd, instance);
(void) wait_for_outstanding_poll_io(instance);
(void) mrsas_common_check(instance, cmd);
DTRACE_PROBE2(tbolt_start_nointr_done,
uint8_t, cmd->frame->hdr.cmd,
uint8_t, cmd->frame->hdr.cmd_status);
}

return (TRAN_ACCEPT);
Expand Down Expand Up @@ -1439,6 +1446,8 @@ mrsas_tbolt_build_cmd(struct mrsas_instance *instance, struct scsi_address *ap,

/* get the command packet */
if (!(cmd = get_raid_msg_pkt(instance))) {
DTRACE_PROBE2(tbolt_build_cmd_mfi_err, uint16_t,
instance->fw_outstanding, uint16_t, instance->max_fw_cmds);
return (NULL);
}

Expand All @@ -1455,6 +1464,10 @@ mrsas_tbolt_build_cmd(struct mrsas_instance *instance, struct scsi_address *ap,
cmd->pkt = pkt;
cmd->cmd = acmd;

DTRACE_PROBE4(tbolt_build_cmd, uint8_t, pkt->pkt_cdbp[0],
ulong_t, acmd->cmd_dmacount, ulong_t, acmd->cmd_dma_len,
uint16_t, acmd->device_id);

/* lets get the command directions */
if (acmd->cmd_flags & CFLAG_DMASEND) {
if (acmd->cmd_flags & CFLAG_CONSISTENT) {
Expand Down Expand Up @@ -2279,6 +2292,7 @@ tbolt_complete_cmd(struct mrsas_instance *instance,
{
uint8_t status;
uint8_t extStatus;
uint8_t function;
uint8_t arm;
struct scsa_cmd *acmd;
struct scsi_pkt *pkt;
Expand Down Expand Up @@ -2306,7 +2320,11 @@ tbolt_complete_cmd(struct mrsas_instance *instance,

/* regular commands */

switch (ddi_get8(acc_handle, &scsi_raid_io->Function)) {
function = ddi_get8(acc_handle, &scsi_raid_io->Function);
DTRACE_PROBE3(tbolt_complete_cmd, uint8_t, function,
uint8_t, status, uint8_t, extStatus);

switch (function) {

case MPI2_FUNCTION_SCSI_IO_REQUEST : /* Fast Path IO. */
acmd = (struct scsa_cmd *)cmd->cmd;
Expand Down

0 comments on commit 091932b

Please sign in to comment.