aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mv643xx_eth.h
diff options
context:
space:
mode:
authorDale Farnsworth <dale@farnsworth.org>2006-03-03 12:02:05 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-03 12:12:36 -0500
commitc8aaea25e0b069e9572caa74f984e109899c1765 (patch)
treec0569ce4abd5c0b23ffbf44a4ee78dda8b6244cb /drivers/net/mv643xx_eth.h
parentcd6478c8aed9b2001dfff067fa66b7492a0a2ffa (diff)
[PATCH] mv643xx_eth: Refactor tx command queuing code
Simplify and remove redundant code for filling transmit descriptors. No changes in features; it's just a code reorganization/cleanup. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/mv643xx_eth.h')
-rw-r--r--drivers/net/mv643xx_eth.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/net/mv643xx_eth.h b/drivers/net/mv643xx_eth.h
index a553054e8da7..8768e1ba45df 100644
--- a/drivers/net/mv643xx_eth.h
+++ b/drivers/net/mv643xx_eth.h
@@ -330,7 +330,6 @@ struct mv643xx_private {
330 u32 tx_sram_size; /* Size of tx sram area */ 330 u32 tx_sram_size; /* Size of tx sram area */
331 331
332 int rx_resource_err; /* Rx ring resource error flag */ 332 int rx_resource_err; /* Rx ring resource error flag */
333 int tx_resource_err; /* Tx ring resource error flag */
334 333
335 /* Tx/Rx rings managment indexes fields. For driver use */ 334 /* Tx/Rx rings managment indexes fields. For driver use */
336 335
@@ -339,10 +338,6 @@ struct mv643xx_private {
339 338
340 /* Next available and first returning Tx resource */ 339 /* Next available and first returning Tx resource */
341 int tx_curr_desc_q, tx_used_desc_q; 340 int tx_curr_desc_q, tx_used_desc_q;
342#ifdef MV643XX_CHECKSUM_OFFLOAD_TX
343 int tx_first_desc_q;
344 u32 tx_first_command;
345#endif
346 341
347#ifdef MV643XX_TX_FAST_REFILL 342#ifdef MV643XX_TX_FAST_REFILL
348 u32 tx_clean_threshold; 343 u32 tx_clean_threshold;
@@ -350,12 +345,12 @@ struct mv643xx_private {
350 345
351 struct eth_rx_desc *p_rx_desc_area; 346 struct eth_rx_desc *p_rx_desc_area;
352 dma_addr_t rx_desc_dma; 347 dma_addr_t rx_desc_dma;
353 unsigned int rx_desc_area_size; 348 int rx_desc_area_size;
354 struct sk_buff **rx_skb; 349 struct sk_buff **rx_skb;
355 350
356 struct eth_tx_desc *p_tx_desc_area; 351 struct eth_tx_desc *p_tx_desc_area;
357 dma_addr_t tx_desc_dma; 352 dma_addr_t tx_desc_dma;
358 unsigned int tx_desc_area_size; 353 int tx_desc_area_size;
359 struct sk_buff **tx_skb; 354 struct sk_buff **tx_skb;
360 355
361 struct work_struct tx_timeout_task; 356 struct work_struct tx_timeout_task;
@@ -367,13 +362,13 @@ struct mv643xx_private {
367 struct mv643xx_mib_counters mib_counters; 362 struct mv643xx_mib_counters mib_counters;
368 spinlock_t lock; 363 spinlock_t lock;
369 /* Size of Tx Ring per queue */ 364 /* Size of Tx Ring per queue */
370 unsigned int tx_ring_size; 365 int tx_ring_size;
371 /* Number of tx descriptors in use */ 366 /* Number of tx descriptors in use */
372 unsigned int tx_desc_count; 367 int tx_desc_count;
373 /* Size of Rx Ring per queue */ 368 /* Size of Rx Ring per queue */
374 unsigned int rx_ring_size; 369 int rx_ring_size;
375 /* Number of rx descriptors in use */ 370 /* Number of rx descriptors in use */
376 unsigned int rx_desc_count; 371 int rx_desc_count;
377 372
378 /* 373 /*
379 * rx_task used to fill RX ring out of bottom half context 374 * rx_task used to fill RX ring out of bottom half context
@@ -416,8 +411,6 @@ static void eth_port_read_smi_reg(unsigned int eth_port_num,
416static void eth_clear_mib_counters(unsigned int eth_port_num); 411static void eth_clear_mib_counters(unsigned int eth_port_num);
417 412
418/* Port data flow control routines */ 413/* Port data flow control routines */
419static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
420 struct pkt_info *p_pkt_info);
421static ETH_FUNC_RET_STATUS eth_tx_return_desc(struct mv643xx_private *mp, 414static ETH_FUNC_RET_STATUS eth_tx_return_desc(struct mv643xx_private *mp,
422 struct pkt_info *p_pkt_info); 415 struct pkt_info *p_pkt_info);
423static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp, 416static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp,