Changeset e3fe7df in mainline
- Timestamp:
- 2011-01-06T22:58:05Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 66b628a
- Parents:
- efa8aec6
- Location:
- uspace/srv/hw/netif/dp8390
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/dp8390.c
refa8aec6 re3fe7df 142 142 outb_reg0(dep, DP_CR, CR_STP | CR_DM_ABORT); 143 143 (dep->de_stopf)(dep); 144 dep->de_flags = DEF_EMPTY; 144 dep->sending = false; 145 dep->send_avail = false; 145 146 } 146 147 } … … 154 155 assert(dep->de_flags & DEF_ENABLED); 155 156 156 if (dep-> de_flags & DEF_SEND_AVAIL) {157 fprintf(stderr, " dp8390: send already in progress\n");157 if (dep->send_avail) { 158 fprintf(stderr, "Send already in progress\n"); 158 159 return EBUSY; 159 160 } … … 163 164 if (from_int) 164 165 fprintf(stderr, "dp8390: should not be sending\n"); 165 dep-> de_flags |= DEF_SEND_AVAIL;166 dep-> de_flags &= ~DEF_PACK_SEND;166 dep->send_avail = true; 167 dep->sending = false; 167 168 168 169 return EBUSY; 169 170 } 170 171 171 assert(! (dep->de_flags & DEF_PACK_SEND));172 assert(!dep->sending); 172 173 173 174 void *buf = packet_get_data(packet); … … 196 197 assert(sendq_head < SENDQ_NR); 197 198 dep->de_sendq_head = sendq_head; 198 199 dep->de_flags |= DEF_PACK_SEND; 199 dep->sending = true; 200 200 201 201 if (from_int) 202 202 return EOK; 203 203 204 dep-> de_flags &= ~DEF_PACK_SEND;204 dep->sending = false; 205 205 206 206 return EOK; … … 213 213 214 214 /* General initialization */ 215 dep->de_flags = DEF_EMPTY; 215 dep->sending = false; 216 dep->send_avail = false; 216 217 (*dep->de_initf)(dep); 217 218 … … 371 372 dep->de_sendq[i].sq_filled = 0; 372 373 373 dep-> de_flags &= ~DEF_SEND_AVAIL;374 dep->send_avail = false; 374 375 dep->de_flags &= ~DEF_STOPPED; 375 376 } … … 445 446 } 446 447 447 dep-> de_flags &= ~DEF_SEND_AVAIL;448 dep->send_avail = false; 448 449 } 449 450 … … 487 488 } 488 489 489 dep-> de_flags &= ~DEF_PACK_SEND;490 dep->sending = false; 490 491 } 491 492 … … 716 717 717 718 dep->de_mode = DEM_ENABLED; 718 dep->de_flags = DEF_EMPTY; 719 dep->sending = false; 720 dep->send_avail = false; 719 721 } 720 722 -
uspace/srv/hw/netif/dp8390/dp8390.h
refa8aec6 re3fe7df 306 306 dp_nic2userf_t de_nic2userf; 307 307 dp_getblock_t de_getblockf; 308 309 /* Driver flags */ 310 bool sending; 311 bool send_avail; 308 312 } dpeth_t; 309 313 310 #define DEF_EMPTY 0x000311 #define DEF_PACK_SEND 0x001312 #define DEF_SEND_AVAIL 0x004313 314 #define DEF_PROMISC 0x040 314 315 #define DEF_MULTI 0x080
Note:
See TracChangeset
for help on using the changeset viewer.