Return-path: Received: from mail-qw0-f46.google.com ([209.85.216.46]:52922 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756024Ab0HPTQy (ORCPT ); Mon, 16 Aug 2010 15:16:54 -0400 Received: by qwh6 with SMTP id 6so5282584qwh.19 for ; Mon, 16 Aug 2010 12:16:53 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4C698C19.5010902@lwfinger.net> References: <4C698C19.5010902@lwfinger.net> From: =?ISO-8859-1?Q?G=E1bor_Stefanik?= Date: Mon, 16 Aug 2010 21:16:33 +0200 Message-ID: Subject: Re: [RFT] BCM4312 users with DMA errors, please test! To: Larry Finger Cc: b43-dev , linux-wireless Content-Type: multipart/mixed; boundary=0015175cb580d9f698048df5ac17 Sender: linux-wireless-owner@vger.kernel.org List-ID: --0015175cb580d9f698048df5ac17 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 2010/8/16 Larry Finger : > On 08/16/2010 12:59 PM, G=E1bor Stefanik wrote: >> Hello Everyone! >> >> If you are experiencing DMA errors on a BCM4312, please test the >> attached patch. It implements the PCI-E SERDES workaround, which the >> hybrid driver is applying during early init to LP-PHY cards, and which >> is a good candidate for the cause of the DMA error. >> Note that this is not a final patch & it may cause collateral damage >> for non-4312 cards; if it helps the 4312 problem, I will submit a >> cleaned-up version. > > The patch that you distributed had a couple of errors in compiling, namel= y: > > =A0CC [M] =A0drivers/ssb/driver_pcicore.o > drivers/ssb/driver_pcicore.c: In function =91ssb_pcie_mdio_set_block=92: > drivers/ssb/driver_pcicore.c:457:7: error: =91i=92 undeclared (first use = in this > function) > drivers/ssb/driver_pcicore.c:457:7: note: each undeclared identifier is r= eported > only once for each function it appears in > drivers/ssb/driver_pcicore.c: In function =91ssb_pcie_mdio_read=92: > drivers/ssb/driver_pcicore.c:503:2: error: expected =91;=92 before =91pci= core_write32=92 > make[2]: *** [drivers/ssb/driver_pcicore.o] Error 1 > make[1]: *** [drivers/ssb] Error 2 > make[1]: *** Waiting for unfinished jobs.... > > Did you forget a quilt refresh? > > My machine does not have the DMA error, but I will be testing. > > Larry > Oops... yes, two nasty typos. I have no idea why it compiled for me... Schr=F6dinbug? With that said, here is the corrected version. --=20 Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-) --0015175cb580d9f698048df5ac17 Content-Type: application/octet-stream; name="pcie_serdes_workaround.diff" Content-Disposition: attachment; filename="pcie_serdes_workaround.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gcxphgfy0 ZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3NiL2RyaXZlcl9wY2ljb3JlLmMgYi9kcml2ZXJzL3NzYi9k cml2ZXJfcGNpY29yZS5jDQppbmRleCAwZThkMzUyLi45ZjVjNWUyIDEwMDY0NA0KLS0tIGEvZHJp dmVycy9zc2IvZHJpdmVyX3BjaWNvcmUuYw0KKysrIGIvZHJpdmVycy9zc2IvZHJpdmVyX3BjaWNv cmUuYw0KQEAgLTQ0NiwxMyArNDQ2LDcxIEBAIHN0YXRpYyB2b2lkIHNzYl9wY2llX3dyaXRlKHN0 cnVjdCBzc2JfcGNpY29yZSAqcGMsIHUzMiBhZGRyZXNzLCB1MzIgZGF0YSkNCiAJcGNpY29yZV93 cml0ZTMyKHBjLCAweDEzNCwgZGF0YSk7DQogfQ0KIA0KK3N0YXRpYyBib29sIHNzYl9wY2llX21k aW9fc2V0X2Jsb2NrKHN0cnVjdCBzc2JfcGNpY29yZSAqcGMsIHU4IGRldmljZSkNCit7DQorCWNv bnN0IHUxNiBtZGlvX2NvbnRyb2wgPSAweDEyODsNCisJY29uc3QgdTE2IG1kaW9fZGF0YSA9IDB4 MTJDOw0KKw0KKwlwY2ljb3JlX3dyaXRlMzIocGMsIG1kaW9fZGF0YSwgMHg1N0MyMDAwMCB8IChk ZXZpY2UgPDwgNCkpOw0KKwl1ZGVsYXkoMTApOw0KKwlpbnQgaTsNCisJZm9yIChpID0gMDsgaSA8 I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