Re: opticon driver patch kernel version 2.6.35

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

 



On Wed, Feb 23, 2011 at 02:03:02PM +0100, Martin Jansen wrote:
> --- drivers/usb/serial/opticon.c.orig    2011-02-22 07:33:50.917536943 -0800
> +++ drivers/usb/serial/opticon.c    2011-02-23 04:32:33.347347089 -0800

Close, but I need this at one level back, so that 'patch -p1' will apply
the patch correctly.

Also, I need a description of what this patch does. What is it doing?

And, your Signed-off-by: needs to be up here, before the patch,
otherwise it is not found by our tools.

Take a look at Documentation/SubmittingPatches for these details, and
more, to help you out in creating the patch.

> @@ -1,9 +1,15 @@
>  /*
>   * Opticon USB barcode to serial driver
>   *
> + * Copyright (C) 2011 Martin Jansen <martin.jansen@xxxxxxxxxxx>
>   * Copyright (C) 2008 - 2009 Greg Kroah-Hartman <gregkh@xxxxxxx>
>   * Copyright (C) 2008 - 2009 Novell Inc.
>   *
> + * 22 February 2011 Martin Jansen
> + *        Changes for version v0.1
> + *        Add write support
> + *        Add support for RTS and CTS line status

These changes don't belong here, they are what should be above in the
body of the email, as they will then show up in the changelog.

> + *
>   *    This program is free software; you can redistribute it and/or
>   *    modify it under the terms of the GNU General Public License version
>   *    2 as published by the Free Software Foundation.
> @@ -21,6 +27,16 @@
>  #include <linux/usb/serial.h>
>  #include <linux/uaccess.h>
> 
> +#define CONTROL_RTS            0x02
> +#define RESEND_CTS_STATE    0x03
> +
> +/* max number of write urbs in flight */
> +#define URB_UPPER_LIMIT    8
> +
> +/* Version Information */
> +#define DRIVER_VERSION    "v0.1"

Why version the driver?  What does that help with?

> +#define DRIVER_DESC    "Opticon USB barcode to serial driver (1D)"

What is "1D"?

> +
>  static int debug;
> 
>  static const struct usb_device_id id_table[] = {
> @@ -37,18 +53,20 @@ struct opticon_private {
>      unsigned char *bulk_in_buffer;
>      struct urb *bulk_read_urb;
>      int buffer_size;
> +    char ctrl_write_buf[8];    /* Ctrl buffer for the vendor commands */

Your email client ate all of the tabs and spit out spaces, making it
impossible to apply this patch :(


>      u8 bulk_address;
> +

Extra line?

>      spinlock_t lock;    /* protects the following flags */
>      bool throttled;
>      bool actually_throttled;
>      bool rts;
> +    bool cts;
>      int outstanding_urbs;
>  };
> 
> -/* max number of write urbs in flight */
> -#define URB_UPPER_LIMIT    4
> 
> -static void opticon_bulk_callback(struct urb *urb)
> +
> +static void opticon_read_bulk_callback(struct urb *urb)
>  {
>      struct opticon_private *priv = urb->context;
>      unsigned char *data = urb->transfer_buffer;
> @@ -57,6 +75,7 @@ static void opticon_bulk_callback(struct
>      struct tty_struct *tty;
>      int result;
>      int data_length;
> +    unsigned long flags;
> 
>      dbg("%s - port %d", __func__, port->number);
> 
> @@ -73,7 +92,7 @@ static void opticon_bulk_callback(struct
>          return;
>      default:
>          dbg("%s - nonzero urb status received: %d",
> -            __func__, status);
> +            __func__, status);

What changed here?

Everything else looked great, care to make the above changes and resend
it so that I can apply it to the kernel tree properly?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux