/* queue transfer on drive, activate drive and controller if idle */ s = splbio(); /* Raise int. level to stop block I/O */ disksort(dp, bp); if (dp->bactive == 0) wdustart(du); /* start drive */ splx(s); /* Return int. level to previous level */
Function | Device Type | Description |
d_open | Block and character | Initialise device when first used |
d_close | Block and character | Used when device is released. May |
shutdown device or take it off-line. | ||
d_strategy | Block | Read/write interface, allows event re-ordering. |
d_read | Character | Reads data from device. |
d_write | Character | Writes data to device. |
d_ioctl | Block and character | Generic control operations on device. |
Location | Meaning of Register |
10,000 | Disk address: cylinder, head, sector |
10,004 | Operation to perform: read or write |
10,008 | Start of DMA buffer in main memory |