Responsibilities of the Device Driver
SAM device drivers are responsible for the following actions:
- Interfacing with block I/O and logical-volume device-driver code in the operating system.
- Translating I/O requests from the operating system into commands suitable for the particular device. These commands are then given to the adapter device driver for execution.
- Issuing any and all commands to the attached device. The adapter device driver sends no commands except those it is directed to send by the calling device driver.
- Managing device reservations and releases. In the operating system, it is assumed that other initiators might be active on the transport layer. Usually, the device driver establishes a reservation at open time and releases it at close time (except when told to do otherwise through parameters in the device driver interface). Depending upon the type of reservations that are used, it might be necessary for a device driver to monitor conditions such as Unit Attention, which indicates that a change is the state of the previously established reservation.