All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: raj uprade <rajuprade@gmail.com>
Cc: Raju Rameshwar Uprade <rajsingh@ncra.tifr.res.in>,
	Oliver Neukum <oneukum@suse.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Regarding USB-Serial Device driver
Date: Mon, 30 Aug 2010 21:05:16 -0700	[thread overview]
Message-ID: <20100831040516.GA15697@suse.de> (raw)
In-Reply-To: <AANLkTin8AiOj4CST5Dr_icnY4MugG1mhgP7=c1jgcJcA@mail.gmail.com>

On Thu, Aug 26, 2010 at 03:20:06PM +0530, raj uprade wrote:
>    Hi Greg,
> 
> >
> >
> > >  Again, please use a more modern kernel version, and then, please show
> >     the exact diff (in 'diff -u' format) that you made.
> >
> >     Below is the diff -u of changes made in pl2303.c
> 
>  --- /home/teleset/Zip_file/linux-2.6.26/drivers/usb/serial/pl2303.c
> 2010-07-29 15:13:47.000000000 +0530
> +++ /home/teleset/Desktop/pl2303.c    2010-08-26 15:11:04.000000000 +0530
> @@ -469,12 +469,25 @@
>      if (!count)
>          return count;
> 
> +                   spin_lock_irqsave(&priv->lock, flags);
> +              priv->line_control |= (CONTROL_DTR | CONTROL_RTS);
> +                 control = priv->line_control;
> +              spin_unlock_irqrestore(&priv->lock, flags);
> +              set_control_lines(port->serial->dev, control);
> +
>      spin_lock_irqsave(&priv->lock, flags);
>      count = pl2303_buf_put(priv->buf, buf, count);
>      spin_unlock_irqrestore(&priv->lock, flags);
> -
> +
>      pl2303_send(port);
> 
> +            mdelay(5);
> +         spin_lock_irqsave(&priv->lock, flags);
> +           priv->line_control   = 0;
> +         control = priv->line_control;
> +     spin_unlock_irqrestore(&priv->lock, flags);
> +     set_control_lines(port->serial->dev,control);
> +
>      return count;
>  }

I don't even recall what you were trying to do here, sorry.  Please
include more context in your emails, we get a lot of them.

Also, what function was this change made in?

I don't think such a quick line control change is going to do what you
think it does as there are delays on the device side for sending the
data out through the uart that don't sync right up with the usb host
side here.  So it might be very easy to get out of order things
happening.

You need to make sure the data is really out the port before changing
any control lines.  Can't you do this properly from userspace with no
kernel changes?

thanks,

greg k-h

  parent reply	other threads:[~2010-08-31  4:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100819055329.M29689@admin-gateway.ncra.tifr.res.in>
     [not found] ` <20100819061525.M24093@admin-gateway.ncra.tifr.res.in>
2010-08-19  7:38   ` Regarding USB-Serial Device driver Marek Vasut
2010-08-19 14:18     ` Greg KH
2010-08-20  3:42       ` Raju Rameshwar Uprade
2010-08-20  3:56         ` Greg KH
2010-08-20  6:56           ` Raju Rameshwar Uprade
2010-08-20 15:39             ` Greg KH
     [not found]               ` <AANLkTin8AiOj4CST5Dr_icnY4MugG1mhgP7=c1jgcJcA@mail.gmail.com>
2010-08-31  4:05                 ` Greg KH [this message]
2010-09-07  6:14 Regarding USB-serial device driver Raju Rameshwar Uprade
2010-09-07  6:59 ` Greg KH
     [not found]   ` <20100907114913.M69542@admin-gateway.ncra.tifr.res.in>
2010-09-08  3:41     ` Raju Rameshwar Uprade
2010-09-08  6:17       ` Greg KH
2010-09-08  8:51         ` Raju Rameshwar Uprade
  -- strict thread matches above, loose matches on Subject: below --
2010-08-19  6:28 Regarding USB-Serial Device driver Raju Rameshwar Uprade
2010-08-19 13:09 ` Oliver Neukum

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=20100831040516.GA15697@suse.de \
    --to=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.de \
    --cc=rajsingh@ncra.tifr.res.in \
    --cc=rajuprade@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.