scsi_cnmd.h

struct scsi_cmnd {
	struct scsi_device *device;
	struct list_head list;  /* scsi_cmnd participates in queue lists */
	struct list_head eh_entry; /* entry for the host eh_cmd_q */
	struct delayed_work abort_work;
	int eh_eflags;		/* Used by error handlr */

	/*
	 * A SCSI Command is assigned a nonzero serial_number before passed
	 * to the driver‘s queue command function.  The serial_number is
	 * cleared when scsi_done is entered indicating that the command
	 * has been completed.  It is a bug for LLDDs to use this number
	 * for purposes other than printk (and even that is only useful
	 * for debugging).
	 */
	unsigned long serial_number;

	/*
	 * This is set to jiffies as it was when the command was first
	 * allocated.  It is used to time how long the command has
	 * been outstanding
	 */
	unsigned long jiffies_at_alloc;

	int retries;
	int allowed;

	unsigned char prot_op;
	unsigned char prot_type;

	unsigned short cmd_len;
	enum dma_data_direction sc_data_direction;

	/* These elements define the operation we are about to perform */
	unsigned char *cmnd;

	/* These elements define the operation we ultimately want to perform */
	struct scsi_data_buffer sdb;
	struct scsi_data_buffer *prot_sdb;

	unsigned underflow;	/* Return error if less than
				   this amount is transferred */

	unsigned transfersize;	/* How much we are guaranteed to
				   transfer with each SCSI transfer
				   (ie, between disconnect / 
				   reconnects.   Probably == sector
				   size */

	struct request *request;	/* The command we are
				   	   working on */

#define SCSI_SENSE_BUFFERSIZE 	96
	unsigned char *sense_buffer;
				/* obtained by REQUEST SENSE when
				 * CHECK CONDITION is received on original
				 * command (auto-sense) */

	/* Low-level done function - can be used by low-level driver to point
	 *        to completion function.  Not used by mid/upper level code. */
	void (*scsi_done) (struct scsi_cmnd *);

	/*
	 * The following fields can be written to by the host specific code. 
	 * Everything else should be left alone. 
	 */
	struct scsi_pointer SCp;	/* Scratchpad used by some host adapters */

	unsigned char *host_scribble;	/* The host adapter is allowed to
					 * call scsi_malloc and get some memory
					 * and hang it here.  The host adapter
					 * is also expected to call scsi_free
					 * to release this memory.  (The memory
					 * obtained by scsi_malloc is guaranteed
					 * to be at an address < 16Mb). */

	int result;		/* Status code from lower level driver */

	unsigned char tag;	/* SCSI-II queued command tag */

	/* FOR RH USE ONLY
	 *
	 * The following padding has been inserted before ABI freeze to
	 * allow extending the structure while preserve ABI.
	 */
	void			(*rh_reserved1)(void);
	void			(*rh_reserved2)(void);
	void			(*rh_reserved3)(void);
	void			(*rh_reserved4)(void);

};

scsi cmd

时间: 2024-08-02 11:58:25

scsi_cnmd.h的相关文章

《linux 内核全然剖析》 include/asm/io.h

include/asm/io.h #define outb(value,port) __asm__ ("outb %%al,%%dx"::"a" (value),"d" (port)) //宏定义outb用汇编实现了在端口地址port处写入值value //使用的寄存器是al,一个byte长度,而端口port使用的是2byte长度地址来标记的寄存器,注意这里寄存器的使用 #define inb(port) ({ unsigned char _v;

CUDA gputimer.h头文件

#ifndef __GPU_TIMER_H__ #define __GPU_TIMER_H__ struct GpuTimer { cudaEvent_t start; cudaEvent_t stop; GpuTimer() { cudaEventCreate(&start); cudaEventCreate(&stop); } ~GpuTimer() { cudaEventDestroy(start); cudaEventDestroy(stop); } void Start() {

2017.5 校内预选赛 A H

题目描述: 目前图像识别是一项非常热门的技术,最流行的莫不过是深度学习的图像识别,识别率甚至能达到99%以上.当然,对于简单的图像来说,深度学习是没有必要的.比如如果要识别安徽拼音的首字母A和H,就可以不用深度学习就可以判断.现在有一些只含A或者H的图像,你知道该如何识别吗? 输入描述: 第一行输入正整数T,表示数据的组数. 每组数据中,第一行是两个正整数n和m,表示图像的大小. 接下来有n行,每行m个字符,只可能为'.'或者'#'.'.'表示白色,'#'表示黑色.'#'会通过上下左右或者左上左

编译过程中,termcap.h 文件找不到路径 licli.a终于生成

编译过程中,termcap.h      文件找不到路径 查看是linux  源码下找不到termcap.h文件 安装了所有关于*cap*的源码包也不起作用 今天终于解决了这个问题,搜termcap.h  发现一篇文章,如下 ----------------------------------------------------------------------------------------- 安装minicom2.3出现termcap.h错误解决方法 2010-05-06 17:12:

使用javah生成.h文件, 出现无法访问android.app,Activity的错误的解决

在工程ndk22/bin/classes中 运行javah  com.cn.ndk22.Ndk22.Activity ,出现了.h文件 我在bin/classes目录中 ,就是无法访问, : 错误:无法访问android.app.Activity 找不到android.app.Activity 如下图所示 于是我cmd定位到ndk/src,中运行 javah com.heima.ndk.ndkActivity, 成功了就能成功了 ...我也不知道为什么.,如下图 总结:  使用javah生成.h

mppe +H -M +S -L -D -C中个字母意思

mppe +H -M +S -L -D -C what each character mean. 根据Microsoft Point-To-Point Encryption (MPPE) Protocol的rfc3078文件中第2节Configuration Option Format: H:使用stateless模式(this indicates that the sender wishes to negotiate the use of stateless mode) M:使用56bit密钥

gnu/stubs-32.h: No such file

On Ubuntu it's called libc6-dev-i386 - do sudo apt-get install libc6-dev-i386. See below for extra instructions for Ubuntu 12.04. On Red Hat distros, the package name is glibc-devel.i686 (Thanks to David Gardner's comment) On CentOS 5.8, the package

VS2013找不到winres.h的解决办法

好久没有搞C++了,搞C++最烦就各种版本问题的报错.我对C++项目开发不是很熟悉,因为项目需要用VS2013修改一个C++/MFC工程,一编译就报错无法打开包括文件:"winres.h": No such file or directory. 上网查了一下,这个'winres.h'是Windows SDK的一个头文件,打开C盘找一下,果然在Windows SDK目录C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include下

php安装编译时 configure: error: Cannot find OpenSSL&#39;s &lt;evp.h&gt;

=============================================== yum install error: protected multilib versions error===============================================sudo yum downgrade openssl 降级sudo yum install openssl-devel ===另外参考====================================