Mercurial > archived > louis > epitech > mq > rathaxes
view e1000_initialize_transmission.patch @ 82:71f76c0f235f
Wip on the transmission
author | Louis Opter <louis@lse.epitech.net> |
---|---|
date | Mon, 21 May 2012 04:09:23 +0200 |
parents | 78f2f1918398 |
children | 27f0e70df342 |
line wrap: on
line source
# HG changeset patch # Parent 1328cb41b1bb4d39588c1934c841b3e4362f7413 rathaxes: initialize transmission on the e1000 sample: - This is documented in details in the sections 14.5 and 3.3 of the Intel Gigabit Controller Software Developer manual. diff --git a/rathaxes/samples/e1000/e1000.blt b/rathaxes/samples/e1000/e1000.blt --- a/rathaxes/samples/e1000/e1000.blt +++ b/rathaxes/samples/e1000/e1000.blt @@ -34,6 +34,24 @@ } } + template type e1000:TxDescriptor() + { + chunk LKM:includes() + { + typedef int ${e1000:TxDescriptor}; + + static const ${e1000:TxDescriptor} force_rtx_e1000_tx_descriptor_decl; + } + + chunk ::decl() + { + typedef struct rtx_e1000_tx_descriptor + { + + } + } + } + /* * Ring of e1000::RxDescriptors and their corresponding skbuffs. * @@ -103,6 +121,7 @@ /* we can't use the Rathaxes type here (#8) */ struct rtx_e1000_rx_ring rx_ring; + struct rtx_e1000_tx_ring tx_ring; } *rtx_e1000_ctx_p; } @@ -736,6 +755,20 @@ } /* + * Transmission initialization (section 14.5): + * + * 1. Allocate the transmit descriptors ring and map it to make it + * accessible by the device; + * 2. Write the start address of the ring in TDBAL/TDBAH and set + * TDLEN to the size of the ring; + * 3. Set the TDH/TDT indexes to the beginning and end of the ring; + * 4. Set TCTL.PSP to pad short packets and TCTL.EN to enable the + * transmitter. + */ + + /* 1. Allocate the tx ring */ + + /* * XXX: We can't return here since we are not in a function but in * a chunk of code (injected in a function). */