]> git.karo-electronics.de Git - mv-sheeva.git/commit
Staging: bcm: Fix semaphore locking error when downloading firmware.
authorKevin McKinney <klmckinney1@gmail.com>
Wed, 23 Nov 2011 01:25:57 +0000 (20:25 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 27 Nov 2011 01:14:48 +0000 (17:14 -0800)
commitd9f26a6689a3e4ae643fca9c2acda3148b717e63
treef9aa6e45e7806b4c151974f533a27438ea006111
parentabe33fc0933f9221193fc047fbf93cf9db23c8f6
Staging: bcm: Fix semaphore locking error when downloading firmware.

This patch releases semaphore locks when
an error occurrs while attempting to
download firmware for the bcm driver.
When downloading firmware for this driver,
a process is expected to call
the following ioctl's in this order:
(1)IOCTL_BCM_BUFFER_DOWNLOAD_START,
(2)IOCTL_BCM_BUFFER_DOWNLOAD, and (3)
IOCTL_BCM_BUFFER_DOWNLOAD_STOP.
Semaphore, “Adapter->fw_download_sema” is
expected to be acquired in the first ioctl,
IOCTL_BCM_BUFFER_DOWNLOAD_START, and it should
block until IOCTL_BCM_BUFFER_DOWNLOAD_STOP
is called.  In this case, if an error
occurred before STOP finished, the semaphore
"Adapter->fw_download_sema" was not being released.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/bcm/Bcmchar.c