All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Büsch" <mb@bu3sch.de>
To: b43-dev@lists.infradead.org
Subject: [PATCH] ssb: Clear RETRY_TIMEOUT in PCI Configuration
Date: Tue, 19 Oct 2010 23:04:31 +0200	[thread overview]
Message-ID: <1287522271.24543.4.camel@maggie> (raw)
In-Reply-To: <4cbddbab.aeEgjpVFDD9GDTuy%Larry.Finger@lwfinger.net> (sfid-20101019_195602_250035_FFFFFFFFB4BFE748)

On Tue, 2010-10-19 at 12:55 -0500, Larry Finger wrote: 
> MMIO log traces obtained using the Broadcom wl hybrid driver show that
> the RETRY_TIMEOUT register (0x41) in PCI configuration space is cleared
> if non-zero. Similar code found in other drivers such as ipw2100 show
> this operation is needed to keep PCI Tx retries from interfering with
> C3 CPU state. There are no known cases where omission of this code has
> caused a problem, but this patch is offered just in case such a situation
> occurs.
> 
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> 
> John,
> 
> No particular urgency for this patch.
> 
> Larry
> ---
> 
> Index: wireless-testing/drivers/ssb/driver_pcicore.c
> ===================================================================
> --- wireless-testing.orig/drivers/ssb/driver_pcicore.c
> +++ wireless-testing/drivers/ssb/driver_pcicore.c
> @@ -271,6 +271,7 @@ int ssb_pcicore_plat_dev_init(struct pci
>  static void ssb_pcicore_fixup_pcibridge(struct pci_dev *dev)
>  {
>  	u8 lat;
> +	u32 val;
>  
>  	if (dev->bus->ops != &ssb_pcicore_pciops) {
>  		/* This is not a device on the PCI-core bridge. */
> @@ -288,6 +289,12 @@ static void ssb_pcicore_fixup_pcibridge(
>  		return;
>  	}
>  
> +	/* Disable the RETRY_TIMEOUT register (0x41) to keep
> +	 * PCI Tx retries from interfering with C3 CPU state */
> +	pci_read_config_dword(pci_dev, 0x40, &val);
> +	if ((val & 0x0000ff00) != 0)
> +		pci_write_config_dword(pci_dev, 0x40, val & 0xffff00ff);
> +
>  	/* Enable PCI bridge BAR1 prefetch and burst */
>  	pci_write_config_dword(dev, SSB_BAR1_CONTROL, 3);


Hm, do you realize that this function will only be executed for PCI
devices that live on top of a native SSB bus? Is that intentional?

It won't affect normal broadcom wireless PCI devices.
It will only have an affect on a broadcom wireless PCI device that lives
behind a SSB->PCI bridge on an embedded device.

-- 
Greetings Michael.

  parent reply	other threads:[~2010-10-19 21:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19 17:55 [PATCH] ssb: Clear RETRY_TIMEOUT in PCI Configuration Larry Finger
2010-10-19 18:02 ` John W. Linville
2010-10-19 18:21   ` Larry Finger
2010-10-19 21:04 ` Michael Büsch [this message]
2010-11-09 23:09   ` Rafał Miłecki
2010-11-09 23:13     ` Michael Büsch
2010-11-10 17:37       ` John W. Linville
2010-11-10 21:52         ` Michael Büsch
2010-11-16 20:40           ` John W. Linville

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=1287522271.24543.4.camel@maggie \
    --to=mb@bu3sch.de \
    --cc=b43-dev@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.