public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* FTL endianness
@ 2000-03-27 10:01 David Woodhouse
  0 siblings, 0 replies; only message in thread
From: David Woodhouse @ 2000-03-27 10:01 UTC (permalink / raw)
  To: mtd; +Cc: dhinds

I'm porting the latest FTL code to the MTD system. I see code like this:

  if ((header.NumEraseUnits > 65536) || (header.BlockSize != 9) ||
	(header.EraseUnitSize < 10) || (header.EraseUnitSize > 31) ||
	(header.NumTransferUnits >= header.NumEraseUnits)) {
	printk(KERN_NOTICE "ftl_cs: FTL header corrupt!\n");
	return -1;
    }

This is odd - unless I'm missing something, it means that FTL on bigendian
machines has to be bigendian, and FTL on littleendian machines has to be
littleendian. And that you can't swap flash cards between the two.

The NFTL spec certainly says that the format on the media should be 
little-endian, so I byteswap it all. Isn't this the case for FTL?

If so - how many people are actually using FTL on BE machines? If there aren't 
{m,}any, we can just fix it and forget about it. Otherwise we could make it 
conditional and/or provide two modules - ftl_be and ftl_le.


--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-03-27 10:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-27 10:01 FTL endianness David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox