public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
To: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Don Zickus <dzickus@redhat.com>,
	usb-storage@lists.one-eyed-alien.net, linux-usb@vger.kernel.org,
	"Xu, Andiry" <Andiry.Xu@amd.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [usb-storage] xhci: suspend/resume issues
Date: Mon, 22 Nov 2010 20:51:13 -0800	[thread overview]
Message-ID: <20101123045113.GJ20296@one-eyed-alien.net> (raw)
In-Reply-To: <20101122231524.GA26888@xanatos>

[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]

On Mon, Nov 22, 2010 at 03:15:24PM -0800, Sarah Sharp wrote:
> Ccing the scsi and USB mass storage devices lists on this issue.
> Background: a USB 3.0 mass storage device shows up as a USB 2.0 device
> after resume, and then migrates back to USB 3.0 speeds after a reset.
> 
> On Mon, Nov 22, 2010 at 05:49:47PM -0500, Don Zickus wrote:
> > Looking into my previously mounted /mnt directory yields an i/o error
> > (probably because it is now under /dev/sdc).
> 
> As long as it doesn't produce any kernel oops, that's normal.  The
> kernel has noticed the device went away, but userspace hasn't.  At
> least, that's my general impression.  You'll have to ask the USB mass
> storage guys, or the SCSI folks for the details on how that's supposed
> to work.

That's mostly right.  The USB and SCSI layers know the device has gone
away, but there is no way to signal to the filesystem layers that the
underlying device is gone.  So, all the I/O requests are simply 'failed'
until the device is unmounted, at which point the refcount drops to zero
and the structures are actually deleted.

> > Unmounting everything and remounting 'mount /dev/sdc2 /mnt' (using the new
> > letter 'c' instead of 'b') works fine and no data loss seems to occur.
> > 
> > Just thought it might be annoying and was wondering if you had any ideas
> > on that?
> 
> There's no way to work around it if the device disconnects, AFAIK.

I'm coming late to the discussion, but Sara is right.  If the device
disconnects, there is no way to know that it is the same device when it
reconnects.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

I could always suspend a few hundred accounts and watch what happens.
					-- Tanya
User Friendly, 7/31/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2010-11-23  4:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20101110195426.GB4823@redhat.com>
     [not found] ` <2DEEA3AB13739D45A22ADDB5086AEA0B914AD4@sshaexmb1.amd.com>
     [not found]   ` <20101111191904.GK4823@redhat.com>
     [not found]     ` <20101111210420.GA9020@xanatos>
     [not found]       ` <20101116154756.GZ4823@redhat.com>
     [not found]         ` <2DEEA3AB13739D45A22ADDB5086AEA0B9A6287@sshaexmb1.amd.com>
     [not found]           ` <20101119185907.GA30923@xanatos>
     [not found]             ` <20101119225602.GP18100@redhat.com>
     [not found]               ` <20101119233046.GA13059@xanatos>
     [not found]                 ` <20101122224947.GD18100@redhat.com>
2010-11-22 23:15                   ` xhci: suspend/resume issues Sarah Sharp
2010-11-23  4:51                     ` Matthew Dharm [this message]
2010-11-23 19:09                     ` Don Zickus

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=20101123045113.GJ20296@one-eyed-alien.net \
    --to=mdharm-scsi@one-eyed-alien.net \
    --cc=Andiry.Xu@amd.com \
    --cc=dzickus@redhat.com \
    --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 \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox