Ethernet driver

62 views
Skip to first unread message

Pablo Pessolani

unread,
Nov 13, 2016, 1:24:00 AM11/13/16
to min...@googlegroups.com

Hi:
    I am writing a device driver for a network interface. I use lance driver as the starting model.
There is something that I don't understand.
When INET requests LANCE, it uses sendrec() and LANCE receives with receive(). 
If a harware interrupt occurs because a frame arrived, the IRQ is converted into a notify() to LANCE.
        Although LANCE main loop disables IRQ after receive(), INET could request LANCE 
after receive() but before sys_irqdisable(). Then, once the notify message is addressed
, do_int() replies though a reply() which uses send() to INET. But INET is waiting the reply of is request, 
        not the message informing it about the arriving of a frame.
Can anyone explain what is bad in my reasoning?
Thanks in advance.
PAP
      

Reply all
Reply to author
Forward
0 new messages