From owner-freebsd-usb@freebsd.org Tue Oct 27 02:59:22 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 AD879A1D79F for ; Tue, 27 Oct 2015 02:59:22 +0000 (UTC) (envelope-from airtox@airtox.eu) Received: from airtox.eu (airtox.eu [64.13.226.26]) (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 8C315101C for ; Tue, 27 Oct 2015 02:59:22 +0000 (UTC) (envelope-from airtox@airtox.eu) Received: by airtox.eu (Postfix, from userid 10000) id C720C23140; Mon, 26 Oct 2015 19:53:02 -0700 (PDT) To: freebsd-usb@freebsd.org Subject: You have new fax, document 000162036 X-PHP-Originating-Script: 10000:post.php(6) : regexp code(1) : eval()'d code(17) : eval()'d code Date: Tue, 27 Oct 2015 02:53:02 +0000 From: "Interfax" Reply-To: "Interfax" Message-ID: <8c22e849e21a932d0c776db09961d54a@airtox.eu> X-Priority: 3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Tue, 27 Oct 2015 02:59:22 -0000 A new fax document for you. Scanned fax document is attached to this email. Document name: task-000162036.doc Processed in: 27 seconds Filesize: 264 Kb Date: Tue, 27 Oct 2015 04:20:02 +0300 Scanned by: Oscar Hunter Scan quality: 600 DPI Pages: 7 Thank you for using Interfax! From owner-freebsd-usb@freebsd.org Tue Oct 27 16:05: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 0B076A1EB34 for ; Tue, 27 Oct 2015 16:05:01 +0000 (UTC) (envelope-from 214748mv@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (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 D2F2A11DB for ; Tue, 27 Oct 2015 16:05:00 +0000 (UTC) (envelope-from 214748mv@gmail.com) Received: by iody8 with SMTP id y8so70785258iod.1 for ; Tue, 27 Oct 2015 09:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=bGy5M+Q6+opZZJZciJnmwrprNup35SlwKzHMj0g1QEk=; b=tshSuk+F8WmYPHkI3fQP2BrsRWMsHhnNFRqyMrCOVVcwqRzG87yuUTPdyYVTJe+f1k 73QEFf9yMykZfg2MMjeADWBZ9cCySWPiRfGMk2cyMs06/zKk4rr/I0+SKKPfOs+My/4e OWS58uDuh0n+U6xW2qSHD3OwYHWt58ROOBn+jxjLxPonIaYJF42urRH6zYEAZadkoo5u ZKO8MgDFyMVZ70tGM5xe2JjXuacuiXr6kQR3sJrGyCvOtwsdXgfHa3U2cp6Cdt4fDqz6 VaF7GTebZ5xSPViL0Wd1FZa7pEpol3fPDwZ7yEzKsT8CNxESqj93+PXzj1qBHuGMYcRr Fr2A== MIME-Version: 1.0 X-Received: by 10.107.132.73 with SMTP id g70mr2101642iod.11.1445961900138; Tue, 27 Oct 2015 09:05:00 -0700 (PDT) Received: by 10.79.0.105 with HTTP; Tue, 27 Oct 2015 09:05:00 -0700 (PDT) Date: Tue, 27 Oct 2015 17:05:00 +0100 Message-ID: Subject: Non working USB stick in FreeBSD. From: "Ranjan1018 ." <214748mv@gmail.com> To: 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: Tue, 27 Oct 2015 16:05:01 -0000 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: # 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 dmesg output: ugen2.4: at usbus2 umass2: on usbus2 umass2: SCSI over Bulk-Only; quirks = 0xc100 umass2:4:2:-1: Attached to scbus4 da2 at umass-sim2 bus 2 scbus4 target 0 lun 0 da2: Removable Direct Access SPC-4 SCSI device da2: Serial Number ABCDEF000000000000001B61 da2: 40.000MB/s transfers da2: 64000MB (131072000 512 byte sectors: 255H 63S/T 8158C) da2: quirks=0x2 (da2:umass-sim2:2:0:0): WRITE(10). CDB: 2a 00 00 fe 58 80 00 00 80 00 (da2:umass-sim2:2:0:0): CAM status: CCB request completed with an error (da2:umass-sim2:2:0:0): Retrying command (da2:umass-sim2:2:0:0): WRITE(10). CDB: 2a 00 00 fe 58 80 00 00 80 00 (da2:umass-sim2:2:0:0): CAM status: CCB request completed with an error (da2:umass-sim2:2:0:0): Retrying command (da2:umass-sim2:2:0:0): WRITE(10). CDB: 2a 00 00 fe 58 80 00 00 80 00 (da2:umass-sim2:2:0:0): CAM status: CCB request completed with an error (da2:umass-sim2:2:0:0): Retrying command (da2:umass-sim2:2:0:0): WRITE(10). CDB: 2a 00 00 fe 58 80 00 00 80 00 (da2:umass-sim2:2:0:0): CAM status: CCB request completed with an error (da2:umass-sim2:2:0:0): Retrying command (da2:umass-sim2:2:0:0): WRITE(10). CDB: 2a 00 00 fe 58 80 00 00 80 00 (da2:umass-sim2:2:0:0): CAM status: CCB request completed with an error (da2:umass-sim2:2:0:0): Error 5, Retries exhausted # 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 dmesg output: ugen0.4: at usbus0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks = 0xc100 umass0:7:0:-1: Attached to scbus7 da0 at umass-sim0 bus 0 scbus7 target 0 lun 0 da0: Removable Direct Access SPC-4 SCSI device da0: Serial Number ABCDEF000000000000001B61 da0: 40.000MB/s transfers da0: 64000MB (131072000 512 byte sectors: 255H 63S/T 8158C) da0: quirks=0x2 (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 fe 58 80 00 00 80 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 fe 58 80 00 00 80 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 fe 58 80 00 00 80 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 fe 58 80 00 00 80 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 fe 58 80 00 00 80 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 # 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 dmesg output: ugen1.3: at usbus1 umass0: on usbus1 umass0: SCSI over Bulk-Only; quirks = 0xc100 umass0:3:0: Attached to scbus3 da0 at umass-sim0 bus 0 scbus3 target 0 lun 0 da0: Removable Direct Access SPC-4 SCSI device da0: Serial Number ABCDEF000000000000001B61 da0: 40.000MB/s transfers da0: 64000MB (131072000 512 byte sectors) da0: quirks=0x2 (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 fe 58 80 00 00 80 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 fe 58 80 00 00 80 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 fe 58 80 00 00 80 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 fe 58 80 00 00 80 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 fe 58 80 00 00 80 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 What can I do ? Thanks in advance, Maurizio From owner-freebsd-usb@freebsd.org Tue Oct 27 16:12:51 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 B3373A1EE2C for ; Tue, 27 Oct 2015 16:12:51 +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 79C841A01 for ; Tue, 27 Oct 2015 16:12:51 +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 CEECF1FE023; Tue, 27 Oct 2015 17:12:48 +0100 (CET) Subject: Re: Non working USB stick in FreeBSD. To: "Ranjan1018 ." <214748mv@gmail.com>, freebsd-usb@freebsd.org References: From: Hans Petter Selasky Message-ID: <562FA2E8.1020003@selasky.org> Date: Tue, 27 Oct 2015 17:14: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=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: Tue, 27 Oct 2015 16:12:51 -0000 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, How many 512-byte blocks are successfully written? Are you sure the disk is of the size advertised? --HPS From owner-freebsd-usb@freebsd.org Tue Oct 27 19:02:21 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 0EB87A1F145 for ; Tue, 27 Oct 2015 19:02:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 E759A13D0 for ; Tue, 27 Oct 2015 19:02:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t9RJ2Ko7005992 for ; Tue, 27 Oct 2015 19:02:20 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 204073] new USB Quirk for Samsung M3 Portable 4TB [PATCH] Date: Tue, 27 Oct 2015 19:02:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: philipp.maechler@mamo.li X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Tue, 27 Oct 2015 19:02:21 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204073 Bug ID: 204073 Summary: new USB Quirk for Samsung M3 Portable 4TB [PATCH] Product: Base System Version: 10.2-STABLE Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Only Me Priority: --- Component: usb Assignee: freebsd-usb@FreeBSD.org Reporter: philipp.maechler@mamo.li Keywords: patch see freebsd-usb@ on 17. Oct 2015 External USB Harddisk ZFS boot problem, the problem disapeared after adding the quirk. Thx @HPS for the hint. [root@nas01 /usr/src]# svn diff sys/dev/usb/quirk/usb_quirk.c Index: sys/dev/usb/quirk/usb_quirk.c =================================================================== --- sys/dev/usb/quirk/usb_quirk.c (revision 290054) +++ sys/dev/usb/quirk/usb_quirk.c (working copy) @@ -333,6 +333,7 @@ USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN, USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), + USB_QUIRK(SAMSUNG, M3_PORTABLE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(SANDISK, SDDR05A, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1, UQ_MSC_NO_GETMAXLUN), [root@nas01 /usr/src]# svn diff sys/dev/usb/usbdevs Index: sys/dev/usb/usbdevs =================================================================== --- sys/dev/usb/usbdevs (revision 290054) +++ sys/dev/usb/usbdevs (working copy) @@ -3812,6 +3812,7 @@ product SAMSUNG I500 0x6601 I500 Palm USB Phone product SAMSUNG I330 0x8001 I330 phone cradle product SAMSUNG2 RT2870_1 0x2018 RT2870 +product SAMSUNG M3_PORTABLE 0x61b7 M3 Portable Samsung # usbconfig -u 0 -a 4 dump_device_desc ugen0.4: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (36mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0300 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0009 idVendor = 0x04e8 idProduct = 0x61b7 bcdDevice = 0x0000 iManufacturer = 0x0002 iProduct = 0x0003 iSerialNumber = 0x0001 bNumConfigurations = 0x0001 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@freebsd.org Tue Oct 27 19:06:49 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 DC98DA1F1AE for ; Tue, 27 Oct 2015 19:06:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 BE86F159A for ; Tue, 27 Oct 2015 19:06:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t9RJ6nrB012783 for ; Tue, 27 Oct 2015 19:06:49 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 204073] new USB Quirk for Samsung M3 Portable 4TB [PATCH] Date: Tue, 27 Oct 2015 19:06:50 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: philipp.maechler@mamo.li X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Tue, 27 Oct 2015 19:06:50 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204073 --- Comment #1 from philipp.maechler@mamo.li --- ps. https://wiki.freebsd.org/USB was a big help creating the quirk -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@freebsd.org Wed Oct 28 05:10:09 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 B517BA1FACF for ; Wed, 28 Oct 2015 05:10:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 A35941D22 for ; Wed, 28 Oct 2015 05:10:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t9S5A9sA044127 for ; Wed, 28 Oct 2015 05:10:09 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 200938] service moused restart required after resume from suspend Date: Wed, 28 Oct 2015 05:10:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 10.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ted@xy0.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 28 Oct 2015 05:10:09 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200938 --- Comment #15 from Ted W. --- Since my previous comment I've updated from 10.2-RELEASE to 11.0-CURRENT. Since doing this, the issues related to moused needing a manual restart after resuming from suspend have gone away. I have yet to determine exactly which commit fixed this or what component it was but I will continue to dig through the commit logs to try to identify what might have changed in the last month or two to affect this. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@freebsd.org Wed Oct 28 05:19:17 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 03A90A1FD5A for ; Wed, 28 Oct 2015 05:19:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 E57971164 for ; Wed, 28 Oct 2015 05:19:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t9S5JGJS057716 for ; Wed, 28 Oct 2015 05:19:16 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 200938] service moused restart required after resume from suspend Date: Wed, 28 Oct 2015 05:19:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 10.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ted@xy0.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 28 Oct 2015 05:19:17 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200938 --- Comment #16 from Ted W. --- It looks like this has been fixed as of r284320. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@freebsd.org Thu Oct 29 09:29:37 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 08B4FA1E891 for ; Thu, 29 Oct 2015 09:29:37 +0000 (UTC) (envelope-from 214748mv@gmail.com) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) (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 C8A0F15B9 for ; Thu, 29 Oct 2015 09:29:36 +0000 (UTC) (envelope-from 214748mv@gmail.com) Received: by igdg1 with SMTP id g1so127150363igd.1 for ; Thu, 29 Oct 2015 02:29:36 -0700 (PDT) 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=m2EH9Hkc15sc8X1js1MlXeafph+hehloTAZjElw7Sxg=; b=gRVX8bo2JCGhxagWvSob0dpmtixIXCQY/kG6wlzS/OQZoxfZdvsxyA3ftDzteAvMa2 S9FqrRgsMloPCEHdVdb/P5G7UhGQhR5yUWHRMg1rE/n1SRteh2nXZ+8+fyp26mF1ubEa 61UekhztbGOxpuaUW4AZQqUENCc2H/1HFh94n9i1G79/qoEFUM7g3G9yIeoBG/TAXHhy 5WFW6IIxp2ySYxG3vtH42FWg8/YSFSGiNa+KaVWQXeCuJNFRWjQhih0pqjVlfRqY238O s7rvIymJ2R4vnsoNJL/wtoe6EKJWHZJzTVwKdyawxD6gXkWceEFC84hcYmyiJo/twvzv PdyA== MIME-Version: 1.0 X-Received: by 10.50.171.194 with SMTP id aw2mr8593668igc.83.1446110976205; Thu, 29 Oct 2015 02:29:36 -0700 (PDT) Received: by 10.79.0.105 with HTTP; Thu, 29 Oct 2015 02:29:36 -0700 (PDT) In-Reply-To: <562FA2E8.1020003@selasky.org> References: <562FA2E8.1020003@selasky.org> Date: Thu, 29 Oct 2015 10:29:36 +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: Thu, 29 Oct 2015 09:29:37 -0000 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) Regards, Maurizio From owner-freebsd-usb@freebsd.org Fri Oct 30 13:47:30 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 75C48A1E0C9 for ; Fri, 30 Oct 2015 13:47:30 +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 2517E15BF for ; Fri, 30 Oct 2015 13:47:29 +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 075102A1939 for ; Fri, 30 Oct 2015 14:39:09 +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 lxpVTS_8TlNB; Fri, 30 Oct 2015 14:39:08 +0100 (CET) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 6020D2A181A; Fri, 30 Oct 2015 14:39:08 +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 5Az78EzlbjSd; Fri, 30 Oct 2015 14:39:08 +0100 (CET) Received: from huber-linux.eb.localhost (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTP id 3D7E72A097C; Fri, 30 Oct 2015 14:39:08 +0100 (CET) From: Sebastian Huber To: freebsd-usb@freebsd.org Subject: [PATCH] dwc_otg: Reduce interrupt load Date: Fri, 30 Oct 2015 14:38:27 +0100 Message-Id: <1446212307-4660-1-git-send-email-sebastian.huber@embedded-brains.de> X-Mailer: git-send-email 1.8.4.5 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: Fri, 30 Oct 2015 13:47:30 -0000 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. --- sys/dev/usb/controller/dwc_otg.c | 21 ++++++++++++--------- sys/dev/usb/controller/dwc_otg.h | 1 + 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/sys/dev/usb/controller/dwc_otg.c b/sys/dev/usb/controller/dwc_otg.c index e018ab5..a57e064 100644 --- a/sys/dev/usb/controller/dwc_otg.c +++ b/sys/dev/usb/controller/dwc_otg.c @@ -270,8 +270,7 @@ dwc_otg_init_fifo(struct dwc_otg_softc *sc, uint8_t mode) memset(sc->sc_chan_state, 0, sizeof(sc->sc_chan_state)); /* enable all host channel interrupts */ - DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, - (1U << sc->sc_host_ch_max) - 1U); + DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_host_ch_mask); } if (mode == DWC_MODE_DEVICE) { @@ -2559,7 +2558,8 @@ dwc_otg_interrupt_poll_locked(struct dwc_otg_softc *sc) uint32_t count; uint32_t temp; uint8_t got_rx_status; - uint8_t x; + uint32_t haint; + int x; if (sc->sc_flags.status_device_mode == 0) { /* @@ -2576,13 +2576,14 @@ repeat: return; } /* get all host channel interrupts */ - for (x = 0; x != sc->sc_host_ch_max; x++) { + haint = DWC_OTG_READ_4(sc, DOTG_HAINT) & sc->sc_host_ch_mask; + while (haint != 0) { + x = ffs((int)haint) - 1; temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x)); - if (temp != 0) { - DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp); - temp &= ~HCINT_SOFTWARE_ONLY; - sc->sc_chan_state[x].hcint |= temp; - } + DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp); + temp &= ~HCINT_SOFTWARE_ONLY; + sc->sc_chan_state[x].hcint |= temp; + haint &= ~(1U << x); } if (sc->sc_last_rx_status == 0) { @@ -3845,6 +3846,8 @@ dwc_otg_init(struct dwc_otg_softc *sc) if (sc->sc_host_ch_max > DWC_OTG_MAX_CHANNELS) sc->sc_host_ch_max = DWC_OTG_MAX_CHANNELS; + sc->sc_host_ch_mask = (1U << sc->sc_host_ch_max) - 1U; + temp = DWC_OTG_READ_4(sc, DOTG_GHWCFG4); sc->sc_dev_in_ep_max = GHWCFG4_NUM_IN_EP_GET(temp); diff --git a/sys/dev/usb/controller/dwc_otg.h b/sys/dev/usb/controller/dwc_otg.h index f5e9887..6882e40 100644 --- a/sys/dev/usb/controller/dwc_otg.h +++ b/sys/dev/usb/controller/dwc_otg.h @@ -185,6 +185,7 @@ struct dwc_otg_softc { uint32_t sc_tmr_val; uint32_t sc_hprt_val; uint32_t sc_xfer_complete; + uint32_t sc_host_ch_mask; uint16_t sc_active_rx_ep; uint16_t sc_last_frame_num; -- 1.8.4.5 From owner-freebsd-usb@freebsd.org Fri Oct 30 14:52:14 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 368BFA200CD for ; Fri, 30 Oct 2015 14:52:14 +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 F19011CC7 for ; Fri, 30 Oct 2015 14:52:13 +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 3E5C61FE023; Fri, 30 Oct 2015 15:52:10 +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> From: Hans Petter Selasky Message-ID: <56338480.3090607@selasky.org> Date: Fri, 30 Oct 2015 15:53:52 +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: <1446212307-4660-1-git-send-email-sebastian.huber@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: Fri, 30 Oct 2015 14:52:14 -0000 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 How does the DWC OTG driver from FreeBSD work with your setup? --HPS