summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/usb
diff options
context:
space:
mode:
authorMathias Krause <mathias.krause@secunet.com>2012-05-29 14:28:26 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2012-06-01 12:23:04 +0200
commite28a61550c5f33d7636ee8f03f6bb7307475fb3e (patch)
tree5564eca7f682f3a524f4c92a3699232dabed4fc2 /payloads/libpayload/drivers/usb
parent7b7b5666f0d286989402c2372cafb4e02e130dae (diff)
libpayload: fix OHCI IN commands
Due to operator precedence incomming USB commands were missing some flags. Change-Id: I87ef51590c9db7a6cbc7304e1ccac29895f8a51e Signed-off-by: Mathias Krause <mathias.krause@secunet.com> Reviewed-on: http://review.coreboot.org/1084 Reviewed-by: Mathias Krause <minipli@googlemail.com> Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'payloads/libpayload/drivers/usb')
-rw-r--r--payloads/libpayload/drivers/usb/ohci.c6
1 files changed, 3 insertions, 3 deletions
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;