[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150908080900.GG20288@calimero.vinschen.de>
Date: Tue, 8 Sep 2015 10:09:00 +0200
From: Corinna Vinschen <vinschen@...hat.com>
To: Francois Romieu <romieu@...zoreil.com>
Cc: netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
pomidorabelisima@...il.com
Subject: Re: [PATCH net 3/3] r8169: increase the lifespan of the hardware
counters dump area.
On Sep 7 23:52, Francois Romieu wrote:
> Corinna Vinschen <vinschen@...hat.com> :
> [...]
> > I have a bit of a problem with this patch. It crashes when loading the
> > driver manually w/ modprobe. For some reason dev_get_stats is called
> > during rtl_init_one and at that time the counters pointer is NULL, so
> > the kernel gets a SEGV.
> >
> > After I worked around that I got a SEGV in
> > rtl_remove_one, which I still have to find out why. I didn't test with
> > the latest kernel, though, so I still have to check if that's the reason
> > for the crashes. That takes a bit longer, I just wanted to let you
> > know.
>
> Call me stupid: I forgot that it's perfectly fine to request the stats
> of a down interface. :o/
>
> Updated patch is on the way.
>
> > There's also a problem with rtl8169_cmd_counters: It always calls
> > rtl_udelay_loop_wait_low w/ rtl_reset_counters_cond, even when called
> > from rtl8169_update_counters, where it should call
> > rtl_udelay_loop_wait_low w/ rtl_counters_cond to check for the
> > CounterDump flag, rather than for the CounterReset flag.
> >
> > For now I applied the below patch, but I think it's a bit ugly to
> > conditionalize the rtl_cond struct by the incoming flag value.
>
> <captain obvious>
>
> Let's check both at once:
>
> return RTL_R32(CounterAddrLow) & (CounterDump | CounterReset);
If you're sure that's valid, then why not? It's certainly cleaner
code.
Corinna
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists