Linux SCSI 通用 (sg) HOWTO | ||
---|---|---|
上一页 (Prev) | 第 6 章. sg_io_hdr_t 结构的详细信息 (Chapter 6. The sg_io_hdr_t structure in detail) | 下一页 (Next) |
这些代码可能来自主机适配器上的固件,或者来自适配器驱动程序控制的多个主机之一。“主机状态 (host_status)”字段具有以下值,其 #define 模仿内核中可见的值(从每个 define 的前面删除了 “SG_ERR_”)。这些 define 的副本可以在 sg_err.h 中找到(参见 附录 A)
SG_ERR_DID_OK [0x00] 无错误 (NO error)
SG_ERR_DID_NO_CONNECT [0x01] 在超时期限之前无法连接 (Couldn't connect before timeout period)
SG_ERR_DID_BUS_BUSY [0x02] 总线在超时期限内保持忙碌 (BUS stayed busy through time out period)
SG_ERR_DID_TIME_OUT [0x03] 因其他原因超时(通常是意外的设备选择超时)(TIMED OUT for other reason (often this an unexpected device selection timeout))
SG_ERR_DID_BAD_TARGET [0x04] 错误的目标,设备无响应? (BAD target, device not responding?)
SG_ERR_DID_ABORT [0x05] 因其他原因被告知中止。从 lk 2.4.15 开始,SCSI 子系统支持 16 字节命令,但很少有适配器驱动程序这样做。如果将 16 字节命令传递给他们控制的 SCSI 设备,则不支持 16 字节命令的 HBA 驱动程序将产生此错误代码。(Told to abort for some other reason. From lk 2.4.15 the SCSI subsystem supports 16 byte commands however few adapter drivers do. Those HBA drivers that don't support 16 byte commands will yield this error code if a 16 byte command is passed to a SCSI device they control.)
SG_ERR_DID_PARITY [0x06] 奇偶校验错误。较旧的 SCSI 并行总线具有用于错误检测的奇偶校验位。这可能表明电缆或终端问题。(Parity error. Older SCSI parallel buses have a parity bit for error detection. This probably indicates a cable or termination problem.)
SG_ERR_DID_ERROR [0x07] 在主机适配器中检测到内部错误。这可能不是致命的(并且命令可能已成功)。aic7xxx 和 sym53c8xx 适配器驱动程序有时会报告数据欠载或溢出的情况。 [1](Internal error detected in the host adapter. This may not be fatal (and the command may have succeeded). The aic7xxx and sym53c8xx adapter drivers sometimes report this for data underruns or overruns. [1])
SG_ERR_DID_RESET [0x08] SCSI 总线(或此设备)已被重置。SCSI 总线上的任何 SCSI 设备都能够启动重置。(The SCSI bus (or this device) has been reset. Any SCSI device on a SCSI bus is capable of instigating a reset.)
SG_ERR_DID_BAD_INTR [0x09] 收到我们不期望的 interrupt (Got an interrupt we weren't expecting)
SG_ERR_DID_PASSTHROUGH [0x0a] 强制命令通过中间层 (Force command past mid-layer)
SG_ERR_DID_SOFT_ERROR [0x0b] 底层驱动程序想要重试 (The low level driver wants a retry)
[1] | 在某些情况下,当 sym53cxx 驱动程序在内部将奇数传输长度向上舍入 1 时,它会报告 DID_ERROR。这是一个“非错误”的示例。(In some cases the sym53cxx driver reports a DID_ERROR when it internally rounds up an odd transfer length by 1. This is an example of a "non-error".) |
上一页 (Prev) | 首页 (Home) | 下一页 (Next) |
sb_len_wr | 上级 (Up) | 驱动程序状态 (driver_status) |