Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Dec 2012 10:59:52 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        Ralf Wenk <iz-rpi03@hs-karlsruhe.de>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Fwd: Re: EHCI on armv6 with Write-Back caches
Message-ID:  <201212231059.52064.hselasky@c2i.net>
In-Reply-To: <E1TmY92-0066I4-A8@smtp.hs-karlsruhe.de>
References:  <201212201956.47884.hselasky@c2i.net> <201212211520.46822.hselasky@c2i.net> <E1TmY92-0066I4-A8@smtp.hs-karlsruhe.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <hselasky@c2i.net>
> > > > To: Warner Losh <imp@bsdimp.com>
> > > > CC: Andrew Turner <andrew@fubar.geek.nz>, Oleksandr Tymoshenko
> > > > <gonzo@freebsd.org>, 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: <Kingston> at usbus0
> umass0: <Kingston DataTraveler G2, class 0/0, rev 2.00/2.00, addr 4> 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: <Kingston> at usbus0 (disconnected)
> umass0: at uhub1, port 3, addr 4 (disconnected)
> 
> When things go well they are:
> 
> root@raspberry-pi:~ # ugen0.4: <Kingston> at usbus0
> umass0: <Kingston DataTraveler G2, class 0/0, rev 2.00/2.00, addr 4> 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: <Kingston DataTraveler G2 1.00> 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?

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212231059.52064.hselasky>