From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Thu, 13 Jun 2013 15:21:15 +0200 Subject: [U-Boot] [PATCH] LaCie kirkwood boards: allow disk > 2TB In-Reply-To: <51B9C335.9000803@starox.org> References: <1370871053-14524-1-git-send-email-fredo@starox.org> <20130613133352.4fa73a9e@lilith> <51B9C335.9000803@starox.org> Message-ID: <20130613152115.65a4b5fb@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Fr?d?ric, On Thu, 13 Jun 2013 15:03:49 +0200, Fr?d?ric Leroy wrote: > Le 13/06/2013 13:33, Albert ARIBAUD a ?crit : > > With gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) this patch causes > > the following warning for all boards: > > > > cmd_ide.c:992:4: warning: right shift count >= width of type [enabled > > by default] > > > > Amicalement, > > I will convert every ide block number to 64 bit for disk and partitions. Be careful that some struct fields representing sector / block number might be 32-bit for an external reason, e.g. in partition tables. > I guess CONFIG_LBA48 is also broken in common/cmd_ide.c : > > ulong ide_write(int device, ulong blknr, lbaint_t blkcnt, const void > *buffer) > { > ulong n = 0; > unsigned char c; > > #ifdef CONFIG_LBA48 > unsigned char lba48 = 0; > > if (blknr & 0x0000fffff0000000ULL) { <= issue > /* more than 28 bits used, use 48bit mode */ > lba48 = 1; > } > #endif How is this broken exactly, and what is the fix? > I hope this won't break anything, it is a big change impacting everybody :( It would affect everybody but within a well-delimited feature, which is disk access. Tests on a few targets with disks of various sizes should be enough. > Sinc?rement, Amicalement, -- Albert.