Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1041175imm; Thu, 6 Sep 2018 14:22:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYIrMc33NWhTcUDBL6IRiq/lpfe5ofwhKiSD1Rf5Xm0Ka0BUmBPYdp8mxDH+V0d9Ue313Vr X-Received: by 2002:a62:571b:: with SMTP id l27-v6mr5047128pfb.29.1536268968929; Thu, 06 Sep 2018 14:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536268968; cv=none; d=google.com; s=arc-20160816; b=tyTEcQGg77u22GRMWKFX878Yx9TDsN63B39ZB3yeX38JRkXLuuT2lsc56xydspe/zn Mk8GBzJ1HycSgj7pD3G3ZSCEq28qoYIeQ9a1DA9FwFg8bjHenAmnle1DQVkV86j9tWTn nwM+DBjyAUWQbxfVXkubGBkAiPNbTEcTff7MJAoevIjz8YQh3U/kf5U5yTHHJEQCzKh0 EhwRnHuXuKPzftKcfWQPQKEQ9dd+AnhVollcEG+9SqIFjaDVgJw9LDl0oHIlxpKMR0wP CVU6smXFX7erT/Z3Y2qIV3YVeeK5uxlyHUNjsqGqrdvRSyphCXRulNF7JL8VdoHWe2Y+ pxiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=1CphhSCVD/lJVIdanHypKuk57KRiiwbM//ZdQo9THFc=; b=xYKEfB7A+PlmxnJa8Lr1vtktaOZ1Wb5JhNrrdOoPMN4Vsgiz1sWEsgRzsI77f1GIyG MkEDTMLD/wrMUiCD2tlgR32YXhZuh1PYleDxIblHol1GvuZrvOC1m3x8KjeLvDVAPj/Z lwI0zLSjEP4OGs77XRt73k6eEP3LJ6zvEEcTcQp91o8QYJYC5hb0J+KvdlST/Y0BrZft 86MoGEwhcKkfpRJ0EMT5+GV8PcFJ/+nZaUbn0mhr74wgynwsbioTLeYLAY+1z4h0WFO3 dw+N+MxUMaVCEenjIkpCHwrCEQDkRZ1kf1oEeI0uI4vC1L2ooWsExX6+g+rB1PckD7gD TGkg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7-v6si5682648plt.7.2018.09.06.14.22.33; Thu, 06 Sep 2018 14:22:48 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729217AbeIGAn2 (ORCPT + 99 others); Thu, 6 Sep 2018 20:43:28 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:41054 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728639AbeIGAn2 (ORCPT ); Thu, 6 Sep 2018 20:43:28 -0400 Received: by mail-wr1-f67.google.com with SMTP id z96-v6so12665870wrb.8 for ; Thu, 06 Sep 2018 13:06:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1CphhSCVD/lJVIdanHypKuk57KRiiwbM//ZdQo9THFc=; b=ArxL4MzDicDeUBqhIvfwu2MTMdbvlARoTa9yZ2Pe/vI2tFgg1jBvgbONOmW115jLdU kOSDuIVoVvigVk3H3ILbPJ/Z2kjiY/AIIQ0x4Uo8/ffYfjcVPgNh7fcZIyMgcOpKxG94 ZP15Ay480K0aTOr+Z1xwBozEqLPxg1UTjRa+/zTMjOAk5TDonkHfuh4pnDd0fqqU1p0O 4TIlom5IGbOBvZXQ6IcYszfMIillCfOAGci1KRYetfiCjr+fYG4ffl8otovI5CDukgzd bBwLoCR0NyMKAtr3+LtXttlFfxBbaFYeSl9pQA/Ta8Q/NP/Pu5ewpfIAV8E4c4Ip8UoS Eywg== X-Gm-Message-State: APzg51DJ0sLVIeP4v+Oj5aHPN01kqGPtMbm1pxJIdaRH9zzJ7Rw6EiO7 XE3vTUxMvOKlI/WfJF0nng8+7Q== X-Received: by 2002:adf:92c2:: with SMTP id 60-v6mr3678860wrn.153.1536264383704; Thu, 06 Sep 2018 13:06:23 -0700 (PDT) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id v192-v6sm5200470wmf.40.2018.09.06.13.06.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Sep 2018 13:06:23 -0700 (PDT) Subject: Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA To: Suman Tripathi , axboe@kernel.dk, tj@kernel.org, linux-ide@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, joe@perches.com, arnd@arndb.de, gregkh@linuxfoundation.org Cc: patches@amperecomputing.com, Rameshwar Prasad Sahu References: <1536257111-27948-1-git-send-email-stripathi@amperecomputing.com> From: Hans de Goede Message-ID: Date: Thu, 6 Sep 2018 22:06:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1536257111-27948-1-git-send-email-stripathi@amperecomputing.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 06-09-18 20:05, Suman Tripathi wrote: > Due to hardware errata, Ampere Computing eMAG SATA can't support > AHCI ALPM feature. This patch disables the AHCI ALPM feature for > eMAG SATA. > > Signed-off-by: Suman Trpathi > Signed-off-by: Rameshwar Prasad Sahu Sorry, but the patch is still coming through mangled. Did you use git send-email ? Regards, Hans > > --- > Changes for v3: > > * Fix the indentation and whitespace warnings. > > Changes for v2: > > * Introduce the new ata_port_info object which includes ATA_FLAG_NO_LPM. > * Include this object for eMAG SATA inside the acpi match table. > * Retrieve the ata_port_info from the acpi match table. > > --- > drivers/ata/ahci_platform.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c > index 99f9a89..9ba283f 100644 > --- a/drivers/ata/ahci_platform.c > +++ b/drivers/ata/ahci_platform.c > @@ -33,6 +33,13 @@ static const struct ata_port_info ahci_port_info = { > .port_ops = &ahci_platform_ops, > }; > > +static const struct ata_port_info ahci_port_info_nolpm = { > + .flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_LPM, > + .pio_mask = ATA_PIO4, > + .udma_mask = ATA_UDMA6, > + .port_ops = &ahci_platform_ops, > +}; > + > static struct scsi_host_template ahci_platform_sht = { > AHCI_SHT(DRV_NAME), > }; > @@ -41,6 +48,7 @@ static int ahci_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct ahci_host_priv *hpriv; > + const struct ata_port_info *port; > int rc; > > hpriv = ahci_platform_get_resources(pdev); > @@ -57,7 +65,11 @@ static int ahci_probe(struct platform_device *pdev) > if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci")) > hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ; > > - rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, > + port = acpi_device_get_match_data(dev); > + if (!port) > + port = &ahci_port_info; > + > + rc = ahci_platform_init_host(pdev, hpriv, port, > &ahci_platform_sht); > if (rc) > goto disable_resources; > @@ -85,6 +97,7 @@ static const struct of_device_id ahci_of_match[] = { > MODULE_DEVICE_TABLE(of, ahci_of_match); > > static const struct acpi_device_id ahci_acpi_match[] = { > + { "APMC0D33", (unsigned long)&ahci_port_info_nolpm }, > { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) }, > {}, > }; > -- > 2.7.4 >