All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
@ 2012-03-28  4:14 Norman Diamond
  2012-03-28  7:18 ` James Bottomley
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-03-28  4:14 UTC (permalink / raw)
  To: linux-usb, linux-scsi

I wrote:
> James Bottomley corrected one of the experts who corrected me yesterday:
>>>> So, the problem is that sd_mod is turning your request for a single block into a request for several blocks.
>> 
>> No, it won't be this.  Everything below block does exactly what block says.  If readahead is the problem, then you need to turn it off in block:
>> echo 0 > /sys/block/<dev>/queue/read_ahead_kb
> 
> Thank you.  But...

But it didn't help.  Today I put the disk internally in an old notebook, and libata made it /dev/sda.
echo 0 >/sys/block/sda/queue/read_ahead_kb
but sg_dd still insisted on reading an entire page, so it refused to read a good block that was too close to the bad block.

> James Bottomley corrected me too.
>>> I originally wrote (blaming the wrong component):
>>>>> dd if=/dev/sdb of=/dev/zero bs=512 count=1 skip=551563
>>>>> should succeed because block 551563 has no problem.  But it fails because ehci_hcd insists on reading blocks 551560 through 551567, and block 551562 does have a problem.  (Of course I should have been outputting to /dev/null instead of /dev/zero but that should not matter.)
>>
>> this is not fixable using dd which goes through the page cache (and thus had a minimum read of a page at a time). If you want exact 512 byte sector reads, use sg_dd instead.
> 
> Then writing a 0 to /sys/block/sdb/queue/read_ahead_kb is useless in this particular case, right?  But it might be useful in further testing, because of more oddities.

It was even more useless than expected because sg_dd failed the same way as dd.

It is really really bad that sg_dd could not overcome this.  Some years ago linux-ide and libata were fixed.  When readahead failed, they knew that data were not available for the nearby bad block, but the good block could be read.  I don't know when the fix got unfixed.  This is a show stopper for forensics.  I don't get to do forensics myself, but I have to be aware of it, and the inability to read a good block just because a bad block is next door is not acceptable.

It is really really bad when Windows XP can read it but Linux can't.  (Details below.)

> The USB-to-IDE bridge is vendor 067b, product 2507, Prolific Technology Inc., and usb-storage matches it for quirk 110.

It does appear to be the bridge's fault that the USB cable needed unplugging and replugging.  When the drive is internal and connected to an old Intel ATA controller, the drive did not need unplugging and replugging.

> Digression:  Someone adjusts the number of blocks from the reported 39070080 (which I think is correct) to 39070079 (which I think is wrong).  I'll have to install the drive in an old notebook to check if the reported number of blocks is really correct.

Further on this digression:  The number of blocks really is 39070080.  Today libata made no adjustment and the number of blocks was correct.  So some USB component makes a misadjustment to screw up the number of blocks.


(Quoting details from yesterday, because of the importance to forensics and mentioned above.)
>
> Today I created a FAT12 partition in approximately 8 megabytes surrounding known bad block number 551562.
> 
> Windows XP could write a bunch of files to fill the partition (0 blocks free).  Windows XP could copy all the files from the partition to a directory on an internal SATA drive.  I guess there is some amount of luck that the bad block is not in use in any of the files, despite there being 0 blocks free.
> 
> Linux (cp -pr) could not copy all the files from the partition to a directory on an internal SATA drive.  Even when it should only copy blocks near the bad block, it stubbornly tried to readahead the bad block and it bombed out.  I had to unplug and replug the USB cable to read the drive again.
> 
> Back to Windows XP.  When I told it to run CHKDSK and try to verify every block, then it bombed out.  I had to unplug and replug the USB cable.  Again, just copying the files, they all copied.
> 
> So the need to unplug and replug seems to be the bridge's fault.
> 
> I think readahead is not a bad thing to do, and I can see why it is too late for Linux to recover after getting the error from trying to read ahead.  But I'm sure I've seen Windows XP do readahead too.  How come Windows XP survived where Linux didn't? 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-28  4:14 sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block) Norman Diamond
@ 2012-03-28  7:18 ` James Bottomley
  2012-03-28  7:48   ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: James Bottomley @ 2012-03-28  7:18 UTC (permalink / raw)
  To: n0diamond; +Cc: linux-usb, linux-scsi

On Wed, 2012-03-28 at 13:14 +0900, Norman Diamond wrote:
> I wrote:
> > James Bottomley corrected one of the experts who corrected me yesterday:
> >>>> So, the problem is that sd_mod is turning your request for a single block into a request for several blocks.
> >> 
> >> No, it won't be this.  Everything below block does exactly what block says.  If readahead is the problem, then you need to turn it off in block:
> >> echo 0 > /sys/block/<dev>/queue/read_ahead_kb
> > 
> > Thank you.  But...
> 
> But it didn't help.  Today I put the disk internally in an old notebook, and libata made it /dev/sda.
> echo 0 >/sys/block/sda/queue/read_ahead_kb
> but sg_dd still insisted on reading an entire page, so it refused to read a good block that was too close to the bad block.

This tells me you didn't read the man page on sg_dd.

To get it to read a block at a time using SCSI commands, you need

sg_dd blk_sgio=1 bs=512 bpt=1 <rest of the arguments>

That says use SG_IO and read exactly one block per SCSI command

James



^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-28  7:18 ` James Bottomley
@ 2012-03-28  7:48   ` Norman Diamond
  2012-03-28 14:41     ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-03-28  7:48 UTC (permalink / raw)
  To: linux-usb, linux-scsi

James Bottomley wrote:
> On Wed, 2012-03-28 at 13:14 +0900, Norman Diamond wrote:
>> I wrote:
>>> James Bottomley corrected one of the experts who corrected me yesterday:
>>>>>> So, the problem is that sd_mod is turning your request for a single block into a request for several blocks.
>>>> 
>>>> No, it won't be this.  Everything below block does exactly what block says.  If readahead is the problem, then you need to turn it off in block:
>>>> echo 0 > /sys/block/<dev>/queue/read_ahead_kb
>>> 
>>> Thank you.  But...
>> 
>> But it didn't help.  Today I put the disk internally in an old notebook, and libata made it /dev/sda.
>> echo 0 >/sys/block/sda/queue/read_ahead_kb
>> but sg_dd still insisted on reading an entire page, so it refused to read a good block that was too close to the bad block.
> 
> This tells me you didn't read the man page on sg_dd.

Guilty as charged.  Sorry, for some reason I didn't imagine that its parameters would differ from dd.

> To get it to read a block at a time using SCSI commands, you need
> sg_dd blk_sgio=1 bs=512 bpt=1 <rest of the arguments>
> That says use SG_IO and read exactly one block per SCSI command

Thank you.

I don't want to manhandle that old notebook's fragile vendor proprietary IDE cable again, but I'll try to find another way to test that drive again without going though USB.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-28  7:48   ` Norman Diamond
@ 2012-03-28 14:41     ` Alan Stern
  2012-03-28 23:43       ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-03-28 14:41 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

On Wed, 28 Mar 2012, Norman Diamond wrote:

> I don't want to manhandle that old notebook's fragile vendor proprietary IDE cable again, but I'll try to find another way to test that drive again without going though USB.

You don't have to worry about that.  sg_dd works fine over USB.

> > The USB-to-IDE bridge is vendor 067b, product 2507, Prolific Technology Inc., and usb-storage matches it for quirk 110.

What is the bcdDevice value?

> > Digression:� Someone adjusts the number of blocks from the reported 39070080 (which I think is correct) to 39070079 (which I think is wrong).� I'll have to install the drive in an old notebook to check if the reported number 
of blocks is really correct.
> 
> Further on this digression:  The number of blocks really is 39070080.  Today libata made no adjustment and the number of blocks was correct.  So some USB component makes a misadjustment to screw up the number of blocks.

usb-storage does this, because in the past Prolific's bridges have 
reported the wrong number of blocks.  In fact, I'm surprised that it 
seems to work correctly with your drive.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-28 14:41     ` Alan Stern
@ 2012-03-28 23:43       ` Norman Diamond
  2012-03-29 14:44         ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-03-28 23:43 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Alan Stern wrote:
> On Wed, 28 Mar 2012, Norman Diamond wrote:
> 
>> I don't want to manhandle that old notebook's fragile vendor proprietary IDE cable again, but I'll try to find another way to test that drive again without going though USB.
> 
> You don't have to worry about that.  sg_dd works fine over USB.
> 
>>> The USB-to-IDE bridge is vendor 067b, product 2507, Prolific Technology Inc., and usb-storage matches it for quirk 110.
> 
> What is the bcdDevice value?

Is that different from 2507?

Now, if a combination of zeroing the readahead and proper user input of an sg_dd command will succeed in reading a single valid block next door to the bad block, then it won't even be necessary to unplug and replug the USB bridge.  That will be good news.

>>> Digression:  Someone adjusts the number of blocks from the reported 39070080 (which I think is correct) to 39070079 (which I think is wrong).  I'll have to install the drive in an old notebook to check if the reported number of blocks is really correct.
>> 
>> Further on this digression:  The number of blocks really is 39070080.  Today libata made no adjustment and the number of blocks was correct.  So some USB component makes a misadjustment to screw up the number of blocks.
> 
> usb-storage does this, because in the past Prolific's bridges have reported the wrong number of blocks.  In fact, I'm surprised that it seems to work correctly with your drive.

It is hard to imagine a USB bridge adding 1 to the number of blocks.  Did that really happen?

Of course there are some USB bridges that f**k up the number of blocks differently, mapping each range of the drive's eight 512-byte sectors onto one 4096-byte sector that the bridge presents to the host (coincidentally the exact opposite of the mapping that modern SATA drives do internally in their firmware), and then proceeding further to conk out at the 2TB limit anyway so their f**king of the sector size and count accomplishes no benefit while still causing their damage.  I can imagine a theoretical partial benefit to a Linux driver adjusting those sector sizes and counts by a factor of 8 in order to partly overcome some braindead bridges.  But it's really hard to imagine a bridge adding 1 to a number of blocks and benefiting by a driver subtracting 1.  (Maybe I'm just not imaginative enough.)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-28 23:43       ` Norman Diamond
@ 2012-03-29 14:44         ` Alan Stern
  2012-03-30  7:34           ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-03-29 14:44 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 2247 bytes --]

On Thu, 29 Mar 2012, Norman Diamond wrote:

> Alan Stern wrote:
> > On Wed, 28 Mar 2012, Norman Diamond wrote:
> > 
> >> I don't want to manhandle that old notebook's fragile vendor proprietary IDE cable again, but I'll try to find another way to test that drive again without going though USB.
> > 
> > You don't have to worry about that.  sg_dd works fine over USB.
> > 
> >>> The USB-to-IDE bridge is vendor 067b, product 2507, Prolific Technology Inc., and usb-storage matches it for quirk 110.
> > 
> > What is the bcdDevice value?
> 
> Is that different from 2507?

It is a separate value from the product ID.  It appears in the output 
from "lsusb -v" or in /sys/kernel/debug/usb/devices (where it is 
labelled "Rev=").

> Now, if a combination of zeroing the readahead and proper user input of an sg_dd command will succeed in reading a single valid block next door to the bad block, then it won't even be necessary to unplug and replug the USB bridge.  That will be good news.
> 
> >>> Digression:  Someone adjusts the number of blocks from the reported 39070080 (which I think is correct) to 39070079 (which I think is wrong).  I'll have to install the drive in an old notebook to check if the reported number of blocks is really correct.
> >> 
> >> Further on this digression:  The number of blocks really is 39070080.  Today libata made no adjustment and the number of blocks was correct.  So some USB component makes a misadjustment to screw up the number of blocks.
> > 
> > usb-storage does this, because in the past Prolific's bridges have reported the wrong number of blocks.  In fact, I'm surprised that it seems to work correctly with your drive.
> 
> It is hard to imagine a USB bridge adding 1 to the number of blocks.  Did that really happen?

No.  What happened was that the bridge reported the number of blocks,
but SCSI's READ CAPACITY command requires the device to report the
highest available block number (which is one smaller since blocks are
numbered starting from 0).

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-29 14:44         ` Alan Stern
@ 2012-03-30  7:34           ` Norman Diamond
       [not found]             ` <662659.4715.qm-303aDswoEIb1/UedTyKF90yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-03-30  7:34 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Alan Stern wrote:
> On Thu, 29 Mar 2012, Norman Diamond wrote:
>> Alan Stern wrote:
>>> On Wed, 28 Mar 2012, Norman Diamond wrote:
>>>> I don't want to manhandle that old notebook's fragile vendor proprietary IDE cable again, but I'll try to find another way to test that drive again without going though USB.
>>> 
>>> You don't have to worry about that.  sg_dd works fine over USB.
>>> 
>>>>> The USB-to-IDE bridge is vendor 067b, product 2507, Prolific Technology Inc., and usb-storage matches it for quirk 110.
>>> 
>>> What is the bcdDevice value?
>> 
>> Is that different from 2507?
> 
> It is a separate value from the product ID.  It appears in the output from "lsusb -v" or in /sys/kernel/debug/usb/devices (where it is labelled "Rev=").

bcdDevice is 1.00

sg_dd did work fine with proper parameters.  I apologize for wasting the time of other kind participants in this thread.  Fortunately we have one genuine bug here waiting to be fixed.

>>>>> Digression:  Someone adjusts the number of blocks from the reported 39070080 (which I think is correct) to 39070079 (which I think is wrong).  I'll have to install the drive in an old notebook to check if the reported number of blocks is really correct.
>>>> 
>>>> Further on this digression:  The number of blocks really is 39070080.� Today libata made no adjustment and the number of blocks was correct.  So some USB component makes a misadjustment to screw up the number of blocks.
>>> 
>>> usb-storage does this, because in the past Prolific's bridges have reported the wrong number of blocks.  In fact, I'm surprised that it seems to work correctly with your drive.
>> 
>> It is hard to imagine a USB bridge adding 1 to the number of blocks.  Did that really happen?
> 
> No.  What happened was that the bridge reported the number of blocks, but SCSI's READ CAPACITY command requires the device to report the highest available block number (which is one smaller since blocks are numbered starting from 0).

I guess you mean that some USB bridges screw up the result of the READ CAPACITY command, so you have to subtract 1 in those cases.  This particular bridge isn't one of them, and the subtraction of 1 was wrong in this case.

hdparm reports the bugged capacity after the incorrect subtraction of 1.  HDIO_GETGEO_BIG also gets the bugged capacity.  I don't see an option to sdparm to get the device capacity (real SCSI devices probably have it in a VPD page but this USB bridge doesn't provide any VPD pages).

sg_dd with correct parameters successfully read the actual last block!  That must be because sg_dd accessed /dev/sgsomething instead of /dev/sdmumble.

My program doesn't know if a USB bridge is defective and/or if a driver defectively manipulated a block count.  So I have to open a /dev/sgsomething, try to read 1 sector past the last sector that we think is valid.  If it fails then I have to find out if the error was due to nonexistence or other reason.  If it succeeds then I have to execute more painful hacks that I have to add.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]             ` <662659.4715.qm-303aDswoEIb1/UedTyKF90yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
@ 2012-03-30 14:20               ` Alan Stern
  2012-03-31  3:36                 ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-03-30 14:20 UTC (permalink / raw)
  To: Norman Diamond
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

On Fri, 30 Mar 2012, Norman Diamond wrote:

> > It is a separate value from the product ID.  It appears in the output from "lsusb -v" or in /sys/kernel/debug/usb/devices (where it is labelled "Rev=").
> 
> bcdDevice is 1.00

That's the same as a bridge that was reported non-working.  Which means 
the OS has no way to tell them apart.

> >> It is hard to imagine a USB bridge adding 1 to the number of blocks.  Did that really happen?
> > 
> > No.  What happened was that the bridge reported the number of blocks, but SCSI's READ CAPACITY command requires the device to report the highest available block number (which is one smaller since blocks are numbered starting from 0).
> 
> I guess you mean that some USB bridges screw up the result of the READ CAPACITY command, so you have to subtract 1 in those cases.  This particular bridge isn't one of them, and the subtraction of 1 was wrong in this case.

True, but the computer has no way to know.  However you can tell
usb-storage not to manipulate the capacity of your drive by specifying
a module parameter:

	modprobe usb-storage quirks=067b:2507:

> hdparm reports the bugged capacity after the incorrect subtraction of 1.  HDIO_GETGEO_BIG also gets the bugged capacity.  I don't see an option to sdparm to get the device capacity (real SCSI devices probably have it in a VPD page but this USB bridge doesn't provide any VPD pages).

I don't know if the information would be in a VPD page or not.  
There's not much point in putting it there, since it's already
available via READ CAPACITY.

> sg_dd with correct parameters successfully read the actual last block!  That must be because sg_dd accessed /dev/sgsomething instead of /dev/sdmumble.
> 
> My program doesn't know if a USB bridge is defective and/or if a driver defectively manipulated a block count.  So I have to open a /dev/sgsomething, try to read 1 sector past the last sector that we think is valid.  If it fails then I have to find out if the error was due to nonexistence or other reason.  If it succeeds then I have to execute more painful hacks that I have to add.

It's not as simple as that.  With many bridges, if you test to see 
whether the block count is too small by trying to read "the block 
beyond the end", you will hang the bridge -- requiring an unplug to 
fix.

There is no good solution to this problem.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-30 14:20               ` Alan Stern
@ 2012-03-31  3:36                 ` Norman Diamond
  2012-03-31 15:31                   ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-03-31  3:36 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

Alan Stern wrote:
> On Fri, 30 Mar 2012, Norman Diamond wrote:
[Attribution lost:]
>>> It is a separate value from the product ID. It appears in the output 
>>> from "lsusb -v" or in /sys/kernel/debug/usb/devices (where it is 
>>> labelled "Rev=").
>>
>> bcdDevice is 1.00
>
> That's the same as a bridge that was reported non-working.  Which means 
> the OS has no way to tell them apart.

There's still something wrong here.  When the bridge is connected to Windows 
XP, Windows accesses the correct number of blocks.  We need to find someone 
who has a non-working but indistinguishable bridge, ask them to connect it 
to Windows XP, and see if Windows XP gets a number of blocks that is too 
large by 1.

>>>> It is hard to imagine a USB bridge adding 1 to the number of blocks. 
>>>> Did that really happen?
>>>
>>> No. What happened was that the bridge reported the number of blocks, but 
>>> SCSI's READ CAPACITY command requires the device to report the highest 
>>> available block number (which is one smaller since blocks are numbered 
>>> starting from 0).
>>
>> I guess you mean that some USB bridges screw up the result of the READ 
>> CAPACITY command, so you have to subtract 1 in those cases.  This 
>> particular bridge isn't one of them, and the subtraction of 1 was wrong 
>> in this case.
>
> True, but the computer has no way to know.  However you can tell 
> usb-storage not to manipulate the capacity of your drive by specifying a 
> module parameter:
> modprobe usb-storage quirks=067b:2507:

I have to find the appropriate file to modify under /etc/modsomething.d. 
It's been a while but I'll find it again.

>> hdparm reports the bugged capacity after the incorrect subtraction of 1. 
>> HDIO_GETGEO_BIG also gets the bugged capacity.  I don't see an option to 
>> sdparm to get the device capacity (real SCSI devices probably have it in 
>> a VPD page but this USB bridge doesn't provide any VPD pages).
>
> I don't know if the information would be in a VPD page or not.  There's 
> not much point in putting it there, since it's already available via READ 
> CAPACITY.

OK.  Anyway VPD pages seem to be irrelevant to discussions of USB-to-ATA 
bridges.

>> sg_dd with correct parameters successfully read the actual last block! 
>> That must be because sg_dd accessed /dev/sgsomething instead of 
>> /dev/sdmumble.
>>
>> My program doesn't know if a USB bridge is defective and/or if a driver 
>> defectively manipulated a block count.  So I have to open a 
>> /dev/sgsomething, try to read 1 sector past the last sector that we think 
>> is valid.  If it fails then I have to find out if the error was due to 
>> nonexistence or other reason.  If it succeeds then I have to execute more 
>> painful hacks that I have to add.
>
> It's not as simple as that.  With many bridges, if you test to see whether 
> the block count is too small by trying to read "the block beyond the end", 
> you will hang the bridge -- requiring an unplug to fix.

Hey, just like my bridge hanged when reading an existing but defective block 
(for which the drive reported its own error).  Actually in yesterday's test, 
I also tried to read 1 sector past the actual last block and got the error 
that I was expecting for that.  I forgot to check if the bridge hanged at 
that point.  I'll have to test that again.

> There is no good solution to this problem.

Agreed.  But in my case I think I need to disable that quirk entirely for 
all USB bridges, so that my uses of Linux will always believe what the USB 
bridge reports.  At least then my program will work correctly when working 
bridges are attached.  Then if a user complains, we can tell them to use a 
different bridge. 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-31  3:36                 ` Norman Diamond
@ 2012-03-31 15:31                   ` Alan Stern
  2012-04-02  4:25                     ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-03-31 15:31 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

On Sat, 31 Mar 2012, Norman Diamond wrote:

> >> bcdDevice is 1.00
> >
> > That's the same as a bridge that was reported non-working.  Which means 
> > the OS has no way to tell them apart.
> 
> There's still something wrong here.  When the bridge is connected to Windows 
> XP, Windows accesses the correct number of blocks.  We need to find someone 
> who has a non-working but indistinguishable bridge, ask them to connect it 
> to Windows XP, and see if Windows XP gets a number of blocks that is too 
> large by 1.

How would you tell?  And what's so special about XP?  Why not Vista or 
Windows 7?

> > There is no good solution to this problem.
> 
> Agreed.  But in my case I think I need to disable that quirk entirely for 
> all USB bridges, so that my uses of Linux will always believe what the USB 
> bridge reports.  At least then my program will work correctly when working 
> bridges are attached.  Then if a user complains, we can tell them to use a 
> different bridge. 

Well, if you want to disable the quirk entirely, it's not hard to do.  
In drivers/usb/storage/scsiglue.c, just get rid of the lines that set 
sdev->fix_capacity and sdev->guess_capacity.

If you want to find out who reported the problems with the bridge chip, 
look in the unusual_devs.h file for the entry with vendor ID 0x067b and 
product ID 0x2507.

Alan Stern


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-31 15:31                   ` Alan Stern
@ 2012-04-02  4:25                     ` Norman Diamond
       [not found]                       ` <307043.7654.qm-W9a5FxB6bg95hgrKqgaBcEyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-02  4:25 UTC (permalink / raw)
  To: linux-usb, linux-scsi

First, more big news:
My USB-to-IDE bridge DOES NOT CRASH when reading a bad block.  When a Linux driver tries to reassign a new USB address and crashes the bridge, the fault is a Linux driver.  (And when Windows forgets about the existence of the drive, the fault is Windows.)

echo 0 >/sys/block/sdc/queue/read_ahead_kb
might or might not be necessary; I haven't tried sg_dd without it.

sg_dd if=/dev/sdc bs=512 count=1 bpt=1 blk_sgio=1 skip=39070080 | od
gets the error that I expected because the block doesn't exist.  dmesg does not show the error; sg_dd detected the error and displayed it on the terminal.  Next I can do this:
sg_dd if=/dev/sdc bs=512 count=1 bpt=1 blk_sgio=1 skip=39070079 | od
and get the contents of the last block.

sg_dd if=/dev/sdc bs=512 count=1 bpt=1 blk_sgio=1 skip=551562 | od
gets the error that I expected because the block is bad.  dmesg does not show the error; sg_dd detected the error and displayed it on the terminal.  Next I can do this:
sg_dd if=/dev/sdc bs=512 count=1 bpt=1 blk_sgio=1 skip=551563 | od
and get the contents of the block after the bad block.

The USB cable did not need to be unplugged and replugged.

Therefore when an ordinary dd fails and a USB driver tries to assign a new address but fails, and the USB cable has to be unplugged and replugged, the fault is a driver.

Alan Stern wrote:
> On Sat, 31 Mar 2012, Norman Diamond wrote:
> 
>>>> bcdDevice is 1.00
>>>
>>> That's the same as a bridge that was reported non-working.  Which means the OS has no way to tell them apart.
>> 
>> There's still something wrong here.  When the bridge is connected to Windows XP, Windows accesses the correct number of blocks.  We need to find someone who has a non-working but indistinguishable bridge, ask them to connect it to Windows XP, and see if Windows XP gets a number of blocks that is too large by 1.
> 
> How would you tell?

http://hdparm-win32.dyndns.org/hdparm/

D:\hdparm for Windows\binary\hdparm-6.9-20070516.win32\bin>hdparm /dev/sdg

/dev/sdg:
 geometry     = 2432/255/63, sectors = 39070080, start = 0

Windows did not get a number of blocks that was too large by 1.  The bridge provided the correct answer for READ CAPACITY, Windows accepted it, and Linux improperly subtracted 1.

> And what's so special about XP?  Why not Vista or Windows 7?

OK, I have Windows 7 installed in two computers (64 bit and 32 bit) and should try the Windows port of the obsolete version of hdparm.

>>> There is no good solution to this problem.
>> 
>> Agreed.

Wrong.  We CAN try to read the last block that the bridge says exists, to see if it really exists or not.  (Well, only partly wrong.  Maybe there really are some bridges that crash in that situation, but mine doesn't, and a broken driver still needs fixing.)

>>  But in my case I think I need to disable that quirk entirely for all USB bridges, so that my uses of Linux will always believe what the USB bridge reports.  At least then my program will work correctly when working bridges are attached.  Then if a user complains, we can tell them to use a different bridge.
>
> Well, if you want to disable the quirk entirely, it's not hard to do.  
> In drivers/usb/storage/scsiglue.c, just get rid of the lines that set 
> sdev->fix_capacity and sdev->guess_capacity.
> 
> If you want to find out who reported the problems with the bridge chip, look in the unusual_devs.h file for the entry with vendor ID 0x067b and product ID 0x2507.

Uh, then feel free to credit me in that file for reporting that the same bridge works  ^_^
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                       ` <307043.7654.qm-W9a5FxB6bg95hgrKqgaBcEyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
@ 2012-04-02 18:40                         ` Alan Stern
       [not found]                           ` <Pine.LNX.4.44L0.1204021430130.12349-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-02 18:40 UTC (permalink / raw)
  To: Norman Diamond
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 2427 bytes --]

On Mon, 2 Apr 2012, Norman Diamond wrote:

> First, more big news:
> My USB-to-IDE bridge DOES NOT CRASH when reading a bad block.  When a Linux driver tries to reassign a new USB address and crashes the bridge, the fault is a Linux driver.  (And when Windows forgets about the existence of the drive, the fault is Windows.)

You really should capture a usbmon trace while running the dd test.  
That will show exactly what is happening.  See
Documentation/usb/usbmon.txt.

> >> There's still something wrong here.  When the bridge is connected to Windows XP, Windows accesses the correct number of blocks.  We need to find someone who has a non-working but indistinguishable bridge, ask them to connect it to Windows XP, and see if Windows XP gets a number of blocks that is too large by 1.
> > 
> > How would you tell?
> 
> http://hdparm-win32.dyndns.org/hdparm/
> 
> D:\hdparm for Windows\binary\hdparm-6.9-20070516.win32\bin>hdparm /dev/sdg
> 
> /dev/sdg:
>  geometry     = 2432/255/63, sectors = 39070080, start = 0
> 
> Windows did not get a number of blocks that was too large by 1.  The bridge provided the correct answer for READ CAPACITY, Windows accepted it, and Linux improperly subtracted 1.

How do you know?  That is, how do you know that the number printed by 
hdparm above is the value used by Windows and not a value obtained 
directly from the bridge by the hdparm program itself?

Not that I have any reason to doubt this result -- I have no way of 
knowing whether or not Windows subtracts 1 from the value reported by 
any USB-(S)ATA bridge.

By the way, just out of curiosity, why does it matter so much for your 
program to know the exact number of blocks a drive contains?

> >>> There is no good solution to this problem.
> >> 
> >> Agreed.
> 
> Wrong.  We CAN try to read the last block that the bridge says exists, to see if it really exists or not.  (Well, only partly wrong.  Maybe there really are some bridges that crash in that situation, but mine doesn't, and a broken driver still needs fixing.)

Yes, there really are such bridges.  You can find reports from people 
complaining about them in the email archives.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                           ` <Pine.LNX.4.44L0.1204021430130.12349-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2012-04-03  7:54                             ` Norman Diamond
  2012-04-03 13:55                               ` James Bottomley
  2012-04-03 14:28                               ` Alan Stern
  0 siblings, 2 replies; 56+ messages in thread
From: Norman Diamond @ 2012-04-03  7:54 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

Alan Stern wrote:
> On Mon, 2 Apr 2012, Norman Diamond wrote:
>> My USB-to-IDE bridge DOES NOT CRASH when reading a bad block.  When a Linux driver tries to reassign a new USB address and crashes the bridge, the fault is a Linux driver.  (And when Windows forgets about the existence of the drive, the fault is Windows.)
> 
> You really should capture a usbmon trace while running the dd test. That will show exactly what is happening.  See Documentation/usb/usbmon.txt.

Documentation/usb/usbmon.txt says:
"Mount debugfs (it has to be enabled in your kernel configuration), and"

I recommend:
"Mount debugfs (CONFIG_DEBUG_FS has to be enabled in your kernel configuration), and"

The help for CONFIG_DEBUG_FS says (or said; this might be outdated):
"debugfs is a virtual file system that kernel developers use to put debugging files into. Enable this option to be able to read and write to these files.
If unsure, say N."

I recommend:
"debugfs is a virtual file system that kernel developers use to put debugging files into. Enable this option to get reports that you can send to kernel developers if you ever have to report a bug.
If unsure, say Y."

Do you know a live Linux system whose kernel already has it built in?


>>>> There's still something wrong here.  When the bridge is connected to Windows XP, Windows accesses the correct number of blocks.  We need to find someone who has a non-working but indistinguishable bridge, ask them to connect it to Windows XP, and see if Windows XP gets a number of blocks that is too large by 1.
>>> 
>>> How would you tell?
>> 
>> http://hdparm-win32.dyndns.org/hdparm/
>> 
>> D:\hdparm for Windows\binary\hdparm-6.9-20070516.win32\bin>hdparm /dev/sdg
>> 
>> /dev/sdg:
>>  geometry     = 2432/255/63, sectors = 39070080, start = 0
>> 
>> Windows did not get a number of blocks that was too large by 1.  The bridge provided the correct answer for READ CAPACITY, Windows accepted it, and Linux improperly subtracted 1.
> 
> How do you know?  That is, how do you know that the number printed by hdparm above is the value used by Windows and not a value obtained directly from the bridge by the hdparm program itself?

Linux said that it was adjusting 39070080 to 39070079.  So surely the bridge reported the maximum block number as 39070079 (for 39070080 blocks).  And I think we can be pretty sure, practically speaking, that this bridge doesn't detect if the PC host is running Windows instead of Linux, so the bridge surely reported the same maximum block number as 39070079 (for 39070080 blocks) to Windows.

I'm pretty sure that the Windows version of hdparm uses IOCTL_DISK_GET_DRIVE_GEOMETRY, IOCTL_DISK_GET_LENGTH_INFO, and SMART_RCV_DRIVE_DATA to get device information.  IOCTL_IDE_PASS_THROUGH and IOCTL_ATA_PASS_THROUGH surely fail (hdparm -I and hdparm -i fail).  

> Not that I have any reason to doubt this result -- I have no way of knowing whether or not Windows subtracts 1 from the value reported by any USB-(S)ATA bridge.

We should try Windows with a known actually broken bridge  ^_^

> By the way, just out of curiosity, why does it matter so much for your program to know the exact number of blocks a drive contains?

The number of blocks is a multiple of 63 * 255, which was convenient for Windows XP and earlier, and convenient for BIOSes, and convenient for Linux users who needed to interact with Windows or BIOSes.

Here is not my reason, but a fact that deserves to be a reason:
When the drive is mounted internally, Linux can create a partition ending at the end of the entire drive.  When the drive is attached to a USB cable, Linux should be expected to be able to access the existing partition.

Here is another fact that deserves to be a reason:
Windows XP can create a partition ending at the end of the entire drive, even if the drive is attached to a USB cable.  Linux should be expected to be able to access it.

Here is a hint at my reason:
Earlier in this thread I mentioned that I don't get to do forensics myself, but I have to be aware of it.

>>>>> There is no good solution to this problem.
>>>> 
>>>> Agreed.
>> 
>> Wrong.  We CAN try to read the last block that the bridge says exists, to see if it really exists or not.  (Well, only partly wrong.  Maybe there really are some bridges that crash in that situation, but mine doesn't, and a broken driver still needs fixing.)
> 
> Yes, there really are such bridges.  You can find reports from people complaining about them in the email archives.

Wait.  Is there a bridge which overreports the last sector number by 1, and which ALSO crashes when the host PC tries to read that supposed last sector number?  If so then we need a quirk for that doubly broken bridge.  But otherwise, we can try to read the supposedly last sector number and figure out whether we have to subtract 1.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-03  7:54                             ` Norman Diamond
@ 2012-04-03 13:55                               ` James Bottomley
  2012-04-04  1:28                                 ` Norman Diamond
  2012-04-03 14:28                               ` Alan Stern
  1 sibling, 1 reply; 56+ messages in thread
From: James Bottomley @ 2012-04-03 13:55 UTC (permalink / raw)
  To: n0diamond; +Cc: linux-usb, linux-scsi

On Tue, 2012-04-03 at 16:54 +0900, Norman Diamond wrote:
> Do you know a live Linux system whose kernel already has it built in?

Every current one from the Community ones to the Enterprise ones.

James



^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-03  7:54                             ` Norman Diamond
  2012-04-03 13:55                               ` James Bottomley
@ 2012-04-03 14:28                               ` Alan Stern
       [not found]                                 ` <Pine.LNX.4.44L0.1204031017110.1537-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
  1 sibling, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-03 14:28 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 1594 bytes --]

On Tue, 3 Apr 2012, Norman Diamond wrote:

> >> Wrong.  We CAN try to read the last block that the bridge says exists, to see if it really exists or not.  (Well, only partly wrong.  Maybe there really are some bridges that crash in that situation, but mine doesn't, and a broken driver still needs fixing.)
> > 
> > Yes, there really are such bridges.  You can find reports from people complaining about them in the email archives.
> 
> Wait.  Is there a bridge which overreports the last sector number by 1, and which ALSO crashes when the host PC tries to read that supposed last sector number?

Yes.  Like I said before, you can find complaints about these things in 
the mailing list archives.  However it's not clear whether the crashing 
is the fault of the bridge itself or the drive it is attached to.

>  If so then we need a quirk for that doubly broken bridge.

That's what the existing quirk entries are there for.

> But otherwise, we can try to read the supposedly last sector number and figure out whether we have to subtract 1.

True enough, but we don't have any way to know which bridges do crash
and which don't other than trying it.  And you'll probably agree that
trial and error is not such a good idea in the cases where the bridge
does crash.

In the end, this gives us very little choice but to rely on the static 
quirk entries.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-03 13:55                               ` James Bottomley
@ 2012-04-04  1:28                                 ` Norman Diamond
       [not found]                                   ` <850871.26108.qm-303aDswoEIaO4BqzrDeqF0yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-04  1:28 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

James Bottomley wrote:
> On Tue, 2012-04-03 at 16:54 +0900, Norman Diamond wrote:
>> Do you know a live Linux system whose kernel already has it built in?
> 
> Every current one from the Community ones to the Enterprise ones.

OK, Porteus 1.1 has it built in.  To see if I should flog myself, I'll have to see if it was built into an older version of Slax or if I screwed up when customizing an older version of Slax.

The usbmon output quoted below comes from the sequence of two commands:
sg_dd blk_sgio=1 bpt=1 bs=512 count=1 if=/dev/sdb of=/dev/null skip=551562
dd bs=512 count=1 if=/dev/sdb of=/dev/null skip=551562

As expected by now, the sg_dd command properly reported an error for the unreadable block, and the USB-to-ATA bridge did not crash.  The dd command also reported an error, and then a driver caused a crash of the driver's self and/or the bridge.

Here is the cat of u2, 868 lines.

f0da9c00 3237261077 S Bo:2:003:1 -115 31 = 55534243 d7000000 24000000 80000612 00000024 00000000 00000000 000000
f0da9c00 3237261251 C Bo:2:003:1 0 31 >
f2938d80 3237261539 S Bi:2:003:2 -115 36 <
f2938d80 3237261706 C Bi:2:003:2 0 36 = 00000000 23000000 48495441 4348495f 444b3233 42412d32 30422020 20202020
f0da9c00 3237261723 S Bi:2:003:2 -115 13 <
f0da9c00 3237261793 C Bi:2:003:2 0 13 = 55534253 d7000000 00000000 00
f0da9c00 3237261905 S Bo:2:003:1 -115 31 = 55534243 d8000000 00020000 80000a28 0000086a 8a000001 00000000 000000
f0da9c00 3237262093 C Bo:2:003:1 0 31 >
f2938d80 3237262250 S Bi:2:003:2 -115 512 <
f2938d80 3239564885 C Bi:2:003:2 -32 0
f0da9c00 3239564972 S Co:2:003:0 s 02 01 0000 0082 0000 0
f0da9c00 3239565256 C Co:2:003:0 0 0
f0da9c00 3239565287 S Bi:2:003:2 -115 13 <
f0da9c00 3239565485 C Bi:2:003:2 0 13 = 55534253 d8000000 00020000 01
f0da9c00 3239565521 S Bo:2:003:1 -115 31 = 55534243 d9000000 12000000 80000603 00000012 00000000 00000000 000000
f0da9c00 3239565740 C Bo:2:003:1 0 31 >
f2938d80 3239565896 S Bi:2:003:2 -115 18 <
f2938d80 3239566129 C Bi:2:003:2 0 18 = 70000000 0000000a 00000000 00000000 0000
f0da9c00 3239566160 S Bi:2:003:2 -115 13 <
f0da9c00 3239566364 C Bi:2:003:2 0 13 = 55534253 d9000000 00000000 00
f0da9c00 3239577155 S Bo:2:003:1 -115 31 = 55534243 da000000 00000000 00000600 00000000 00000000 00000000 000000
f0da9c00 3239577291 C Bo:2:003:1 0 31 >
f0da9c00 3239577492 S Bi:2:003:2 -115 13 <
f0da9c00 3239577666 C Bi:2:003:2 0 13 = 55534253 da000000 00000000 00
f0da9c00 3239579541 S Bo:2:003:1 -115 31 = 55534243 db000000 00100000 80000a28 00025428 80000008 00000000 000000
f0da9c00 3239579702 C Bo:2:003:1 0 31 >
f2938300 3239579845 S Bi:2:003:2 -115 4096 <
f2938300 3239593701 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239593720 S Bi:2:003:2 -115 13 <
f0da9c00 3239593791 C Bi:2:003:2 0 13 = 55534253 db000000 00000000 00
f0da9c00 3239593897 S Bo:2:003:1 -115 31 = 55534243 dc000000 00100000 80000a28 00025429 68000008 00000000 000000
f0da9c00 3239594037 C Bo:2:003:1 0 31 >
f2938300 3239594168 S Bi:2:003:2 -115 4096 <
f2938300 3239606829 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239606849 S Bi:2:003:2 -115 13 <
f0da9c00 3239606916 C Bi:2:003:2 0 13 = 55534253 dc000000 00000000 00
f0da9c00 3239607006 S Bo:2:003:1 -115 31 = 55534243 dd000000 00100000 80000a28 00000000 00000008 00000000 000000
f0da9c00 3239607199 C Bo:2:003:1 0 31 >
f3ed7700 3239607418 S Bi:2:003:2 -115 4096 <
f3ed7700 3239607571 C Bi:2:003:2 0 4096 = fab80010 8ed0bc00 b0b80000 8ed88ec0 fbbe007c bf0006b9 0002f3a4 ea210600
f0da9c00 3239607663 S Bi:2:003:2 -115 13 <
f0da9c00 3239607820 C Bi:2:003:2 0 13 = 55534253 dd000000 00000000 00
f0da9c00 3239608011 S Bo:2:003:1 -115 31 = 55534243 de000000 00100000 80000a28 00000000 08000008 00000000 000000
f0da9c00 3239608040 C Bo:2:003:1 0 31 >
f2938900 3239608192 S Bi:2:003:2 -115 4096 <
f2938900 3239608444 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239608461 S Bi:2:003:2 -115 13 <
f0da9c00 3239608542 C Bi:2:003:2 0 13 = 55534253 de000000 00000000 00
f0da9c00 3239608649 S Bo:2:003:1 -115 31 = 55534243 df000000 00020000 80000a28 00025429 78000001 00000000 000000
f0da9c00 3239608839 C Bo:2:003:1 0 31 >
f2938680 3239608981 S Bi:2:003:2 -115 512 <
f2938680 3239609041 C Bi:2:003:2 0 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239609056 S Bi:2:003:2 -115 13 <
f0da9c00 3239609199 C Bi:2:003:2 0 13 = 55534253 df000000 00000000 00
f0da9c00 3239609256 S Bo:2:003:1 -115 31 = 55534243 e0000000 00020000 80000a28 00025429 79000001 00000000 000000
f0da9c00 3239609446 C Bo:2:003:1 0 31 >
f2938e80 3239609588 S Bi:2:003:2 -115 512 <
f2938e80 3239609666 C Bi:2:003:2 0 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239609675 S Bi:2:003:2 -115 13 <
f0da9c00 3239609788 C Bi:2:003:2 0 13 = 55534253 e0000000 00000000 00
f0da9c00 3239609825 S Bo:2:003:1 -115 31 = 55534243 e1000000 00020000 80000a28 00025429 7a000001 00000000 000000
f0da9c00 3239609913 C Bo:2:003:1 0 31 >
f2938b80 3239610043 S Bi:2:003:2 -115 512 <
f2938b80 3239610329 C Bi:2:003:2 0 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239610341 S Bi:2:003:2 -115 13 <
f0da9c00 3239610419 C Bi:2:003:2 0 13 = 55534253 e1000000 00000000 00
f0da9c00 3239610473 S Bo:2:003:1 -115 31 = 55534243 e2000000 00020000 80000a28 00025429 7b000001 00000000 000000
f0da9c00 3239610536 C Bo:2:003:1 0 31 >
f2938e00 3239610666 S Bi:2:003:2 -115 512 <
f2938e00 3239610916 C Bi:2:003:2 0 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239610928 S Bi:2:003:2 -115 13 <
f0da9c00 3239611040 C Bi:2:003:2 0 13 = 55534253 e2000000 00000000 00
f0da9c00 3239611080 S Bo:2:003:1 -115 31 = 55534243 e3000000 00020000 80000a28 00025429 7c000001 00000000 000000
f0da9c00 3239611181 C Bo:2:003:1 0 31 >
f2938d00 3239611326 S Bi:2:003:2 -115 512 <
f2938d00 3239611574 C Bi:2:003:2 0 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239611591 S Bi:2:003:2 -115 13 <
f0da9c00 3239611666 C Bi:2:003:2 0 13 = 55534253 e3000000 00000000 00
f0da9c00 3239611710 S Bo:2:003:1 -115 31 = 55534243 e4000000 00020000 80000a28 00025429 7d000001 00000000 000000
f0da9c00 3239611786 C Bo:2:003:1 0 31 >
f2938c80 3239611916 S Bi:2:003:2 -115 512 <
f2938c80 3239612188 C Bi:2:003:2 0 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239612205 S Bi:2:003:2 -115 13 <
f0da9c00 3239612311 C Bi:2:003:2 0 13 = 55534253 e4000000 00000000 00
f0da9c00 3239612365 S Bo:2:003:1 -115 31 = 55534243 e5000000 00020000 80000a28 00025429 7e000001 00000000 000000
f0da9c00 3239612416 C Bo:2:003:1 0 31 >
f2938b00 3239612549 S Bi:2:003:2 -115 512 <
f2938b00 3239612791 C Bi:2:003:2 0 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239612820 S Bi:2:003:2 -115 13 <
f0da9c00 3239612915 C Bi:2:003:2 0 13 = 55534253 e5000000 00000000 00
f0da9c00 3239612978 S Bo:2:003:1 -115 31 = 55534243 e6000000 00100000 80000a28 00025428 78000008 00000000 000000
f0da9c00 3239613038 C Bo:2:003:1 0 31 >
f2938900 3239613186 S Bi:2:003:2 -115 4096 <
f2938900 3239613579 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239613620 S Bi:2:003:2 -115 13 <
f0da9c00 3239613662 C Bi:2:003:2 0 13 = 55534253 e6000000 00000000 00
f0da9c00 3239613967 S Bo:2:003:1 -115 31 = 55534243 e7000000 00100000 80000a28 00025429 40000008 00000000 000000
f0da9c00 3239614073 C Bo:2:003:1 0 31 >
f3ed7700 3239614232 S Bi:2:003:2 -115 4096 <
f3ed7700 3239614580 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239614640 S Bi:2:003:2 -115 13 <
f0da9c00 3239614835 C Bi:2:003:2 0 13 = 55534253 e7000000 00000000 00
f0da9c00 3239614969 S Bo:2:003:1 -115 31 = 55534243 e8000000 00100000 80000a28 00025427 f0000008 00000000 000000
f0da9c00 3239615060 C Bo:2:003:1 0 31 >
f2938680 3239615202 S Bi:2:003:2 -115 4096 <
f2938680 3239627829 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239627881 S Bi:2:003:2 -115 13 <
f0da9c00 3239628069 C Bi:2:003:2 0 13 = 55534253 e8000000 00000000 00
f0da9c00 3239628196 S Bo:2:003:1 -115 31 = 55534243 e9000000 000e0000 80000a28 00025429 70000007 00000000 000000
f0da9c00 3239628310 C Bo:2:003:1 0 31 >
f2938900 3239628470 S Bi:2:003:2 -115 3584 <
f2938900 3239628665 C Bi:2:003:2 0 3584 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239628692 S Bi:2:003:2 -115 13 <
f0da9c00 3239628786 C Bi:2:003:2 0 13 = 55534253 e9000000 00000000 00
f0da9c00 3239628819 S Bo:2:003:1 -115 31 = 55534243 ea000000 00020000 80000a28 00025429 77000001 00000000 000000
f0da9c00 3239628912 C Bo:2:003:1 0 31 >
f2938b00 3239629056 S Bi:2:003:2 -115 512 <
f2938b00 3239629327 C Bi:2:003:2 0 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239629368 S Bi:2:003:2 -115 13 <
f0da9c00 3239629416 C Bi:2:003:2 0 13 = 55534253 ea000000 00000000 00
f0da9c00 3239629546 S Bo:2:003:1 -115 31 = 55534243 eb000000 00100000 80000a28 00000008 00000008 00000000 000000
f0da9c00 3239629701 C Bo:2:003:1 0 31 >
f3ed7180 3239629943 S Bi:2:003:2 -115 4096 <
f3ed7180 3239662367 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239662489 S Bi:2:003:2 -115 13 <
f0da9c00 3239662574 C Bi:2:003:2 0 13 = 55534253 eb000000 00000000 00
f0da9c00 3239662719 S Bo:2:003:1 -115 31 = 55534243 ec000000 00100000 80000a28 00000000 18000008 00000000 000000
f0da9c00 3239662850 C Bo:2:003:1 0 31 >
f2938900 3239663035 S Bi:2:003:2 -115 4096 <
f2938900 3239674258 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239674322 S Bi:2:003:2 -115 13 <
f0da9c00 3239674493 C Bi:2:003:2 0 13 = 55534253 ec000000 00000000 00
f0da9c00 3239674631 S Bo:2:003:1 -115 31 = 55534243 ed000000 00100000 80000a28 00000000 38000008 00000000 000000
f0da9c00 3239674820 C Bo:2:003:1 0 31 >
f2938900 3239674990 S Bi:2:003:2 -115 4096 <
f2938900 3239675210 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239675263 S Bi:2:003:2 -115 13 <
f0da9c00 3239675449 C Bi:2:003:2 0 13 = 55534253 ed000000 00000000 00
f0da9c00 3239675557 S Bo:2:003:1 -115 31 = 55534243 ee000000 00100000 80000a28 00000000 78000008 00000000 000000
f0da9c00 3239675696 C Bo:2:003:1 0 31 >
f2938900 3239675861 S Bi:2:003:2 -115 4096 <
f2938900 3239676705 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239676754 S Bi:2:003:2 -115 13 <
f0da9c00 3239676804 C Bi:2:003:2 0 13 = 55534253 ee000000 00000000 00
f0da9c00 3239676905 S Bo:2:003:1 -115 31 = 55534243 ef000000 00100000 80000a28 00000000 10000008 00000000 000000
f0da9c00 3239677104 C Bo:2:003:1 0 31 >
f2938900 3239677270 S Bi:2:003:2 -115 4096 <
f2938900 3239677439 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239677488 S Bi:2:003:2 -115 13 <
f0da9c00 3239677541 C Bi:2:003:2 0 13 = 55534253 ef000000 00000000 00
f0da9c00 3239677649 S Bo:2:003:1 -115 31 = 55534243 f0000000 00100000 80000a28 00000000 80000008 00000000 000000
f0da9c00 3239677821 C Bo:2:003:1 0 31 >
f2938900 3239677989 S Bi:2:003:2 -115 4096 <
f2938900 3239678208 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239678257 S Bi:2:003:2 -115 13 <
f0da9c00 3239678447 C Bi:2:003:2 0 13 = 55534253 f0000000 00000000 00
f0da9c00 3239678560 S Bo:2:003:1 -115 31 = 55534243 f1000000 00100000 80000a28 00000000 40000008 00000000 000000
f0da9c00 3239678698 C Bo:2:003:1 0 31 >
f2938900 3239678864 S Bi:2:003:2 -115 4096 <
f2938900 3239679079 C Bi:2:003:2 0 4096 = f8ffffff ffffffff ffffffff ffffffff 0000ffff 00000000 00000000 00000000
f0da9c00 3239679127 S Bi:2:003:2 -115 13 <
f0da9c00 3239679172 C Bi:2:003:2 0 13 = 55534253 f1000000 00000000 00
f0da9c00 3239679271 S Bo:2:003:1 -115 31 = 55534243 f2000000 00100000 80000a28 00000001 00000008 00000000 000000
f0da9c00 3239679444 C Bo:2:003:1 0 31 >
f2938900 3239679612 S Bi:2:003:2 -115 4096 <
f2938900 3239680326 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239680377 S Bi:2:003:2 -115 13 <
f0da9c00 3239680567 C Bi:2:003:2 0 13 = 55534253 f2000000 00000000 00
f0da9c00 3239680673 S Bo:2:003:1 -115 31 = 55534243 f3000000 00100000 80000a28 00000001 08000008 00000000 000000
f0da9c00 3239680819 C Bo:2:003:1 0 31 >
f2938900 3239680988 S Bi:2:003:2 -115 4096 <
f2938900 3239681211 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239681260 S Bi:2:003:2 -115 13 <
f0da9c00 3239681445 C Bi:2:003:2 0 13 = 55534253 f3000000 00000000 00
f0da9c00 3239681552 S Bo:2:003:1 -115 31 = 55534243 f4000000 00100000 80000a28 00000001 10000008 00000000 000000
f0da9c00 3239681693 C Bo:2:003:1 0 31 >
f2938900 3239681861 S Bi:2:003:2 -115 4096 <
f2938900 3239682073 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239682129 S Bi:2:003:2 -115 13 <
f0da9c00 3239682289 C Bi:2:003:2 0 13 = 55534253 f4000000 00000000 00
f0da9c00 3239682332 S Bo:2:003:1 -115 31 = 55534243 f5000000 00100000 80000a28 00000001 18000008 00000000 000000
f0da9c00 3239682452 C Bo:2:003:1 0 31 >
f2938900 3239682619 S Bi:2:003:2 -115 4096 <
f2938900 3239682791 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239682827 S Bi:2:003:2 -115 13 <
f0da9c00 3239682915 C Bi:2:003:2 0 13 = 55534253 f5000000 00000000 00
f0da9c00 3239682977 S Bo:2:003:1 -115 31 = 55534243 f6000000 00100000 80000a28 00000001 20000008 00000000 000000
f0da9c00 3239683051 C Bo:2:003:1 0 31 >
f3ed7f00 3239683236 S Bi:2:003:2 -115 4096 <
f3ed7f00 3239683486 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239683615 S Bi:2:003:2 -115 13 <
f0da9c00 3239683696 C Bi:2:003:2 0 13 = 55534253 f6000000 00000000 00
f0da9c00 3239683844 S Bo:2:003:1 -115 31 = 55534243 f7000000 00100000 80000a28 00000001 28000008 00000000 000000
f0da9c00 3239683931 C Bo:2:003:1 0 31 >
f3ed7800 3239684144 S Bi:2:003:2 -115 4096 <
f3ed7800 3239684319 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239684413 S Bi:2:003:2 -115 13 <
f0da9c00 3239684571 C Bi:2:003:2 0 13 = 55534253 f7000000 00000000 00
f0da9c00 3239684742 S Bo:2:003:1 -115 31 = 55534243 f8000000 00100000 80000a28 00000001 30000008 00000000 000000
f0da9c00 3239684789 C Bo:2:003:1 0 31 >
f3ed7800 3239684952 S Bi:2:003:2 -115 4096 <
f3ed7800 3239685337 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239685397 S Bi:2:003:2 -115 13 <
f0da9c00 3239685571 C Bi:2:003:2 0 13 = 55534253 f8000000 00000000 00
f0da9c00 3239685692 S Bo:2:003:1 -115 31 = 55534243 f9000000 00100000 80000a28 00000001 38000008 00000000 000000
f0da9c00 3239685822 C Bo:2:003:1 0 31 >
f2938600 3239685972 S Bi:2:003:2 -115 4096 <
f2938600 3239686212 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239686234 S Bi:2:003:2 -115 13 <
f0da9c00 3239686301 C Bi:2:003:2 0 13 = 55534253 f9000000 00000000 00
f0da9c00 3239686389 S Bo:2:003:1 -115 31 = 55534243 fa000000 00100000 80000a28 00000001 40000008 00000000 000000
f0da9c00 3239686537 C Bo:2:003:1 0 31 >
f2938900 3239686681 S Bi:2:003:2 -115 4096 <
f2938900 3239686790 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239686807 S Bi:2:003:2 -115 13 <
f0da9c00 3239686915 C Bi:2:003:2 0 13 = 55534253 fa000000 00000000 00
f0da9c00 3239686988 S Bo:2:003:1 -115 31 = 55534243 fb000000 00100000 80000a28 00000001 48000008 00000000 000000
f0da9c00 3239687040 C Bo:2:003:1 0 31 >
f28f0800 3239687183 S Bi:2:003:2 -115 4096 <
f28f0800 3239687415 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239687583 S Bi:2:003:2 -115 13 <
f0da9c00 3239687665 C Bi:2:003:2 0 13 = 55534253 fb000000 00000000 00
f0da9c00 3239687790 S Bo:2:003:1 -115 31 = 55534243 fc000000 00100000 80000a28 00000001 50000008 00000000 000000
f0da9c00 3239687913 C Bo:2:003:1 0 31 >
f2938200 3239688054 S Bi:2:003:2 -115 4096 <
f2938200 3239688540 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239688558 S Bi:2:003:2 -115 13 <
f0da9c00 3239688665 C Bi:2:003:2 0 13 = 55534253 fc000000 00000000 00
f0da9c00 3239688739 S Bo:2:003:1 -115 31 = 55534243 fd000000 00100000 80000a28 00000001 58000008 00000000 000000
f0da9c00 3239688789 C Bo:2:003:1 0 31 >
f2938200 3239688923 S Bi:2:003:2 -115 4096 <
f2938200 3239689167 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239689183 S Bi:2:003:2 -115 13 <
f0da9c00 3239689290 C Bi:2:003:2 0 13 = 55534253 fd000000 00000000 00
f0da9c00 3239689361 S Bo:2:003:1 -115 31 = 55534243 fe000000 00100000 80000a28 00000001 60000008 00000000 000000
f0da9c00 3239689410 C Bo:2:003:1 0 31 >
f2938200 3239689544 S Bi:2:003:2 -115 4096 <
f2938200 3239689790 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239689807 S Bi:2:003:2 -115 13 <
f0da9c00 3239689915 C Bi:2:003:2 0 13 = 55534253 fe000000 00000000 00
f0da9c00 3239689985 S Bo:2:003:1 -115 31 = 55534243 ff000000 00100000 80000a28 00000001 68000008 00000000 000000
f0da9c00 3239690039 C Bo:2:003:1 0 31 >
f2938200 3239690173 S Bi:2:003:2 -115 4096 <
f2938200 3239690415 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239690433 S Bi:2:003:2 -115 13 <
f0da9c00 3239690540 C Bi:2:003:2 0 13 = 55534253 ff000000 00000000 00
f0da9c00 3239690612 S Bo:2:003:1 -115 31 = 55534243 00010000 00100000 80000a28 00000001 70000008 00000000 000000
f0da9c00 3239690661 C Bo:2:003:1 0 31 >
f2938200 3239690799 S Bi:2:003:2 -115 4096 <
f2938200 3239691040 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239691057 S Bi:2:003:2 -115 13 <
f0da9c00 3239691165 C Bi:2:003:2 0 13 = 55534253 00010000 00000000 00
f0da9c00 3239691242 S Bo:2:003:1 -115 31 = 55534243 01010000 00100000 80000a28 00000001 78000008 00000000 000000
f0da9c00 3239691286 C Bo:2:003:1 0 31 >
f2938200 3239691424 S Bi:2:003:2 -115 4096 <
f2938200 3239691665 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239691682 S Bi:2:003:2 -115 13 <
f0da9c00 3239691790 C Bi:2:003:2 0 13 = 55534253 01010000 00000000 00
f0da9c00 3239691861 S Bo:2:003:1 -115 31 = 55534243 02010000 00100000 80000a28 00000001 80000008 00000000 000000
f0da9c00 3239691915 C Bo:2:003:1 0 31 >
f3ed7800 3239692055 S Bi:2:003:2 -115 4096 <
f3ed7800 3239692290 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239692417 S Bi:2:003:2 -115 13 <
f0da9c00 3239692537 C Bi:2:003:2 0 13 = 55534253 02010000 00000000 00
f0da9c00 3239692627 S Bo:2:003:1 -115 31 = 55534243 03010000 00100000 80000a28 00000001 88000008 00000000 000000
f0da9c00 3239692667 C Bo:2:003:1 0 31 >
f28f0800 3239692818 S Bi:2:003:2 -115 4096 <
f28f0800 3239693163 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239693327 S Bi:2:003:2 -115 13 <
f0da9c00 3239693412 C Bi:2:003:2 0 13 = 55534253 03010000 00000000 00
f0da9c00 3239693539 S Bo:2:003:1 -115 31 = 55534243 04010000 00100000 80000a28 00000001 90000008 00000000 000000
f0da9c00 3239693661 C Bo:2:003:1 0 31 >
f3ed7800 3239693792 S Bi:2:003:2 -115 4096 <
f3ed7800 3239693915 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239693950 S Bi:2:003:2 -115 13 <
f0da9c00 3239694040 C Bi:2:003:2 0 13 = 55534253 04010000 00000000 00
f0da9c00 3239694118 S Bo:2:003:1 -115 31 = 55534243 05010000 00100000 80000a28 00000001 98000008 00000000 000000
f0da9c00 3239694164 C Bo:2:003:1 0 31 >
f2938600 3239694302 S Bi:2:003:2 -115 4096 <
f2938600 3239694539 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239694556 S Bi:2:003:2 -115 13 <
f0da9c00 3239694665 C Bi:2:003:2 0 13 = 55534253 05010000 00000000 00
f0da9c00 3239694736 S Bo:2:003:1 -115 31 = 55534243 06010000 00100000 80000a28 00000001 a0000008 00000000 000000
f0da9c00 3239694786 C Bo:2:003:1 0 31 >
f3ed7800 3239694924 S Bi:2:003:2 -115 4096 <
f3ed7800 3239695166 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239695295 S Bi:2:003:2 -115 13 <
f0da9c00 3239695412 C Bi:2:003:2 0 13 = 55534253 06010000 00000000 00
f0da9c00 3239695514 S Bo:2:003:1 -115 31 = 55534243 07010000 00100000 80000a28 00000001 a8000008 00000000 000000
f0da9c00 3239695538 C Bo:2:003:1 0 31 >
f2938280 3239695679 S Bi:2:003:2 -115 4096 <
f2938280 3239696040 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239696057 S Bi:2:003:2 -115 13 <
f0da9c00 3239696162 C Bi:2:003:2 0 13 = 55534253 07010000 00000000 00
f0da9c00 3239696236 S Bo:2:003:1 -115 31 = 55534243 08010000 00100000 80000a28 00000001 b0000008 00000000 000000
f0da9c00 3239696289 C Bo:2:003:1 0 31 >
f28f0800 3239696430 S Bi:2:003:2 -115 4096 <
f28f0800 3239696662 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239696842 S Bi:2:003:2 -115 13 <
f0da9c00 3239696915 C Bi:2:003:2 0 13 = 55534253 08010000 00000000 00
f0da9c00 3239697056 S Bo:2:003:1 -115 31 = 55534243 09010000 00100000 80000a28 00000001 b8000008 00000000 000000
f0da9c00 3239697186 C Bo:2:003:1 0 31 >
f28f0780 3239697406 S Bi:2:003:2 -115 4096 <
f28f0780 3239697571 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239697665 S Bi:2:003:2 -115 13 <
f0da9c00 3239697828 C Bi:2:003:2 0 13 = 55534253 09010000 00000000 00
f0da9c00 3239698012 S Bo:2:003:1 -115 31 = 55534243 0a010000 00100000 80000a28 00000001 c0000008 00000000 000000
f0da9c00 3239698044 C Bo:2:003:1 0 31 >
f28f0780 3239698185 S Bi:2:003:2 -115 4096 <
f28f0780 3239698451 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239698557 S Bi:2:003:2 -115 13 <
f0da9c00 3239698683 C Bi:2:003:2 0 13 = 55534253 0a010000 00000000 00
f0da9c00 3239698859 S Bo:2:003:1 -115 31 = 55534243 0b010000 00100000 80000a28 00000001 c8000008 00000000 000000
f0da9c00 3239698919 C Bo:2:003:1 0 31 >
f28f0780 3239699072 S Bi:2:003:2 -115 4096 <
f28f0780 3239699455 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239699559 S Bi:2:003:2 -115 13 <
f0da9c00 3239699684 C Bi:2:003:2 0 13 = 55534253 0b010000 00000000 00
f0da9c00 3239699865 S Bo:2:003:1 -115 31 = 55534243 0c010000 00100000 80000a28 00000001 d0000008 00000000 000000
f0da9c00 3239699914 C Bo:2:003:1 0 31 >
f28f0780 3239700072 S Bi:2:003:2 -115 4096 <
f28f0780 3239700332 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239700392 S Bi:2:003:2 -115 13 <
f0da9c00 3239700577 C Bi:2:003:2 0 13 = 55534253 0c010000 00000000 00
f0da9c00 3239700697 S Bo:2:003:1 -115 31 = 55534243 0d010000 00100000 80000a28 00000001 d8000008 00000000 000000
f0da9c00 3239700812 C Bo:2:003:1 0 31 >
f2938280 3239700959 S Bi:2:003:2 -115 4096 <
f2938280 3239701208 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239701231 S Bi:2:003:2 -115 13 <
f0da9c00 3239701307 C Bi:2:003:2 0 13 = 55534253 0d010000 00000000 00
f0da9c00 3239701399 S Bo:2:003:1 -115 31 = 55534243 0e010000 00100000 80000a28 00000001 e0000008 00000000 000000
f0da9c00 3239701538 C Bo:2:003:1 0 31 >
f2938600 3239701681 S Bi:2:003:2 -115 4096 <
f2938600 3239701912 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239701933 S Bi:2:003:2 -115 13 <
f0da9c00 3239702036 C Bi:2:003:2 0 13 = 55534253 0e010000 00000000 00
f0da9c00 3239702126 S Bo:2:003:1 -115 31 = 55534243 0f010000 00100000 80000a28 00000001 e8000008 00000000 000000
f0da9c00 3239702164 C Bo:2:003:1 0 31 >
f2938600 3239702306 S Bi:2:003:2 -115 4096 <
f2938600 3239702540 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239702557 S Bi:2:003:2 -115 13 <
f0da9c00 3239702665 C Bi:2:003:2 0 13 = 55534253 0f010000 00000000 00
f0da9c00 3239702737 S Bo:2:003:1 -115 31 = 55534243 10010000 00100000 80000a28 00000001 f0000008 00000000 000000
f0da9c00 3239702790 C Bo:2:003:1 0 31 >
f28f0780 3239702935 S Bi:2:003:2 -115 4096 <
f28f0780 3239703163 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239703353 S Bi:2:003:2 -115 13 <
f0da9c00 3239703412 C Bi:2:003:2 0 13 = 55534253 10010000 00000000 00
f0da9c00 3239703550 S Bo:2:003:1 -115 31 = 55534243 11010000 00100000 80000a28 00000001 f8000008 00000000 000000
f0da9c00 3239703704 C Bo:2:003:1 0 31 >
f28f0c80 3239703900 S Bi:2:003:2 -115 4096 <
f28f0c80 3239704077 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239704169 S Bi:2:003:2 -115 13 <
f0da9c00 3239704329 C Bi:2:003:2 0 13 = 55534253 11010000 00000000 00
f0da9c00 3239704464 S Bo:2:003:1 -115 31 = 55534243 12010000 00100000 80000a28 00000003 00000008 00000000 000000
f0da9c00 3239704543 C Bo:2:003:1 0 31 >
f28f0c80 3239704703 S Bi:2:003:2 -115 4096 <
f28f0c80 3239704963 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239705047 S Bi:2:003:2 -115 13 <
f0da9c00 3239705201 C Bi:2:003:2 0 13 = 55534253 12010000 00000000 00
f0da9c00 3239705332 S Bo:2:003:1 -115 31 = 55534243 13010000 00100000 80000a28 00000003 08000008 00000000 000000
f0da9c00 3239705433 C Bo:2:003:1 0 31 >
f28f0c80 3239705628 S Bi:2:003:2 -115 4096 <
f28f0c80 3239705837 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239705920 S Bi:2:003:2 -115 13 <
f0da9c00 3239706065 C Bi:2:003:2 0 13 = 55534253 13010000 00000000 00
f0da9c00 3239706211 S Bo:2:003:1 -115 31 = 55534243 14010000 00100000 80000a28 00000003 10000008 00000000 000000
f0da9c00 3239706310 C Bo:2:003:1 0 31 >
f28f0c80 3239706505 S Bi:2:003:2 -115 4096 <
f28f0c80 3239706702 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239706786 S Bi:2:003:2 -115 13 <
f0da9c00 3239706955 C Bi:2:003:2 0 13 = 55534253 14010000 00000000 00
f0da9c00 3239707119 S Bo:2:003:1 -115 31 = 55534243 15010000 00100000 80000a28 00000003 18000008 00000000 000000
f0da9c00 3239707162 C Bo:2:003:1 0 31 >
f28f0c80 3239707340 S Bi:2:003:2 -115 4096 <
f28f0c80 3239707691 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239707760 S Bi:2:003:2 -115 13 <
f0da9c00 3239707963 C Bi:2:003:2 0 13 = 55534253 15010000 00000000 00
f0da9c00 3239708120 S Bo:2:003:1 -115 31 = 55534243 16010000 00100000 80000a28 00000003 20000008 00000000 000000
f0da9c00 3239708165 C Bo:2:003:1 0 31 >
f28f0c80 3239708337 S Bi:2:003:2 -115 4096 <
f28f0c80 3239708582 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239708666 S Bi:2:003:2 -115 13 <
f0da9c00 3239708825 C Bi:2:003:2 0 13 = 55534253 16010000 00000000 00
f0da9c00 3239708956 S Bo:2:003:1 -115 31 = 55534243 17010000 00100000 80000a28 00000003 28000008 00000000 000000
f0da9c00 3239709037 C Bo:2:003:1 0 31 >
f28f0c80 3239709227 S Bi:2:003:2 -115 4096 <
f28f0c80 3239709414 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239709439 S Bi:2:003:2 -115 13 <
f0da9c00 3239709573 C Bi:2:003:2 0 13 = 55534253 17010000 00000000 00
f0da9c00 3239709661 S Bo:2:003:1 -115 31 = 55534243 18010000 00100000 80000a28 00000003 30000008 00000000 000000
f0da9c00 3239709791 C Bo:2:003:1 0 31 >
f2938600 3239709934 S Bi:2:003:2 -115 4096 <
f2938600 3239710163 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239710199 S Bi:2:003:2 -115 13 <
f0da9c00 3239710305 C Bi:2:003:2 0 13 = 55534253 18010000 00000000 00
f0da9c00 3239710404 S Bo:2:003:1 -115 31 = 55534243 19010000 00100000 80000a28 00000003 38000008 00000000 000000
f0da9c00 3239710538 C Bo:2:003:1 0 31 >
f28f0180 3239710786 S Bi:2:003:2 -115 4096 <
f28f0180 3239710960 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239711077 S Bi:2:003:2 -115 13 <
f0da9c00 3239711185 C Bi:2:003:2 0 13 = 55534253 19010000 00000000 00
f0da9c00 3239711368 S Bo:2:003:1 -115 31 = 55534243 1a010000 00100000 80000a28 00000003 40000008 00000000 000000
f0da9c00 3239711450 C Bo:2:003:1 0 31 >
f28f0180 3239711601 S Bi:2:003:2 -115 4096 <
f28f0180 3239711948 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239711980 S Bi:2:003:2 -115 13 <
f0da9c00 3239712081 C Bi:2:003:2 0 13 = 55534253 1a010000 00000000 00
f0da9c00 3239712172 S Bo:2:003:1 -115 31 = 55534243 1b010000 00100000 80000a28 00000003 48000008 00000000 000000
f0da9c00 3239712323 C Bo:2:003:1 0 31 >
f28f0180 3239712473 S Bi:2:003:2 -115 4096 <
f28f0180 3239712699 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239712729 S Bi:2:003:2 -115 13 <
f0da9c00 3239712804 C Bi:2:003:2 0 13 = 55534253 1b010000 00000000 00
f0da9c00 3239712885 S Bo:2:003:1 -115 31 = 55534243 1c010000 00100000 80000a28 00000003 50000008 00000000 000000
f0da9c00 3239712915 C Bo:2:003:1 0 31 >
f28f0180 3239713063 S Bi:2:003:2 -115 4096 <
f28f0180 3239713290 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239713316 S Bi:2:003:2 -115 13 <
f0da9c00 3239713412 C Bi:2:003:2 0 13 = 55534253 1c010000 00000000 00
f0da9c00 3239713496 S Bo:2:003:1 -115 31 = 55534243 1d010000 00100000 80000a28 00000003 58000008 00000000 000000
f0da9c00 3239713540 C Bo:2:003:1 0 31 >
f28f0180 3239713687 S Bi:2:003:2 -115 4096 <
f28f0180 3239713915 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239713945 S Bi:2:003:2 -115 13 <
f0da9c00 3239714040 C Bi:2:003:2 0 13 = 55534253 1d010000 00000000 00
f0da9c00 3239714130 S Bo:2:003:1 -115 31 = 55534243 1e010000 00100000 80000a28 00000003 60000008 00000000 000000
f0da9c00 3239714165 C Bo:2:003:1 0 31 >
f28f0180 3239714315 S Bi:2:003:2 -115 4096 <
f28f0180 3239714537 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239714562 S Bi:2:003:2 -115 13 <
f0da9c00 3239714665 C Bi:2:003:2 0 13 = 55534253 1e010000 00000000 00
f0da9c00 3239714751 S Bo:2:003:1 -115 31 = 55534243 1f010000 00100000 80000a28 00000003 68000008 00000000 000000
f0da9c00 3239714785 C Bo:2:003:1 0 31 >
f2938f00 3239714923 S Bi:2:003:2 -115 4096 <
f2938f00 3239715165 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239715201 S Bi:2:003:2 -115 13 <
f0da9c00 3239715287 C Bi:2:003:2 0 13 = 55534253 1f010000 00000000 00
f0da9c00 3239715349 S Bo:2:003:1 -115 31 = 55534243 20010000 00100000 80000a28 00000003 70000008 00000000 000000
f0da9c00 3239715416 C Bo:2:003:1 0 31 >
f3ed7300 3239715622 S Bi:2:003:2 -115 4096 <
f3ed7300 3239715790 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239715971 S Bi:2:003:2 -115 13 <
f0da9c00 3239716057 C Bi:2:003:2 0 13 = 55534253 20010000 00000000 00
f0da9c00 3239716205 S Bo:2:003:1 -115 31 = 55534243 21010000 00100000 80000a28 00000003 78000008 00000000 000000
f0da9c00 3239716287 C Bo:2:003:1 0 31 >
f2938f00 3239716441 S Bi:2:003:2 -115 4096 <
f2938f00 3239716662 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239716700 S Bi:2:003:2 -115 13 <
f0da9c00 3239716786 C Bi:2:003:2 0 13 = 55534253 21010000 00000000 00
f0da9c00 3239716832 S Bo:2:003:1 -115 31 = 55534243 22010000 00100000 80000a28 00000003 80000008 00000000 000000
f0da9c00 3239716916 C Bo:2:003:1 0 31 >
f2938f00 3239717069 S Bi:2:003:2 -115 4096 <
f2938f00 3239717287 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239717326 S Bi:2:003:2 -115 13 <
f0da9c00 3239717412 C Bi:2:003:2 0 13 = 55534253 22010000 00000000 00
f0da9c00 3239717458 S Bo:2:003:1 -115 31 = 55534243 23010000 00100000 80000a28 00000003 88000008 00000000 000000
f0da9c00 3239717541 C Bo:2:003:1 0 31 >
f2938f00 3239717694 S Bi:2:003:2 -115 4096 <
f2938f00 3239717915 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239717948 S Bi:2:003:2 -115 13 <
f0da9c00 3239718037 C Bi:2:003:2 0 13 = 55534253 23010000 00000000 00
f0da9c00 3239718116 S Bo:2:003:1 -115 31 = 55534243 24010000 00100000 80000a28 00000003 90000008 00000000 000000
f0da9c00 3239718163 C Bo:2:003:1 0 31 >
f3ed7300 3239718338 S Bi:2:003:2 -115 4096 <
f3ed7300 3239718567 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239718701 S Bi:2:003:2 -115 13 <
f0da9c00 3239718822 C Bi:2:003:2 0 13 = 55534253 24010000 00000000 00
f0da9c00 3239719022 S Bo:2:003:1 -115 31 = 55534243 25010000 00100000 80000a28 00000003 98000008 00000000 000000
f0da9c00 3239719163 C Bo:2:003:1 0 31 >
f2938600 3239719325 S Bi:2:003:2 -115 4096 <
f2938600 3239719579 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239719628 S Bi:2:003:2 -115 13 <
f0da9c00 3239719836 C Bi:2:003:2 0 13 = 55534253 25010000 00000000 00
f0da9c00 3239719941 S Bo:2:003:1 -115 31 = 55534243 26010000 00100000 80000a28 00000003 a0000008 00000000 000000
f0da9c00 3239720036 C Bo:2:003:1 0 31 >
f2938f00 3239720173 S Bi:2:003:2 -115 4096 <
f2938f00 3239720541 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239720576 S Bi:2:003:2 -115 13 <
f0da9c00 3239720665 C Bi:2:003:2 0 13 = 55534253 26010000 00000000 00
f0da9c00 3239720715 S Bo:2:003:1 -115 31 = 55534243 27010000 00100000 80000a28 00000003 a8000008 00000000 000000
f0da9c00 3239720791 C Bo:2:003:1 0 31 >
f2938f00 3239720944 S Bi:2:003:2 -115 4096 <
f2938f00 3239721165 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239721204 S Bi:2:003:2 -115 13 <
f0da9c00 3239721287 C Bi:2:003:2 0 13 = 55534253 27010000 00000000 00
f0da9c00 3239721336 S Bo:2:003:1 -115 31 = 55534243 28010000 00100000 80000a28 00000003 b0000008 00000000 000000
f0da9c00 3239721413 C Bo:2:003:1 0 31 >
f2938f00 3239721566 S Bi:2:003:2 -115 4096 <
f2938f00 3239721791 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239721824 S Bi:2:003:2 -115 13 <
f0da9c00 3239721915 C Bi:2:003:2 0 13 = 55534253 28010000 00000000 00
f0da9c00 3239721967 S Bo:2:003:1 -115 31 = 55534243 29010000 00100000 80000a28 00000003 b8000008 00000000 000000
f0da9c00 3239722041 C Bo:2:003:1 0 31 >
f2938f00 3239722194 S Bi:2:003:2 -115 4096 <
f2938f00 3239722414 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239722448 S Bi:2:003:2 -115 13 <
f0da9c00 3239722536 C Bi:2:003:2 0 13 = 55534253 29010000 00000000 00
f0da9c00 3239722585 S Bo:2:003:1 -115 31 = 55534243 2a010000 00100000 80000a28 00000003 c0000008 00000000 000000
f0da9c00 3239722666 C Bo:2:003:1 0 31 >
f2938f00 3239722819 S Bi:2:003:2 -115 4096 <
f2938f00 3239723040 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239723074 S Bi:2:003:2 -115 13 <
f0da9c00 3239723165 C Bi:2:003:2 0 13 = 55534253 2a010000 00000000 00
f0da9c00 3239723215 S Bo:2:003:1 -115 31 = 55534243 2b010000 00100000 80000a28 00000003 c8000008 00000000 000000
f0da9c00 3239723287 C Bo:2:003:1 0 31 >
f2938f00 3239723440 S Bi:2:003:2 -115 4096 <
f2938f00 3239723664 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239723698 S Bi:2:003:2 -115 13 <
f0da9c00 3239723786 C Bi:2:003:2 0 13 = 55534253 2b010000 00000000 00
f0da9c00 3239723834 S Bo:2:003:1 -115 31 = 55534243 2c010000 00100000 80000a28 00000003 d0000008 00000000 000000
f0da9c00 3239723914 C Bo:2:003:1 0 31 >
f2938f00 3239724068 S Bi:2:003:2 -115 4096 <
f2938f00 3239724289 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239724328 S Bi:2:003:2 -115 13 <
f0da9c00 3239724412 C Bi:2:003:2 0 13 = 55534253 2c010000 00000000 00
f0da9c00 3239724458 S Bo:2:003:1 -115 31 = 55534243 2d010000 00100000 80000a28 00000003 d8000008 00000000 000000
f0da9c00 3239724537 C Bo:2:003:1 0 31 >
f2938f00 3239724690 S Bi:2:003:2 -115 4096 <
f2938f00 3239724912 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239724946 S Bi:2:003:2 -115 13 <
f0da9c00 3239725040 C Bi:2:003:2 0 13 = 55534253 2d010000 00000000 00
f0da9c00 3239725085 S Bo:2:003:1 -115 31 = 55534243 2e010000 00100000 80000a28 00000003 e0000008 00000000 000000
f0da9c00 3239725166 C Bo:2:003:1 0 31 >
f2938f00 3239725320 S Bi:2:003:2 -115 4096 <
f2938f00 3239725540 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239725574 S Bi:2:003:2 -115 13 <
f0da9c00 3239725665 C Bi:2:003:2 0 13 = 55534253 2e010000 00000000 00
f0da9c00 3239725712 S Bo:2:003:1 -115 31 = 55534243 2f010000 00100000 80000a28 00000003 e8000008 00000000 000000
f0da9c00 3239725787 C Bo:2:003:1 0 31 >
f2938f00 3239725941 S Bi:2:003:2 -115 4096 <
f2938f00 3239726166 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239726201 S Bi:2:003:2 -115 13 <
f0da9c00 3239726290 C Bi:2:003:2 0 13 = 55534253 2f010000 00000000 00
f0da9c00 3239726337 S Bo:2:003:1 -115 31 = 55534243 30010000 00100000 80000a28 00000003 f0000008 00000000 000000
f0da9c00 3239726413 C Bo:2:003:1 0 31 >
f2938f00 3239726566 S Bi:2:003:2 -115 4096 <
f2938f00 3239726790 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239726824 S Bi:2:003:2 -115 13 <
f0da9c00 3239726915 C Bi:2:003:2 0 13 = 55534253 30010000 00000000 00
f0da9c00 3239726962 S Bo:2:003:1 -115 31 = 55534243 31010000 00100000 80000a28 00000003 f8000008 00000000 000000
f0da9c00 3239727038 C Bo:2:003:1 0 31 >
f2938f00 3239727191 S Bi:2:003:2 -115 4096 <
f2938f00 3239727412 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239727446 S Bi:2:003:2 -115 13 <
f0da9c00 3239727540 C Bi:2:003:2 0 13 = 55534253 31010000 00000000 00
f0da9c00 3239727597 S Bo:2:003:1 -115 31 = 55534243 32010000 00100000 80000a28 00000002 00000008 00000000 000000
f0da9c00 3239727666 C Bo:2:003:1 0 31 >
f2938f00 3239727820 S Bi:2:003:2 -115 4096 <
f2938f00 3239728040 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239728074 S Bi:2:003:2 -115 13 <
f0da9c00 3239728165 C Bi:2:003:2 0 13 = 55534253 32010000 00000000 00
f0da9c00 3239728219 S Bo:2:003:1 -115 31 = 55534243 33010000 00100000 80000a28 00000000 20000008 00000000 000000
f0da9c00 3239728287 C Bo:2:003:1 0 31 >
f2938f00 3239728441 S Bi:2:003:2 -115 4096 <
f2938f00 3239728662 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239728696 S Bi:2:003:2 -115 13 <
f0da9c00 3239728790 C Bi:2:003:2 0 13 = 55534253 33010000 00000000 00
f0da9c00 3239728843 S Bo:2:003:1 -115 31 = 55534243 34010000 00100000 80000a28 00000010 00000008 00000000 000000
f0da9c00 3239728912 C Bo:2:003:1 0 31 >
f2938f00 3239729066 S Bi:2:003:2 -115 4096 <
f2938f00 3239739373 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
f0da9c00 3239739438 S Bi:2:003:2 -115 13 <
f0da9c00 3239739559 C Bi:2:003:2 0 13 = 55534253 34010000 00000000 00
f0da9c00 3239739731 S Bo:2:003:1 -115 31 = 55534243 35010000 00000000 00000600 00000000 00000000 00000000 000000
f0da9c00 3239739911 C Bo:2:003:1 0 31 >
f0da9c00 3239740064 S Bi:2:003:2 -115 13 <
f0da9c00 3239740168 C Bi:2:003:2 0 13 = 55534253 35010000 00000000 00
f0da9c00 3239745120 S Bo:2:003:1 -115 31 = 55534243 36010000 00100000 80000a28 00000000 00000008 00000000 000000
f0da9c00 3239745162 C Bo:2:003:1 0 31 >
f2938e80 3239745294 S Bi:2:003:2 -115 4096 <
f2938e80 3239745541 C Bi:2:003:2 0 4096 = fab80010 8ed0bc00 b0b80000 8ed88ec0 fbbe007c bf0006b9 0002f3a4 ea210600
f0da9c00 3239745573 S Bi:2:003:2 -115 13 <
f0da9c00 3239745665 C Bi:2:003:2 0 13 = 55534253 36010000 00000000 00
f0da9c00 3239745783 S Bo:2:003:1 -115 31 = 55534243 37010000 00000000 00000600 00000000 00000000 00000000 000000
f0da9c00 3239746063 C Bo:2:003:1 0 31 >
f0da9c00 3239746250 S Bi:2:003:2 -115 13 <
f0da9c00 3239746289 C Bi:2:003:2 0 13 = 55534253 37010000 00000000 00
f0da9c00 3239747439 S Bo:2:003:1 -115 31 = 55534243 38010000 00020000 80000ca1 082e0001 00000000 ec000000 000000
f0da9c00 3239747584 C Bo:2:003:1 0 31 >
f2938c80 3239747747 S Bi:2:003:2 -115 512 <
f2938c80 3239747790 C Bi:2:003:2 -32 0
f0da9c00 3239747827 S Co:2:003:0 s 02 01 0000 0082 0000 0
f0da9c00 3239747935 C Co:2:003:0 0 0
f0da9c00 3239747969 S Bi:2:003:2 -115 13 <
f0da9c00 3239748065 C Bi:2:003:2 0 13 = 55534253 38010000 00020000 01
f0da9c00 3239748146 S Bo:2:003:1 -115 31 = 55534243 39010000 12000000 80000603 00000012 00000000 00000000 000000
f0da9c00 3239748307 C Bo:2:003:1 0 31 >
f2938c80 3239748462 S Bi:2:003:2 -115 18 <
f2938c80 3239748557 C Bi:2:003:2 0 18 = 70000500 0000000a 00000000 20000000 0000
f0da9c00 3239748591 S Bi:2:003:2 -115 13 <
f0da9c00 3239748686 C Bi:2:003:2 0 13 = 55534253 39010000 00000000 00
f0da9c00 3239748806 S Bo:2:003:1 -115 31 = 55534243 3a010000 00000000 00000600 00000000 00000000 00000000 000000
f0da9c00 3239748949 C Bo:2:003:1 0 31 >
f0da9c00 3239749103 S Bi:2:003:2 -115 13 <
f0da9c00 3239749164 C Bi:2:003:2 0 13 = 55534253 3a010000 00000000 00
f0da9c00 3255121946 S Bo:2:003:1 -115 31 = 55534243 3b010000 00100000 80000a28 0000086a 88000008 00000000 000000
f0da9c00 3255122051 C Bo:2:003:1 0 31 >
f2938680 3255122332 S Bi:2:003:2 -115 4096 <
f2938680 3257419391 C Bi:2:003:2 -121 1037 = 20284143 31290000 534d4152 5420436f 6d6d616e 64205472 616e7370 6f727420
f0da9c00 3257419502 S Bi:2:003:2 -115 13 <
f0da9c00 3285854403 C Bi:2:003:2 -104 0
f44c7500 3285854464 S Co:2:002:0 s 23 03 0004 0003 0000 0
f44c7500 3285854636 C Co:2:002:0 0 0
f44c7500 3285865159 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f44c7500 3285865408 C Ci:2:002:0 0 4 = 11050000
f44c7500 3285876152 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f44c7500 3285876399 C Ci:2:002:0 0 4 = 03051000
f44c7500 3285927200 S Co:2:002:0 s 23 01 0014 0003 0000 0
f44c7500 3285927347 C Co:2:002:0 0 0
f44c7500 3285927420 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f44c7500 3285927734 C Ci:2:000:0 0 18 = 12010002 00000040 7b060725 00010102 0301
f44c7500 3285927770 S Co:2:002:0 s 23 03 0004 0003 0000 0
f44c7500 3285927824 C Co:2:002:0 0 0
f29aad00 3285938200 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3285938354 C Ci:2:002:0 0 4 = 11050000
f29aad00 3285949217 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3285949327 C Ci:2:002:0 0 4 = 03051000
f3c27500 3285971663 C Ii:2:002:1 0:2048 2 = 0800
f3c27500 3285971669 S Ii:2:002:1 -115:2048 2 <
f29aad00 3286000218 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aad00 3286000323 C Co:2:002:0 0 0
f29aad00 3286000420 S Co:2:000:0 s 00 05 0003 0000 0000 0
f29aad00 3286000642 C Co:2:000:0 0 0
f29aad00 3286012218 S Ci:2:003:0 s 80 06 0100 0000 0012 18 <
f29aad00 3286012661 C Ci:2:003:0 0 18 = 12010002 00000040 7b060725 00010102 0301
f29aad00 3286012756 S Ci:2:003:0 s 80 06 0200 0000 0020 32 <
f29aad00 3286013239 C Ci:2:003:0 0 32 = 09022000 010100c0 32090400 00020806 50000705 01020002 00070582 02000200
f29aad00 3286013339 S Ci:2:003:0 s 80 06 0303 0409 00ff 255 <
f29aad00 3286013609 C Ci:2:003:0 0 4 = 04033000
f29aad00 3286013711 S Co:2:003:0 s 00 09 0001 0000 0000 0
f29aad00 3286013984 C Co:2:003:0 0 0
f0da9c00 3286014115 S Bo:2:003:1 -115 31 = 55534243 3c010000 00000000 00000600 00000000 00000000 00000000 000000
f0da9c00 3286014228 C Bo:2:003:1 0 31 >
f0da9c00 3286014430 S Bi:2:003:2 -115 13 <
f0da9c00 3286014598 C Bi:2:003:2 0 13 = 55534253 3c010000 00000000 00
f0da9c00 3286017121 S Bo:2:003:1 -115 31 = 55534243 3d010000 00100000 80000a28 0000086a 88000008 00000000 000000
f0da9c00 3286017234 C Bo:2:003:1 0 31 >
f29aad00 3286017446 S Bi:2:003:2 -115 4096 <
f29aad00 3316830429 C Bi:2:003:2 -104 0
f29aad00 3316830529 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aad00 3316830658 C Co:2:002:0 0 0
f29aad00 3316841216 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3316841405 C Ci:2:002:0 0 4 = 11050000
f29aad00 3316852213 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3316852402 C Ci:2:002:0 0 4 = 03051000
f29aad00 3316903213 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aad00 3316903370 C Co:2:002:0 0 0
f29aad00 3316903471 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3321903434 C Ci:2:000:0 -2 0
f29aad00 3321903529 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3321908758 C Ci:2:000:0 -71 0
f29aad00 3321908930 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3321912970 C Ci:2:000:0 -71 0
f29aad00 3321913054 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aad00 3321913219 C Co:2:002:0 0 0
f29aad00 3321924195 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3321924389 C Ci:2:002:0 0 4 = 11050000
f29aad00 3321935201 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3321935379 C Ci:2:002:0 0 4 = 03051000
f29aad00 3321986208 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aad00 3321986374 C Co:2:002:0 0 0
f29aad00 3322087217 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3322092346 C Ci:2:000:0 -71 0
f29aad00 3322092518 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3322096470 C Ci:2:000:0 -71 0
f29aad00 3322096569 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3322100594 C Ci:2:000:0 -71 0
f29aad00 3322100681 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aad00 3322100845 C Co:2:002:0 0 0
f29aad00 3322111192 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3322111385 C Ci:2:002:0 0 4 = 11050000
f29aad00 3322122208 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3322122374 C Ci:2:002:0 0 4 = 03051000
f29aad00 3322173208 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aad00 3322173374 C Co:2:002:0 0 0
f29aad00 3322274212 S Co:2:002:0 s 23 01 0001 0003 0000 0
f29aad00 3322274379 C Co:2:002:0 0 0
f29aad00 3322274478 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aad00 3322274631 C Co:2:002:0 0 0
f29aad00 3322285208 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3322285380 C Ci:2:002:0 0 4 = 11050000
f29aad00 3322296207 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3322296380 C Ci:2:002:0 0 4 = 03051000
f3c27500 3322323640 C Ii:2:002:1 0:2048 2 = 0800
f3c27500 3322323645 S Ii:2:002:1 -115:2048 2 <
f29aad00 3322347197 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aad00 3322347382 C Co:2:002:0 0 0
f29aad00 3322347489 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3322351468 C Ci:2:000:0 -71 0
f29aad00 3322351556 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3322355594 C Ci:2:000:0 -71 0
f29aad00 3322355778 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3322359970 C Ci:2:000:0 -71 0
f29aad00 3322360142 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aad00 3322360219 C Co:2:002:0 0 0
f29aad00 3322371198 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3322371379 C Ci:2:002:0 0 4 = 11050000
f29aad00 3322382208 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3322382374 C Ci:2:002:0 0 4 = 03051000
f29aad00 3322433209 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aad00 3322433374 C Co:2:002:0 0 0
f29aad00 3322534210 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3322538220 C Ci:2:000:0 -71 0
f29aad00 3322538392 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3322542344 C Ci:2:000:0 -71 0
f29aad00 3322542516 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aad00 3322546470 C Ci:2:000:0 -71 0
f29aad00 3322546556 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aad00 3322546720 C Co:2:002:0 0 0
f29aad00 3322557191 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3322557388 C Ci:2:002:0 0 4 = 11050000
f29aad00 3322568207 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3322568374 C Ci:2:002:0 0 4 = 03051000
f3c27500 3322579636 C Ii:2:002:1 0:2048 2 = 0800
f3c27500 3322579641 S Ii:2:002:1 -115:2048 2 <
f29aad00 3322619203 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aad00 3322619379 C Co:2:002:0 0 0
f29aad00 3322720214 S Co:2:002:0 s 23 01 0001 0003 0000 0
f29aad00 3322720379 C Co:2:002:0 0 0
f29aad00 3322720479 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aad00 3322720631 C Co:2:002:0 0 0
f29aad00 3322731205 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3322731390 C Ci:2:002:0 0 4 = 11050000
f29aad00 3322742208 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3322742381 C Ci:2:002:0 0 4 = 03051000
f29aad00 3322793215 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aad00 3322793377 C Co:2:002:0 0 0
f29aad00 3322793481 S Co:2:000:0 s 00 05 0003 0000 0000 0
f29aad00 3322797467 C Co:2:000:0 -71 0
f29aad00 3322998208 S Co:2:000:0 s 00 05 0003 0000 0000 0
f29aad00 3323002219 C Co:2:000:0 -71 0
f29aad00 3323203213 S Co:2:002:0 s 23 01 0001 0003 0000 0
f29aad00 3323203378 C Co:2:002:0 0 0
f29aad00 3323203469 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aad00 3323203628 C Co:2:002:0 0 0
f29aad00 3323214202 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3323214379 C Ci:2:002:0 0 4 = 11050000
f29aad00 3323225210 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3323225380 C Ci:2:002:0 0 4 = 03051000
f29aad00 3323276210 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aad00 3323276376 C Co:2:002:0 0 0
f29aad00 3323276483 S Co:2:000:0 s 00 05 0003 0000 0000 0
f29aad00 3323280469 C Co:2:000:0 -71 0
f29aad00 3323481211 S Co:2:000:0 s 00 05 0003 0000 0000 0
f29aad00 3323485220 C Co:2:000:0 -71 0
f29aad00 3323686219 S Co:2:002:0 s 23 01 0001 0003 0000 0
f29aad00 3323686381 C Co:2:002:0 0 0
f29aad00 3323686429 S Co:2:002:0 s 23 01 0001 0003 0000 0
f29aad00 3323686487 C Co:2:002:0 0 0
f29aad00 3323686508 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aad00 3323686600 C Ci:2:002:0 0 4 = 01050000
f3ed7680 3323686626 S Co:2:002:0 s 23 03 0016 0003 0000 0
f3ed7680 3323686716 C Co:2:002:0 0 0
f3ed7e80 3323690674 S Co:2:002:0 s 23 03 0004 0003 0000 0
f3ed7e80 3323690730 C Co:2:002:0 0 0
f29b4580 3323701208 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29b4580 3323701343 C Ci:2:002:0 0 4 = 11050000
f29b4580 3323712275 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29b4580 3323712344 C Ci:2:002:0 0 4 = 03051000
f29aa100 3323763223 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aa100 3323763409 C Co:2:002:0 0 0
f29aa100 3323763542 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aa100 3323768010 C Ci:2:000:0 -71 0
f29aa100 3323768159 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aa100 3323772158 C Ci:2:000:0 -71 0
f29aa100 3323772208 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aa100 3323776506 C Ci:2:000:0 -71 0
f29aa100 3323776665 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aa100 3323776884 C Co:2:002:0 0 0
f29aa100 3323787202 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aa100 3323787379 C Ci:2:002:0 0 4 = 11050000
f29aa100 3323798207 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aa100 3323798381 C Ci:2:002:0 0 4 = 03051000
f29aa100 3323849208 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aa100 3323849381 C Co:2:002:0 0 0
f29aa100 3323950209 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aa100 3323954254 C Ci:2:000:0 -71 0
f29aa100 3323954404 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aa100 3323958505 C Ci:2:000:0 -71 0
f29aa100 3323958651 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f29aa100 3323962754 C Ci:2:000:0 -71 0
f29aa100 3323962914 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aa100 3323963135 C Co:2:002:0 0 0
f29aa100 3323974194 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aa100 3323974400 C Ci:2:002:0 0 4 = 03051000
f3ed7e80 3324025159 S Co:2:002:0 s 23 01 0014 0003 0000 0
f3ed7e80 3324025233 C Co:2:002:0 0 0
f3ed7e80 3324126157 S Co:2:002:0 s 23 01 0001 0003 0000 0
f3ed7e80 3324126238 C Co:2:002:0 0 0
f3ed7e80 3324126284 S Co:2:002:0 s 23 03 0004 0003 0000 0
f3ed7e80 3324126356 C Co:2:002:0 0 0
f3ed7e80 3324137158 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f3ed7e80 3324137236 C Ci:2:002:0 0 4 = 11050000
f3ed7e80 3324148158 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f3ed7e80 3324148235 C Ci:2:002:0 0 4 = 03051000
f3ed7e80 3324199152 S Co:2:002:0 s 23 01 0014 0003 0000 0
f3ed7e80 3324199229 C Co:2:002:0 0 0
f3ed7e80 3324199271 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f3ed7e80 3324203510 C Ci:2:000:0 -71 0
f3ed7e80 3324203562 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f3ed7e80 3324207757 C Ci:2:000:0 -71 0
f3ed7e80 3324207809 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f3ed7e80 3324211880 C Ci:2:000:0 -71 0
f3ed7e80 3324211929 S Co:2:002:0 s 23 03 0004 0003 0000 0
f3ed7e80 3324211997 C Co:2:002:0 0 0
f3ed7e80 3324222160 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f3ed7e80 3324222389 C Ci:2:002:0 0 4 = 11050000
f3ed7e80 3324233157 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f3ed7e80 3324233235 C Ci:2:002:0 0 4 = 03051000
f3ed7e80 3324284158 S Co:2:002:0 s 23 01 0014 0003 0000 0
f3ed7e80 3324284236 C Co:2:002:0 0 0
f3ed7e80 3324385161 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f3ed7e80 3324389132 C Ci:2:000:0 -71 0
f3ed7e80 3324389180 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f3ed7e80 3324393256 C Ci:2:000:0 -71 0
f3ed7e80 3324393306 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
f3ed7e80 3324397381 C Ci:2:000:0 -71 0
f3ed7e80 3324397431 S Co:2:002:0 s 23 03 0004 0003 0000 0
f3ed7e80 3324397478 C Co:2:002:0 0 0
f3ed7e80 3324408158 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f3ed7e80 3324408222 C Ci:2:002:0 0 4 = 11050000
f29aa000 3324419201 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aa000 3324419404 C Ci:2:002:0 0 4 = 03051000
f29aa000 3324470205 S Co:2:002:0 s 23 01 0014 0003 0000 0
f29aa000 3324470382 C Co:2:002:0 0 0
f29aa000 3324571218 S Co:2:002:0 s 23 01 0001 0003 0000 0
f29aa000 3324571408 C Co:2:002:0 0 0
f29aa000 3324571540 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aa000 3324571625 C Co:2:002:0 0 0
f3ed7880 3324582213 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f3ed7880 3324582448 C Ci:2:002:0 0 4 = 11050000
f3ed7880 3324593220 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f3ed7880 3324593410 C Ci:2:002:0 0 4 = 03051000
f3c27500 3324627688 C Ii:2:002:1 0:2048 2 = 0800
f3c27500 3324627693 S Ii:2:002:1 -115:2048 2 <
f3ed7880 3324644220 S Co:2:002:0 s 23 01 0014 0003 0000 0
f3ed7880 3324644411 C Co:2:002:0 0 0
f3ed7880 3324644481 S Co:2:000:0 s 00 05 0006 0000 0000 0
f3ed7880 3324648881 C Co:2:000:0 -71 0
f3ed7880 3324849218 S Co:2:000:0 s 00 05 0006 0000 0000 0
f3ed7880 3324854387 C Co:2:000:0 -71 0
f3ed7880 3325055166 S Co:2:002:0 s 23 01 0001 0003 0000 0
f3ed7880 3325055236 C Co:2:002:0 0 0
f29aa700 3325055291 S Co:2:002:0 s 23 03 0004 0003 0000 0
f29aa700 3325055362 C Co:2:002:0 0 0
f29aa700 3325066147 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aa700 3325066236 C Ci:2:002:0 0 4 = 11050000
f3ed7800 3325077222 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f3ed7800 3325077428 C Ci:2:002:0 0 4 = 03051000
f3ed7800 3325128220 S Co:2:002:0 s 23 01 0014 0003 0000 0
f3ed7800 3325128410 C Co:2:002:0 0 0
f3ed7800 3325128492 S Co:2:000:0 s 00 05 0007 0000 0000 0
f3ed7800 3325132623 C Co:2:000:0 -71 0
f3ed7800 3325333221 S Co:2:000:0 s 00 05 0007 0000 0000 0
f3ed7800 3325338388 C Co:2:000:0 -71 0
f3ed7800 3325539168 S Co:2:002:0 s 23 01 0001 0003 0000 0
f3ed7800 3325539238 C Co:2:002:0 0 0
f29aa980 3325539295 S Co:2:002:0 s 23 01 0001 0003 0000 0
f29aa980 3325539380 C Co:2:002:0 0 0
f29aa980 3325539428 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
f29aa980 3325539475 C Ci:2:002:0 0 4 = 01050000
f3c27500 3327758309 C Ii:2:002:1 -2:2048 0
f3ed7880 3327758321 S Co:2:002:0 s 00 03 0001 0000 0000 0
f3ed7880 3327758364 C Co:2:002:0 0 0
f3ed7880 3327758384 S Co:2:001:0 s 23 03 0002 0001 0000 0
f3ed7880 3327758392 C Co:2:001:0 0 0
f401cc00 3329769225 C Ii:2:001:1 -2:2048 0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                 ` <Pine.LNX.4.44L0.1204031017110.1537-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2012-04-04  4:13                                   ` Norman Diamond
       [not found]                                     ` <388819.38189.qm-303aDswoEIaf2IT/n6niikyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-04  4:13 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

Alan Stern wrote:
> On Tue, 3 Apr 2012, Norman Diamond wrote:
>>>> Wrong.  We CAN try to read the last block that the bridge says exists, to see if it really exists or not.  (Well, only partly wrong.  Maybe there really are some bridges that crash in that situation, but mine doesn't, and a broken driver still needs fixing.)
>>> 
>>> Yes, there really are such bridges.  You can find reports from people complaining about them in the email archives.
>> 
>> Wait.  Is there a bridge which overreports the last sector number by 1, and which ALSO crashes when the host PC tries to read that supposed last sector number?
> 
> Yes.  Like I said before, you can find complaints about these things in the mailing list archives.  However it's not clear whether the crashing is the fault of the bridge itself or the drive it is attached to.

Or the driver.

I think it is not the fault of the drive.  If a drive crashed when a driver tried to access a nonexistent sector, then the drive would crash when mounted internally on an ATA or SATA cable not only when connected to a USB cable.

It might be the fault of the bridge, BUT, does a single bridge really suffer from BOTH faults as I asked?  You seem to be saying yes, but then you cloud it up by saying it's unclear if it might be the drive instead of the bridge.  I still wonder if it's the driver instead of the bridge, but surely not the drive.

>>  If so then we need a quirk for that doubly broken bridge.
> 
> That's what the existing quirk entries are there for.

Surely that's not what the quirk is for on my bridge.

>> But otherwise, we can try to read the supposedly last sector number and figure out whether we have to subtract 1.
> 
> True enough, but we don't have any way to know which bridges do crash and which don't other than trying it.  And you'll probably agree that trial and error is not such a good idea in the cases where the bridge does crash.

This still makes me wonder why Windows is able to handle the same bridges.

Now, as far as I can tell, I have found a WTF of a standard.  I only have drafts of old T10 documents but it sure looks like a WTF unless something was fixed later.

In SCSI Block Commands, it seems to me that the READ CAPACITY (10) command (opcode 0x25) returns the number of blocks.

In Reduced Block Commands, it says explicitly that the READ CAPACITY command (opcode 0x25) returns the LBA of the last logical block of the media contained in the device.  So a USB-to-ATA bridge is required to subtract 1 from the number of blocks reported by ATA IDENTIFY, and a USB-to-SCSI bridge has to subtract 1 from the result of READ CAPACITY (10).  (Our present discussion involves the fact that a defective bridge might not subtract that 1, whereupon the next step gets spindled and mutilated.)

If a driver wants the last block number then it has to subtract 1 in the case of SCSI, and it wants the number of blocks then it has to add 1 in the case of USB.  Did I really read this right?
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                   ` <850871.26108.qm-303aDswoEIaO4BqzrDeqF0yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
@ 2012-04-04 15:28                                     ` Alan Stern
  2012-04-06  0:27                                       ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-04 15:28 UTC (permalink / raw)
  To: Norman Diamond; +Cc: USB list, SCSI development list

On Wed, 4 Apr 2012, Norman Diamond wrote:

> The usbmon output quoted below comes from the sequence of two commands:
> sg_dd blk_sgio=1 bpt=1 bs=512 count=1 if=/dev/sdb of=/dev/null skip=551562
> dd bs=512 count=1 if=/dev/sdb of=/dev/null skip=551562
> 
> As expected by now, the sg_dd command properly reported an error for the unreadable block, and the USB-to-ATA bridge did not crash.  The dd command also reported an error, and then a driver caused a crash of the driver's self and/or the bridge.

This is good.  It shows just what happened.

And by the way, you shouldn't be so quick to assign blame.  Without
knowing the exact details, you're not in a position to say where the
fault really lies.

> f0da9c00 3237261077 S Bo:2:003:1 -115 31 = 55534243 d7000000 24000000 80000612 00000024 00000000 00000000 000000
> f0da9c00 3237261251 C Bo:2:003:1 0 31 >
> f2938d80 3237261539 S Bi:2:003:2 -115 36 <
> f2938d80 3237261706 C Bi:2:003:2 0 36 = 00000000 23000000 48495441 4348495f 444b3233 42412d32 30422020 20202020
> f0da9c00 3237261723 S Bi:2:003:2 -115 13 <
> f0da9c00 3237261793 C Bi:2:003:2 0 13 = 55534253 d7000000 00000000 00

The first command issued by sg_dd was an INQUIRY, and it succeeded.

> f0da9c00 3237261905 S Bo:2:003:1 -115 31 = 55534243 d8000000 00020000 80000a28 0000086a 8a000001 00000000 000000
> f0da9c00 3237262093 C Bo:2:003:1 0 31 >
> f2938d80 3237262250 S Bi:2:003:2 -115 512 <
> f2938d80 3239564885 C Bi:2:003:2 -32 0
> f0da9c00 3239564972 S Co:2:003:0 s 02 01 0000 0082 0000 0
> f0da9c00 3239565256 C Co:2:003:0 0 0
> f0da9c00 3239565287 S Bi:2:003:2 -115 13 <
> f0da9c00 3239565485 C Bi:2:003:2 0 13 = 55534253 d8000000 00020000 01

This is the second command, a READ(10) for one block starting at block
551562 (86a8a in hex).  The bridge transmitted no data and reported a 
failure status.

> f0da9c00 3239565521 S Bo:2:003:1 -115 31 = 55534243 d9000000 12000000 80000603 00000012 00000000 00000000 000000
> f0da9c00 3239565740 C Bo:2:003:1 0 31 >
> f2938d80 3239565896 S Bi:2:003:2 -115 18 <
> f2938d80 3239566129 C Bi:2:003:2 0 18 = 70000000 0000000a 00000000 00000000 0000
> f0da9c00 3239566160 S Bi:2:003:2 -115 13 <
> f0da9c00 3239566364 C Bi:2:003:2 0 13 = 55534253 d9000000 00000000 00

When asked for detailed status information (REQUEST SENSE), the bridge
sent an empty reply (No Sense).  This is a bug in the bridge; it should
have indicated what sort of failure occurred, such as: Hardware Error,
Unrecovered read error.

> f0da9c00 3239577155 S Bo:2:003:1 -115 31 = 55534243 da000000 00000000 00000600 00000000 00000000 00000000 000000
> f0da9c00 3239577291 C Bo:2:003:1 0 31 >
> f0da9c00 3239577492 S Bi:2:003:2 -115 13 <
> f0da9c00 3239577666 C Bi:2:003:2 0 13 = 55534253 da000000 00000000 00

This is a TEST UNIT READY command.  It shows that the drive is ready
to be used.  I can't tell if this command was sent by sg_dd or
something else.

> f0da9c00 3239579541 S Bo:2:003:1 -115 31 = 55534243 db000000 00100000 80000a28 00025428 80000008 00000000 000000
> f0da9c00 3239579702 C Bo:2:003:1 0 31 >
> f2938300 3239579845 S Bi:2:003:2 -115 4096 <
> f2938300 3239593701 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> f0da9c00 3239593720 S Bi:2:003:2 -115 13 <
> f0da9c00 3239593791 C Bi:2:003:2 0 13 = 55534253 db000000 00000000 00
...

There follows a rather lengthy series of reads, of which I have cut out
all but the first.  They look like the sort of thing udev does when a
new drive is registered, but I have no idea why udev should have been
triggered at this point.  Anyway, they all succeeded.

> f0da9c00 3239745783 S Bo:2:003:1 -115 31 = 55534243 37010000 00000000 00000600 00000000 00000000 00000000 000000
> f0da9c00 3239746063 C Bo:2:003:1 0 31 >
> f0da9c00 3239746250 S Bi:2:003:2 -115 13 <
> f0da9c00 3239746289 C Bi:2:003:2 0 13 = 55534253 37010000 00000000 00

Another successful TEST UNIT READY.

> f0da9c00 3239747439 S Bo:2:003:1 -115 31 = 55534243 38010000 00020000 80000ca1 082e0001 00000000 ec000000 000000
> f0da9c00 3239747584 C Bo:2:003:1 0 31 >
> f2938c80 3239747747 S Bi:2:003:2 -115 512 <
> f2938c80 3239747790 C Bi:2:003:2 -32 0
> f0da9c00 3239747827 S Co:2:003:0 s 02 01 0000 0082 0000 0
> f0da9c00 3239747935 C Co:2:003:0 0 0
> f0da9c00 3239747969 S Bi:2:003:2 -115 13 <
> f0da9c00 3239748065 C Bi:2:003:2 0 13 = 55534253 38010000 00020000 01

This is a 12-byte ATA pass-through command.  I don't know just what the
command is, but in any case the bridge rejected it with a failure 
status.

> f0da9c00 3239748146 S Bo:2:003:1 -115 31 = 55534243 39010000 12000000 80000603 00000012 00000000 00000000 000000
> f0da9c00 3239748307 C Bo:2:003:1 0 31 >
> f2938c80 3239748462 S Bi:2:003:2 -115 18 <
> f2938c80 3239748557 C Bi:2:003:2 0 18 = 70000500 0000000a 00000000 20000000 0000
> f0da9c00 3239748591 S Bi:2:003:2 -115 13 <
> f0da9c00 3239748686 C Bi:2:003:2 0 13 = 55534253 39010000 00000000 00

The corresponding sense information is: Illegal Request, Invalid
command operation code, which is appropriate for an unrecognized command.

> f0da9c00 3239748806 S Bo:2:003:1 -115 31 = 55534243 3a010000 00000000 00000600 00000000 00000000 00000000 000000
> f0da9c00 3239748949 C Bo:2:003:1 0 31 >
> f0da9c00 3239749103 S Bi:2:003:2 -115 13 <
> f0da9c00 3239749164 C Bi:2:003:2 0 13 = 55534253 3a010000 00000000 00

Yet another TEST UNIT READY.  Then about 15 seconds later we have:

> f0da9c00 3255121946 S Bo:2:003:1 -115 31 = 55534243 3b010000 00100000 80000a28 0000086a 88000008 00000000 000000
> f0da9c00 3255122051 C Bo:2:003:1 0 31 >
> f2938680 3255122332 S Bi:2:003:2 -115 4096 <
> f2938680 3257419391 C Bi:2:003:2 -121 1037 = 20284143 31290000 534d4152 5420436f 6d6d616e 64205472 616e7370 6f727420
> f0da9c00 3257419502 S Bi:2:003:2 -115 13 <
> f0da9c00 3285854403 C Bi:2:003:2 -104 0

This is a READ(10) command for 8 blocks starting at block 551560.
Obviously this originated from the dd program, which goes through the
block layer and therefore tries to read an entire page at a time.  The
bridge transmitted only 1037 bytes out of the 4096 that were requested
and then didn't send a status code.  After 30 seconds of waiting for
the status, the command was aborted.

Interestingly, 1037 = 1024 + 13.  The first two readable blocks amount
to 1024 bytes, and the status information is 13 bytes long.  However
the bridge neglected to separate the data from the status (it should
have sent a zero-length packet in between), so to the computer it
looked like 1037 bytes of data.  Evidently this is another bug in the
bridge.

> f44c7500 3285854464 S Co:2:002:0 s 23 03 0004 0003 0000 0
> f44c7500 3285854636 C Co:2:002:0 0 0
> f44c7500 3285865159 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> f44c7500 3285865408 C Ci:2:002:0 0 4 = 11050000
> f44c7500 3285876152 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> f44c7500 3285876399 C Ci:2:002:0 0 4 = 03051000
> f44c7500 3285927200 S Co:2:002:0 s 23 01 0014 0003 0000 0
> f44c7500 3285927347 C Co:2:002:0 0 0
> f44c7500 3285927420 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
> f44c7500 3285927734 C Ci:2:000:0 0 18 = 12010002 00000040 7b060725 00010102 0301
> f44c7500 3285927770 S Co:2:002:0 s 23 03 0004 0003 0000 0
> f44c7500 3285927824 C Co:2:002:0 0 0
> f29aad00 3285938200 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> f29aad00 3285938354 C Ci:2:002:0 0 4 = 11050000
> f29aad00 3285949217 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> f29aad00 3285949327 C Ci:2:002:0 0 4 = 03051000
> f3c27500 3285971663 C Ii:2:002:1 0:2048 2 = 0800
> f3c27500 3285971669 S Ii:2:002:1 -115:2048 2 <
> f29aad00 3286000218 S Co:2:002:0 s 23 01 0014 0003 0000 0
> f29aad00 3286000323 C Co:2:002:0 0 0
> f29aad00 3286000420 S Co:2:000:0 s 00 05 0003 0000 0000 0
> f29aad00 3286000642 C Co:2:000:0 0 0
> f29aad00 3286012218 S Ci:2:003:0 s 80 06 0100 0000 0012 18 <
> f29aad00 3286012661 C Ci:2:003:0 0 18 = 12010002 00000040 7b060725 00010102 0301
> f29aad00 3286012756 S Ci:2:003:0 s 80 06 0200 0000 0020 32 <
> f29aad00 3286013239 C Ci:2:003:0 0 32 = 09022000 010100c0 32090400 00020806 50000705 01020002 00070582 02000200
> f29aad00 3286013339 S Ci:2:003:0 s 80 06 0303 0409 00ff 255 <
> f29aad00 3286013609 C Ci:2:003:0 0 4 = 04033000
> f29aad00 3286013711 S Co:2:003:0 s 00 09 0001 0000 0000 0
> f29aad00 3286013984 C Co:2:003:0 0 0

I'll skip the details; the above sequence shows the device being reset
(including having its address re-assigned).

> f0da9c00 3286014115 S Bo:2:003:1 -115 31 = 55534243 3c010000 00000000 00000600 00000000 00000000 00000000 000000
> f0da9c00 3286014228 C Bo:2:003:1 0 31 >
> f0da9c00 3286014430 S Bi:2:003:2 -115 13 <
> f0da9c00 3286014598 C Bi:2:003:2 0 13 = 55534253 3c010000 00000000 00

This is another TEST UNIT READY command, sent to make sure the drive
is ready to resume normal operation after being reset.  It succeeds.

> f0da9c00 3286017121 S Bo:2:003:1 -115 31 = 55534243 3d010000 00100000 80000a28 0000086a 88000008 00000000 000000
> f0da9c00 3286017234 C Bo:2:003:1 0 31 >
> f29aad00 3286017446 S Bi:2:003:2 -115 4096 <
> f29aad00 3316830429 C Bi:2:003:2 -104 0

This is the same READ(10) command as before, retried.  This time the
bridge didn't send any data at all before it stopped responding. Again,
the command was aborted after 30 seconds of silence.

> f29aad00 3316830529 S Co:2:002:0 s 23 03 0004 0003 0000 0
> f29aad00 3316830658 C Co:2:002:0 0 0
> f29aad00 3316841216 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> f29aad00 3316841405 C Ci:2:002:0 0 4 = 11050000
> f29aad00 3316852213 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> f29aad00 3316852402 C Ci:2:002:0 0 4 = 03051000
> f29aad00 3316903213 S Co:2:002:0 s 23 01 0014 0003 0000 0
> f29aad00 3316903370 C Co:2:002:0 0 0
> f29aad00 3316903471 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
> f29aad00 3321903434 C Ci:2:000:0 -2 0
> f29aad00 3321903529 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
> f29aad00 3321908758 C Ci:2:000:0 -71 0
> f29aad00 3321908930 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
> f29aad00 3321912970 C Ci:2:000:0 -71 0

The remainder of the trace is just like this, repeated over and over.
It shows the device being reset but not responding at all.  Evidently
at this point the bridge has crashed completely.

Judging by this analysis, you tell me: Which component is at fault?  
The driver did exactly as it was told, and it reset the device each
time the bridge stopped responding.  The bridge, on the other hand,
displayed multiple bugs and eventually crashed completely.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                     ` <388819.38189.qm-303aDswoEIaf2IT/n6niikyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
@ 2012-04-04 15:48                                       ` Alan Stern
       [not found]                                         ` <Pine.LNX.4.44L0.1204041128160.1543-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-04 15:48 UTC (permalink / raw)
  To: Norman Diamond
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 5344 bytes --]

On Wed, 4 Apr 2012, Norman Diamond wrote:

> Alan Stern wrote:
> > On Tue, 3 Apr 2012, Norman Diamond wrote:
> >>>> Wrong.  We CAN try to read the last block that the bridge says exists, to see if it really exists or not.  (Well, only partly wrong.  Maybe there really are some bridges that crash in that situation, but mine doesn't, and a broken driver still needs fixing.)
> >>> 
> >>> Yes, there really are such bridges.  You can find reports from people complaining about them in the email archives.
> >> 
> >> Wait.  Is there a bridge which overreports the last sector number by 1, and which ALSO crashes when the host PC tries to read that supposed last sector number?
> > 
> > Yes.  Like I said before, you can find complaints about these things in the mailing list archives.  However it's not clear whether the crashing is the fault of the bridge itself or the drive it is attached to.
> 
> Or the driver.

No, it is not the fault of the driver.

> I think it is not the fault of the drive.  If a drive crashed when a driver tried to access a nonexistent sector, then the drive would crash when mounted internally on an ATA or SATA cable not only when connected to a USB cable.
> 
> It might be the fault of the bridge, BUT, does a single bridge really suffer from BOTH faults as I asked?  You seem to be saying yes, but then you cloud it up by saying it's unclear if it might be the drive instead of the bridge.  I still wonder if it's the driver instead of the bridge, but surely not the drive.

I wanted to hedge because all the computer sees is what it gets from 
the bridge.  It has no way to tell whether a problem was caused by the 
bridge or the drive.  If you want to exonerate the drive, that's fine 
with me.  Certainly the bridge has enough other problems that we 
shouldn't be surprised to find it was solely responsible.

And I repeat, the driver did everything exactly as it should have.

> >>  If so then we need a quirk for that doubly broken bridge.
> > 
> > That's what the existing quirk entries are there for.
> 
> Surely that's not what the quirk is for on my bridge.

Yes, it is.  Or rather, it probably is -- to be absolutely certain I'd 
have to look through the email archives to find the bug reports that 
caused the quirk entry to be added.

However there's no question that other bridges having the same vendor,
product, and revision ID values as yours _did_ report the drive
capacity incorrectly; otherwise the quirk entry would not be there.  
What I'm not sure of is whether those bridges went on to crash as
dramatically as yours.

> >> But otherwise, we can try to read the supposedly last sector number and figure out whether we have to subtract 1.
> > 
> > True enough, but we don't have any way to know which bridges do crash and which don't other than trying it.  And you'll probably agree that trial and error is not such a good idea in the cases where the bridge does crash.
> 
> This still makes me wonder why Windows is able to handle the same bridges.

Probably because Windows does not try to read the last block, unless it
is occupied by a file.  If it did, it probably would crash the bridges
too.

It would be interesting to know the details of what your Windows system
does when trying to read a file that occupies the faulty sector.  
There are programs around that are roughly equivalent to usbmon for
Windows; you could try one of them.

> Now, as far as I can tell, I have found a WTF of a standard.  I only have drafts of old T10 documents but it sure looks like a WTF unless something was fixed later.
> 
> In SCSI Block Commands, it seems to me that the READ CAPACITY (10) command (opcode 0x25) returns the number of blocks.

I'm not sure how you reached that conclusion.  In my rather old copy of
the SCSI-2 standard, section 9.2.7 (the READ CAPACITY command in the
chapter on Direct-access devices) says:

	A partial medium indicator (PMI) bit of zero indicates that the 
	returned logical block address and the block length in bytes
	are those of the last logical block on the logical unit.

And of course, the PMI bit _is_ zero for the commands we are talking
about.

> In Reduced Block Commands, it says explicitly that the READ CAPACITY command (opcode 0x25) returns the LBA of the last logical block of the media contained in the device.  So a USB-to-ATA bridge is required to subtract 1 from the number of blocks reported by ATA IDENTIFY, and a USB-to-SCSI bridge has to subtract 1 from the result of READ CAPACITY (10).  (Our present discussion involves the fact that a defective bridge might not subtract that 1, whereupon the next step gets spindled and mutilated.)
> 
> If a driver wants the last block number then it has to subtract 1 in the case of SCSI, and it wants the number of blocks then it has to add 1 in the case of USB.  Did I really read this right?

No.  The READ CAPACITY command should always return the last block
number for any form of SCSI, including SCSI over USB, and to get the
number of blocks that value should be incremented.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-04 15:28                                     ` Alan Stern
@ 2012-04-06  0:27                                       ` Norman Diamond
  2012-04-06 16:21                                         ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-06  0:27 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Sorry for top posting, but I don't want to delete the very helpful analysis in the excessively long quotation below.

Alan Stern is correct to say I was too quick in blaming the driver, but I did have a reason, which will now lead off topic for a moment, sorry again.

Several days ago I said that Windows XP copied all of the files from the partition onto a different hard drive, the bridge did not crash, the drive had no problem, etc.  When Windows XP CHKDSK was told to test every sector in the partition then Windows XP forgot about the hard drive's existence and it was necessary to unplug and replug the USB cable, just like Linux.  But Windows XP could copy all the files and Linux's "cp -pr" could not, it sure did look like a driver problem.

Now I know that Windows XP lied.  I don't know what it was really copying when it pretended to copy all of the files from the partition onto a different hard drive.

I tracked down which file contained the bad block.  I deleted every other file in the partition.  Then, when Windows XP tried to copy the file from the partition onto a different hard drive, Windows XP did fail and it forgot about the hard drive's existence.

Therefore it does look like Linux's drivers are not at fault, and the USB-to-ATA bridge is at fault, though there is still something odd.

When sg_dd tries to read the bad block, it fails, but the bridge does not crash.

When ordinary dd tries to read a Linux-length page of 8 blocks, the bridge crashes.

I'm pretty sure Windows is reading a cluster of 4 blocks in the file and the bridge crashes at that time.  (The partition is a little under 8MB, formatted FAT12, with clusters of 4 sectors.)

I wonder what was Windows reading when the partition was filled with other files besides the one that contains the bad block, when Windows pretended that it read the file containing the bad block?  I'll have to see if I can reconstruct that situation.  Though obviously that will be off topic.

Nonetheless, trying to read a nonexistent sector after the last existing sector does not crash my bridge.  sg_dd reports the error correctly.  Ordinary dd doesn't try to do the read because the sector address is 2 past where Linux thinks the drive ends (which is 1 past where the drive really ends).  Existing non-defective blocks on the drive can still be accessed.  The USB cable does not beed to be unplugged and replugged.

With a different bridge, a Linux driver hangs for a few minutes after trying to read the bad block.  Then it resets the bridge, the reset succeeds, and good blocks on the drive can still be accessed.  Also with that different bridge, Linux knows the real size of the drive.


Alan Stern wrote:
> On Wed, 4 Apr 2012, Norman Diamond wrote:
> 
> > The usbmon output quoted below comes from the sequence of two commands:
> > sg_dd blk_sgio=1 bpt=1 bs=512 count=1 if=/dev/sdb of=/dev/null skip=551562
> > dd bs=512 count=1 if=/dev/sdb of=/dev/null skip=551562
> > 
> > As expected by now, the sg_dd command properly reported an error for the unreadable block, and the USB-to-ATA bridge did not crash.  The dd command also reported an error, and then a driver caused a crash of the driver's self and/or the bridge.
> 
> This is good.  It shows just what happened.
> 
> And by the way, you shouldn't be so quick to assign blame.  Without
> knowing the exact details, you're not in a position to say where the
> fault really lies.
> 
> > f0da9c00 3237261077 S Bo:2:003:1 -115 31 = 55534243 d7000000 24000000 80000612 00000024 00000000 00000000 000000
> > f0da9c00 3237261251 C Bo:2:003:1 0 31 >
> > f2938d80 3237261539 S Bi:2:003:2 -115 36 <
> > f2938d80 3237261706 C Bi:2:003:2 0 36 = 00000000 23000000 48495441 4348495f 444b3233 42412d32 30422020 20202020
> > f0da9c00 3237261723 S Bi:2:003:2 -115 13 <
> > f0da9c00 3237261793 C Bi:2:003:2 0 13 = 55534253 d7000000 00000000 00
> 
> The first command issued by sg_dd was an INQUIRY, and it succeeded.
> 
> > f0da9c00 3237261905 S Bo:2:003:1 -115 31 = 55534243 d8000000 00020000 80000a28 0000086a 8a000001 00000000 000000
> > f0da9c00 3237262093 C Bo:2:003:1 0 31 >
> > f2938d80 3237262250 S Bi:2:003:2 -115 512 <
> > f2938d80 3239564885 C Bi:2:003:2 -32 0
> > f0da9c00 3239564972 S Co:2:003:0 s 02 01 0000 0082 0000 0
> > f0da9c00 3239565256 C Co:2:003:0 0 0
> > f0da9c00 3239565287 S Bi:2:003:2 -115 13 <
> > f0da9c00 3239565485 C Bi:2:003:2 0 13 = 55534253 d8000000 00020000 01
> 
> This is the second command, a READ(10) for one block starting at block
> 551562 (86a8a in hex).  The bridge transmitted no data and reported a 
> failure status.
> 
> > f0da9c00 3239565521 S Bo:2:003:1 -115 31 = 55534243 d9000000 12000000 80000603 00000012 00000000 00000000 000000
> > f0da9c00 3239565740 C Bo:2:003:1 0 31 >
> > f2938d80 3239565896 S Bi:2:003:2 -115 18 <
> > f2938d80 3239566129 C Bi:2:003:2 0 18 = 70000000 0000000a 00000000 00000000 0000
> > f0da9c00 3239566160 S Bi:2:003:2 -115 13 <
> > f0da9c00 3239566364 C Bi:2:003:2 0 13 = 55534253 d9000000 00000000 00
> 
> When asked for detailed status information (REQUEST SENSE), the bridge
> sent an empty reply (No Sense).  This is a bug in the bridge; it should
> have indicated what sort of failure occurred, such as: Hardware Error,
> Unrecovered read error.
> 
> > f0da9c00 3239577155 S Bo:2:003:1 -115 31 = 55534243 da000000 00000000 00000600 00000000 00000000 00000000 000000
> > f0da9c00 3239577291 C Bo:2:003:1 0 31 >
> > f0da9c00 3239577492 S Bi:2:003:2 -115 13 <
> > f0da9c00 3239577666 C Bi:2:003:2 0 13 = 55534253 da000000 00000000 00
> 
> This is a TEST UNIT READY command.  It shows that the drive is ready
> to be used.  I can't tell if this command was sent by sg_dd or
> something else.
> 
> > f0da9c00 3239579541 S Bo:2:003:1 -115 31 = 55534243 db000000 00100000 80000a28 00025428 80000008 00000000 000000
> > f0da9c00 3239579702 C Bo:2:003:1 0 31 >
> > f2938300 3239579845 S Bi:2:003:2 -115 4096 <
> > f2938300 3239593701 C Bi:2:003:2 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > f0da9c00 3239593720 S Bi:2:003:2 -115 13 <
> > f0da9c00 3239593791 C Bi:2:003:2 0 13 = 55534253 db000000 00000000 00
> ...
> 
> There follows a rather lengthy series of reads, of which I have cut out
> all but the first.  They look like the sort of thing udev does when a
> new drive is registered, but I have no idea why udev should have been
> triggered at this point.  Anyway, they all succeeded.
> 
> > f0da9c00 3239745783 S Bo:2:003:1 -115 31 = 55534243 37010000 00000000 00000600 00000000 00000000 00000000 000000
> > f0da9c00 3239746063 C Bo:2:003:1 0 31 >
> > f0da9c00 3239746250 S Bi:2:003:2 -115 13 <
> > f0da9c00 3239746289 C Bi:2:003:2 0 13 = 55534253 37010000 00000000 00
> 
> Another successful TEST UNIT READY.
> 
> > f0da9c00 3239747439 S Bo:2:003:1 -115 31 = 55534243 38010000 00020000 80000ca1 082e0001 00000000 ec000000 000000
> > f0da9c00 3239747584 C Bo:2:003:1 0 31 >
> > f2938c80 3239747747 S Bi:2:003:2 -115 512 <
> > f2938c80 3239747790 C Bi:2:003:2 -32 0
> > f0da9c00 3239747827 S Co:2:003:0 s 02 01 0000 0082 0000 0
> > f0da9c00 3239747935 C Co:2:003:0 0 0
> > f0da9c00 3239747969 S Bi:2:003:2 -115 13 <
> > f0da9c00 3239748065 C Bi:2:003:2 0 13 = 55534253 38010000 00020000 01
> 
> This is a 12-byte ATA pass-through command.  I don't know just what the
> command is, but in any case the bridge rejected it with a failure 
> status.
> 
> > f0da9c00 3239748146 S Bo:2:003:1 -115 31 = 55534243 39010000 12000000 80000603 00000012 00000000 00000000 000000
> > f0da9c00 3239748307 C Bo:2:003:1 0 31 >
> > f2938c80 3239748462 S Bi:2:003:2 -115 18 <
> > f2938c80 3239748557 C Bi:2:003:2 0 18 = 70000500 0000000a 00000000 20000000 0000
> > f0da9c00 3239748591 S Bi:2:003:2 -115 13 <
> > f0da9c00 3239748686 C Bi:2:003:2 0 13 = 55534253 39010000 00000000 00
> 
> The corresponding sense information is: Illegal Request, Invalid
> command operation code, which is appropriate for an unrecognized command.
> 
> > f0da9c00 3239748806 S Bo:2:003:1 -115 31 = 55534243 3a010000 00000000 00000600 00000000 00000000 00000000 000000
> > f0da9c00 3239748949 C Bo:2:003:1 0 31 >
> > f0da9c00 3239749103 S Bi:2:003:2 -115 13 <
> > f0da9c00 3239749164 C Bi:2:003:2 0 13 = 55534253 3a010000 00000000 00
> 
> Yet another TEST UNIT READY.  Then about 15 seconds later we have:
> 
> > f0da9c00 3255121946 S Bo:2:003:1 -115 31 = 55534243 3b010000 00100000 80000a28 0000086a 88000008 00000000 000000
> > f0da9c00 3255122051 C Bo:2:003:1 0 31 >
> > f2938680 3255122332 S Bi:2:003:2 -115 4096 <
> > f2938680 3257419391 C Bi:2:003:2 -121 1037 = 20284143 31290000 534d4152 5420436f 6d6d616e 64205472 616e7370 6f727420
> > f0da9c00 3257419502 S Bi:2:003:2 -115 13 <
> > f0da9c00 3285854403 C Bi:2:003:2 -104 0
> 
> This is a READ(10) command for 8 blocks starting at block 551560.
> Obviously this originated from the dd program, which goes through the
> block layer and therefore tries to read an entire page at a time.  The
> bridge transmitted only 1037 bytes out of the 4096 that were requested
> and then didn't send a status code.  After 30 seconds of waiting for
> the status, the command was aborted.
> 
> Interestingly, 1037 = 1024 + 13.  The first two readable blocks amount
> to 1024 bytes, and the status information is 13 bytes long.  However
> the bridge neglected to separate the data from the status (it should
> have sent a zero-length packet in between), so to the computer it
> looked like 1037 bytes of data.  Evidently this is another bug in the
> bridge.
> 
> > f44c7500 3285854464 S Co:2:002:0 s 23 03 0004 0003 0000 0
> > f44c7500 3285854636 C Co:2:002:0 0 0
> > f44c7500 3285865159 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> > f44c7500 3285865408 C Ci:2:002:0 0 4 = 11050000
> > f44c7500 3285876152 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> > f44c7500 3285876399 C Ci:2:002:0 0 4 = 03051000
> > f44c7500 3285927200 S Co:2:002:0 s 23 01 0014 0003 0000 0
> > f44c7500 3285927347 C Co:2:002:0 0 0
> > f44c7500 3285927420 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
> > f44c7500 3285927734 C Ci:2:000:0 0 18 = 12010002 00000040 7b060725 00010102 0301
> > f44c7500 3285927770 S Co:2:002:0 s 23 03 0004 0003 0000 0
> > f44c7500 3285927824 C Co:2:002:0 0 0
> > f29aad00 3285938200 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> > f29aad00 3285938354 C Ci:2:002:0 0 4 = 11050000
> > f29aad00 3285949217 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> > f29aad00 3285949327 C Ci:2:002:0 0 4 = 03051000
> > f3c27500 3285971663 C Ii:2:002:1 0:2048 2 = 0800
> > f3c27500 3285971669 S Ii:2:002:1 -115:2048 2 <
> > f29aad00 3286000218 S Co:2:002:0 s 23 01 0014 0003 0000 0
> > f29aad00 3286000323 C Co:2:002:0 0 0
> > f29aad00 3286000420 S Co:2:000:0 s 00 05 0003 0000 0000 0
> > f29aad00 3286000642 C Co:2:000:0 0 0
> > f29aad00 3286012218 S Ci:2:003:0 s 80 06 0100 0000 0012 18 <
> > f29aad00 3286012661 C Ci:2:003:0 0 18 = 12010002 00000040 7b060725 00010102 0301
> > f29aad00 3286012756 S Ci:2:003:0 s 80 06 0200 0000 0020 32 <
> > f29aad00 3286013239 C Ci:2:003:0 0 32 = 09022000 010100c0 32090400 00020806 50000705 01020002 00070582 02000200
> > f29aad00 3286013339 S Ci:2:003:0 s 80 06 0303 0409 00ff 255 <
> > f29aad00 3286013609 C Ci:2:003:0 0 4 = 04033000
> > f29aad00 3286013711 S Co:2:003:0 s 00 09 0001 0000 0000 0
> > f29aad00 3286013984 C Co:2:003:0 0 0
> 
> I'll skip the details; the above sequence shows the device being reset
> (including having its address re-assigned).
> 
> > f0da9c00 3286014115 S Bo:2:003:1 -115 31 = 55534243 3c010000 00000000 00000600 00000000 00000000 00000000 000000
> > f0da9c00 3286014228 C Bo:2:003:1 0 31 >
> > f0da9c00 3286014430 S Bi:2:003:2 -115 13 <
> > f0da9c00 3286014598 C Bi:2:003:2 0 13 = 55534253 3c010000 00000000 00
> 
> This is another TEST UNIT READY command, sent to make sure the drive
> is ready to resume normal operation after being reset.  It succeeds.
> 
> > f0da9c00 3286017121 S Bo:2:003:1 -115 31 = 55534243 3d010000 00100000 80000a28 0000086a 88000008 00000000 000000
> > f0da9c00 3286017234 C Bo:2:003:1 0 31 >
> > f29aad00 3286017446 S Bi:2:003:2 -115 4096 <
> > f29aad00 3316830429 C Bi:2:003:2 -104 0
> 
> This is the same READ(10) command as before, retried.  This time the
> bridge didn't send any data at all before it stopped responding. Again,
> the command was aborted after 30 seconds of silence.
> 
> > f29aad00 3316830529 S Co:2:002:0 s 23 03 0004 0003 0000 0
> > f29aad00 3316830658 C Co:2:002:0 0 0
> > f29aad00 3316841216 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> > f29aad00 3316841405 C Ci:2:002:0 0 4 = 11050000
> > f29aad00 3316852213 S Ci:2:002:0 s a3 00 0000 0003 0004 4 <
> > f29aad00 3316852402 C Ci:2:002:0 0 4 = 03051000
> > f29aad00 3316903213 S Co:2:002:0 s 23 01 0014 0003 0000 0
> > f29aad00 3316903370 C Co:2:002:0 0 0
> > f29aad00 3316903471 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
> > f29aad00 3321903434 C Ci:2:000:0 -2 0
> > f29aad00 3321903529 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
> > f29aad00 3321908758 C Ci:2:000:0 -71 0
> > f29aad00 3321908930 S Ci:2:000:0 s 80 06 0100 0000 0040 64 <
> > f29aad00 3321912970 C Ci:2:000:0 -71 0
> 
> The remainder of the trace is just like this, repeated over and over.
> It shows the device being reset but not responding at all.  Evidently
> at this point the bridge has crashed completely.
> 
> Judging by this analysis, you tell me: Which component is at fault?  
> The driver did exactly as it was told, and it reset the device each
> time the bridge stopped responding.  The bridge, on the other hand,
> displayed multiple bugs and eventually crashed completely.
> 
> Alan Stern
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                         ` <Pine.LNX.4.44L0.1204041128160.1543-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2012-04-06  0:49                                           ` Norman Diamond
       [not found]                                             ` <124887.42544.qm-303aDswoEIYQKk/ZIwh3tkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-06  0:49 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

Alan Stern wrote:
> On Wed, 4 Apr 2012, Norman Diamond wrote:
>> Alan Stern wrote:
>>> On Tue, 3 Apr 2012, Norman Diamond wrote:
>>>>>> Wrong.  We CAN try to read the last block that the bridge says exists, to see if it really exists or not.  (Well, only partly wrong.  Maybe there really are some bridges that crash in that situation, but mine doesn't, and a broken driver still needs fixing.)
>>>>> 
>>>>> Yes, there really are such bridges.  You can find reports from people complaining about them in the email archives.
>>>> 
>>>> Wait.  Is there a bridge which overreports the last sector number by 1, and which ALSO crashes when the host PC tries to read that supposed last sector number?
>>> 
>>> Yes.  Like I said before, you can find complaints about these things in the mailing list archives.  However it's not clear whether the crashing is the fault of the bridge itself or the drive it is attached to.
>> 
>> Or the driver.
> 
> No, it is not the fault of the driver.

I agree now that my bridge's crash sometimes when trying to read bad blocks is not the driver's fault, but meanwhile my bridge does not crash when trying to read a nonexistent block so it still seems possible to detect if the result of READ CAPACITY is wrong.

>> I think it is not the fault of the drive.  If a drive crashed when a driver tried to access a nonexistent sector, then the drive would crash when mounted internally on an ATA or SATA cable not only when connected to a USB cable.

[I think we agree on that.]

> However there's no question that other bridges having the same vendor, product, and revision ID values as yours _did_ report the drive capacity incorrectly; otherwise the quirk entry would not be there.  What I'm not sure of is whether those bridges went on to crash as dramatically as yours.

Except that mine doesn't crash when trying to read a nonexistent block, so the quirk handling still looks overly aggressive.

>> This still makes me wonder why Windows is able to handle the same bridges.
> 
> Probably because Windows does not try to read the last block, unless it is occupied by a file.

I think Windows does.  At least in some cases the last block of a partition contains structural information and can't be used for files.  At least in some cases Windows reports a file system error if that block can't be accessed when trying to mount the partition.  Now, Windows won't have this trouble with my bridge because Windows saw the correct drive size through my bridge.  Only Linux will have trouble.  I'll have to see if I can create a suitable partition in Windows and then get a Linux error when trying to mount the partition without its last sector.

> It would be interesting to know the details of what your Windows system does when trying to read a file that occupies the faulty sector.

As mentioned in my other message a few minutes ago, now we do know more or less, but I wonder what Windows was doing previously when it obviously wasn't really reading that file.

>> Now, as far as I can tell, I have found a WTF of a standard.  I only have drafts of old T10 documents but it sure looks like a WTF unless something was fixed later.
>> 
>> In SCSI Block Commands, it seems to me that the READ CAPACITY (10) command (opcode 0x25) returns the number of blocks.
> 
> I'm not sure how you reached that conclusion.  In my rather old copy of the SCSI-2 standard, section 9.2.7 (the READ CAPACITY command in the chapter on Direct-access devices) says:
> 
>     A partial medium indicator (PMI) bit of zero indicates that the 
>     returned logical block address and the block length in bytes
>     are those of the last logical block on the logical unit.

That's the same result that RBC promises, but my draft of SBC-3 doesn't say that.  Oh, now I see it gives a hint and I missed it:

"A partial medium indicator (PMI) bit set to zero specifies that the device server return information on the last logical block on the direct-access block device."

That wording change was a pretty scuzzy thing to do.  Not your fault of course.  (Or is it ... let me check the list of committee members at the top of the document ^_^ )
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-06  0:27                                       ` Norman Diamond
@ 2012-04-06 16:21                                         ` Alan Stern
  2012-04-09  2:07                                           ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-06 16:21 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

On Fri, 6 Apr 2012, Norman Diamond wrote:

> When sg_dd tries to read the bad block, it fails, but the bridge does not crash.
> 
> When ordinary dd tries to read a Linux-length page of 8 blocks, the bridge crashes.
> 
> I'm pretty sure Windows is reading a cluster of 4 blocks in the file and the bridge crashes at that time.  (The partition is a little under 8MB, formatted FAT12, with clusters of 4 sectors.)

What happens if you use sg_dd to try reading four or eight blocks
including the bad block?

> Nonetheless, trying to read a nonexistent sector after the last existing sector does not crash my bridge.  sg_dd reports the error correctly.  Ordinary dd doesn't try to do the read because the sector address is 2 past where Linux thinks the drive ends (which is 1 past where the drive really ends).  Existing non-defective blocks on the drive can still be accessed.  The USB cable does not beed to be unplugged and replugged.

What happens if you use sg_dd to try reading four or eight blocks
including the first nonexistent block?

By the way, Linux's SCSI disk driver no longer does this.  It is more
cautious; accesses near the end of a USB device are broken up into
single-block reads or writes.  However at the time the quirk entry was
added, the driver wasn't so careful.  If you want to see the discussion 
that led to the quirk being added, look here:

	http://marc.info/?l=linux-usb-users&m=110219110306073&w=2

Unfortunately the critical message that had the logs attached never got 
into the mailing list archive.

> With a different bridge, a Linux driver hangs for a few minutes after trying to read the bad block.  Then it resets the bridge, the reset succeeds, and good blocks on the drive can still be accessed.  Also with that different bridge, Linux knows the real size of the drive.

The firmware on a lot of these bridges is pretty buggy.

Alan Stern


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                             ` <124887.42544.qm-303aDswoEIYQKk/ZIwh3tkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
@ 2012-04-06 16:31                                               ` Alan Stern
       [not found]                                                 ` <Pine.LNX.4.44L0.1204061221530.1392-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-06 16:31 UTC (permalink / raw)
  To: Norman Diamond
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 2316 bytes --]

On Fri, 6 Apr 2012, Norman Diamond wrote:

> > However there's no question that other bridges having the same vendor, product, and revision ID values as yours _did_ report the drive capacity incorrectly; otherwise the quirk entry would not be there.  What I'm not sure of is whether those bridges went on to crash as dramatically as yours.
> 
> Except that mine doesn't crash when trying to read a nonexistent block, so the quirk handling still looks overly aggressive.

You're not thinking about it the right way.  If the quirk handling were 
any less agressive, it would fail to work entirely on some devices 
(those that crash when trying to access a nonexistent block).  Such 
devices would not usable at all.

Besides, suppose this quirk entry were removed.  What would happen with
the other bridges with the same ID numbers that do not decrement the
block count properly?  Linux would try to access the nonexistent last
block, and the access would fail.  Perhaps no unplug and replug would
be needed, but any data destined for that block would be lost.

> >> This still makes me wonder why Windows is able to handle the same bridges.
> > 
> > Probably because Windows does not try to read the last block, unless it is occupied by a file.
> 
> I think Windows does.  At least in some cases the last block of a partition contains structural information and can't be used for files.  At least in some cases Windows reports a file system error if that block can't be accessed when trying to mount the partition.

Not in any of the cases I have seen or heard of, but that isn't a very 
large sampling.

>  Now, Windows won't have this trouble with my bridge because Windows saw the correct drive size through my bridge.  Only Linux will have trouble.  I'll have to see if I can create a suitable partition in Windows and then get a Linux error when trying to mount the partition without its last sector.

You'll get an error right away; the partition-table-reading code
doesn't accept partitions that appear to extend past the end of the 
device.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-06 16:21                                         ` Alan Stern
@ 2012-04-09  2:07                                           ` Norman Diamond
       [not found]                                             ` <137070.95048.qm-W9a5FxB6bg8QKk/ZIwh3tkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-09  2:07 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Alan Stern wrote:
> On Fri, 6 Apr 2012, Norman Diamond wrote:
>> When sg_dd tries to read the bad block, it fails, but the bridge does not crash.
>> 
>> When ordinary dd tries to read a Linux-length page of 8 blocks, the bridge crashes.
>> 
>> I'm pretty sure Windows is reading a cluster of 4 blocks in the file and the bridge crashes at that time.  (The partition is a little under 8MB, formatted FAT12, with clusters of 4 sectors.)
> 
> What happens if you use sg_dd to try reading four or eight blocks including the bad block?

If bpt=1 count=4 then sg_dd reads 2 good blocks, aborts on the bad block, and doesn't try the subsequent good block.  The bridge does not crash.

If bpt=4 count=4 then sg_dd aborts and reports that it didn't read anything.  The bridge crashes.  OK, this is good to know.

>> Nonetheless, trying to read a nonexistent sector after the last existing sector does not crash my bridge.  sg_dd reports the error correctly.  Ordinary dd doesn't try to do the read because the sector address is 2 past where Linux thinks the drive ends (which is 1 past where the drive really ends).  Existing non-defective blocks on the drive can still be accessed.  The USB cable does not beed to be unplugged and replugged.
> 
> What happens if you use sg_dd to try reading four or eight blocks including the first nonexistent block?

With bpt=4 count=4, sg_dd aborts and reports that it didn't read anything (which is true this time).  The bridge DOES NOT CRASH.  However, the good news kind of seems irrelevant.  I suggest that quirk processing should only try to read 1 block, the last block which is asserted to exist, and decrement if the read fails due to non-existence.  If the read fails for a different reason then the block exists and the count should not be decremented.

> By the way, Linux's SCSI disk driver no longer does this.  It is more cautious; accesses near the end of a USB device are broken up into single-block reads or writes.  However at the time the quirk entry was added, the driver wasn't so careful.

Which means that someone's bridge might have crashed due to a bad block at or near the end of the drive.  Around a week ago I partitioned the first 95% of someone's hard drive for exactly that reason (I could have continued and tried 99%, etc., but he said not to bother).

> If you want to see the discussion that led to the quirk being added, look here:
>     http://marc.info/?l=linux-usb-users&m=110219110306073&w=2
> Unfortunately the critical message that had the logs attached never got into the mailing list archive.

He couldn't send the log because it was too big for Hotmail.  Microsoft missed their chance  ^_^  After so much discussion of Windows losing data on hard drives, Microsoft should have gladly assisted a discussion of this Linux problem  ^_^

>> With a different bridge, a Linux driver hangs for a few minutes after trying to read the bad block.  Then it resets the bridge, the reset succeeds, and good blocks on the drive can still be accessed.  Also with that different bridge, Linux knows the real size of the drive.
> 
> The firmware on a lot of these bridges is pretty buggy.

OK.  However, the reset succeeded (after a delay).  More importantly, the number of blocks was used accurately by Linux drivers.  You will hear about this bridge again in a few minutes, in response to your other message.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                                 ` <Pine.LNX.4.44L0.1204061221530.1392-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2012-04-09  2:25                                                   ` Norman Diamond
  2012-04-09 14:40                                                     ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-09  2:25 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

Alan Stern wrote:
> On Fri, 6 Apr 2012, Norman Diamond wrote:
[Alan Stern:]
>>> However there's no question that other bridges having the same vendor, product, and revision ID values as yours _did_ report the drive capacity incorrectly; otherwise the quirk entry would not be there.  What I'm not sure of is whether those bridges went on to crash as dramatically as yours.
>> 
>> Except that mine doesn't crash when trying to read a nonexistent block, so the quirk handling still looks overly aggressive.
> 
> You're not thinking about it the right way.  If the quirk handling were any less agressive, it would fail to work entirely on some devices (those that crash when trying to access a nonexistent block).

I see your point, regarding devices which differ from mine, and which possibly differ from the other user in 2004 since we don't really know the reason for his crash (he might have had a bad block at or near the end of his drive).

> Such devices would not usable at all.

We are already in that situation because of the decrement.  If the drive was partitioned while the drive was internally installed on an ATA cable, then the decrement now interferes with the usability of the drive regardless of whether the USB bridge really does or doesn't have a bug.  The current driver doesn't even give a chance.  Also, if the drive was partitioned when using a known non-buggy bridge, then the same situation happens when using a bridge whose status is ambiguous because the driver does a decrement.

> Besides, suppose this quirk entry were removed.  What would happen with the other bridges with the same ID numbers that do not decrement the block count properly?  Linux would try to access the nonexistent last block, and the access would fail.  Perhaps no unplug and replug would be needed, but any data destined for that block would be lost.

The present situation loses reads and writes of the last block when the last block DOES exist.

>>>> This still makes me wonder why Windows is able to handle the same bridges.
>>> 
>>> Probably because Windows does not try to read the last block, unless it is occupied by a file.
>> 
>> I think Windows does.  At least in some cases the last block of a partition contains structural information and can't be used for files.  At least in some cases Windows reports a file system error if that block can't be accessed when trying to mount the partition.
> 
> Not in any of the cases I have seen or heard of, but that isn't a very large sampling.

I found the reason for this.  In Windows 2000 and later, if Windows is creating the partitions, Windows deliberately avoids using the equivalent of 1 emulated IDE cylinder (16065 sectors), in case the user decides later to convert the drive from Windows basic format to Windows dynamic format.  Vista and later avoid using some different amount but the effect in our case is the same.  Windows doesn't try to use the last block in such cases.

But Linux can.  I connected the drive to a known good USB-to-IDE bridge and created an NTFS partition containing the last sector in the drive.

Then I connected the drive to my Prolific bridge.  Windows accessed the NTFS partition with no problem, including its last sector.  But Linux gave an error.  Linux DOES also access the NTFS partition, but Linux gives an error that it truncated the partition because the partition runs past the point where Linux thinks the drive ends, which is due to the decrement.

> You'll get an error right away; the partition-table-reading code doesn't accept partitions that appear to extend past the end of the device.

I got an error in the log as you said, visible with dmesg.  But hal offered to mount the partition, and fdisk displays the partition.  OK, after reporting things up to this point, let's try mounting the partition, but read-only...  The mount command obeyed with no error message, and no further report to the log.  The ls command displays the contents (only System Volume Information at the moment, because Windows XP likes to create restore points on USB drives).  But we know that Linux is accessing a truncation of the partition.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                             ` <137070.95048.qm-W9a5FxB6bg8QKk/ZIwh3tkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
@ 2012-04-09 14:19                                               ` Alan Stern
       [not found]                                                 ` <Pine.LNX.4.44L0.1204091014220.1429-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-09 14:19 UTC (permalink / raw)
  To: Norman Diamond
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 1546 bytes --]

On Mon, 9 Apr 2012, Norman Diamond wrote:

> I suggest that quirk processing should only try to read 1 block, the last block which is asserted to exist, and decrement if the read fails due to non-existence.  If the read fails for a different reason then the block exists and the count should not be decremented.

I have tried to explain before that this is a very bad idea.  Bridges
that crash when attempting to read beyond the end of the device would
become totally unusable.

> > By the way, Linux's SCSI disk driver no longer does this.  It is more cautious; accesses near the end of a USB device are broken up into single-block reads or writes.  However at the time the quirk entry was added, the driver wasn't so careful.
> 
> Which means that someone's bridge might have crashed due to a bad
> block at or near the end of the drive.

More likely the bridge crashed because it was unable to handle a
multiple-block read whereas it could have handled a single-block read.

Regardless, we are now stuck.  We don't dare remove the existing quirk
entries because of the potential for breaking systems that currently
work.  If you can suggest a way of detecting whether or not the
capacity value is correct that will not break any existing systems, I
would be extremely glad to hear it.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-09  2:25                                                   ` Norman Diamond
@ 2012-04-09 14:40                                                     ` Alan Stern
  2012-04-09 22:21                                                       ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-09 14:40 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 2539 bytes --]

On Mon, 9 Apr 2012, Norman Diamond wrote:

> > You're not thinking about it the right way.  If the quirk handling were any less agressive, it would fail to work entirely on some devices (those that crash when trying to access a nonexistent block).
> 
> I see your point, regarding devices which differ from mine, and which possibly differ from the other user in 2004 since we don't really know the reason for his crash (he might have had a bad block at or near the end of his drive).
> 
> > Such devices would not usable at all.
> 
> We are already in that situation because of the decrement.

No.  That statement is simply wrong.  Such devices are quite usable.

>  If the drive was partitioned while the drive was internally installed on an ATA cable, then the decrement now interferes with the usability of the drive regardless of whether the USB bridge really does or doesn't have a bug.

What are you talking about?  If the bridge does have the capacity bug 
then the decrement allows the bridge to be used correctly.

>  Also, if the drive was partitioned when using a known non-buggy bridge, then the same situation happens when using a bridge whose status is ambiguous because the driver does a decrement.

It is true that the current situation sometimes denies access to a
block which might work perfectly well.  But we don't have any better
solutions.  And don't forget, in any individual case it is always
possible to disable the quirk by means of a module parameter.

> > Besides, suppose this quirk entry were removed.  What would happen with the other bridges with the same ID numbers that do not decrement the block count properly?  Linux would try to access the nonexistent last block, and the access would fail.  Perhaps no unplug and replug would be needed, but any data destined for that block would be lost.
> 
> The present situation loses reads and writes of the last block when
> the last block DOES exist.

No, it doesn't; it prevents those reads and writes from being
attempted in the first place.  You probably don't care about this
distinction, however.

If you're trying to make a point in this discussion, I can't tell what
it is.  I already know that decrementing the capacity is not always the
right thing to do.  But I don't know of any better alternative.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                                 ` <Pine.LNX.4.44L0.1204091014220.1429-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2012-04-09 22:00                                                   ` Norman Diamond
  2012-04-10 14:31                                                     ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-09 22:00 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

Alan Stern wrote:
> On Mon, 9 Apr 2012, Norman Diamond wrote:
>> I suggest that quirk processing should only try to read 1 block, the last block which is asserted to exist, and decrement if the read fails due to non-existence.  If the read fails for a different reason then the block exists and the count should not be decremented.
> 
> I have tried to explain before that this is a very bad idea.  Bridges that crash when attempting to read beyond the end of the device would become totally unusable.

In cases where a bridge has been observed to crash when trying to read a SINGLE block which the bridge asserted to exist but which didn't actually exist, I agree that an aggressive quirk is needed.

In cases where a bridge has been observed to crash when trying to read MULTIPLE blocks among which one block had a problem, there is no evidence yet to judge that my idea is very bad.  Those bridges need to be tested again with single block reads, and need to be tested on reading the last block number which the bridge asserts to exist rather than attempting to read an existing bad block (by coincidence the two might be the same block, but not usually).

>>> By the way, Linux's SCSI disk driver no longer does this.  It is more cautious; accesses near the end of a USB device are broken up into single-block reads or writes.  However at the time the quirk entry was added, the driver wasn't so careful.
>> 
>> Which means that someone's bridge might have crashed due to a bad block at or near the end of the drive.
> 
> More likely the bridge crashed because it was unable to handle a multiple-block read whereas it could have handled a single-block read.

My intuition agrees with your comparison of the probabilities.

Now I think we agree that the existing handling of quirks is too aggressive for some bridges.

> Regardless, we are now stuck.  We don't dare remove the existing quirk entries because of the potential for breaking systems that currently work.  If you can suggest a way of detecting whether or not the capacity value is correct that will not break any existing systems, I would be extremely glad to hear it.

We do know that the existing handling is broken because Linux did truncate my NTFS partition yesterday.  Linux reported that it was truncating, and although each driver didn't know what the reason was, you and I know the reason:  one driver truncated the drive and the next driver saw a partition structure extending past the truncated drive so it truncated the partition.

I suggest further testing to see which quirks can be handled less aggressively.  For example with newer instances of firmware 1.00 of the Prolific chip, we know that we can try to do a single block read of the last block that the chip asserts to exist, so we can test whether that block really exists (and remember not to count it out if it exists but has media errors).  With older instances of firmware 1.00 of the same Prolific chip, we don't know for sure, but we do know that previous testing wasn't adequate.  In cases where chips and volunteers are available, sg_dd provides pretty quick testing.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-09 14:40                                                     ` Alan Stern
@ 2012-04-09 22:21                                                       ` Norman Diamond
  0 siblings, 0 replies; 56+ messages in thread
From: Norman Diamond @ 2012-04-09 22:21 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Alan Stern wrote:
> On Mon, 9 Apr 2012, Norman Diamond wrote:
[Alan Stern:]
>>> You're not thinking about it the right way.  If the quirk handling were any less agressive, it would fail to work entirely on some devices (those that crash when trying to access a nonexistent block).
>> 
>> I see your point, regarding devices which differ from mine, and which possibly differ from the other user in 2004 since we don't really know the reason for his crash (he might have had a bad block at or near the end of his drive).
>> 
>>> Such devices would not usable at all.
>> 
>> We are already in that situation because of the decrement.
> 
> No.  That statement is simply wrong.  Such devices are quite usable.

As you saw yesterday, Linux truncated my existing NTFS partition, which had been created properly by Linux with a different USB-to-IDE bridge.  Such devices are not fully usable, and not quite usable when they were partitioned while connected through bridges that Linux was fully happy to use.

>>  If the drive was partitioned while the drive was internally installed on an ATA cable, then the decrement now interferes with the usability of the drive regardless of whether the USB bridge really does or doesn't have a bug.
> 
> What are you talking about?  If the bridge does have the capacity bug then the decrement allows the bridge to be used correctly.

And when the bridge doesn't have the capacity bug, as mine doesn't, the present level of quirk handling truncates the partition, as it did yesterday and as I reported yesterday.

>>  Also, if the drive was partitioned when using a known non-buggy bridge, then the same situation happens when using a bridge whose status is ambiguous because the driver does a decrement.
> 
> It is true that the current situation sometimes denies access to a block which might work perfectly well.

Yes, and one paragraph earlier I described the same case where a drive had previously been connected directly to an ATA controller instead of a fully Linux-accepted USB bridge.  A block which already has been in use now gets denied access.

> But we don't have any better solutions.

In some cases we do.

> And don't forget, in any individual case it is always possible to disable the quirk by means of a module parameter.

Yes, I remember you mentioned that a week or two ago, and I need to look at the modconf files.  But I have to be capable of doing something reasonable with other bridges too, and the kinds of actions that are reasonable in my situation are different from yours.  I cannot deny access to the last block.  In my situation it is better to let a buggy bridge hang, so that the user knows they need to change bridges.

>>> Besides, suppose this quirk entry were removed.  What would happen with the other bridges with the same ID numbers that do not decrement the block count properly?  Linux would try to access the nonexistent last block, and the access would fail.  Perhaps no unplug and replug would be needed, but any data destined for that block would be lost.
>> 
>> The present situation loses reads and writes of the last block when the last block DOES exist.
> 
> No, it doesn't; it prevents those reads and writes from being attempted in the first place.

Correction:  yes it does, exactly because it prevents those reads and writes from being attempted in the first place.  As I described yesterday, I used a different bridge (one that Linux fully accepts) and created an NTFS partition ending in the actual last sector of the drive.  Then when using my Prolific bridge, Linux prevented reads and writes of the last block from being attempted in the first place.  The present situation loses reads and writes of the last block when the last block DOES exist and contains NTFS metadata.

> You probably don't care about this distinction, however.

I do understand the distinction between losing reads and writes because of one reason and losing reads and writes because of a different reason.  But in my situation I cannot lose reads and writes that users expect to take place, and I cannot give the excuse that they were lost because of one reason instead of a different reason.

> If you're trying to make a point in this discussion, I can't tell what it is.  I already know that decrementing the capacity is not always the right thing to do.  But I don't know of any better alternative.

I do think that we can try to read the single last block that the bridge asserts to exist, except in cases where a bridge has been observed to hang when when trying to read the single last asserted block (not multiples) where the bridge lied about the existence.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-09 22:00                                                   ` Norman Diamond
@ 2012-04-10 14:31                                                     ` Alan Stern
  2012-04-10 23:24                                                       ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-10 14:31 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 1951 bytes --]

On Tue, 10 Apr 2012, Norman Diamond wrote:

> Alan Stern wrote:
> > On Mon, 9 Apr 2012, Norman Diamond wrote:
> >> I suggest that quirk processing should only try to read 1 block, the last block which is asserted to exist, and decrement if the read fails due to non-existence.  If the read fails for a different reason then the block exists and the count should not be decremented.
> > 
> > I have tried to explain before that this is a very bad idea.  Bridges that crash when attempting to read beyond the end of the device would become totally unusable.
> 
> In cases where a bridge has been observed to crash when trying to read a SINGLE block which the bridge asserted to exist but which didn't actually exist, I agree that an aggressive quirk is needed.
> 
> In cases where a bridge has been observed to crash when trying to read MULTIPLE blocks among which one block had a problem, there is no evidence yet to judge that my idea is very bad.  Those bridges need to be tested again with single block reads, and need to be tested on reading the last block number which the bridge asserts to exist rather than attempting to read an existing bad block (by coincidence the two might be the same block, but not usually).

It sounds like you are suggesting that we have a new quirk, something 
like TEST_CAPACITY.  When this quirk is present, we could attempt to 
read the last block when the drive (or media) is first detected, 
thereby determining whether the reported capacity needs to be adjusted.

The existing FIX_CAPACITY and CAPACITY_HEURISTICS quirk entries could
be changed to TEST_CAPACITY as people report the results of their
testing.  However this would be a very slow process.

Is that what you want?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-10 14:31                                                     ` Alan Stern
@ 2012-04-10 23:24                                                       ` Norman Diamond
  2012-04-12 14:53                                                         ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-10 23:24 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Alan Stern wrote:
> On Tue, 10 Apr 2012, Norman Diamond wrote:
> > Alan Stern wrote:
>>> On Mon, 9 Apr 2012, Norman Diamond wrote:
>>>> I suggest that quirk processing should only try to read 1 block, the last block which is asserted to exist, and decrement if the read fails due to non-existence.  If the read fails for a different reason then the block exists and the count should not be decremented.
>>> 
>>> I have tried to explain before that this is a very bad idea.  Bridges that crash when attempting to read beyond the end of the device would become totally unusable.
>> 
>> In cases where a bridge has been observed to crash when trying to read a SINGLE block which the bridge asserted to exist but which didn't actually exist, I agree that an aggressive quirk is needed.
>> 
>> In cases where a bridge has been observed to crash when trying to read MULTIPLE blocks among which one block had a problem, there is no evidence yet to judge that my idea is very bad.  Those bridges need to be tested again with single block reads, and need to be tested on reading the last block number which the bridge asserts to exist rather than attempting to read an existing bad block (by coincidence the two might be the same block, but not usually).
> 
> It sounds like you are suggesting that we have a new quirk, something like TEST_CAPACITY.  When this quirk is present, we could attempt to read the last block when the drive (or media) is first detected, thereby determining whether the reported capacity needs to be adjusted.

Yes, that is what I've been suggesting for a while.  But at this moment I might have a better suggestion, discussed below.  Or it might be better to combine the two ideas.

> The existing FIX_CAPACITY and CAPACITY_HEURISTICS quirk entries could be changed to TEST_CAPACITY as people report the results of their testing.  However this would be a very slow process.

FIX_CAPACITY will still be necessary in cases where a bridge is known to have both problems, always overreporting and crashing when tested for overreporting.  I think these cases will be a small minority though.

Now, I think that most of the existing FIX_CAPACITY cases probably should be changed to CAPACITY_HEURISTICS.  This will be simpler and quicker, though not maximally accurate by itself.

In drivers/scsi/sd.c, fix_capacity always causes a decrement but guess_capacity guesses an even number.

So one thing to do for the Prolific bridge in unusual_devs.h is to use US_FL_CAPACITY_HEURISTICS instead of US_FL_FIX_CAPACITY.

I also think that if the reported capacity is a multiple of 63 then it is very likely to be accurate and should not be decremented.  Furthermore if the capacity is a multiple of 126 (i.e. even as in the current heuristic, and a multiple of 63) then US_FL_FIX_CAPACITY is almost certainly wrong.  Of course that 63 is artificial but it is very common and the reason is well known.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-10 23:24                                                       ` Norman Diamond
@ 2012-04-12 14:53                                                         ` Alan Stern
       [not found]                                                           ` <Pine.LNX.4.44L0.1204121030050.1496-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-12 14:53 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 3841 bytes --]

On Wed, 11 Apr 2012, Norman Diamond wrote:

> > It sounds like you are suggesting that we have a new quirk,
> > something like TEST_CAPACITY.  When this quirk is present, we could
> > attempt to read the last block when the drive (or media) is first
> > detected, thereby determining whether the reported capacity needs
> > to be adjusted.
> 
> Yes, that is what I've been suggesting for a while.  But at this
> moment I might have a better suggestion, discussed below.  Or it
> might be better to combine the two ideas.
> 
> > The existing FIX_CAPACITY and CAPACITY_HEURISTICS quirk entries
> > could be changed to TEST_CAPACITY as people report the results of
> > their testing.  However this would be a very slow process.
> 
> FIX_CAPACITY will still be necessary in cases where a bridge is known
> to have both problems, always overreporting and crashing when tested
> for overreporting.  I think these cases will be a small minority
> though.

Your naive faith in the high quality of the firmware in low-cost 
consumer electronic devices is touching, but sadly misplaced.

Besides, your initial conclusion is wrong.  FIX_CAPACITY will apply
well in cases where a bridge is known to have the overreporting bug.  
Even if the bridge doesn't crash when asked to read beyond the end of
the drive, there's no reason to do such a test if we know in advance
what the answer will be.

The only real reason for the new TEST_CAPACITY flag would be to handle
cases where some devices get the capacity wrong and others with the
same IDs get it right.  This means that initially only two quirk
entries would require the TEST_CAPACITY flag: the one for your device
and the single entry that currently uses CAPACITY_HEURISTICS.

> Now, I think that most of the existing FIX_CAPACITY cases probably
> should be changed to CAPACITY_HEURISTICS.  This will be simpler and
> quicker, though not maximally accurate by itself.

Definitely NOT!  One of the most important rules we have in kernel
development is that we do not break existing systems.  It is known that
there are devices which overreport and for which the actual number of
blocks is odd; we cannot take the chance of changing any existing
entries without positive evidence that it is safe to do so.

> In drivers/scsi/sd.c, fix_capacity always causes a decrement but
> guess_capacity guesses an even number.
> 
> So one thing to do for the Prolific bridge in unusual_devs.h is to
> use US_FL_CAPACITY_HEURISTICS instead of US_FL_FIX_CAPACITY.

Not all disks have an even number of blocks.  That heuristic really
isn't a very good one -- its only benefit is that it works okay for the
one case where it is currently used.

> I also think that if the reported capacity is a multiple of 63 then
> it is very likely to be accurate and should not be decremented.  
> Furthermore if the capacity is a multiple of 126 (i.e. even as in the
> current heuristic, and a multiple of 63) then US_FL_FIX_CAPACITY is
> almost certainly wrong.  Of course that 63 is artificial but it is
> very common and the reason is well known.

You seem to be ignoring the fact that we aren't just talking about 
USB-(S)ATA bridges.  The same driver also handles things like flash 
drives and card readers.

For example, I just plugged in my music player.  It has both an
internal flash memory and a memory card slot, and it reports their
capacities correctly.  But the flash memory has 7683072 blocks and the
memory card has 3842048 blocks; neither of these numbers is divisible
by 63.  Therefore relying on it isn't particularly safe.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                                           ` <Pine.LNX.4.44L0.1204121030050.1496-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2012-04-12 23:08                                                             ` Norman Diamond
       [not found]                                                               ` <14684.87111.qm-W9a5FxB6bg+O4BqzrDeqF0yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-12 23:08 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

Alan Stern wrote:
> On Wed, 11 Apr 2012, Norman Diamond wrote:
[Alan Stern:]
>>> It sounds like you are suggesting that we have a new quirk, something like TEST_CAPACITY.  When this quirk is present, we could attempt to read the last block when the drive (or media) is first detected, thereby determining whether the reported capacity needs to be adjusted.
>> 
>> Yes, that is what I've been suggesting for a while.  But at this moment I might have a better suggestion, discussed below.  Or it might be better to combine the two ideas.
>> 
>>> The existing FIX_CAPACITY and CAPACITY_HEURISTICS quirk entries could be changed to TEST_CAPACITY as people report the results of their testing.  However this would be a very slow process.
>> 
>> FIX_CAPACITY will still be necessary in cases where a bridge is known to have both problems, always overreporting and crashing when tested for overreporting.  I think these cases will be a small minority though.
> 
> Your naive faith in the high quality of the firmware in low-cost consumer electronic devices is touching, but sadly misplaced.

Well, I thought this particular combination of two bugs would be caught very quickly because such devices would even be unusable in Windows, but now I guess you might be right.

> Besides, your initial conclusion is wrong.  FIX_CAPACITY will apply well in cases where a bridge is known to have the overreporting bug.  Even if the bridge doesn't crash when asked to read beyond the end of the drive, there's no reason to do such a test if we know in advance what the answer will be.

Now you're the one being naive  ^_^
You THOUGHT you knew in advance that a particular bridge is known to have the overreporting but, where in fact in some secret revisions it doesn't and in some secret revisions we're not quite sure, missing a log and missing a test sample for further testing.  How can we be sure that other bridge manufacturers don't also make secret revisions?

(Even the firmware revision number that you get from a hard drive doesn't tell you which firmware revision it really was, unless you know the vendor's proprietary protocol to get it.  "Specifications subject to change without notice" says "without notice" and means "without notice" and really means it.)

> The only real reason for the new TEST_CAPACITY flag would be to handle cases where some devices get the capacity wrong and others with the same IDs get it right.  This means that initially only two quirk entries would require the TEST_CAPACITY flag: the one for your device and the single entry that currently uses CAPACITY_HEURISTICS.

Well, you already told us why the one that currently uses CAPACITY_HEURISTICS might not be suitable for converting to TEST_CAPACITY unless more testing is done to show that it won't crash  ^_^

>> Now, I think that most of the existing FIX_CAPACITY cases probably should be changed to CAPACITY_HEURISTICS.  This will be simpler and quicker, though not maximally accurate by itself.
> 
> Definitely NOT!  One of the most important rules we have in kernel development is that we do not break existing systems.  It is known that there are devices which overreport and for which the actual number of blocks is odd; we cannot take the chance of changing any existing entries without positive evidence that it is safe to do so.

OK.  Then we still need something more than the new TEST_CAPACITY flag trying to read the last reported block to see if the block exists or not.  In cases marked as FIX_CAPACITY we ought to see if an existing partition ends in the last reported block -- if it doesn't then we can truncate the drive and no partition gets truncated, but if it does then maybe we should consider changing the device's flag to TEST_CAPACITY.

> > In drivers/scsi/sd.c, fix_capacity always causes a decrement but guess_capacity guesses an even number.
>> 
>> So one thing to do for the Prolific bridge in unusual_devs.h is to use US_FL_CAPACITY_HEURISTICS instead of US_FL_FIX_CAPACITY.
> 
> Not all disks have an even number of blocks.  That heuristic really isn't a very good one -- its only benefit is that it works okay for the one case where it is currently used.

If you do mean disks, then we can improve that heuristic.  Forget about the 126 that I mentioned last time, but go with the 63 because we know why that factor is very common in drives that had physical 512 byte sectors.  For drives being made these days with physical 4096 byte sectors, obviously the number of logical 512 byte sectors is going to be even just as it is with the one device that presently has the HEURISTICS flag.

If you mean other USB devices that emulate disks, then of course there's a wider range of possibilities.  The ATA identification might assert any number of emulated sectors per emulated track, etc.  And even when the device states its correct number of LBA blocks (not having been altered by fraudsters to sell a fake high capacity device in eBay), the vendor might have preformatted it with a partition extending past the end of the device.  So yeah, I have no suggestion for devices other than actual disks being connected through USB to [S]ATA bridges.

>> I also think that if the reported capacity is a multiple of 63 then it is very likely to be accurate and should not be decremented.  Furthermore if the capacity is a multiple of 126 (i.e. even as in the current heuristic, and a multiple of 63) then US_FL_FIX_CAPACITY is almost certainly wrong.  Of course that 63 is artificial but it is very common and the reason is well known.
> 
> You seem to be ignoring the fact that we aren't just talking about USB-(S)ATA bridges.

I was but you weren't.  For other kinds of devices I have no suggestions, as mentioned above.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                                               ` <14684.87111.qm-W9a5FxB6bg+O4BqzrDeqF0yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
@ 2012-04-13  0:59                                                                 ` Alan Stern
       [not found]                                                                   ` <Pine.LNX.4.44L0.1204122044390.10558-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
  2012-04-16  6:18                                                                   ` Norman Diamond
  0 siblings, 2 replies; 56+ messages in thread
From: Alan Stern @ 2012-04-13  0:59 UTC (permalink / raw)
  To: Norman Diamond
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 3398 bytes --]

On Fri, 13 Apr 2012, Norman Diamond wrote:

> Now you're the one being naive  ^_^
> You THOUGHT you knew in advance that a particular bridge is known to
> have the overreporting but, where in fact in some secret revisions it
> doesn't and in some secret revisions we're not quite sure, missing a
> log and missing a test sample for further testing.  How can we be
> sure that other bridge manufacturers don't also make secret
> revisions?

In fact we don't know.  But that's not a good enough reason to risk 
breaking existing systems.  When we encounter bridges whose behavior 
has changed, we can update the quirk entries.

(Even that isn't as cautious as I'd like.  If the device behavior has 
changed then maybe the old devices won't handle reading beyond the end 
of the drive.  But I can't think of anything safer.)

> OK.  Then we still need something more than the new TEST_CAPACITY
> flag trying to read the last reported block to see if the block
> exists or not.  In cases marked as FIX_CAPACITY we ought to see if an
> existing partition ends in the last reported block -- if it doesn't
> then we can truncate the drive and no partition gets truncated, but
> if it does then maybe we should consider changing the device's flag
> to TEST_CAPACITY.

This is getting too complicated.  Not all storage devices have
partition tables.  Not all partition tables use the conventional DOS
format.  And by the time the partition-table parsing code runs, it may
be too late to change the recorded capacity -- I'm not sure about that.

> > Not all disks have an even number of blocks.  That heuristic really
> > isn't a very good one -- its only benefit is that it works okay for
> > the one case where it is currently used.
> 
> If you do mean disks, then we can improve that heuristic.  Forget
> about the 126 that I mentioned last time, but go with the 63 because
> we know why that factor is very common in drives that had physical
> 512 byte sectors.  For drives being made these days with physical
> 4096 byte sectors, obviously the number of logical 512 byte sectors
> is going to be even just as it is with the one device that presently
> has the HEURISTICS flag.

Don't modern disks have some arbitrary numbers of blocks reserved by
the manufacturer?  I forget the acronym for this, but it seems
reasonable that it could cause the capacity not to be a multiple of 63.

> If you mean other USB devices that emulate disks, then of course
> there's a wider range of possibilities.  The ATA identification might
> assert any number of emulated sectors per emulated track, etc.  And
> even when the device states its correct number of LBA blocks (not
> having been altered by fraudsters to sell a fake high capacity device
> in eBay), the vendor might have preformatted it with a partition
> extending past the end of the device.  So yeah, I have no suggestion
> for devices other than actual disks being connected through USB to
> [S]ATA bridges.

The problem is that we don't always know which devices are USB-(S)ATA
bridges and which aren't.  The quirk entries may not record that
information.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                                                   ` <Pine.LNX.4.44L0.1204122044390.10558-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2012-04-16  2:13                                                                     ` Norman Diamond
       [not found]                                                                       ` <344714.25777.qm-W9a5FxB6bg85iCj6gykswkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-16  2:13 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

Alan Stern wrote:
> On Fri, 13 Apr 2012, Norman Diamond wrote:
>> You THOUGHT you knew in advance that a particular bridge is known to have the overreporting but, where in fact in some secret revisions it doesn't and in some secret revisions we're not quite sure, missing a log and missing a test sample for further testing.  How can we be sure that other bridge manufacturers don't also make secret revisions?
> 
> In fact we don't know.  But that's not a good enough reason to risk breaking existing systems.  When we encounter bridges whose behavior has changed, we can update the quirk entries.

That's not a good enough reason to cause known breakage in newer existing systems, but I agree that updating the quirk entries helps solve it.

> (Even that isn't as cautious as I'd like.  If the device behavior has changed then maybe the old devices won't handle reading beyond the end of the drive.  But I can't think of anything safer.)

Well, if the reported capacity isn't a multiple of 63 and if no existing partition includes the last reported block then it seems comparatively safe to decrement the reported size, but as you pointed out, we can't really be sure what the existing partitions are (non-DOS tables etc.).  But a multiple of 63 still seems like a relatively safe heuristic, comparatively speaking.  But not always, as you pointed out, and as I'll detail below.

>>> Not all disks have an even number of blocks.  That heuristic really isn't a very good one -- its only benefit is that it works okay for the one case where it is currently used.
>> 
>> If you do mean disks, then we can improve that heuristic.  Forget about the 126 that I mentioned last time, but go with the 63 because we know why that factor is very common in drives that had physical 512 byte sectors.  For drives being made these days with physical 4096 byte sectors, obviously the number of logical 512 byte sectors is going to be even just as it is with the one device that presently has the HEURISTICS flag.
> 
> Don't modern disks have some arbitrary numbers of blocks reserved by the manufacturer?

Of course, for relocations of bad blocks and for some other purposes too.  They don't have LBAs.  They aren't included in the reported capacity.  They aren't relevant to this discussion.

(I assume that my drive with bad blocks has already used all of its blocks that had been reserved for relocations.)

> I forget the acronym for this, but it seems reasonable that it could cause the capacity not to be a multiple of 63.

No need to worry about that  ^_^

I have a drive made in 1992, with no currently observed bad blocks, with the following identifications:
C*H*S = 1579*16*63 = 1591632
LBA capacity = 1592568
(Today I only have to manhandle a fragile SATA-to-PATA adapter, plus eSATA-to-SATA cable and SATA power supply, to get genuine ATA identifications.)

So yes indeed the capacity might not be a multiple of 63.  63 is very common for obvious reasons, but not universal.  Also of course 63 isn't likely on current drives with 4096 byte physical sectors, which emulate a capacity in 512 byte sectors that will obviously be a multiple of 8.  But in all of these cases the current heuristic for even numbers still succeeds.  So respecting a report of a multiple of 63, and if it isn't a multiple of 63 then falling back to respecting a report of a multiple of 2, seems like a good bet for doing a test read of the last reported sector.

>> If you mean other USB devices that emulate disks, then of course there's a wider range of possibilities. [...]  So yeah, I have no suggestion for devices other than actual disks being connected through USB to [S]ATA bridges.
> 
> The problem is that we don't always know which devices are USB-(S)ATA bridges and which aren't.  The quirk entries may not record that information.

usb.ids records a bunch of them.  Though of course that's not an "always".
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-13  0:59                                                                 ` Alan Stern
       [not found]                                                                   ` <Pine.LNX.4.44L0.1204122044390.10558-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2012-04-16  6:18                                                                   ` Norman Diamond
  1 sibling, 0 replies; 56+ messages in thread
From: Norman Diamond @ 2012-04-16  6:18 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Today the hard drive is connected through eSATA with a SATA-PATA adapter.  ATA commands work.  As always, LBA 551562 has uncorrectable read errors.

echo 0>/sys/block/sdc/queue/read_ahead_kb
has been done.  sg_dd behaves.  dd should try to read 8 blocks at a time to match the memory controller's page size, right?  But it doesn't -- it tries to read 32 blocks at a time.

dd if=/dev/sdc of=/dev/null bs=512 count=8 skip=551540
tried to read 32 blocks (0x20) starting at LBA 551544 (0x0086a78).  I don't know how many earlier blocks it read too, but earlier blocks had no problem.  On stdout it reported 8 blocks successfully copied.  But it took a long time getting there, because readahead tried to include the bad block.  dmesg says there was an error in sector 551544.  Libata used a command 0xc8 (READ DMA), starting LBA 0x0086a78 and detected an uncorrectable error in LBA 0x0000007, which is impossible because it isn't in the range of LBAs being read.  Then the SCSI layer has the last 8 bytes of sense data (command specific information = LBA) as 0x0000000000000006, maybe because libata did a decrement that it shouldn't do.  But, just to add to the confusion, libata aborted the command after a timeout of 120 seconds
  instead of getting the drive's report... (now maybe this means that the hanging USB bridge of previous weeks was waiting for a hanged drive).

sg_dd gets an acceptable report from the drive, UNC + IDNF + obsolete error bits, in LBA 0x0086a8a.  dmesg doesn't show any logs at the SCSI layer from that one.

As an experiment, I tried:
echo 4>/sys/block/sdc/queue/read_ahead_kb
but dd still tried to readahead 32 blocks instead of 8, again starting at 551544.

Another experiment:
dd if=/dev/sdc of=/dev/null bs=512 count=8 skip=551544
might or might have tried to do readahead, but if it did, it did less than the previous test because it didn't reach the bad block.  No delay and no logs.  So why is dd better behaved sometimes than other times?

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                                                       ` <344714.25777.qm-W9a5FxB6bg85iCj6gykswkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
@ 2012-04-16 15:06                                                                         ` Alan Stern
  2012-04-16 22:41                                                                           ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-16 15:06 UTC (permalink / raw)
  To: Norman Diamond
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 1972 bytes --]

On Mon, 16 Apr 2012, Norman Diamond wrote:

> Alan Stern wrote:
> > On Fri, 13 Apr 2012, Norman Diamond wrote:
> >> You THOUGHT you knew in advance that a particular bridge is known
> >> to have the overreporting but, where in fact in some secret
> >> revisions it doesn't and in some secret revisions we're not quite
> >> sure, missing a log and missing a test sample for further
> >> testing.  How can we be sure that other bridge manufacturers don't
> >> also make secret revisions?
> > 
> > In fact we don't know.  But that's not a good enough reason to risk
> > breaking existing systems.  When we encounter bridges whose
> > behavior has changed, we can update the quirk entries.
> 
> That's not a good enough reason to cause known breakage in newer
> existing systems, but I agree that updating the quirk entries helps
> solve it.
> 
> > (Even that isn't as cautious as I'd like.  If the device behavior
> > has changed then maybe the old devices won't handle reading beyond
> > the end of the drive.  But I can't think of anything safer.)
> 
> Well, if the reported capacity isn't a multiple of 63 and if no
> existing partition includes the last reported block then it seems
> comparatively safe to decrement the reported size, but as you pointed
> out, we can't really be sure what the existing partitions are
> (non-DOS tables etc.).  But a multiple of 63 still seems like a
> relatively safe heuristic, comparatively speaking.  But not always,
> as you pointed out, and as I'll detail below.

At this point I'm not sure what you want to do.  Would you like the 
quirks entry for your bridge changed to CAPACITY_HEURISTICS instead of 
FIX_CAPACITY?  That's the easiest thing to do quickly.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-16 15:06                                                                         ` Alan Stern
@ 2012-04-16 22:41                                                                           ` Norman Diamond
  2012-04-17 15:19                                                                             ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-16 22:41 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Alan Stern wrote:
> On Mon, 16 Apr 2012, Norman Diamond wrote:
>> Alan Stern wrote:
>>> On Fri, 13 Apr 2012, Norman Diamond wrote:
>>>> You THOUGHT you knew in advance that a particular bridge is known to have the overreporting but, where in fact in some secret revisions it doesn't and in some secret revisions we're not quite sure, missing a log and missing a test sample for further testing.  How can we be sure that other bridge manufacturers don't also make secret revisions?
>>> 
>>> In fact we don't know.  But that's not a good enough reason to risk breaking existing systems.  When we encounter bridges whose behavior has changed, we can update the quirk entries.
>> 
>> That's not a good enough reason to cause known breakage in newer existing systems, but I agree that updating the quirk entries helps solve it.
>> 
>>> (Even that isn't as cautious as I'd like.  If the device behavior has changed then maybe the old devices won't handle reading beyond the end of the drive.  But I can't think of anything safer.)
>> 
>> Well, if the reported capacity isn't a multiple of 63 and if no existing partition includes the last reported block then it seems comparatively safe to decrement the reported size, but as you pointed out, we can't really be sure what the existing partitions are (non-DOS tables etc.).  But a multiple of 63 still seems like a relatively safe heuristic, comparatively speaking.  But not always, as you pointed out, and as I'll detail below.
> 
> At this point I'm not sure what you want to do.  Would you like the quirks entry for your bridge changed to CAPACITY_HEURISTICS instead of FIX_CAPACITY?  That's the easiest thing to do quickly.

Come on, the purpose of our discussion should be to figure out what is best to do, not what I want.  I agree that an easy quick change looks like it will help a bit, but we should still figure out the best change too.

Yes it does look like changing this bridge to CAPACITY_HEURISTICS from FIX_CAPACITY is likely to help a bit.

I think that heuristics should also accept multiples of 63 even if the total is odd.  This doesn't solve everything but will probably help more.

I think that handling of FIX_CAPACITY should check for multiples of 63 and report the apparent likelihood that FIX_CAPACITY probably wasn't the right setting for the bridge (if it's a bridge).  This doesn't solve everything but will probably help more.

The addition of TEST_CAPACITY doesn't solve everything but will probably help more.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-16 22:41                                                                           ` Norman Diamond
@ 2012-04-17 15:19                                                                             ` Alan Stern
  2012-04-17 22:54                                                                               ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-17 15:19 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

On Tue, 17 Apr 2012, Norman Diamond wrote:

> Yes it does look like changing this bridge to CAPACITY_HEURISTICS
> from FIX_CAPACITY is likely to help a bit.

That's easy enough.

> I think that heuristics should also accept multiples of 63 even if
> the total is odd.  This doesn't solve everything but will probably
> help more.

Okay, if nobody objects.

> I think that handling of FIX_CAPACITY should check for multiples of
> 63 and report the apparent likelihood that FIX_CAPACITY probably
> wasn't the right setting for the bridge (if it's a bridge).  This
> doesn't solve everything but will probably help more.

The FIX_CAPACITY code runs in a different module.  It has no way to 
know whether the device is a bridge or not.

> The addition of TEST_CAPACITY doesn't solve everything but will
> probably help more.

That will require a certain amount of work, with the possibility of 
breaking some systems.  I'd rather not do it if there's no clear and 
pressing need.

Alan Stern


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-17 15:19                                                                             ` Alan Stern
@ 2012-04-17 22:54                                                                               ` Norman Diamond
  2012-04-25 15:34                                                                                 ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-17 22:54 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Alan Stern wrote:
> On Tue, 17 Apr 2012, Norman Diamond wrote:
>> Yes it does look like changing this bridge to CAPACITY_HEURISTICS from FIX_CAPACITY is likely to help a bit.
> 
> That's easy enough.

Yeah I know, even I could do that one  ^_^

>> I think that heuristics should also accept multiples of 63 even if the total is odd.  This doesn't solve everything but will probably help more.
> 
> Okay, if nobody objects.

I'm nobody and I don't object  ^_^
(Of course we have to wait to see if anyone knows a real reason that this would be a problem.)

>> I think that handling of FIX_CAPACITY should check for multiples of 63 and report the apparent likelihood that FIX_CAPACITY probably wasn't the right setting for the bridge (if it's a bridge).  This doesn't solve everything but will probably help more.
> 
> The FIX_CAPACITY code runs in a different module.  It has no way to know whether the device is a bridge or not.

The quirks table could be made available, but values stored in the table don't say if the device is a bridge.  OK, then I still think this:  I think that handling of FIX_CAPACITY should check for multiples of 63 and report the apparent likelihood that FIX_CAPACITY probably wasn't the right setting for the device.

In addition, I have a feeling that if a device has FIX_CAPACITY but the number of reported blocks is even then I doubt the accuracy of FIX_CAPACITY.  The reason is that flash memory devices tend to have physical sectors that are even multiples of logical sectors.

I do think the handling of FIX_CAPACITY should report when devices report capacities that are either multiples of 63 or 2 (or both), so that further testing can be done.  The existing code to do the decrement anyway can remain the same until further testing is done.

>> The addition of TEST_CAPACITY doesn't solve everything but will probably help more.
> 
> That will require a certain amount of work, with the possibility of breaking some systems.  I'd rather not do it if there's no clear and pressing need.

Two indistinguishable versions of the Prolific bridge show that there is a need.  One version needs the decrement (probably) and the other version doesn't (definitely).
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-17 22:54                                                                               ` Norman Diamond
@ 2012-04-25 15:34                                                                                 ` Alan Stern
  2012-04-25 23:44                                                                                   ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-25 15:34 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 6160 bytes --]

On Wed, 18 Apr 2012, Norman Diamond wrote:

> Alan Stern wrote:
> > On Tue, 17 Apr 2012, Norman Diamond wrote:
> >> Yes it does look like changing this bridge to CAPACITY_HEURISTICS from FIX_CAPACITY is likely to help a bit.
> > 
> > That's easy enough.
> 
> Yeah I know, even I could do that one  ^_^
> 
> >> I think that heuristics should also accept multiples of 63 even if the total is odd.  This doesn't solve everything but will probably help more.
> > 
> > Okay, if nobody objects.
> 
> I'm nobody and I don't object  ^_^
> (Of course we have to wait to see if anyone knows a real reason that this would be a problem.)
> 
> >> I think that handling of FIX_CAPACITY should check for multiples of 63 and report the apparent likelihood that FIX_CAPACITY probably wasn't the right setting for the bridge (if it's a bridge).  This doesn't solve everything but will probably help more.
> > 
> > The FIX_CAPACITY code runs in a different module.  It has no way to know whether the device is a bridge or not.
> 
> The quirks table could be made available, but values stored in the
> table don't say if the device is a bridge.  OK, then I still think
> this:  I think that handling of FIX_CAPACITY should check for
> multiples of 63 and report the apparent likelihood that FIX_CAPACITY
> probably wasn't the right setting for the device.
> 
> In addition, I have a feeling that if a device has FIX_CAPACITY but
> the number of reported blocks is even then I doubt the accuracy of
> FIX_CAPACITY.  The reason is that flash memory devices tend to have
> physical sectors that are even multiples of logical sectors.

FIX_CAPACITY applies to all kinds of devices, not just those using
flash memory.  There have been examples posted in the archives of
devices which really do have an odd number of blocks.  (I don't
remember whether any of these devices needs the FIX_CAPACITY flag,
though.)

> I do think the handling of FIX_CAPACITY should report when devices
> report capacities that are either multiples of 63 or 2 (or both), so
> that further testing can be done.  The existing code to do the
> decrement anyway can remain the same until further testing is done.
> 
> >> The addition of TEST_CAPACITY doesn't solve everything but will probably help more.
> > 
> > That will require a certain amount of work, with the possibility of breaking some systems.  I'd rather not do it if there's no clear and pressing need.
> 
> Two indistinguishable versions of the Prolific bridge show that there
> is a need.  One version needs the decrement (probably) and the other
> version doesn't (definitely).

No, the two indistinguishable versions show there is a need to change 
the existing FIX_CAPACITY flag to CAPACITY_HEURISTICS.

Below are two patches that do pretty much what you are asking for.  
Please test just the first and then both together.

Alan Stern


Patch #1: Change the logic for CAPACITY_HEURISTICS to look for total 
sizes that are divisible by 63, and log a message if FIX_CAPACITY ends 
up decrementing a size that is already divisible by 63.

Index: usb-3.4/drivers/scsi/sd.c
===================================================================
--- usb-3.4.orig/drivers/scsi/sd.c
+++ usb-3.4/drivers/scsi/sd.c
@@ -51,6 +51,7 @@
 #include <linux/async.h>
 #include <linux/slab.h>
 #include <linux/pm_runtime.h>
+#include <linux/math64.h>
 #include <asm/uaccess.h>
 #include <asm/unaligned.h>
 
@@ -1914,6 +1915,7 @@ sd_read_capacity(struct scsi_disk *sdkp,
 	int sector_size;
 	struct scsi_device *sdp = sdkp->device;
 	sector_t old_capacity = sdkp->capacity;
+	u32 n;
 
 	if (sd_try_rc16_first(sdp)) {
 		sector_size = read_capacity_16(sdkp, sdp, buffer);
@@ -1954,14 +1956,18 @@ sd_read_capacity(struct scsi_disk *sdkp,
 	 *
 	 * If we know the reported capacity is wrong, decrement it.  If
 	 * we can only guess, then assume the number of blocks is even
-	 * (usually true but not always) and err on the side of lowering
-	 * the capacity.
+	 * (usually true but not always) or divisible by 63 (the usual
+	 * number of sectors per track reported by ATA drives), and err
+	 * on the side of lowering the capacity.
 	 */
+	div_u64_rem(sdkp->capacity, 2 * 63, &n);
 	if (sdp->fix_capacity ||
-	    (sdp->guess_capacity && (sdkp->capacity & 0x01))) {
+	    (sdp->guess_capacity && (n % 2 == 1 || n % 63 == 1))) {
 		sd_printk(KERN_INFO, sdkp, "Adjusting the sector count "
 				"from its reported value: %llu\n",
 				(unsigned long long) sdkp->capacity);
+		if (n % 63 == 0)
+			sd_printk(KERN_INFO, sdkp, "(This adjustment may be incorrect)\n");
 		--sdkp->capacity;
 	}
 


Patch #2: Change the unusual_devs entry for the Prolific USB-(S)ATA 
bridge; replace FIX_CAPACITY with CAPACITY_HEURISTICS.

Index: usb-3.4/drivers/usb/storage/unusual_devs.h
===================================================================
--- usb-3.4.orig/drivers/usb/storage/unusual_devs.h
+++ usb-3.4/drivers/usb/storage/unusual_devs.h
@@ -839,14 +839,16 @@ UNUSUAL_DEV( 0x067b, 0x2317, 0x0001, 0x0
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_NOT_LOCKABLE ),
 
-/* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */
-/* Change to bcdDeviceMin (0x0100 to 0x0001) reported by
- * Thomas Bartosik <tbartdev@gmx-topmail.de> */
+/* Reported by Richard -=[]=- <micro_flyer@hotmail.com>
+ * Change to bcdDeviceMin (0x0100 to 0x0001) reported by
+ * Thomas Bartosik <tbartdev@gmx-topmail.de>
+ * Change to US_FL_CAPACITY_HEURISTICS reported by
+ * Norman Diamond <n0diamond@yahoo.co.jp> */
 UNUSUAL_DEV( 0x067b, 0x2507, 0x0001, 0x0100,
 		"Prolific Technology Inc.",
 		"Mass Storage Device",
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
-		US_FL_FIX_CAPACITY | US_FL_GO_SLOW ),
+		US_FL_CAPACITY_HEURISTICS | US_FL_GO_SLOW ),
 
 /* Reported by Alex Butcher <alex.butcher@assursys.co.uk> */
 UNUSUAL_DEV( 0x067b, 0x3507, 0x0001, 0x0101,

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-25 15:34                                                                                 ` Alan Stern
@ 2012-04-25 23:44                                                                                   ` Norman Diamond
  2012-04-26 15:03                                                                                     ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-25 23:44 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Alan Stern wrote:
> On Wed, 18 Apr 2012, Norman Diamond wrote:
>> Alan Stern wrote:
>>> On Tue, 17 Apr 2012, Norman Diamond wrote:
>>>> Yes it does look like changing this bridge to CAPACITY_HEURISTICS from FIX_CAPACITY is likely to help a bit.
>>> 
>>> That's easy enough.
>> 
>> Yeah I know, even I could do that one  ^_^
>> 
>>>> I think that heuristics should also accept multiples of 63 even if the total is odd.  This doesn't solve everything but will probably help more.
>>> 
>>> Okay, if nobody objects.
>> 
>> I'm nobody and I don't object  ^_^
>> (Of course we have to wait to see if anyone knows a real reason that this would be a problem.)
>> 
>>>> I think that handling of FIX_CAPACITY should check for multiples of 63 and report the apparent likelihood that FIX_CAPACITY probably wasn't the right setting for the bridge (if it's a bridge).  This doesn't solve everything but will probably help more.
>>> 
>>> The FIX_CAPACITY code runs in a different module.  It has no way to know whether the device is a bridge or not.
>> 
>> The quirks table could be made available, but values stored in the table don't say if the device is a bridge.  OK, then I still think this:  I think that handling of FIX_CAPACITY should check for multiples of 63 and report the apparent likelihood that FIX_CAPACITY probably wasn't the right setting for the device.
>> 
>> In addition, I have a feeling that if a device has FIX_CAPACITY but the number of reported blocks is even then I doubt the accuracy of FIX_CAPACITY.  The reason is that flash memory devices tend to have physical sectors that are even multiples of logical sectors.
> 
> FIX_CAPACITY applies to all kinds of devices, not just those using flash memory.  There have been examples posted in the archives of devices which really do have an odd number of blocks.  (I don't remember whether any of these devices needs the FIX_CAPACITY flag, though.)

Actually I now recall jumpering a hard drive in or around 1998.  When the drive reported its full capacity, the PC's BIOS hanged and would not boot.  I jumpered the drive to report 15 heads instead of 16, reducing the capacity of the drive so that the PC's BIOS would boot.  I don't recall the number of reported cylinders, but if that was also odd then the total number of reported blocks would be odd.

If the drive were connected to a USB cable then jumpering would not be necessary.  However, if the drive already contained data and we wanted to use a USB cable to retrieve the data, then the jumper would have to remain in place.

I no longer have that drive, but I'm going to report a bug later in this message.

>> I do think the handling of FIX_CAPACITY should report when devices report capacities that are either multiples of 63 or 2 (or both), so that further testing can be done.  The existing code to do the decrement anyway can remain the same until further testing is done.
>> 
>>>> The addition of TEST_CAPACITY doesn't solve everything but will probably help more.
>>> 
>>> That will require a certain amount of work, with the possibility of breaking some systems.  I'd rather not do it if there's no clear and pressing need.
>> 
>> Two indistinguishable versions of the Prolific bridge show that there is a need.  One version needs the decrement (probably) and the other version doesn't (definitely).
> 
> No, the two indistinguishable versions show there is a need to change the existing FIX_CAPACITY flag to CAPACITY_HEURISTICS.

OK, the new code for heuristics makes it PROBABLY good enough to change the Prolific bridge from FIX_CAPACITY to CAPACITY_HEURISTICS.

> Below are two patches that do pretty much what you are asking for.  Please test just the first and then both together.

Ouch.  Yeah I should expect it to be my responsibility to test, but rebuilding the live Linux system that I use is particularly painful.  (Of course I have to be grateful that it is even possible in the first place, regardless of being painful.)

Would it be acceptable for me to donate my USB-to-ATA cable to you?

> +        (sdp->guess_capacity && (n % 2 == 1 || n % 63 == 1))) {

Imagine a device with 63 blocks.  guess_capacity is true and n % 2 == 1 so this is going to truncate when we don't want to.

How is one of these, either in my style:
(sdp->guess_capacity && (n % 2 != 0) && (n % 63 != 0))) {

or a popular coding style:
(sdp->guess_capacity && n % 2 n % 63)) {

> +            sd_printk(KERN_INFO, sdkp, "(This adjustment may be incorrect)\n");

I'd like to suggest:
"(This adjustment may be incorrect.  If this adjustment truncates your drive when it should not, please report the error and your device's details to linux-usb@vger.kernel.org)"
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-25 23:44                                                                                   ` Norman Diamond
@ 2012-04-26 15:03                                                                                     ` Alan Stern
       [not found]                                                                                       ` <Pine.LNX.4.44L0.1204261026260.1530-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-26 15:03 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

On Thu, 26 Apr 2012, Norman Diamond wrote:

> OK, the new code for heuristics makes it PROBABLY good enough to
> change the Prolific bridge from FIX_CAPACITY to CAPACITY_HEURISTICS.
> 
> > Below are two patches that do pretty much what you are asking for.  
> > Please test just the first and then both together.
> 
> Ouch.  Yeah I should expect it to be my responsibility to test, but
> rebuilding the live Linux system that I use is particularly painful.  
> (Of course I have to be grateful that it is even possible in the
> first place, regardless of being painful.)
> 
> Would it be acceptable for me to donate my USB-to-ATA cable to you?

Let's just not worry about it.  It seems pretty clear that the patches 
will fix your immediate problem.

> > +        (sdp->guess_capacity && (n % 2 == 1 || n % 63 == 1))) {
> 
> Imagine a device with 63 blocks.  guess_capacity is true and n % 2 ==
> 1 so this is going to truncate when we don't want to.

Yes.  As the comment at the start of this code says, we err on the side 
of truncating.  Besides, that's what the current algorithm does.

> How is one of these, either in my style:
> (sdp->guess_capacity && (n % 2 != 0) && (n % 63 != 0))) {
> 
> or a popular coding style:
> (sdp->guess_capacity && n % 2 n % 63)) {

(I have no idea what "popular coding style" that might be -- it
contains a syntax error!)

What about a device that has 6362 sectors but reports 6363?  Then your 
test would fail to decrement the value when we do want to.

Anyway, why do you want to test for n % 63 != 0?  You have no
justification for decrementing the block count if the result would
not be divisible by 63.

(Interestingly, I just found an email thread that appears to be the 
origin of the CAPACITY_HEURISTICS flag:

	http://marc.info/?l=linux-usb-devel&m=117025868105192&w=2

Among other things, it suggests testing for divisibility by 255 * 63 
instead of by 63, which ought to help reduce the number of errors.

(Also, it turns out that this flag is used with more than one type of 
device.  It gets turned on automatically for virtually every device 
made by Nokia, Nikon, Pentax, or Motorola.  Apparently the capacity 
bug was very common in firmwares used by camera and cell phone makers.)

> > +            sd_printk(KERN_INFO, sdkp, "(This adjustment may be incorrect)\n");
> 
> I'd like to suggest:
> "(This adjustment may be incorrect.  If this adjustment truncates
> your drive when it should not, please report the error and your
> device's details to linux-usb@vger.kernel.org)"

Okay, I'll change the message.

Bear in mind that if anybody reports a problem caused by the new
"divisible by 63" criterion, we will have to revert the changed test
(the updated message could remain, since it doesn't affect
functionality).

Alan Stern


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found]                                                                                       ` <Pine.LNX.4.44L0.1204261026260.1530-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2012-04-26 23:13                                                                                         ` Norman Diamond
  2012-04-27 14:51                                                                                           ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-26 23:13 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

Alan Stern wrote:
> On Thu, 26 Apr 2012, Norman Diamond wrote:
> 
>> OK, the new code for heuristics makes it PROBABLY good enough to
>> change the Prolific bridge from FIX_CAPACITY to CAPACITY_HEURISTICS.
>> 
>>> Below are two patches that do pretty much what you are asking for.  
>>> Please test just the first and then both together.
>> 
>> Ouch.  Yeah I should expect it to be my responsibility to test, but
>> rebuilding the live Linux system that I use is particularly painful.  
>> (Of course I have to be grateful that it is even possible in the
>> first place, regardless of being painful.)
>> 
>> Would it be acceptable for me to donate my USB-to-ATA cable to you?
> 
> Let's just not worry about it.  It seems pretty clear that the patches 
> will fix your immediate problem.

Only partly, because an odd multiple of 63 is possible.

>>> +        (sdp->guess_capacity && (n % 2 == 1 || n % 63 == 1))) {
>> 
>> Imagine a device with 63 blocks.  guess_capacity is true and n % 2 ==
>> 1 so this is going to truncate when we don't want to.
> 
> Yes.  As the comment at the start of this code says, we err on the side 
> of truncating.  Besides, that's what the current algorithm does.
> 
>> How is one of these, either in my style:
>> (sdp->guess_capacity && (n % 2 != 0) && (n % 63 != 0))) {
>> 
>> or a popular coding style:
>> (sdp->guess_capacity && n % 2 n % 63)) {
> 
> (I have no idea what "popular coding style" that might be -- it
> contains a syntax error!)

I lost an && in editing.  But it seems to be popular to omit redundant parentheses and to omit extra operations such as "!= 0" when, as in this case, they don't affect the result.  Both of these kinds of redundancies only assist readability for a subset of human readers, not for compilers.

(sdp->guess_capacity && n % 2 && n % 63)) {

Anyway, the version with my coding style showed what I suggest and why.

> What about a device that has 6362 sectors but reports 6363?  Then your 
> test would fail to decrement the value when we do want to.

But we can't distinguish two versions of the device, one where 6363 is correct and one where 6363 is wrong.  I prefer to take the device's word for it unless we know for sure that it is wrong.  TEST_CAPACITY would still be a good idea.  FIX_CAPACITY (where we know for sure that the device is wrong) will not suffer from this ambiguity and will always get a decrement.

> Anyway, why do you want to test for n % 63 != 0?  You have no
> justification for decrementing the block count if the result would
> not be divisible by 63.

I sure do.  You know as well as I do that for decades a lot of ATA disks reported capacities that were multiples of 63 and they had a reason for it.

> (Interestingly, I just found an email thread that appears to be the 
> origin of the CAPACITY_HEURISTICS flag:
>     http://marc.info/?l=linux-usb-devel&m=117025868105192&w=2
> Among other things, it suggests testing for divisibility by 255 * 63 
> instead of by 63, which ought to help reduce the number of errors.

A few weeks ago I also had the idea of testing divisibility by 255 * 63, but very quickly disproved this idea.  I still have a lot of drives that report multiples of 63 for the obvious reason, but they are not multiples of 255 * 63.  BIOSes, and software that has to provide some amount of interoperability with BIOSes, do geometry translation to get a multiple of 255 * 63, and then they don't use the entire drive.

> Bear in mind that if anybody reports a problem caused by the new
> "divisible by 63" criterion, we will have to revert the changed test
> (the updated message could remain, since it doesn't affect
> functionality).

Mostly I agree.  But if reversion causes a different known problem to be reinstated, then TEST_CAPACITY is really needed.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-26 23:13                                                                                         ` Norman Diamond
@ 2012-04-27 14:51                                                                                           ` Alan Stern
  2012-04-28  0:59                                                                                             ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-27 14:51 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 3304 bytes --]

On Fri, 27 Apr 2012, Norman Diamond wrote:

> > Let's just not worry about it.  It seems pretty clear that the patches 
> > will fix your immediate problem.
> 
> Only partly, because an odd multiple of 63 is possible.

Look, I didn't say the changes would help with every possible disk.  
Just that they would fix your immediate problem, i.e., the problem with
your current disk.

> > What about a device that has 6362 sectors but reports 6363?  Then your 
> > test would fail to decrement the value when we do want to.
> 
> But we can't distinguish two versions of the device, one where 6363
> is correct and one where 6363 is wrong.  I prefer to take the
> device's word for it unless we know for sure that it is wrong.  
> TEST_CAPACITY would still be a good idea.  FIX_CAPACITY (where we
> know for sure that the device is wrong) will not suffer from this
> ambiguity and will always get a decrement.

That's the whole point of CAPACITY_HEURISTICS -- we have two versions 
of the device, of which one is buggy and the other isn't, and we can't 
tell them apart.  If we preferred to take the device's word for it 
whenever we didn't know for sure, there would be no need for 
CAPACITY_HEURISTICS at all.

For example, consider all those cameras sold by Nikon, Pentax, and so
on.  They probably all used Symbian's firmware, which some years ago  
had the capacity bug.  Maybe the firmware has been fixed since then; I
don't know.  But under the reasonable assumption that the
SD/CF/whatever memories used in these cameras will always have an even 
number of blocks, the existing CAPACITY_HEURISTICS solution is 
appropriate.

> > Anyway, why do you want to test for n % 63 != 0?  You have no
> > justification for decrementing the block count if the result would
> > not be divisible by 63.
> 
> I sure do.  You know as well as I do that for decades a lot of ATA
> disks reported capacities that were multiples of 63 and they had a
> reason for it.

?  That makes no sense.  Go back and reread what I wrote.  In 
particular, I was asking why you changed the test from (n % 63 == 1) to 
(n % 63 != 0).

You know that for decades, ATA disks have reported capacities that were
multiples of 63.  So if a drive reports a capacity that is 5 larger
than a multiple of 63, why would you want to decrement the value?  The
result still would not be a multiple of 63.  Didn't you say that you 
preferred to take the device's word for it?

> > Bear in mind that if anybody reports a problem caused by the new
> > "divisible by 63" criterion, we will have to revert the changed test
> > (the updated message could remain, since it doesn't affect
> > functionality).
> 
> Mostly I agree.  But if reversion causes a different known problem to
> be reinstated, then TEST_CAPACITY is really needed.

The same caveat applies to TEST_CAPACITY.

Also, the amount of effort required to write the TEST_CAPACITY code and 
get it accepted into the kernel would be non-trivial.  I prefer not to 
do it unless it turns out to be clearly necessary.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-27 14:51                                                                                           ` Alan Stern
@ 2012-04-28  0:59                                                                                             ` Norman Diamond
  2012-04-29 15:15                                                                                               ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-28  0:59 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Alan Stern wrote:
> On Fri, 27 Apr 2012, Norman Diamond wrote:
>>> Let's just not worry about it.  It seems pretty clear that the patches 
>>> will fix your immediate problem.
>> 
>> Only partly, because an odd multiple of 63 is possible.
> 
> Look, I didn't say the changes would help with every possible disk.  
> Just that they would fix your immediate problem, i.e., the problem with
> your current disk.

"Look" ...
We already found a workaround for what you thought was my immediate problem, one of the bridges that can test with and one of the disks that I can test with.  A kernel boot parameter can remove all quirks flags for the Prolific bridge.

That is not a fix for what really is my immediate problem, which is that my users can have any kind of bridge and any kind of disk, and in an emergency I can tell them to add a kernel boot parameter, or see if they can use a different bridge, etc., but it's really better if we can avoid such emergencies.

>>> What about a device that has 6362 sectors but reports 6363?  Then your 
>>> test would fail to decrement the value when we do want to.
>> 
>> But we can't distinguish two versions of the device, one where 6363
>> is correct and one where 6363 is wrong.  I prefer to take the
>> device's word for it unless we know for sure that it is wrong.  
>> TEST_CAPACITY would still be a good idea.  FIX_CAPACITY (where we
>> know for sure that the device is wrong) will not suffer from this
>> ambiguity and will always get a decrement.
> 
> That's the whole point of CAPACITY_HEURISTICS -- we have two versions 
> of the device, of which one is buggy and the other isn't, and we can't 
> tell them apart.  If we preferred to take the device's word for it 
> whenever we didn't know for sure, there would be no need for 
> CAPACITY_HEURISTICS at all.

A preference for taking the device's word (in cases where we don't have a more reliable heuristic) is different from always taking the device's word (in all cases even when we have a more reliable heuristic).  CAPACITY_HEURISTICS will remain meaningful and will become more meaningful.

> For example, consider all those cameras sold by Nikon, Pentax, and so
> on.  They probably all used Symbian's firmware, which some years ago  
> had the capacity bug.  Maybe the firmware has been fixed since then; I
> don't know.  But under the reasonable assumption that the
> SD/CF/whatever memories used in these cameras will always have an even 
> number of blocks, the existing CAPACITY_HEURISTICS solution is 
> appropriate.

If you think that a revised CAPACITY_HEURISTICS incorporating my suggestion will become less appropriate than the existing CAPACITY_HEURISTICS then we need two separate heuristics, one for Symbian and similar, one for Prolific and similar.  And we even more surely do need TEST_CAPACITY.

>>> Anyway, why do you want to test for n % 63 != 0?  You have no
>>> justification for decrementing the block count if the result would
>>> not be divisible by 63.
>> 
>> I sure do.  You know as well as I do that for decades a lot of ATA
>> disks reported capacities that were multiples of 63 and they had a
>> reason for it.
> 
> ?  That makes no sense.  Go back and reread what I wrote.  In 
> particular, I was asking why you changed the test from (n % 63 == 1) to 
> (n % 63 != 0).

My change was bigger than that.  Where you had ||, I had &&, though in one of my two codings I accidentally deleted one of the &&s.

6363 is an example.  Your code would cut it to 6362.  I think it should stay 6363, because for decates a lot of ATA disks reported capacities that were multiples of 63.

> You know that for decades, ATA disks have reported capacities that were
> multiples of 63.  So if a drive reports a capacity that is 5 larger
> than a multiple of 63, why would you want to decrement the value?

Where a report is 5 larger than a multiple of 63, I left the existing heuristic intact.  I suggested only modifying the heuristic to avoid decrementing from exact multiples of 63.

> The result still would not be a multiple of 63.  Didn't you say that you 
> preferred to take the device's word for it?

Only when we have unresolvable ambiguities.

>>> Bear in mind that if anybody reports a problem caused by the new
>>> "divisible by 63" criterion, we will have to revert the changed test
>>> (the updated message could remain, since it doesn't affect
>>> functionality).
>> 
>> Mostly I agree.  But if reversion causes a different known problem to
>> be reinstated, then TEST_CAPACITY is really needed.
> 
> The same caveat applies to TEST_CAPACITY.
> 
> Also, the amount of effort required to write the TEST_CAPACITY code and 
> get it accepted into the kernel would be non-trivial.  I prefer not to 
> do it unless it turns out to be clearly necessary.

I think it is clearly necessary.  In the meantime a revised heuristic will help a lot.

By the way, I will not be the primary beneficiary of these revisions.  The primary beneficiaries will be owners of bridges and devices that you and I have learned to dislike, but we have to live with them.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-28  0:59                                                                                             ` Norman Diamond
@ 2012-04-29 15:15                                                                                               ` Alan Stern
  2012-04-30  2:25                                                                                                 ` Norman Diamond
  0 siblings, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-29 15:15 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 3861 bytes --]

On Sat, 28 Apr 2012, Norman Diamond wrote:

> That is not a fix for what really is my immediate problem, which is
> that my users can have any kind of bridge and any kind of disk, and
> in an emergency I can tell them to add a kernel boot parameter, or
> see if they can use a different bridge, etc., but it's really better
> if we can avoid such emergencies.

I have told you several times during this conversation: What you're 
asking for is not completely feasible.  But maybe we can do better than 
we are doing now.

> A preference for taking the device's word (in cases where we don't
> have a more reliable heuristic) is different from always taking the
> device's word (in all cases even when we have a more reliable
> heuristic).  CAPACITY_HEURISTICS will remain meaningful and will
> become more meaningful.

How could you tell whether the heuristic is more reliable than the
device?  The idea behind CAPACITY_HEURSTICS is that someone has already
considered the problem, and decided that the heuristic is more
reliable.  Otherwise the quirk entry would simply have no
capacity-related flag at all.

> > For example, consider all those cameras sold by Nikon, Pentax, and so
> > on.  They probably all used Symbian's firmware, which some years ago  
> > had the capacity bug.  Maybe the firmware has been fixed since then; I
> > don't know.  But under the reasonable assumption that the
> > SD/CF/whatever memories used in these cameras will always have an even 
> > number of blocks, the existing CAPACITY_HEURISTICS solution is 
> > appropriate.
> 
> If you think that a revised CAPACITY_HEURISTICS incorporating my
> suggestion will become less appropriate than the existing
> CAPACITY_HEURISTICS then we need two separate heuristics, one for
> Symbian and similar, one for Prolific and similar.  And we even more
> surely do need TEST_CAPACITY.

The impression I get is that you want two different heuristics: one
that aims for an even number of blocks, and one that aims for a number
divisible by 63.  All devices known to be USB-(S)ATA bridges could use 
the second heuristic.  Maybe that's what you meant.

As for whether we need TEST_CAPACITY...  That is still highly
debatable.  If we did have it, which quirk entries would use it?  So
far the only candidate we have is your Prolific bridge, and even there
it seems that the divisible-by-63 heuristic would work just as well.

> > You know that for decades, ATA disks have reported capacities that were
> > multiples of 63.  So if a drive reports a capacity that is 5 larger
> > than a multiple of 63, why would you want to decrement the value?
> 
> Where a report is 5 larger than a multiple of 63, I left the existing
> heuristic intact.  I suggested only modifying the heuristic to avoid
> decrementing from exact multiples of 63.

Okay, now I understand.  This still has the problem that it is likely
to be wrong for flash drives, again suggesting that a separate
heuristic is appropriate.

> > Also, the amount of effort required to write the TEST_CAPACITY code and 
> > get it accepted into the kernel would be non-trivial.  I prefer not to 
> > do it unless it turns out to be clearly necessary.
> 
> I think it is clearly necessary.  In the meantime a revised heuristic
> will help a lot.
> 
> By the way, I will not be the primary beneficiary of these revisions.  
> The primary beneficiaries will be owners of bridges and devices that
> you and I have learned to dislike, but we have to live with them.

I have no objection to that, provided it doesn't cause increased
problems for other people.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-29 15:15                                                                                               ` Alan Stern
@ 2012-04-30  2:25                                                                                                 ` Norman Diamond
  2012-04-30 19:42                                                                                                   ` Alan Stern
  2012-04-30 20:04                                                                                                   ` Alan Stern
  0 siblings, 2 replies; 56+ messages in thread
From: Norman Diamond @ 2012-04-30  2:25 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Alan Stern wrote:
> On Sat, 28 Apr 2012, Norman Diamond wrote:
>> That is not a fix for what really is my immediate problem, which is
>> that my users can have any kind of bridge and any kind of disk, and
>> in an emergency I can tell them to add a kernel boot parameter, or
>> see if they can use a different bridge, etc., but it's really better
>> if we can avoid such emergencies.
> 
> I have told you several times during this conversation: What you're 
> asking for is not completely feasible.  But maybe we can do better than 
> we are doing now.

Right, but in your statement where you quoted my rebuttal you started with "Look..." and claimed that you were fixing my immediate problem.  I trust that you usually do try to make better general solutions and it was probably a lapse that you went off on that tangent, but it looked like a reminder might be useful.

>> A preference for taking the device's word (in cases where we don't
>> have a more reliable heuristic) is different from always taking the
>> device's word (in all cases even when we have a more reliable
>> heuristic).  CAPACITY_HEURISTICS will remain meaningful and will
>> become more meaningful.
> 
> How could you tell whether the heuristic is more reliable than the
> device?  The idea behind CAPACITY_HEURSTICS is that someone has already
> considered the problem, and decided that the heuristic is more
> reliable.  Otherwise the quirk entry would simply have no
> capacity-related flag at all.

The intended meaning behind CAPACITY_HEURISTICS is that someone already saw some degree of ambiguity in one device.  In our discussion we have learned that more devices have ambiguities and we've been trying (at least sometimes) to improve the heuristic.

The existing heuristic, as invented for one device, prefers to believe the device when the device reports an even number and to disbelieve the device when the device reports on odd number.

My proposal, a modification for one other device which might also help some other incompletely known devices, prefers to believe the device when the device reports either an even number (as at present) or a multiple of 63 (for a reason which I think is obvious) and to disbelieve the device when the device reports a number which is neither.

Your proposed patch implied a proposal different from mine.

My proposed modification to your proposed patch would implement my proposal.  (But I made a typo in one version, and later corrected it.)

You asked why.  I answered.  Now we're going around in circles.

> The impression I get is that you want two different heuristics: one
> that aims for an even number of blocks, and one that aims for a number
> divisible by 63.  All devices known to be USB-(S)ATA bridges could use 
> the second heuristic.  Maybe that's what you meant.

Here you are modifying my proposal.  It is no problem to discuss your idea.  At first I thought your idea was better than mine, but on second thought, sorry, here's a problem.  Again it is because the broken and unbroken Prolific bridges are indistinguishable.  A Prolific bridge could be connected to a drive whose actual usable capacity is a multiple of 63, or it could be connected to a modern drive with emulated capacity that is even (in fact a multiple of 8) and not usually a multiple of 63.

Therefore I still favour my version.  If the bridge reports an even number then I want to believe it, if the bridge reports a multiple of 63 then I want to believe it, and if neither then I want to fall back on the existing heuristic which performs a decrement.

> As for whether we need TEST_CAPACITY...  That is still highly
> debatable.  If we did have it, which quirk entries would use it?  So
> far the only candidate we have is your Prolific bridge, and even there
> it seems that the divisible-by-63 heuristic would work just as well.

I wish I could get a broken Prolific bridge to test together with mine.  Anyway the divisible-by-63 heuristic would work better than the existing heuristic but it would not work as well as TEST_CAPACITY.  My proposed modified heursitic would usually work better than the existing heuristic but not as well as TEST_CAPACITY.

By the way, a while back you asked what happens if I use sg_dd to try reading multiple blocks including the last existing block and some non-existing ones.  The answer seems to depend on the drive as well as the method of connection (USB-to-PATA vs. eSATA plus SATA-to-PATA).  With the drive that I've usually been using I think the drive hangs so we can't really figure out whether to blame the bridge.  With a different drive the drive reports the error but sg_dd and Linux drivers do something to retry so many times that after 30 minutes I lost patience waiting for sg_dd to finish and report its error.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-30  2:25                                                                                                 ` Norman Diamond
@ 2012-04-30 19:42                                                                                                   ` Alan Stern
  2012-04-30 23:07                                                                                                     ` Norman Diamond
  2012-04-30 20:04                                                                                                   ` Alan Stern
  1 sibling, 1 reply; 56+ messages in thread
From: Alan Stern @ 2012-04-30 19:42 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 3521 bytes --]

On Mon, 30 Apr 2012, Norman Diamond wrote:

> Here you are modifying my proposal.  It is no problem to discuss your
> idea.  At first I thought your idea was better than mine, but on
> second thought, sorry, here's a problem.  Again it is because the
> broken and unbroken Prolific bridges are indistinguishable.  A
> Prolific bridge could be connected to a drive whose actual usable
> capacity is a multiple of 63, or it could be connected to a modern
> drive with emulated capacity that is even (in fact a multiple of 8)
> and not usually a multiple of 63.
> 
> Therefore I still favour my version.  If the bridge reports an even
> number then I want to believe it, if the bridge reports a multiple of
> 63 then I want to believe it, and if neither then I want to fall back
> on the existing heuristic which performs a decrement.

Hmmm.  What about when one of the broken bridges with an older drive
reports a number which is 1 larger than a multiple of 63 but also
happens to be even?  In that case your proposed heuristic would fail --
but then so would the existing heuristic, so we'd be no worse off than
we are now.

I still think your proposed heuristic should be handled separately from 
the existing one, so that it would not be applied in situations where 
we know the device is not a USB-(S)ATA bridge.

> > As for whether we need TEST_CAPACITY...  That is still highly
> > debatable.  If we did have it, which quirk entries would use it?  So
> > far the only candidate we have is your Prolific bridge, and even there
> > it seems that the divisible-by-63 heuristic would work just as well.
> 
> I wish I could get a broken Prolific bridge to test together with
> mine.  Anyway the divisible-by-63 heuristic would work better than
> the existing heuristic but it would not work as well as
> TEST_CAPACITY.  My proposed modified heursitic would usually work
> better than the existing heuristic but not as well as TEST_CAPACITY.

How do you know?  You haven't read through ten years' worth of email 
messages on this subject, have you?  You're going on the basis of your 
experience with _one_ bridge and a couple of drives.

By the way, have you tried connecting your bridge to a CD/DVD drive?  
I believe that some bridges are supposed to work with both regular
disks and optical drives, but I don't know if any of them mess up the
capacity of an optical disc.  Quite possibly not.

> By the way, a while back you asked what happens if I use sg_dd to try
> reading multiple blocks including the last existing block and some
> non-existing ones.  The answer seems to depend on the drive as well
> as the method of connection (USB-to-PATA vs. eSATA plus
> SATA-to-PATA).  With the drive that I've usually been using I think
> the drive hangs so we can't really figure out whether to blame the
> bridge.  With a different drive the drive reports the error but sg_dd
> and Linux drivers do something to retry so many times that after 30
> minutes I lost patience waiting for sg_dd to finish and report its
> error.

Indeed -- that's exactly the sort of thing which could happen with
TEST_CAPACITY.  It's one of the reasons I'm cautious about adding
TEST_CAPACITY and an example of why TEST_CAPACITY might not work as 
well as you think.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-30  2:25                                                                                                 ` Norman Diamond
  2012-04-30 19:42                                                                                                   ` Alan Stern
@ 2012-04-30 20:04                                                                                                   ` Alan Stern
  1 sibling, 0 replies; 56+ messages in thread
From: Alan Stern @ 2012-04-30 20:04 UTC (permalink / raw)
  To: Norman Diamond; +Cc: linux-usb, linux-scsi

On Mon, 30 Apr 2012, Norman Diamond wrote:

> I wish I could get a broken Prolific bridge to test together with
> mine.

I just realized -- I have a buggy Prolific bridge here.  It's not the
same model as yours; the vendor ID is 0x067b but the product ID is
0x3507.

With the disk it is currently connected to, it does indeed report a 
capacity that is too large by 1, and the correct value is a multiple of 
63.

Alan Stern


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-30 19:42                                                                                                   ` Alan Stern
@ 2012-04-30 23:07                                                                                                     ` Norman Diamond
  2012-05-01 16:05                                                                                                       ` Alan Stern
  0 siblings, 1 reply; 56+ messages in thread
From: Norman Diamond @ 2012-04-30 23:07 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Alan Stern wrote:
> On Mon, 30 Apr 2012, Norman Diamond wrote:
> 
>> Here you are modifying my proposal.  It is no problem to discuss your
>> idea.  At first I thought your idea was better than mine, but on
>> second thought, sorry, here's a problem.  Again it is because the
>> broken and unbroken Prolific bridges are indistinguishable.  A
>> Prolific bridge could be connected to a drive whose actual usable
>> capacity is a multiple of 63, or it could be connected to a modern
>> drive with emulated capacity that is even (in fact a multiple of 8)
>> and not usually a multiple of 63.
>> 
>> Therefore I still favour my version.  If the bridge reports an even
>> number then I want to believe it, if the bridge reports a multiple of
>> 63 then I want to believe it, and if neither then I want to fall back
>> on the existing heuristic which performs a decrement.
> 
> Hmmm.  What about when one of the broken bridges with an older drive
> reports a number which is 1 larger than a multiple of 63 but also
> happens to be even?  In that case your proposed heuristic would fail --
> but then so would the existing heuristic, so we'd be no worse off than
> we are now.

Exactly.  It's not perfect but the improvements far outweigh the downside.

> I still think your proposed heuristic should be handled separately from 
> the existing one, so that it would not be applied in situations where 
> we know the device is not a USB-(S)ATA bridge.

OK.  One quirk for bridges (accept even numbers, accept multiples of 63, and otherwise decrement) and one quirk for other kinds of devices (accept even numbers and otherwise decrement, i.e. the present heuristic).

>>> As for whether we need TEST_CAPACITY...� That is still highly
>>> debatable.� If we did have it, which quirk entries would use it?� So
>>> far the only candidate we have is your Prolific bridge, and even there
>>> it seems that the divisible-by-63 heuristic would work just as well.
>> 
>> I wish I could get a broken Prolific bridge to test together with
> > mine.  Anyway the divisible-by-63 heuristic would work better than
> > the existing heuristic but it would not work as well as
> > TEST_CAPACITY.  My proposed modified heursitic would usually work
> > better than the existing heuristic but not as well as TEST_CAPACITY.
> 
> How do you know?  You haven't read through ten years' worth of email 
> messages on this subject, have you?  You're going on the basis of your 
> experience with _one_ bridge and a couple of drives.

Because we do know there are a lot of multiples of 63 out there, and because if the bridge reports a capacity that is a multiple of 63 (i.e. maximum LBA one less than a multiple of 63) and we try reading that last block then it should be read successfully.  The only time we have to worry about TEST_CAPACITY is a pretty rare case -- and even in such rare cases, we don't know if the bridge will always hang in those cases. 

My bridge appeared to hang on reading multiple nonexistent blocks but not on reading a single nonexistent block, and at this moment it looks like it might not even be the bridge's fault (I have to test it on more drives).

> By the way, have you tried connecting your bridge to a CD/DVD drive?

I have read CDs through it.  I never thought of inquring the capacity.

>> By the way, a while back you asked what happens if I use sg_dd to try
>> reading multiple blocks including the last existing block and some
>> non-existing ones.  The answer seems to depend on the drive as well
>> as the method of connection (USB-to-PATA vs. eSATA plus
>> SATA-to-PATA).  With the drive that I've usually been using I think
>> the drive hangs so we can't really figure out whether to blame the
>> bridge.  With a different drive the drive reports the error but sg_dd
>> and Linux drivers do something to retry so many times that after 30
>> minutes I lost patience waiting for sg_dd to finish and report its
>> error.
> 
> Indeed -- that's exactly the sort of thing which could happen with
> TEST_CAPACITY.  It's one of the reasons I'm cautious about adding
> TEST_CAPACITY and an example of why TEST_CAPACITY might not work as 
> well as you think.

Correction:  Therefore TEST_CAPACITY should not try to read multiple blocks in one read.

Your other message says you have a different model of Prolific bridge which has the capacity bug but which is (sadly at this moment) distinguishable from mine.  Anyway, what happens if you try to read the last block that the bridge asserted to exist?  Also for curiosity what happens if you try to read multiple nonexistent blocks, but that curiosity is irrelevant to the single block that TEST_CAPACITY would try to read.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-04-30 23:07                                                                                                     ` Norman Diamond
@ 2012-05-01 16:05                                                                                                       ` Alan Stern
  0 siblings, 0 replies; 56+ messages in thread
From: Alan Stern @ 2012-05-01 16:05 UTC (permalink / raw)
  To: Norman Diamond; +Cc: USB list, SCSI development list

On Tue, 1 May 2012, Norman Diamond wrote:

> >> I wish I could get a broken Prolific bridge to test together with
> > > mine.  Anyway the divisible-by-63 heuristic would work better than
> > > the existing heuristic but it would not work as well as
> > > TEST_CAPACITY.  My proposed modified heursitic would usually work
> > > better than the existing heuristic but not as well as TEST_CAPACITY.
> > 
> > How do you know?  You haven't read through ten years' worth of email 
> > messages on this subject, have you?  You're going on the basis of your 
> > experience with _one_ bridge and a couple of drives.
> 
> Because we do know there are a lot of multiples of 63 out there, and
> because if the bridge reports a capacity that is a multiple of 63
> (i.e. maximum LBA one less than a multiple of 63) and we try reading
> that last block then it should be read successfully.  The only time
> we have to worry about TEST_CAPACITY is a pretty rare case -- and
> even in such rare cases, we don't know if the bridge will always hang
> in those cases.

We don't know, but our experience has not been good.  Even if the 
bridge doesn't hang, it is quite possible the kernel will get stuck in 
a very long, very slow retry loop.  Maybe not as bad as the loop you 
experienced while testing a different scenario, but still bad.

> >> By the way, a while back you asked what happens if I use sg_dd to try
> >> reading multiple blocks including the last existing block and some
> >> non-existing ones.  The answer seems to depend on the drive as well
> >> as the method of connection (USB-to-PATA vs. eSATA plus
> >> SATA-to-PATA).  With the drive that I've usually been using I think
> >> the drive hangs so we can't really figure out whether to blame the
> >> bridge.  With a different drive the drive reports the error but sg_dd
> >> and Linux drivers do something to retry so many times that after 30
> >> minutes I lost patience waiting for sg_dd to finish and report its
> >> error.
> > 
> > Indeed -- that's exactly the sort of thing which could happen with
> > TEST_CAPACITY.  It's one of the reasons I'm cautious about adding
> > TEST_CAPACITY and an example of why TEST_CAPACITY might not work as 
> > well as you think.
> 
> Correction:  Therefore TEST_CAPACITY should not try to read multiple
> blocks in one read.

To repeat: You have no way of knowing whether reading a single block 
will avoid this problem when other bridges are used.

> Your other message says you have a different model of Prolific bridge
> which has the capacity bug but which is (sadly at this moment)
> distinguishable from mine.  Anyway, what happens if you try to read
> the last block that the bridge asserted to exist?

It behaves the same way yours does: immediate failure with no error 
information.

>  Also for curiosity
> what happens if you try to read multiple nonexistent blocks, but that
> curiosity is irrelevant to the single block that TEST_CAPACITY would
> try to read.

I tried multiple experiments, reading 8 blocks starting at different 
positions relative to the end.  In each case, if any of the blocks were 
after the physical end of the drive, the bridge returned immediately 
with no data and no error information.

I also have another bridge to test, a very buggy device made by
JMicron.  I don't remember whether it has the capacity bug, and I don't
have time to work on it today.  I'll let you know how it behaves later
on.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-27  7:40     ` James Bottomley
@ 2012-03-27  8:48       ` Norman Diamond
  0 siblings, 0 replies; 56+ messages in thread
From: Norman Diamond @ 2012-03-27  8:48 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

James Bottomley corrected one of the experts who corrected me yesterday:
>>> So, the problem is that sd_mod is turning your request for a single block into a request for several blocks.
> 
> No, it won't be this.  Everything below block does exactly what block says.  If readahead is the problem, then you need to turn it off in block:
> echo 0 > /sys/block/<dev>/queue/read_ahead_kb

Thank you.  But...

James Bottomley corrected me too.
>> I originally wrote (blaming the wrong component):
>>>> dd if=/dev/sdb of=/dev/zero bs=512 count=1 skip=551563
>>>> should succeed because block 551563 has no problem.  But it fails because ehci_hcd insists on reading blocks 551560 through 551567, and block 551562 does have a problem.  (Of course I should have been outputting to /dev/null instead of /dev/zero but that should not matter.)
>
> this is not fixable using dd which goes through the page cache (and thus had a minimum read of a page at a time). If you want exact 512 byte sector reads, use sg_dd instead.

Then writing a 0 to /sys/block/sdb/queue/read_ahead_kb is useless in this particular case, right?  But it might be useful in further testing, because of more oddities.

The USB-to-IDE bridge is vendor 067b, product 2507, Prolific Technology Inc., and usb-storage matches it for quirk 110.

Digression:  Someone adjusts the number of blocks from the reported 39070080 (which I think is correct) to 39070079 (which I think is wrong).  I'll have to install the drive in an old notebook to check if the reported number of blocks is really correct.

Today I created a FAT12 partition in approximately 8 megabytes surrounding known bad block number 551562.

Windows XP could write a bunch of files to fill the partition (0 blocks free).  Windows XP could copy all the files from the partition to a directory on an internal SATA drive.  I guess there is some amount of luck that the bad block is not in use in any of the files, despite there being 0 blocks free.

Linux (cp -pr) could not copy all the files from the partition to a directory on an internal SATA drive.  Even when it should only copy blocks near the bad block, it stubbornly tried to readahead the bad block and it bombed out.  I had to unplug and replug the USB cable to read the drive again.

Back to Windows XP.  When I told it to run CHKDSK and try to verify every block, then it bombed out.  I had to unplug and replug the USB cable.  Again, just copying the files, they all copied.

So the need to unplug and replug seems to be the bridge's fault.

I think readahead is not a bad thing to do, and I can see why it is too late for Linux to recover after getting the error from trying to read ahead.  But I'm sure I've seen Windows XP do readahead too.  How come Windows XP survived where Linux didn't?
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-26 23:30   ` Norman Diamond
  2012-03-26 23:45     ` Matthew Dharm
@ 2012-03-27  7:40     ` James Bottomley
  2012-03-27  8:48       ` Norman Diamond
  1 sibling, 1 reply; 56+ messages in thread
From: James Bottomley @ 2012-03-27  7:40 UTC (permalink / raw)
  To: n0diamond; +Cc: linux-usb, linux-scsi

On Tue, 2012-03-27 at 08:30 +0900, Norman Diamond wrote:
> Executive summary:
> It is probably sd_mod which is too aggressive in failing reads, and
> which needs the same fix that libata and linux-ide received a few
> years ago.  Now adding the linux-scsi mailing list and quoting my
> original (faulty) report at the bottom of this message.
> 
> Matthew Dharm corrected me:
> > Actually, ehci_hcd has nothing to do with this.  The problem in
> likely in sd_mod or the scsi core.  Those are the modules that
> translate your userspace request for a single block into a scsi
> request, which is then processed by usb-storage and passed to the usb
> core
> 
> OK.  Since libata and linux-ide had been fixed some years ago, and I
> saw ehci_hcd assigned to the interface I was using yesterday, I blamed
> the wrong victim.  I understand it's likely to be sd_mod or
> usb-storage.
> 
> > So, the problem is that sd_mod is turning your request for a single
> block into a request for several blocks.

No, it won't be this.  Everything below block does exactly what block
says.  If readahead is the problem, then you need to turn it off in
block:

echo 0 > /sys/block/<dev>/queue/read_ahead_kb

> That's part of the problem.  Readahead is not a bad thing to do.  The
> problem is that sd_mod or whoever is too aggressive.  Instead of
> marking buffers for nearby blocks as not having valid data available,
> it further refuses to supply valid data for the good block and errors
> out a call that should have succeeded.  libata and linux-ide used to
> have the same defect before they were fixed.
> 
> > As for needing unplug and replug, likely the firmware in your device
> is crashing when it encounters a bad block. So there is nothing which
> can be done to recover aside from resetting the device with an
> unplug/replug cycle.
> 
> The disk's firmware correctly reports a read error when reading the
> bad block and correctly proceeds to obey later commands to read good
> blocks if so ordered.  This is the same drive that I mounted on a
> motherboard's IDE connector a few years ago when testing linux-ide and
> libata.  However, if you blame the usb-to-ide bridge's firmware, I'll
> try to find a way to test it.
> 
> Alan Stern also corrected me:
> > It is the block layer which insists on reading an entire page at a time.
> 
> Understood.
> 
> > This has nothing at all to do with ehci-hcd.  You can prove this
> (assuming your computer has a UHCI or OHCI controller) by unloading
> ehci-hcd and running the test again.
> 
> I understand that ehci-hcd can be unloaded and reloaded (well,
> sometimes I can't rmmod some other drivers, but I understand how to
> try).  I don't see how that would prove anything though.
> 
> > ehci_hcd does not try to reassign anything.  Rather, it is
> usb-storage which resets the non-working device.
> 
> OK.  I have a feeling that usb-storage is overly aggressive in
> resetting a device and trying to assign a new address.  The drive does
> not need resetting; I mentioned above that it correctly reports a bad
> block and correctly continues operating.  Though if the USB-to-IDE
> bridge is to blame, I'll try to find a way to test it.
> 
> > If the device were working properly, unplugging and replugging it
> wouldn't be necessary.  The failure is entirely the device's fault.
> 
> I do not believe that.  The drive's report of failure to read a bad
> block is correct operation by the drive.  Mishandling of a correct
> error report is the fault of the driver that mishandles the report.
> 
> I originally wrote (blaming the wrong component):
> >> dd if=/dev/sdb of=/dev/zero bs=512 count=1 skip=551563
> >> should succeed because block 551563 has no problem.  But it fails
> because ehci_hcd insists on reading blocks 551560 through 551567, and
> block 551562 does have a problem.

this is not fixable using dd which goes through the page cache (and thus
had a minimum read of a page at a time).

If you want exact 512 byte sector reads, use sg_dd instead.

James

> >>
> >> Some years ago similar problems in linux-ide and libata were fixed.
> ehci_hcd would also benefit from fixing.
> >>
> >> ehci_hcd has further problems.  After failing to read block 551562,
> it tries to reassign device addresses on the USB bus, fails
> repeatedly, and gives up.  Unplugging and replugging the USB cable
> fixes this, so that block numbers far enough away from bad blocks can
> be read again.  I think that unplugging should not be necessary.
> >>
> >> (Of course I should have been outputting to /dev/null instead
> of /dev/zero but that should not matter.)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
  2012-03-26 23:30   ` Norman Diamond
@ 2012-03-26 23:45     ` Matthew Dharm
  2012-03-27  7:40     ` James Bottomley
  1 sibling, 0 replies; 56+ messages in thread
From: Matthew Dharm @ 2012-03-26 23:45 UTC (permalink / raw)
  To: n0diamond; +Cc: linux-usb, linux-scsi

Norman --

On Mon, Mar 26, 2012 at 4:30 PM, Norman Diamond <n0diamond@yahoo.co.jp> wrote:
> Executive summary:
> It is probably sd_mod which is too aggressive in failing reads, and which needs the same fix that libata and linux-ide received a few years ago.  Now adding the linux-scsi mailing list and quoting my original (faulty) report at the bottom of this message.
>
> Matthew Dharm corrected me:
>> Actually, ehci_hcd has nothing to do with this.  The problem in likely in sd_mod or the scsi core.  Those are the modules that translate your userspace request for a single block into a scsi request, which is then processed by usb-storage and passed to the usb core
>
> OK.  Since libata and linux-ide had been fixed some years ago, and I saw ehci_hcd assigned to the interface I was using yesterday, I blamed the wrong victim.  I understand it's likely to be sd_mod or usb-storage.

usb-storage simply translates the requests it gets from the scsi core
(originating in sd_mod or sr_mod or sg or wherever) into a format the
the USB device can understand.  It has no readahead logic in it at
all, and thus is not at fault here.

>
>> So, the problem is that sd_mod is turning your request for a single block into a request for several blocks.
>
> That's part of the problem.  Readahead is not a bad thing to do.  The problem is that sd_mod or whoever is too aggressive.  Instead of marking buffers for nearby blocks as not having valid data available, it further refuses to supply valid data for the good block and errors out a call that should have succeeded.  libata and linux-ide used to have the same defect before they were fixed.

Likely, the usb-to-ide bridge can't handle this case well.  The drive
is probably reporting a few blocks of data and then an error, but the
bridge device probably can't handle that case.  This is a pretty
common shortcoming of usb-to-ide bridges.


>> As for needing unplug and replug, likely the firmware in your device is crashing when it encounters a bad block. So there is nothing which can be done to recover aside from resetting the device with an unplug/replug cycle.
>
> The disk's firmware correctly reports a read error when reading the bad block and correctly proceeds to obey later commands to read good blocks if so ordered.  This is the same drive that I mounted on a motherboard's IDE connector a few years ago when testing linux-ide and libata.  However, if you blame the usb-to-ide bridge's firmware, I'll try to find a way to test it.

When Alan and I refer to the 'firmware of the device', we both mean
the usb-to-ide bridge chip (in this case).  If your device happened to
be a usb flash drive, there would be no separate "disk" firmware to
confuse the issue.


> Alan Stern also corrected me:
>> This has nothing at all to do with ehci-hcd.  You can prove this (assuming your computer has a UHCI or OHCI controller) by unloading ehci-hcd and running the test again.
>
> I understand that ehci-hcd can be unloaded and reloaded (well, sometimes I can't rmmod some other drivers, but I understand how to try).  I don't see how that would prove anything though.

Your original report blamed ehci-hcd, but that's just another "glue"
layer.  To establish that it is not at fault, you can use a different
(lower-speed) glue layer, in the form of uhci-hcd or ohci-hcd.  And
EHCI controller almost always has a companion UHCI or OHCI controller,
tho on newer chipsets this isn't necessarily true (Intel now ships
chipsets with a rate-matching TT-capable EHCI hub in them, and thus no
"companion" controller).

>> ehci_hcd does not try to reassign anything.  Rather, it is usb-storage which resets the non-working device.
>
> OK.  I have a feeling that usb-storage is overly aggressive in resetting a device and trying to assign a new address.  The drive does not need resetting; I mentioned above that it correctly reports a bad block and correctly continues operating.  Though if the USB-to-IDE bridge is to blame, I'll try to find a way to test it.

Again, we are referring to the bridge firmware. usb-storage will only
attempt to reset the device if the device has failed to respond
properly in a "reasonable" amount of time (as defined in the original
request from the SCSI layer).  That is often 30-seconds or so.

>> If the device were working properly, unplugging and replugging it wouldn't be necessary.  The failure is entirely the device's fault.
>
> I do not believe that.  The drive's report of failure to read a bad block is correct operation by the drive.  Mishandling of a correct error report is the fault of the driver that mishandles the report.

The drive's report of failure is likely getting totally lost by the
usb-to-ide bridge.  Again, this is pretty common among usb-to-ide
bridges.

Matt

-- 
Matthew Dharm
Maintainer, USB Mass Storage driver for Linux
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)
       [not found] ` <Pine.LNX.4.44L0.1203261007290.1384-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2012-03-26 23:30   ` Norman Diamond
  2012-03-26 23:45     ` Matthew Dharm
  2012-03-27  7:40     ` James Bottomley
  0 siblings, 2 replies; 56+ messages in thread
From: Norman Diamond @ 2012-03-26 23:30 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

Executive summary:
It is probably sd_mod which is too aggressive in failing reads, and which needs the same fix that libata and linux-ide received a few years ago.  Now adding the linux-scsi mailing list and quoting my original (faulty) report at the bottom of this message.

Matthew Dharm corrected me:
> Actually, ehci_hcd has nothing to do with this.  The problem in likely in sd_mod or the scsi core.  Those are the modules that translate your userspace request for a single block into a scsi request, which is then processed by usb-storage and passed to the usb core

OK.  Since libata and linux-ide had been fixed some years ago, and I saw ehci_hcd assigned to the interface I was using yesterday, I blamed the wrong victim.  I understand it's likely to be sd_mod or usb-storage.

> So, the problem is that sd_mod is turning your request for a single block into a request for several blocks.

That's part of the problem.  Readahead is not a bad thing to do.  The problem is that sd_mod or whoever is too aggressive.  Instead of marking buffers for nearby blocks as not having valid data available, it further refuses to supply valid data for the good block and errors out a call that should have succeeded.  libata and linux-ide used to have the same defect before they were fixed.

> As for needing unplug and replug, likely the firmware in your device is crashing when it encounters a bad block. So there is nothing which can be done to recover aside from resetting the device with an unplug/replug cycle.

The disk's firmware correctly reports a read error when reading the bad block and correctly proceeds to obey later commands to read good blocks if so ordered.  This is the same drive that I mounted on a motherboard's IDE connector a few years ago when testing linux-ide and libata.  However, if you blame the usb-to-ide bridge's firmware, I'll try to find a way to test it.

Alan Stern also corrected me:
> It is the block layer which insists on reading an entire page at a time.

Understood.

> This has nothing at all to do with ehci-hcd.  You can prove this (assuming your computer has a UHCI or OHCI controller) by unloading ehci-hcd and running the test again.

I understand that ehci-hcd can be unloaded and reloaded (well, sometimes I can't rmmod some other drivers, but I understand how to try).  I don't see how that would prove anything though.

> ehci_hcd does not try to reassign anything.  Rather, it is usb-storage which resets the non-working device.

OK.  I have a feeling that usb-storage is overly aggressive in resetting a device and trying to assign a new address.  The drive does not need resetting; I mentioned above that it correctly reports a bad block and correctly continues operating.  Though if the USB-to-IDE bridge is to blame, I'll try to find a way to test it.

> If the device were working properly, unplugging and replugging it wouldn't be necessary.  The failure is entirely the device's fault.

I do not believe that.  The drive's report of failure to read a bad block is correct operation by the drive.  Mishandling of a correct error report is the fault of the driver that mishandles the report.

I originally wrote (blaming the wrong component):
>> dd if=/dev/sdb of=/dev/zero bs=512 count=1 skip=551563
>> should succeed because block 551563 has no problem.  But it fails because ehci_hcd insists on reading blocks 551560 through 551567, and block 551562 does have a problem.
>>
>> Some years ago similar problems in linux-ide and libata were fixed.  ehci_hcd would also benefit from fixing.
>>
>> ehci_hcd has further problems.  After failing to read block 551562, it tries to reassign device addresses on the USB bus, fails repeatedly, and gives up.  Unplugging and replugging the USB cable fixes this, so that block numbers far enough away from bad blocks can be read again.  I think that unplugging should not be necessary.
>>
>> (Of course I should have been outputting to /dev/null instead of /dev/zero but that should not matter.)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

end of thread, other threads:[~2012-05-01 16:05 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-28  4:14 sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block) Norman Diamond
2012-03-28  7:18 ` James Bottomley
2012-03-28  7:48   ` Norman Diamond
2012-03-28 14:41     ` Alan Stern
2012-03-28 23:43       ` Norman Diamond
2012-03-29 14:44         ` Alan Stern
2012-03-30  7:34           ` Norman Diamond
     [not found]             ` <662659.4715.qm-303aDswoEIb1/UedTyKF90yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-03-30 14:20               ` Alan Stern
2012-03-31  3:36                 ` Norman Diamond
2012-03-31 15:31                   ` Alan Stern
2012-04-02  4:25                     ` Norman Diamond
     [not found]                       ` <307043.7654.qm-W9a5FxB6bg95hgrKqgaBcEyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-02 18:40                         ` Alan Stern
     [not found]                           ` <Pine.LNX.4.44L0.1204021430130.12349-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-03  7:54                             ` Norman Diamond
2012-04-03 13:55                               ` James Bottomley
2012-04-04  1:28                                 ` Norman Diamond
     [not found]                                   ` <850871.26108.qm-303aDswoEIaO4BqzrDeqF0yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-04 15:28                                     ` Alan Stern
2012-04-06  0:27                                       ` Norman Diamond
2012-04-06 16:21                                         ` Alan Stern
2012-04-09  2:07                                           ` Norman Diamond
     [not found]                                             ` <137070.95048.qm-W9a5FxB6bg8QKk/ZIwh3tkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-09 14:19                                               ` Alan Stern
     [not found]                                                 ` <Pine.LNX.4.44L0.1204091014220.1429-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-09 22:00                                                   ` Norman Diamond
2012-04-10 14:31                                                     ` Alan Stern
2012-04-10 23:24                                                       ` Norman Diamond
2012-04-12 14:53                                                         ` Alan Stern
     [not found]                                                           ` <Pine.LNX.4.44L0.1204121030050.1496-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-12 23:08                                                             ` Norman Diamond
     [not found]                                                               ` <14684.87111.qm-W9a5FxB6bg+O4BqzrDeqF0yFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-13  0:59                                                                 ` Alan Stern
     [not found]                                                                   ` <Pine.LNX.4.44L0.1204122044390.10558-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-16  2:13                                                                     ` Norman Diamond
     [not found]                                                                       ` <344714.25777.qm-W9a5FxB6bg85iCj6gykswkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-16 15:06                                                                         ` Alan Stern
2012-04-16 22:41                                                                           ` Norman Diamond
2012-04-17 15:19                                                                             ` Alan Stern
2012-04-17 22:54                                                                               ` Norman Diamond
2012-04-25 15:34                                                                                 ` Alan Stern
2012-04-25 23:44                                                                                   ` Norman Diamond
2012-04-26 15:03                                                                                     ` Alan Stern
     [not found]                                                                                       ` <Pine.LNX.4.44L0.1204261026260.1530-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-26 23:13                                                                                         ` Norman Diamond
2012-04-27 14:51                                                                                           ` Alan Stern
2012-04-28  0:59                                                                                             ` Norman Diamond
2012-04-29 15:15                                                                                               ` Alan Stern
2012-04-30  2:25                                                                                                 ` Norman Diamond
2012-04-30 19:42                                                                                                   ` Alan Stern
2012-04-30 23:07                                                                                                     ` Norman Diamond
2012-05-01 16:05                                                                                                       ` Alan Stern
2012-04-30 20:04                                                                                                   ` Alan Stern
2012-04-16  6:18                                                                   ` Norman Diamond
2012-04-03 14:28                               ` Alan Stern
     [not found]                                 ` <Pine.LNX.4.44L0.1204031017110.1537-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-04  4:13                                   ` Norman Diamond
     [not found]                                     ` <388819.38189.qm-303aDswoEIaf2IT/n6niikyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-04 15:48                                       ` Alan Stern
     [not found]                                         ` <Pine.LNX.4.44L0.1204041128160.1543-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-06  0:49                                           ` Norman Diamond
     [not found]                                             ` <124887.42544.qm-303aDswoEIYQKk/ZIwh3tkyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2012-04-06 16:31                                               ` Alan Stern
     [not found]                                                 ` <Pine.LNX.4.44L0.1204061221530.1392-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-09  2:25                                                   ` Norman Diamond
2012-04-09 14:40                                                     ` Alan Stern
2012-04-09 22:21                                                       ` Norman Diamond
     [not found] <Pine.LNX.4.44L0.1203261007290.1384-100000@iolanthe.rowland.org>
     [not found] ` <Pine.LNX.4.44L0.1203261007290.1384-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-03-26 23:30   ` Norman Diamond
2012-03-26 23:45     ` Matthew Dharm
2012-03-27  7:40     ` James Bottomley
2012-03-27  8:48       ` Norman Diamond

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.