diff options
author | Remy Bohmer <linux@bohmer.net> | 2008-10-10 10:23:22 +0200 |
---|---|---|
committer | Markus Klotzbuecher <mk@denx.de> | 2008-10-14 16:43:06 +0200 |
commit | 9dbc366744960013965fce8851035b6141f3b3ae (patch) | |
tree | 32ce48313c2edb817abc02651543b18fffa05b1e /cpu/mips | |
parent | 48867208444cb2a82e2af9c3249e90b7ed4a1751 (diff) | |
download | u-boot-9dbc366744960013965fce8851035b6141f3b3ae.tar.gz |
The PIPE_INTERRUPT flag is used wrong
At a lot of places in the code the PIPE_INTERRUPT flags and friends
are used wrong. The wrong bits are compared to this flag resulting
in wrong conditions. Also there are macros that should be used for
PIPE_* flags.
This patch tries to fix them all, however, I was not able to test the
changes, because I do not have any of these boards.
Review required!
Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
Diffstat (limited to 'cpu/mips')
-rw-r--r-- | cpu/mips/au1x00_usb_ohci.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cpu/mips/au1x00_usb_ohci.c b/cpu/mips/au1x00_usb_ohci.c index 1ca8aafbbc..17489da8d4 100644 --- a/cpu/mips/au1x00_usb_ohci.c +++ b/cpu/mips/au1x00_usb_ohci.c @@ -654,7 +654,8 @@ static void td_fill (ohci_t *ohci, unsigned int info, td->index = index; td->data = (__u32)data; #ifdef OHCI_FILL_TRACE - if (1 || ((usb_pipetype(urb_priv->pipe) == PIPE_BULK) && usb_pipeout(urb_priv->pipe))) { + if (1 || (usb_pipebulk(urb_priv->pipe) && + usb_pipeout(urb_priv->pipe))) { for (i = 0; i < len; i++) printf("td->data[%d] %#2x\n",i, ((unsigned char *)(td->data+0x80000000))[i]); } @@ -758,7 +759,7 @@ static void dl_transfer_length(td_t * td) tdCBP = m32_swap (td->hwCBP); - if (!(usb_pipetype (lurb_priv->pipe) == PIPE_CONTROL && + if (!(usb_pipecontrol(lurb_priv->pipe) && ((td->index == 0) || (td->index == lurb_priv->length - 1)))) { if (tdBE != 0) { if (td->hwCBP == 0) @@ -1015,7 +1016,7 @@ pkt_print(dev, pipe, buffer, transfer_len, cmd, "SUB(rh)", usb_pipein(pipe)); #else wait_ms(1); #endif - if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) { + if (usb_pipeint(pipe)) { info("Root-Hub submit IRQ: NOT implemented"); return 0; } @@ -1249,7 +1250,7 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer, /* allow more time for a BULK device to react - some are slow */ #define BULK_TO 5000 /* timeout in milliseconds */ - if (usb_pipetype (pipe) == PIPE_BULK) + if (usb_pipebulk(pipe)) timeout = BULK_TO; else timeout = 100; |