Re: [PATCH] My work on MemoryStick system

Previous thread: [PATCH -mm V3] kbuild: fix reading CROSS_COMPILE from .config by Wu Fengguang on Saturday, August 21, 2010 - 6:07 am. (3 messages)

Next thread: hello by SONG LEE on Saturday, August 21, 2010 - 3:46 am. (1 message)
From: Alex Dubov
Date: Saturday, August 21, 2010 - 6:50 am

It will work with any multiply of 4 (24 and 28 work as well). It's a known




      
--

From: Maxim Levitsky
Date: Saturday, August 21, 2010 - 7:56 am

Then I bump the size of ms_registers to 32 and leave this as is.
OK?
And I add a warning about this feature of some hardwares someplace.


But what about MS_TPC_GET_INT. This asks for single byte.
Read it?

You allocate the memory with kmalloc, create a sg with sg_init_one and
pass that to driver.
So therefore it can be from arbitrary address.

In fact swiotlb takes care of that, and I just forgot the dma_unmap_sg

I found further problems in jmicron driver:


1. Serial mode doesn't work well.
I first read the boot block, and then enable parallel mode.
I do so because boot block has a flag that tells if parallel mode is
supported.
It turns out that sector reads often don't finish, especially first and
often second one which contain boot blocks.
If I enable parallel mode right away problem goes away.


2. the MS_TPC_WRITE_LONG_DATA fail, therefore I can't write anything to
the stick.

As soon as my driver starts to write a block,  first
MS_TPC_WRITE_LONG_DATA succeeds, but second one timeouts.
(there is no MS_TPC_GET_INT in between, because of parallel mode).

Maybe I do something wrong in my ms_block.c, but I checked it many
times, and it appears to be correct, and it works fine with r592.c


Best regards,
Maxim Levitsky



--

Previous thread: [PATCH -mm V3] kbuild: fix reading CROSS_COMPILE from .config by Wu Fengguang on Saturday, August 21, 2010 - 6:07 am. (3 messages)

Next thread: hello by SONG LEE on Saturday, August 21, 2010 - 3:46 am. (1 message)