[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <00374F755A5C474884D69FBCA77349D105227D9ED9@EXCAUS002.silabs.com>
Date: Tue, 8 May 2012 08:56:33 -0500
From: Preston Fick <Preston.Fick@...abs.com>
To: Bjørn Mork <bjorn@...k.no>,
Preston Fick <pffick@...il.com>
CC: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>
Subject: RE: [PATCH 1/3] usb: cp210x: Corrected USB request type definitions
Hi Bjorn -
I agree - I was not the original author of this driver, but am helping to bring it up to date to fix some issues and add missing support from our product line. I just simply added this in to stick with the way that it had already been developed, however I can submit another patch to setup those defines using the standard USB definitions. Thanks for the suggestion.
Kind Regards -
Preston
-----Original Message-----
From: Bjørn Mork [mailto:bjorn@...k.no]
Sent: Thursday, May 03, 2012 3:59 AM
To: Preston Fick
Cc: gregkh@...uxfoundation.org; linux-usb@...r.kernel.org; linux-kernel@...r.kernel.org; linux-serial@...r.kernel.org; Preston Fick
Subject: Re: [PATCH 1/3] usb: cp210x: Corrected USB request type definitions
Preston Fick <pffick@...il.com> writes:
> diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
> index ec30f95..e67ccf3 100644
> --- a/drivers/usb/serial/cp210x.c
> +++ b/drivers/usb/serial/cp210x.c
> @@ -188,8 +188,10 @@ static struct usb_serial_driver * const serial_drivers[] = {
> };
>
> /* Config request types */
> -#define REQTYPE_HOST_TO_DEVICE 0x41
> -#define REQTYPE_DEVICE_TO_HOST 0xc1
> +#define REQTYPE_HOST_TO_INTERFACE 0x41
> +#define REQTYPE_INTERFACE_TO_HOST 0xc1
> +#define REQTYPE_HOST_TO_DEVICE 0x40
> +#define REQTYPE_DEVICE_TO_HOST 0xc0
Any particular reason you need to define these instead of just using the
standard flags from linux/usb/ch9.h directly in the requests?:
(USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT)
(USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_IN)
(USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT)
(USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN)
If nothing else, using those from the beginning would have avoided the
mis-labelling you are fixing up.
Bjørn
This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile or (ii) delete this message immediately if this is an electronic communication.
Thank you.
Powered by blists - more mailing lists