Re: patch "firmware loader: allow disabling of udev as firmware loader" added to driver-core tree

From: Takashi Iwai
Date: Tue Aug 05 2014 - 12:01:23 EST


At Tue, 5 Aug 2014 17:55:40 +0200,
Jean-Michel Hautbois wrote:
>
> 2014-08-05 17:53 GMT+02:00 Takashi Iwai <tiwai@xxxxxxx>:
> > At Tue, 5 Aug 2014 17:43:17 +0200,
> > Jean-Michel Hautbois wrote:
> >>
> >> 2014-08-01 22:01 GMT+02:00 <B_B_Singh@xxxxxxxx>:
> >> > Hi Takashi,
> >> >
> >> > Sorry for the late response, I tried with latest stable kernel 3.15.8. surprisingly the BIOS update works even without applying the patch in both the cases.
> >>
> >> Hi,I'm sorry for my late answer too, but I didn't try this patch recently...
> >>
> >> I have a Lattice FPGA on my board, and it seems that your patch breaks
> >> the firmware loading.
> >> I have the following config :
> >> CONFIG_FW_LOADER=y
> >> CONFIG_FW_LOADER_USER_HELPER=n
> >> FW_LOADER_USER_HELPER_FALLBACK=n
> >> LATTICE_ECP3_CONFIG=y
> >
> > It worked before applying my patch properly...?
> >
> > The kernel Oops itself is a bug in lattice-ecp3-config driver.
> > It blindly assumes that the returned firmware is non-NULL.
> > firmware_load() must have a NULL check of fw at the beginning.
> >
> >
> > thanks,
> >
> > Takashi
>
> Yes, it worked, if the firmware was in the /lib/firmware directory.

Then double-check whether it's really my patch who broke.
In your kernel log:

[ 1.188285] lattice-ecp3 spi2.3: Direct firmware load for lattice-ecp3.bit failed with error -2

which indicates that the direct f/w loading from /lib/firmware failed.
Since this code path is called no matter which kernel option is set,
the failure is very unlikely by my patch.


Takashi

> You are right, it lacks a NULL check, I will fix that.
>
> Thanks,
> JM
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/