From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.84]) by mx.groups.io with SMTP id smtpd.web11.29139.1590729876103532289 for ; Thu, 28 May 2020 22:24:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=EFeX7XlE; spf=pass (domain: arm.com, ip: 40.107.20.84, mailfrom: hiroaki.isono@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W7m85V4RwRPw129hFvTwks9lJwyTEdnSeeGhSYq/pOY=; b=EFeX7XlE7+/0ViFIb++dfx2HI+FK0uQdOmiStBC2YHPxoLxKluswZjVigum39mpJExCAu0CkaAqFMC2Q6gvMZzuGNj6FI9MbsbVLjy/F2/iujFyyhzDJvLN7l/WjppgHYK3KMD6dTrhgEil3U4PyYa6CvwiK9VACiLcMcMXBY6k= Received: from AM5PR0601CA0052.eurprd06.prod.outlook.com (2603:10a6:206::17) by VE1PR08MB4797.eurprd08.prod.outlook.com (2603:10a6:802:a1::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Fri, 29 May 2020 05:24:33 +0000 Received: from AM5EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:0:cafe::c) by AM5PR0601CA0052.outlook.office365.com (2603:10a6:206::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Fri, 29 May 2020 05:24:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT034.mail.protection.outlook.com (10.152.16.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Fri, 29 May 2020 05:24:33 +0000 Received: ("Tessian outbound 444e8e881ac1:v57"); Fri, 29 May 2020 05:24:33 +0000 X-CR-MTA-TID: 64aa7808 Received: from cc8128c736e1.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8F8A4210-354F-4A6B-B772-E95B1D450831.1; Fri, 29 May 2020 05:24:28 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id cc8128c736e1.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 29 May 2020 05:24:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L7MiIEMNfQ0a1RGuyri5GawSZd9+iBauYi0Bwb/BIg87tJaInFiEhvnLhEASdVNX7D3T3lxSLAlRw9jNo6Noc/AZI/fGKf6kEKOq4fa6X71BVIdVm7AKMYXfU67bvbe5x6p2K4MrOx6CUNaoMt61coejJ2nvhUcffYSiie4UR6nQy4CFI87WcZpEMDRq5YKdeoLSDKoJBs8x/Tb2wJspcEaIHQGylM6VRBLBz/58kUeFMP6+ZvbG32CGtU2TKOvd5fWSh/3/5QtkLYFyIwoJEjKTJQ9k2XIFr52znO254B9qcY9usBaDqEDbLW81wWpQMSqZiM2QbDD/eksTb0DDfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W7m85V4RwRPw129hFvTwks9lJwyTEdnSeeGhSYq/pOY=; b=nhKjplED868B/tD0cYSvUBsKGMF9ysq/7V9D6YxlpZgKWszwfTj019it37IDe+5qYbJxRSi1We71eZUGmaUSKuo1UF5qenOE1tHuTQrAu/WUH4Ie/Cc3JPpx9DWgr3fLgx1PW5QdSakfmB89kfOduWL4eJmi9rxUXtiUal0zjfq33Gh6AVNkhLGqjwHTS38AzNfBiZWHB5aXKdY1E3bSQgMpIw4qucY5QYXY/DBTkffq85Vk0TpeuuHMrbvkdLkTFKzv0dmDxCKcNJOyh7qOvl8VSq056/2F3nbqPPJUmLqDSD+kGOm5XmDgdLSGp7ORbGR1Ux47ymeFPH0Pez79XQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W7m85V4RwRPw129hFvTwks9lJwyTEdnSeeGhSYq/pOY=; b=EFeX7XlE7+/0ViFIb++dfx2HI+FK0uQdOmiStBC2YHPxoLxKluswZjVigum39mpJExCAu0CkaAqFMC2Q6gvMZzuGNj6FI9MbsbVLjy/F2/iujFyyhzDJvLN7l/WjppgHYK3KMD6dTrhgEil3U4PyYa6CvwiK9VACiLcMcMXBY6k= Received: from AM0PR08MB3586.eurprd08.prod.outlook.com (2603:10a6:208:e1::27) by AM0PR08MB3633.eurprd08.prod.outlook.com (2603:10a6:208:de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Fri, 29 May 2020 05:24:27 +0000 Received: from AM0PR08MB3586.eurprd08.prod.outlook.com ([fe80::c54c:f618:72b4:cce9]) by AM0PR08MB3586.eurprd08.prod.outlook.com ([fe80::c54c:f618:72b4:cce9%7]) with mapi id 15.20.3045.018; Fri, 29 May 2020 05:24:26 +0000 From: Hiroaki Isono To: "devel@edk2.groups.io" Subject: [PATCH 1/1] Fixed SiI3132 status check of SW reset Thread-Topic: [PATCH 1/1] Fixed SiI3132 status check of SW reset Thread-Index: AdY1dvbQ9Y2cBRqeTTukC+8xWMx6Sg== Date: Fri, 29 May 2020 05:24:26 +0000 Message-ID: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 84af9d47-ba5b-4a53-94d6-1ee79e1d4b27.0 x-checkrecipientchecked: true Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; x-originating-ip: [217.140.104.200] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d46dff9a-3d9b-457c-14b0-08d80390922e x-ms-traffictypediagnostic: AM0PR08MB3633:|VE1PR08MB4797: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:597;OLM:9508; x-forefront-prvs: 04180B6720 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: YqRUyV/pX7FNXV59nKoEBQAyvJ9ku8zOFaAUk8vzs50P1X/pTQnhkTdUM9icZUp8LYXw+H/tp9cETs2ACrsQseG16Db3+5bNjCRROWGf/cxstLclFEu30UOteivvFINU/j+ex1mGmcescS6Zg5AClWxeI8xvYrl7SkIpdyUaOJGzQW96r3Gj1AQKf7cvGunHzaXo0+wR4wULoWsWjOOaWdd9jC5V5wQ75nU4brHJIfgeXZAXvqNxe4iRvvDF7LVwDm+q+PkhjUXpoCuxQjXBkg0JFLfE7AW6JFi8iM/VCQxo3X5qH8LgXatxJTZpkhwWaMlJ0dCWQlzPxRtOMuymTeHMKJQ9Lof+vsYgdUCgT2I2AFX/lwwJpxf0h7JY7Z0Noev4fi9iMWWzdHuZmHyifA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR08MB3586.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(376002)(346002)(39860400002)(136003)(396003)(83380400001)(8936002)(7696005)(66556008)(64756008)(33656002)(52536014)(6916009)(2906002)(66946007)(316002)(5660300002)(76116006)(478600001)(71200400001)(66446008)(66476007)(19627235002)(966005)(9686003)(166002)(6506007)(26005)(8676002)(55016002)(86362001)(186003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: mmt1PdiKL5ioxTb+iRFUe+ksU4FhO5L6HmROJCGJNXRkHxLfcqvkne4Jb2WPpXgV605dt3/niepjHQNVDMEkZFHkzq23K6wDCwuP812xVEvA+s2Dj1ORPw4l2DTXzMr1n2KyvfCJ2qh6SL0vSmw7bopvrF0v6ts9NgF41LEfKQp9+ByYwTWJ4yGP8ti3VPedFV4DsK8fC+IRI58weG9KigTHBAhSleU8VtLBdya2DgRb/tgXwtPKSPw4eeJdrJcUXeCnP79Xkg9LZ+Rnzr5CekhMelmw6iszFbBkZs8nc5+AsjiMQU/mRvaef6J84OWoJ8zvXm6vHdYUZFNuG1yOgEdMLgSM8vvQiIDiXQyFgu4sZDVZCrbIhR7aevGB16bE9yaFzzfMd0Mwr+dlBpJAUC6n1m6R988eOsUAooXInB3FKrmnNRF4ZUHC9xGTAMqlzZCwAS/RRjumCx0F8GEjyQPywMk3VG+gFg1uyPAonvaCbFqlzHbUIFF2rZl9dpUM x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3633 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; Return-Path: Hiroaki.Isono@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT034.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFTY:;SFS:(4636009)(136003)(376002)(39860400002)(396003)(346002)(46966005)(82740400003)(8676002)(81166007)(6506007)(36906005)(82310400002)(55016002)(166002)(33656002)(966005)(356005)(83380400001)(316002)(6916009)(7696005)(26005)(336012)(9686003)(478600001)(8936002)(186003)(5660300002)(52536014)(70206006)(19627235002)(70586007)(2906002)(47076004)(86362001);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 98fe848b-9b4a-47ea-0132-08d803908e45 X-Forefront-PRVS: 04180B6720 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: izHVHlA/4cM7vTiQ47IfzrSoY2U6l4A4TGlAsLYDW07BRJOH3Mv9DEuN2289bLf0P56NxL1/SoPlU401nx7LLbl0SZqX+XT8/G3+wn5bCh93DhjrcV5GZ//qbGmd5WYbleliGu+NdFbaBxh83WwQIUDOM3Af1fuGd0HY7v+81ymkk8cUGtoDpXCzvyz/4/pf5N26JZAEZWFugLAGK4xvTxV4w0bswNNau5Q6JQVHWiAcKmcPRng54ev3pQXt3G2f5LfJo+ClsNpuygqhzZbdj3HkUP28J7NGmPqffkDL1eFoKU0BR3qWQCvhUzSmrCvWxEYrzDydeBGl98aJ849XYF6aYZFA9dCVr09p4W0KQlTmRe2y3IOD4WHwjtHvwbIBz80s8Ddl5NEHUCL9C9XCoeVIdG3eNPsd+CglqT0uzY3NIp2aK5A7z9FPxeQM/6FKJXsInSGS5HrN1qcFFMSRezdPkC5pt+N1eZm7gM9zIwQ= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2020 05:24:33.4653 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d46dff9a-3d9b-457c-14b0-08d80390922e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4797 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_AM0PR08MB35862398C834F95418F789E1EE8F0AM0PR08MB3586eurp_" --_000_AM0PR08MB35862398C834F95418F789E1EE8F0AM0PR08MB3586eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Fixed the timeout error in SiI3132SoftResetCommand() function. The timeout "SiI3132AtaPassThru() Err:Timeout" occurs when using "WD SSD WD= S100T2B0A 1TB", but doesn't occur when using "Intel SSD 530 Series 240GB". Compared with the linux kernel driver, and found it has the status check du= ring software reset function. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drive= rs/ata/sata_sil24.c?h=3Dv5.6.14 After this modification, confirmed that the WD SSD works without timeout er= ror during software reset function. Tested platform: Juno R2 Signed-off-by: Hiroaki isono Hiroaki.isono@... diff --git a/EmbeddedPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c b/Embe= ddedPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c index a938563ebd..64a9f94c6c 100644 --- a/EmbeddedPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c +++ b/EmbeddedPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c @@ -79,6 +79,14 @@ SiI3132AtaPassThruCommand ( SATA_TRACE ("SiI3132AtaPassThru() EFI_ATA_PASS_THRU_PROTOCOL_ATA_SOFTW= ARE_RESET"); Control =3D PRB_CTRL_SRST; + SATA_PORT_READ32 (SataPort->RegBase + SII3132_PORT_INTSTATUS_REG, &Val= ue32);^M + Timeout =3D 1000;^M + while (Timeout && !(Value32 & IrqMask)) {^M + gBS->Stall (1);^M + SATA_PORT_READ32 (SataPort->RegBase + SII3132_PORT_INTSTATUS_REG, &V= alue32);^M + Timeout--;^M + }^M +^M if (FeaturePcdGet (PcdSataSiI3132FeaturePMPSupport)) { SataPort->HostPRB->Fis.Control =3D 0x0F; } https://github.com/hiro-isono/edk2/commit/fa638c358e1a1afd46a8f0c4f04adfd59= 00622ca IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you. --_000_AM0PR08MB35862398C834F95418F789E1EE8F0AM0PR08MB3586eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Fixed the timeout e= rror in SiI3132SoftResetCommand() function.
The timeout "SiI3132AtaPassThru() Err= :Timeout" occurs when using "WD SSD WDS100T2B0A 1TB", but do= esn't occur when using "Intel SSD 530 Series 240GB".
Compared with the linux kernel driver, and= found it has the status check during software reset function.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/t= ree/drivers/ata/sata_sil24.c?h=3Dv5.6.14
After this modification, confirmed that th= e WD SSD works without timeout error during software reset function.=

 

 

Tested platform: J= uno R2
Signed-off-by: Hiroaki isono Hiroaki.isono= @...

 <= /span>

 

diff --git a/EmbeddedPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c b/EmbeddedPkg/Dr= ivers/SataSiI3132Dxe/SiI3132AtaPassThru.c

index a938563ebd= ..64a9f94c6c 100644

--- a/EmbeddedPk= g/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c<= /o:p>

+++ = b/EmbeddedPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c

@@ -79,6 +79= ,14 @@ SiI3132AtaPassThruCommand (

  &nbs= p;  SATA_TRACE ("SiI3132AtaPassThru() EFI_ATA_PASS_THRU_PROT= OCOL_ATA_SOFTWARE_RESET");

  &nbs= p;  Control =3D PRB_CTRL_SRST;=

  

+  = ;  SATA_PORT_READ32 (SataPort->RegBase + SII3132_PORT_INTSTATUS= _REG, &Value32);^M

+  = ;  Timeout =3D 1000;^M

+  = ;  while (Timeout && !(Value32 & IrqMask)) {^M

+  = ;    gBS->Stall (1);^M=

+  = ;    SATA_PORT_READ32 (SataPort->RegBase + SII3132_PO= RT_INTSTATUS_REG, &Value32);^M

+  = ;    Timeout--;^M<= /p>

+  = ;  }^M

+^M

  &nbs= p;  if (FeaturePcdGet (PcdSataSiI3132FeaturePMPSupport)) {

  &nbs= p;      SataPort->HostPRB->Fis.Control = =3D 0x0F;

  &nbs= p;  }

 

 

 

https://github.com/hiro-isono/ed= k2/commit/fa638c358e1a1afd46a8f0c4f04adfd5900622ca

 

 

IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in any medium. Thank you. --_000_AM0PR08MB35862398C834F95418F789E1EE8F0AM0PR08MB3586eurp_--