From owner-freebsd-questions@freebsd.org Fri Sep 11 12:04:02 2015 Return-Path: Delivered-To: freebsd-questions@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 7C9AD9CC128 for ; Fri, 11 Sep 2015 12:04:02 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: from mail-ig0-x22e.google.com (mail-ig0-x22e.google.com [IPv6:2607:f8b0:4001:c05::22e]) (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 45F0B199F for ; Fri, 11 Sep 2015 12:04:02 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: by igcpb10 with SMTP id pb10so42957921igc.1 for ; Fri, 11 Sep 2015 05:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=AtV9Yb555dDXbaZOGrhx2LeJChyQCcBUC+8CEREhCBc=; b=zx/4ril4M/A+W6MS2rxVC9cdJUHF2/LhzQZa1sctRdJ+K7p+r9N1pTZ9Bb20b2nCN6 gwZIwUtaJb2DwsQ+LdMP2QQwZwzs6g/prLSyisBGcEoCGxzcyKP+FDhZJ6hS/Nt4DDZB eWut64YlqSEfK14rSmc+2epRb+/kPBIjKrFDV6afZFEY5xwBXFoVjs65Tvy1XwUnZcZh 5x3aAYGdT9MtRRvFNEcc8bpwyin8fY3BmyFdcqUdRZAWN9RKhaKRL+C2Ggx8D+aAa+NM NMuFDs0iHKTpDXQnfYbiCY8sDntf20Aw35cyGgzZZ1PI3yD/rsJkrPmtwF+AW6Wix2lM AXOQ== X-Received: by 10.50.43.170 with SMTP id x10mr14802932igl.68.1441973041621; Fri, 11 Sep 2015 05:04:01 -0700 (PDT) Received: from [10.0.10.5] (cpe-76-190-244-6.neo.res.rr.com. [76.190.244.6]) by smtp.googlemail.com with ESMTPSA id 10sm1373371igt.2.2015.09.11.05.04.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Sep 2015 05:04:00 -0700 (PDT) Message-ID: <55F2C335.3030304@gmail.com> Date: Fri, 11 Sep 2015 08:04:05 -0400 From: Ernie Luzar User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: freebsd-questions@freebsd.org CC: Patrick Hess , FreeBSD@ShaneWare.Biz, Dave Subject: Re: USB physical ports References: <55F1A507.70402@gmail.com> <2091716.bhpPQfPjgk@amd.asgard.uk> <55F216CB.6040606@gmail.com> <2029052.xQsMmxkVaC@desk8.phess.net> In-Reply-To: <2029052.xQsMmxkVaC@desk8.phess.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2015 12:04:02 -0000 Patrick Hess wrote: > Ernie Luzar wrote: >> How can I confirm 480Mbps transfer rate. > > Run "dmesg -a" after plugging in the device. A USB 2.0 flash drive > should be reported with a 40 MB/s transfer rate: > > da1: Removable Direct Access SCSI-4 device > da1: 40.000MB/s transfers > > You can verify this by reading from the drive, e.g. by using dd(1): > > # dd if=/dev/da1 of=/dev/zero bs=1M count=1024 > 1024+0 records in > 1024+0 records out > 1073741824 bytes transferred in 52.099073 secs (20609615 bytes/sec) > > That's ~20 MB/s, definitely more than USB 1.x could have delivered. > Yes that is true, BUT it's a very long way from 480Mbps. Following are some test results. Before plugging in flash drive /root/bin >usbconfig ugen3.1: at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen2.1: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen1.1: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen0.1: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) After plugging in flash drive /root/bin >usbconfig ugen3.1: at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen2.1: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen1.1: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen0.1: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen3.2: at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (200mA) Get this result no matter which physical port I plug into. Get these console messages when plugging in flash drive umass0: on usbus3 umass0: SCSI over Bulk-Only; quirks = 0x8100 umass0:2:0:-1: Attached to scbus2 da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SPC-4 SCSI device da0: Serial Number 4C530001020404102235 da0: 40.000MB/s transfers da0: 14907MB (30529536 512 byte sectors: 255H 63S/T 1900C) da0: quirks=0x2 Why is it saying 40.000MB/s transfers? Is this some max value that Freebsd is limited to? /root/bin >dd if=/dev/da0 of=/dev/null bs=1M count=10 10+0 records in 10+0 records out 10485760 bytes transferred in 0.607835 secs (17250996 bytes/sec) /root/bin >dd if=/dev/da0 of=/dev/null bs=1M count=100 100+0 records in 100+0 records out 104857600 bytes transferred in 5.683069 secs (18450876 bytes/sec) /root/bin >dd if=/dev/da0 of=/dev/null bs=1M count=200 200+0 records in 200+0 records out 209715200 bytes transferred in 11.233349 secs (18668983 bytes/sec) /root/bin >dd if=/dev/da0 of=/dev/null bs=1M count=400 400+0 records in 400+0 records out 419430400 bytes transferred in 22.415176 secs (18711894 bytes/sec) If 20Mbps is the max rate Freebsd can do, then 18.7Mbps is a good rate. But the real question is why is Freebsd USB rates capped at 20Mbps when the hardware says it's capable of 480Mbps?