Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-29 Thread Adrian Sandu
 The only solution I see is to buy something else, like an Asus
 EB1501P-B057E .. I need something small and fast enough .. :| Maybe
 any other recommendations ? ( other root chipset / atom cpu .. small
 powered .. etc. )

DON'T KILL ME ! .. I got the best cables I could get my hands on (
double-shielded, 24k golded connectors .. metal pieces .. the best I
could get my hands on on such short notice )... I replaced 2 cables (
to hard drives ) and the one from the hub to the computer. I only got
1 reset message in /var/log/messages in 24 hours .. I'll replace the
other 4 just to be sure .. Now I should spam the companies and tell
them they should provide cables within specs ..

I guess having 6 drives that close ( among with other powering cables
.. networking (I think I got at least 40 cables in that 1 sq m. ))
isn't that good especially when the usb has another power source and
stuff..

IT WORKS. YEY. Hope this will help somebody in the future. Thanks for
bearing me .. I sure learned a lesson from this. I guess all is well
when it ends well.
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-29 Thread Theodore Kilgore


On Sat, 29 Sep 2012, Adrian Sandu wrote:

  The only solution I see is to buy something else, like an Asus
  EB1501P-B057E .. I need something small and fast enough .. :| Maybe
  any other recommendations ? ( other root chipset / atom cpu .. small
  powered .. etc. )
 
 DON'T KILL ME ! .. I got the best cables I could get my hands on (
 double-shielded, 24k golded connectors .. metal pieces .. the best I
 could get my hands on on such short notice )... I replaced 2 cables (
 to hard drives ) and the one from the hub to the computer. I only got
 1 reset message in /var/log/messages in 24 hours .. I'll replace the
 other 4 just to be sure .. Now I should spam the companies and tell
 them they should provide cables within specs ..
 
 I guess having 6 drives that close ( among with other powering cables
 .. networking (I think I got at least 40 cables in that 1 sq m. ))
 isn't that good especially when the usb has another power source and
 stuff..
 
 IT WORKS. YEY. Hope this will help somebody in the future. Thanks for
 bearing me .. I sure learned a lesson from this. I guess all is well
 when it ends well.

Adrian,

I certainly would not think of killing anyone. I don't think anyone else 
on the list would, either. But your problems with the hard drivers are in 
fact an object lesson about flaky and barely-within-spec or 
barely-out-of-spec hardware. The problems are indeed very vexing and are 
quite difficult to isolate. I am glad that a couple of us actually began 
to suspect the hardware. It seems that those suspicions panned out, and 
all is well that ends well.

Even though I was not the first to pinpoint the problem, I had been 
reading this thread and the other post which raised the issue of hardware 
problems really got my spider-sense tingling. I started to remember some 
of my own experiences. Two of them immediately come to mind and might 
serve as a further object lesson to anyone who passes by and reads this:

1. A camera with the SQ913 camera chipset inside. My camera, which was 
used to write the driver code in libgphoto2, worked just fine on a Dell 
Pentium 3 system and on an old laptop with an OHCI setup for its USB, and 
refused to work properly on any of several computers in the house which 
ran an AMD cpu on top of a VIA-based motherboard. On those systems, severe 
data loss, data corruption, and actual crashing occurred while downloading 
still photos from the camera. Putting a magnetic core around the cable 
helped a little bit, but the problem did not go away. So, again, an 
example of a poor specimen of hardware hooked by a cheap cable to a cheap 
motherboard, and there was trouble. To this day I have no way to pinpoint 
the exact cause of the problem.

2. I forget which dual-mode camera it was, but it is one of those for 
which I wrote the kernel support. I discovered the problem at the worst 
possible time: after already writing the code and submitting same, and it 
actually went into a production kernel. When I found the problem, it was 
too late to get anything changed until the next release date. What was the 
problem? Well, the camera needs several mysterious initialization commands 
to start the video stream. Some of these were obviously superfluous and 
could be safely left unused. But I left out one too many. I developed the 
driver on an AMD system with ATI USB host controllers. Everything worked, 
and the code was duly submitted. Then, too late, I tested on a 
Pentium4-on-Intel system. There, the video stream would not start, 
or it would start and speedily crash. When I put back into the driver 
that pesky one too many omitted init string, the camera worked on an 
Intel setup, too. What exactly does that one command do? I don't 
exactly know. Precisely what caused the problem? I don't know. All I can 
say for sure is that the Intel (UHCI) system needed for a certain setup 
command to be sent to the camera, whereas the ATI (OHCI) system did not. 
And that is, in fact, something very strange. Go figure.

We are working with computers. Weird stuff is not supposed to happen. But 
it does. Occasionally, this needs to be remembered, as it does 
occasionally cause real-world problems and is often the likely explanation 
for what is otherwise inexplicable. Thus, sooner or later some old geezer 
comes along and reminds people that Murphy is still around to do his 
mischief. I am glad that my suggestions turned out to be helpful.

Theodore Kilgore




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


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-29 Thread Adrian Sandu
 We are working with computers. Weird stuff is not supposed to happen. But
 it does. Occasionally, this needs to be remembered, as it does
 occasionally cause real-world problems and is often the likely explanation
 for what is otherwise inexplicable. Thus, sooner or later some old geezer
 comes along and reminds people that Murphy is still around to do his
 mischief. I am glad that my suggestions turned out to be helpful.

I can't thank you people enough .. I just hope that this thread will
help someone else in the future ( feel free to add this to your list
of stories ! :) )
I just hate it when hardware (or in my case, cable ) makes don't stick
to the specs or improve/change them as they see it fit. If I'm
payin' for a product ( especially from a brand ) I expect it to do its
job better than others. I wouldn't of expected this from WD ..
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-29 Thread Peter Stuge
Adrian Sandu wrote:
 I wouldn't of expected this from WD ..

Like with Theodore's problem you don't really know for sure where the
problem was in your setup.

Any combination of USB controller hardware in PC, cable, and
electronics in drive enclosure can have caused your problem.

External disk drive now cost *less* than the exact same model
internal drive, so you are actually *getting paid* to receive
interface electronics, power supply, some plastic, metal and
rubber that makes up the enclosure, cabling, and packaging.

Guess if those parts are of the very highest quality, or optimized
for cost.


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


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-29 Thread Theodore Kilgore


On Sun, 30 Sep 2012, Adrian Sandu wrote:

  We are working with computers. Weird stuff is not supposed to happen. But
  it does. Occasionally, this needs to be remembered, as it does
  occasionally cause real-world problems and is often the likely explanation
  for what is otherwise inexplicable. Thus, sooner or later some old geezer
  comes along and reminds people that Murphy is still around to do his
  mischief. I am glad that my suggestions turned out to be helpful.
 
 I can't thank you people enough .. I just hope that this thread will
 help someone else in the future ( feel free to add this to your list
 of stories ! :) )
 I just hate it when hardware (or in my case, cable ) makes don't stick
 to the specs or improve/change them as they see it fit. If I'm
 payin' for a product ( especially from a brand ) I expect it to do its
 job better than others. I wouldn't of expected this from WD ..

Oh? Why not? Of course, perhaps Seagate stuff is always better. Or 
Microsoft. Or Apple. Or ...??? (:-)

Specs and standards are for violating, you know. Or that is what some 
people think. It has been that way from the beginning of time. But what 
would be the solution? To have neither specs nor standards? One 
wouldn't expect that to work out too well, either.

Peter Stuge's comments are quite relevant, too. He is probably right about 
the category of external hard drives, these days. Indeed, they seem too 
good of a bargain. But maybe we are the ones who are fooled and it is the 
internal hard drives which are overpriced. Who knows? Anyway, one of the 
things which makes life really complicated for too many of us is, the 
statement that you get what you pay for is not necessarily true, either. 
It happens sometimes that some fly-by-night or Brand X company is making 
and selling the best product on the market in some category, but they 
can't charge nearly as much money as the so-called reputable producers and 
vendors precisely because they have no brand recognition. So one never 
knows.

Cheers,

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


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-28 Thread Adrian Sandu

 Adrian,

 I think that the suggestion about checking the power supply, the cabling,
 the grounding screws, and anything of like nature that has been omitted
 from this list is a very good idea. If successful it would eliminate
 the problem for you, as well as resolving the mystery. Unresolved
 mysteries are unpleasant for the user, and at least equally unpleasant
 for a developer.

 I have seen hardware do really weird things, myself. As a trivial example,
 once a local computer shop gave me a motherboard which had been returned
 because of booting problems. I was told that it had been brought in twice
 by the customer. No problem had been detected in the shop; they had
 replaced it to make a customer happy. I brought the board home. It was a
 hot summer day. I put it on the floor, hooked up a spare power supply, and
 it booted. No problem. I left it sitting there overnight. The next
 morning, I tried it again. Dead. But in the evening it came to life again.
 Guessing, I looked at the solder joints under the power connector on the
 board. One of them looked suspicious. So I fired up the soldering iron and
 put a dab of fresh solder on it. After that, the board was in use for
 years and never had the booting problem again. The reason that the problem
 was not detected was that it was the middle of the summer in Alabama, and
 when the computer was brought to the shop it was put in a car for the
 trip. The board got warm enough for the solder in that joint to expand
 enough for startup, while en route to the shop.

 Thus, I definitely do encourage you to check for hardware or cabling
 problems before deciding to buy additional equipment as a workaround.


 Good luck,

 Theodore Kilgore


 On Thu, 27 Sep 2012, Adrian Sandu wrote:

  They're the same chipset.  There's minor differences in the PCI
  capabilities, but not much else.  It could be something electrically
  wrong with the AsRock system, I suppose.  That's possible if you see
  the errors popping up erratically.
 
  Any chance you can exchange the AsRock system?

 Nope... I have it for more than 1 year and I kinda' need it even if
 the usb3 won't work... at least I can use the 2 ports to dirrectly
 connect 2 drives...nothing else is wrong and I wouldn't of known if I
 wouldn't of got these hubs...

 My only solution if no more debugging can be done is to get a nas a
 put the drives in it...

 Maybe it's the drives fault somehow ? maybe we should mail wd ?
 manhattan's fault ? via ? :) There must be someone/someway/somehow
 that can analyze it in someway and say what is wrong ..

 Still weird..I'll try on another laptop tomorrow or so ( a dell
 inspiron with an usb3 port .. dunno what usb3 root chipset it has )

The only thing I can do is buy other usb3 cables :| It's weird to
think that 5 drives ( 2 bought last week or so from 2 different stores
( 1 wd and 1 seagate ), the other 3 are 2 WDs and 1 verbatim bought
from different shops each (I am a backup nazzi) ) are all having
problems !
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-28 Thread Adrian Sandu
The only solution I see is to buy something else, like an Asus
EB1501P-B057E .. I need something small and fast enough .. :| Maybe
any other recommendations ? ( other root chipset / atom cpu .. small
powered .. etc. )
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
On Wed, Sep 26, 2012 at 8:16 PM, Adrian Sandu dex...@d3xt3r01.tk wrote:
 2012-09-26T20:13:09.700606+03:00 d3xt3r01 kernel: [ 2466.455403] usb
 3-1.1: reset SuperSpeed USB device number 14 using xhci_hcd
 2012-09-26T20:13:09.713629+03:00 d3xt3r01 kernel: [ 2466.468373]
 xhci_hcd :04:00.0: xHCI xhci_drop_endpoint called with disabled ep
 88011aea1300
 2012-09-26T20:13:09.713667+03:00 d3xt3r01 kernel: [ 2466.468384]
 xhci_hcd :04:00.0: xHCI xhci_drop_endpoint called with disabled ep
 88011aea1340
 2012-09-26T20:13:44.480669+03:00 d3xt3r01 kernel: [ 2501.235365] hub
 3-1:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
 2012-09-26T20:13:45.005111+03:00 d3xt3r01 kernel: [ 2501.759279] sd
 18:0:0:0: Device offlined - not ready after error recovery
 2012-09-26T20:13:45.005118+03:00 d3xt3r01 kernel: [ 2501.759300] sd
 18:0:0:0: [sdb] Unhandled error code
 2012-09-26T20:13:45.005125+03:00 d3xt3r01 kernel: [ 2501.759305] sd
 18:0:0:0: [sdb]  Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK
 2012-09-26T20:13:45.005133+03:00 d3xt3r01 kernel: [ 2501.759312] sd
 18:0:0:0: [sdb] CDB: Read(10): 28 00 00 03 2c 00 00 00 f0 00
 2012-09-26T20:13:45.005139+03:00 d3xt3r01 kernel: [ 2501.759328]
 end_request: I/O error, dev sdb, sector 207872
 2012-09-26T20:13:45.005146+03:00 d3xt3r01 kernel: [ 2501.759334]
 quiet_error: 23 callbacks suppressed
 2012-09-26T20:13:45.005151+03:00 d3xt3r01 kernel: [ 2501.759339]
 Buffer I/O error on device sdb, logical block 25984
 2012-09-26T20:13:45.005157+03:00 d3xt3r01 kernel: [ 2501.759351]
 Buffer I/O error on device sdb, logical block 25985
 2012-09-26T20:13:45.005163+03:00 d3xt3r01 kernel: [ 2501.759357]
 Buffer I/O error on device sdb, logical block 25986
 2012-09-26T20:13:45.005169+03:00 d3xt3r01 kernel: [ 2501.759363]
 Buffer I/O error on device sdb, logical block 25987
 The result of a simple d3xt3r01 ~ # hdparm -tT /dev/sdb

 /dev/sdb:
  Timing cached reads:   1494 MB in  2.00 seconds = 747.20 MB/sec
  Timing buffered disk reads: read(2097152) returned 1572864 bytes
 BLKFLSBUF failed: No such device

 It didn't fail the first time though .. I just executed the same
 command twice ..
 Assuming that 3u is the good thing to cat ..
 http://d3xt3r01.tk/~dexter/usbmon/1348679651_3u ..
 ( given the output in /sys/kernel/debug/usb/devices )

 Hope this helps more to identify the issue ..

Anything else I can help with ? :| I'm stuck .. dunno what to test
more or what else helpfull info I could give ya' guys ..

 2012-09-26T20:13:45.005175+03:00 d3xt3r01 kernel: [ 2501.759369]
 Buffer I/O error on device sdb, logical block 25988
 2012-09-26T20:13:45.005182+03:00 d3xt3r01 kernel: [ 2501.759375]
 Buffer I/O error on device sdb, logical block 25989
 2012-09-26T20:13:45.005188+03:00 d3xt3r01 kernel: [ 2501.759382]
 Buffer I/O error on device sdb, logical block 25990
 2012-09-26T20:13:45.005194+03:00 d3xt3r01 kernel: [ 2501.759393] sd
 18:0:0:0: rejecting I/O to offline device
 2012-09-26T20:13:45.005200+03:00 d3xt3r01 kernel: [ 2501.759407] sd
 18:0:0:0: [sdb] killing request
 2012-09-26T20:13:45.005207+03:00 d3xt3r01 kernel: [ 2501.759415]
 Buffer I/O error on device sdb, logical block 25991
 2012-09-26T20:13:45.005213+03:00 d3xt3r01 kernel: [ 2501.759426]
 Buffer I/O error on device sdb, logical block 25992
 2012-09-26T20:13:45.005220+03:00 d3xt3r01 kernel: [ 2501.759432]
 Buffer I/O error on device sdb, logical block 25993
 2012-09-26T20:13:45.005227+03:00 d3xt3r01 kernel: [ 2501.759440] sd
 18:0:0:0: rejecting I/O to offline device
 2012-09-26T20:13:45.005233+03:00 d3xt3r01 kernel: [ 2501.759494] sd
 18:0:0:0: rejecting I/O to offline device
 2012-09-26T20:13:45.005240+03:00 d3xt3r01 kernel: [ 2501.759505] sd
 18:0:0:0: rejecting I/O to offline device
 2012-09-26T20:13:45.005246+03:00 d3xt3r01 kernel: [ 2501.759624] sd
 18:0:0:0: [sdb] Unhandled error code
 2012-09-26T20:13:45.005252+03:00 d3xt3r01 kernel: [ 2501.759630] sd
 18:0:0:0: [sdb]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
 2012-09-26T20:13:45.005259+03:00 d3xt3r01 kernel: [ 2501.759637] sd
 18:0:0:0: [sdb] CDB: Read(10): 28 00 00 03 2c f0 00 00 10 00
 2012-09-26T20:13:45.005267+03:00 d3xt3r01 kernel: [ 2501.759654]
 end_request: I/O error, dev sdb, sector 208112
 2012-09-26T20:13:45.020696+03:00 d3xt3r01 kernel: [ 2501.775198] usb
 3-1.1: USB disconnect, device number 14


 On Wed, Sep 26, 2012 at 7:59 PM, Adrian Sandu dex...@d3xt3r01.tk wrote:
 On Wed, Sep 26, 2012 at 5:50 PM, Alan Stern st...@rowland.harvard.edu 
 wrote:
 On Tue, 25 Sep 2012, Sarah Sharp wrote:

 Alan, I'm wondering if the xHCI ring expansion is causing issues with
 USB hard drives under xHCI.  Testing with a Buffalo USB 3.0 hard drive
 with an NEC uPD720200 xHCI host, I see that the usb-storage and SCSI
 initialization produces I/O errors on random sectors in 3.4.0, 3.4.6,
 and 3.5.0.  I can't get those errors to be reproduced in 3.3.1.

 The xHCI ring expansion was added in 3.4, and we changed the xHCI's
 sg_tablesize:

 int 

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Alan Stern
Please trim unnecessary junk from your emails.  There's no reason to 
send all the stuff at the end of those messages to everybody on the 
mailing list.

On Thu, 27 Sep 2012, Adrian Sandu wrote:

 Anything else I can help with ? :| I'm stuck .. dunno what to test
 more or what else helpfull info I could give ya' guys ..

You could run a test with a 3.3 kernel, as Sarah asked earlier.  Other
than that, I can't think of anything.  Maybe Sarah will come up with a
patch for you to try out.

Alan Stern

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


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
 Anything else I can help with ? :| I'm stuck .. dunno what to test
 more or what else helpfull info I could give ya' guys ..

 You could run a test with a 3.3 kernel, as Sarah asked earlier.  Other
 than that, I can't think of anything.  Maybe Sarah will come up with a
 patch for you to try out.

I tried with a 3.3.8 , same thing happened. I don't understand why my
gentoo (asrock) fails and fedora(laptop) didn't ! :|
Why ? What causes it to shutdown ? It can copy to/from drives ( in the
hub or directly in the root hub ) .. but what makes it fail sometimes
:|
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Alan Stern
On Thu, 27 Sep 2012, Adrian Sandu wrote:

  Anything else I can help with ? :| I'm stuck .. dunno what to test
  more or what else helpfull info I could give ya' guys ..
 
  You could run a test with a 3.3 kernel, as Sarah asked earlier.  Other
  than that, I can't think of anything.  Maybe Sarah will come up with a
  patch for you to try out.
 
 I tried with a 3.3.8 , same thing happened. I don't understand why my
 gentoo (asrock) fails and fedora(laptop) didn't ! :|
 Why ? What causes it to shutdown ? It can copy to/from drives ( in the
 hub or directly in the root hub ) .. but what makes it fail sometimes
 :|

If we knew the answer, the problem would already be fixed.  :-)

Alan Stern

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


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
 I tried with a 3.3.8 , same thing happened. I don't understand why my
 gentoo (asrock) fails and fedora(laptop) didn't ! :|
 Why ? What causes it to shutdown ? It can copy to/from drives ( in the
 hub or directly in the root hub ) .. but what makes it fail sometimes
 :|

 If we knew the answer, the problem would already be fixed.  :-)

Would a usbmon dump on a working 3.5.2 ( my fedora ) for comparison
with the gentoo help ( when doing the same actions that would fail on
the gentoo ) ?
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Alan Stern
On Thu, 27 Sep 2012, Adrian Sandu wrote:

 I tried with a 3.3.8 , same thing happened. I don't understand why my
 gentoo (asrock) fails and fedora(laptop) didn't ! :|

Come to think of it, you could try running the same kernel on both 
computers to see what happens.  For example, boot both of them from a 
Fedora install disc in rescue mode.

Alan Stern

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


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Peter Stuge
Adrian Sandu wrote:
 I tried with a 3.3.8 , same thing happened. I don't understand why my
 gentoo (asrock) fails and fedora(laptop) didn't ! :|

Try what Alan suggested, start the Gentoo userland with the Fedora
kernel.

Do you have some crazy USE flags for your toolchain?

If the Fedora kernel works, I would suggest to re-emerge binutils and
gcc with USE=vanilla, and then build a fresh kernel.


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


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
 Adrian Sandu wrote:
 I tried with a 3.3.8 , same thing happened. I don't understand why my
 gentoo (asrock) fails and fedora(laptop) didn't ! :|

 Try what Alan suggested, start the Gentoo userland with the Fedora
 kernel.

I tried booting a Fedora-17-x86_64-Live-Desktop.iso .. same thing
happened on the asrock, will try and see if it happens on my laptop
too ..

 Do you have some crazy USE flags for your toolchain?

 If the Fedora kernel works, I would suggest to re-emerge binutils and
 gcc with USE=vanilla, and then build a fresh kernel.

[ebuild   R] sys-devel/binutils-2.22-r1  USE=cxx nls zlib
-multislot -multitarget -static-libs -test -vanilla 37 kB
[ebuild   R] sys-devel/gcc-4.5.4  USE=cxx fortran mudflap
(multilib) nls nptl openmp (-altivec) -bootstrap -build -doc
(-fixed-point) -gcj -graphite -gtk (-hardened) (-libssp) -lto
-multislot -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla
0 k
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
 Adrian Sandu wrote:
 I tried with a 3.3.8 , same thing happened. I don't understand why my
 gentoo (asrock) fails and fedora(laptop) didn't ! :|

Tried to use the live cd on my laptop, can't reproduce it in any way
on my computer ..
Using the same live cd I can reproduce the problem on the asrock :|

Tried with 3.3.8, 3.4.11, 3.5.4. I don't get what's causing the drive
to die from a simple hdparm -tT .. :|
The even more weird thing is that it's not dying every time ..
sometimes a hdparm runs successfully once or a few times before dying
.. :|
Guess I just have a bad luck .. ( altough .. I don't believe in luck
when it comes to hardware/software/science .. :) )
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Alan Stern
On Thu, 27 Sep 2012, Adrian Sandu wrote:

  Adrian Sandu wrote:
  I tried with a 3.3.8 , same thing happened. I don't understand why my
  gentoo (asrock) fails and fedora(laptop) didn't ! :|
 
 Tried to use the live cd on my laptop, can't reproduce it in any way
 on my computer ..
 Using the same live cd I can reproduce the problem on the asrock :|
 
 Tried with 3.3.8, 3.4.11, 3.5.4. I don't get what's causing the drive
 to die from a simple hdparm -tT .. :|
 The even more weird thing is that it's not dying every time ..
 sometimes a hdparm runs successfully once or a few times before dying
 .. :|
 Guess I just have a bad luck .. ( altough .. I don't believe in luck
 when it comes to hardware/software/science .. :) )

Since you are using the same live CD on both computers, this has to be
caused by a difference in the hardware.  What do lspci -vvv and
lspci -vvv -n show on the two computers?

Alan Stern

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


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
 Since you are using the same live CD on both computers, this has to be
 caused by a difference in the hardware.  What do lspci -vvv and
 lspci -vvv -n show on the two computers?

http://d3xt3r01.tk/~dexter/usbmon/asrock_lspci
http://d3xt3r01.tk/~dexter/usbmon/vaio_lspci
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Theodore Kilgore

Adrian,

I think that the suggestion about checking the power supply, the cabling, 
the grounding screws, and anything of like nature that has been omitted 
from this list is a very good idea. If successful it would eliminate 
the problem for you, as well as resolving the mystery. Unresolved 
mysteries are unpleasant for the user, and at least equally unpleasant 
for a developer. 

I have seen hardware do really weird things, myself. As a trivial example, 
once a local computer shop gave me a motherboard which had been returned 
because of booting problems. I was told that it had been brought in twice 
by the customer. No problem had been detected in the shop; they had 
replaced it to make a customer happy. I brought the board home. It was a 
hot summer day. I put it on the floor, hooked up a spare power supply, and 
it booted. No problem. I left it sitting there overnight. The next 
morning, I tried it again. Dead. But in the evening it came to life again. 
Guessing, I looked at the solder joints under the power connector on the 
board. One of them looked suspicious. So I fired up the soldering iron and 
put a dab of fresh solder on it. After that, the board was in use for 
years and never had the booting problem again. The reason that the problem 
was not detected was that it was the middle of the summer in Alabama, and 
when the computer was brought to the shop it was put in a car for the 
trip. The board got warm enough for the solder in that joint to expand 
enough for startup, while en route to the shop.

Thus, I definitely do encourage you to check for hardware or cabling 
problems before deciding to buy additional equipment as a workaround. 


Good luck,

Theodore Kilgore


On Thu, 27 Sep 2012, Adrian Sandu wrote:

  They're the same chipset.  There's minor differences in the PCI
  capabilities, but not much else.  It could be something electrically
  wrong with the AsRock system, I suppose.  That's possible if you see
  the errors popping up erratically.
 
  Any chance you can exchange the AsRock system?
 
 Nope... I have it for more than 1 year and I kinda' need it even if
 the usb3 won't work... at least I can use the 2 ports to dirrectly
 connect 2 drives...nothing else is wrong and I wouldn't of known if I
 wouldn't of got these hubs...
 
 My only solution if no more debugging can be done is to get a nas a
 put the drives in it...
 
 Maybe it's the drives fault somehow ? maybe we should mail wd ?
 manhattan's fault ? via ? :) There must be someone/someway/somehow
 that can analyze it in someway and say what is wrong ..
 
 Still weird..I'll try on another laptop tomorrow or so ( a dell
 inspiron with an usb3 port .. dunno what usb3 root chipset it has )
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 USB Mass Storage on Linux group.
 To post to this group, send email to usb-stor...@lists.one-eyed-alien.net.
 To unsubscribe from this group, send email to 
 usb-storage+unsubscr...@lists.one-eyed-alien.net.
 For more options, visit this group at 
 http://groups.google.com/a/lists.one-eyed-alien.net/group/usb-storage/?hl=en.
 
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-26 Thread Adrian Sandu
On Wed, Sep 26, 2012 at 5:50 PM, Alan Stern st...@rowland.harvard.edu wrote:
 On Tue, 25 Sep 2012, Sarah Sharp wrote:

 Alan, I'm wondering if the xHCI ring expansion is causing issues with
 USB hard drives under xHCI.  Testing with a Buffalo USB 3.0 hard drive
 with an NEC uPD720200 xHCI host, I see that the usb-storage and SCSI
 initialization produces I/O errors on random sectors in 3.4.0, 3.4.6,
 and 3.5.0.  I can't get those errors to be reproduced in 3.3.1.

 The xHCI ring expansion was added in 3.4, and we changed the xHCI's
 sg_tablesize:

 int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
 {
 ...
 /* Accept arbitrarily long scatter-gather lists */
 hcd-self.sg_tablesize = ~0;

 The usb-storage driver sets the tablesize thus:

 static unsigned int usb_stor_sg_tablesize(struct usb_interface *intf)
 {
 struct usb_device *usb_dev = interface_to_usbdev(intf);

 if (usb_dev-bus-sg_tablesize) {
 return usb_dev-bus-sg_tablesize;
 }
 return SG_ALL;
 }

 I notice that SG_ALL is set to SCSI_MAX_SG_SEGMENTS, which is only 128.
 Should we be passing an arbitrarily large number to the SCSI core?

 Yes, there's no reason not to.  The block layer will make sure that
 each individual request has a sufficiently small number of segments.

 There's some wording in include/scsi/scsi.h about also limiting the
 number of chained sgs to 2048.  I'm wondering if we're hitting some bugs
 in the SCSI layer because we're setting the sg_tablesize so high.

 I doubt it.  Anyway, this stuff is handled by the block layer now, not
 the SCSI layer.  If you look through drivers/scsi, you'll see that
 SG_ALL is used only in various SCSI interface drivers, not in the core.

 Alternately, we could be hitting bugs in the USB 3.0 firmware when we
 attempt to issue a read or write that's too big.  The read on Adrian's
 hard drive failed on a bigger read request (122880 bytes).  It would be
 interesting to see if it works fine if the xHCI sg_tablesize is limited.
 I'm going to try that with my own drive on 3.5.4 and see if it helps.

 There were examples in the earlier usbmon traces where 122880-byte
 reads succeeded, for whatever that's worth...

 I doubt very much that you are anywhere close to hitting that limit.
 If a 120-KB transfer has more than 128 SG segments then on average each
 segment would be under 1024 bytes, a lot smaller than a page, which
 seems unlikely.  I don't think I've ever seen a transfer needing more
 than about 8 segments.

 Alan Stern

Ok, back to vanilla 3.4.11, disabled CONFIG_USB_XHCI_HCD_DEBUGGING ..

I still see

2012-09-26T19:52:16.661604+03:00 d3xt3r01 kernel: [ 1213.416759] usb
3-2.4: reset SuperSpeed USB device number 11 using xhci_hcd
2012-09-26T19:52:16.674632+03:00 d3xt3r01 kernel: [ 1213.429351]
xhci_hcd :04:00.0: xHCI xhci_drop_endpoint called with disabled ep
88011d3c6980
2012-09-26T19:52:16.674665+03:00 d3xt3r01 kernel: [ 1213.429363]
xhci_hcd :04:00.0: xHCI xhci_drop_endpoint called with disabled ep
88011d3c69c0
T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  8 Spd=5000 MxCh= 4
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=2109 ProdID=0810 Rev= 3.74
S:  Manufacturer=VIA Labs, Inc.
S:  Product=4-Port USB 3.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=13(Int.) MxPS=   2 Ivl=4096ms

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  4 Spd=480  MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=2109 ProdID=3431 Rev= 2.74
S:  Product=USB2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=03 Lev=02 Prnt=08 Port=00 Cnt=01 Dev#=  9 Spd=5000 MxCh= 0
D:  Ver= 3.00 Cls=00(ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
P:  Vendor=1058 ProdID=1140 Rev=10.03
S:  Manufacturer=Western Digital
S:  Product=My Book 1140
S:  SerialNumber=5743415A4144303235323133
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms

T:  Bus=03 Lev=02 Prnt=08 Port=03 Cnt=04 Dev#= 11 Spd=5000 MxCh= 0
D:  Ver= 3.00 Cls=00(ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
P:  Vendor=1058 ProdID=1140 Rev=10.03
S:  Manufacturer=Western Digital
S:  Product=My Book 1140
S:  SerialNumber=574D415A4135343330323937
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms

So I need to cat 3u .. right ? Available at
http://d3xt3r01.tk/~dexter/usbmon/1348678668_3u
After the copy .. I see

2012-09-26T19:52:51.477641+03:00 d3xt3r01 kernel: [ 1248.232213] hub
3-2:1.0: Cannot enable port 4.  Maybe the USB cable is bad?

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-26 Thread Adrian Sandu
2012-09-26T20:13:09.700606+03:00 d3xt3r01 kernel: [ 2466.455403] usb
3-1.1: reset SuperSpeed USB device number 14 using xhci_hcd
2012-09-26T20:13:09.713629+03:00 d3xt3r01 kernel: [ 2466.468373]
xhci_hcd :04:00.0: xHCI xhci_drop_endpoint called with disabled ep
88011aea1300
2012-09-26T20:13:09.713667+03:00 d3xt3r01 kernel: [ 2466.468384]
xhci_hcd :04:00.0: xHCI xhci_drop_endpoint called with disabled ep
88011aea1340
2012-09-26T20:13:44.480669+03:00 d3xt3r01 kernel: [ 2501.235365] hub
3-1:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
2012-09-26T20:13:45.005111+03:00 d3xt3r01 kernel: [ 2501.759279] sd
18:0:0:0: Device offlined - not ready after error recovery
2012-09-26T20:13:45.005118+03:00 d3xt3r01 kernel: [ 2501.759300] sd
18:0:0:0: [sdb] Unhandled error code
2012-09-26T20:13:45.005125+03:00 d3xt3r01 kernel: [ 2501.759305] sd
18:0:0:0: [sdb]  Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK
2012-09-26T20:13:45.005133+03:00 d3xt3r01 kernel: [ 2501.759312] sd
18:0:0:0: [sdb] CDB: Read(10): 28 00 00 03 2c 00 00 00 f0 00
2012-09-26T20:13:45.005139+03:00 d3xt3r01 kernel: [ 2501.759328]
end_request: I/O error, dev sdb, sector 207872
2012-09-26T20:13:45.005146+03:00 d3xt3r01 kernel: [ 2501.759334]
quiet_error: 23 callbacks suppressed
2012-09-26T20:13:45.005151+03:00 d3xt3r01 kernel: [ 2501.759339]
Buffer I/O error on device sdb, logical block 25984
2012-09-26T20:13:45.005157+03:00 d3xt3r01 kernel: [ 2501.759351]
Buffer I/O error on device sdb, logical block 25985
2012-09-26T20:13:45.005163+03:00 d3xt3r01 kernel: [ 2501.759357]
Buffer I/O error on device sdb, logical block 25986
2012-09-26T20:13:45.005169+03:00 d3xt3r01 kernel: [ 2501.759363]
Buffer I/O error on device sdb, logical block 25987
The result of a simple d3xt3r01 ~ # hdparm -tT /dev/sdb

/dev/sdb:
 Timing cached reads:   1494 MB in  2.00 seconds = 747.20 MB/sec
 Timing buffered disk reads: read(2097152) returned 1572864 bytes
BLKFLSBUF failed: No such device

It didn't fail the first time though .. I just executed the same
command twice ..
Assuming that 3u is the good thing to cat ..
http://d3xt3r01.tk/~dexter/usbmon/1348679651_3u ..
( given the output in /sys/kernel/debug/usb/devices )

Hope this helps more to identify the issue ..

2012-09-26T20:13:45.005175+03:00 d3xt3r01 kernel: [ 2501.759369]
Buffer I/O error on device sdb, logical block 25988
2012-09-26T20:13:45.005182+03:00 d3xt3r01 kernel: [ 2501.759375]
Buffer I/O error on device sdb, logical block 25989
2012-09-26T20:13:45.005188+03:00 d3xt3r01 kernel: [ 2501.759382]
Buffer I/O error on device sdb, logical block 25990
2012-09-26T20:13:45.005194+03:00 d3xt3r01 kernel: [ 2501.759393] sd
18:0:0:0: rejecting I/O to offline device
2012-09-26T20:13:45.005200+03:00 d3xt3r01 kernel: [ 2501.759407] sd
18:0:0:0: [sdb] killing request
2012-09-26T20:13:45.005207+03:00 d3xt3r01 kernel: [ 2501.759415]
Buffer I/O error on device sdb, logical block 25991
2012-09-26T20:13:45.005213+03:00 d3xt3r01 kernel: [ 2501.759426]
Buffer I/O error on device sdb, logical block 25992
2012-09-26T20:13:45.005220+03:00 d3xt3r01 kernel: [ 2501.759432]
Buffer I/O error on device sdb, logical block 25993
2012-09-26T20:13:45.005227+03:00 d3xt3r01 kernel: [ 2501.759440] sd
18:0:0:0: rejecting I/O to offline device
2012-09-26T20:13:45.005233+03:00 d3xt3r01 kernel: [ 2501.759494] sd
18:0:0:0: rejecting I/O to offline device
2012-09-26T20:13:45.005240+03:00 d3xt3r01 kernel: [ 2501.759505] sd
18:0:0:0: rejecting I/O to offline device
2012-09-26T20:13:45.005246+03:00 d3xt3r01 kernel: [ 2501.759624] sd
18:0:0:0: [sdb] Unhandled error code
2012-09-26T20:13:45.005252+03:00 d3xt3r01 kernel: [ 2501.759630] sd
18:0:0:0: [sdb]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
2012-09-26T20:13:45.005259+03:00 d3xt3r01 kernel: [ 2501.759637] sd
18:0:0:0: [sdb] CDB: Read(10): 28 00 00 03 2c f0 00 00 10 00
2012-09-26T20:13:45.005267+03:00 d3xt3r01 kernel: [ 2501.759654]
end_request: I/O error, dev sdb, sector 208112
2012-09-26T20:13:45.020696+03:00 d3xt3r01 kernel: [ 2501.775198] usb
3-1.1: USB disconnect, device number 14


On Wed, Sep 26, 2012 at 7:59 PM, Adrian Sandu dex...@d3xt3r01.tk wrote:
 On Wed, Sep 26, 2012 at 5:50 PM, Alan Stern st...@rowland.harvard.edu wrote:
 On Tue, 25 Sep 2012, Sarah Sharp wrote:

 Alan, I'm wondering if the xHCI ring expansion is causing issues with
 USB hard drives under xHCI.  Testing with a Buffalo USB 3.0 hard drive
 with an NEC uPD720200 xHCI host, I see that the usb-storage and SCSI
 initialization produces I/O errors on random sectors in 3.4.0, 3.4.6,
 and 3.5.0.  I can't get those errors to be reproduced in 3.3.1.

 The xHCI ring expansion was added in 3.4, and we changed the xHCI's
 sg_tablesize:

 int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
 {
 ...
 /* Accept arbitrarily long scatter-gather lists */
 hcd-self.sg_tablesize = ~0;

 The usb-storage driver sets the tablesize thus:

 static unsigned int usb_stor_sg_tablesize(struct 

Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-25 Thread Sarah Sharp
On Tue, Sep 25, 2012 at 09:26:00AM +0300, Adrian Sandu wrote:
 On Tue, Sep 25, 2012 at 12:38 AM, Sarah Sharp
 sarah.a.sh...@linux.intel.com wrote:
  Ok, so 3.4.11 doesn't work, and the log file was from 3.5.
 
 If you want I can provide a 3.4 log...

Hmm, does a 3.3 stable kernel work for you?  I have a hypothesis.

Alan, I'm wondering if the xHCI ring expansion is causing issues with
USB hard drives under xHCI.  Testing with a Buffalo USB 3.0 hard drive
with an NEC uPD720200 xHCI host, I see that the usb-storage and SCSI
initialization produces I/O errors on random sectors in 3.4.0, 3.4.6,
and 3.5.0.  I can't get those errors to be reproduced in 3.3.1.

The xHCI ring expansion was added in 3.4, and we changed the xHCI's
sg_tablesize:

int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
{
...
/* Accept arbitrarily long scatter-gather lists */
hcd-self.sg_tablesize = ~0;

The usb-storage driver sets the tablesize thus:

static unsigned int usb_stor_sg_tablesize(struct usb_interface *intf)
{
struct usb_device *usb_dev = interface_to_usbdev(intf);

if (usb_dev-bus-sg_tablesize) {
return usb_dev-bus-sg_tablesize;
}
return SG_ALL;
}

I notice that SG_ALL is set to SCSI_MAX_SG_SEGMENTS, which is only 128.
Should we be passing an arbitrarily large number to the SCSI core?
There's some wording in include/scsi/scsi.h about also limiting the
number of chained sgs to 2048.  I'm wondering if we're hitting some bugs
in the SCSI layer because we're setting the sg_tablesize so high.

Alternately, we could be hitting bugs in the USB 3.0 firmware when we
attempt to issue a read or write that's too big.  The read on Adrian's
hard drive failed on a bigger read request (122880 bytes).  It would be
interesting to see if it works fine if the xHCI sg_tablesize is limited.
I'm going to try that with my own drive on 3.5.4 and see if it helps.

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