public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Firewire/sbp2 troubles with Linux 2.6.0
@ 2003-12-21  3:26 Måns Rullgård
  2003-12-21  3:53 ` Ben Collins
  0 siblings, 1 reply; 9+ messages in thread
From: Måns Rullgård @ 2003-12-21  3:26 UTC (permalink / raw)
  To: linux-kernel


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?

-- 
Måns Rullgård
mru@kth.se


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

* Re: Firewire/sbp2 troubles with Linux 2.6.0
  2003-12-21  3:26 Firewire/sbp2 troubles with Linux 2.6.0 Måns Rullgård
@ 2003-12-21  3:53 ` Ben Collins
  2003-12-21 10:42   ` Måns Rullgård
  0 siblings, 1 reply; 9+ messages in thread
From: Ben Collins @ 2003-12-21  3:53 UTC (permalink / raw)
  To: M?ns Rullg?rd; +Cc: linux-kernel

On Sun, Dec 21, 2003 at 04:26:11AM +0100, M?ns Rullg?rd wrote:
> 
> 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 

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.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/

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

* Re: Firewire/sbp2 troubles with Linux 2.6.0
  2003-12-21  3:53 ` Ben Collins
@ 2003-12-21 10:42   ` Måns Rullgård
  2003-12-21 14:48     ` Ben Collins
  0 siblings, 1 reply; 9+ messages in thread
From: Måns Rullgård @ 2003-12-21 10:42 UTC (permalink / raw)
  To: linux-kernel

Ben Collins <bcollins@debian.org> writes:

> On Sun, Dec 21, 2003 at 04:26:11AM +0100, M?ns Rullg?rd wrote:
>> 
>> 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 
>
> 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?

-- 
Måns Rullgård
mru@kth.se


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

* Re: Firewire/sbp2 troubles with Linux 2.6.0
  2003-12-21 10:42   ` Måns Rullgård
@ 2003-12-21 14:48     ` Ben Collins
  2003-12-21 15:58       ` Måns Rullgård
  0 siblings, 1 reply; 9+ messages in thread
From: Ben Collins @ 2003-12-21 14:48 UTC (permalink / raw)
  To: M?ns Rullg?rd; +Cc: linux-kernel

On Sun, Dec 21, 2003 at 11:42:05AM +0100, M?ns Rullg?rd wrote:
> Ben Collins <bcollins@debian.org> writes:
> 
> > On Sun, Dec 21, 2003 at 04:26:11AM +0100, M?ns Rullg?rd wrote:
> >> 
> >> 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 
> >
> > 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.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/

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

* Re: Firewire/sbp2 troubles with Linux 2.6.0
  2003-12-21 14:48     ` Ben Collins
@ 2003-12-21 15:58       ` Måns Rullgård
  2003-12-21 18:31         ` Ben Collins
  0 siblings, 1 reply; 9+ messages in thread
From: Måns Rullgård @ 2003-12-21 15:58 UTC (permalink / raw)
  To: Ben Collins; +Cc: linux-kernel

Ben Collins <bcollins@debian.org> writes:

> On Sun, Dec 21, 2003 at 11:42:05AM +0100, M?ns Rullg?rd wrote:
>> Ben Collins <bcollins@debian.org> writes:
>> 
>> > On Sun, Dec 21, 2003 at 04:26:11AM +0100, M?ns Rullg?rd wrote:
>> >> 
>> >> 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 
>> >
>> > 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.

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?

-- 
Måns Rullgård
mru@kth.se

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

* Re: Firewire/sbp2 troubles with Linux 2.6.0
  2003-12-21 15:58       ` Måns Rullgård
@ 2003-12-21 18:31         ` Ben Collins
  2003-12-21 19:09           ` Måns Rullgård
  0 siblings, 1 reply; 9+ messages in thread
From: Ben Collins @ 2003-12-21 18:31 UTC (permalink / raw)
  To: M?ns Rullg?rd; +Cc: linux-kernel

> > 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.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/

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

* Re: Firewire/sbp2 troubles with Linux 2.6.0
  2003-12-21 19:09           ` Måns Rullgård
@ 2003-12-21 18:48             ` Ben Collins
  2003-12-21 19:34               ` Måns Rullgård
  0 siblings, 1 reply; 9+ messages in thread
From: Ben Collins @ 2003-12-21 18:48 UTC (permalink / raw)
  To: M?ns Rullg?rd; +Cc: linux-kernel

> > 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.

> > 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?

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/

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

* Re: Firewire/sbp2 troubles with Linux 2.6.0
  2003-12-21 18:31         ` Ben Collins
@ 2003-12-21 19:09           ` Måns Rullgård
  2003-12-21 18:48             ` Ben Collins
  0 siblings, 1 reply; 9+ messages in thread
From: Måns Rullgård @ 2003-12-21 19:09 UTC (permalink / raw)
  To: Ben Collins; +Cc: linux-kernel

Ben Collins <bcollins@debian.org> writes:

>> > 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.

> 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?

> 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.

-- 
Måns Rullgård
mru@kth.se

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

* Re: Firewire/sbp2 troubles with Linux 2.6.0
  2003-12-21 18:48             ` Ben Collins
@ 2003-12-21 19:34               ` Måns Rullgård
  0 siblings, 0 replies; 9+ messages in thread
From: Måns Rullgård @ 2003-12-21 19:34 UTC (permalink / raw)
  To: Ben Collins; +Cc: linux-kernel

Ben Collins <bcollins@debian.org> writes:

>> > 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?

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>

-- 
Måns Rullgård
mru@kth.se

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

end of thread, other threads:[~2003-12-21 19:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-21  3:26 Firewire/sbp2 troubles with Linux 2.6.0 Måns Rullgård
2003-12-21  3:53 ` Ben Collins
2003-12-21 10:42   ` Måns Rullgård
2003-12-21 14:48     ` Ben Collins
2003-12-21 15:58       ` Måns Rullgård
2003-12-21 18:31         ` Ben Collins
2003-12-21 19:09           ` Måns Rullgård
2003-12-21 18:48             ` Ben Collins
2003-12-21 19:34               ` Måns Rullgård

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox