Compartir a través de


IEEE 1394 SBP-2 Driver Development Concepts (Windows CE 5.0)

Send Feedback

The ANSI Standard NCTIS 325-1999 specification defines Serial Bus Protocol 2 (SBP-2). A driver based on the SBP-2 protocol is capable of carrying traffic for many types of devices. To access an IEEE 1394 SBP-2 device, you can use the standard file system APIs, such as CreateFile.

SBP-2 is a control protocol that encapsulates transactions for commands to maximize the direct memory access (DMA) capabilities of IEEE 1394. Certain sets define the commands for these transactions. The SCSI-3 standard defines the primary command sets. All command sets contain a collection of device types that define the type of device and the commands for a particular device.

Microsoft® Windows® CE offers direct support only for the SCSI-3 command set. SCSI-3 can generate commands to make use of the following device types:

  • Reduced block commands (RBC)
  • Multimedia commands (MMC)
  • SCSI block commands (SBC)

An SBP-2 driver can support command sets other than SCSI-3, but those command sets require a driver similar to SCSIBLK to support their generation.

The SCSI-3 command set and the RBC, SBC, and MMC device types support most block-based SBP-2 mass storage devices.

The following table shows the two modules that provide SBP-2 support.

Module Description
SBP-2 The SBP-2 driver encapsulates the SBP-2 protocol and provides the SBP-2 functionality to dependent drivers.
SCSIBLK The SCSIBLK driver provides a bock device interface to the system. The SCSIBLK driver processes the commands it receives into SBP-2 transactions. For example, requests for large transfers are broken into N transfers of the maximum transaction size of the given device. SCSIBLK can receive many requests asynchronously and process them in parallel.

The following illustration shows the two modules that provide the SBP-2 support.

ms892189.sbp2(en-us,MSDN.10).gif

SBP-2 detects devices that use the RBC, SBC, and MMC device types and exports them to the Storage Manager under the FWRX: prefix; X is an index from 0 to 9. Once the Storage Manager is available, it attempts to mount a file system against the device. For example, FATFS for a hard drive or UDFS for a DVD-ROM drive. For more information on the Storage Manager, see Storage Manager.

The exported devices respond to normal block device IOCTLs, such as IOCTL_DISK_READ or IOCTL_DISK_WRITE. For more information on block device IOCTLs, see Block Driver Interface.

You can connect or disconnect IEEE 1394 at any time. When connected, SBP-2 devices are available to file systems and applications. When disconnected, associated file systems dismount and the FWRX: device disappears.

Only unplug hard drives when you are not using the device. If you remove a device while it is in use, such as during a read or write transaction, you will not physically damage the device, but you risk corruption of the file system on the device. If a file system implements caching, flush the cache to the hard drive before you disconnect the device.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.