- Timestamp:
- Jan 15, 2019, 2:02:18 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_bdv.c
r610 r615 111 111 112 112 // select operation 113 if( cmd_type == IOC_WRITE ) op = BDV_OP_WRITE;114 else op = BDV_OP_READ;113 if( (cmd_type == IOC_READ) || (cmd_type == IOC_SYNC_READ) ) op = BDV_OP_READ; 114 else op = BDV_OP_WRITE; 115 115 116 116 // set SOCLIB_BDV registers to configure the I/O operation … … 125 125 // that blocks and deschedules after launching the I/O transfer. 126 126 // The I/O operation status is reported in the command by the ISR. 127 // - for IOC_SYNC_READ command, this function is called by the client thread128 // th at polls the BDV status register until I/O transfer completion.129 130 if( cmd_type == IOC_SYNC_READ ) // statuspolling policy127 // - for IOC_SYNC_READ / IOC_SYNC_WRITE command, this function is called by the client 128 // thread that polls the BDV status register until I/O transfer completion. 129 130 if( (cmd_type == IOC_SYNC_READ) || (cmd_type == IOC_SYNC_WRITE) ) // polling policy 131 131 { 132 132 // launch I/O operation on BDV device … … 138 138 status = hal_remote_l32( XPTR( seg_cxy , seg_ptr + BDV_STATUS_REG ) ); 139 139 140 if( status == BDV_READ_SUCCESS ) // successfully completed 140 if( (status == BDV_READ_SUCCESS) || 141 (status == BDV_WRITE_SUCCESS) ) // successfully completed 141 142 { 142 143 hal_remote_s32( XPTR( th_cxy , &th_ptr->ioc_cmd.error ) , 0 ); … … 154 155 } 155 156 } 156 else // descheduling + IRQ policy157 else // descheduling + IRQ policy 157 158 { 158 159 // enter critical section to atomically
Note: See TracChangeset
for help on using the changeset viewer.