lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <AS8PR04MB8676A952ED9ADB85DEE810118CA22@AS8PR04MB8676.eurprd04.prod.outlook.com>
Date: Tue, 16 Jul 2024 02:52:29 +0000
From: Hongxing Zhu <hongxing.zhu@....com>
To: Damien Le Moal <dlemoal@...nel.org>, "tj@...nel.org" <tj@...nel.org>,
	"cassel@...nel.org" <cassel@...nel.org>, "robh@...nel.org" <robh@...nel.org>,
	"krzk+dt@...nel.org" <krzk+dt@...nel.org>, "conor+dt@...nel.org"
	<conor+dt@...nel.org>, "shawnguo@...nel.org" <shawnguo@...nel.org>,
	"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>, "festevam@...il.com"
	<festevam@...il.com>
CC: "linux-ide@...r.kernel.org" <linux-ide@...r.kernel.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "imx@...ts.linux.dev"
	<imx@...ts.linux.dev>, "kernel@...gutronix.de" <kernel@...gutronix.de>
Subject: RE: [PATCH v2 3/4] ata: ahci_imx: Enlarge RX water mark for i.MX8QM
 SATA

> -----Original Message-----
> From: Damien Le Moal <dlemoal@...nel.org>
> Sent: 2024年7月16日 6:01
> To: Hongxing Zhu <hongxing.zhu@....com>; tj@...nel.org; cassel@...nel.org;
> robh@...nel.org; krzk+dt@...nel.org; conor+dt@...nel.org;
> shawnguo@...nel.org; s.hauer@...gutronix.de; festevam@...il.com
> Cc: linux-ide@...r.kernel.org; stable@...r.kernel.org;
> devicetree@...r.kernel.org; linux-kernel@...r.kernel.org;
> linux-arm-kernel@...ts.infradead.org; imx@...ts.linux.dev;
> kernel@...gutronix.de
> Subject: Re: [PATCH v2 3/4] ata: ahci_imx: Enlarge RX water mark for i.MX8QM
> SATA
> 
> On 7/15/24 10:53, Richard Zhu wrote:
> > The RXWM(RxWaterMark) sets the minimum number of free location within
> > the RX FIFO before the watermark is exceeded which in turn will cause
> > the Transport Layer to instruct the Link Layer to transmit HOLDS to
> > the transmitting end.
> >
> > Based on the default RXWM value 0x20, RX FIFO overflow might be
> > observed on i.MX8QM MEK board, when some Gen3 SATA disks are used.
> >
> > The FIFO overflow will result in CRC error, internal error and
> > protocol error, then the SATA link is not stable anymore.
> >
> > To fix this issue, enlarge RX water mark setting from 0x20 to 0x29.
> >
> > Fixes: 027fa4dee935 ("ahci: imx: add the imx8qm ahci sata support")
> > Cc: stable@...r.kernel.org
> > Signed-off-by: Richard Zhu <hongxing.zhu@....com>
> > ---
> >  drivers/ata/ahci_imx.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c index
> > e94c0fdea2260..12d69a6429b6a 100644
> > --- a/drivers/ata/ahci_imx.c
> > +++ b/drivers/ata/ahci_imx.c
> > @@ -45,6 +45,10 @@ enum {
> >  	/* Clock Reset Register */
> >  	IMX_CLOCK_RESET				= 0x7f3f,
> >  	IMX_CLOCK_RESET_RESET			= 1 << 0,
> > +	/* IMX8QM SATA specific control registers */
> > +	IMX8QM_SATA_AHCI_VEND_PTC		= 0xc8,
> > +	IMX8QM_SATA_AHCI_VEND_PTC_RXWM_MASK	= 0x7f,
> 
> Please use GENMASK() macro to define this.
Thanks for your comments.
Okay.
> 
> > +	IMX8QM_SATA_AHCI_VEND_PTC_NEWRXWM	= 0x29,
> 
> Here too. And I do not see the point of the "NEW" in the macro name.
> 
Okay, "NEW" would be removed.
> Also, what is "_VEND_" supposed to mean in the macro names ? "Vendor" ?
> If that is the case, remove that too, which will give you shorter macro names.
> If not, then spell it out because that is not clear.
Yes, you're right.
"_VEND_" means "Vendor". I would remove them later.

Best Regards
Richard Zhu

> 
> >  };
> >
> >  enum ahci_imx_type {
> > @@ -466,6 +470,12 @@ static int imx8_sata_enable(struct ahci_host_priv
> *hpriv)
> >  	phy_power_off(imxpriv->cali_phy0);
> >  	phy_exit(imxpriv->cali_phy0);
> >
> > +	/* RxWaterMark setting */
> > +	val = readl(hpriv->mmio + IMX8QM_SATA_AHCI_VEND_PTC);
> > +	val &= ~IMX8QM_SATA_AHCI_VEND_PTC_RXWM_MASK;
> > +	val |= IMX8QM_SATA_AHCI_VEND_PTC_NEWRXWM;
> > +	writel(val, hpriv->mmio + IMX8QM_SATA_AHCI_VEND_PTC);
> > +
> >  	return 0;
> >
> >  err_sata_phy_exit:
> 
> --
> Damien Le Moal
> Western Digital Research

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ