Lines 345-350
Link Here
|
345 |
void __iomem *dingo_ccr; /* only used for CEM56 cards */ |
345 |
void __iomem *dingo_ccr; /* only used for CEM56 cards */ |
346 |
unsigned last_ptr_value; /* last packets transmitted value */ |
346 |
unsigned last_ptr_value; /* last packets transmitted value */ |
347 |
const char *manf_str; |
347 |
const char *manf_str; |
|
|
348 |
struct work_struct tx_timeout_task; |
348 |
} local_info_t; |
349 |
} local_info_t; |
349 |
|
350 |
|
350 |
/**************** |
351 |
/**************** |
Lines 542-547
Link Here
|
542 |
|
543 |
|
543 |
/*============= Main bulk of functions =========================*/ |
544 |
/*============= Main bulk of functions =========================*/ |
544 |
|
545 |
|
|
|
546 |
#ifdef HAVE_TX_TIMEOUT |
547 |
static void xirc2ps_tx_timeout_task(void *data); |
548 |
#endif |
545 |
/**************** |
549 |
/**************** |
546 |
* xirc2ps_attach() creates an "instance" of the driver, allocating |
550 |
* xirc2ps_attach() creates an "instance" of the driver, allocating |
547 |
* local data structures for one device. The device is registered |
551 |
* local data structures for one device. The device is registered |
Lines 589-594
Link Here
|
589 |
#ifdef HAVE_TX_TIMEOUT |
593 |
#ifdef HAVE_TX_TIMEOUT |
590 |
dev->tx_timeout = do_tx_timeout; |
594 |
dev->tx_timeout = do_tx_timeout; |
591 |
dev->watchdog_timeo = TX_TIMEOUT; |
595 |
dev->watchdog_timeo = TX_TIMEOUT; |
|
|
596 |
INIT_WORK(&local->tx_timeout_task, xirc2ps_tx_timeout_task, dev); |
592 |
#endif |
597 |
#endif |
593 |
|
598 |
|
594 |
return xirc2ps_config(link); |
599 |
return xirc2ps_config(link); |
Lines 1340-1349
Link Here
|
1340 |
|
1345 |
|
1341 |
/*====================================================================*/ |
1346 |
/*====================================================================*/ |
1342 |
|
1347 |
|
|
|
1348 |
#ifdef HAVE_TX_TIMEOUT |
1349 |
static void |
1350 |
xirc2ps_tx_timeout_task(void *data) |
1351 |
{ |
1352 |
struct net_device *dev = data; |
1353 |
local_info_t *lp = netdev_priv(dev); |
1354 |
printk(KERN_NOTICE "%s: transmit timed out\n", dev->name); |
1355 |
lp->stats.tx_errors++; |
1356 |
/* reset the card */ |
1357 |
do_reset(dev,1); |
1358 |
dev->trans_start = jiffies; |
1359 |
netif_wake_queue(dev); |
1360 |
} |
1343 |
static void |
1361 |
static void |
1344 |
do_tx_timeout(struct net_device *dev) |
1362 |
do_tx_timeout(struct net_device *dev) |
1345 |
{ |
1363 |
{ |
1346 |
local_info_t *lp = netdev_priv(dev); |
1364 |
local_info_t *lp = netdev_priv(dev); |
|
|
1365 |
schedule_work(&lp->tx_timeout_task); |
1366 |
} |
1367 |
#else |
1368 |
do_tx_timeout(struct net_device *dev) |
1369 |
{ |
1370 |
local_info_t *lp = netdev_priv(dev); |
1347 |
printk(KERN_NOTICE "%s: transmit timed out\n", dev->name); |
1371 |
printk(KERN_NOTICE "%s: transmit timed out\n", dev->name); |
1348 |
lp->stats.tx_errors++; |
1372 |
lp->stats.tx_errors++; |
1349 |
/* reset the card */ |
1373 |
/* reset the card */ |
Lines 1351-1356
Link Here
|
1351 |
dev->trans_start = jiffies; |
1375 |
dev->trans_start = jiffies; |
1352 |
netif_wake_queue(dev); |
1376 |
netif_wake_queue(dev); |
1353 |
} |
1377 |
} |
|
|
1378 |
#endif |
1354 |
|
1379 |
|
1355 |
static int |
1380 |
static int |
1356 |
do_start_xmit(struct sk_buff *skb, struct net_device *dev) |
1381 |
do_start_xmit(struct sk_buff *skb, struct net_device *dev) |