lkml.org 
[lkml]   [2000]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdev->tx_timeout not being called in 2.3.4[345]

Hello,

After changing the Cyclades-PC300 driver in order to be softnet-compliant,
everything works fine, except for the timeout function.

In order to simulate the timeout, I configure the board to external clock
and don't provide any external clock. In the previous (non-softnet)
driver, I get the timeout warning, however in the new one, the
dev->tx_timeout is never called!!

Below there are some excerpts of the PC300 driver src code related to the
timeout call:

void cpc_tx_timeout(struct net_device *dev)
{
<variable initialization>

stats->tx_errors++;
stats->tx_aborted_errors++;
printk("%s: transmit timed out, restarting channel.\n", dev->name);
CPC_LOCK(card, flags);
tx_dma_stop(card, ch);
if (d->tx_skb) {
dev_kfree_skb(d->tx_skb);
d->tx_skb = NULL;
}
dev->trans_start = jiffies;
netif_wake_queue(dev);
CPC_UNLOCK(card, flags);
}

int cpc_queue_xmit(struct sk_buff *skb, struct net_device *dev)
{
<variable initialization>

/* Write buffer to DMA buffers */
if(dma_buf_write(card, ch, (ucchar *)skb->data, skb->len) != 0) {
netif_wake_queue(dev);
stats->tx_dropped++;
return 1;
}

d->tx_skb = skb;
dev->trans_start = jiffies;

/* Start transmission */
CPC_LOCK(card, flags);
tx_dma_start(card, ch);
CPC_UNLOCK(card, flags);

return 0;
}

static void
cpc_intr(int irq, void *dev_id, struct pt_regs *regs)
{
<variable initialization>

<reality check (is this my interrupt, etc.)>

while ((status = cpc_readl(scabase + ISR0)) != 0) {
for (ch = 0 ; ch < card->hw.nchan ; ch++) {
<variable initialization>

/**** Transmission ****/
if (status & (IR0_DTX(IR0_DMIA, ch)|
IR0_DTX(IR0_DMIB, ch))) {
ucchar dtx_stat = cpc_readb(scabase + DSR_TX(ch));

/* Clear TX interrupts */
cpc_writeb(scabase + DSR_TX(ch), dtx_stat | DSR_DWE);

if (status & IR0_DTX(IR0_DMIA, ch)) {
if (dtx_stat & DSR_BOF) {
tx_dma_stop(card, ch);
}
}
if (status & IR0_DTX(IR0_DMIB, ch)) {
if (dtx_stat & (DSR_EOM | DSR_EOT)) {
if (d->tx_skb) {
struct sk_buff *skb = d->tx_skb;

dev_kfree_skb_irq(skb);
d->tx_skb = NULL;
d->stats.tx_bytes += skb->len;
d->stats.tx_packets++;
netif_wake_queue(dev);
}
}
}
}
}
}
}

In cpc_init():

dev->tx_timeout = &cpc_tx_timeout;
dev->watchdog_timeo = PC300_TX_TIMEOUT;

( PC300_TX_TIMEOUT = (2*HZ) )

Would you have any hints on why the dev->tx_timeout function is not being
called when it should?? If positive, I'd really appreciate it if you could
let me know your suggestions.

Thanks in advance.

Regards,
Ivan


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.074 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site