ARM patches for orinoco
Ben Greear
greearb at candelatech.com
Thu Feb 28 11:23:08 EST 2002
David Gibson wrote:
> On Mon, Feb 25, 2002 at 10:41:33PM -0700, Ben Greear wrote:
>
>>The patch is attached. Some of it you probably will not
>>want (the debug stuff). The reset code doesn't actually
>>seem to help me, but it is no worse than the current state
>>(both of which are totally broken). I think that a more
>>thorough reset (can you power the device down in software?)
>>might help rejuvinate the system...
>>
>
> Most cards can be powered down in software, but the means of doing so
> depends on the interface type (PCMCIA / PLX / Airport).
So, any idea how to figure out how to do a better reset of a
CF orinoco card?
Do you agree that a reset should occur after some number of
timeouts (-110)?
>
>
>>The alignment pads and __attribute__ packed changes
>>actually seem to make it work on ARM w/out special
>>compilation hacks. I think these should definately
>>go in... In the future, you may want to design your
>>structures such that they are aligned to 4 byte boundaries,
>>internally too. In other words, don't do this:
>>
>>struct foo {
>> char a;
>> uint32 i;
>> uint16 u;
>> char a1;
>>};
>>
>>But instead, perhaps do this:
>>struct foo {
>> char a;
>> char a1;
>> uint16 u;
>> uint32 i;
>>};
>>
>
> I've added the ((packed)) attribute to struct p8022_hdr, but not to
> struct hermes. As long as each of the modules are compiled with the
> same options it shouldn't matter how struct hermes is aligned - it's a
> purely internal structure. The only structures where ((packed))
> should matter are where they are mapped onto external byte streams -
> actual packets from the card. In which case I obviously can't reorder
> the elements.
I suggested the alignment, because it would not be too hard to compile
user-space differently aligned than kernel space. Then, the packed
structs coming through the IOCTL interface may have different sizes
or alignments. It's true that a careful user can deal with this, but
if possible, why make them care?
Thanks,
Ben
--
Ben Greear <greearb at candelatech.com> <Ben_Greear AT excite.com>
President of Candela Technologies Inc http://www.candelatech.com
ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
More information about the wireless
mailing list