Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp72971rdh; Tue, 13 Feb 2024 09:43:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXNivtii71QcgDxlUSGzbTb8Jv+3YmvzuETPqy9Z9JhSTDq9zJmPKi0HLN+jYVIhAcPGYPa93DIsEEYuu5kwFcxH6QUhvUgKtKtYt2+rQ== X-Google-Smtp-Source: AGHT+IH0m2GeMOMoAGf1YiAMCDEK2codcrMgJcvUxp8o6Q7guM8kTan7XlpWaDhnWfC+8eOf1wRH X-Received: by 2002:a17:902:bc47:b0:1d9:8bb4:3fdf with SMTP id t7-20020a170902bc4700b001d98bb43fdfmr200041plz.10.1707846202074; Tue, 13 Feb 2024 09:43:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707846202; cv=pass; d=google.com; s=arc-20160816; b=mwyC6xLEhK1rsQvaC78aQzuwaM92EHUIDE9kNMUWHN6IVJOVqm6VvHwB1IXxDbB5vM 8wdIYC8O0juhov81xINvhLn5jRXvzbSGEDNVQwvzSaX5JyPw1aMFEtqWMOkYs/MFsQfe cmR8huC5BlgjzcrT1KW+iQ9pKnbrp+vastKUq/WS7hI6S601a0c/TdJqunGCzf6it0uP 5iQS5yYb9DdvoMVofox1A9h8lpwjUQPwZ5ndzrmATcm2mHq+Db61icStjqkpuYRuYaxJ RAsgb8aoCAul35wFlwYsxsVguMmcfmRmdgkTAL1EitzmJCbDdGa2HQDnXBUzLApP/zRQ zoZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LdDth/gouXUXja/4kfftLFBXd4lZ2+AEkLoIkVnNq+c=; fh=n/Mi6CoC4f/AI9KgkA4DPEMBCc5ig7l7XPZazhUt6EY=; b=RuptQxCtGpMf6blhD7hDu4fmg0WpAOy9kQqw9HGSYN7ziTdq9WGilgT2cjKbTYsVrY gPJELMiNEl94O4OfNO565Ln+HDnDXjiTE/WwNI7+1NMeL7kyvHaS8FN+u/2HczSXPT2n FAERQuYVkABEemClhzUxSo/N1yWxGJ0CmUAckmZemyXAFskLV6n+5sGHG2jU18XCTS+5 QPcZWGRrvuu9P+2YFNZiP3d3g9Sjy8bsK0/vlT0QnWrkBsc/TIfrPkb+PgMAHGfhFzuT JNsQLwbWAFiP5QoPdeuhNANbUaDbf58XcXRsUak3NqW1H7UXdxkDq/yrCKhrhl93f6r2 WM0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K85XESiv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63973-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUMcUDsXfByw+nBCjW02m/a7RxGWh7oLPcTB1DczXzh+zAP0DxzCTjlthIk170sVZXGDajMK3pt6VupYmpwWsJwYubiJdjjI7Zm86/ngg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l3-20020a170902f68300b001d91df66e24si2315279plg.164.2024.02.13.09.43.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 09:43:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63973-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K85XESiv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63973-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id CF521B221B7 for ; Tue, 13 Feb 2024 17:19:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 96AA35FDD1; Tue, 13 Feb 2024 17:19:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K85XESiv" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF64F5FBAB; Tue, 13 Feb 2024 17:19:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707844757; cv=none; b=dOZwZE8LNiTtSHEQr7aE2tfpkvaAx1LWUUj1Dk/0N/7odjwc7n2WKdGuwKPOcifn70mRmZwGFpe0ZM+bvnIM/GFxNVG67NvRWKyx6xlXegQDFFAnKjVXuiFuABk6f54gi1iqP255q2uOskj+Q6HQa1TwaC8qP6y23Wl0mATRo5E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707844757; c=relaxed/simple; bh=R/B40q9CR1/8RE3F5SfXeRo7pDhszA/djBNLhnRhU8E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JlCcM5KxMx32AgOMIIY+K2RiFkafkz5MUA12v0okzgB7rxdh12L7dGT6Uh3UicLlwD4s+AWxUS4+urBdZodO783Frv7NuKR0SX740OC1+pdIUWnQt5QJRBq6cMycQF7Unc9QEfCZVdic4yt8sKTedLpITIQ9cgJksKQ0uQ+Vncc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K85XESiv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62108C433F1; Tue, 13 Feb 2024 17:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707844757; bh=R/B40q9CR1/8RE3F5SfXeRo7pDhszA/djBNLhnRhU8E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K85XESiv7C47l3z1V3SZKplk1fWQ1VqiGUTwBuk2tMkNZtCI+MW9b5ugtQDEJ/lbG GlYnDR0TFMcciYKYP6jMjrWxA93h84VzSAPzuFNwpr390Jdl3nmEwP6pdgX+y3MBj/ nEe6fNZG+47+io+ke0XKekodgRzxv6z4N41CFrSoM2MXVwbynu1wRLlx3tGNzNonpZ Kj5bT/e+hY2iqoocVxojDP6m+wYT/hgvHx4FFGkbvNdEDOvnNMucxGor9XFIYR2o31 ewDTM5jmWLvCvPxEfs1tg8Pk5khAXJykFGi30mScSt/HHcooeNo+2ey8pTIgwivDIF O19xRuLzqppvA== Date: Tue, 13 Feb 2024 18:19:10 +0100 From: Niklas Cassel To: Andrey Melnikov Cc: Sergei Shtylyov , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, dlemoal@kernel.org, hdegoede@redhat.com Subject: Re: [PATCH] ahci: asm1064: correct count of reported ports Message-ID: References: <7559d940-f191-4fe0-e147-17ffa6c1dfc4@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Feb 08, 2024 at 10:27:11AM +0300, Andrey Melnikov wrote: > > On 2/7/24 12:58 PM, Andrey Jr. Melnikov wrote: > > > > > The ASM1064 SATA host controller always reports wrongly, > > > that it has 24 ports. But in reality, it only has four ports. > > > > > > before: > > > ahci 0000:04:00.0: SSS flag set, parallel bus scan disabled > > > ahci 0000:04:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xffff0f impl SATA mode > > > ahci 0000:04:00.0: flags: 64bit ncq sntf stag pm led only pio sxs deso sadm sds apst > > > > > > after: > > > ahci 0000:04:00.0: ASM1064 has only four ports > > > ahci 0000:04:00.0: forcing port_map 0xffff0f -> 0xf > > > ahci 0000:04:00.0: SSS flag set, parallel bus scan disabled > > > ahci 0000:04:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xf impl SATA mode > > > ahci 0000:04:00.0: flags: 64bit ncq sntf stag pm led only pio sxs deso sadm sds apst > > > > > > > > > Signed-off-by: Andrey Jr. Melnikov > > > > > > diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c > > > index da2e74fce2d9..ec30d8330d16 100644 > > > --- a/drivers/ata/ahci.c > > > +++ b/drivers/ata/ahci.c > > > @@ -671,9 +671,14 @@ MODULE_PARM_DESC(mobile_lpm_policy, "Default LPM policy for mobile chipsets"); > > > static void ahci_pci_save_initial_config(struct pci_dev *pdev, > > > struct ahci_host_priv *hpriv) > > > { > > > - if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && pdev->device == 0x1166) { > > > - dev_info(&pdev->dev, "ASM1166 has only six ports\n"); > > > - hpriv->saved_port_map = 0x3f; > > > + if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA) { > > > + if (pdev->device == 0x1166) { > > > > Maybe *switch* instead? > > Ok. Hello Andrey, do you intend to send out a v2 that uses a switch instead? And perhaps take Damien's patch as patch 1/2 (with Suggested-by: Damien ... of course), so that the before/after print in your commit message shows the override value. Kind regards, Niklas