From f29a4b86f554a496beba8d339917399b9c44fbc9 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 31 Jan 2005 22:22:24 +0000 Subject: [PATCH] [MTD] DiskOnChip: big endian fix for NFTL devices Make NFTL devices work on big endian machines. Signed-off-by: Thomas Gleixner --- drivers/mtd/nand/diskonchip.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index 39224012030..d5927674f28 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c @@ -16,7 +16,7 @@ * * Interface to generic NAND code for M-Systems DiskOnChip devices * - * $Id: diskonchip.c,v 1.47 2005/01/31 22:21:15 gleixner Exp $ + * $Id: diskonchip.c,v 1.48 2005/01/31 22:22:21 gleixner Exp $ */ #include @@ -1122,6 +1122,10 @@ static inline int __init nftl_partscan(struct mtd_info *mtd, if (!(numheaders=find_media_headers(mtd, buf, "ANAND", 1))) goto out; mh = (struct NFTLMediaHeader *) buf; + mh->NumEraseUnits = le16_to_cpu(mh->NumEraseUnits); + mh->FirstPhysicalEUN = le16_to_cpu(mh->FirstPhysicalEUN); + mh->FormattedSize = le32_to_cpu(mh->FormattedSize); + printk(KERN_INFO " DataOrgID = %s\n" " NumEraseUnits = %d\n" " FirstPhysicalEUN = %d\n" -- 2.41.0