From owner-freebsd-arm@FreeBSD.ORG Tue Apr 22 17:08:23 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 308C1106564A; Tue, 22 Apr 2008 17:08:23 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id ACD0E8FC14; Tue, 22 Apr 2008 17:08:22 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.2/8.14.2) with ESMTP id m3MGom7u081639; Tue, 22 Apr 2008 11:50:48 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1208883048; bh=TbTEOUPe8qNCDjJ9zfQ358naPe4=; h=Date: From:Message-Id:To:Subject:Cc:In-Reply-To; b=SeAK5SRyDnQ5nICXJwMuF 1qamroVTX9qZwdnbnypeRPaZ3yvOQUIhjmYOYLqR4Op0XCB/s1KdpExwyze+o1gBS25 1c1gP9IDJ9DVOygaXL/ktKi5otEoqkphSzPmi9fehaL2C7jbd2w39F4uS1b7r1uJ5Lp rlfeM7bfy0KKBz/c= Received: (from tinguely@localhost) by casselton.net (8.14.2/8.14.2/Submit) id m3MGol5o081637; Tue, 22 Apr 2008 11:50:47 -0500 (CDT) (envelope-from tinguely) Date: Tue, 22 Apr 2008 11:50:47 -0500 (CDT) From: Mark Tinguely Message-Id: <200804221650.m3MGol5o081637@casselton.net> To: freebsd-arm@freebsd.org, hselasky@c2i.net In-Reply-To: <200804212222.57503.hselasky@c2i.net> Cc: jhb@freebsd.org Subject: Re: AT91RM9200 and possibly other ARM targets are broken in 8-current after recent commit (more) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2008 17:08:23 -0000 > I've found a new issue :-( > > The OHCI driver does not work in 8-current when using the USB P4 project. I > get garbage data when I do USB transfers. I suspect that there is something > wrong with the cache flush and invalidate stuff in relation to bus_dma. I > have carefully reviewed the OHCI driver and it uses the "bus_dmamap_sync" > function properly. > > Using my USB patchset to build the same USB code on 7-current does not yield > these problems. > > I see that there has been a lot of changes to "sys/arm/arm/pmap.c" for > example. I quickly looked at the new_usb_1_7_3 code and noticed that it should be allocation memory with BUS_DMA_COHERENT flag set. What this means is after the memory is allocated, a new, non-cachable VM address is allocated and used in the place of the original address. I *think* this new address lives in DMA S/G lists and should not be mapped into an address space except to temporarily to copy data in/out. I will assume this assumption is incorrect and look through the pmap code all over again. > Do you have a clue about what is causing this ? > > --HPS > > Output from 7-current: > > usb0: 12Mbps Full Speed USB v1.0 > uhub0: on usb0 > uhub0: 2 ports with 2 removable, self powered > uplcom0: 1.10/4.00, addr 2> on usb0 > usbd_alloc_device: set address 3 failed (ignored) > usbd_alloc_device: getting device descriptor at addr 3 failed! > uhub0:uhub_reattach_port: could not allocate new device! > mmc0: setting transfer rate to 30.000MHz > > Output from 8-current: > > uplcom0: on usb1 > uplcom0: failed to set configuration, error=USBD_ERR_SHORT_XFER > device_attach: uplcom0 attach returned 6 There are two clues of short transfers - could that be a clue? 1) attach's descriptor string is only 17 character rather than expected 48 - and the 17 characters are not Unicode. 2) set configuration has a USBD_ERR_SHORT_XFER error. I don't know if turning on USB debug printing will give more clues. I will look through the pmap code and see if I can chase up something. --Mark.