> On 11/12/17(Mon) 17:44, Stefan Sperling wrote:
> > When the root filesystem is mounted, the iwm(4) driver will try to
> > load firmware from the root filesystem in order to read the MAC
> > address.
> > 
> > This has never worked in bsd.rd and results in a bogus "could not
> > load firmware" error being displayed during every upgrade.
> > 
> > With this diff, when the driver runs in bsd.rd it will try to
> > load firmware when the interface comes up for the first time
> > which avoids the pointless error.
> > 
> > Personally, I think this change is long overdue...
> 
> Why not load the firmware in iwm_init()/init_hw() like other wireless
> drivers do?

That does get done.  But the ramdisk doesn't contain the firmware.
If you upgrade, the real disk gets mounted.  This hook would notice
that, and call back into the driver (locking issues who cares about
locking issues) to do the job.  Reason is because firmload contains:

#ifdef RAMDISK_HOOKS
        /* try again with mounted disk */
        if (error) {
                if (snprintf(path, MAXPATHLEN, "/mnt/etc/firmware/%s", name) >=
                    MAXPATHLEN) {


And that part actually works really nicely in many other drivers.

Reply via email to