Prism2 firmware upload support.

M. Warner Losh imp at bsdimp.com
Fri Jun 6 09:18:24 PDT 2003


In message: <20030606123639.L801-100000 at foem>
            Dirk-Willem van Gulik <dirkx at webweaving.org> writes:
: Has anyone looked at the existing symbol firmware loading code in freebsd
: 5.x and looked at generalizing this with some ioctl()'s for
: upload/download of firmware (and propalby an extra SIOCGPRISM2INFO to give
: userland enough of an idea of the primary/secondary version numbers to be
: able to select/check the hex files) ?

I've looked into it.  Primary/secondary versions aren't as interesting
as the actual product ID for determining which hex file to load.
There's also a need for getting additional data out of the current
firmware so it can be merged into the hex file before we burn the new
firmware.  There's also a number of sanity checks that need to be made
to make sure that primary firmware is compatible with the secondary
firmware you are loading, etc.

: I've started coding some of this into the wi driver - but one thing which
: worries me is how to properly activate it; i.e. how does one from an ioctl
: a clean detach/probe sort of thing ? I take it that one cannot call
: wi_generic_detach(), wi_generic_attach() from inside the ioctol handler ?

I don't think you need to call attach/detach.  I think its overkill
and completely unnecessary.  There's really no need at all to do this.
You should take the interface down, note you are updating the firmware
to preclude it coming back up, do the firmware upload, and then call
wi_init again.  It may make sense to set certain flags based on the
new version, but I don't think much else is required.

Warner


More information about the freebsd-hackers mailing list