Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
19 lines
604 B
C
19 lines
604 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <linux/seq_file.h>
|
|
#include <scsi/scsi_cmnd.h>
|
|
#include <scsi/scsi_dbg.h>
|
|
#include "scsi_debugfs.h"
|
|
|
|
void scsi_show_rq(struct seq_file *m, struct request *rq)
|
|
{
|
|
struct scsi_cmnd *cmd = container_of(scsi_req(rq), typeof(*cmd), req);
|
|
int msecs = jiffies_to_msecs(jiffies - cmd->jiffies_at_alloc);
|
|
const u8 *const cdb = READ_ONCE(cmd->cmnd);
|
|
char buf[80] = "(?)";
|
|
|
|
if (cdb)
|
|
__scsi_format_command(buf, sizeof(buf), cdb, cmd->cmd_len);
|
|
seq_printf(m, ", .cmd=%s, .retries=%d, allocated %d.%03d s ago", buf,
|
|
cmd->retries, msecs / 1000, msecs % 1000);
|
|
}
|