lkml.org 
[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subject8139too : IntrStatus changs 0x0000
From
hi,
8139too.c :
static int rtl8139_poll(struct napi_struct *napi, int budget)
{
struct rtl8139_private *tp = container_of(napi, struct
rtl8139_private, napi);
struct net_device *dev = tp->dev;
void __iomem *ioaddr = tp->mmio_addr;
int work_done;
spin_lock(&tp->rx_lock);
work_done = 0;
if (likely(RTL_R16(IntrStatus) & RxAckBits))
work_done += rtl8139_rx(dev, tp, budget);
... ...
}
static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance)
{
status = RTL_R16 (IntrStatus);
... ...
if (status & RxAckBits){
if (netif_rx_schedule_prep(dev, &tp->napi)) {
RTL_W16_F (IntrMask, rtl8139_norx_intr_mask);
__netif_rx_schedule(dev, &tp->napi);
}
}

... ...
}
When rtl8139_interrupt() was happened, the IntrStatus was 0x0001 .
Next,rtl8139_poll was invoked . But RTL_R16(IntrStatus) changed
0x0000 .
Why? I did not do like this : RTL_W16(IntrStatus,0).

So,
static int rtl8139_poll(struct napi_struct *napi, int budget)
{
struct rtl8139_private *tp = container_of(napi, struct
rtl8139_private, napi);
struct net_device *dev = tp->dev;
void __iomem *ioaddr = tp->mmio_addr;
int work_done;
spin_lock(&tp->rx_lock);
work_done = 0;
--- if (likely(RTL_R16(IntrStatus) & RxAckBits))
work_done += rtl8139_rx(dev, tp, budget);
... ...
}

Is it right? thanks


\
 
 \ /
  Last update: 2009-04-14 11:13    [W:0.031 / U:3.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site