From owner-freebsd-usb@freebsd.org Mon Nov 2 12:22:28 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC81AA246EA for ; Mon, 2 Nov 2015 12:22:28 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from mail.embedded-brains.de (host-82-135-62-35.customer.m-online.net [82.135.62.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BF331195 for ; Mon, 2 Nov 2015 12:22:27 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id A5E8F2A181A; Mon, 2 Nov 2015 13:23:02 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id qCu504VXYRsw; Mon, 2 Nov 2015 13:23:02 +0100 (CET) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 3AA5F2A1930; Mon, 2 Nov 2015 13:23:02 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id M1ctQLF7o02W; Mon, 2 Nov 2015 13:23:02 +0100 (CET) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 227802A181A; Mon, 2 Nov 2015 13:23:02 +0100 (CET) Subject: Re: [PATCH] dwc_otg: Reduce interrupt load To: Hans Petter Selasky , freebsd-usb@freebsd.org References: <1446212307-4660-1-git-send-email-sebastian.huber@embedded-brains.de> <56338480.3090607@selasky.org> From: Sebastian Huber Message-ID: <5637557A.1070007@embedded-brains.de> Date: Mon, 2 Nov 2015 13:22:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56338480.3090607@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 12:22:28 -0000 On 30/10/15 15:53, Hans Petter Selasky wrote: > On 10/30/15 14:38, Sebastian Huber wrote: >> Tested on an Altera Cyclone V development kit. Here the controller ha= s >> 16 host channels. This change significantly reduced the time spent in >> the dwc_otg_interrupt_poll_locked() function. > > Hi, > > Thank you for your optimisation patch: > > https://svnweb.freebsd.org/changeset/base/290195 Thanks. > > > How does the DWC OTG driver from FreeBSD work with your setup?=20 After an update of the USB stack from 9.3 to current it worked out of=20 the box. Thanks a lot for your great USB stack! It seems that this driver doesn't support DMA. I see a quite high CPU=20 utilization in this area: static void dwc_otg_interrupt_poll_locked(struct dwc_otg_softc *sc) { [...] if (sc->sc_last_rx_status !=3D 0) { [...] temp =3D GRXSTSRD_BCNT_GET( sc->sc_last_rx_status); ep_no =3D GRXSTSRD_CHNUM_GET( sc->sc_last_rx_status); /* receive data, if any */ if (temp !=3D 0) { DPRINTF("Reading %d bytes from ep %d\n", temp, ep_no); bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl, DOTG_DFIFO(ep_no), sc->sc_rx_bounce_buffer, (temp + 3) / 4); } --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=E4ftliche Mitteilung im Sinne des EHUG. From owner-freebsd-usb@freebsd.org Mon Nov 2 12:40:10 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 564ECA24BCC for ; Mon, 2 Nov 2015 12:40:10 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F5D4197C for ; Mon, 2 Nov 2015 12:40:09 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id BF44F1FE023; Mon, 2 Nov 2015 13:40:07 +0100 (CET) Subject: Re: [PATCH] dwc_otg: Reduce interrupt load To: Sebastian Huber , freebsd-usb@freebsd.org References: <1446212307-4660-1-git-send-email-sebastian.huber@embedded-brains.de> <56338480.3090607@selasky.org> <5637557A.1070007@embedded-brains.de> From: Hans Petter Selasky Message-ID: <56375A12.9060000@selasky.org> Date: Mon, 2 Nov 2015 13:41:54 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5637557A.1070007@embedded-brains.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 12:40:10 -0000 On 11/02/15 13:22, Sebastian Huber wrote: > > > On 30/10/15 15:53, Hans Petter Selasky wrote: >> On 10/30/15 14:38, Sebastian Huber wrote: >>> Tested on an Altera Cyclone V development kit. Here the controller has >>> 16 host channels. This change significantly reduced the time spent in >>> the dwc_otg_interrupt_poll_locked() function. >> >> Hi, >> >> Thank you for your optimisation patch: >> >> https://svnweb.freebsd.org/changeset/base/290195 > > Thanks. > Hi, > After an update of the USB stack from 9.3 to current it worked out of > the box. Thanks a lot for your great USB stack! > > It seems that this driver doesn't support DMA. I see a quite high CPU > utilization in this area: That's sounds right. Adding DMA support is some extra work, because there are many USB endpoint combinations that needs to work. Also HOST and DEVICE mode needs to be tested. One problem with the DWC OTG is that you cannot switch individual so-called channels into DMA mode. It is either all-DMA or no DMA. That makes it more difficult to add. If you want to add DMA support I will be happy to add patches to the tree for that, but the patches must be such that it is possible to select DMA or PIO mode. For some kinds of USB traffic, like USB keyboards, USB audio and USB mice, PIO mode is optimal, because the amount of data transferred per interrupt is minimal. For mass storage and ethernet you would like to have DMA support. Or have a dedicated CPU for USB. Possibly the next USB controller driver to be added to FreeBSD is the DWC OTG v3. It is an all-DMA based controller, which also supports superspeed. --HPS From owner-freebsd-usb@freebsd.org Mon Nov 2 12:41:54 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E819AA24CA6 for ; Mon, 2 Nov 2015 12:41:53 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEFED1B24 for ; Mon, 2 Nov 2015 12:41:53 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3990C1FE023; Mon, 2 Nov 2015 13:41:45 +0100 (CET) Subject: Re: Non working USB stick in FreeBSD. To: "Ranjan1018 ." <214748mv@gmail.com> References: <562FA2E8.1020003@selasky.org> Cc: freebsd-usb@freebsd.org From: Hans Petter Selasky Message-ID: <56375A74.2040704@selasky.org> Date: Mon, 2 Nov 2015 13:43:32 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 12:41:54 -0000 On 10/29/15 10:29, Ranjan1018 . wrote: > 2015-10-27 17:14 GMT+01:00 Hans Petter Selasky : > >> On 10/27/15 17:05, Ranjan1018 . wrote: >> >>> I have a 64GB USB stick that works correctly in Windows and Linux but not >>> in FreeBSD. The problem is during the write. >>> >>> In FreeBSD I have tested the stick with the command: >>> >>> # dd if=/dev/zero of=/dev/daX bs=1m >>> >>> and, after some time, I received these errors in i386 and amd64: >>> >>> >> Hi, >> > > Hi Hans, > thank you for your answer. > >> >> Are you sure the disk is of the size advertised? >> > > In Linux I obtain: > > $ uname -a > > Linux phenom2 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u2 x86_64 GNU/Linux > > $ sudo dd if=/dev/zero of=/dev/sdf obs=1M seek=8100 > > dd: writing to `/dev/sdf': No space left on device > > 114485248+0 records in > > 55900+0 records out > > 58615398400 bytes (59 GB) copied, 20869.4 s, 2.8 MB/s > > > >> How many 512-byte blocks are successfully written? >> >> In FreeBSD : > > # uname -a > > FreeBSD microserver 10.2-STABLE FreeBSD 10.2-STABLE #4 r289314M: Wed Oct 14 > 15:38:08 CEST 2015 root@microserver:/usr/obj/usr/src/sys/GENERIC amd64 > > # dd if=/dev/zero of=/dev/da0 bs=1m > > dd: /dev/da0: Input/output error > > 8140+0 records in > > 8139+0 records out > > 8534360064 bytes transferred in 3013.528065 secs (2832016 bytes/sec) > > # uname -a > > FreeBSD qbic 10.1-STABLE FreeBSD 10.1-STABLE #0: Sat May 9 07:53:21 CEST > 2015 root@ativ:/usr/obj/i386.i386/root/TEMP/i386_SRC/src/sys/KSTACK_PAGES_4 > i386 > > [root@qbic ~]# dd if=/dev/zero of=/dev/da2 bs=1m > > dd: /dev/da2: Input/output error > > 8140+0 records in > > 8139+0 records out > > 8534360064 bytes transferred in 3011.855356 secs (2833589 bytes/sec) > > # uname -a > > FreeBSD ativ 11.0-CURRENT FreeBSD 11.0-CURRENT #10 r289378M: Thu Oct 15 > 21:57:57 CEST 2015 root@ativ:/usr/obj/usr/src/sys/GENERIC amd64 > > [root@ativ ~]# dd if=/dev/zero of=/dev/da1 bs=1m > > dd: /dev/da1: Input/output error > > 8140+0 records in > > 8139+0 records out > > 8534360064 bytes transferred in 3041.663436 secs (2805820 bytes/sec) > > [root@ativ ~/bin]# dd if=/dev/zero of=/dev/da1 bs=1m seek=12140 > > dd: /dev/da1: Input/output error > > 69+0 records in > > 68+0 records out > > 71303168 bytes transferred in 35.119861 secs (2030280 bytes/sec) > > [root@ativ ~/bin]# dd if=/dev/zero of=/dev/da1 bs=1m seek=12200 > > dd: /dev/da1: Input/output error > > 9+0 records in > > 8+0 records out > > 8388608 bytes transferred in 13.562622 secs (618509 bytes/sec) > Hi, What does "dmesg" say after these errors? Maybe you have a bad sector? Did you try to add "conv=noerror" to dd ? Did you try "bs=65536" or "bs=512" ? --HPS From owner-freebsd-usb@freebsd.org Wed Nov 4 08:41:31 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 582BBA25B42 for ; Wed, 4 Nov 2015 08:41:31 +0000 (UTC) (envelope-from 214748mv@gmail.com) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 214D81975 for ; Wed, 4 Nov 2015 08:41:31 +0000 (UTC) (envelope-from 214748mv@gmail.com) Received: by igbhv6 with SMTP id hv6so30830981igb.0 for ; Wed, 04 Nov 2015 00:41:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sN+q6Z3Aj2DUImSkJt2SVnB12xsILWjmZ+nCtGYDABQ=; b=rs/PVWTcMhaOGwFjt+eaBT9fnt2ig2yDkpR8xF2ehK+VI3KOiAhjCsP2Wr02cPV1Lj loIFFzAtavV4Sd72IT1uY3hzS5qqko0qxkNn7ILWdb9wgIq7YRgnJ6XTXkuUiACG2hoH 7YxIpLSUADWzf50C3bYnhpNtZLwbDs3wQDWiJpuhubWtNxZtLX5J+xq37kTmKHxylOG2 fq5q44okAVyJLqQ1u9mk+UkQgWOeowa/cLa6Ob9WcjCYEQgNlnDqb+kZWUwLmi4N9+w9 CC9pdMX96/D9BLCLdCtqKBk6DF1chkU6OvLRjB0Yfjggay+ww6oiftT/u6B0Oim8dXmW N99A== MIME-Version: 1.0 X-Received: by 10.50.50.139 with SMTP id c11mr1896139igo.10.1446626490641; Wed, 04 Nov 2015 00:41:30 -0800 (PST) Received: by 10.79.70.130 with HTTP; Wed, 4 Nov 2015 00:41:30 -0800 (PST) In-Reply-To: <56375A74.2040704@selasky.org> References: <562FA2E8.1020003@selasky.org> <56375A74.2040704@selasky.org> Date: Wed, 4 Nov 2015 09:41:30 +0100 Message-ID: Subject: Re: Non working USB stick in FreeBSD. From: "Ranjan1018 ." <214748mv@gmail.com> To: Hans Petter Selasky Cc: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 08:41:31 -0000 2015-11-02 13:43 GMT+01:00 Hans Petter Selasky : > On 10/29/15 10:29, Ranjan1018 . wrote: > >> 2015-10-27 17:14 GMT+01:00 Hans Petter Selasky : >> >> On 10/27/15 17:05, Ranjan1018 . wrote: >>> >>> I have a 64GB USB stick that works correctly in Windows and Linux but not >>>> in FreeBSD. The problem is during the write. >>>> >>>> In FreeBSD I have tested the stick with the command: >>>> >>>> # dd if=/dev/zero of=/dev/daX bs=1m >>>> >>>> and, after some time, I received these errors in i386 and amd64: >>>> >>>> >>>> Hi, >>> >>> >> Hi Hans, >> thank you for your answer. >> >> >>> Are you sure the disk is of the size advertised? >>> >>> >> In Linux I obtain: >> >> $ uname -a >> >> Linux phenom2 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u2 x86_64 GNU/Linux >> >> $ sudo dd if=/dev/zero of=/dev/sdf obs=1M seek=8100 >> >> dd: writing to `/dev/sdf': No space left on device >> >> 114485248+0 records in >> >> 55900+0 records out >> >> 58615398400 bytes (59 GB) copied, 20869.4 s, 2.8 MB/s >> >> >> >> How many 512-byte blocks are successfully written? >>> >>> In FreeBSD : >>> >> >> # uname -a >> >> FreeBSD microserver 10.2-STABLE FreeBSD 10.2-STABLE #4 r289314M: Wed Oct >> 14 >> 15:38:08 CEST 2015 root@microserver:/usr/obj/usr/src/sys/GENERIC >> amd64 >> >> # dd if=/dev/zero of=/dev/da0 bs=1m >> >> dd: /dev/da0: Input/output error >> >> 8140+0 records in >> >> 8139+0 records out >> >> 8534360064 bytes transferred in 3013.528065 secs (2832016 bytes/sec) >> >> # uname -a >> >> FreeBSD qbic 10.1-STABLE FreeBSD 10.1-STABLE #0: Sat May 9 07:53:21 CEST >> 2015 root@ativ >> :/usr/obj/i386.i386/root/TEMP/i386_SRC/src/sys/KSTACK_PAGES_4 >> i386 >> >> [root@qbic ~]# dd if=/dev/zero of=/dev/da2 bs=1m >> >> dd: /dev/da2: Input/output error >> >> 8140+0 records in >> >> 8139+0 records out >> >> 8534360064 bytes transferred in 3011.855356 secs (2833589 bytes/sec) >> >> # uname -a >> >> FreeBSD ativ 11.0-CURRENT FreeBSD 11.0-CURRENT #10 r289378M: Thu Oct 15 >> 21:57:57 CEST 2015 root@ativ:/usr/obj/usr/src/sys/GENERIC amd64 >> >> [root@ativ ~]# dd if=/dev/zero of=/dev/da1 bs=1m >> >> dd: /dev/da1: Input/output error >> >> 8140+0 records in >> >> 8139+0 records out >> >> 8534360064 bytes transferred in 3041.663436 secs (2805820 bytes/sec) >> >> [root@ativ ~/bin]# dd if=/dev/zero of=/dev/da1 bs=1m seek=12140 >> >> dd: /dev/da1: Input/output error >> >> 69+0 records in >> >> 68+0 records out >> >> 71303168 bytes transferred in 35.119861 secs (2030280 bytes/sec) >> >> [root@ativ ~/bin]# dd if=/dev/zero of=/dev/da1 bs=1m seek=12200 >> >> dd: /dev/da1: Input/output error >> >> 9+0 records in >> >> 8+0 records out >> >> 8388608 bytes transferred in 13.562622 secs (618509 bytes/sec) >> >> > Hi, > > What does "dmesg" say after these errors? Maybe you have a bad sector? > > Did you try to add "conv=noerror" to dd ? > > Did you try "bs=65536" or "bs=512" ? > > Hi Hans, I have tested the USB stick with 3 different hardware on 3 different operating systems but is not possible to write, without errors, on it. Sorry for the noise. In FreeBSD 10.2-RELEASE with f3write: # f3write /media/da0s1 Free space: 62.48 GB Creating file 1.h2w ... OK! Creating file 2.h2w ... OK! Creating file 3.h2w ... OK! Creating file 4.h2w ... 6.39% -- 1.00 KB/s -- 14:58:04 6.39% -- 1.00 KB/s -- 17:40:25Assertion failed: (!fdatasync(fd)), function measure, file f3write.c, line 241. Abort trap (core dumped) dmesg output: (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 00 9d 49 00 00 40 00 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Retrying command (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 00 9d 49 00 00 40 00 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Retrying command (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 00 9d 49 00 00 40 00 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Retrying command (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 00 9d 49 00 00 40 00 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Retrying command (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 00 9d 49 00 00 40 00 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Error 5, Retries exhausted g_vfs_done():da0s1[WRITE(offset=17068856320, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17068921856, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17068987392, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069052928, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069118464, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069184000, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069249536, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069315072, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069380608, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069446144, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069511680, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069577216, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069642752, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069708288, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069773824, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069839360, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069904896, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17069970432, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17070035968, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17070101504, length=65536)]error = 5 g_vfs_done():da0s1[WRITE(offset=17087992832, length=32768)]error = 5 g_vfs_done():da0s1[WRITE(offset=20583424, length=32768)]error = 5 On Windows 7 with H2testw: Error writing file 'J:\8.h2w', offset 0x3b700000. It is still possible to verify the test data written up to this point. (Impossibile eseguire la richiesta a causa di un errore di dispositivo I/O. Code 1117) Writing speed: 2.22 MByte/s H2testw v1.4 In Debian Linux 7.5 with f3write: $ ./f3write /media/2AAD-E09F Free space: 62.48 GB Creating file 1.h2w ... OK! Creating file 2.h2w ... OK! Creating file 3.h2w ... OK! Creating file 4.h2w ... 6.17% -- 1.94 MB/s -- 8:55:24f3write: f3write.c:241: measure: Assertion `!fdatasync(fd)' failed. Aborted dmesg output: [ 2311.374327] sd 9:0:0:0: [sdf] Unhandled error code [ 2311.374335] sd 9:0:0:0: [sdf] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [ 2311.374345] sd 9:0:0:0: [sdf] CDB: Write(10): 2a 00 01 7d 84 69 00 00 f0 00 [ 2311.374364] end_request: I/O error, dev sdf, sector 25003113 Regards, Maurizio From owner-freebsd-usb@freebsd.org Wed Nov 4 08:54:32 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17580A25F80 for ; Wed, 4 Nov 2015 08:54:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C636011AA for ; Wed, 4 Nov 2015 08:54:31 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 00A671FE024; Wed, 4 Nov 2015 09:54:27 +0100 (CET) Subject: Re: Non working USB stick in FreeBSD. To: "Ranjan1018 ." <214748mv@gmail.com> References: <562FA2E8.1020003@selasky.org> <56375A74.2040704@selasky.org> Cc: freebsd-usb@freebsd.org From: Hans Petter Selasky Message-ID: <5639C82D.8050207@selasky.org> Date: Wed, 4 Nov 2015 09:56:13 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 08:54:32 -0000 On 11/04/15 09:41, Ranjan1018 . wrote: > Hi Hans, > > I have tested the USB stick with 3 different hardware on 3 different > operating systems but is not possible to write, without errors, on it. > Sorry for the noise. Hi Ranjan, Good to hear you found something out! --HPS From owner-freebsd-usb@freebsd.org Sat Nov 7 16:01:01 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51EDDA28F4A for ; Sat, 7 Nov 2015 16:01:01 +0000 (UTC) (envelope-from nothingness@citycable.ch) Received: from emailfrontal1-new.citycable.ch (emailfrontal1-new.citycable.ch [85.218.0.103]) by mx1.freebsd.org (Postfix) with ESMTP id 0E2EF1DEF for ; Sat, 7 Nov 2015 16:01:00 +0000 (UTC) (envelope-from nothingness@citycable.ch) Received: from localhost (localhost [127.0.0.1]) by emailfrontal1-new.citycable.ch (Postfix) with ESMTP id 3ntNbv1rjwzNpl5 for ; Sat, 7 Nov 2015 17:00:59 +0100 (CET) X-Virus-Scanned: amavisd-new at localdomain Received: from emailfrontal1-new.citycable.ch ([127.0.0.1]) by localhost (localhost.localdomain [127.0.0.1]) (amavisd-new, port 10050) with LMTP id lcGi8LD5rBhw for ; Sat, 7 Nov 2015 17:00:57 +0100 (CET) Received: from [192.168.50.9] (85-218-8-184.dclient.lsne.ch [85.218.8.184]) (Authenticated sender: nothingness@citycable.ch) by emailfrontal1-new.citycable.ch (Postfix) with ESMTPA id 3ntNbs4zXnzNpk4 for ; Sat, 7 Nov 2015 17:00:57 +0100 (CET) To: freebsd-usb@freebsd.org From: Noth Subject: PC Engines APU2B4 betatest: usb install fails Message-ID: <563E2039.9090004@citycable.ch> Date: Sat, 7 Nov 2015 17:00:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 16:01:01 -0000 Hi all, I've been directed here by the good folk of #freebsd on Freenode. I'm betatesting the upcoming PC Engines APU2B4 ( http://pcengines.ch/apu2b4.htm ) on various OSes. I tried the memstick installers of both 10.2-RELEASE and the 2nd of November snapshot of 11-CURRENT, and neither work, because the kernel can't mount the miniroot: Trying to mount root from ufs:/dev/ufs/FreeBSD_Install [ro,noatime]... Root mount waiting for: usbus1 usbus0 uhub0: 4 ports with 4 removable, self powered uhub1: 2 ports with 2 removable, self powered Root mount waiting for: usbus1 usbus0 ugen1.2: at usbus1 uhub2: on usbus1 uhub2: 4 ports with 4 removable, self powered ugen0.2: at usbus0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks = 0x8100 umass0:2:0: Attached to scbus2 mountroot: waiting for device /dev/ufs/FreeBSD_Install... (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 (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 00 00 00 24 00 (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (probe0:umass-sim0:0:0:0): Retrying command Mounting from ufs:/dev/ufs/FreeBSD_Install failed with error 19. I've been told this may be due to quirks with the xhci driver, since the external USB ports are both 3.0. However I can succesfully install booting USB and having an SD Card with the same memstick installer image on it inserted into the APU2B4. The installer runs normally and provides a fully functional OS. The dmesg for FreeBSD 10.2 is here: http://pastebin.ca/3238744 and the one for 11-CURRENT is here : http://pastebin.ca/3238637 . Things that aren't working are the cpu thermal sensor (now supported by OpenBSD -CURRENT with a 1 line patch to sys/dev/pci/km.c ) and the AMD CCP crypto chip. Everything else seems functional. I'm ready to provide ssh access to the device to an interested dev to troubleshoot the USB issue. Cheers, Noth From owner-freebsd-usb@freebsd.org Sat Nov 7 16:02:18 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60A2EA280AB for ; Sat, 7 Nov 2015 16:02:18 +0000 (UTC) (envelope-from nothingness@citycable.ch) Received: from emailfrontal1-new.citycable.ch (emailfrontal1-new.citycable.ch [85.218.0.103]) by mx1.freebsd.org (Postfix) with ESMTP id 1F99B1FC4 for ; Sat, 7 Nov 2015 16:02:18 +0000 (UTC) (envelope-from nothingness@citycable.ch) Received: from localhost (localhost [127.0.0.1]) by emailfrontal1-new.citycable.ch (Postfix) with ESMTP id 3ntNTW547PzNpgd for ; Sat, 7 Nov 2015 16:55:27 +0100 (CET) X-Virus-Scanned: amavisd-new at localdomain Received: from emailfrontal1-new.citycable.ch ([127.0.0.1]) by localhost (localhost.localdomain [127.0.0.1]) (amavisd-new, port 10050) with LMTP id 0WTpN3ZNv6eT for ; Sat, 7 Nov 2015 16:55:26 +0100 (CET) Received: from [192.168.50.9] (85-218-8-184.dclient.lsne.ch [85.218.8.184]) (Authenticated sender: nothingness@citycable.ch) by emailfrontal1-new.citycable.ch (Postfix) with ESMTPA id 3ntNTT6XwfzNplC for ; Sat, 7 Nov 2015 16:55:25 +0100 (CET) To: freebsd-usb@freebsd.org From: Noth Subject: PC Engines APU2B4 betatest: usb install fails Message-ID: <563E1EED.9090105@citycable.ch> Date: Sat, 7 Nov 2015 16:55:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 16:02:18 -0000 Hi all, I've been directed here by the good folk of #freebsd on Freenode. I'm betatesting the upcoming PC Engines APU2B4 ( http://pcengines.ch/apu2b4.htm ) on various OSes. I tried the memstick installers of both 10.2-RELEASE and the 2nd of November snapshot of 11-CURRENT, and neither work, because the kernel can't mount the miniroot: Trying to mount root from ufs:/dev/ufs/FreeBSD_Install [ro,noatime]... Root mount waiting for: usbus1 usbus0 uhub0: 4 ports with 4 removable, self powered uhub1: 2 ports with 2 removable, self powered Root mount waiting for: usbus1 usbus0 ugen1.2: at usbus1 uhub2: on usbus1 uhub2: 4 ports with 4 removable, self powered ugen0.2: at usbus0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks = 0x8100 umass0:2:0: Attached to scbus2 mountroot: waiting for device /dev/ufs/FreeBSD_Install... (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 (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 00 00 00 24 00 (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (probe0:umass-sim0:0:0:0): Retrying command Mounting from ufs:/dev/ufs/FreeBSD_Install failed with error 19. I've been told this may be due to quirks with the xhci driver, since the external USB ports are both 3.0. However I can succesfully install booting USB and having an SD Card with the same memstick installer image on it inserted into the APU2B4. The installer runs normally and provides a fully functional OS. The dmesg for FreeBSD 10.2 is here: http://pastebin.ca/3238744 and the one for 11-CURRENT is here : http://pastebin.ca/3238637 . Things that aren't working are the cpu thermal sensor (now supported by OpenBSD -CURRENT with a 1 line patch to sys/dev/pci/km.c ) and the AMD CCP crypto chip. Everything else seems functional. I'm ready to provide ssh access to the device to an interested dev to troubleshoot the USB issue. Cheers, Noth