From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Tue, 02 Sep 2008 21:25:30 -0700 Subject: [U-Boot] [PATCHv2] Don't tftp to unknown flash In-Reply-To: <48BD066B.5070805@scram.de> References: <48BD066B.5070805@scram.de> Message-ID: <48BE11BA.4020803@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jochen Friedrich wrote: > If a board has a variable number of flash banks, there are empty entries > in flash_info[] and CFG_DIRECT_FLASH_TFTP is set, tftp boot fails with > "Outside available Flash". This patch skips flash banks with unknown > flash ids. > > Signed-off-by: Jochen Friedrich > --- > net/tftp.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/net/tftp.c b/net/tftp.c > index 84d83ca..9aeecb8 100644 > --- a/net/tftp.c > +++ b/net/tftp.c > @@ -111,6 +111,8 @@ store_block (unsigned block, uchar * src, unsigned len) > > for (i=0; i /* start address in flash? */ > + if (flash_info[i].flash_id == FLASH_UNKNOWN) > + continue; > if (load_addr + offset >= flash_info[i].start[0]) { > rc = 1; > break; > Added to net repo. thanks, Ben