The Programmer's Guide to SCSI
暫譯: 程式設計師的 SCSI 指南

Brian Sawert

  • 出版商: Addison Wesley
  • 出版日期: 1998-03-27
  • 售價: $1,870
  • 貴賓價: 9.5$1,777
  • 語言: 英文
  • 頁數: 320
  • 裝訂: Paperback
  • ISBN: 0201185385
  • ISBN-13: 9780201185386
  • 已絕版

相關主題

商品描述


Table Of Contents

Preface.
Intended Audience.
How This Book is Organized.
What You Will Need.
Acknowledgements.
About the Authors.
Brian Sawert.
Larry Martin.
Gary Field.
Introduction.
An Overview of SCSI Technology.
The SCSI Solution.
SCSI-1.
SCSI-1 Features.
Intelligent Devices.
Multitasking I/O.
Synchronous Data Transfer.
Multiple Device Types on a Single Interface.
The Birth of SCSI-2.
New Features in SCSI-2.
Fast SCSI.
Wide SCSI.
Fast Wide SCSI.
Queued I/O Processes.
New Command Sets.
Improved SCSI-1 Features.
Data Parity Required.
Message Support Required.
Terminator Power Provided by Initiator.
SCSI-3 on the Horizon.
Fast-20 and Fast-40 SCSI.
Serial SCSI Standards.
Fibre Channel.
Serial Standard Architecture.
P1394.
Layered Architecture.
Plug and Play SCSI.
SCSI Fundamentals.
SCSI Transactions — An Overview.
SCSI Phases.
SCSI Phases.
Bus Free.
Arbitration.
Selection.
Reselection.
Message Out.
Command.
Data In and Data Out.
Status.
Message In.
Phase Sequence.
SCSI Messages.
Message Types.
The Identify Message.
Extended Messages.
Synchronous Data Transfer Request.
Wide Data Transfer Request.
Other Common Messages.
No Operation.
Abort.
Bus Device Reset.
Disconnect.
Ignore Wide Residue.
Queue Tag Messages.
Simple Queue Tag.
Head of Queue Tag.
Ordered Queue Tag.

SCSI Commands.
Command Structure.
Operation Codes.
Logical Unit Number.
Command Parameters.
Control Field.
Parameter Lists.
Byte Order.
Mandatory SCSI Commands.
Test Unit Ready.
Inquiry.
Example - Iomega Zip Drive.

Optional Commands.
Device Type Specific Commands.
Mode Select.
Mode Sense.
Mode Sense Data Format.
Example - Iomega Zip Drive.

Reading and Writing.
Read.
Write.
Other Commands.
Status, Sense, and Errors.
Status.
Status Codes.
Sense Data.
Sense Key.
Unit Attention.

Additional Sense Codes.
Example - Iomega Zip Drive.
ASPI — The Advanced SCSI Programming Interface.
What is ASPI?
Why should I use ASPI?
ASPI Concepts.
Adapter and Device Addressing.
Issuing SCSI Commands.
Building the SCSI Request Block.
Sending an SRB to the ASPI Manager.
Waiting for an SRB to Complete.
Processing Returned Status Information.

Adapter Specific Properties.
Connecting to the ASPI Manager.
ASPI Commands.
Host Adapter Inquiry (SC_HA_INQUIRY).
Get Device Type (SC_GET_DEV_TYPE).
Execute SCSI Command (SC_EXEC_SCSI_CMD).
Abort SRB (SC_ABORT_SRB).
Reset SCSI Device (SC_RESET_DEV).
Rescan SCSI Bus (SC_RESCAN_SCSI_BUS).
Get/Set Timeouts (SC_GETSET_TIMEOUTS).
ASPI Error and Status Codes.
ASPI SRB Status (SRB_Status).
SS_PENDING.
SS_COMP.
SS_ERR.
SS_INVALID_CMD.
SS_INVALID_HA.
SS_NO_DEVICE.
SS_INVALID_SRB.
SS_FAILED_INIT.
SS_ASPI_IS_BUSY.
SS_BUFFER_TOO_BIG.
SS_BUFFER_ALIGN.
SS_SECURITY_VIOLATION.
SS_ABORTED.
SS_ABORT_FAIL.
SS_NO_ASPI.
SS_ILLEGAL_MODE.
SS_MISMATCHED_COMPONENTS.
SS_NO_ADAPTERS.
SS_INSUFFICIENT RESOURCES.

Host Adapter Status (SRB_HaStat).
HASTAT_OK.
HASTAT_SEL_TO.
HASTAT_DO_DU.
HASTAT_BUS_FREE
HASTAT_PHASE_ERR.
HASTAT_TIMEOUT.
HASTAT_COMMAND_TIMEOUT.
HASTAT_MESSAGE_REJECT.
HASTAT_BUS_RESET.
HASTAT_PARITY_ERROR.
HASTAT_REQUEST_SENSE_FAILED.

Target Device Status (SRB_TargStat)
Additional ASPI for Win32 Functions.
Low Level SCSI Programming with SCRIPTS.
Working with SCRIPTS.
An Overview of SCRIPTS.
SCRIPTS Instructions.
Logical Operators and Conditional Tests.
Embedding SCRIPTS in C Code.
Changing Run-Time Parameters.
Patching.
Table Indirect Addressing.

Detecting SCRIPTS Program Completion.
Polling for Completion.
Hardware Interrupt on Completion.

Initialization and Housekeeping.
PCI BIOS Functions.
Initializing SCSI Control Registers.
Sample Code.
Generic SCRIPTS Code.
SCSI Target Mode Programming.
Hardware.
Handling SCSI Phases.
Target-mode API.
Adapter Inquiry (TSPI_CMD_AdapterInfo).
Attach LUN (TSPI_CMD_AttachLUN).
Detach LUN (TSPI_CMD_DetachLUN).
Get Event (TSPI_CMD_GetEvent).
Read Data From Host (TSPI_CMD_ ReadFromHost).
Write Data To Host (TSPI_CMD_ WriteToHost).
Complete Command (TSPI_CMD_CompleteCommand).
Send Message To Host (TSPI_CMD_SendMessage).
Get Message From Host (TSPI_CMD_GetMessage).
Disconnect (TSPI_CMD_Disconnect).
Reconnect (TSPI_CMD_Reconnect).
Connecting to the TSPI Manager.
Using the TSPI Interface.
SCSI Support Under Windows.
ASPI for Windows 3.x.
ASPI for Win32 (Windows 95 and NT).
The Windows 95 and NT SCSI Model.
Windows NT SCSI Pass-Through Interface.
IOCTL_SCSI_GET_INQUIRY_DATA.
IOCTL_SCSI_GET_CAPABILITIES.
IOCTL_SCSI_GET_ADDRESS.
IOCTL_SCSI_RESCAN_BUS.
IOCTL_SCSI_PASS_THROUGH and IOCTL_SCSI_PASS_THROUGH_DIRECT.
Unix SCSI Implementations.
A Brief Description of UNIX Device Drivers.
Comparison of UNIX Implementations.
The Linux SCSI Disk Driver.
The Linux SCSI Pass-through Driver.
Example SCSI Pass-through Application Program.
Summary.
Acknowledgements.
Troubleshooting and Common Mistakes.
Start With a Clean Hardware Layer.
SCSI Bus Termination.
SCSI Termination Power.
Be Cautious With Cables.
Don't Take Documentation at Face Value.
Watch Out for Platform Dependencies.
SCSI Byte Order.
ASPI Byte Order.
Structure Alignment.
Buffer Alignment.
Debugging Tools.
Interactive Command Utilities.
Virtual Devices.
SCSI Bus Analyzers.
Keep a Record.
Sample Application — SCSI Snooper.
An Overview of the SCSI Snooper.
The ASPI Class Library.
The ScsiInterface Class.
The ScsiDevice Class.
The ScsiCmdBlock Class.
Initializing the ScsiInterface Class.
Executing a ScsiCmdBlock.
Using the ASPI Class Library.
Deriving SCSI Device Types.
The SCSI Snooper Application Framework.
SCSI Snooper Application Structure.
Appendix A — Glossary of Acronyms.
General Terms.
SCSI-2 Definitions.
SCSI-2 Protocols.
SCSI-3 Definitions.
SCSI-3 Architecture.
SCSI-3 Command Sets.
SCSI-3 Protocols.
SCSI Software Interfaces.
Appendix B — SCSI Resources.
Books.
Magazines and Journals.
Online Information.
Web Sites.
Usenet Newsgroups.
FTP Sites.
Bulletin Board Systems.
Manufacturer Contacts.

Appendix C — Installing the Windows NT ASPI32 Service.
Appendix D — Companion CD-ROM Contents.
Sample Code.
SCRIPTS Sample Code.
SCSI Snooper Application.
TSPI Target-mode SCSI Programming Interface.
SCSI Specifications.
SCSI Frequently Asked Questions.
Symbios SCRIPTS Support.
Adaptec ASPI Specifications.
Linux SCSI Documentation. 0201185385T04062001



Back to Top

商品描述(中文翻譯)

目錄

前言
目標讀者
本書組織結構
所需資源
致謝
作者介紹
Brian Sawert
Larry Martin
Gary Field
導言
SCSI技術概述
SCSI解決方案
SCSI-1
SCSI-1特性
智能設備
多任務I/O
同步數據傳輸
單一介面上的多種設備類型
SCSI-2的誕生
SCSI-2中的新特性
快速SCSI
寬SCSI
快速寬SCSI
排隊I/O過程
新命令集
改進的SCSI-1特性
需要數據奇偶校驗
需要消息支持
由發起者提供終端電源
SCSI-3的前景
Fast-20和Fast-40 SCSI
串行SCSI標準
光纖通道
串行標準架構
P1394
分層架構
即插即用SCSI
SCSI基礎
SCSI交易概述
SCSI階段
SCSI階段
總線空閒
仲裁
選擇
重新選擇
消息輸出
命令
數據輸入和數據輸出
狀態
消息輸入
階段序列
SCSI消息
消息類型
識別消息
擴展消息
同步數據傳輸請求
寬數據傳輸請求
其他常見消息
無操作
中止
總線設備重置
斷開
忽略寬殘留
隊列標籤消息
簡單隊列標籤
隊列標籤頭
有序隊列標籤
SCSI命令
命令結構
操作碼
邏輯單元號
命令參數
控制字段
參數列表
字節順序
強制性SCSI命令
測試單元就緒
查詢
範例 - Iomega Zip Drive
可選命令
設備類型特定命令
模式選擇
模式感知
模式感知數據格式
範例 - Iomega Zip Drive
讀取和寫入
讀取
寫入
其他命令
狀態、感知和錯誤
狀態
狀態碼
感知數據
感知鍵
單元注意
附加感知碼
範例 - Iomega Zip Drive
ASPI - 高級SCSI編程介面
什麼是ASPI?
為什麼要使用ASPI?
ASPI概念
適配器和設備尋址
發出SCSI命令
構建SCSI請求塊
將SRB發送到ASPI管理器
等待SRB完成
處理返回的狀態信息
適配器特定屬性
連接到ASPI管理器
ASPI命令
主機適配器查詢(SC_HA_INQUIRY)
獲取設備類型(SC_GET_DEV_TYPE)
執行SCSI命令(SC_EXEC_SCSI_CMD)
中止SRB(SC_ABORT_SRB)
重置SCSI設備(SC_RESET_DEV)
重新掃描SCSI總線(SC_RESCAN_SCSI_BUS)
獲取/設置超時(SC_GETSET_TIMEOUTS)
ASPI錯誤和狀態碼
ASPI SRB狀態(SRB_Status)
SS_PENDING
SS_COMP
SS_ERR
SS_INVALID_CMD
SS_INVALID_HA
SS_NO_DEVICE
SS_INVALID_SRB
SS_FAILED_INIT
SS_ASPI_IS_BUSY
SS_BUFFER_TOO_BIG
SS_BUFFER_ALIGN
SS_SECURITY_VIOLATION
SS_ABORTED
SS_ABORT_FAIL
SS_NO_ASPI
SS_ILLEGAL_MODE
SS_MISMATCHED_COMPONENTS
SS_NO_ADAPTERS
SS_INSUFFICIENT RESOURCES
主機適配器狀態(SRB_HaStat)
HASTAT_OK
HASTAT_SEL_TO
HASTAT_DO_DU
HASTAT_BUS_FREE
HASTAT_PHASE_ERR
HASTAT_TIMEOUT
HASTAT_COMMAND_TIMEOUT
HASTAT_MESSAGE_REJECT
HASTAT_BUS_RESET
HASTAT_PARITY_ERROR
HASTAT_REQUEST_SENSE_FAILED
目標設備狀態(SRB_TargStat)
附加ASPI for Win32函數
低級SCSI編程與SCRIPTS
使用SCRIPTS
SCRIPTS概述
SCRIPTS指令
邏輯運算符和條件測試
在C代碼中嵌入SCRIPTS
更改運行時參數
修補
表間接尋址
檢測SCRIPTS程序完成
輪詢完成
硬體中斷完成
初始化和維護
PCI BIOS函數
初始化SCSI控制寄存器
範例代碼
通用SCRIPTS代碼
SCSI目標模式編程
硬體
處理SCSI階段
目標模式API
適配器查詢(TSPI_CMD_AdapterInfo)
附加LUN(TSPI_CMD_AttachLUN)
分離LUN(TSPI_CMD_DetachLUN)
獲取事件(TSPI_CMD_GetEvent)
從主機讀取數據(TSPI_CMD_ReadFromHost)
寫入數據到主機(TSPI_CMD_WriteToHost)
完成命令(TSPI_CMD_CompleteCommand)
發送消息到主機(TSPI_CMD_SendMessage)
從主機獲取消息(TSPI_CMD_GetMessage)
斷開(TSPI_CMD_Disconnect)
重新連接(TSPI_CMD_Reconnect)
連接到TSPI管理器
使用TSPI介面
Windows下的SCSI支持
ASPI for Windows 3.x
ASPI for Win32(Windows 95和NT)
Windows 95和NT SCSI模型
Windows NT SCSI直通介面
IOCTL_SCSI_GET_INQUIRY_DATA
IOCTL_SCSI_GET_CAPABILITIES
IOCTL_SCSI_GET_ADDRESS
IOCTL_SCSI_RESCAN_BUS
IOCTL_SCSI_PASS_THROUGH和IOCTL_SCSI_PASS_THROUGH_DIRECT
Unix SCSI實現
UNIX設備驅動程序簡介
UNIX實現比較
Linux SCSI磁碟驅動程序
Linux SCSI直通驅動程序
範例SCSI直通應用程序
總結
致謝
故障排除和常見錯誤
從乾淨的硬體層開始
SCSI總線終止
SCSI終止電源
小心使用電纜
不要對文檔輕信
注意平台依賴性
SCSI字節順序
ASPI字節順序
結構對齊
緩衝區對齊
調試工具
互動命令工具
虛擬設備
SCSI總線分析儀
保持記錄
範例應用程序 - SCSI Snooper
SCSI Snooper概述
ASPI類庫
ScsiInterface類
ScsiDevice類
ScsiCmdBlock類
初始化ScsiInterface類
執行ScsiCmdBlock
使用ASPI類庫
推導SCSI設備類型
SCSI Snooper應用框架
SCSI Snooper應用結構
附錄A - 縮寫詞彙表
一般術語
SCSI-2定義
SCSI-2協議
SCSI-3定義
SCSI-3架構
SCSI-3命令集
SCSI-3協議
SCSI軟體介面
附錄B - SCSI資源
書籍
雜誌和期刊
在線資訊
網站
Usenet新聞組
FTP站點
公告欄系統
製造商聯繫方式
附錄C - 安裝Windows NT ASPI32服務
附錄D - 附帶CD-ROM內容
範例代碼
SCRIPTS範例代碼
SCSI Snooper應用程序
TSPI目標模式SCSI編程介面
SCSI規範
SCSI常見問題
Symbios SCRIPTS支持
Adaptec ASPI規範
Linux SCSI文檔