Return-path: Received: from mail-qy0-f174.google.com ([209.85.216.174]:45408 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755035Ab0HPR76 (ORCPT ); Mon, 16 Aug 2010 13:59:58 -0400 Received: by qyk10 with SMTP id 10so14314qyk.19 for ; Mon, 16 Aug 2010 10:59:57 -0700 (PDT) MIME-Version: 1.0 From: =?ISO-8859-1?Q?G=E1bor_Stefanik?= Date: Mon, 16 Aug 2010 19:59:36 +0200 Message-ID: Subject: [RFT] BCM4312 users with DMA errors, please test! To: b43-dev , linux-wireless Content-Type: multipart/mixed; boundary=0015175cd546ba1f46048df499ac Sender: linux-wireless-owner@vger.kernel.org List-ID: --0015175cd546ba1f46048df499ac Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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. Thanks, G=E1bor --0015175cd546ba1f46048df499ac 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_gcxmkkwp0 ZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3NiL2RyaXZlcl9wY2ljb3JlLmMgYi9kcml2ZXJzL3NzYi9k cml2ZXJfcGNpY29yZS5jDQppbmRleCAwZThkMzUyLi45ZjVjNWUyIDEwMDY0NA0KLS0tIGEvZHJp dmVycy9zc2IvZHJpdmVyX3BjaWNvcmUuYw0KKysrIGIvZHJpdmVycy9zc2IvZHJpdmVyX3BjaWNv cmUuYw0KQEAgLTQ0NiwxMyArNDQ2LDcxIEBAIHN0YXRpYyB2b2lkIHNzYl9wY2llX3dyaXRlKHN0 cnVjdCBzc2JfcGNpY29yZ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