From owner-cvs-src@FreeBSD.ORG Sat Apr 12 19:34:00 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7067D1065671; Sat, 12 Apr 2008 19:34:00 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id D3A658FC13; Sat, 12 Apr 2008 19:33:59 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.1/8.14.1/ALCHEMY.FRANKEN.DE) with ESMTP id m3CJXwYp063364; Sat, 12 Apr 2008 21:33:58 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.1/8.14.1/Submit) id m3CJXwuK063363; Sat, 12 Apr 2008 21:33:58 +0200 (CEST) (envelope-from marius) Date: Sat, 12 Apr 2008 21:33:58 +0200 From: Marius Strobl To: Sam Leffler Message-ID: <20080412193358.GA44768@alchemy.franken.de> References: <200803201619.m2KGJQr7033985@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200803201619.m2KGJQr7033985@repoman.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/usb ehci.c ohci.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2008 19:34:00 -0000 On Thu, Mar 20, 2008 at 04:19:26PM +0000, Sam Leffler wrote: > sam 2008-03-20 16:19:25 UTC > > FreeBSD src repository > > Modified files: > sys/dev/usb ehci.c ohci.c > Log: > Workaround design botch in usb: blindly mixing bus_dma with PIO does not > work on architectures with a write-back cache as the PIO writes end up > in the cache which the sync(BUS_DMASYNC_POSTREAD) in usb_transfer_complete > then discards; compensate in the xfer methods that do PIO by pushing the > writes out of the cache before usb_transfer_complete is called. > > This fixes USB on xscale and likely other places. > > Sponsored by: hobnob > Reviewed by: cognet, imp > MFC after: 1 month > > Revision Changes Path > 1.62 +16 -0 src/sys/dev/usb/ehci.c > 1.171 +16 -0 src/sys/dev/usb/ohci.c This causes a crash during boot on sparc64. Looks like map is still NULL at that point. Marius ohci0: mem 0x1000000-0x1000fff at d0 ohci0: Reserved 0x1000 bytes for rid 0x10 type 3 at 0x1000000 ohci0: [GIANT-LOCKED] ohci0: [ITHREAD] usb0: OHCI version 1.0, legacy support usb0: on ohci0 usb0: USB revision 1.0 panic: trap: fast data access mmu miss cpuid = 0 KDB: enter: panic [thread pid 0 tid 100000 ] Stopped at kdb_enter+0x80: ta %xcc, 1 db> bt Tracing pid 0 tid 100000 td 0xc076d8e0 panic() at panic+0x208 trap() at trap+0x4d0 -- fast data access mmu miss tar=0 %o7=0xc0226f1c -- iommu_dvmamap_sync() at iommu_dvmamap_sync+0x4 ohci_root_ctrl_start() at ohci_root_ctrl_start+0xe4c ohci_root_ctrl_transfer() at ohci_root_ctrl_transfer+0x1c usbd_start_transfer() at usbd_start_transfer+0x188 usbd_transfer() at usbd_transfer+0x128 usbd_sync_transfer() at usbd_sync_transfer+0x10 usbd_do_request_flags_pipe() at usbd_do_request_flags_pipe+0x5c usbd_do_request_flags() at usbd_do_request_flags+0x1c usbd_do_request() at usbd_do_request+0x1c usbd_set_address() at usbd_set_address+0x34 usbd_new_device() at usbd_new_device+0x3a4 usb_attach() at usb_attach+0x16c device_attach() at device_attach+0x4a4 device_probe_and_attach() at device_probe_and_attach+0x14c ohci_pci_attach() at ohci_pci_attach+0x8bc device_attach() at device_attach+0x4a4 device_probe_and_attach() at device_probe_and_attach+0x14c bus_generic_attach() at bus_generic_attach+0x10 ofw_pcibus_attach() at ofw_pcibus_attach+0x680 device_attach() at device_attach+0x4a4 device_probe_and_attach() at device_probe_and_attach+0x14c bus_generic_attach() at bus_generic_attach+0x10 psycho_attach() at psycho_attach+0x1124 device_attach() at device_attach+0x4a4 device_probe_and_attach() at device_probe_and_attach+0x14c bus_generic_attach() at bus_generic_attach+0x10 nexus_attach() at nexus_attach+0x4fc device_attach() at device_attach+0x4a4 device_probe_and_attach() at device_probe_and_attach+0x14c root_bus_configure() at root_bus_configure+0x28 configure() at configure+0x4 mi_startup() at mi_startup+0x18c btext() at btext+0x34 > addr2line -fe kernel.debug 0xc057e9e4 iommu_dvmamap_sync /usr/home/marius/co/ts/src/sys/sparc64/sparc64/iommu.c:1137