netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>,
	David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] r8169: improve interrupt handling
Date: Sat, 24 Feb 2018 16:29:48 +0100	[thread overview]
Message-ID: <6cb93d14-0f6d-78b1-8373-33b1d138380f@gmail.com> (raw)
In-Reply-To: <20180224013524.GA6510@electric-eye.fr.zoreil.com>

Am 24.02.2018 um 02:35 schrieb Francois Romieu:
> Heiner Kallweit <hkallweit1@gmail.com> :
> [...]
>> Last but not least it enables a feature which was (I presume accidently)
>> disabled before. There are members of the RTL8169 family supporting MSI
>> (e.g. RTL8169SB), however MSI never got enabled because RTL_CFG_0 was
>> missing flag RTL_FEATURE_MSI.
>> An indicator for "accidently" is that statement "cfg2 |= MSIEnable;"
> 
> The reality is more simple: it could had been removed.
> 
>> in rtl_try_msi() is dead code. cfg2 is used for chip versions <= 06
>> only and for all these chip versions RTL_FEATURE_MSI isn't set.
> 
> On purpose:
> 1. mostly untested
> 2. MSI without MSI-X does not buy much
> 3. wrt 2., ok, it kills (yucky) plain old shared PCI irq (remember those ?)
>    but I didn't end feeling that good about realtek MSI support on older
>    chipsets to enable it any further
> 
Good to know, thanks for the feedback.
Then I'll change the patch to leave MSI disabled on old PCI chips.
Plus addressing your last comment.


> [...]
>> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
>> index 96db3283e..4730db990 100644
>> --- a/drivers/net/ethernet/realtek/r8169.c
>> +++ b/drivers/net/ethernet/realtek/r8169.c
> [...]
>> -static unsigned rtl_try_msi(struct rtl8169_private *tp,
>> -			    const struct rtl_cfg_info *cfg)
>> +static void rtl_alloc_irq(struct rtl8169_private *tp)
>>  {
> [...]
>> +	ret = pci_alloc_irq_vectors(tp->pci_dev, 1, 1, PCI_IRQ_ALL_TYPES);
>> +	if (ret < 0) {
>> +		netif_err(tp, drv, tp->dev, "failed to allocate irq!\n");
>> +		return;
> [...]
>> @@ -8497,9 +8495,7 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>>  	chipset = tp->mac_version;
>>  	tp->txd_version = rtl_chip_infos[chipset].txd_version;
>>  
>> -	RTL_W8(Cfg9346, Cfg9346_Unlock);
>> -	tp->features |= rtl_try_msi(tp, cfg);
>> -	RTL_W8(Cfg9346, Cfg9346_Lock);
>> +	rtl_alloc_irq(tp);
> 
> Happily proceeding after error. :o/
> 

      reply	other threads:[~2018-02-24 15:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 21:32 [PATCH net-next] r8169: improve interrupt handling Heiner Kallweit
2018-02-24  1:35 ` Francois Romieu
2018-02-24 15:29   ` Heiner Kallweit [this message]

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=6cb93d14-0f6d-78b1-8373-33b1d138380f@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=romieu@fr.zoreil.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;
as well as URLs for NNTP newsgroup(s).