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?

> Index: if_iwm.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v
> retrieving revision 1.222
> diff -u -p -r1.222 if_iwm.c
> --- if_iwm.c  10 Dec 2017 20:34:41 -0000      1.222
> +++ if_iwm.c  11 Dec 2017 16:11:16 -0000
> @@ -7592,11 +7592,13 @@ iwm_preinit(struct iwm_softc *sc)
>  void
>  iwm_attach_hook(struct device *self)
>  {
> +#ifndef RAMDISK_HOOKS
>       struct iwm_softc *sc = (void *)self;
>  
>       KASSERT(!cold);
>  
>       iwm_preinit(sc);
> +#endif
>  }
>  
>  void
> 

Reply via email to