Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268863
b: refs/heads/master
c: 17ec9ff
h: refs/heads/master
i:
  268861: c11e553
  268859: bdced70
  268855: b10057b
  268847: 71bc3bd
  268831: 14f2b89
  268799: e3ba49f
v: v3
  • Loading branch information
Mark Einon authored and Greg Kroah-Hartman committed Oct 23, 2011
1 parent 6b9646f commit 5083226
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 152 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 562550b02bbe9e376b05c5ff7d7ef12e7c32fc30
refs/heads/master: 17ec9ff32c0fb8478958f3a2a99be6758846f657
150 changes: 0 additions & 150 deletions trunk/drivers/staging/et131x/et1310_tx.h

This file was deleted.

87 changes: 86 additions & 1 deletion trunk/drivers/staging/et131x/et131x.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
#include <linux/random.h>
#include <linux/phy.h>

#include "et1310_tx.h"
#include "et131x.h"

MODULE_AUTHOR("Victor Soriano <vjsoriano@agere.com>");
Expand Down Expand Up @@ -365,6 +364,92 @@ struct rx_ring {
struct kmem_cache *recv_lookaside;
};

/* TX defines */
/*
* word 2 of the control bits in the Tx Descriptor ring for the ET-1310
*
* 0-15: length of packet
* 16-27: VLAN tag
* 28: VLAN CFI
* 29-31: VLAN priority
*
* word 3 of the control bits in the Tx Descriptor ring for the ET-1310
*
* 0: last packet in the sequence
* 1: first packet in the sequence
* 2: interrupt the processor when this pkt sent
* 3: Control word - no packet data
* 4: Issue half-duplex backpressure : XON/XOFF
* 5: send pause frame
* 6: Tx frame has error
* 7: append CRC
* 8: MAC override
* 9: pad packet
* 10: Packet is a Huge packet
* 11: append VLAN tag
* 12: IP checksum assist
* 13: TCP checksum assist
* 14: UDP checksum assist
*/

/* struct tx_desc represents each descriptor on the ring */
struct tx_desc {
u32 addr_hi;
u32 addr_lo;
u32 len_vlan; /* control words how to xmit the */
u32 flags; /* data (detailed above) */
};

/*
* The status of the Tx DMA engine it sits in free memory, and is pointed to
* by 0x101c / 0x1020. This is a DMA10 type
*/

/* TCB (Transmit Control Block: Host Side) */
struct tcb {
struct tcb *next; /* Next entry in ring */
u32 flags; /* Our flags for the packet */
u32 count; /* Used to spot stuck/lost packets */
u32 stale; /* Used to spot stuck/lost packets */
struct sk_buff *skb; /* Network skb we are tied to */
u32 index; /* Ring indexes */
u32 index_start;
};

/* Structure representing our local reference(s) to the ring */
struct tx_ring {
/* TCB (Transmit Control Block) memory and lists */
struct tcb *tcb_ring;

/* List of TCBs that are ready to be used */
struct tcb *tcb_qhead;
struct tcb *tcb_qtail;

/* list of TCBs that are currently being sent. NOTE that access to all
* three of these (including used) are controlled via the
* TCBSendQLock. This lock should be secured prior to incementing /
* decrementing used, or any queue manipulation on send_head /
* tail
*/
struct tcb *send_head;
struct tcb *send_tail;
int used;

/* The actual descriptor ring */
struct tx_desc *tx_desc_ring;
dma_addr_t tx_desc_ring_pa;

/* send_idx indicates where we last wrote to in the descriptor ring. */
u32 send_idx;

/* The location of the write-back status block */
u32 *tx_status;
dma_addr_t tx_status_pa;

/* Packets since the last IRQ: used for interrupt coalescing */
int since_irq;
};

/* ADAPTER defines */
/*
* Do not change these values: if changed, then change also in respective
Expand Down

0 comments on commit 5083226

Please sign in to comment.