All of lore.kernel.org
 help / color / mirror / Atom feed
From: dave.jing.tian@gmail.com (Dave Tian)
To: kernelnewbies@lists.kernelnewbies.org
Subject: usb mass storage ADSC cmd
Date: Sat, 28 Jun 2014 19:33:07 -0700	[thread overview]
Message-ID: <4ED79FC9-66AD-4909-B128-3E46A0BDDF5A@gmail.com> (raw)

Hi there,

I am trying to implement a communication between the host and a usb mass storage device using ADSC cmd. The device is using the g_mass_storage gadget driver. So far, broken pipe (-32) from the host side is all what I have got. My questions are:

1. Could the device support ADSC cmd even it is using SCSI transport instead of CBI transport?
2. Is this composite correct for the host to retrieve 1 byte response from the device using ADSC?
usb_control_msg(udev,
	usb_rcvctrlpipe(udev, 0),
	0,	// ADSC
	USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, // type
	0,	// value
	0,	// index
	buf,	// recv buf
	1,	// size
	10*HZ);	// timeout

Thanks,

Dave Tian
dave.jing.tian at gmail.com

                 reply	other threads:[~2014-06-29  2:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4ED79FC9-66AD-4909-B128-3E46A0BDDF5A@gmail.com \
    --to=dave.jing.tian@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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.