summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include/usb
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2012-06-21 10:52:49 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2012-06-22 08:55:22 +0200
commit445a3a04d8cb388786bbe8f997bf2034521dea09 (patch)
treedeb4b637beecab7569c5ac41f129d42c0db3c479 /payloads/libpayload/include/usb
parent57cd1dd29679918afa650c2a7e82a474765f357d (diff)
downloadcoreboot-445a3a04d8cb388786bbe8f997bf2034521dea09.tar.xz
libpayload: Shutdown reasonably if we can't init usb msc device
This lets the init of usb mass storage return if the device configuration is unusable. Also add some checks for proper shutdown so we don't free/remove an uninitialized device. Change-Id: I6daf9b38e632b6e381bcd5a7717f0f1a3150b64a Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/1130 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/include/usb')
-rw-r--r--payloads/libpayload/include/usb/usbmsc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/payloads/libpayload/include/usb/usbmsc.h b/payloads/libpayload/include/usb/usbmsc.h
index b8a8ec13c9..fafa6f5979 100644
--- a/payloads/libpayload/include/usb/usbmsc.h
+++ b/payloads/libpayload/include/usb/usbmsc.h
@@ -35,6 +35,7 @@ typedef struct {
unsigned int protocol;
endpoint_t *bulk_in;
endpoint_t *bulk_out;
+ int usbdisk_created;
} usbmsc_inst_t;
#define MSC_INST(dev) ((usbmsc_inst_t*)(dev)->data)