[Yaffs] patch for 2.6.8.1
Nick Bane
nick@cecomputing.co.uk
Thu, 2 Sep 2004 13:40:30 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_0022_01C490F2.69C7E590
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi folks,
3 little mods that gets yaffs running on 2.6.8.1. The (unavailable) =
thing is because I couldn't rapidly identify how to extract the name of =
the superblock obkect as the dev entry is albeled as an index and not as =
expected.
For kernel integration examples in 2.4.25 and 2.6.8.1, see trees at =
http://husaberg.toby-churchill.com/balloon/. I am also starting a cvs =
repository for 2.6 with viewcvs access.
Nick
-----------------------
Nick Bane
nick@cecomputing.co.uk
+44 (0)1954 719270=20
------=_NextPart_000_0022_01C490F2.69C7E590
Content-Type: application/octet-stream;
name="diff-2.6.8.1-tcl1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="diff-2.6.8.1-tcl1"
diff -urN yaffs-clean/yaffs_fs.c yaffs-2.6.8/yaffs_fs.c=0A=
--- yaffs-clean/yaffs_fs.c Thu Nov 20 08:54:05 2003=0A=
+++ yaffs-2.6.8/yaffs_fs.c Thu Sep 2 13:17:32 2004=0A=
@@ -52,7 +52,8 @@=0A=
#include <asm/statfs.h>=0A=
#define UnlockPage(p) unlock_page(p)=0A=
#define Page_Uptodate(page) test_bit(PG_uptodate, &(page)->flags)=0A=
-#define kdevname(x) cdevname(to_kdev_t(x))=0A=
+//#define kdevname(x) cdevname(to_kdev_t(x))=0A=
+#define kdevname(x) "(unavailable)" // temporary fix=0A=
#else=0A=
#include <linux/locks.h>=0A=
#endif=0A=
@@ -582,7 +583,7 @@=0A=
inode->i_gid =3D obj->st_gid;=0A=
inode->i_blksize =3D inode->i_sb->s_blocksize;=0A=
#if defined(CONFIG_KERNEL_2_5)=0A=
- inode->i_rdev =3D to_kdev_t(obj->st_rdev);=0A=
+ inode->i_rdev =3D old_decode_dev(obj->st_rdev);=0A=
inode->i_atime.tv_sec =3D (time_t)(obj->st_atime);=0A=
inode->i_atime.tv_nsec =3D 0;=0A=
inode->i_mtime.tv_sec =3D (time_t)obj->st_mtime;=0A=
diff -urN yaffs-clean/yaffs_mtdif.c yaffs-2.6.8/yaffs_mtdif.c=0A=
--- yaffs-clean/yaffs_mtdif.c Sun Jul 20 15:03:30 2003=0A=
+++ yaffs-2.6.8/yaffs_mtdif.c Thu Sep 2 13:15:34 2004=0A=
@@ -31,6 +31,8 @@=0A=
=0A=
struct nand_oobinfo yaffs_oobinfo =3D {=0A=
useecc: 1,=0A=
+// this is for versions of mtd nand driver in kernel 2.6.8 and later=0A=
+ eccbytes: 6,=0A=
eccpos: {8, 9, 10, 13, 14, 15}=0A=
};=0A=
=0A=
------=_NextPart_000_0022_01C490F2.69C7E590--