Skip to contentSkip to conversation

Firewire/sbp2 troubles with Linux 2.6.0

DISCUSSION Måns Rullgård 2 participants 9 messages Dec 21, 2003

lore
Share & tools
lore
#0 lore raw

I'm having some trouble connecting a Firewire hard disk box to a laptop running Linux 2.6.0. The disk is correctly detected when connected, and can be mounted. The problems start when I try to read large files from the disk. It will start off reading at about 10 MB/s, which seems a bit slow for Firewire. The disks I've used are capable of much more. That's not the real problem, though. After a little while, sometimes as little as 1 MB, sometimes after about 50 MB, the reading will stall and this message is printed in the kernel log:

ieee1394: sbp2: aborting sbp2 command
0x28 00 03 6f d2 f1 00 00 f8 00

After maybe 30 seconds, reading resumes with a few MB, then stops again, etc. By setting max_speed=0 to sbp2 limiting the speed the interval between the stalls becomes longer. Other options seem to have no effect to this problem.

The hex codes printed vary a bit. Some of the ones I've seen are

0x28 00 03 30 00 11 00 00 10 00
0x28 00 03 37 82 81 00 00 10 00
0x28 00 03 37 a2 89 00 00 10 00
0x28 00 00 00 f0 10 00 00 f8 00
0x28 00 03 65 be 21 00 00 f8 00
0x28 00 03 65 d1 29 00 00 f8 00
0x28 00 03 6f d2 f1 00 00 f8 00
0x28 00 03 74 b5 71 00 00 f8 00
0x28 00 03 76 aa e9 00 00 08 00
0x28 00 03 79 48 b9 00 00 f8 00

Writing to the disk works without any problems, except that the throughput is only about 10 MB/s.

I'd appreciate if someone could enlighten me about what's going on. Is there anything I can do to gather more information about the problem?

Signature · 2 lines
Måns Rullgård
[email protected]
#1 lore raw
Quoted 11 lines · M?ns Rullg?rd

I'm having some trouble connecting a Firewire hard disk box to a laptop running Linux 2.6.0. The disk is correctly detected when connected, and can be mounted. The problems start when I try to read large files from the disk. It will start off reading at about 10 MB/s, which seems a bit slow for Firewire. The disks I've used are capable of much more. That's not the real problem, though. After a little while, sometimes as little as 1 MB, sometimes after about 50 MB, the reading will stall and this message is printed in the kernel log:

Quoted 2 lines

ieee1394: sbp2: aborting sbp2 command
0x28 00 03 6f d2 f1 00 00 f8 00

Please try the code in the repo on linux1394.org. I've done a lot of work to sbp2 since my last sync with Linus.

Signature · 4 lines
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/
#2 lore raw
Quoted 12 lines · Ben Collins
Quoted 11 lines · M?ns Rullg?rd

I'm having some trouble connecting a Firewire hard disk box to a laptop running Linux 2.6.0. The disk is correctly detected when connected, and can be mounted. The problems start when I try to read large files from the disk. It will start off reading at about 10 MB/s, which seems a bit slow for Firewire. The disks I've used are capable of much more. That's not the real problem, though. After a little while, sometimes as little as 1 MB, sometimes after about 50 MB, the reading will stall and this message is printed in the kernel log:

Quoted 5 lines
Quoted 2 lines

ieee1394: sbp2: aborting sbp2 command
0x28 00 03 6f d2 f1 00 00 f8 00

Please try the code in the repo on linux1394.org. I've done a lot of work to sbp2 since my last sync with Linus.

No difference at all. What I think is strange, is that small reads or reading at a slow rate works perfectly. Any further ideas?

Signature · 2 lines
Måns Rullgård
[email protected]
#3 lore raw
Quoted 14 lines · M?ns Rullg?rd
Quoted 12 lines · Ben Collins
Quoted 11 lines · M?ns Rullg?rd

I'm having some trouble connecting a Firewire hard disk box to a laptop running Linux 2.6.0. The disk is correctly detected when connected, and can be mounted. The problems start when I try to read large files from the disk. It will start off reading at about 10 MB/s, which seems a bit slow for Firewire. The disks I've used are capable of much more. That's not the real problem, though. After a little while, sometimes as little as 1 MB, sometimes after about 50 MB, the reading will stall and this message is printed in the kernel log:

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

ieee1394: sbp2: aborting sbp2 command
0x28 00 03 6f d2 f1 00 00 f8 00

Please try the code in the repo on linux1394.org. I've done a lot of work to sbp2 since my last sync with Linus.

No difference at all. What I think is strange, is that small reads or reading at a slow rate works perfectly. Any further ideas?

I've seen that before with an old card that I had. I was forced to either serialize the serial commands in sbp2, or reduce the max speed to S200.

Signature · 4 lines
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/
#4 lore raw
Quoted 21 lines · Ben Collins
Quoted 20 lines · M?ns Rullg?rd
Quoted 17 lines · Ben Collins
Quoted 11 lines · M?ns Rullg?rd

I'm having some trouble connecting a Firewire hard disk box to a laptop running Linux 2.6.0. The disk is correctly detected when connected, and can be mounted. The problems start when I try to read large files from the disk. It will start off reading at about 10 MB/s, which seems a bit slow for Firewire. The disks I've used are capable of much more. That's not the real problem, though. After a little while, sometimes as little as 1 MB, sometimes after about 50 MB, the reading will stall and this message is printed in the kernel log:

Quoted 2 lines

ieee1394: sbp2: aborting sbp2 command
0x28 00 03 6f d2 f1 00 00 f8 00

Please try the code in the repo on linux1394.org. I've done a lot of work to sbp2 since my last sync with Linus.

Quoted 6 lines
Quoted 2 lines

No difference at all. What I think is strange, is that small reads or reading at a slow rate works perfectly. Any further ideas?

I've seen that before with an old card that I had. I was forced to either serialize the serial commands in sbp2, or reduce the max speed to S200.

Setting serialize_io=1 seems to help. I managed to read an 800 MB file at 10 MB/s. What's the penalty for setting that? And isn't 10 MB/s a little slow for Firewire?

Signature · 2 lines
Måns Rullgård
[email protected]
#5 lore raw
Quoted 7 lines
Quoted 3 lines

I've seen that before with an old card that I had. I was forced to either serialize the serial commands in sbp2, or reduce the max speed to S200.

Setting serialize_io=1 seems to help. I managed to read an 800 MB file at 10 MB/s. What's the penalty for setting that? And isn't 10 MB/s a little slow for Firewire?

Basically that causes the scsi layer to only send sbp2 1 command at a time, so it's a performance hit.

I'm guessing that your card doesn't like getting some many commands at once. It's possible that your sbp2 device itself cannot handle it (generally, I've found it to be caused by the card though).

As far as 10mbs, you have to remember that even though firewire is much higher than that, your drive is still an IDE, and the firewire is still going through an IDE bridge. So the limitation lies in the IDE bridge. I've seen performance as high as 34MB/s with good IDE bridges and drives, though.

Signature · 4 lines
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/
#6 lore raw
Quoted 10 lines · Ben Collins
Quoted 7 lines
Quoted 3 lines

I've seen that before with an old card that I had. I was forced to either serialize the serial commands in sbp2, or reduce the max speed to S200.

Setting serialize_io=1 seems to help. I managed to read an 800 MB file at 10 MB/s. What's the penalty for setting that? And isn't 10 MB/s a little slow for Firewire?

Basically that causes the scsi layer to only send sbp2 1 command at a time, so it's a performance hit.

I figured it would be.

Quoted 3 lines

I'm guessing that your card doesn't like getting some many commands at once. It's possible that your sbp2 device itself cannot handle it (generally, I've found it to be caused by the card though).

Is it possible to set the limit somewhere between the default and complete serialization? Shouldn't it be possible to detect such things automatically, somehow?

Quoted 5 lines

As far as 10mbs, you have to remember that even though firewire is much higher than that, your drive is still an IDE, and the firewire is still going through an IDE bridge. So the limitation lies in the IDE bridge. I've seen performance as high as 34MB/s with good IDE bridges and drives, though.

The disks will easily do 40 MB/s on a good IDE controller. It seems like a rather bad bridge to me if it has that much overhead. I haven't seen many different options for sale, either.

Signature · 2 lines
Måns Rullgård
[email protected]
#7 lore raw
Quoted 7 lines
Quoted 3 lines

I'm guessing that your card doesn't like getting some many commands at once. It's possible that your sbp2 device itself cannot handle it (generally, I've found it to be caused by the card though).

Is it possible to set the limit somewhere between the default and complete serialization? Shouldn't it be possible to detect such things automatically, somehow?

Things are attempted to be detected, but somehow that only works 95% of the time. I'd blame bad sbp2 devices, but I don't have anything to back that up. You can look in sbp2.c to see where it sets the max commands.

Quoted 9 lines
Quoted 5 lines

As far as 10mbs, you have to remember that even though firewire is much higher than that, your drive is still an IDE, and the firewire is still going through an IDE bridge. So the limitation lies in the IDE bridge. I've seen performance as high as 34MB/s with good IDE bridges and drives, though.

The disks will easily do 40 MB/s on a good IDE controller. It seems like a rather bad bridge to me if it has that much overhead. I haven't seen many different options for sale, either.

Most things based on newer Oxford chips seem to work pretty well. What ohci1394 controller do you have though?

Signature · 4 lines
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/
#8 lore raw
Quoted 6 lines · Ben Collins
Quoted 6 lines
Quoted 5 lines

As far as 10mbs, you have to remember that even though firewire is much higher than that, your drive is still an IDE, and the firewire is still going through an IDE bridge. So the limitation lies in the IDE bridge. I've seen performance as high as 34MB/s with good IDE bridges and drives, though.

Quoted 6 lines
Quoted 3 lines

The disks will easily do 40 MB/s on a good IDE controller. It seems like a rather bad bridge to me if it has that much overhead. I haven't seen many different options for sale, either.

Most things based on newer Oxford chips seem to work pretty well. What ohci1394 controller do you have though?

I have this:

00:0a.2 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (prog-if 10 [OHCI])
Subsystem: Asustek Computer, Inc.: Unknown device 1687
Flags: bus master, medium devsel, latency 32, IRQ 11
Memory at e5800000 (32-bit, non-prefetchable) [size=2K]
Capabilities: <available only to root>

Signature · 2 lines
Måns Rullgård
[email protected]