Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756540Ab3CQRTn (ORCPT ); Sun, 17 Mar 2013 13:19:43 -0400 Received: from mail-ie0-f177.google.com ([209.85.223.177]:38112 "EHLO mail-ie0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752037Ab3CQRTl (ORCPT ); Sun, 17 Mar 2013 13:19:41 -0400 MIME-Version: 1.0 In-Reply-To: <20130317155023.5B2EB11FB81@bugzilla.kernel.org> References: <20130317155023.5B2EB11FB81@bugzilla.kernel.org> Date: Sun, 17 Mar 2013 10:19:40 -0700 X-Google-Sender-Auth: HVaaZNobxelCp8ymIzcxGDxuxn4 Message-ID: Subject: Re: [Bug 55211] pci_disable_link_state PCIE_LINK_STATE_L0S no longer disables ASPM for ath5k From: Yinghai Lu To: bugzilla-daemon@bugzilla.kernel.org, Roman Yepishev , Bjorn Helgaas Cc: Taku Izumi , Linux Kernel Mailing List , linux-pci@vger.kernel.org, NetDev Content-Type: multipart/mixed; boundary=089e0129483adcaef004d82213ba Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 10796 Lines: 172 --089e0129483adcaef004d82213ba Content-Type: text/plain; charset=ISO-8859-1 On Sun, Mar 17, 2013 at 8:50 AM, wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=55211 > --- Comment #9 from Roman Yepishev 2013-03-17 15:50:23 --- > Re-tested on two laptops - AOA150, ath5k device got ASPM disabled and on a > Lenovo E420 I got ASPM disabled for iwlwifi-driven Intel Corporation Centrino > Wireless-N 1000 [8086:0084]. > > Also I found http://article.gmane.org/gmane.linux.kernel.pci/20640 where a > question was raised why pci_disable_link_state stopped doing anything for > iwlwifi devices too. > good. Did you test first patch or second patch? Please test second patch only on affected platforms. old logic is quite strange, on boot path and hotplug path it have different aspm_disabled setting. as it could set aspm_disabled after pci root bus scanning. Second patch will not restore to old logic, and just remove not needed aspm_disabled checking for disabling path. So second patch is right fix, but it need more test. Thanks Yinghai --089e0129483adcaef004d82213ba Content-Type: application/octet-stream; name="pci_acpi_osc_aspm_fix.patch" Content-Disposition: attachment; filename="pci_acpi_osc_aspm_fix.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_heegqwlh0 U3ViamVjdDogW1BBVENIXSBQQ0ksIEFDUEk6IERlbGF5IHBjaWVfbm9fYXNwbSgpIGNhbGxpbmcK ClJvbWFuIHJlcG9ydGVkIGF0aDVrIGRvZXMgbm90IHdvcmsgYW55bW9yZSBvbiAzLjguCkJpc2Vj dGVkIHRvCnwgY29tbWl0IDhjMzNmNTFkZjQwNmUxYTFmN2ZhNGU5YjI0NDg0NWI3ZWJkNjFmYTYK fCBBdXRob3I6IFRha3UgSXp1bWkgPGl6dW1pLnRha3VAanAuZnVqaXRzdS5jb20+CnwgRGF0ZTog ICBUdWUgT2N0IDMwIDE1OjI3OjEzIDIwMTIgKzA5MDAKfAp8ICAgIFBDSS9BQ1BJOiBSZXF1ZXN0 IF9PU0MgY29udHJvbCBiZWZvcmUgc2Nhbm5pbmcgUENJIHJvb3QgYnVzCnwKfCAgICBUaGlzIHBh dGNoIG1vdmVzIHVwIHRoZSBjb2RlIGJsb2NrIHRvIHJlcXVlc3QgX09TQyBjb250cm9sIGluIG9y ZGVyIHRvCnwgICAgc2VwYXJhdGUgQUNQSSB3b3JrIGFuZCBQQ0kgd29yayBpbiBhY3BpX3BjaV9y b290X2FkZCgpLgoKSXQgbWFrZSBwY2lfZGlzYWJsZV9saW5rX3N0YXRlIGRvZXMgbm90IHdvcmsg YW55bW9yZSBhcyBhY3BpX2Rpc2FibGVkCmlzIHNldCBiZWZvcmUgcGNpIHJvb3QgYnVzIHNjYW5u aW5nLgpJdCB3aWxsIHNraXAgdGhhdCBpbiBxdWlya3MgYW5kIHBjaWVfYXNwbV9zYW5pdHlfY2hl Y2suCgpSZXRvcmUgb2xkIGxvZ2ljIGp1c3QgZGVsYXkgY2FsbGluZyBwY2llX25v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IEFTUE0gZGlzYWJsZWRcbiIpOwor CQlwY2llX25vX2FzcG0oKTsKKwl9CisJaWYgKG9zY19jb250cm9sX3NldF9zdGF0ZSA9PSAxKSB7 CiAJCWlmIChhY3BpX2dibF9GQURULmJvb3RfZmxhZ3MgJiBBQ1BJX0ZBRFRfTk9fQVNQTSkKIAkJ CXBjaWVfY2xlYXJfYXNwbShyb290LT5idXMpOwotCX0gZWxzZSB7Ci0JCXByX2luZm8oIkFDUEkg X09TQyBjb250cm9sIGZvciBQQ0llIG5vdCBncmFudGVkLCAiCi0JCQkiZGlzYWJsaW5nIEFTUE1c biIpOwotCQlwY2llX25vX2FzcG0oKTsKKwl9IGVsc2UgaWYgKG9zY19jb250cm9sX3NldF9zdGF0 ZSA9PSAwKSB7CisJCQlkZXZfaW5mbygmZGV2aWNlLT5kZXYsICJBQ1BJIF9PU0MgY29udHJvbCBu b3QgZ3JhbnRlZCwgUENJZSBBU1BNIGRpc2FibGVkXG4iKTsKKwkJCXBjaWVfbm9fYXNwbSgpOwog CX0KIAogCXBjaV9hY3BpX2FkZF9idXNfcG1fbm90aWZpZXIoZGV2aWNlLCByb290LT5idXMpOwo= --089e0129483adcaef004d82213ba Content-Type: application/octet-stream; name="disable_aspm_remove_not_needed_check.patch" Content-Disposition: attachment; filename="disable_aspm_remove_not_needed_check.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_heegrbta1 U3ViamVjdDogW1BBVENIXSBQQ0k6IFJlbW92ZSBub3QgbmVlZGVkIGNoZWNrIGluIGRpc2FibGUg YXNwbSBsaW5rCgpSb21hbiByZXBvcnRlZCBhdGg1ayBkb2VzIG5vdCB3b3JrIGFueW1vcmUgb24g My44LgpCaXNlY3RlZCB0bwp8IGNvbW1pdCA4YzMzZjUxZGY0MDZlMWExZjdmYTRlOWIyNDQ4NDVi N2ViZDYxZmE2CnwgQXV0aG9yOiBUYWt1IEl6dW1pIDxpenVtaS50YWt1QGpwLmZ1aml0c3UuY29t Pgp8IERhdGU6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IHBjaV9kZXYgKnBkZXYsIGludCBzdGF0ZSkKIHsKLQlfX3Bj aV9kaXNhYmxlX2xpbmtfc3RhdGUocGRldiwgc3RhdGUsIHRydWUsIGZhbHNlKTsKKwlfX3BjaV9k aXNhYmxlX2xpbmtfc3RhdGUocGRldiwgc3RhdGUsIHRydWUpOwogfQogRVhQT1JUX1NZTUJPTChw Y2lfZGlzYWJsZV9saW5rX3N0YXRlKTsKIApAQCAtNzgxLDcgKzc2OCw3IEBAIHZvaWQgcGNpZV9j bGVhcl9hc3BtKHN0cnVjdCBwY2lfYnVzICpidXMKIAkJX19wY2lfZGlzYWJsZV9saW5rX3N0YXRl KGNoaWxkLCBQQ0lFX0xJTktfU1RBVEVfTDBTIHwKIAkJCQkJIFBDSUVfTElOS19TVEFURV9MMSB8 CiAJCQkJCSBQQ0lFX0xJTktfU1RBVEVfQ0xLUE0sCi0JCQkJCSBmYWxzZSwgdHJ1ZSk7CisJCQkJ CSBmYWxzZSk7CiAJfQogfQogCg== --089e0129483adcaef004d82213ba-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/