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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Aug 2010 12:26:22 +0530
From:	"Raju Rameshwar Uprade" <rajsingh@...a.tifr.res.in>
To:	Greg KH <gregkh@...e.de>, Oliver Neukum <oneukum@...e.de>
Cc:	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Regarding USB-Serial Device driver

Greg,
      Sorry for including quotations in my email.

Oliver,
          I see the  superfluous data with usbmon also.

I have changed the pl2303_write(), according to my need.I enabled the RTS line before 
the data transmission and after a delay of 5ms ,disabled the RTS lines for my MCM device
to respond.

static int pl2303_write(struct usb_serial_port *port, const unsigned char *buf,int count)
> {
> 	struct pl2303_private *priv = usb_get_serial_port_data(port);
> 	unsigned long flags;
>          u8 control;
> 	dbg("%s - port %d, %d bytes", __func__, port->number, count);
>        
> 	if (!count)
> 		return count;
> 
>      // Following code is included so that We can enable the RTS line to high before
data transmission
>        //  Tried writing a for loop here to loop the RTS line enable/disable , but
that also didn't work...
>   
>                   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);                              // If I comment this , driver
dosen't work 
>        
> 	//  Following code is included so that We can disable the RTS line to low after data
transmission..
>          // mdelay plays an Important role here....
>           mdelay(5);
>          spin_lock_irqsave(&priv->lock, flags);
>        //   priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); // this doesn't work
here...
>            priv->line_control   = 0;   // this work here.....
>          control = priv->line_control;
> 	 spin_unlock_irqrestore(&priv->lock, flags);
> 	 set_control_lines(port->serial->dev,control); 
>         
>           return count;   // count is also very IMP b'coz it affect the device
driver's behaviour.....
> }


Thanks,
 Raju
--
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