From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Matthew Wilcox <willy@linux.intel.com>,
linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org,
USB Storage List <usb-storage@lists.one-eyed-alien.net>
Subject: Re: [usb-storage] Re: Make UAS work on HS for devices with and without command tagging support
Date: Fri, 16 Dec 2011 21:12:36 +0100 [thread overview]
Message-ID: <20111216201236.GE19563@linutronix.de> (raw)
In-Reply-To: <20111216144724.GC19563@linutronix.de>
* Sebastian Andrzej Siewior | 2011-12-16 15:47:24 [+0100]:
>>If you want to take a stab at redoing your patch #2 to use only one
>>status URB for USB 2.0 devices, I would appreciate it. Then I can build
>>the abort/reset synchronization on top of it.
>Okay.
Just once things started to become easy.... So while I tried to have
only one status urb which I always re-submit (as Matthew/ You suggested)
I run into the problem that I don't have struct scsi_device yet. So I
just created a device with two luns to see if this struct happens always
to be same. Ofcourse it is not.
So if we re-submit the one status URB over and over again, we have to
get the device right.
The only thing that we have left to get our device in the status
complete callback is the tag number which means we need a reverse lookup
for that. To make it little more fun, those two devices have their own
request queue so we can't use a 1:1 queue slot <-> tag number mapping
because we have to distinguish between tag 0 for lun0 and tag 0 for
lun1.
I admit now that it was a bad idea to test lun support on high speed.
The good news is that it worked on SS :)
| scsi0 : uas
| usbcore: registered new interface driver uas
| scsi 0:0:0:0: Direct-Access LIO-ORG RAMDISK-MCP 4.0 PQ: 0 ANSI: 5
| scsi 0:0:0:1: Direct-Access LIO-ORG FILEIO 4.0 PQ: 0 ANSI: 5
| sd 0:0:0:0: [sda] 262144 512-byte logical blocks: (134 MB/128 MiB)
| sd 0:0:0:1: [sdb] 61441 512-byte logical blocks: (31.4 MB/30.0 MiB)
| sd 0:0:0:0: [sda] Write Protect is off
| sd 0:0:0:0: [sda] Mode Sense: 2f 00 00 00
| sd 0:0:0:1: [sdb] Write Protect is off
| sd 0:0:0:1: [sdb] Mode Sense: 2f 00 00 00
| sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
| sd 0:0:0:1: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
| sda: unknown partition table
| sdb: sdb1
| sd 0:0:0:1: [sdb] Attached SCSI disk
| sd 0:0:0:0: [sda] Attached SCSI disk
Going through to my log I saw that I have sometimes two requests with
the same tag on both luns more or less at the same time. So on SS both
requests are enqueued on the same stream with the same tag number. This
works because they are processed in order. This is not wrong but it
would be more efficient if we would enqueue them on two streams.
So. Where do we start? What about this:
Unique tag number => tag <-> device struct => one status urb for HS
>>Sarah Sharp
Sebastian
next prev parent reply other threads:[~2011-12-16 20:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 18:47 Make UAS work on HS for devices with and without command tagging support Sebastian Andrzej Siewior
2011-12-14 18:47 ` [PATCH 1/2] usb/uas: fix support on HS (device without command tagging) Sebastian Andrzej Siewior
[not found] ` <1323888472-21035-2-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-12-15 11:14 ` Sergei Shtylyov
2011-12-14 18:47 ` [PATCH 2/2] usb/uas: fix support on HS (device with " Sebastian Andrzej Siewior
2011-12-14 22:53 ` Make UAS work on HS for devices with and without command tagging support Sarah Sharp
2011-12-15 8:44 ` Sebastian Andrzej Siewior
[not found] ` <4EE9B375.4020606-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-12-15 21:12 ` [usb-storage] " Sarah Sharp
2011-12-16 14:47 ` Sebastian Andrzej Siewior
2011-12-16 20:12 ` Sebastian Andrzej Siewior [this message]
2011-12-16 20:31 ` Matthew Wilcox
2011-12-16 20:42 ` Sebastian Andrzej Siewior
2011-12-16 21:36 ` Sarah Sharp
2011-12-16 21:44 ` Alan Stern
2011-12-16 21:47 ` James Bottomley
2011-12-19 16:12 ` Matthew Wilcox
2011-12-19 17:14 ` James Bottomley
2011-12-19 18:36 ` Matthew Wilcox
2011-12-19 20:27 ` James Bottomley
2011-12-19 20:57 ` Matthew Wilcox
2011-12-19 21:22 ` James Bottomley
2011-12-19 16:14 ` [PATCH] usb/uas: use unique tags for all LUNs Sebastian Andrzej Siewior
2011-12-19 19:39 ` [PATCH] usb/uas: use scsi_host_find_tag() to find command from a tag Sebastian Andrzej Siewior
[not found] ` <20111219193955.GA2060-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-12-19 19:50 ` Matthew Wilcox
2011-12-19 20:12 ` Sarah Sharp
2011-12-19 21:01 ` Matthew Wilcox
2011-12-16 20:51 ` [usb-storage] Re: Make UAS work on HS for devices with and without command tagging support Sarah Sharp
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=20111216201236.GE19563@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=usb-storage@lists.one-eyed-alien.net \
--cc=willy@linux.intel.com \
/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.