From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f173.google.com ([209.85.213.173]:35202 "EHLO mail-ig0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752927AbaAMRjF (ORCPT ); Mon, 13 Jan 2014 12:39:05 -0500 Received: by mail-ig0-f173.google.com with SMTP id c10so2565454igq.0 for ; Mon, 13 Jan 2014 09:39:04 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <52B0AEAD.6050604@gmail.com> <20131218010207.GC15119@google.com> <4b24688d857e432eb7ecf9095c95b742@DM2PR05MB671.namprd05.prod.outlook.com> From: Bjorn Helgaas Date: Mon, 13 Jan 2014 10:38:44 -0700 Message-ID: Subject: Re: [PATCH v3 4/8] pciehp: Don't disable the link permanently, during removal To: Rajat Jain Cc: Rajat Jain , Rajat Jain , Kenji Kaneshige , Alex Williamson , Yijing Wang , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Yinghai Lu , Guenter Roeck , Yinghai Lu Content-Type: text/plain; charset=UTF-8 Sender: linux-pci-owner@vger.kernel.org List-ID: On Mon, Jan 13, 2014 at 1:30 AM, Rajat Jain wrote: > Yinghai: I am trying to understand what exactly is this platform bug > and how to add a quirk such that this platform remains unaffected. Can > you please help me by suggesting how to decide if this is _the_ > platform that has the bug (the pcie repeater). > > Bjorn: It seems to be that identification of this platform will be out > PCI code (since the bug seems to be in a pcie repeater chip which is > not a PCI device visible to SW). So even if we find a way to identify > this platform (e.g DMI) , I doubt if you'd want me to add that in the > pciehp code (which is platform independent so far). At best, the only > way out I can see is to provide a knob from the pciehp, that can be > use by the platform code to either enable or disable the link state > hotplug. It could go back towards using a module parameter like > pciehp_use_link_events. Please suggest. > > The only other way I can think of, is that I can remove the debug > message altogether (Link up / Link down). (Or the user can change the > verbosity). I think it's perfectly fine to add a DMI-based quirk in pciehp. Yes, it's a bit ugly, but that's just the nature of working around hardware defects. Identify the platform, emit a diagnostic ("disabling link state because platform may be buggy"), enable the workaround. That seems better than requiring the user to figure out what hardware he has and whether it has a defect. I would also be OK with adding a pciehp module parameter to explicitly enable or disable the workaround if that seems necessary. I just want the common case of correctly working hardware to work without any switches. Removing or rate-limiting the link up/down debug message is also fine with me. Bjorn