Changeset 279 for trunk/kernel/devices/dev_nic.c
- Timestamp:
- Jul 27, 2017, 12:23:29 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_nic.c
r259 r279 110 110 111 111 // initialize command in thread descriptor 112 thread_ptr-> command.nic.dev_xp = dev_xp;112 thread_ptr->nic_cmd.dev_xp = dev_xp; 113 113 114 114 // call driver to test readable 115 thread_ptr-> command.nic.cmd = NIC_CMD_READABLE;116 dev_ptr->cmd( thread_xp ); 117 118 // check error 119 error = thread_ptr-> command.nic.error;115 thread_ptr->nic_cmd.cmd = NIC_CMD_READABLE; 116 dev_ptr->cmd( thread_xp ); 117 118 // check error 119 error = thread_ptr->nic_cmd.error; 120 120 if( error ) return error; 121 121 122 122 // block and deschedule if queue non readable 123 if( thread_ptr-> command.nic.status == false )123 if( thread_ptr->nic_cmd.status == false ) 124 124 { 125 125 // enable NIC-RX IRQ … … 135 135 136 136 // call driver for actual read 137 thread_ptr-> command.nic.cmd = NIC_CMD_READ;138 thread_ptr-> command.nic.buffer = pkd->buffer;139 dev_ptr->cmd( thread_xp ); 140 141 // check error 142 error = thread_ptr-> command.nic.error;137 thread_ptr->nic_cmd.cmd = NIC_CMD_READ; 138 thread_ptr->nic_cmd.buffer = pkd->buffer; 139 dev_ptr->cmd( thread_xp ); 140 141 // check error 142 error = thread_ptr->nic_cmd.error; 143 143 if( error ) return error; 144 144 145 145 // returns packet length 146 pkd->length = thread_ptr-> command.nic.length;146 pkd->length = thread_ptr->nic_cmd.length; 147 147 148 148 nic_dmsg("\n[INFO] %s exit for NIC-RX thread on core %d in cluster %x\n", … … 180 180 181 181 // initialize command in thread descriptor 182 thread_ptr-> command.nic.dev_xp = dev_xp;182 thread_ptr->nic_cmd.dev_xp = dev_xp; 183 183 184 184 // call driver to test writable 185 thread_ptr-> command.nic.cmd = NIC_CMD_WRITABLE;186 dev_ptr->cmd( thread_xp ); 187 188 // check error 189 error = thread_ptr-> command.nic.error;185 thread_ptr->nic_cmd.cmd = NIC_CMD_WRITABLE; 186 dev_ptr->cmd( thread_xp ); 187 188 // check error 189 error = thread_ptr->nic_cmd.error; 190 190 if( error ) return error; 191 191 192 192 // block and deschedule if queue non writable 193 if( thread_ptr-> command.nic.status == false )193 if( thread_ptr->nic_cmd.status == false ) 194 194 { 195 195 // enable NIC-TX IRQ … … 205 205 206 206 // call driver for actual write 207 thread_ptr-> command.nic.cmd = NIC_CMD_WRITE;208 thread_ptr-> command.nic.buffer = pkd->buffer;209 thread_ptr-> command.nic.length = pkd->length;210 dev_ptr->cmd( thread_xp ); 211 212 // check error 213 error = thread_ptr-> command.nic.error;207 thread_ptr->nic_cmd.cmd = NIC_CMD_WRITE; 208 thread_ptr->nic_cmd.buffer = pkd->buffer; 209 thread_ptr->nic_cmd.length = pkd->length; 210 dev_ptr->cmd( thread_xp ); 211 212 // check error 213 error = thread_ptr->nic_cmd.error; 214 214 if( error ) return error; 215 215
Note: See TracChangeset
for help on using the changeset viewer.