Re: [PATCH] USB: ftdi_sio: add support for BeagleBone rev A5+

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 28, 2012 at 11:58:16PM +0100, Peter Korsgaard wrote:
> BeagleBone changed to the default FTDI 0403:6010 id in rev A5 to make life
> easier for Windows users, so we need a similar workaround as the Calao
> board to support it.
> 
> Signed-off-by: Peter Korsgaard <jacmet@xxxxxxxxxx>
> ---
> Resend to Gregs new email.
> 
>  drivers/usb/serial/ftdi_sio.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
> index feafa85..898fc9c 100644
> --- a/drivers/usb/serial/ftdi_sio.c
> +++ b/drivers/usb/serial/ftdi_sio.c
> @@ -1769,7 +1769,8 @@ static int ftdi_8u2232c_probe(struct usb_serial *serial)
>  
>  	dbg("%s", __func__);
>  
> -	if (strcmp(udev->manufacturer, "CALAO Systems") == 0)
> +	if (!strcmp(udev->manufacturer, "CALAO Systems") ||
> +	    !strcmp(udev->product, "BeagleBone/XDS100"))
>  		return ftdi_jtag_probe(serial);
>  
>  	return 0;

Ick, this directly conflicts with a patch I just applied earlier today,
which is included below.

Can you redo it based on this patch?  Also, please check that
udev->product is valid before passing it to strcmp, odds are, someone,
somewhere, got it wrong, and we don't want to oops the kernel.

thanks,

greg k-h

>From 656d2b3964a9d0f9864d472f8dfa2dd7dd42e6c0 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Feb 2012 09:20:09 -0800
Subject: [PATCH] USB: ftdi_sio: fix problem when the manufacture is a NULL
 string

On some misconfigured ftdi_sio devices, if the manufacturer string is
NULL, the kernel will oops when the device is plugged in.  This patch
fixes the problem.

Reported-by: Wojciech M Zabolotny <W.Zabolotny@xxxxxxxxxxxxxx>
Tested-by: Wojciech M Zabolotny <W.Zabolotny@xxxxxxxxxxxxxx>
Cc: stable <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index feafa85..9892626 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1769,7 +1769,8 @@ static int ftdi_8u2232c_probe(struct usb_serial *serial)
 
 	dbg("%s", __func__);
 
-	if (strcmp(udev->manufacturer, "CALAO Systems") == 0)
+	if ((udev->manufacturer) &&
+	    (strcmp(udev->manufacturer, "CALAO Systems") == 0))
 		return ftdi_jtag_probe(serial);
 
 	return 0;

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux