summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2013-09-25 13:54:57 -0700
committerIsaac Christensen <isaac.christensen@se-eng.com>2014-08-18 19:05:24 +0200
commitb59e8505d841bafb9ffdaf2086f46d62a0e1689a (patch)
treefed4d2079b1c99adb0381f808003f8e0ab95e338 /src/cpu
parentf0cd03c142013e0f50705a1c8741c0f02bea43de (diff)
libpayload: usbmsc: Remove DETACHED state from MSC device structure
The USB MSC device structure contains a "ready" state that can be either "ready", "not ready" or "detached". The last one can only be assigned when the device is completely unresponsive and gets forcefully logically detached via usb_detach_device(). This call (at least in the current version) also calls all destructors and frees the complete usbdev_t structure (including the MSC specific part), which unfortunately makes storing the "detached" state in that very structure a little pointless. This patch reduces the "ready" value to a simple boolean and makes sure that all detachment cases immediately return from the MSC driver, carefully avoiding any use-after-free opportunities. Change-Id: Iff1c0849f9ce7c95d399bb9a1a0a94469951194d Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/170667 (cherry picked from commit fd4529f37fdd1c93a8b902488ffeef7001b1a05a) Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6654 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/cpu')
0 files changed, 0 insertions, 0 deletions