aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip/tulip.h
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2006-09-08 14:15:38 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-11 09:05:37 -0400
commit0bb3cf726b37c13abce9f9134a68b94aa10e8803 (patch)
tree52a1fe8fdd08bdc088c1fb95957ecf5e698b8def /drivers/net/tulip/tulip.h
parent40c0d87948ab635e814f45664259d4cc193651a1 (diff)
[PATCH] Defer tulip_select_media() to process context
Move tulip_select_media() processing to a workqueue, instead of delaying in interrupt context, edited by Kyle McMartin to use kevent thread, instead of creating its own workqueue. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Valerie Henson <val_henson@linux.intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/tulip/tulip.h')
-rw-r--r--drivers/net/tulip/tulip.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/tulip/tulip.h b/drivers/net/tulip/tulip.h
index 3bcfbf3d23e..64d443a80d8 100644
--- a/drivers/net/tulip/tulip.h
+++ b/drivers/net/tulip/tulip.h
@@ -44,7 +44,8 @@ struct tulip_chip_table {
44 int io_size; 44 int io_size;
45 int valid_intrs; /* CSR7 interrupt enable settings */ 45 int valid_intrs; /* CSR7 interrupt enable settings */
46 int flags; 46 int flags;
47 void (*media_timer) (unsigned long data); 47 void (*media_timer) (unsigned long);
48 void (*media_task) (void *);
48}; 49};
49 50
50 51
@@ -366,6 +367,7 @@ struct tulip_private {
366 unsigned int medialock:1; /* Don't sense media type. */ 367 unsigned int medialock:1; /* Don't sense media type. */
367 unsigned int mediasense:1; /* Media sensing in progress. */ 368 unsigned int mediasense:1; /* Media sensing in progress. */
368 unsigned int nway:1, nwayset:1; /* 21143 internal NWay. */ 369 unsigned int nway:1, nwayset:1; /* 21143 internal NWay. */
370 unsigned int timeout_recovery:1;
369 unsigned int csr0; /* CSR0 setting. */ 371 unsigned int csr0; /* CSR0 setting. */
370 unsigned int csr6; /* Current CSR6 control settings. */ 372 unsigned int csr6; /* Current CSR6 control settings. */
371 unsigned char eeprom[EEPROM_SIZE]; /* Serial EEPROM contents. */ 373 unsigned char eeprom[EEPROM_SIZE]; /* Serial EEPROM contents. */
@@ -384,6 +386,7 @@ struct tulip_private {
384 void __iomem *base_addr; 386 void __iomem *base_addr;
385 int csr12_shadow; 387 int csr12_shadow;
386 int pad0; /* Used for 8-byte alignment */ 388 int pad0; /* Used for 8-byte alignment */
389 struct work_struct media_work;
387}; 390};
388 391
389 392
@@ -398,7 +401,7 @@ struct eeprom_fixup {
398 401
399/* 21142.c */ 402/* 21142.c */
400extern u16 t21142_csr14[]; 403extern u16 t21142_csr14[];
401void t21142_timer(unsigned long data); 404void t21142_media_task(void *data);
402void t21142_start_nway(struct net_device *dev); 405void t21142_start_nway(struct net_device *dev);
403void t21142_lnk_change(struct net_device *dev, int csr5); 406void t21142_lnk_change(struct net_device *dev, int csr5);
404 407
@@ -436,7 +439,7 @@ void pnic_lnk_change(struct net_device *dev, int csr5);
436void pnic_timer(unsigned long data); 439void pnic_timer(unsigned long data);
437 440
438/* timer.c */ 441/* timer.c */
439void tulip_timer(unsigned long data); 442void tulip_media_task(void *data);
440void mxic_timer(unsigned long data); 443void mxic_timer(unsigned long data);
441void comet_timer(unsigned long data); 444void comet_timer(unsigned long data);
442 445
@@ -485,4 +488,14 @@ static inline void tulip_restart_rxtx(struct tulip_private *tp)
485 tulip_start_rxtx(tp); 488 tulip_start_rxtx(tp);
486} 489}
487 490
491static inline void tulip_tx_timeout_complete(struct tulip_private *tp, void __iomem *ioaddr)
492{
493 /* Stop and restart the chip's Tx processes. */
494 tulip_restart_rxtx(tp);
495 /* Trigger an immediate transmit demand. */
496 iowrite32(0, ioaddr + CSR1);
497
498 tp->stats.tx_errors++;
499}
500
488#endif /* __NET_TULIP_H__ */ 501#endif /* __NET_TULIP_H__ */