[Letux-kernel] Found a bug in wwan driver

H. Nikolaus Schaller hns at goldelico.com
Fri Jun 24 11:14:30 CEST 2016

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

[    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.

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?


More information about the Letux-kernel mailing list