Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33521
b: refs/heads/master
c: 9a469ab
h: refs/heads/master
i:
  33519: c897025
v: v3
  • Loading branch information
Joerg Ahrens authored and Jeff Garzik committed Aug 24, 2006
1 parent c32f8f9 commit bdd5959
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 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: cb958186ed543d1a4f074ceb1c783fe8b0908437
refs/heads/master: 9a469abe9c6bab3ce237ee433541931bbd827faf
18 changes: 14 additions & 4 deletions trunk/drivers/net/pcmcia/xirc2ps_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,15 @@ typedef struct local_info_t {
void __iomem *dingo_ccr; /* only used for CEM56 cards */
unsigned last_ptr_value; /* last packets transmitted value */
const char *manf_str;
struct work_struct tx_timeout_task;
} local_info_t;

/****************
* Some more prototypes
*/
static int do_start_xmit(struct sk_buff *skb, struct net_device *dev);
static void do_tx_timeout(struct net_device *dev);
static void xirc2ps_tx_timeout_task(void *data);
static struct net_device_stats *do_get_stats(struct net_device *dev);
static void set_addresses(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
Expand Down Expand Up @@ -589,6 +591,7 @@ xirc2ps_probe(struct pcmcia_device *link)
#ifdef HAVE_TX_TIMEOUT
dev->tx_timeout = do_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT;
INIT_WORK(&local->tx_timeout_task, xirc2ps_tx_timeout_task, dev);
#endif

return xirc2ps_config(link);
Expand Down Expand Up @@ -1341,17 +1344,24 @@ xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs)
/*====================================================================*/

static void
do_tx_timeout(struct net_device *dev)
xirc2ps_tx_timeout_task(void *data)
{
local_info_t *lp = netdev_priv(dev);
printk(KERN_NOTICE "%s: transmit timed out\n", dev->name);
lp->stats.tx_errors++;
struct net_device *dev = data;
/* reset the card */
do_reset(dev,1);
dev->trans_start = jiffies;
netif_wake_queue(dev);
}

static void
do_tx_timeout(struct net_device *dev)
{
local_info_t *lp = netdev_priv(dev);
lp->stats.tx_errors++;
printk(KERN_NOTICE "%s: transmit timed out\n", dev->name);
schedule_work(&lp->tx_timeout_task);
}

static int
do_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
Expand Down

0 comments on commit bdd5959

Please sign in to comment.