From owner-freebsd-arm@FreeBSD.ORG Sun Dec 23 10:38:39 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2501398E for ; Sun, 23 Dec 2012 10:38:39 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id 7AD578FC12 for ; Sun, 23 Dec 2012 10:38:37 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 362020910; Sun, 23 Dec 2012 11:38:29 +0100 From: Hans Petter Selasky To: freebsd-arm@freebsd.org Subject: Re: Fwd: Re: EHCI on armv6 with Write-Back caches Date: Sun, 23 Dec 2012 11:40:05 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: <201212201956.47884.hselasky@c2i.net> <201212231059.52064.hselasky@c2i.net> In-Reply-To: <201212231059.52064.hselasky@c2i.net> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201212231140.05327.hselasky@c2i.net> X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 10:38:39 -0000 On Sunday 23 December 2012 10:59:52 Hans Petter Selasky wrote: > On Sunday 23 December 2012 00:06:04 Ralf Wenk wrote: > > > On Friday 21 December 2012 01:18:57 Oleksandr Tymoshenko wrote: > > > > On 12/20/2012 10:56 AM, Hans Petter Selasky wrote: > > > > > FYI - please test! > > > > > > > > > > ---------- Forwarded Message ---------- > > > > > > > > > > Subject: Re: EHCI on armv6 with Write-Back caches > > > > > Date: Thursday 20 December 2012, 19:46:34 > > > > > From: Hans Petter Selasky > > > > > To: Warner Losh > > > > > CC: Andrew Turner , Oleksandr Tymoshenko > > > > > , freebsd-usb@freebsd.org, alfred@freebsd.org, > > > > > freebsd- wireless@freebsd.org > > > > > > > > > > Hi, > > > > > > > > > > I've run some basic tests over here (x86) which passed after some > > > > > patch modifications. Please test and verify for your ARM targets: > > > > > > > > > > http://svnweb.freebsd.org/changeset/base/244500 > > > > > http://svnweb.freebsd.org/changeset/base/244503 > > > > > > > > > > Please also verify that upgt and uwrt and uath still works like > > > > > expected. > > > > > > > > > > --HPS > > > > > > > > if_smsc fails with following diagnostics: > > > > smsc0: error: allocating USB transfers failed > > > > > > > > The problem is that Bulk-In transfer buffer is 5 pages long but tag's > > > > boundary limitation is > > > > a page and it's impossible to allocate 5 pages without crossing page > > > > boundary > > > > > > Can you try again using this patch: > > > > > > http://svnweb.freebsd.org/changeset/base/244535 > > > > Since revision 244503 I get an error after inserting an USB-stick in > > about 50% of the cases. The problem is still there with revision 244535. > > My latest test was with revision 244582. > > > > The kernel messages are: > > > > root@raspberry-pi:~ # ugen0.4: at usbus0 > > umass0: on > > usbus0 umass0: SCSI over Bulk-Only; quirks = 0x4101 > > umass0:0:0:-1: Attached to scbus0 > > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0 > > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an > > error (probe0:umass-sim0:0:0:0): Retrying command > > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0 > > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an > > error (probe0:umass-sim0:0:0:0): Retrying command > > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0 > > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an > > error (probe0:umass-sim0:0:0:0): Retrying command > > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0 > > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an > > error (probe0:umass-sim0:0:0:0): Retrying command > > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0 > > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an > > error (probe0:umass-sim0:0:0:0): Error 5, Retries exhausted > > ugen0.4: at usbus0 (disconnected) > > umass0: at uhub1, port 3, addr 4 (disconnected) > > > > When things go well they are: > > > > root@raspberry-pi:~ # ugen0.4: at usbus0 > > umass0: on > > usbus0 umass0: SCSI over Bulk-Only; quirks = 0x4101 > > umass0:0:0:-1: Attached to scbus0 > > > > root@raspberry-pi:~ # da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 > > da0: Removable Direct Access SCSI-2 > > device da0: 40.000MB/s transfers > > da0: 3817MB (7818240 512 byte sectors: 255H 63S/T 486C) > > > > But even then there is something wrong now: > > > > root@raspberry-pi:~ # gpart show da0 > > => 34 7818173 da0 GPT (3.7G) > > > > 34 2097152 1 freebsd-ufs (1.0G) > > > > 2097186 5721021 - free - (2.7G) > > > > root@raspberry-pi:~ # mount /dev/da0p1 /mnt > > g_vfs_done():da0p1[READ(offset=65536, length=8192)]error = 6 > > mount: /dev/da0p1: Device not configured > > > > > > I am using a RPI-B kernel configuration with serial boot console and > > added options MSDOSFS and GEOM_PART_GPT. With older revisions they > > worked. The USB-stick is OK. I verified that with my PC. > > Hi, > > Can you figure out which revision was causing this regression? > > BTW: src/sys/dev/usb/usb_transfer.c > > Change: > > if (!xfer->flags.ext_buffer) { > #if USB_HAVE_BUSDMA > struct usb_page_search page_info; > struct usb_page_cache *pc; > > > Into: > > if (!xfer->flags.ext_buffer) { > #if 0 > struct usb_page_search page_info; > struct usb_page_cache *pc; > > And only this one. > > Any difference? > Hi, Can you run usbdump and collect USB traces from the failing and non-failing case. Then remove the timestamps using "sed" and do a diff. --HPS