Changeset 0764cc8a in mainline for uspace/drv/nic/rtl8169/driver.h


Ignore:
Timestamp:
2014-05-26T20:52:46Z (11 years ago)
Author:
Agnieszka Tabaka <nufcia@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
59b3095
Parents:
f1ac202
Message:

Add more function stubs to allow proper driver attaching, add code for
allocating DMA ring buffers. Interrupt handler and status notifications
work!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/rtl8169/driver.h

    rf1ac202 r0764cc8a  
    3838#define NAME  "rtl8169"
    3939
    40 #define TX_BUFF_COUNT   16
     40#define TX_BUFFERS_COUNT        16
     41#define RX_BUFFERS_COUNT        16
     42
     43#define TX_RING_SIZE            (sizeof(rtl8169_descr_t) * TX_BUFFERS_COUNT)
     44#define RX_RING_SIZE            (sizeof(rtl8169_descr_t) * RX_BUFFERS_COUNT)
    4145
    4246/** RTL8139 device data */
     
    4852        /** The irq assigned */
    4953        int irq;
    50 
    5154        /** Mask of the turned interupts (IMR value) */
    5255        uint16_t int_mask;
    53 
    54         /** The memory allocated for the transmittion buffers
    55          *  Each buffer takes 2kB
    56          */
     56        /** TX ring */
     57        uintptr_t tx_ring_phys;
     58        void *tx_ring_virt;
     59        /** RX ring */
     60        uintptr_t rx_ring_phys;
     61        void *rx_ring_virt;
     62        /** TX buffers */
    5763        uintptr_t tx_buff_phys;
    5864        void *tx_buff_virt;
    59 
    60         /** Virtual adresses of the Tx buffers */
    61         void *tx_buff[TX_BUFF_COUNT];
    62 
     65        /** RX buffers */
     66        uintptr_t rx_buff_phys;
     67        void *rx_buff;
    6368        /** The nubmer of the next buffer to use, index = tx_next % TX_BUFF_COUNT */
    6469        size_t tx_next;
Note: See TracChangeset for help on using the changeset viewer.