CFT: macio attachment for if_wi

YongHyeon PYUN pyunyh at gmail.com
Mon Sep 26 02:17:56 UTC 2011


On Sun, Sep 25, 2011 at 08:54:41AM -0400, Justin Hibbits wrote:
> Attached is a patch adding the macio attachment for the if_wi driver,  
> to support the airport card in PowerPC macs.  To do this I needed to  
> modify the wi_read_bap and wi_write_bap functions to use the bus space  
> stream functions instead of regular functions, like NetBSD and OpenBSD  
> do.  I currently get a 'no carrier' status from ifconfig, so I can't  
> fully test connections, only the attachment.  Testing wanted and  
> needed to make sure I didn't break anything.
> 

It seems the WI_DATA0/WI_DATA1 registers provide access to data
with FIFO style.  This indicates driver have to read raw data and
subsequent access would have to use htoleXX() macro to compare it
with the raw data instead of converting it from little-endian to
host byte order.
So your patch looks like the first step that goes to right
direction.  As Adrian said, there could be multiple places that
used wrong data from endianess view.

BTW, you may have to implement suspend/resume method to properly
stop driver before entering into suspend.

> - Justin


More information about the freebsd-ppc mailing list