From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.15703.1591949582461775450 for ; Fri, 12 Jun 2020 01:13:02 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 62FE91F1; Fri, 12 Jun 2020 01:13:01 -0700 (PDT) Received: from [192.168.1.69] (unknown [10.37.8.184]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 41E2E3F73C; Fri, 12 Jun 2020 01:12:59 -0700 (PDT) Subject: Re: [EXT] RE: [PATCH 1/1] EmbeddedPkg/MmcDxe: Added MaxBlock Transfer Limit 65535 in R/W. To: Gaurav Jain , "Loh, Tien Hock" , Leif Lindholm Cc: Pankaj Bansal , Meenakshi Aggarwal , "devel@edk2.groups.io" , Haojian Zhuang , Varun Sethi References: <1585905847-16380-1-git-send-email-gaurav.jain@nxp.com> <20200406140819.GI14075@vanye> <3d55018b-8751-bbe1-b1ac-98ac36e16e1c@arm.com> <20200429111618.GF21486@vanye> From: "Ard Biesheuvel" Message-ID: <3f3dd819-2525-0fb2-4627-50c7680c5c37@arm.com> Date: Fri, 12 Jun 2020 10:12:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 5/27/20 1:21 PM, Gaurav Jain wrote: > Hi Leif > > Tein Hock has reviewed this patch. > Please help to merge in edk2. > Merged as #687 Thanks all >> -----Original Message----- >> From: Loh, Tien Hock >> Sent: Thursday, April 30, 2020 6:47 AM >> To: Leif Lindholm >> Cc: Pankaj Bansal ; Ard Biesheuvel >> ; Gaurav Jain ; >> Meenakshi Aggarwal ; >> devel@edk2.groups.io; Haojian Zhuang ; Varun >> Sethi >> Subject: [EXT] RE: [PATCH 1/1] EmbeddedPkg/MmcDxe: Added MaxBlock >> Transfer Limit 65535 in R/W. >> >> Caution: EXT Email >> >> Hi Leif, >> >> Yes, that's a Reviewed-by. >> >> Thanks. >> >>> -----Original Message----- >>> From: Leif Lindholm >>> Sent: Wednesday, April 29, 2020 7:16 PM >>> To: Loh, Tien Hock >>> Cc: Pankaj Bansal ; Ard Biesheuvel >>> ; Gaurav Jain ; >> Meenakshi >>> Aggarwal ; devel@edk2.groups.io; >> Haojian >>> Zhuang ; Varun Sethi >>> Subject: Re: [PATCH 1/1] EmbeddedPkg/MmcDxe: Added MaxBlock >> Transfer >>> Limit 65535 in R/W. >>> >>> Hi Tien Hock, >>> >>> Can I take that as a Reviewed-by:? >>> >>> Regards, >>> >>> Leif >>> >>> On Wed, Apr 29, 2020 at 05:17:18 +0000, Loh, Tien Hock wrote: >>>> Hi Ard, >>>> >>>> I have checked the patch and it looks good. >>>> >>>> However, I can no longer test the patch as the new DwMmc driver no >>>> longer >>> uses the protocol. >>>> Sorry for the delay, I initially thought I can test it until I >>>> investigated further >>> today. >>>> >>>> Thanks >>>> >>>> >>>>> -----Original Message----- >>>>> From: Pankaj Bansal >>>>> Sent: Monday, April 27, 2020 2:19 PM >>>>> To: Ard Biesheuvel ; Leif Lindholm >>>>> ; Gaurav Jain ; Meenakshi >>>>> Aggarwal >>>>> Cc: devel@edk2.groups.io; Haojian Zhuang >>>>> ; Loh, Tien Hock >>>>> ; Varun Sethi >>>>> Subject: RE: [PATCH 1/1] EmbeddedPkg/MmcDxe: Added MaxBlock >>> Transfer >>>>> Limit 65535 in R/W. >>>>> >>>>> + Meenakshi >>>>> >>>>>> -----Original Message----- >>>>>> From: Ard Biesheuvel >>>>>> Sent: Monday, April 6, 2020 7:42 PM >>>>>> To: Leif Lindholm ; Gaurav Jain >>>>>> >>>>>> Cc: devel@edk2.groups.io; Pankaj Bansal ; >>>>>> Haojian Zhuang ; Loh, Tien Hock >>>>>> >>>>>> Subject: Re: [PATCH 1/1] EmbeddedPkg/MmcDxe: Added MaxBlock >>>>>> Transfer Limit 65535 in R/W. >>>>>> >>>>>> On 4/6/20 4:08 PM, Leif Lindholm wrote: >>>>>>> Hi Gaurav, >>>>>>> >>>>>>> Haojian, Tien Hock - can you help review/test this change? >>>>>>> >>>>>>> Best Regards, >>>>>>> >>>>>>> Leif >>>>>>> >>>>>>> On Fri, Apr 03, 2020 at 14:54:07 +0530, Gaurav Jain wrote: >>>>>>>> Moved BlockCount calculation below BufferSize Validation checks. >>>>>>>> First Ensure Buffersize is Not Zero and multiple of Media BlockSize. >>>>>>>> then calculate BlockCount and perform Block checks. >>>>>>>> >>>>>>>> Corrected BlockCount calculation, as BufferSize is multiple >>>>>>>> of BlockSize, So adding (BlockSize-1) bytes to BufferSize and >>>>>>>> then divide by BlockSize will have no impact on BlockCount. >>>>>>>> >>>>>>>> Reading Large Images from MMC causes errors. >>>>>>>> As per SD Host Controller Spec version 4.20, Restriction of >>>>>>>> 16-bit Block Count transfer is 65535. >>>>>>>> Max block transfer limit in single cmd is 65535 blocks. >>>>>>>> Added Max Block check that can be processed is 0xFFFF. >>>>>>>> then Update BlockCount on the basis of MaxBlock. >>>>>>>> >>>>>>>> Signed-off-by: Gaurav Jain >>>>>> >>>>>> >>>>>> Hello Gaurav, >>>>>> >>>>>> Could you please elaborate on the underlying need for this change? >>>>>> If you are considering using this driver for future NXP >>>>>> platforms, I should point out that this legacy driver is only >>>>>> kept around for existing users, and new users should use the >>>>>> driver stack in MdeModulePkg, which is based on the UEFI spec. >>>>>> >>>>>> -- >>>>>> Ard. >>>>>> >>>>>> >>>>>> >>>>