On 06-08-12 22:48 Patrick Simmons wrote:

> Thanks for your help, Ulrich.
> Would an unaligned memory access look like just an array indexing?  
> Perhaps something like this? (version r83)
> zd1205.c:108:#define getSeq(pWlanHdr)                   
> (((u16)pWlanHdr->SeqCtrl[1] << 4) + (u16)((pWlanHdr->SeqCtrl[0] & 0xF0) 
> >> 4))

No SeqCtrl are byte arrays, you can't have an unaligned read on
bytes. Look for two-byte or four-byte types!

> If not, how can I tell whether something is aligned or not?  I read the 
> section on unaligned access in the kernel drivers guide you pointed too, b

I told you that is difficult.

> As far as the trap, the dmesg log mentions this:
> Unsupported unaligned load/store trap for kernel at <0000000000573bec>.
>              \|/ ____ \|/
>              "@'/ .. \`@"
>              /_| \__/ |_\
>                 \__U_/
> I'm guessing that I should do something with <0000000000573bec>, but I 
> don't know where to start.  Is that the address of the invalid code in 
> the module or the address of the trap handler which got called?  In any 
> case, how do I use this number to determine what function the problem is in?

This is the address of the invalid code. It's a pity that they
don't write out a normal kernel oops, which would give us much
more information. Look into /proc/modules and /boot/System.map*
to check where it is. If it is in zd1211 you can uses
nm -n -g zd1211.ko to find the right function.

It should be simpler if you are using gdb. The Linux Device Driver
book describes it in chapter 4 on pages 99ff.

I have reviewed the rx path of zd1211rw. The probable alignment problems I
mentioned appear to be handled.

Uli Kunitz

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs

Reply via email to