47 | | 1. When the hardware block device has a DMA capability, for an asynchronous request, the ''ioc_driver_cmd()'' function is supposed to lauch the DMA transfer, then blocks on the THREAD_BLOCKED_ISR condition, and deschedules. |
48 | | 1. When the I/O operation completes, the hardware rises the IOC_IRQ, and the the ioc_driver_isr() function reactivates the server thread. |
49 | | 1.When the server thread resumes, it reactivates the client thread, and handle the next request in the IOC waiting queue, or deschedules if the IOC queue is empty. |
| 47 | 1. When the ''ioc_driver_cmd()'' function returns, the server thread reactivates the client thread, and handle the next request in the TXT waiting queue, or deschedules if the queue is empty. |
81 | | For asynchronous operations the '''ioc_driver_cmd()''' function is called by the server thread. It must block and deschedule after launching the I/O transfer. When the IOC_IRQ is raised by the hardware, the '''ioc_driver_isr()''' function reports the I/O operation status is reported in the command, and reactivates the server thread. |
| 79 | For '''asynchronous operations''', the '''ioc_driver_cmd()''' function is called by the server thread: |
| 80 | 1. When the hardware block device has a DMA capability, for an asynchronous request, the '''ioc_driver_cmd()''' function launches the DMA transfer. Then it blocks on the THREAD_BLOCKED_ISR condition, and deschedules. |
| 81 | 1. When the I/O operation completes, the hardware rises the IOC_IRQ, and the the '''ioc_driver_isr()''' function reports the I/O operation status, and reactivates the server thread. |
83 | | For synchronous operations, the '''ioc_driver_cmd()''' function is called by the client thread. It masks the IOC_IRQ, polls the IOC hardware status register until I/O transfer completion, and report I/O operation status in the command. The '''ioc_driver_isr()''' function is not involved. |
| 83 | For '''synchronous operations''', the '''ioc_driver_cmd()''' function is called by the client thread: |
| 84 | 1. It masks the IOC_IRQ, and polls the IOC hardware status register until I/O transfer completion, |
| 85 | 1. When the I/O operation completes, it reports the I/O operation status in the command. |
| 86 | The '''ioc_driver_isr()''' function is not involved. |