|
@@ -2,7 +2,7 @@
|
|
* zfcp device driver
|
|
* zfcp device driver
|
|
* debug feature declarations
|
|
* debug feature declarations
|
|
*
|
|
*
|
|
- * Copyright IBM Corp. 2008, 2015
|
|
|
|
|
|
+ * Copyright IBM Corp. 2008, 2016
|
|
*/
|
|
*/
|
|
|
|
|
|
#ifndef ZFCP_DBF_H
|
|
#ifndef ZFCP_DBF_H
|
|
@@ -283,6 +283,30 @@ struct zfcp_dbf {
|
|
struct zfcp_dbf_scsi scsi_buf;
|
|
struct zfcp_dbf_scsi scsi_buf;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * zfcp_dbf_hba_fsf_resp_suppress - true if we should not trace by default
|
|
|
|
+ * @req: request that has been completed
|
|
|
|
+ *
|
|
|
|
+ * Returns true if FCP response with only benign residual under count.
|
|
|
|
+ */
|
|
|
|
+static inline
|
|
|
|
+bool zfcp_dbf_hba_fsf_resp_suppress(struct zfcp_fsf_req *req)
|
|
|
|
+{
|
|
|
|
+ struct fsf_qtcb *qtcb = req->qtcb;
|
|
|
|
+ u32 fsf_stat = qtcb->header.fsf_status;
|
|
|
|
+ struct fcp_resp *fcp_rsp;
|
|
|
|
+ u8 rsp_flags, fr_status;
|
|
|
|
+
|
|
|
|
+ if (qtcb->prefix.qtcb_type != FSF_IO_COMMAND)
|
|
|
|
+ return false; /* not an FCP response */
|
|
|
|
+ fcp_rsp = (struct fcp_resp *)&qtcb->bottom.io.fcp_rsp;
|
|
|
|
+ rsp_flags = fcp_rsp->fr_flags;
|
|
|
|
+ fr_status = fcp_rsp->fr_status;
|
|
|
|
+ return (fsf_stat == FSF_FCP_RSP_AVAILABLE) &&
|
|
|
|
+ (rsp_flags == FCP_RESID_UNDER) &&
|
|
|
|
+ (fr_status == SAM_STAT_GOOD);
|
|
|
|
+}
|
|
|
|
+
|
|
static inline
|
|
static inline
|
|
void zfcp_dbf_hba_fsf_resp(char *tag, int level, struct zfcp_fsf_req *req)
|
|
void zfcp_dbf_hba_fsf_resp(char *tag, int level, struct zfcp_fsf_req *req)
|
|
{
|
|
{
|
|
@@ -304,7 +328,9 @@ void zfcp_dbf_hba_fsf_response(struct zfcp_fsf_req *req)
|
|
zfcp_dbf_hba_fsf_resp("fs_perr", 1, req);
|
|
zfcp_dbf_hba_fsf_resp("fs_perr", 1, req);
|
|
|
|
|
|
} else if (qtcb->header.fsf_status != FSF_GOOD) {
|
|
} else if (qtcb->header.fsf_status != FSF_GOOD) {
|
|
- zfcp_dbf_hba_fsf_resp("fs_ferr", 1, req);
|
|
|
|
|
|
+ zfcp_dbf_hba_fsf_resp("fs_ferr",
|
|
|
|
+ zfcp_dbf_hba_fsf_resp_suppress(req)
|
|
|
|
+ ? 5 : 1, req);
|
|
|
|
|
|
} else if ((req->fsf_command == FSF_QTCB_OPEN_PORT_WITH_DID) ||
|
|
} else if ((req->fsf_command == FSF_QTCB_OPEN_PORT_WITH_DID) ||
|
|
(req->fsf_command == FSF_QTCB_OPEN_LUN)) {
|
|
(req->fsf_command == FSF_QTCB_OPEN_LUN)) {
|