From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 14:29:44 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D153C16A4CE for ; Sat, 2 Apr 2005 14:29:44 +0000 (GMT) Received: from avscan2.sentex.ca (avscan2.sentex.ca [199.212.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D63143D1D for ; Sat, 2 Apr 2005 14:29:44 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j32ETeDx088173; Sat, 2 Apr 2005 09:29:40 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan2.sentex.ca ([127.0.0.1]) by localhost (avscan2.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 88041-02; Sat, 2 Apr 2005 09:29:40 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j32ETegK088168; Sat, 2 Apr 2005 09:29:40 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j32ETXQv034493; Sat, 2 Apr 2005 09:29:33 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050402092137.06bfe450@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Sat, 02 Apr 2005 09:28:32 -0500 To: Ian Dowse From: Mike Tancsa In-Reply-To: <200504021416.aa22417@salmon.maths.tcd.ie> References: <200504021416.aa22417@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan2b cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 14:29:45 -0000 At 08:16 AM 02/04/2005, Ian Dowse wrote: >In message <6.2.1.2.0.20050331074641.04f72eb8@64.7.153.2>, Mike Tancsa writes: > >panic: uhci_abort_xfer: not in process context >... > >#6 0xc04d2c1f in usbd_abort_pipe (pipe=0xc19c7e00) > >#7 0xc04c3cf5 in ucomstopread (sc=0x0) > >#8 0xc04c38ba in ucomstop (tp=0xc171c000, flag=1) > >#9 0xc054b393 in ttyflush (tp=0xc171c000, rw=1) > >#10 0xc054974d in ttyinput (c=26, tp=0xc171c000) > >In this case I wonder if the transfer needs to be aborted at all, >since it is just restarted immediately afterwards. Mike, maybe you >could try the following patch? Sorry, I haven't tested this, so I >may be missing something obvious. Yes, for sure I will try. One other note, I have been hammering away on a HEAD box for 36hrs now and no panic and even better, NO lockups on the USB serial port. The hardware is a little different, but I dont think that is the issue. [hifn]% dmesg Copyright (c) 1992-2005 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 6.0-CURRENT #0: Fri Apr 1 02:20:32 EST 2005 mdtancsa@hifn.sentex.net:/usr/obj/usr/src/sys/recycle Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Celeron(TM) CPU 1000MHz (1002.28-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x6b1 Stepping = 1 Features=0x383f9ff real memory = 528416768 (503 MB) avail memory = 507805696 (484 MB) npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: on acpi0 acpi_throttle0: on cpu0 acpi_button0: on acpi0 acpi_button1: on acpi0 pcib0: port 0xcf8-0xcff,0x4000-0x407f,0x4080-0x40ff,0x5000-0x500f,0x6000-0x607f on acpi0 pci_link0: irq 12 on acpi0 pci_link1: irq 11 on acpi0 pci_link2: irq 10 on acpi0 pci_link3: irq 5 on acpi0 pci0: on pcib0 agp0: mem 0xe0000000-0xe3ffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xc000-0xc00f at device 7.1 on pci0 ata0: on atapci0 ata1: on atapci0 uhci0: port 0xc400-0xc41f irq 5 at device 7.2 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xc800-0xc81f irq 5 at device 7.3 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered pci0: at device 7.4 (no driver attached) pci0: at device 7.5 (no driver attached) hifn0 mem 0xe810a000-0xe810afff,0xe8108000-0xe8109fff,0xe8100000-0xe8107fff irq 12 at device 9.0 on pci0 hifn0: Hifn 7955, rev 0, 32KB dram, pll=0x800 fxp0: port 0xdc00-0xdc1f mem 0xe810b000-0xe810bfff,0xe8000000-0xe80fffff irq 11 at device 10.0 on pci0 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:a0:c9:5e:e2:94 rl0: port 0xe000-0xe0ff mem 0xe810c000-0xe810c0ff irq 10 at device 15.0 on pci0 miibus1: on rl0 rlphy0: on miibus1 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto rl0: Ethernet address: 00:50:fc:c8:29:94 rl1: port 0xe400-0xe4ff mem 0xe810d000-0xe810d0ff irq 11 at device 17.0 on pci0 miibus2: on rl1 rlphy1: on miibus2 rlphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto rl1: Ethernet address: 00:01:80:0d:c0:d1 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A, console sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A ppc0: port 0x378-0x37f irq 7 on acpi0 ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 orm0: at iomem 0xc0000-0xcbfff on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ucom0: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 2 Timecounter "TSC" frequency 1002277712 Hz quality 800 Timecounters tick every 1.000 msec Fast IPsec: Initialized Security Association Processing. ipfw2 initialized, divert loadable, rule-based forwarding enabled, default to accept, logging limited to 100 packets/entry by default ad0: 38166MB at ata0-master UDMA100 ATA PseudoRAID loaded Trying to mount root from ufs:/dev/ad0s1a rl0: link state changed to DOWN [hifn]% This is also with the uftdi driver [hifn]# usbdevs -v Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev 1.00 port 1 powered port 2 addr 2: full speed, power 90 mA, config 1, USB FAST SERIAL ADAPTER(0x6010), FTDI(0x0403), rev 5.00 Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev 1.00 port 1 powered port 2 powered [hifn]# >Ian > >Index: dev/usb/ucom.c >=================================================================== >RCS file: /dump/FreeBSD-CVS/src/sys/dev/usb/ucom.c,v >retrieving revision 1.51.2.2 >diff -u -r1.51.2.2 ucom.c >--- dev/usb/ucom.c 30 Jan 2005 01:00:10 -0000 1.51.2.2 >+++ dev/usb/ucom.c 2 Apr 2005 13:10:27 -0000 >@@ -929,11 +929,13 @@ > > DPRINTF(("ucomstop: %d\n", flag)); > >+#if 0 > if (flag & FREAD) { > DPRINTF(("ucomstop: read\n")); > ucomstopread(sc); > ucomstartread(sc); > } >+#endif > > if (flag & FWRITE) { > DPRINTF(("ucomstop: write\n"));