Ignore:
Timestamp:
2011-01-06T19:50:04Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aa1e202
Parents:
b187536
Message:

remove additional packet queueing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/netif/dp8390/dp8390_module.c

    rb187536 r39d70ec  
    115115static void irq_handler(ipc_callid_t iid, ipc_call_t *call)
    116116{
     117        device_id_t device_id = IRQ_GET_DEVICE(*call);
    117118        netif_device_t *device;
    118         dpeth_t *dep;
    119         packet_t *received;
    120         device_id_t device_id;
    121         int phone;
    122        
    123         device_id = IRQ_GET_DEVICE(*call);
     119        int nil_phone;
     120        dpeth_t *dep;
     121       
    124122        fibril_rwlock_write_lock(&netif_globals.lock);
    125123       
    126         if (find_device(device_id, &device) != EOK) {
    127                 fibril_rwlock_write_unlock(&netif_globals.lock);
    128                 return;
    129         }
    130        
    131         dep = (dpeth_t *) device->specific;
    132         if (dep->de_mode != DEM_ENABLED) {
    133                 fibril_rwlock_write_unlock(&netif_globals.lock);
    134                 return;
    135         }
    136        
    137         assert(dep->de_flags & DEF_ENABLED);
    138        
    139         dp_check_ints(dep, IRQ_GET_ISR(*call));
    140        
    141         if (dep->received_queue) {
    142                 received = dep->received_queue;
    143                 phone = device->nil_phone;
    144                 dep->received_queue = NULL;
    145                 dep->received_count = 0;
    146                 fibril_rwlock_write_unlock(&netif_globals.lock);
    147                 nil_received_msg(phone, device_id, received, SERVICE_NONE);
     124        if (find_device(device_id, &device) == EOK) {
     125                nil_phone = device->nil_phone;
     126                dep = (dpeth_t *) device->specific;
    148127        } else
    149                 fibril_rwlock_write_unlock(&netif_globals.lock);
     128                dep = NULL;
     129       
     130        fibril_rwlock_write_unlock(&netif_globals.lock);
     131       
     132        if ((dep != NULL) && (dep->de_mode == DEM_ENABLED)) {
     133                assert(dep->de_flags & DEF_ENABLED);
     134                dp_check_ints(nil_phone, device_id, dep, IRQ_GET_ISR(*call));
     135        }
    150136}
    151137
Note: See TracChangeset for help on using the changeset viewer.