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. 

The attached patch, applied with
        cd petalinux-dist
        patch -p0 xilinx_gpio.patch

releases the lock on failure.


*** linux-2.6.x/drivers/char/xilinx_gpio/Oadapter.c     2007-07-30
18:16:49.000000000 -0400
--- linux-2.6.x/drivers/char/xilinx_gpio/adapter.c      2007-07-30
18:38:13.000000000 -0400
***************
*** 449,454 ****
--- 449,455 ----
        minor--;

        failed3:
+       up_write(&inst_list_sem);
        iounmap((void *)(xgpio_config.BaseAddress));

        failed2:
 


_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to