*/static int scsi_dispatch_cmd(struct scsi_cmnd *cmd) { ... if (unlikely(cmd->device->sdev_state == SDEV_DEL)) { cmd->result = DID_NO_CONNECT << 16; goto done; } ... if (unlikely(scsi_device_blocked(cmd->device))) { SCSI_LOG_MLQUEUE(3, scmd_printk(KERN_INFO, cmd, "...
根据scsi_host_template填充scsi host部分成员,privsize是底层驱动让SCSI在分配scsi host时为底层驱动分配的内存,即scsi host->hostdata[]成员。 主要设置如下: Host_no,scsi host的id; Shost->hostt = scsi_host_template 与scsi_host_template一样的参数,如can_queue / sg_tablesize / cmd_per_lun / max...
xxx_abort_ccb(hcb->ccb, CAM_CMD_TIMEOUT); } } 当我们中止一个请求时,同一目标/LUN的所有其他断开连接的请求 也会被中止。因此出现了一个问题,我们应当返回它们的状态 CAM_REQ_ABORTED还是CAM_CMD_TIMEOUT?当前的驱动程序使用 CAM_CMD_TIMEOUT。这看起来符合逻辑,因为如果一个请求超时,则可能 设备出现了某...
@@ -766,6 +766,7 @@ static int pvscsi_queue_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd struct pvscsi_adapter *adapter = shost_priv(host); struct pvscsi_ctx *ctx; unsigned long flags; unsigned char op;spin_lock_irqsave(&adapter->hw_lock, flags);@@ -778,13 +779...
#include "scsi_priv.h" #include "scsi_logging.h" #include "scsi_transport_api.h" #include <trace/events/scsi.h> #include <asm/unaligned.h> static void scsi_eh_done(struct scsi_cmnd *scmd); /* * These should *probably* be handled by the host itself. * Since it is ...
.fcprqst_priv_sz = sizeof(struct nvme_private), };#define NVME_ABORT_POLLING_PERIOD 2 static int qla_nvme_wait_on_command(srb_t *sp) { int ret = QLA_SUCCESS;wait_event_timeout(sp->nvme_ls_waitq, (atomic_read(&sp->ref_count) > 1), ...
priv_policy_only(9F) proc_ref(9F) proc_signal(9F) proc_unref(9F) ptob(9F) pullupmsg(9F) put(9F) putbq(9F) putctl(9F) putctl1(9F) putnext(9F) putnextctl(9F) putnextctl1(9F) putq(9F) qassociate(9F) qbufcall(9F) qenable(9F) qprocsoff(9F) qprocson(9F) qreply(9F) qsi...
priv_getbyname(9F) priv_policy(9F) priv_policy_choice(9F) priv_policy_only(9F) proc_ref(9F) proc_signal(9F) proc_unref(9F) ptob(9F) pullupmsg(9F) put(9F) putbq(9F) putctl(9F) putctl1(9F) putnext(9F) putnextctl(9F) putnextctl1(9F) putq(9F) qassociate(9F) qbufcall(9F) ...
673} else if (!(rq->cmd_flags & REQ_ELVPRIV) && where == ELEVATOR_INSERT_SORT) 674where = ELEVATOR_INSERT_BACK; 675 676if (plug) 677blk_plug_device(q); 678 679elv_insert(q, rq, where); 680 } 传入的参数plug等于1,所以blk_plug_device()会被执行.暂且先不管这个函数. ...
**/ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result, int result_len, blist_flags_t *bflags) { unsigned char scsi_cmd[MAX_COMMAND_SIZE]; int first_inquiry_len, try_inquiry_len, next_inquiry_len; int response_len = 0; int pass, count, result, resid...