From: Francois Romieu <romieu@fr.zoreil.com>
To: Corinna Vinschen <vinschen@redhat.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
pomidorabelisima@gmail.com,
Konrad Rzeszutek Wilk <konrad@kernel.org>,
linux-kernel@vger.kernel.org, nic_swsd@realtek.com
Subject: Re: [PATCH v2] r8169: Fix sleeping function called during get_stats64
Date: Thu, 10 Sep 2015 00:28:24 +0200 [thread overview]
Message-ID: <20150909222824.GA21326@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <1441833400-2677-1-git-send-email-vinschen@redhat.com>
Corinna Vinschen <vinschen@redhat.com> :
[...]
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 24dcbe6..ffffc12 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -833,7 +833,8 @@ struct rtl8169_private {
> unsigned features;
>
> struct mii_if_info mii;
> - struct rtl8169_counters counters;
> + dma_addr_t CntPhysAddr;
> + struct rtl8169_counters *CntArray;
I'd rather see less camel case than more.
[...]
> @@ -2245,32 +2230,13 @@ static bool rtl8169_reset_counters(struct net_device *dev)
> if (tp->mac_version < RTL_GIGA_MAC_VER_19)
> return true;
>
> - counters = rtl8169_map_counters(dev, &paddr, CounterReset);
> - if (!counters)
> - return false;
> -
> - if (!rtl_udelay_loop_wait_low(tp, &rtl_reset_counters_cond, 10, 1000))
> - ret = false;
> -
> - rtl8169_unmap_counters(dev, paddr, counters);
> -
> - return ret;
> -}
> -
> -DECLARE_RTL_COND(rtl_counters_cond)
> -{
> - void __iomem *ioaddr = tp->mmio_addr;
> -
> - return RTL_R32(CounterAddrLow) & CounterDump;
> + return rtl8169_do_counters(dev, CounterReset);
spaces instead of tab.
[...]
> @@ -8483,7 +8451,10 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
> out:
> return rc;
>
> -err_out_msi_4:
> +err_out_msi_5:
> + dma_free_coherent(&pdev->dev, sizeof(*tp->CntArray), tp->CntArray,
> + tp->CntPhysAddr);
> +err_out_cnt_4:
> netif_napi_del(&tp->napi);
These labels are supposed to suggest what should be done.
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Tested on 8168b (RTL_GIGA_MAC_VER_17).
--
Ueimor
next prev parent reply other threads:[~2015-09-09 22:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 21:16 Corinna Vinschen
2015-09-09 22:28 ` Francois Romieu [this message]
2015-09-10 3:31 ` David Miller
2015-09-10 8:35 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150909222824.GA21326@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=davem@davemloft.net \
--cc=konrad@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=pomidorabelisima@gmail.com \
--cc=vinschen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®