Changes in uspace/srv/hw/netif/ne2000/ne2000.c [ee2fa30a:79ae36dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/ne2000/ne2000.c
ree2fa30a r79ae36dd 38 38 #include <assert.h> 39 39 #include <async.h> 40 #include <async_obsolete.h> 40 41 #include <ddi.h> 41 42 #include <errno.h> … … 43 44 #include <malloc.h> 44 45 #include <sysinfo.h> 46 #include <ipc/services.h> 45 47 #include <ns.h> 46 #include < ipc/services.h>48 #include <ns_obsolete.h> 47 49 #include <ipc/irc.h> 48 50 #include <net/modules.h> … … 76 78 77 79 static bool irc_service = false; 78 static async_sess_t *irc_sess = NULL;80 static int irc_phone = -1; 79 81 80 82 /** NE2000 kernel interrupt command sequence. … … 152 154 device_id_t device_id = IRQ_GET_DEVICE(*call); 153 155 netif_device_t *device; 154 async_sess_t *nil_sess;156 int nil_phone; 155 157 ne2k_t *ne2k; 156 158 157 159 fibril_rwlock_read_lock(&netif_globals.lock); 158 160 159 nil_sess = netif_globals.nil_sess; 160 161 if (find_device(device_id, &device) == EOK) 161 if (find_device(device_id, &device) == EOK) { 162 nil_phone = device->nil_phone; 162 163 ne2k = (ne2k_t *) device->specific; 163 else164 } else 164 165 ne2k = NULL; 165 166 … … 167 168 168 169 if (ne2k != NULL) { 169 li st_t *frames =170 link_t *frames = 170 171 ne2k_interrupt(ne2k, IRQ_GET_ISR(*call), IRQ_GET_TSR(*call)); 171 172 172 173 if (frames != NULL) { 173 174 while (!list_empty(frames)) { 174 frame_t *frame = list_get_instance(175 list_ first(frames), frame_t, link);175 frame_t *frame = 176 list_get_instance(frames->next, frame_t, link); 176 177 177 178 list_remove(&frame->link); 178 nil_received_msg(nil_ sess, device_id, frame->packet,179 nil_received_msg(nil_phone, device_id, frame->packet, 179 180 SERVICE_NONE); 180 181 free(frame); … … 277 278 278 279 device->device_id = device_id; 280 device->nil_phone = -1; 279 281 device->specific = (void *) ne2k; 280 282 device->state = NETIF_STOPPED; … … 329 331 change_state(device, NETIF_ACTIVE); 330 332 331 if (irc_service) { 332 async_exch_t *exch = async_exchange_begin(irc_sess); 333 async_msg_1(exch, IRC_ENABLE_INTERRUPT, ne2k->irq); 334 async_exchange_end(exch); 335 } 333 if (irc_service) 334 async_obsolete_msg_1(irc_phone, IRC_ENABLE_INTERRUPT, ne2k->irq); 336 335 } 337 336 … … 391 390 392 391 if (irc_service) { 393 while (!irc_sess) 394 irc_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 395 SERVICE_IRC, 0, 0); 392 while (irc_phone < 0) 393 irc_phone = service_obsolete_connect_blocking(SERVICE_IRC, 0, 0); 396 394 } 397 395
Note:
See TracChangeset
for help on using the changeset viewer.