From nobody@FreeBSD.org Wed Jun 6 18:10:22 2007 Return-Path: Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 646F516A421 for ; Wed, 6 Jun 2007 18:10:22 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 51EC013C48C for ; Wed, 6 Jun 2007 18:10:22 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l56IAMQQ072029 for ; Wed, 6 Jun 2007 18:10:22 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l56IAMiQ072026; Wed, 6 Jun 2007 18:10:22 GMT (envelope-from nobody) Message-Id: <200706061810.l56IAMiQ072026@www.freebsd.org> Date: Wed, 6 Jun 2007 18:10:22 GMT From: Ralf Folkerts To: freebsd-gnats-submit@FreeBSD.org Subject: fxp0: device timeout when writing to USB and play Sound. X-Send-Pr-Version: www-3.0 >Number: 113427 >Category: kern >Synopsis: [fxp] fxp0: device timeout when writing to USB and play Sound. >Confidential: no >Severity: serious >Priority: low >Responsible: yongari >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 06 18:20:02 GMT 2007 >Closed-Date: Sat Sep 25 22:57:18 UTC 2010 >Last-Modified: Sat Sep 25 22:57:18 UTC 2010 >Originator: Ralf Folkerts >Release: 6.2-STABLE >Organization: >Environment: FreeBSD flounder.home.folkerts-net.de 6.2-STABLE FreeBSD 6.2-STABLE #0: Tue Jun 5 19:53:29 CEST 2007 toor@flounder.home.folkerts-net.de:/usr/obj/usr/src/sys/FLOUNDER i386 >Description: Hi, for quite a while my System keeps getting "fxp0: device timeout"s when I write to a USB Device (either Memory Stick or a CF-Card in a Card Reader); this always happened when I was using X11 (I run KDE), listened to Music (with Amarok) either via a NFS-Share or WebRadio and then tried to write Data to a USB Stick. Even in the cases the Write succeeded the Data on the Stick/CF was corrupted afterwards. When it "stalls" the USB Write will not complete. I thought it might be a Locking Issue and built a new Kernel by copying GENERIC and then added options WITNESS options WITNESS_SKIPSPIN however, unfortunatly now Locking-Issues where output during the Problem. I also thought of a Hardware-Issue; however, when booting into Kubuntu this (Listen to WebRadio with Amarok and then copy data to the USB Stick) works fine (yeah, this is no proof it's not a HW-Problem but a least a clue that it's not). To try I use a dd to copy from /dev/zero to the USB-Device: Jun 6 19:23:24 flounder sudo: ralf : TTY=ttyp1 ; PWD=/home/ralf ; USER=root ; COMMAND=/bin/dd if=/dev/zero of=/dev/da1 bs=16k Jun 6 19:25:58 flounder kernel: nfs server freenas:/mnt/daten: not responding Jun 6 19:26:29 flounder kernel: nfs server freenas:/mnt/daten: not responding Jun 6 19:26:36 flounder kernel: fxp0: device timeout Jun 6 19:27:00 flounder kernel: nfs server freenas:/mnt/daten: not responding Jun 6 19:27:08 flounder kernel: fxp0: device timeout Jun 6 19:27:28 flounder kernel: fxp0: device timeout Jun 6 19:28:35 flounder shutdown: power-down by ralf: Jun 6 19:28:41 flounder kernel: umass0: BBB reset failed, TIMEOUT Jun 6 19:28:41 flounder kernel: fxp0: device timeout My Hardware: A IBM Thinkpad A30p: [ralf@flounder ~]$ pciconf -vl agp0@pci0:0:0: class=0x060000 card=0x021d1014 chip=0x35758086 rev=0x02 hdr=0x00 vendor = 'Intel Corporation' device = '82830[MP] Host-Hub I/F Bridge / SDRAM Controller' class = bridge subclass = HOST-PCI pcib1@pci0:1:0: class=0x060400 card=0x00000000 chip=0x35768086 rev=0x02 hdr=0x01 vendor = 'Intel Corporation' device = '82830M/MP CPU to AGP Bridge' class = bridge subclass = PCI-PCI uhci0@pci0:29:0: class=0x0c0300 card=0x02201014 chip=0x24828086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82801CA/CAM (ICH3-S/ICH3-M) USB Controller' class = serial bus subclass = USB uhci1@pci0:29:1: class=0x0c0300 card=0x02201014 chip=0x24848086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82801CA/CAM (ICH3-S/ICH3-M) USB Controller' class = serial bus subclass = USB uhci2@pci0:29:2: class=0x0c0300 card=0x02201014 chip=0x24878086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82801CA/CAM (ICH3-S/ICH3-M) USB Controller' class = serial bus subclass = USB pcib2@pci0:30:0: class=0x060400 card=0x00000000 chip=0x24488086 rev=0x41 hdr=0x01 vendor = 'Intel Corporation' device = '82801BAM/CAM/DBM (ICH2-M/3-M/4-M) Hub Interface to PCI Bridge' class = bridge subclass = PCI-PCI isab0@pci0:31:0: class=0x060100 card=0x00000000 chip=0x248c8086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82801CAM LPC Interface or ISA bridge: see Notes' class = bridge subclass = PCI-ISA atapci0@pci0:31:1: class=0x01018a card=0x02201014 chip=0x248a8086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82801CAM (ICH3-M) UltraATA/100 EIDE Controller' class = mass storage subclass = ATA none0@pci0:31:3: class=0x0c0500 card=0x02201014 chip=0x24838086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82801CA/CAM (ICH3-S/ICH3-M) SMBus Controller' class = serial bus subclass = SMBus pcm0@pci0:31:5: class=0x040100 card=0x02221014 chip=0x24858086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82801CA/CAM (ICH3-S/ICH3-M) AC'97 Audio Controller' class = multimedia subclass = audio none1@pci0:31:6: class=0x070300 card=0x02231014 chip=0x24868086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82801CA/CAM (ICH3-S/ICH3-M) AC'97 Modem Controller' class = simple comms subclass = generic modem drm0@pci1:0:0: class=0x030000 card=0x02351014 chip=0x4c591002 rev=0x00 hdr=0x00 vendor = 'ATI Technologies Inc' device = 'Mobility 6 Radeon Mobility M6 LY' class = display subclass = VGA cbb0@pci2:0:0: class=0x060700 card=0x01841014 chip=0x04781180 rev=0xa0 hdr=0x02 vendor = 'Ricoh Co Ltd' device = 'RL5c478 CardBus Controller' class = bridge subclass = PCI-CardBus cbb1@pci2:0:1: class=0x060700 card=0x01841014 chip=0x04781180 rev=0xa0 hdr=0x02 vendor = 'Ricoh Co Ltd' device = 'RL5c478 CardBus Controller' class = bridge subclass = PCI-CardBus fwohci0@pci2:0:2: class=0x0c0010 card=0x01cf1014 chip=0x05221180 rev=0x00 hdr=0x00 vendor = 'Ricoh Co Ltd' class = serial bus subclass = FireWire none2@pci2:2:0: class=0x028000 card=0x27028086 chip=0x42208086 rev=0x05 hdr=0x00 vendor = 'Intel Corporation' device = 'PRO/Wireless 2200BG Network Connection' class = network fxp0@pci2:8:0: class=0x020000 card=0x02091014 chip=0x10318086 rev=0x41 hdr=0x00 vendor = 'Intel Corporation' device = '82801CAM (ICH3) PRO/100 VE (LOM) Network Connection' class = network subclass = ethernet The dmesg from the above Problem (taken immediately before shutdown; it doesn't contain the umass0-Message) [ralf@flounder ~]$ cat dmesg.out Copyright (c) 1992-2007 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 6.2-STABLE #0: Tue Jun 5 19:53:29 CEST 2007 toor@flounder.home.folkerts-net.de:/usr/obj/usr/src/sys/FLOUNDER WARNING: WITNESS option enabled, expect reduced performance. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) III Mobile CPU 1200MHz (1198.99-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x6b1 Stepping = 1 Features=0x383f9ff real memory = 670498816 (639 MB) avail memory = 642613248 (612 MB) wlan: mac acl policy registered kbd1 at kbdmux0 ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) acpi0: on motherboard acpi_ec0: port 0x62,0x66 on acpi0 acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 cpu0: on acpi0 acpi_perf0: on cpu0 acpi_lid0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: mem 0xd0000000-0xdfffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) uhci0: port 0x1800-0x181f irq 3 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x1820-0x183f irq 7 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0x1840-0x185f irq 5 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered pcib2: at device 30.0 on pci0 pci2: on pcib2 cbb0: mem 0x50000000-0x50000fff irq 3 at device 0.0 on pci2 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 cbb1: mem 0x50100000-0x50100fff irq 5 at device 0.1 on pci2 cardbus1: on cbb1 pccard1: <16-bit PCCard bus> on cbb1 fwohci0: <1394 Open Host Controller Interface> mem 0xc0202000-0xc02027ff irq 5 at device 0.2 on pci2 fwohci0: OHCI version 1.0 (ROM=0) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:06:1b:02:01:00:39:88 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:06:1b:00:39:88 fwe0: Ethernet address: 02:06:1b:00:39:88 fwe0: if_start running deferred for Giant sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: BUS reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) pci2: at device 2.0 (no driver attached) fxp0: port 0x8000-0x803f mem 0xc0201000-0xc0201fff irq 7 at device 8.0 on pci2 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:d0:59:b6:5d:4a isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1860-0x186f at device 31.1 on pci0 ata0: on atapci0 ata1: on atapci0 pci0: at device 31.3 (no driver attached) pcm0: port 0x1c00-0x1cff,0x18c0-0x18ff irq 5 at device 31.5 on pci0 pcm0: pci0: at device 31.6 (no driver attached) acpi_tz0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Generic PS/2 mouse, device ID 0 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FAST] sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled battery0: on acpi0 acpi_acad0: on acpi0 acpi_ibm0: on acpi0 sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled pmtimer0 on isa0 orm0: at iomem 0xc0000-0xcffff,0xdc000-0xdffff,0xe0000-0xeffff on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 1198985563 Hz quality 800 Timecounters tick every 1.000 msec ad0: 38204MB at ata0-master UDMA100 acd0: DVDROM at ata0-slave UDMA33 ad2: 38154MB at ata1-master UDMA100 Trying to mount root from ufs:/dev/ad0s1a drm0: port 0x3000-0x30ff mem 0xe0000000-0xe7ffffff,0xc0100000-0xc010ffff irq 3 at device 0.0 on pci1 info: [drm] AGP at 0xd0000000 256MB info: [drm] Initialized radeon 1.25.0 20060524 info: [drm] Setting GART location based on new memory map info: [drm] writeback test succeeded in 1 usecs umass0: Generic Mass Storage Device, rev 2.00/1.10, addr 2 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 1.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present da1 at umass-sim0 bus 0 target 0 lun 1 da1: Removable Direct Access SCSI-0 device da1: 1.000MB/s transfers da1: Attempt to query device size failed: NOT READY, Medium not present da2 at umass-sim0 bus 0 target 0 lun 2 da2: Removable Direct Access SCSI-0 device da2: 1.000MB/s transfers da2: Attempt to query device size failed: NOT READY, Medium not present da3 at umass-sim0 bus 0 target 0 lun 3 da3: Removable Direct Access SCSI-0 device da3: 1.000MB/s transfers da3: Attempt to query device size failed: NOT READY, Medium not present info: [drm] Setting GART location based on new memory map info: [drm] writeback test succeeded in 1 usecs nfs server freenas:/mnt/daten: not responding nfs server freenas:/mnt/daten: not responding fxp0: device timeout nfs server freenas:/mnt/daten: not responding fxp0: device timeout fxp0: device timeout I searched the "stable"-ML and also the PRs but didn't find anything that sounded similar. If I can provide more Info pls. let me know! Sorry and thanks for any advice! _ralf_ >How-To-Repeat: - Start X and start listen to Music via WebRadio or NFS-Share (I always tried Amarok (I tried once running this test, which guranteed causes this problem when run as mentioned, from the CL - that time the dd returned normally and Network still worked) - Then insert USB Stick or USB Card Reader and CF card and write to it; my "original" case was the m0n0wall Image; hoever, to reproduce I used dd if=/dev/zero of=/dev/da1 bs=16k. >Fix: >Release-Note: >Audit-Trail: Responsible-Changed-From-To: freebsd-i386->freebsd-kern Responsible-Changed-By: linimon Responsible-Changed-When: Sun Jun 17 09:10:06 UTC 2007 Responsible-Changed-Why: This does not sound i386-specific. http://www.freebsd.org/cgi/query-pr.cgi?pr=113427 State-Changed-From-To: open->feedback State-Changed-By: yongari State-Changed-When: Tue Jun 23 08:13:41 UTC 2009 State-Changed-Why: There was a lot of fxp(4) changes in HEAD and I guess latest fxp(4) may fix your watchdog timeout issues. Blindly enabling Rx lock-up workaround may also have triggered the issue. Could you try fxp(4) in HEAD? If you're using 7-stable or 7.2-RELEASE you can just copy if_fxp.c, if_fxpreg.h and if_fxpvar.h from HEAD to 7-stable/7.2-RELEASE and rebuild kernel. Responsible-Changed-From-To: freebsd-bugs->yongari Responsible-Changed-By: yongari Responsible-Changed-When: Tue Jun 23 08:13:41 UTC 2009 Responsible-Changed-Why: Grab. http://www.freebsd.org/cgi/query-pr.cgi?pr=113427 State-Changed-From-To: feedback->closed State-Changed-By: yongari State-Changed-When: Sat Sep 25 22:55:01 UTC 2010 State-Changed-Why: Feedback timeout(> 15 months). fxp(4) received a lot of enhancesments including various locking fixes as well as bus_dma(9) cleanup since 6.2-RELEASE. If you still see the issue on recent FreeBSD release(8.1-RELEASE or 7.3-RELEASE), please open a new PR. Thanks. http://www.freebsd.org/cgi/query-pr.cgi?pr=113427 >Unformatted: