All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: "Saul St. John" <saul.stjohn@gmail.com>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [RFC] use alternate SPROM offset for 43224
Date: Tue, 14 Feb 2012 16:04:30 -0600	[thread overview]
Message-ID: <4F3ADA6E.4050301@lwfinger.net> (raw)
In-Reply-To: <4F3AC20E.8080502@hauke-m.de>

On 02/14/2012 02:20 PM, Hauke Mehrtens wrote:
>> >  I think it is more complicated than the above. On my 43224, I get the
>> >  message "No SPROM available", which arises because bcma_sprom_get() is
>> >  returning -ENOENT. The reason is that the value tested in "if
>> >  (!(sromctrl&  BCMA_CC_SROM_CONTROL_PRESENT))" is zero. The contents of
>> >  sromctl are 0x12, and the mask is 1.
> This check is the main part of ai_is_sprom_available() in brcmsmac. If
> this check fails, like in your case, brcmsmac tries otp_read_pci() to
> read out the sprom, which is not implemented in bcma.

I will try implementing a similar routine in bcma.

>> >  I am still investigating. When I comment out the test of sromctl, then
>> >  the driver seems to find the SPROM at offset 0x830, but neither b43 nor
>> >  brcmsmac works.
> Where did you get the 0x830 from and for which devices do you get a
> correct sprom at that position?

I don't know that I found a correct SPROM at that location. As I said, the 
device does not work. All I know is that the following fragment did not report 
an error. When the offset is 0x800, err is -71.

         /* Try to get SPROM */
         err = bcma_sprom_get(bus);
         if (err == -ENOENT) {
                 pr_err("No SPROM available\n");
         } else if (err)
                 pr_err("Failed to get SPROM: %d\n", err);

The chip is reported by lspci as "Network controller [0280]: Broadcom 
Corporation BCM43224 802.11a/b/g/n [14e4:4353] (rev 01)"

>From bcma, the core info is

bcma: Found chip with id 0xA8D8, rev 0x01 and package 0x08
bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
bcma: Found rev 6 PMU (capabilities 0x108C2606)
bcma: bus->drv_cc.capabilities 0x58500000
bcma: sromctrl 0x12
bcma: SPROM offset 0x830

That offset comes from

         offset = bus->chipinfo.id == (0x4331 || bus->chipinfo.id == 43224) ?
                         BCMA_CC_SPROM : BCMA_CC_SPROM_PCIE6;

which includes the trial patch from the initial posting in this thread.



  reply	other threads:[~2012-02-14 22:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14  4:01 [RFC] use alternate SPROM offset for 43224 Saul St. John
2012-02-14 10:07 ` Arend Van Spriel
2012-02-14 13:35   ` Rafał Miłecki
2012-02-14 13:34 ` Rafał Miłecki
2012-02-14 16:22   ` Saul St. John
2012-02-14 17:29     ` Rafał Miłecki
2012-02-14 18:33       ` Hauke Mehrtens
2012-02-14 18:52       ` Saul St. John
2012-02-14 20:10         ` Larry Finger
2012-02-14 20:20           ` Hauke Mehrtens
2012-02-14 22:04             ` Larry Finger [this message]
2012-02-14 22:39               ` Arend Van Spriel
2012-02-19 15:37                 ` Hauke Mehrtens
2012-02-20  9:20                   ` Arend van Spriel

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=4F3ADA6E.4050301@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=hauke@hauke-m.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=saul.stjohn@gmail.com \
    --cc=zajec5@gmail.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 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.