[lkml]   [2010]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] usb: gadget: rndis: don't use dev_get_stats()
    > From: Michal Nazarewicz <>
    >> This commit removes the call to dev_get_stats() from the
    >> gen_ndis_query_resp() function. Since spin_lock_bh() was
    >> added to dev_txq_stats_fold() the call started causing
    >> warnings. This is because gen_ndis_query_resp() can be
    >> (indirectly) called from rndis_command_complete() which is
    >> called with interrupts disabled.

    On Mon, 20 Sep 2010 20:27:27 +0200, David Miller <> wrote:
    > The way this works is dev_get_stats() takes that "temp" object the
    > caller provides, it writes the correct statistics into it (with any
    > necessary translations), and then passes back a pointer to it.
    > See net/core/dev.c:dev_get_stats()
    > You must use dev_get_stats() or else the statistics won't be properly
    > converted.

    I'm only wondering whether it's required for RNDIS to use dev_get_stats().
    I haven't found reference to netdev_queue in g_ether related code and
    I noticed that u_ether.c seems to update dev->stats directly.

    Best regards, _ _
    | Humble Liege of Serenely Enlightened Majesty of o' \,=./ `o
    | Computer Science, Michał "mina86" Nazarewicz (o o)
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2010-09-20 20:59    [W:0.020 / U:19.904 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site