Re: Patch USB: serial: garmin_gps: fixes package loss if used from gpsbabel

Greg KH <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Mon, Jul 23, 2007 at 08:19:10PM +0200, Hermann Kneissel wrote:
> 
> This patch contains two fixes submitted by Ondrej Palkovsky:
> - the 'ACK' packet is sent after the transfer of the USB packet is 
> completed, i.e. in the write_callback function. Because the close 
> function sends the 'abort' command, a parameter is added that allows 
> the caller of garmin_write_bulk to specify, if the 'ack' should be 
> propagated to the serial link or dimissed.
> This fixes the problem with gpsbabel, it has sent several packets that 
> were acknowledged before they were sent to the GPS and GpsBabel closed 
> the device - thus effectively cancelled all outstanding requests in the 
> queue.
> - removed the APP_RESP_SEEN and APP_REQ_SEEN flags and changed 
> them into counters. It evades USB reset of the gps on every device close.
> 
> The patch is done against 2.6.21.1 with the 'clean up urb->status usage'
> patch applied.

Can you redo this against 2.6.23-rc1 as it does not apply properly
against that kernel version.

> --- linux-2.6.22.1/drivers/usb/serial/garmin_gps.c.orig	2007-07-10 20:56:30.000000000 +0200
> +++ linux-2.6.22.1/drivers/usb/serial/garmin_gps.c	2007-07-23 19:37:20.129305281 +0200
> @@ -1,7 +1,7 @@
>  /*
>   * Garmin GPS driver
>   *
> - * Copyright (C) 2006 Hermann Kneissel [email protected]
> + * Copyright (C) 2007 Hermann Kneissel [email protected]

This should be "2006,2007", don't throw away your old copyright :)

>   *
>   * The latest version of the driver can be found at
>   * http://sourceforge.net/projects/garmin-gps/
> @@ -21,6 +21,21 @@
>   * You should have received a copy of the GNU General Public License
>   * along with this program; if not, write to the Free Software
>   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
> + *
> + * Change History
> + *
> + * 0.31	Added a patch from Ondrej Palkovsky <[email protected]>
> + *      - the 'ACK' packet is sent after the transfer of the USB packet is
> + *      completed, i.e. in the write_callback function. Because the close
> + *      function sends the 'abort' command, a parameter is added that allows
> + *      the caller of garmin_write_bulk to specify, if the 'ack' should be
> + *      propagated to the serial link or dimissed.
> + *      This fixes the problem with gpsbabel, it has sent several packets that
> + *      were acknowledged before they were sent to the GPS and GpsBabel closed
> + *      the device - thus effectively cancelled all outstanding requests in the
> + *      queue.
> + *      - removed the APP_RESP_SEEN and APP_REQ_SEEN flags and changed them
> + *      into counters. It evades USB reset of the gps on every device close.
>   */

Do not put change history into the driver itself, that is what the
kernel changelog is for.

thanks,

greg k-h

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.