From patchwork Fri Apr 14 11:08:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 750799 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3w4FNv1Ps8z9sDG for ; Fri, 14 Apr 2017 21:12:15 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="eyZITVhP"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id BB8ACC21CA5; Fri, 14 Apr 2017 11:10:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E9665C21C8E; Fri, 14 Apr 2017 11:08:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B2D8FC21C3C; Fri, 14 Apr 2017 11:08:28 +0000 (UTC) Received: from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77]) by lists.denx.de (Postfix) with ESMTPS id F3B0DC21CAD for ; Fri, 14 Apr 2017 11:08:23 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v3EB8Lw9024061; Fri, 14 Apr 2017 06:08:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1492168101; bh=xxoloBTZJ9Lc0d15Otc3o5uBQkYXBiIV1KD9W90UEBY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=eyZITVhP57anqG4ztY4jS1Xt+1+8CZQ0KCl8x/Bbu5BZIHjRd1PqHkzDOUwr3stao izi0Ez3GINUPNXBbfmEMuTN32QF9KY782OUZ+xD+rwQZciblLXm1vnCTVa2EG/RMEb 4oxiHR70wvlRBymaJj3vmwCyxhHB/hnTvMiSHiQY= Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v3EB8LYn003437; Fri, 14 Apr 2017 06:08:21 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Fri, 14 Apr 2017 06:08:21 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v3EB8KRk018626; Fri, 14 Apr 2017 06:08:21 -0500 From: Jean-Jacques Hiblot To: , Date: Fri, 14 Apr 2017 13:08:07 +0200 Message-ID: <1492168089-15437-10-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1492168089-15437-1-git-send-email-jjhiblot@ti.com> References: <1492168089-15437-1-git-send-email-jjhiblot@ti.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 09/11] scsi: move the partition initialization out of the scsi detection X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" We might want to get information about the scsi device without initializing the partition. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- common/scsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/scsi.c b/common/scsi.c index d55ba89..972ef338 100644 --- a/common/scsi.c +++ b/common/scsi.c @@ -540,7 +540,6 @@ static int scsi_detect_dev(int target, int lun, struct blk_desc *dev_desc) dev_desc->blksz = blksz; dev_desc->log2blksz = LOG2(dev_desc->blksz); dev_desc->type = perq; - part_init(&dev_desc[0]); removable: return 0; } @@ -605,6 +604,7 @@ int scsi_scan(int mode) device_unbind(bdev); continue; } + part_init(bdesc); if (mode == 1) { printf(" Device %d: ", 0); @@ -634,6 +634,7 @@ int scsi_scan(int mode) &scsi_dev_desc[scsi_max_devs]); if (ret) continue; + part_init(&scsi_dev_desc[scsi_max_devs]); if (mode == 1) { printf(" Device %d: ", 0);