lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20100831040516.GA15697@suse.de>
Date:	Mon, 30 Aug 2010 21:05:16 -0700
From:	Greg KH <gregkh@...e.de>
To:	raj uprade <rajuprade@...il.com>
Cc:	Raju Rameshwar Uprade <rajsingh@...a.tifr.res.in>,
	Oliver Neukum <oneukum@...e.de>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: Regarding USB-Serial Device driver

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ