Kernelnewbies Mailing Lists
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview
thread

Denis Kirjanov

Sept. 24, 2010
1:48 p.m.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> ---

...

From datasheet TX/RX descriptors are very similar. I think that we can merge TX/RX in to one xmit descriptor. In this case we shoud use some kind of accessors to different fields. Any suggestions?

Thanks! diff --git a/src/pcnet.c b/src/pcnet.c index 5a3e639..97acc7e 100644 --- a/src/pcnet.c +++ b/src/pcnet.c @@ -71,6 +71,20 @@ struct pcnet_dummy_init_block { __le32 tx_ring; } __attribute__ ((__packed__)); +/* 32bit TX/RX descriptors */ +/* PCnet Software Design Considerations, p.5 */ +struct xmit_descr { + __le32 addr; + /* The BCNT fields of the transmit and receive descriptors + * are 12-bit negative numbers representing the twos com- + * plement of the buffer size in bytes + */ + __le16 size; + __le16 status; + __le32 flags; + __le32 reserved; +}; + struct pcnet_private { /* TODO: * DMA buffer management operations

0 0
Reply
Sign in to reply online Use email software

Back to the thread

Back to the list

HyperKitty Powered by HyperKitty version 1.3.12.