[Letux-kernel] Found a bug in wwan driver

H. Nikolaus Schaller hns at goldelico.com
Fri Jun 24 12:09:55 CEST 2016


> Am 24.06.2016 um 11:14 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> Hi,
> it looks as if I have found a bug in the wwan driver which
> explains the issues Lukas has reported at our workshop.
> 
> The problem was that the probe function could still fail
> *after* registering the driver as a gpio. This did make
> a second prope attempt which either resulted in two drivers
> or 
> 
> [    9.182617] gpio gpiochip10: Detected name collision for GPIO name 'gpio-wwan-enable'
> 
> I have now modifed the driver and probe to use devm where
> possible and that simplifies the error path. Appears to silence
> this bug.
> 
> But there is another one:
> 
> root at letux:/sys/firmware/devicetree/base/modem# dmesg|fgrep successf
> [    9.168273] wwan-on-off successfully probed
> [    9.907867] wwan-on-off successfully probed
> 
> So the driver is being probed twice (creating two instances), although there
> is only one node in the DT.

Ah, I think I found it.

We have indeed only one modem node, but there is also another one in the
sound subsystem:

	modem_en: modem { /* control modem power through rfkill */
		compatible = "option,gtm601";

	gtm601_codec: gsm_codec {
		compatible = "option,gtm601";
		#sound-dai-cells = <0>;
	};

We should better have option,gtm601-power and option,gtm601 (pcm).

Will try a fix for this...

And I think the key learning is that we should do more testing.
How could we do that?

> 
> root at letux:/sys/firmware/devicetree/base/modem# dmesg|fgrep wwan|fgrep 'probe('
> [    9.118774] wwan_on_off_probe()
> [    9.135925] wwan_on_off_probe() pdata=ed4b9b90
> [    9.168457] wwan_on_off_probe()
> [    9.168487] wwan_on_off_probe() pdata=ed4b9850
> 
> Any ideas? Anyone seen such a thing before?
> 
> BR,
> Nikolaus
> 
> _______________________________________________
> http://projects.goldelico.com/p/gta04-kernel/
> Letux-kernel mailing list
> Letux-kernel at openphoenux.org
> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel



More information about the Letux-kernel mailing list