On 05/16/2018, 03:29 PM, Jiri Slaby wrote: > On 05/16/2018, 02:07 PM, Hayes Wang wrote: >> Oliver Neukum [mailto:oneu...@suse.com] >>> Sent: Wednesday, May 16, 2018 6:10 PM >> [...] >>>> Besides, I find a similar issue as following. >>>> https://www.spinics.net/lists/netdev/msg493512.html >>> >>> Well, if we have an imbalance in NAPI it should strike whereever >>> it is used, not just in suspend(). Is there debugging for NAPI >>> we could activate? >> >> No. The driver doesn't embed such debugging about it. > > Despite of that, Oliver, I have a kernel with a debug patch (attached) > at (suse-only link): > https://build.suse.de/project/show/home:jirislaby:stable-drm > >> And I don't find an imbalance between napi_disable() and napi_enable(). > > There is none, apparently (the warns never triggered). BUt still the > driver sucks wrt both power mgmt and dock plug/unplug. Since I am using > the patch (it upper-bounds the napi_disable loop count) and the udev > rule below, I can really use the nic.
BTW the added warning to napi_disable indeed triggers: > xzgrep -a -B 2 kernel:.*WARNING.*napi messages-20180* > messages-20180503.xz:2018-04-27T09:57:00.048922+02:00 anemoi2 kernel: > [158616.363052] ------------[ cut here ]------------ > messages-20180503.xz:2018-04-27T09:57:00.048979+02:00 anemoi2 kernel: > [158616.363070] NAPI_STATE_SCHED never cleared > messages-20180503.xz:2018-04-27T09:57:00.048988+02:00 anemoi2 kernel: > [158616.363120] WARNING: CPU: 1 PID: 14365 at ../net/core/dev.c:5665 > napi_disable+0x3d/0x80 And since I do 'ip l set dev ethX down' before unplugging the dock with the NIC, I have not seen a single occurrence. So I assume it must be a problem of making usb->disconnect without prior ndo->close (or alike). thanks, -- js suse labs