From 1c6ca789e1921d2c2a9525511bca7b75331ffc5b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 6 Jun 2011 14:17:56 +0900 Subject: [PATCH] --- yaml --- r: 259203 b: refs/heads/master c: ad6f2a8bc53b7cc104f481a648ce357528cc08eb h: refs/heads/master i: 259201: 8c5d7f7dc39fd105706072ed1fa278bb9d25a489 259199: d8610c74128f14f9734ff1a82241ab379463043b v: v3 --- [refs] | 2 +- trunk/drivers/usb/renesas_usbhs/pipe.c | 10 +++++++++- trunk/drivers/usb/renesas_usbhs/pipe.h | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 806adc666631..065cc178182e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cc55687124426e3a6a5301780c4e6bb36bb531fd +refs/heads/master: ad6f2a8bc53b7cc104f481a648ce357528cc08eb diff --git a/trunk/drivers/usb/renesas_usbhs/pipe.c b/trunk/drivers/usb/renesas_usbhs/pipe.c index bc4521c54261..80fc4add6af2 100644 --- a/trunk/drivers/usb/renesas_usbhs/pipe.c +++ b/trunk/drivers/usb/renesas_usbhs/pipe.c @@ -550,12 +550,15 @@ static u16 usbhsp_setup_pipecfg(struct usbhs_pipe *pipe, /* DIR */ if (usb_endpoint_dir_in(desc)) - usbhsp_flags_set(pipe, IS_DIR_IN); + usbhsp_flags_set(pipe, IS_DIR_HOST); if ((is_host && usb_endpoint_dir_out(desc)) || (!is_host && usb_endpoint_dir_in(desc))) dir |= DIR_OUT; + if (!dir) + usbhsp_flags_set(pipe, IS_DIR_IN); + /* SHTNAK */ if (usbhsp_type_is(pipe, USB_ENDPOINT_XFER_BULK) && !dir) @@ -678,6 +681,11 @@ int usbhs_pipe_is_dir_in(struct usbhs_pipe *pipe) return usbhsp_flags_has(pipe, IS_DIR_IN); } +int usbhs_pipe_is_dir_host(struct usbhs_pipe *pipe) +{ + return usbhsp_flags_has(pipe, IS_DIR_HOST); +} + void usbhs_pipe_clear_sequence(struct usbhs_pipe *pipe) { usbhsp_pipectrl_set(pipe, SQCLR, SQCLR); diff --git a/trunk/drivers/usb/renesas_usbhs/pipe.h b/trunk/drivers/usb/renesas_usbhs/pipe.h index 1cca9b7fb266..c906eb646d24 100644 --- a/trunk/drivers/usb/renesas_usbhs/pipe.h +++ b/trunk/drivers/usb/renesas_usbhs/pipe.h @@ -30,6 +30,7 @@ struct usbhs_pipe { u32 flags; #define USBHS_PIPE_FLAGS_IS_USED (1 << 0) #define USBHS_PIPE_FLAGS_IS_DIR_IN (1 << 1) +#define USBHS_PIPE_FLAGS_IS_DIR_HOST (1 << 2) void *mod_private; }; @@ -89,6 +90,7 @@ struct usbhs_pipe const struct usb_endpoint_descriptor *desc); int usbhs_pipe_is_dir_in(struct usbhs_pipe *pipe); +int usbhs_pipe_is_dir_host(struct usbhs_pipe *pipe); void usbhs_pipe_init(struct usbhs_priv *priv); int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe); void usbhs_pipe_clear_sequence(struct usbhs_pipe *pipe);