LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 05-24-2011, 07:47 AM   #1
j_kubik
LQ Newbie
 
Registered: Aug 2010
Posts: 16

Rep: Reputation: 1
[SOLVED] usb-storage: Status code -121 error


I am having a strange external-usb-hdd problem. Every time I want to copy data over several mb, transfer stops every couple of megabytes or so for 20-30 secss and then goes on. This makes transfers veeery slow on larger files.

Every time somthing like that happens i get in my dmesg:

Code:
usb-storage: Command READ_10 (10 bytes)
usb-storage:  28 00 23 f4 dc 87 00 00 80 00
usb-storage: Bulk Command S 0x43425355 T 0x3162 L 65536 F 128 Trg 0 LUN 0 CL 10
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_sglist: xfer 65536 bytes, 8 entries
usb-storage: Status code -121; transferred 64525/65536
usb-storage: -- short read transfer
usb-storage: Bulk data transfer result 0x1
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
Can anyone point me at least to what error code -121 means? In kernel documentation i found only literal codes for them without numerical values.

Update:

My lsusb shows:
Code:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 004: ID 13fd:1840 Initio Corporation
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Disc is connected throught listed usb hub - my mainboard didn't give enough power.

My kernel is 2.6.35.4, as a part from Linux from scratch is self-copmiled (I may paste config file if necesary).

Last edited by j_kubik; 06-24-2011 at 02:23 PM.
 
Old 05-24-2011, 12:40 PM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,630

Rep: Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586
Quote:
bash-4.1$ grep -C5 121 /usr/include/asm-generic/errno.h
#define ESTALE 116 /* Stale NFS file handle */
#define EUCLEAN 117 /* Structure needs cleaning */
#define ENOTNAM 118 /* Not a XENIX named type file */
#define ENAVAIL 119 /* No XENIX semaphores available */
#define EISNAM 120 /* Is a named type file */
#define EREMOTEIO 121 /* Remote I/O error */
#define EDQUOT 122 /* Quota exceeded */

#define ENOMEDIUM 123 /* No medium found */
#define EMEDIUMTYPE 124 /* Wrong medium type */
#define ECANCELED 125 /* Operation Canceled */
The overcurrent is probably the issue. The port just gets switched off. Copy a file from another box onto that thing. A usb hub won't reduce the current unless it's independently powered.
/calls on his days as a kernel developer's guinea pig
You can use the following in /etc/modprobe.d/usb.conf or the like
Quote:
option ehci_hcd ignore_oc=1
But careful you don't blow the port!
 
Old 05-25-2011, 06:27 AM   #3
j_kubik
LQ Newbie
 
Registered: Aug 2010
Posts: 16

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by business_kid View Post
A usb hub won't reduce the current unless it's independently powered.
It is independently powered. If i connect drive directly to my computer it won't even start (i mean drive doesn't even starts to rotate).
Do you think that although i am using externaly powered hub to connect it, it still might be a current issue?

I also thought that it might be a power issue, but every time this happens, it shows exatly "transferred 64525/65536" (always the same number was transfered), and as far as i understand it, power problems would result in more random distribution of transfered amount of data.
Perhaps it is problem with cables (one package was not sent because of transfer error?)

EDIT:

I played with max_sectors parameter file.
max_secotrs - error at
128 - 64525/65536
64 - 32768/31757
32 - 15373/16384

The difference is always the same and equals 1011 bytes. I am starting to think that this is usb-transfer problem. I will try to experiment with different cables.

EDIT 2:

I exchanged cables between hub and pc, and between hub and disk and also tried both exchanged - in each case errors were the same. Changing usb port on pc also didn't help.

Last edited by j_kubik; 05-25-2011 at 10:24 AM.
 
Old 05-26-2011, 04:19 AM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,630

Rep: Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586
I think at this point it's immaterial if the port is switching off or not.

Ports give enough to power usb disks, unless this disk is some strange and unusual concoction we have yet to hear about. Yours requires too much current, indicating a fault condition.

Internally these things have chains of transistors (connected source - drain, i.e. end to end) and if they all turn on, there is 'shoot through' or positive is connected to negative.
If any one transistor is blown, there comes a decision inside the chip which provides this effect, and current skyrockets. You can imagine how this might be fairly repeatable until more transistors blow, which usually doesn't take too long.
 
Old 05-28-2011, 05:21 PM   #5
j_kubik
LQ Newbie
 
Registered: Aug 2010
Posts: 16

Original Poster
Rep: Reputation: 1
Wouldn't that cause the same error pattern on the same files? Anyway, i tested it on another computer and it works prfectly there, so it cannot be the reason.

Perhaps i will still try on another computer throught my hub? Perhaps that's source of the problem?

Or perhaps my mainboard has some fault in its usb ports already?
 
Old 06-24-2011, 02:22 PM   #6
j_kubik
LQ Newbie
 
Registered: Aug 2010
Posts: 16

Original Poster
Rep: Reputation: 1
I rearanged cables and now it works without problems - perhaps it is faulty cable after all?
Or perhaps the reason was some induction (cable was a bit too long so it was going several times aroud hub in circles), and after rearangning there are no such trouble? No idea, but since it's working i don't want to break it again, so i will not experiment.
 
1 members found this post helpful.
  


Reply

Tags
storage, transfer, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
modprobe usb-storage: FATAL: Error inserting annekaelber Linux - Software 3 06-08-2010 12:34 AM
SCSI error: return code = 0x10000 on USB Mass Storage device gringer Linux - Hardware 4 05-14-2007 07:43 AM
NETGEAR WG 121 USB Wireless adapter on Fedora Linux 2 Core Installation Newbietofedora Linux - Wireless Networking 0 12-28-2004 10:32 AM
usb-storage buffer i/o error zedmango Linux - Hardware 0 04-14-2004 02:45 PM
USB MAss Storage Error mrsolo Linux - Hardware 1 07-10-2002 01:12 AM


All times are GMT -5. The time now is 03:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration