Hi, On Fri, Oct 31, 2008 at 01:38:27PM +0300, Sergei Shtylyov wrote: > >The original driver (see my patch) accesses 0x80D to read error codes, > >so I assumed this is correct. Indeed, the driver works also with the > >standard setting. Is there a way I can clearly verify which is the right > >offset? > > > > I assume you don't have the documentation? I wodner why they needed > to duplicate (or remap) this register... Sadly not. All I have is the specification of the SoC by IDT, but the CompactFlash slot was added by Mikrotik, so it's not mentioned in there. The routerboard user's manual Mikrotik has published doesn't contain much more information about it than "it's there". > No. The alternatives would be to use local variable as a loop counter > or, better yet, using readsb()/writesb() instead of the loops... > Wait! The original driver used 32-bit I/O to this register, not 8-bit -- > so it looks like you have artificially slowed it down... :-/ Ok, so this should be clear now. I changed the code to use readl() and writel() (the reads*() and writes*() versions sadly aren't useable as they increment the target memory pointer) which worked fine. When it comes to the register offsets I'd say in dubio pro reo and keep the custom error address. Changing it afterwards to the standard should also be much easier than fiddling out what the custom offset was again. I'll reply to this mail with an updated patch addressing all discussed problems. Greetings and many thanks, Phil -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html