[{"id":1766820,"web_url":"http://patchwork.ozlabs.org/comment/1766820/","msgid":"<7dc92b3f78094d92a5a38c2331d7b8c4@SFHDAG6NODE3.st.com>","list_archive_url":null,"date":"2017-09-12T09:32:08","subject":"Re: [U-Boot] [PATCH v2] cmd: usb: add check on usb_stor_curr_dev in\n\tusb dev command","submitter":{"id":70437,"url":"http://patchwork.ozlabs.org/api/people/70437/","name":"Patrick DELAUNAY","email":"patrick.delaunay@st.com"},"content":"Hi Marek,\n\n> Subject: [PATCH v2] cmd: usb: add check on usb_stor_curr_dev in usb dev command\n> \n> If the command 'usb start' is successfully executed but U-Boot don't found a\n> storage device (usb_stor_curr_dev stay to -1) the next command 'usb dev'\n> without parameter leads to data abort after the message \"USB device -1\"\n> \n> The added check on usb_stor_curr_dev avoid the issue.\n> \n> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>\n> ---\n> \n> Changes in v2:\n> - Updated the commit message\n> - use command_ret_t for result\n\nAfter push V2 version today, I try to rebase my patch on latest version on v2017.09\nBut I have conflict with the patch wich introduce blk_common_cmd() usage.\n\nSo I check that the issue is still present with the same test on sandbox....\nbefore to found a way to solve the merge conflict,\nAnd in fact the issue is now solved without patch.\n\nHe confirmes it with code review for the 2 case in  blk_print_device_num()\n=> Loop in get_desc() for blk-uclass.c (-1 is no more used as index)\n=> check devnum < 0 in get_desc() for blk_legacy.c\n\nSo I will abandon my patch....\n\nTest done on sandbox :\n\nRemove flash-stick for node usb@1  in arch/sandbox/dts/sandbox.dts\n\n$> make sandbox_defconfig\n$> make\n$> ./u-boot -d u-boot.dtb\n\n\nU-Boot 2017.09-00001-gdbdb82c (Sep 12 2017 - 10:59:47 +0200)\n\nModel: sandbox\nDRAM:  128 MiB\nMMC:   \nUsing default environment\n\nIn:    cros-ec-keyb\nOut:   vidconsole\nErr:   vidconsole\nModel: sandbox\nSCSI:  Net:   eth0: eth@10002000, eth1: eth@80000000, eth5: eth@90000000\nIDE:   Bus 0: not available  \n=> usb start\nstarting USB...\nUSB0:   scanning bus 0 for devices... 1 USB Device(s) found\n       scanning usb for storage devices... 0 Storage Device(s) found\n=> usb dev\n\nno usb devices available\n=>\n\nBest Regards, Patrick","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xs020466kz9s82\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 19:32:24 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 59608C21E66; Tue, 12 Sep 2017 09:32:16 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 1E21FC21DC4;\n\tTue, 12 Sep 2017 09:32:14 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 71B33C21C97; Tue, 12 Sep 2017 09:32:13 +0000 (UTC)","from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com\n\t[62.209.51.94]) by lists.denx.de (Postfix) with ESMTPS id 2DB3DC21C57\n\tfor <u-boot@lists.denx.de>; Tue, 12 Sep 2017 09:32:13 +0000 (UTC)","from pps.filterd (m0046037.ppops.net [127.0.0.1])\n\tby mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8C9SrCN024175; Tue, 12 Sep 2017 11:32:10 +0200","from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35])\n\tby mx07-00178001.pphosted.com with ESMTP id 2cv62r0v7b-1\n\t(version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT);\n\tTue, 12 Sep 2017 11:32:10 +0200","from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9])\n\tby beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 692E43A;\n\tTue, 12 Sep 2017 09:32:09 +0000 (GMT)","from Webmail-eu.st.com (sfhdag6node1.st.com [10.75.127.16])\n\tby zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 12F4024AB;\n\tTue, 12 Sep 2017 09:32:09 +0000 (GMT)","from SFHDAG6NODE3.st.com (10.75.127.18) by SFHDAG6NODE1.st.com\n\t(10.75.127.16) with Microsoft SMTP Server (TLS) id 15.0.1178.4;\n\tTue, 12 Sep 2017 11:32:08 +0200","from SFHDAG6NODE3.st.com ([fe80::d04:5337:ab17:b6f6]) by\n\tSFHDAG6NODE3.st.com ([fe80::d04:5337:ab17:b6f6%20]) with mapi id\n\t15.00.1178.000; Tue, 12 Sep 2017 11:32:08 +0200"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW\n\tautolearn=unavailable autolearn_force=no version=3.4.0","From":"Patrick DELAUNAY <patrick.delaunay@st.com>","To":"\"u-boot@lists.denx.de\" <u-boot@lists.denx.de>","Thread-Topic":"[PATCH v2] cmd: usb: add check on usb_stor_curr_dev in usb dev\n\tcommand","Thread-Index":"AQHTK6U8R0QciB4PckaFfIqDsDtHa6Kw+JfQ","Date":"Tue, 12 Sep 2017 09:32:08 +0000","Message-ID":"<7dc92b3f78094d92a5a38c2331d7b8c4@SFHDAG6NODE3.st.com>","References":"<1505206676-13222-1-git-send-email-patrick.delaunay@st.com>","In-Reply-To":"<1505206676-13222-1-git-send-email-patrick.delaunay@st.com>","Accept-Language":"fr-FR, en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-ms-exchange-transport-fromentityheader":"Hosted","x-originating-ip":"[10.75.127.48]","MIME-Version":"1.0","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-12_04:, , signatures=0","Cc":"Marek Vasut <marex@denx.de>, Stefan Roese <sr@denx.de>,\n\tYann GAUTIER <yann.gautier@st.com>,\n\tMichal Simek <michal.simek@xilinx.com>","Subject":"Re: [U-Boot] [PATCH v2] cmd: usb: add check on usb_stor_curr_dev in\n\tusb dev command","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]