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-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: Regarding USB-to-serial device driver
Date: Wed, 22 Sep 2010 07:56:07 -0700	[thread overview]
Message-ID: <20100922145607.GB26309@suse.de> (raw)
In-Reply-To: <20100922052107.M44650@admin-gateway.ncra.tifr.res.in>

On Wed, Sep 22, 2010 at 11:02:46AM +0530, Raju Rameshwar Uprade wrote:
> 
> 
> Greg,
>       I am facing some problem in data copying.
> I am having a const unsigned char *buf which contains 02 08 00 00 00 00 00 00 f8.
> which is copied in port->write_urb->transfer_buffer and sent on ttyUSB0 using
> usb_submit_urb(port->write_urb, GFP_ATOMIC).

For what driver?

> But  I want to send the data bytes is a particular fashion.
> 
> 1. I want to Add Mark parity. 

That's a control signal and is independant of the data payload, right?

> 2. Send the data byte 02 ( Address of a device )

That means you need to modify the data.  Why not do that in userspace?

> 3. Add Space parity .

Again, control signal.

> 4. send the data byte 08 00 00 00 00 00 00 f8 ( Null cmd + check sum )

Should be fine.

> Kindly help me.I am facing the problem in separating the data bytes so
> that I can send the data bytes separately using usb_submit_urb.

It all depends on the driver you are using.  Why not do all of this from
userspace?  That way it works on any device you are talking to.

good luck,

greg k-h

  reply	other threads:[~2010-09-22 15:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13  9:17 Regarding USB-to-Serial device driver Raju Rameshwar Uprade
2010-09-13 13:56 ` Alan Stern
2010-09-13 15:48 ` Greg KH
2010-09-14  6:11   ` Raju Rameshwar Uprade
2010-09-14 13:19     ` Greg KH
2010-09-22  5:32       ` Regarding USB-to-serial " Raju Rameshwar Uprade
2010-09-22 14:56         ` Greg KH [this message]
2010-09-23 10:15           ` Raju Rameshwar Uprade
2010-09-23 14:02             ` Greg KH
2010-09-28  9:21               ` Raju Rameshwar Uprade
2010-09-28 11:30                 ` Greg KH
2010-09-28 11:56                   ` Raju Rameshwar Uprade
2010-09-28 12:07                     ` Greg KH
2010-10-04  4:33                       ` Raju Rameshwar Uprade
2010-10-05 11:03                         ` pl2303_ttyUSB0 userspace application not able to control RTS line Raju Rameshwar Uprade
2010-10-05 13:33                           ` Greg KH
2010-10-06  4:14                             ` Raju Rameshwar Uprade
2010-10-06  4:30                               ` Greg Oliver
2010-10-06  5:01                                 ` Raju Rameshwar Uprade

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=20100922145607.GB26309@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.