lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <7a6b39e50904140210k6560b39qf88f4d7b2d24d7f1@mail.gmail.com>
Date:	Tue, 14 Apr 2009 17:10:30 +0800
From:	michael cui <michaelcui26@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: 8139too : IntrStatus changs 0x0000

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ