From 2129a93f77f20e3610fe9852a0f80050779fd6ea Mon Sep 17 00:00:00 2001 From: Murray Stokely Date: Wed, 4 May 2005 23:37:19 +0000 Subject: [PATCH] Add indexterms, consistently spell CD-ROM, add more descriptive markup. --- .../books/arch-handbook/scsi/chapter.sgml | 35 ++++++++++++++----- .../books/arch-handbook/usb/chapter.sgml | 14 +++++++- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/en_US.ISO8859-1/books/arch-handbook/scsi/chapter.sgml b/en_US.ISO8859-1/books/arch-handbook/scsi/chapter.sgml index 29e9ed9560..0d7162b666 100644 --- a/en_US.ISO8859-1/books/arch-handbook/scsi/chapter.sgml +++ b/en_US.ISO8859-1/books/arch-handbook/scsi/chapter.sgml @@ -14,6 +14,7 @@ Synopsis + SCSI This document assumes that the reader has a general understanding of device drivers in FreeBSD and of the SCSI protocol. Much of the information in this document was @@ -56,6 +57,8 @@ General architecture + Common Access Method (CAM) + CAM stands for Common Access Method. It is a generic way to address the I/O buses in a SCSI-like way. This allows a separation of the generic device drivers from the drivers @@ -65,9 +68,12 @@ modified) for every new I/O bus. Thus the two most important active entities are: + CD-ROM + tape + IDE Peripheral Modules - a - driver for peripheral devices (disk, tape, CDROM, + driver for peripheral devices (disk, tape, CD-ROM, etc.) SCSI Interface Modules (SIM) - a Host Bus Adapter drivers for connecting to an I/O bus such @@ -113,7 +119,7 @@ error; /* some code to handle the error */ } - Here SIZE is the size of the queue to be allocated, maximal + Here SIZE is the size of the queue to be allocated, maximal number of requests it could contain. It is the number of requests that the SIM driver can handle in parallel on one SCSI card. Commonly it can be calculated as: @@ -135,6 +141,7 @@ free the devq also because we can do nothing else with it and we want to conserve memory. + SCSIbus If a SCSI card has multiple SCSI buses on it then each bus requires its own cam_sim structure. @@ -207,6 +214,7 @@ + SCSIadapter Finally we register the SCSI buses associated with our SCSI adapter: @@ -585,13 +593,15 @@ return; } + hardware control block + Then allocate whatever data structures (such as card-dependent hardware control block) we need to process this request. If we can not then freeze the SIM queue and remember that we have a pending operation, return the CCB back and ask CAM to re-queue it. Later when the resources become available the SIM queue must be unfrozen by returning a ccb with the - CAM_SIMQ_RELEASE bit set in its status. Otherwise, if all went + CAM_SIMQ_RELEASE bit set in its status. Otherwise, if all went well, link the CCB with the hardware control block (HCB) and mark it as queued. @@ -630,14 +640,14 @@ always convert the address to the physical one. A NOT-QUITE RELATED NOTE: Normally this is done by a call - to vtophys(), but for the PCI device (which account for most + to vtophys(), but for the PCI device (which account for most of the SCSI controllers now) drivers' portability to the Alpha - architecture the conversion must be done by vtobus() instead + architecture the conversion must be done by vtobus() instead due to special Alpha quirks. [IMHO it would be much better to - have two separate functions, vtop() and ptobus() then vtobus() + have two separate functions, vtop() and ptobus() then vtobus() would be a simple superposition of them.] In case if a physical address is requested it is OK to return the CCB with - the status CAM_REQ_INVALID, the current drivers do that. But + the status CAM_REQ_INVALID, the current drivers do that. But it is also possible to compile the Alpha-specific piece of code, as in this example (there should be a more direct way to do that, without conditional compilation in the drivers). If @@ -687,7 +697,7 @@ handling for the details on the address-translation issues. If some variation is too difficult or impossible to implement with a particular card it is OK to return the status - CAM_REQ_INVALID. Actually, it seems like the scatter-gather + CAM_REQ_INVALID. Actually, it seems like the scatter-gather ability is not used anywhere in the CAM code now. But at least the case for a single non-scattered virtual buffer must be implemented, it is actively used by CAM. @@ -795,7 +805,7 @@ request description) and sent to the controller or the SCSI controller may be immediately programmed to send this RESET message to the device or this request may be just not supported - (and return the status CAM_REQ_INVALID). Also on completion of + (and return the status CAM_REQ_INVALID). Also on completion of the request all the disconnected transactions for this target must be aborted (probably in the interrupt routine). @@ -1213,6 +1223,8 @@ of the union ccb: are set then the existing drivers return the current settings). Set all the bits in the valid field. + BIOS + XPT_CALC_GEOMETRY - calculate logical (BIOS) geometry of the disk @@ -1238,6 +1250,7 @@ of the union ccb: + SCSIBIOS If the returned geometry differs much enough from what the SCSI controller BIOS thinks and a disk on this SCSI controller is used as bootable the system may not be able to boot. The @@ -1493,6 +1506,8 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)< Interrupts + SCSIinterrupts + The exact type of the interrupt routine depends on the type of the peripheral bus (PCI, ISA and so on) to which the SCSI controller is connected. @@ -1856,6 +1871,8 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)< Errors Summary + SCSIerrors + When executing an I/O request many things may go wrong. The reason of error can be reported in the CCB status with great detail. Examples of use are spread throughout this document. For diff --git a/en_US.ISO8859-1/books/arch-handbook/usb/chapter.sgml b/en_US.ISO8859-1/books/arch-handbook/usb/chapter.sgml index 847666a67b..7aa50feda7 100644 --- a/en_US.ISO8859-1/books/arch-handbook/usb/chapter.sgml +++ b/en_US.ISO8859-1/books/arch-handbook/usb/chapter.sgml @@ -13,6 +13,9 @@ Introduction + Universal Serial Bus (USB) + NetBSD + The Universal Serial Bus (USB) is a new way of attaching devices to personal computers. The bus architecture features two-way communication and has been developed as a response to @@ -108,6 +111,7 @@ Host Controllers + USBhost controllers The host controller (HC) controls the transmission of packets on the bus. Frames of 1 millisecond are used. At the start of each frame the host controller generates a Start of @@ -166,6 +170,8 @@ UHCI + USBUHCI + The UHCI host controller maintains a framelist with 1024 pointers to per frame data structures. It understands two different data types: transfer descriptors (TD) and queue @@ -219,7 +225,8 @@ OHCI - + + USBOHCI Programming an OHCI host controller is much simpler. The controller assumes that a set of endpoints is available, and is aware of scheduling priorities and the ordering of the @@ -446,6 +453,7 @@ Device probe and attach + USBprobe After the notification by the hub that a new device has been connected, the service layer switches on the port, providing the device with 100 mA of current. At this point the device is in @@ -485,6 +493,7 @@ Device disconnect and detach + USBdisconnect A device driver should expect to receive errors during any transaction with the device. The design of USB supports and encourages the disconnection of devices at any point in @@ -568,6 +577,7 @@ interface and allocate the pipes to the two independent endpoints. + USBfirmware Example: Firmware download Many devices that have been developed are based on a general purpose processor with an additional USB core added to it. Because the development of @@ -600,6 +610,8 @@ emulating a SCSI controller over the USB wire. ATAPI and UFI commands are supported in a similar fashion. + ATAPI + The Mass Storage Specification supports 2 different types of wrapping of the command block.The initial attempt was based on sending the command and status through the default pipe and