All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Raju Rameshwar Uprade <rajsingh@ncra.tifr.res.in>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Regarding USB-serial device driver
Date: Mon, 6 Sep 2010 23:59:37 -0700	[thread overview]
Message-ID: <20100907065937.GA22307@suse.de> (raw)
In-Reply-To: <20100907061327.M12473@admin-gateway.ncra.tifr.res.in>

On Tue, Sep 07, 2010 at 11:44:50AM +0530, Raju Rameshwar Uprade wrote:
> 
> Hi Greg,
>                I have a UART device  driver which is used to control some  MCM ( Monitor
> & control module ) devices with  address like 2,3,5,10,14 & 0 thru serial port using
> RS-485 interface card.
> 
> Now I want to control these devices thru usb-serial adaptor card.When I plug the
> usb-to-serial device.It's shows me the terminal ttyUSB0.
> 
> I tried sending data thru it , but in between some junk data is also going out ....
> 
> output of usbmon :
> 
>  ee26be80 3612838323 S Co:7:002:0 s 40 01 0008 0000 0000 0
> ee26be80 3612839660 C Co:7:002:0 0 0
> ee26be80 3612839716 S Co:7:002:0 s 40 01 0009 0000 0000 0
> ee26be80 3612840660 C Co:7:002:0 0 0
> ee26be80 3612840700 S Ci:7:002:0 s a1 21 0000 0000 0007 7 <
> ee26be80 3612841661 C Ci:7:002:0 0 7 = 80250000 000008
> ee26be80 3612841710 S Co:7:002:0 s 21 20 0000 0000 0007 7 = 80250000 000008
> ee26be80 3612842659 C Co:7:002:0 0 7 >
> ee26be80 3612842672 S Co:7:002:0 s 21 22 0003 0000 0000 0
> ee26be80 3612843657 C Co:7:002:0 0 0
> ee2b3800 3612843712 S Ci:7:002:0 s a1 21 0000 0000 0007 7 <
> ee2b3800 3612844658 C Ci:7:002:0 0 7 = 80250000 000008
> ee2b3800 3612844668 S Co:7:002:0 s 40 01 0000 0000 0000 0
> ee2b3800 3612845660 C Co:7:002:0 0 0
> ee0eaf80 3612845669 S Bi:7:002:3 -115 256 <
> ee0ead00 3612845674 S Ii:7:002:1 -115:1 10 <
> ee2b3800 3612845679 S Co:7:002:0 s 21 22 0003 0000 0000 0
> ee2b3800 3612846657 C Co:7:002:0 0 0
> ee0ea680 3618022849 S Bo:7:002:2 -115 100 = 00080000 00000000 f8000000 00000000 00000000
> 00000000 00000000 00000000
> ee0ea680 3618024532 C Bo:7:002:2 0 100 >
> 
> 
> Ideally data which should go out is : 0080000000f8.( device address is 0 and check sum
> is f8 ).

Wierd.  If you enable debugging in the driver:
	modprobe pl2303 debug=1
do you also see the kernel log showing extra data going out to the host?

What is your userspace program doing?  Are you sure you are only writing
6 bytes?  The bulk out should only be writing the actual data in the
buffer, not any more than that.

Do you have an example userspace code that we can use to test with?

thanks,

greg k-h

  reply	other threads:[~2010-09-07  7:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-07  6:14 Regarding USB-serial device driver Raju Rameshwar Uprade
2010-09-07  6:59 ` Greg KH [this message]
     [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
     [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
  -- strict thread matches above, loose matches on Subject: below --
2010-08-19  6:28 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=20100907065937.GA22307@suse.de \
    --to=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rajsingh@ncra.tifr.res.in \
    /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.