[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] xilinx_gpio driver patch



Hi Jeff,

Jeff Fellin wrote:
When configuring my system with three Xilinx Gpio devices using
drivers/char/xilinx_gpio, my system would hang during bootup. I isolated the
problem to the xilinx_gpio driver, on an error condition in xgpio_probe.
When the second device was probed, the request_irq failed leaving the
inst_list_sem locked, so when the third probe started it blocked on
acquiring the lock.

Just having a closer look, I think there is still a little more to be done here. There are a couple of errors in the failure path out of the probe() function that we should fix.

* The !miscdev test (line 401) should set retval and goto failed3, instead of returning immediately (currently would do so with lock held).

* The test after the misc_register call (line 412-415) should not do the up_write - that should be handled by the failed3: exit path

Also, I'm wondering why your call to request_irq failed in the first place. Have you doubled up multiple GPIO instances on the same IRQ, or something else?

What do you think?

John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/