nftl module problem

연구 2010. 12. 1. 02:58
hello
this is my first time to post email to this list ,if I do not
follow the rules,I am sorry
recently,I tried the nftl module in MTD,I found it could not work
well, so I debug it , and found one place that I thought it was the
wrong place.

in the nftlcore.c file ,line 178 to 198 ,the function nftl_write
,as follows:

-- static int nftl_write(struct mtd_info *mtd, loff_t offs, size_t len,
-- size_t *retlen, uint8_t *buf, uint8_t *oob)
--{
--struct mtd_oob_ops ops;
--int res;

--ops.mode = MTD_OOB_PLACE;

--ops.ooboffs = offs;------------------------------------this place
,I thought i should be 0 ,or offs&(mtd->writesize-1), if the value is
offs, it will be over, and cannot work


--ops.ooblen = mtd->oobsize;
--ops.oobbuf = oob;
--ops.datbuf = buf;
--ops.len = len;

--res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
--*retlen = ops.retlen;
--return res;
--}

I debug it on nandsim (I made a little change on nftl to let it work
on nandsim,just change the nftl_add_mtd function, let it can
recongnize nandsim)
I change ops.ooboffs=offs into ops.oobffs=0, it can work ;


출처 : http://lists.infradead.org/pipermail/linux-mtd/2008-October/023219.html

anyone could give me an answer whether my change is right?

'연구' 카테고리의 다른 글

mtd 자료 블로그  (0) 2010.12.06
FTLs for NANDSim  (0) 2010.12.01
MTD nandsim HOWTO for yaffs users  (0) 2010.09.30
하드디스크의 CHS와 LBA, 그리고 CHS <-> LBA Translator  (0) 2010.07.21
libATA  (0) 2010.07.18

WRITTEN BY
RootFriend
개인적으로... 나쁜 기억력에 도움되라고 만들게되었습니다.

,