mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Csaba Henk <csaba@gluster.com>
Cc: Tejun Heo <tj@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] PCI: Handle case when no pci device can provide cache line size hint
Date: Wed, 16 Dec 2009 11:22:09 -0800	[thread overview]
Message-ID: <20091216112209.4468ee53@jbarnes-piketon> (raw)
In-Reply-To: <20091215122525.GA21846@foogalware.zresearch.com>

On Tue, 15 Dec 2009 17:55:25 +0530
Csaba Henk <csaba@gluster.com> wrote:

> Prior to this patch, if pci_read_config_byte(dev,
> PCI_CACHE_LINE_SIZE, ...) returns 0 for all dev, pci_cache_line_size
> ends up set to zero (instead of pci_dfl_cache_line_size).
> 
> This patch ensures the pci_cache_line_size = pci_dfl_cache_line_size
> setting in the above scenario.
> 
> This happens in case of a kvm-88 guest (where, consequently, the
> rtl8139 NIC failed to initialize).
> 
> Signed-off-by: Csaba Henk <csaba@gluster.com>
> ---
>  drivers/pci/quirks.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 7cfa7c3..f70f4e2 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -2629,7 +2629,7 @@ static int __init pci_apply_final_quirks(void)
>  	if (!pci_cache_line_size) {
>  		printk(KERN_DEBUG "PCI: CLS %u bytes, default %u\n",
>  		       cls << 2, pci_dfl_cache_line_size << 2);
> -		pci_cache_line_size = cls;
> +		pci_cache_line_size = cls ? cls :
> pci_dfl_cache_line_size; }
>  
>  	return 0;

Applied, thanks.

-- 
Jesse Barnes, Intel Open Source Technology Center

      parent reply	other threads:[~2009-12-16 19:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15 12:25 Csaba Henk
2009-12-16  1:48 ` Tejun Heo
2009-12-16 19:22 ` Jesse Barnes [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=20091216112209.4468ee53@jbarnes-piketon \
    --to=jbarnes@virtuousgeek.org \
    --cc=csaba@gluster.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /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®