Changeset 8136102 in mainline for uspace/srv/hw/netif/dp8390/dp8390.h


Ignore:
Timestamp:
2011-01-11T01:33:58Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b22c97
Parents:
6643a19 (diff), 7300c37 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

improve correctness of the NE2000 driver w.r.t. parallelism of the interrupt notification handler

  • by masking off interrupts in the kernel interrupt handler, the core of the interrupt notification handler (fetching frames from the network card itself) always runs single-threaded (thus avoiding the issues with fetching of frames multiple times from different fibrils, causing ICMP replies to be duplicated)
  • the received frames are buffered locally and then sent to the NIL module with the interrupts unmasked again (thus another notification handler will be scheduled if the sending of the frames to the NIL module blocks)

there is still a synchronization issue without any clear root cause when the network card is flood-pinged even before it is being initialized

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/netif/dp8390/dp8390.h

    r6643a19 r8136102  
    5050
    5151#include <fibril_synch.h>
     52#include <adt/list.h>
    5253#include <net/packet.h>
     54#include <netif_skel.h>
    5355
    5456/** Module name */
     
    230232} ne2k_t;
    231233
     234typedef struct {
     235        link_t link;
     236        packet_t *packet;
     237} frame_t;
     238
    232239extern int ne2k_probe(ne2k_t *, void *, int);
    233240extern int ne2k_up(ne2k_t *);
    234241extern void ne2k_down(ne2k_t *);
    235242extern void ne2k_send(ne2k_t *, packet_t *);
    236 extern void ne2k_interrupt(ne2k_t *, uint8_t isr, int, device_id_t);
     243extern link_t *ne2k_interrupt(ne2k_t *, uint8_t, uint8_t);
    237244
    238245#endif
Note: See TracChangeset for help on using the changeset viewer.