From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web08.176.1614102646694388664 for ; Tue, 23 Feb 2021 09:50:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AV3HgDSK; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614102645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ee+OSngLy//KARTbgut3xiIbtC/4+5UEpImTn0+yR3I=; b=AV3HgDSKzqy9kwwcD3Dr6U6Ekx6Jhx74qAmFCfTqjfFfm4ji6tg5LSjU2XFIYeZEJCcxwV /EgNO348tdkUJgYWpdhp9mMxoTY+oDOgPSmi3qWrWvVeAOPiRCmDnaSOS+LxX8xMYkSysr NRhnu4DDQs8TTsMu+YAMjiiv6Ve9ETw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-376-qNgknGFaOsa8RFZy7KU4-w-1; Tue, 23 Feb 2021 12:50:24 -0500 X-MC-Unique: qNgknGFaOsa8RFZy7KU4-w-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B23C7801976; Tue, 23 Feb 2021 17:50:22 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-109.ams2.redhat.com [10.36.113.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5B3E19C46; Tue, 23 Feb 2021 17:50:20 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/UfsPassThruDxe: Improve Device initialization polling Loop To: devel@edk2.groups.io, purna.chandra.rao.bandaru@intel.com Cc: Mateusz Albecki , Ray Ni , Hao A Wu , "Leif Lindholm (Nuvia address)" , Michael Kinney , Andrew Fish References: <20210222170236.6312-1-purna.chandra.rao.bandaru@intel.com> From: "Laszlo Ersek" Message-ID: Date: Tue, 23 Feb 2021 18:50:19 +0100 MIME-Version: 1.0 In-Reply-To: <20210222170236.6312-1-purna.chandra.rao.bandaru@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Bandaru, can you tell us please why you (apparently) refuse to subscribe to this list -- in spite of the two invites that I have sent you from the groups.io moderation WebUI? You are creating unnecessary work for the moderators. They need to approve your messages one by one, until you actually subscribe to the list. It's only then that moderators can add you to the permanent permit-list (i.e., permanently unmoderate you). I've stopped approving your messages because you silently ignored (apparently!) both invites that I generated for you. The latest of those was sent on Feb 17. And that doesn't take into account any other invites that other moderators may have sent you. You are abusing the moderation system. Stop it. You are clearly a recurring contributor, so subscribe already. It's bad that I'm telling you this here, on the list, under your patch set. However I also included a similarly detailed explanation/request when I rejected your pending messages on Feb 17 (just before I would send you my 2nd invite). You (apparently) completely ignored the contents of that rejection message, you wouldn't subscribe, you have just kept posting new patches since. I can't fathom your behavior. In the same timeframe, I did the same to another contributor (rejected their pending messages with a detailed explanation / request, and sent them a 2nd invite too), and they *have* since subscribed. And now I un-moderated them as well, ~5 minutes ago. Do you actually *read* the emails that you receive? Or is your spam filter mistrained? Laszlo On 02/22/21 18:02, Purna Chandra Rao Bandaru wrote: > https://bugzilla.tianocore.org/show_bug.cgi?id=3217 > > Current Ufs Pass thru driver polls for 5us and return success even when > the timeout occurs. > There are cards that can take upto 600ms for Init and hence increased > the time out for fDeviceInit polling loop. > > Signed-off-by: Bandaru > Cc: Mateusz Albecki > Cc: Ray Ni > Cc: Hao A Wu > > Change-Id: I6cb063b43bdf37790db8e60c3919153cd2f3c086 > --- > MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c > index 9768c2e6fb..8859578af3 100644 > --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c > +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c > @@ -1,6 +1,6 @@ > /** @file > > - Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
> + Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.
> Copyright (c) Microsoft Corporation.
> SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -749,7 +749,7 @@ UfsFinishDeviceInitialization ( > { > EFI_STATUS Status; > UINT8 DeviceInitStatus; > - UINT8 Timeout; > + UINT16 Timeout; > > DeviceInitStatus = 0xFF; > > @@ -761,17 +761,23 @@ UfsFinishDeviceInitialization ( > return Status; > } > > - Timeout = 5; > + Timeout = 6000; //There are cards that can take upto 600ms. > do { > + MicroSecondDelay (100); //Give 100 us and then start polling. > Status = UfsReadFlag (Private, UfsFlagDevInit, &DeviceInitStatus); > if (EFI_ERROR (Status)) { > return Status; > } > - MicroSecondDelay (1); > Timeout--; > } while (DeviceInitStatus != 0 && Timeout != 0); > > - return EFI_SUCCESS; > + if (Timeout == 0) { > + DEBUG ((DEBUG_ERROR, "UfsFinishDeviceInitialization DeviceInitStatus=%x EFI_TIMEOUT \n", DeviceInitStatus)); > + return EFI_TIMEOUT; > + } else { > + DEBUG ((DEBUG_INFO, "UfsFinishDeviceInitialization Timeout left=%x EFI_SUCCESS \n", Timeout)); > + return EFI_SUCCESS; > + } > } > > /** >