Bug 97208 - [firewire] System hangs / locks up when a firewire disk is attached
Summary: [firewire] System hangs / locks up when a firewire disk is attached
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.1-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-firewire (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-13 18:00 UTC by Torfinn Ingolfsen
Modified: 2018-05-28 19:49 UTC (History)
1 user (show)

See Also:


Attachments
fw-dmesg.txt (63.96 KB, text/plain)
2009-02-07 15:19 UTC, Torfinn Ingolfsen
no flags Details
fwcontrol.txt (112 bytes, text/plain)
2009-02-07 15:19 UTC, Torfinn Ingolfsen
no flags Details
fwcontrol-p.txt (1.33 KB, text/plain)
2009-02-07 15:19 UTC, Torfinn Ingolfsen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torfinn Ingolfsen 2006-05-13 18:00:38 UTC

(I selected the 'misc' category, because I don't know if this problem is amd64 specific)

I'm running FreeBSD / amd64 on a Gigabyte K8-NF-9 mainboard. When I attach a firewire disk, the machine hangs l/ locks up. When I use the usb interface on the same external disk, everything works as expected.
Details:
When FreeBSD is up, and I attach a  (external) firewire disk, FreeBSD
freezes or hangs. It is totally unresponsive, even the console.
If I turn off / on the power to the firewire disk, nothing happens.
If I keep firewire disk power on, and detach the firewire cable, the
following message(s) appear on the console:
fwochi0: BUS reset
fwochi0: node_id=0xc800ffc0, gen=103, CYCLEMASTER mode
firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager (me)
fwohci0: phy int

If I re-attach the firewire cable, nothing happens.
If I detach the firewire cable after that, I get a new message as above,
but with a different 'gen=' number.

I have to remove the firewire cable and reset the machine to get it
going again.

If the firewire disk is attached when the machine boot, the boot hangs
and never finishes (well, not for 15 mins at least).'

The disk in question is a Maxtor OneTouch II, 300GB, and it has both
firewire and usb interfaces. If I attach the usb interface, I get the
following in /var/log /messages:
May 13 18:17:53 kg-fil kernel: umass0: Maxtor OneTouch II, rev 2.00/2.03, addr 2
May 13 18:17:53 kg-fil kernel: umass0: Get Max Lun not supported (STALLED)
May 13 18:17:53 kg-fil kernel: da0 at umass-sim0 bus 0 target 0 lun 0
May 13 18:17:53 kg-fil kernel: da0: <Maxtor OneTouch II 023g> Fixed Direct Access SCSI-4 device 
May 13 18:17:53 kg-fil kernel: da0: 40.000MB/s transfers
May 13 18:17:53 kg-fil kernel: da0: 286188MB (586114704 512 byte sectors: 255H 63S/T 36483C)

and if I try to mount it, I get:
May 13 18:18:33 kg-fil kernel: mountmsdosfs(): disk too big, sorry

which is expected, as I don't have the
options	MSDOSFS_LARGE
in my kernel config.

Fix: 

- no fix known at this time.
How-To-Repeat: 

- attach a firewire disk to the machine.
Comment 1 Gavin Atkinson freebsd_committer freebsd_triage 2009-02-02 20:54:53 UTC
State Changed
From-To: open->feedback

To submitter: I'm sorry that this PR has laid dormant for so 
long.  Do you know if this is still a problem with newer 
versions of FreeBSD? 


Comment 2 Gavin Atkinson freebsd_committer freebsd_triage 2009-02-02 20:54:53 UTC
Responsible Changed
From-To: freebsd-bugs->gavin

Track
Comment 3 Gavin Atkinson freebsd_committer freebsd_triage 2009-02-03 10:09:52 UTC
-------- Forwarded Message --------
From: Torfinn Ingolfsen <torfinn.ingolfsen@broadpark.no>
To: gavin@FreeBSD.org
Cc: freebsd-bugs@FreeBSD.org
Date: Tue, 03 Feb 2009 00:16:52 +0100

Hello,

On Mon, 02 Feb 2009 20:56:25 +0000 (GMT)
gavin@FreeBSD.org wrote:

> To submitter: I'm sorry that this PR has laid dormant for so
> long.  Do you know if this is still a problem with newer
> versions of FreeBSD?

The machine currently runs FreeBSD 6.2-stable:
root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.2-STABLE FreeBSD 6.2-STABLE #20: Mon Mar 12 23:04:49 CET 2007     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL60  amd64

and the problem still exists there.

However, I did try booting off a FreeBSD 7.1-release / amd64 livefs cd. With 7.1-release, the machine doesn't hang, bot the console fills up with messages:
fwohci0: phy int

and the disk never attaches. I can detach the disk and attach it without the machine hanging (but lots of "phy int" messages when the disk is attached). I guess that's a bit of progress.

Missing from my first report was the make of firewire controller:
root@kg-fil# pciconf -lv | grep FireWire -B 4
fwohci0@pci1:10:0:	class=0x0c0010 card=0x10001458 chip=0x8025104c rev=0x01 hdr=0x00
    vendor     = 'Texas Instruments (TI)'
    device     = 'TSB82AA2 1394b OHCI-Lynx IEEE 1394 Host Controller'
    class      = serial bus
    subclass   = FireWire

HTH
Comment 4 Gavin Atkinson freebsd_committer freebsd_triage 2009-02-03 10:10:01 UTC
State Changed
From-To: feedback->open

Submitter confirms that this still causes problems with 7.1 


Comment 5 Gavin Atkinson freebsd_committer freebsd_triage 2009-02-03 10:10:01 UTC
Responsible Changed
From-To: gavin->freebsd-firewire

Over to maintainer(s)
Comment 6 sean.bruno 2009-02-03 17:22:22 UTC
Interesting.  I have a very similar board in my test machine.

Differences are that I am running i386 and not amd64.

A couple of things I'd like to have tested.

1.  Use a i386 livefs CD instead, just as a test.  See if the same
problem manifests itself(icky, I really hope it's not this one).

2.  after your BSD box is powered up, please set some debugging flags:
	"sysctl debug.sbp_debug=2"
	"sysctl debug.firewire_debug=2"
	send me the output from the console when connecting your device.  You
may be able to grab the dmesg and send it to me.

3.  "fwcontrol" output and "fwcontrol -p" would be nice as well.

4.  Specifically, what type of firewire drive is this?

Sean
Comment 7 sean.bruno 2009-02-03 17:37:18 UTC
Also, there do appear to be some kind of "updates" for this Maxtor
series drive.

Have you updated it with the s/w on the Maxtor website?

Sean
Comment 8 Torfinn Ingolfsen 2009-02-07 14:12:00 UTC
Hello,

On Tue, 03 Feb 2009 09:37:18 -0800
Sean Bruno <sean.bruno@dsl-only.net> wrote:

> Also, there do appear to be some kind of "updates" for this Maxtor
> series drive.
> 
> Have you updated it with the s/w on the Maxtor website?

The drive in question is a Maxtor OneTouch II, 300GB drive with both
usb and firewire ports on it.
I have checked Maxtor.com for the updates you mention, but the only
thing I could find were:
- os specific drivers for Windows, OS X
- updates to included backup software (again Windows and / or OS X
specific)

If therer are firmware updates for this drive, could you plase point me
to it?

Thanks!
-- 
Regards,
Torfinn Ingolfsen,
Norway
Comment 9 Torfinn Ingolfsen 2009-02-07 15:19:45 UTC
On Tue, 03 Feb 2009 09:22:22 -0800
Sean Bruno <sean.bruno@dsl-only.net> wrote:

> 1.  Use a i386 livefs CD instead, just as a test.  See if the same
> problem manifests itself(icky, I really hope it's not this one).

Ok. All further tests done with FreeBSD 7.1-release / i386, unless
otherwise noted.

With i386, I still have the problem that dmesg fills up with messages
"phy int" and the drive does not attach. The machine does not hang, I
can attach and deattach the drive several times

> 2.  after your BSD box is powered up, please set some debugging flags:
> 	"sysctl debug.sbp_debug=2"
> 	"sysctl debug.firewire_debug=2"

done.

> 	send me the output from the console when connecting your
> device.  You may be able to grab the dmesg and send it to me.

Well, the console / dmesg  very quickly fills up with "phy int"
messages. I have done a quick connect / disconnect of the drive, in
hope that you will get dsome meaningful messages. dmesg output attahed.

> 3.  "fwcontrol" output and "fwcontrol -p" would be nice as well.

Attached.

> 
> 4.  Specifically, what type of firewire drive is this?

Maxtor OneTouch II, 300 GB, usb and firewire ports.

HTH
-- 
Regards,
Torfinn Ingolfsen,
Norway
Comment 10 Alexey Dokuchaev freebsd_committer freebsd_triage 2015-09-18 13:41:46 UTC
Recently I've got SBP-2 target revision 4 capable enclosure for SATA disks; neither 8.4-STABLE nor -CURRENT hang on attach, but disk is not accessible.

I've filed separate bug #203188 for that issue.
Comment 11 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:49:40 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.