From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Fri, 15 May 2009 07:27:09 +0200 Subject: [U-Boot] [PATCH v2] IDE: bail out of dev_print() for unknown device types In-Reply-To: <1242334789-22214-1-git-send-email-wd@denx.de> References: <1242334637-22142-1-git-send-email-wd@denx.de> <1242334789-22214-1-git-send-email-wd@denx.de> Message-ID: <200905150727.09965.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On Thursday 14 May 2009 22:59:49 Wolfgang Denk wrote: > Commit 574b319512 introduced a subtle bug by mixing a list of tests > for "dev_desc->type" and "dev_desc->if_type" into one switch(), which > then mostly did not work because "dev_desc->type" cannot take any > "IF_*" type values. A later fix in commit 8ec6e332ea changed the > switch() into testing "dev_desc->if_type", but at this point the > initial test for unknown device types was completely lost, which > resulted in output like that for IDE ports without device attached: > > Device 1: Model: Firm: Ser#: > Type: # 1F # > Capacity: not available > > This patch re-introduces the missing test for unknown device types. > > Signed-off-by: Wolfgang Denk > Cc: Stefan Roese > Cc: Detlev Zundel Tested-by: Stefan Roese One small nitpicking comment though below. > --- > Oh those **** typos! > > disk/part.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/disk/part.c b/disk/part.c > index c777493..39c1b42 100644 > --- a/disk/part.c > +++ b/disk/part.c > @@ -114,6 +114,11 @@ void dev_print (block_dev_desc_t *dev_desc) > lbaint_t lba512; > #endif > > + if (dev_desc->type==DEV_TYPE_UNKNOWN) { if (dev_desc->type == DEV_TYPE_UNKNOWN) { Thanks. Best regards, Stefan ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================