All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gene Heskett <gene.heskett@gmail.com>
To: Oliver Neukum <oliver@neukum.org>
Cc: "Antonino Ingargiola" <tritemio@gmail.com>,
	"Paul Fulghum" <paulkf@microgate.com>,
	"Alan Cox" <alan@lxorguk.ukuu.org.uk>,
	linux-usb-users@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [SOLVED] Serial buffer corruption [was Re: FTDI usb-serial possible bug]
Date: Wed, 9 May 2007 07:02:48 -0400	[thread overview]
Message-ID: <200705090702.48576.gene.heskett@gmail.com> (raw)
In-Reply-To: <200705052035.58782.oliver@neukum.org>

On Saturday 05 May 2007, Oliver Neukum wrote:
>Am Samstag, 5. Mai 2007 20:08 schrieb Antonino Ingargiola:
>> Now I don't want to abuse your kindness, but I (personally) would be
>> *really* interested in a similar fix for the FTDI usb-serial driver,
>> because many measurements I do use an FTDI device.
>
>Does this work?
>
>	Regards
>		Oliver
>----
>
>--- a/drivers/usb/serial/ftdi_sio.c	2007-05-05 20:21:41.000000000 +0200
>+++ b/drivers/usb/serial/ftdi_sio.c	2007-05-05 20:27:09.000000000 +0200
>@@ -1749,10 +1749,6 @@ static void ftdi_process_read (struct wo
> 			length = 0;
> 		}
>
>-		if (priv->rx_flags & THROTTLED) {
>-			dbg("%s - throttled", __FUNCTION__);
>-			break;
>-		}
> 		if (tty_buffer_request_room(tty, length) < length) {
> 			/* break out & wait for throttling/unthrottling to happen */
> 			dbg("%s - receive room low", __FUNCTION__);
>@@ -1825,16 +1821,6 @@ static void ftdi_process_read (struct wo
> 		dbg("%s - incomplete, %d bytes processed, %d remain",
> 				__FUNCTION__, packet_offset,
> 				urb->actual_length - packet_offset);
>-		/* check if we were throttled while processing */
>-		spin_lock_irqsave(&priv->rx_lock, flags);
>-		if (priv->rx_flags & THROTTLED) {
>-			priv->rx_flags |= ACTUALLY_THROTTLED;
>-			spin_unlock_irqrestore(&priv->rx_lock, flags);
>-			dbg("%s - deferring remainder until unthrottled",
>-					__FUNCTION__);
>-			return;
>-		}
>-		spin_unlock_irqrestore(&priv->rx_lock, flags);
> 		/* if the port is closed stop trying to read */
> 		if (port->open_count > 0){
> 			/* delay processing of remainder */
>@@ -1856,9 +1842,15 @@ static void ftdi_process_read (struct wo
> 			      port->read_urb->transfer_buffer,
> port->read_urb->transfer_buffer_length, ftdi_read_bulk_callback, port);
>
>-		result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
>-		if (result)
>-			err("%s - failed resubmitting read urb, error %d", __FUNCTION__,
> result); +		spin_lock_irqsave(&priv->rx_lock, flags);
>+		if (priv->rx_flags & THROTTLED) {
>+			priv->rx_flags |= ACTUALLY_THROTTLED;
>+		} else {
>+			result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
>+			if (result)
>+				err("%s - failed resubmitting read urb, error %d", __FUNCTION__,
> result); +		}
>+		spin_unlock_irqrestore(&priv->rx_lock, flags);
> 	}
>
> 	return;
>-
Oliver:

While running kernel-2.6.21.1-sd-0.48 + this and the other patch I mentioned,

Unforch, this patch doesn't seem to have effected my usb-serial problems, for 
upsd anyway, it's running at 47% of the cpu right now, while running sd-0.48.

Occasionally a stop and restart will fix it...  Nope.  On the restart, its 
about 3% _until_ something starts reading its output data file, which could 
be gkrellmBUPS, or its own gui, either one bounces it back up to 45+% of the 
cpu.  On a kernel where it works sorta right, as in a recent fedora kernel, 
its about 1.5%, and on even older 2.6.18ish stuff, this utility ran at .1% of 
the cpu regardless of who read its output data.  But that was with a pl2303 
adapter, which no longer works at all so I bought some ftdi based ones.

So the next boot will be to cfs-v10 + these.



>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/



-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
For certain people, after fifty, litigation takes the place of sex.
		-- Gore Vidal

  parent reply	other threads:[~2007-05-09 11:03 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-04  8:38 [SOLVED] Serial buffer corruption [was Re: FTDI usb-serial possible bug] Antonino Ingargiola
2007-05-04  8:49 ` Oliver Neukum
     [not found]   ` <5486cca80705040229g53933671m658bd028cadca155@mail.gmail.com>
2007-05-04  9:33     ` Antonino Ingargiola
2007-05-04 13:41       ` Oliver Neukum
2007-05-04 14:45       ` Paul Fulghum
2007-05-04 14:56         ` Paul Fulghum
2007-05-04 14:49           ` Paul Fulghum
2007-05-04 16:04             ` Antonino Ingargiola
2007-05-04 16:56               ` Antonino Ingargiola
2007-05-04 18:02                 ` Paul Fulghum
2007-05-04 17:13                   ` Antonino Ingargiola
2007-05-04 17:20                     ` Paul Fulghum
2007-05-04 17:25                       ` Antonino Ingargiola
2007-05-04 17:41                         ` Paul Fulghum
2007-05-04 18:46                           ` Antonino Ingargiola
2007-05-04 19:06                             ` Antonino Ingargiola
2007-05-04 19:49                               ` Paul Fulghum
2007-05-04 21:21                                 ` Antonino Ingargiola
2007-05-04 10:57                                   ` Paul Fulghum
2007-05-05  9:53                                     ` Antonino Ingargiola
2007-05-05  9:56                                       ` Antonino Ingargiola
2007-05-05 10:19                                       ` Antonino Ingargiola
2007-05-04 23:30                                   ` Paul Fulghum
2007-05-05  8:26                                     ` Paul Fulghum
2007-05-05 15:11                                       ` Antonino Ingargiola
2007-05-05 16:43                                         ` Paul Fulghum
2007-05-05 16:08                                           ` Paul Fulghum
2007-05-05 16:15                                             ` Paul Fulghum
2007-05-05 16:26                                               ` Antonino Ingargiola
2007-05-05 16:58                                                 ` Antonino Ingargiola
2007-05-05 17:04                                                   ` Paul Fulghum
2007-05-05 18:08                                                     ` Antonino Ingargiola
2007-05-05 18:35                                                       ` Oliver Neukum
2007-05-06  7:06                                                         ` Antonino Ingargiola
2007-05-09  9:53                                                           ` Antonino Ingargiola
2007-05-09 10:42                                                         ` Gene Heskett
2007-05-09 11:02                                                         ` Gene Heskett [this message]
2007-05-09 12:00                                                         ` Gene Heskett
2007-05-05 16:36                                             ` Alan Cox
2007-05-05 16:54                                               ` Oliver Neukum
2007-05-05 21:49                                                 ` Alan Cox
2007-05-05 18:07                                               ` Oliver Neukum
2007-05-05 21:52                                                 ` Alan Cox
2007-05-06  7:29                                                   ` Antonino Ingargiola
2007-05-06 12:28                                                     ` Alan Cox
2007-05-06 16:39                                                       ` Antonino Ingargiola
2007-05-06 16:46                                                         ` Alan Cox
2007-05-06 21:51                                                       ` [Linux-usb-users] " Alan Stern
2007-05-07  8:07                                                         ` Antonino Ingargiola
2007-05-06 14:35                                                     ` Paul Fulghum
2007-05-07  9:11                                                       ` [Linux-usb-users] " Diego Zuccato
2007-05-07 16:34                                                         ` Alan Stern
2007-05-07 16:51                                                           ` Oliver Neukum
2007-05-07 18:25                                                             ` Alan Stern
2007-05-07 17:58                                                           ` Stephen Beaver
2007-05-06 14:49                                                   ` Paul Fulghum
2007-05-05 16:46                                             ` Oliver Neukum
2007-05-05 16:56                                               ` Paul Fulghum
2007-05-05 17:09                                                 ` Antonino Ingargiola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200705090702.48576.gene.heskett@gmail.com \
    --to=gene.heskett@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-users@lists.sourceforge.net \
    --cc=oliver@neukum.org \
    --cc=paulkf@microgate.com \
    --cc=tritemio@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.