lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Jan 2012 19:53:16 -0600
From:	Larry Finger <Larry.Finger@...inger.net>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	Arend van Spriel <arend@...adcom.com>,
	Alwin Beukers <alwin@...adcom.com>,
	Roland Vossen <rvossen@...adcom.com>,
	"John W. Linville" <linville@...driver.com>,
	Network Development <netdev@...r.kernel.org>,
	"Franky (Zhenhui) Lin" <frankyl@...adcom.com>,
	Rafał Miłecki <zajec5@...il.com>
Subject: Re: brcm80211 breakage..

On 01/12/2012 01:00 PM, Linus Torvalds wrote:
> On Wed, Jan 11, 2012 at 11:13 PM, Linus Torvalds
> <torvalds@...ux-foundation.org>  wrote:
>>
>> All the BCMA changes make the revert somewhat non-trivial, could
>> somebody who knows the code better please try to do it for me? It
>> doesn't look complicated, and I can try to do it myself tomorrow if
>> nobody else steps up, but I'd *really* prefer the guilty parties
>> themselves to do it, ok?
>
> Since I had the hardware to test, I could work on this and try to
> figure out exactly what went wrong in that commit.
>
> The problem seems to be simple: the SPROM contents *have* to be read
> as aligned 16-bit words. Anything else seems to return 0xff and just
> fails the transaction.
>
> I didn't check all the combinations, of course, so who knows what the
> exact details are, but it does look like the sprom has very limited
> pci decode and simply refuses to touch anything but the one case it
> can handle.
>
> I'll send out a patch that seems to get things to a working state for
> me. At least I have wireless connectivity again, I don't know if there
> are some other problems remaining.

As my device has both SPROM and OTP, I hacked on it to get it to use the SPROM 
rather than the default OTP.

I learned that reading by byte on my HP laptop fails the same was as did the 
MacBook - it is not an Apple artifact.

Note, the patch that worked for me is as follows:

Index: linux-2.6/drivers/net/wireless/brcm80211/brcmsmac/srom.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/brcm80211/brcmsmac/srom.c
+++ linux-2.6/drivers/net/wireless/brcm80211/brcmsmac/srom.c
@@ -786,9 +786,12 @@ sprom_read_pci(struct si_pub *sih, u16 *
  		sprom_offset = CHIPCREGOFFS(sromotp);
  	}

-	/* read the sprom in bytes */
-	for (i = 0; i < nbytes; i++)
-		bbuf[i] = bcma_read8(core, sprom_offset+i);
+	/* read the sprom - this operation must be done by words */
+	for (i = 0; i < nbytes; i += 2) {
+		u16 data = bcma_read16(core, sprom_offset+i);
+		bbuf[i] = data & 0xff;
+		bbuf[i+1] = (data >> 8) & 0xff;
+	}

  	if (buf[0] == 0xffff)
  		/*


Larry
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ