From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754525AbcANNQK (ORCPT ); Thu, 14 Jan 2016 08:16:10 -0500 Received: from mail-qk0-f181.google.com ([209.85.220.181]:36380 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754462AbcANNQB (ORCPT ); Thu, 14 Jan 2016 08:16:01 -0500 MIME-Version: 1.0 In-Reply-To: References: <1447426572-11756-1-git-send-email-holgerschurig@gmail.com> <87r3ierjae.fsf@gmail.com> Date: Thu, 14 Jan 2016 14:16:00 +0100 Message-ID: Subject: Re: [RFC 0/6] mmc: Field Firmware Update From: Ulf Hansson To: Alex Lemberg Cc: Holger Schurig , Avi Shchislowski , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Chris Ball , Baolin Wang Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28 December 2015 at 15:12, Alex Lemberg wrote: > Hi Ulf, > > We succeeded to run FFU via new mmc multi-command ioctl without any code modification, > but only by using Single Sector commands (CMD24). > > From running the FFU and from code review, we see two minor issues in this way of running FFU: > 1. There is no support for Multiple Block write commands (CMD25) in existing IOCTL implementation - That's right. But I guess we cope without the multiple block support!? Although, I wonder how hard it would be to add it... > seems like there is no polling for the card status on data transfer completion. We should fix that! In the rpmb case, we check the status so we can probably trigger that code to run for CMD24/25 as well. > (The kernel FFU implementation supports FFU using Multiple Block Write commands). > 2. As you probably remember, there are two ways to install the new FW in the end of FFU process - > In case MODE_OPERATION_CODES field is not supported by the device, the host sets to NORMAL state Before starting the update, you can find out which mode that is supported and take relevant actions, right? > and initiates a CMD0/HW_Reset/Power cycle to install the new firmware. Yes, but that's fragile - as discussed earlier. What we really need to do is to also remove the "card" device from the system, as otherwise we may have invalid data in its member variables and who knows what issues that can cause to upper levels. > This sequence cannot be done via multi-command ioctl, and requires manual reset of the device/platform. Yepp, it seems so at least for now. Perhaps we can think of a way to improve this? > (The kernel FFU implementation supports both FW install methods). > > For running FFU via new mmc multi-command ioctl, we have modified mmc-utils and add new functionality for FFU. > Please let us know if you want us to submit the patch for mmc-utils FFU functionality via multi-command ioctl. Yes please. Don't forget to send this to Chris as well! [...] Kind regards Uffe