Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp674558ybl; Tue, 13 Aug 2019 00:30:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlAXr1/+sKsSvXMLRo64GMRUZwToYRjC7bx9TjzbJpAggmlZ5lkAhdejMJFDfBP1hgpxEY X-Received: by 2002:a17:902:2ac8:: with SMTP id j66mr35009050plb.273.1565681457635; Tue, 13 Aug 2019 00:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565681457; cv=none; d=google.com; s=arc-20160816; b=FRf4m55fXA9zWCCv8ebQR+0ru7sW7fKdmL/foj+1fP0e+Q9g6CqrQdKab3tWcl9Ihr NAoh5UOf09u4FzGcDqjK9xNLuyYF1QzpdhyyHYJImVSrh5rgQHouqiyywpXjvxU4GHdN fJ7vzXkH5etFyq8qVQyYuBP0HPlM2PT7yGIHx3a42saFVZtMrV58fBgTCUZQZcVUQpt/ gpu5poHGXfQZpRgWS4ErH3Ebjw/BjcixMm6rLvCq2K1pVCLIUyXQdxgTuUvq1u5k+18L +v8qM6at+5n+GscIkNht+OaOiWiXRGz3H64k9yjQUb4anAngHZlsRm5nlA9VkQRXaRb0 uDMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JDyPbXOL4+Scz6VgjAtsI+naStzvCwRDzpVpMAFBAHI=; b=xroyiY4Nh77aUP/xIzrc3cjykLU5wOkYRYIawXDTid+03yYAzr6LYOZnqzpJPwvZEQ Dbx3jAxY01QO15ShJyj/N+QOd6vDAaQjhektsRKuN8jYvmWMHjp4kI+u8Q6jfUwoVIVe 7ILLpDJW778KTj0Zu5eBe0vmJCQgnbY9HXYH5IfDBOqmb1iB73ek9iuAj4Rzyl4H4IZy CW7U7cL/GkEuyIGq/ogueZC3BB4Wu98ftUcMgWqccE/NIbzqCTX0lxfOrp3uzY+S9XpM GQMo96kS+wK8Z4PIWmJJiZeA3RzxX4palAZjV+L6hYxzUXSSbCwWYL4RQDjJIFyHlxzG ZAYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="uMn/U8H3"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t13si65512021pfh.245.2019.08.13.00.30.42; Tue, 13 Aug 2019 00:30:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="uMn/U8H3"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727697AbfHMH35 (ORCPT + 99 others); Tue, 13 Aug 2019 03:29:57 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60556 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726789AbfHMH34 (ORCPT ); Tue, 13 Aug 2019 03:29:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=JDyPbXOL4+Scz6VgjAtsI+naStzvCwRDzpVpMAFBAHI=; b=uMn/U8H3zrIV2tIc9UgLlEve5 fJhfGhmoEMI9c084C4eKIpHD1on8+nX6WMXnoHs8vZ0V9uUGZIHln8bPsE8XUSH2lmAriApxAo4b3 xMpQEU8yXhDa+1JuhUh090/Lu5N80OU089VA+4f6KrkwsV9Ajtfzox2HocIV72EnGZLePpH5+crlM R8E9cBn7HVWmAlkg8czmhpsFZepRYQGtwheFpIhHFZXSrT3Pz2Cjq8SK9XWJ8mZm7lOs3LefMTKdy F6pibnazFCFvuUiv8q1KZlPzUKbiccrQ4i95E1YVU1zOmLB8FkiXgQNKZ1Lyj1Etupc4tgSoLyCiw AOPuyzdAg==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hxRFi-0008Cd-5S; Tue, 13 Aug 2019 07:29:54 +0000 Date: Tue, 13 Aug 2019 00:29:54 -0700 From: Christoph Hellwig To: Dan Williams Cc: Christoph Hellwig , Stephen Douthit , Jens Axboe , "linux-ide@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ata: ahci: Lookup PCS register offset based on PCI device ID Message-ID: <20190813072954.GA23417@infradead.org> References: <20190808202415.25166-1-stephend@silicom-usa.com> <20190810074317.GA18582@infradead.org> <051cb164-19d5-9241-2941-0d866e565339@silicom-usa.com> <20190812180613.GA18377@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 12, 2019 at 12:31:35PM -0700, Dan Williams wrote: > It seems platforms / controllers that fail to run the option-rom > should be quirked by device-id, but the PCS register twiddling be > removed for everyone else. "Card BIOS" to me implies devices with an > Option-ROM BAR which I don't think modern devices have, so that might > be a simple way to try to phase out this quirk going forward without > regressing working setups that might be relying on this. > > Then again the driver is already depending on the number of enabled > ports to be reliable before PCS is written, and the current driver > does not attempt to enable ports that were not enabled previously. > That tells me that if the PCS quirk ever mattered it would have > already regressed when the driver switched from blindly writing 0xf to > only setting the bits that were already set in ->port_map. But how do we find that out? A compromise to me seems that we just do the PCS quirk for all Intel devices explicitly listed in the PCI Ids based on new board_* values as long as they have the old PCS location, and assume anything new enough to have the new location won't need to quirk, given that it never properly worked. This might miss some intel devices that were supported with the class based catchall, though.