From e28a61550c5f33d7636ee8f03f6bb7307475fb3e Mon Sep 17 00:00:00 2001 From: Mathias Krause Date: Tue, 29 May 2012 14:28:26 +0200 Subject: libpayload: fix OHCI IN commands Due to operator precedence incomming USB commands were missing some flags. Change-Id: I87ef51590c9db7a6cbc7304e1ccac29895f8a51e Signed-off-by: Mathias Krause Reviewed-on: http://review.coreboot.org/1084 Reviewed-by: Mathias Krause Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- payloads/libpayload/drivers/usb/ohci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'payloads/libpayload/drivers') diff --git a/payloads/libpayload/drivers/usb/ohci.c b/payloads/libpayload/drivers/usb/ohci.c index 3a1b51d19c..2c14b9fed6 100644 --- a/payloads/libpayload/drivers/usb/ohci.c +++ b/payloads/libpayload/drivers/usb/ohci.c @@ -279,7 +279,7 @@ ohci_control (usbdev_t *dev, direction_t dir, int drlen, void *devreq, int dalen while (pages > 0) { cur++; - cur->config = (dir==IN)?TD_DIRECTION_IN:TD_DIRECTION_OUT | + cur->config = (dir == IN ? TD_DIRECTION_IN : TD_DIRECTION_OUT) | TD_DELAY_INTERRUPT_NODELAY | TD_TOGGLE_FROM_ED | TD_CC_NOACCESS; @@ -306,7 +306,7 @@ ohci_control (usbdev_t *dev, direction_t dir, int drlen, void *devreq, int dalen } cur++; - cur->config = (dir==IN)?TD_DIRECTION_OUT:TD_DIRECTION_IN | + cur->config = (dir == IN ? TD_DIRECTION_OUT : TD_DIRECTION_IN) | TD_DELAY_INTERRUPT_NODELAY | TD_TOGGLE_FROM_TD | TD_TOGGLE_DATA1 | @@ -373,7 +373,7 @@ ohci_bulk (endpoint_t *ep, int dalen, u8 *data, int finalize) } for (cur = tds; cur->next_td != 0; cur++) { - cur->config = (ep->direction==IN)?TD_DIRECTION_IN:TD_DIRECTION_OUT | + cur->config = (ep->direction == IN ? TD_DIRECTION_IN : TD_DIRECTION_OUT) | TD_DELAY_INTERRUPT_NODELAY | TD_TOGGLE_FROM_ED | TD_CC_NOACCESS; -- cgit v1.2.3