public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Alan Stern <stern@rowland.harvard.edu>,
	Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: "Dale R. Worley" <worley@alum.mit.edu>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	linux-scsi@vger.kernel.org
Subject: Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with >2TB HDDs)
Date: Sat, 30 Aug 2014 17:40:34 -0400	[thread overview]
Message-ID: <540244D2.4030807@interlog.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1408301710120.4299-100000@netrider.rowland.org>

On 14-08-30 05:15 PM, Alan Stern wrote:
> On Fri, 29 Aug 2014, Matthew Dharm wrote:
>
>> Is there an 'easy' way to override the detected size of a storage
>> device from userspace?  If we had that, someone could write a helper
>> application which looked for this particular fubar and try to Do The
>> Right Thing(tm), or at least offer the user some options.
>
> You mean, force a Media Change event and override the capacity reported
> by the hardware?  I'm not aware of any API for doing that, although it
> probably wouldn't be too hard to add one.
>
> How would the user know what value to put in for the capacity?  Unless
> the drive had been hooked up to a different computer and the user
> manually noted the correct capacity and typed it in, it would have to
> be guesswork.

Might another possibility be using the SAT layer to issue
the appropriate ATA command via the SCSI ATA PASS-THROUGH
(12 or 16) command to find out the disk's size. This might
be a possible strategy if READ CAPACITY(10) yields 0xffffffff
for the last sector's LBA and the follow-up READ CAPACITY(16)
fails or yields a truncated value.

Doug Gilbert


BTW Been looking at a USB-to-SATA adapter that uses the
UAS(P) transport. I thought nothing could have worse
SCSI compliance than USB mass storage devices. I was
wrong ...


  reply	other threads:[~2014-08-30 21:40 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87801b450dee41dda169a3aa2dd2baf6@serv030.corp.eldorado.org.br>
     [not found] ` <87801b450dee41dda169a3aa2dd2baf6-CWPHn/M7kmRpAIlDVkCwMZnVvqcnFG0x9MRKq5+/VYY@public.gmane.org>
2014-08-25 13:16   ` AS2105-based enclosure size issues with >2TB HDDs Oliver Neukum
2014-08-25 14:24     ` Alan Stern
     [not found]       ` <Pine.LNX.4.44L0.1408251021560.1385-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-08-25 18:48         ` RES: " Alfredo Dal Ava Junior
     [not found]           ` <40601ab081d3451baf6267807659c80e-CWPHn/M7kmRpAIlDVkCwMZnVvqcnFG0x9MRKq5+/VYY@public.gmane.org>
2014-08-25 19:28             ` James Bottomley
2014-08-25 19:51               ` RES: " Alfredo Dal Ava Junior
     [not found]                 ` <175058921e084d26ba362fa6ecd7351c-CWPHn/M7kmRpAIlDVkCwMZnVvqcnFG0x9MRKq5+/VYY@public.gmane.org>
2014-08-25 20:21                   ` Alan Stern
2014-08-25 20:44                     ` RES: " Alfredo Dal Ava Junior
2014-08-25 21:16                     ` Oliver Neukum
2014-08-26 14:47                       ` Alan Stern
     [not found]                         ` <Pine.LNX.4.44L0.1408261031090.1434-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-08-27  6:45                           ` Oliver Neukum
2014-08-27 14:45                             ` Alan Stern
2014-08-26  9:58                     ` David Laight
     [not found]                       ` <063D6719AE5E284EB5DD2968C1650D6D1748130C-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2014-08-26 12:24                         ` Oliver Neukum
2014-08-26 12:53                           ` David Laight
2014-08-26 13:41                             ` RES: " Alfredo Dal Ava Junior
2014-08-25 19:33           ` Alan Stern
     [not found]             ` <Pine.LNX.4.44L0.1408251526390.1385-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-08-25 20:14               ` RES: " Alfredo Dal Ava Junior
     [not found]     ` <1408972618.10300.35.camel-B2T3B9s34ElbnMAlSieJcQ@public.gmane.org>
2014-08-26 19:39       ` Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with >2TB HDDs) Dale R. Worley
2014-08-26 19:59         ` James Bottomley
2014-08-27 19:21           ` Dale R. Worley
2014-08-27 20:01             ` James Bottomley
2014-08-27 19:23           ` Dale R. Worley
2014-08-27 20:02             ` Alan Stern
2014-08-29 21:07               ` Dale R. Worley
2014-08-29 23:04                 ` Matthew Dharm
2014-08-30 21:15                   ` Alan Stern
2014-08-30 21:40                     ` Douglas Gilbert [this message]
     [not found]                       ` <540244D2.4030807-qazKcTl6WRFWk0Htik3J/w@public.gmane.org>
2014-08-31 14:13                         ` Alan Stern
     [not found]                     ` <Pine.LNX.4.44L0.1408301710120.4299-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-08-30 23:40                       ` Matthew Dharm
2014-09-03 19:17                         ` RES: " Alfredo Dal Ava Junior
2014-09-03 18:44                     ` Dale R. Worley
     [not found]                       ` <201409031844.s83IimIl011663-fKCv92Uu9G1eYiHQf5CFXGXnswh1EIUO@public.gmane.org>
2014-09-03 19:05                         ` Alan Stern
2014-09-03 19:50                           ` Dale R. Worley
     [not found]                           ` <Pine.LNX.4.44L0.1409031459400.2156-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-09-03 19:57                             ` James Bottomley
2014-09-03 20:30                               ` Alan Stern
     [not found]                                 ` <Pine.LNX.4.44L0.1409031625040.2156-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-09-03 22:07                                   ` James Bottomley
2014-09-05 17:32                                     ` Alan Stern
2014-09-04 20:49                               ` Dale R. Worley

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=540244D2.4030807@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mdharm-usb@one-eyed-alien.net \
    --cc=stern@rowland.harvard.edu \
    --cc=worley@alum.mit.edu \
    /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