Changeset 7300c37 in mainline for uspace/srv/hw/netif/dp8390/ne2000.c
- Timestamp:
- 2011-01-11T01:33:13Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8136102
- Parents:
- 4fc2b3b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/ne2000.c
r4fc2b3b r7300c37 68 68 #define IRQ_GET_ISR(call) ((int) IPC_GET_ARG2(call)) 69 69 70 /** Return the TSR from the interrupt call. 71 * 72 * @param[in] call The interrupt call. 73 * 74 */ 75 #define IRQ_GET_TSR(call) ((int) IPC_GET_ARG3(call)) 76 70 77 static int irc_service = 0; 71 78 static int irc_phone = -1; … … 92 99 /* Predicate for accepting the interrupt */ 93 100 .cmd = CMD_PREDICATE, 94 .value = 3,101 .value = 4, 95 102 .srcarg = 3 96 103 }, … … 111 118 }, 112 119 { 120 /* Read Transmit Status Register */ 121 .cmd = CMD_PIO_READ_8, 122 .addr = NULL, 123 .dstarg = 3 124 }, 125 { 113 126 .cmd = CMD_ACCEPT 114 127 } … … 125 138 /** Handle the interrupt notification. 126 139 * 127 * This is the interrupt notification function. 140 * This is the interrupt notification function. It is quarantied 141 * that there is only a single instance of this notification 142 * function running at one time until the return from the 143 * ne2k_interrupt() function (where the interrupts are unmasked 144 * again). 128 145 * 129 146 * @param[in] iid Interrupt notification identifier. … … 148 165 fibril_rwlock_read_unlock(&netif_globals.lock); 149 166 150 if (ne2k != NULL) 151 ne2k_interrupt(ne2k, IRQ_GET_ISR(*call), nil_phone, device_id); 167 if (ne2k != NULL) { 168 link_t *frames = 169 ne2k_interrupt(ne2k, IRQ_GET_ISR(*call), IRQ_GET_TSR(*call)); 170 171 if (frames != NULL) { 172 while (!list_empty(frames)) { 173 frame_t *frame = 174 list_get_instance(frames->next, frame_t, link); 175 176 list_remove(&frame->link); 177 nil_received_msg(nil_phone, device_id, frame->packet, 178 SERVICE_NONE); 179 free(frame); 180 } 181 182 free(frames); 183 } 184 } 152 185 } 153 186
Note:
See TracChangeset
for help on using the changeset viewer.