From owner-freebsd-usb@FreeBSD.ORG Sun Feb 17 11:09:26 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 440DEE21; Sun, 17 Feb 2013 11:09:26 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) by mx1.freebsd.org (Postfix) with ESMTP id 01D6318A; Sun, 17 Feb 2013 11:09:24 +0000 (UTC) Received: by mail-lb0-f181.google.com with SMTP id gm6so3596332lbb.40 for ; Sun, 17 Feb 2013 03:09:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=wwHJfhxM4FjQRQAZwUvEBtXFP2YAcRjKb1jvQjpgTcc=; b=KJwPQ1BeCNekxo5cOd7KAW3I5mq/9StSchvje4LnbLtbHzMt07ZKftswIdLcfdxINH 0wh8PGNShbXbx3pNbk/0dq2c2Tml9wMgAAlx+xazcrgLNRkBVQ8bPD4DCS0y8/ttazUA KFF6nlZIzhFUdHDvhvrkO49gdbcNBoLTvzK1/OUk3rZcRp7Pthl4215WgZUcIOtvjTIq 0nMfBwhdu5OmcufuRBD7OPTv8b7t29+LvIFy/Hy2NcYKXkWmPXT8rRqF/MjRLpvOSmtO usYRMlQG43zx+4xBkoTWMF1tnQ1eE76D9ROZr/pe0FzhP4UHW8Bcx98NDJ6DuBecFahA Lr7A== X-Received: by 10.152.109.84 with SMTP id hq20mr2344325lab.48.1361099363511; Sun, 17 Feb 2013 03:09:23 -0800 (PST) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru. [78.107.232.239]) by mx.google.com with ESMTPS id er8sm19644410lbb.9.2013.02.17.03.09.19 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Feb 2013 03:09:20 -0800 (PST) Sender: Dmitry Chagin Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.14.6/8.14.6) with ESMTP id r1HB9Heu024265; Sun, 17 Feb 2013 15:09:17 +0400 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.14.6/8.14.6/Submit) id r1HB9G43024264; Sun, 17 Feb 2013 15:09:16 +0400 (MSK) (envelope-from dchagin) Date: Sun, 17 Feb 2013 15:09:16 +0400 From: Chagin Dmitry To: Hans Petter Selasky Subject: Re: some usb troubles Message-ID: <20130217110916.GA24219@dchagin.static.corbina.net> References: <20130209180124.GA1783@dchagin.static.corbina.net> <201302101203.36647.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline In-Reply-To: <201302101203.36647.hselasky@c2i.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-acpi@freebsd.org, freebsd-current@freebsd.org, jkim@freebsd.org, freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2013 11:09:26 -0000 --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 10, 2013 at 12:03:36PM +0100, Hans Petter Selasky wrote: > On Saturday 09 February 2013 19:01:25 Chagin Dmitry wrote: > > Hi all, > >=20 > > trying to run macbookpro10,1 on HEAD: > >=20 > > 1) usb3.0 does not work at 9.1 and HEAD (r246587) > > 2) Between stable/9 and HEAD (r246587) we are lost uhid devices > > (external keyboard and mouse) and umass. dmesg on the same hw can find > > here: > >=20 > > http://people.freebsd.org/~dchagin/macbookpro/dmesg.generic.stable9.txt > > http://people.freebsd.org/~dchagin/macbookpro/dmesg.generic.HEAD.txt > >=20 I found the commit that broke usb support: r239340 - merge acpica. > > pciconf: > >=20 > > http://people.freebsd.org/~dchagin/macbookpro/pciconf.txt > >=20 > > any help would be greatly apprecated. >=20 --=20 Have fun! chd --AqsLC8rIMeq19msA Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlEgulwACgkQ0t2Tb3OO/O24CwCfbDyuOBRg942QWAKbpRDCrw+s AWwAoL5liNIYj4YZtsCEZCgxv+ZFqkwk =G7KT -----END PGP SIGNATURE----- --AqsLC8rIMeq19msA-- From owner-freebsd-usb@FreeBSD.ORG Sun Feb 17 16:48:06 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1CCDEEC3 for ; Sun, 17 Feb 2013 16:48:06 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id C4F07EAE for ; Sun, 17 Feb 2013 16:48:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1U77PB-0003wC-JY for freebsd-usb@freebsd.org; Sun, 17 Feb 2013 19:47:58 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:Date:Subject:To:From; bh=lPhpAS0gBYDLlHzJQgRfFBUDb8uYDNGptg/RZIRETMI=; b=dkClpI9HuxWpmNqF9WXrTvbvkiMOp37A4ZRWxRBjr7C+qHXCmReSrdHhxiBXoTECi6WfzrP/7lc5gsZ2v3GAwyTdRelTFPI1NMH86kb/YX/3cCcBikdIj7s8s6+t1m/jBnYD3HAmPOU9rDnNhnLPHjguRYSfKZ8UFpbHWEY/GvY=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1U77My-000GSe-V1 for freebsd-usb@freebsd.org; Sun, 17 Feb 2013 16:45:45 +0000 From: Jan Beich To: freebsd-usb@freebsd.org Subject: sdcard read error with nokia n8 as mass storage Date: Sun, 17 Feb 2013 09:24:23 -0700 MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1U77My-000GSe-V1@internal.tormail.org> X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2013 16:48:06 -0000 The phone has 16G of on-board and 16G sdcard memory. FreeBSD 10.0 detects both but only the former can be mounted. And there is no issue mounting the sdcard on Ubuntu or on FreeBSD via iSCSI (fileio). $ dmesg # freebsd ugen7.2: at usbus7 umass0: on usbus7 umass0: SCSI over Bulk-Only; quirks = 0x4000 umass0:5:0:-1: Attached to scbus5 da0 at umass-sim0 bus 0 scbus5 target 0 lun 0 da0: < > Removable Direct Access SCSI-0 device da0: 1.000MB/s transfers da0: 14644MB (29990912 512 byte sectors: 255H 63S/T 1866C) da1 at umass-sim0 bus 0 scbus5 target 0 lun 1 da1: < > Removable Direct Access SCSI-0 device da1: 1.000MB/s transfers da1: 15193MB (31116288 512 byte sectors: 255H 63S/T 1936C) (da1:umass-sim0:0:0:1): READ(10). CDB: 28 20 00 00 00 00 00 00 01 00 (da1:umass-sim0:0:0:1): CAM status: SCSI Status Error (da1:umass-sim0:0:0:1): SCSI status: Check Condition (da1:umass-sim0:0:0:1): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB) (da1:umass-sim0:0:0:1): Error 22, Unretryable error (da1:umass-sim0:0:0:1): READ(10). CDB: 28 20 00 00 00 00 00 00 01 00 (da1:umass-sim0:0:0:1): CAM status: SCSI Status Error (da1:umass-sim0:0:0:1): SCSI status: Check Condition (da1:umass-sim0:0:0:1): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB) (da1:umass-sim0:0:0:1): Error 22, Unretryable error $ dmesg # ubuntu [ 2702.696789] usb 2-1.5: new high-speed USB device number 5 using ehci_hcd [ 2702.792029] scsi8 : usb-storage 2-1.5:1.0 [ 2703.789565] scsi 8:0:0:0: Direct-Access PQ: 0 ANSI: 0 [ 2703.790440] scsi 8:0:0:1: Direct-Access PQ: 0 ANSI: 0 [ 2703.792026] sd 8:0:0:0: Attached scsi generic sg2 type 0 [ 2703.792839] sd 8:0:0:1: Attached scsi generic sg3 type 0 [ 2703.797851] sd 8:0:0:0: [sdb] Attached SCSI removable disk [ 2703.798468] sd 8:0:0:1: [sdc] Attached SCSI removable disk [ 2706.096533] sd 8:0:0:1: [sdc] 31116288 512-byte logical blocks: (15.9 GB/14.8 GiB) [ 2706.097650] sd 8:0:0:1: [sdc] No Caching mode page present [ 2706.097658] sd 8:0:0:1: [sdc] Assuming drive cache: write through [ 2706.100061] sd 8:0:0:0: [sdb] 29990912 512-byte logical blocks: (15.3 GB/14.3 GiB) [ 2706.101756] sd 8:0:0:1: [sdc] No Caching mode page present [ 2706.101762] sd 8:0:0:1: [sdc] Assuming drive cache: write through [ 2706.102249] sd 8:0:0:0: [sdb] No Caching mode page present [ 2706.102255] sd 8:0:0:0: [sdb] Assuming drive cache: write through [ 2706.107070] sdc: sdc1 [ 2706.123044] sd 8:0:0:0: [sdb] No Caching mode page present [ 2706.123051] sd 8:0:0:0: [sdb] Assuming drive cache: write through [ 2706.126055] sdb: $ file -s /dev/da1 # native /dev/da1: ERROR: cannot read `/dev/da1' (Input/output error) $ file -s /dev/da1 # iscsi /dev/da1: x86 boot sector; partition 1: ID=0xc, starthead 130, startsector 8192, 31108096 sectors, extended partition table (last)\011, code offset 0x0 $ file -s /dev/da1s1 # iscsi /dev/da1s1: x86 boot sector, code offset 0x0, OEM-ID " EPOC", sectors/cluster 64, reserved sectors 598, Media descriptor 0xf8, heads 255, hidden sectors 8192, sectors 31108096 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 3797, reserved3 0x800000, serial number 0x316d446c, label: "Memory card" Any clue? I've tried UQ_MSC_NO_SYNC_CACHE with no luck. -- $ usbdump -i usbus7 -s 0 -vvv # on attach $ usbconfig -d 7.2 dump_device_desc ugen7.2: at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x0421 idProduct = 0x0301 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 bNumConfigurations = 0x0001 $ usbconfig -d 7.2 dump_curr_config_desc ugen7.2: at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0023 bNumInterfaces = 0x0001 bConfigurationValue = 0x0001 iConfiguration = 0x0004 bmAttributes = 0x0080 bMaxPower = 0x00fa Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x0008 bInterfaceSubClass = 0x0006 bInterfaceProtocol = 0x0050 iInterface = 0x0006 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0001 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x03 bDescriptorType = 0x09 bDescriptorSubType = 0x00 RAW dump: 0x00 | 0x03, 0x09, 0x00 From owner-freebsd-usb@FreeBSD.ORG Sun Feb 17 21:24:51 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4F27BABF for ; Sun, 17 Feb 2013 21:24:51 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id BAE77949 for ; Sun, 17 Feb 2013 21:24:50 +0000 (UTC) X-T2-Spam-Status: No, hits=0.0 required=5.0 Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 378033063; Sun, 17 Feb 2013 22:19:43 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Subject: Re: sdcard read error with nokia n8 as mass storage Date: Sun, 17 Feb 2013 22:20:57 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-STABLE; KDE/4.8.4; amd64; ; ) References: <1U77My-000GSe-V1@internal.tormail.org> In-Reply-To: <1U77My-000GSe-V1@internal.tormail.org> X-Face: ?p&W)c(+80hU; '{.$5K+zq{oC6y| /D'an*6mw>j'f:eBsex\Gi, Cc: Jan Beich X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2013 21:24:51 -0000 On Sunday 17 February 2013 17:24:23 Jan Beich wrote: > The phone has 16G of on-board and 16G sdcard memory. FreeBSD 10.0 detects > both but only the former can be mounted. And there is no issue mounting > the sdcard on Ubuntu or on FreeBSD via iSCSI (fileio). > > $ dmesg # freebsd > ugen7.2: at usbus7 > umass0: on usbus7 > umass0: SCSI over Bulk-Only; quirks = 0x4000 > umass0:5:0:-1: Attached to scbus5 > da0 at umass-sim0 bus 0 scbus5 target 0 lun 0 > da0: < > Removable Direct Access SCSI-0 device > da0: 1.000MB/s transfers > da0: 14644MB (29990912 512 byte sectors: 255H 63S/T 1866C) > da1 at umass-sim0 bus 0 scbus5 target 0 lun 1 > da1: < > Removable Direct Access SCSI-0 device > da1: 1.000MB/s transfers > da1: 15193MB (31116288 512 byte sectors: 255H 63S/T 1936C) > (da1:umass-sim0:0:0:1): READ(10). CDB: 28 20 00 00 00 00 00 00 01 00 > (da1:umass-sim0:0:0:1): CAM status: SCSI Status Error > (da1:umass-sim0:0:0:1): SCSI status: Check Condition > (da1:umass-sim0:0:0:1): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field > in CDB) (da1:umass-sim0:0:0:1): Error 22, Unretryable error > (da1:umass-sim0:0:0:1): READ(10). CDB: 28 20 00 00 00 00 00 00 01 00 > (da1:umass-sim0:0:0:1): CAM status: SCSI Status Error > (da1:umass-sim0:0:0:1): SCSI status: Check Condition > (da1:umass-sim0:0:0:1): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field > in CDB) (da1:umass-sim0:0:0:1): Error 22, Unretryable error > > $ dmesg # ubuntu > [ 2702.696789] usb 2-1.5: new high-speed USB device number 5 using ehci_hcd > [ 2702.792029] scsi8 : usb-storage 2-1.5:1.0 > [ 2703.789565] scsi 8:0:0:0: Direct-Access > PQ: 0 ANSI: 0 [ 2703.790440] scsi 8:0:0:1: Direct-Access > PQ: 0 ANSI: 0 [ 2703.792026] sd 8:0:0:0: Attached scsi > generic sg2 type 0 > [ 2703.792839] sd 8:0:0:1: Attached scsi generic sg3 type 0 > [ 2703.797851] sd 8:0:0:0: [sdb] Attached SCSI removable disk > [ 2703.798468] sd 8:0:0:1: [sdc] Attached SCSI removable disk > [ 2706.096533] sd 8:0:0:1: [sdc] 31116288 512-byte logical blocks: (15.9 > GB/14.8 GiB) [ 2706.097650] sd 8:0:0:1: [sdc] No Caching mode page present > [ 2706.097658] sd 8:0:0:1: [sdc] Assuming drive cache: write through > [ 2706.100061] sd 8:0:0:0: [sdb] 29990912 512-byte logical blocks: (15.3 > GB/14.3 GiB) [ 2706.101756] sd 8:0:0:1: [sdc] No Caching mode page present > [ 2706.101762] sd 8:0:0:1: [sdc] Assuming drive cache: write through > [ 2706.102249] sd 8:0:0:0: [sdb] No Caching mode page present > [ 2706.102255] sd 8:0:0:0: [sdb] Assuming drive cache: write through > [ 2706.107070] sdc: sdc1 > [ 2706.123044] sd 8:0:0:0: [sdb] No Caching mode page present > [ 2706.123051] sd 8:0:0:0: [sdb] Assuming drive cache: write through > [ 2706.126055] sdb: > > $ file -s /dev/da1 # native > /dev/da1: ERROR: cannot read `/dev/da1' (Input/output error) > > $ file -s /dev/da1 # iscsi > /dev/da1: x86 boot sector; partition 1: ID=0xc, starthead 130, startsector > 8192, 31108096 sectors, extended partition table (last)\011, code offset > 0x0 > > $ file -s /dev/da1s1 # iscsi > /dev/da1s1: x86 boot sector, code offset 0x0, OEM-ID " EPOC", > sectors/cluster 64, reserved sectors 598, Media descriptor 0xf8, heads > 255, hidden sectors 8192, sectors 31108096 (volumes > 32 MB) , FAT (32 > bit), sectors/FAT 3797, reserved3 0x800000, serial number 0x316d446c, > label: "Memory card" > > Any clue? I've tried UQ_MSC_NO_SYNC_CACHE with no luck. > > -- > $ usbdump -i usbus7 -s 0 -vvv # on attach > > > $ usbconfig -d 7.2 dump_device_desc > ugen7.2: at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON > (500mA) > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0200 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x0421 > idProduct = 0x0301 > bcdDevice = 0x0100 > iManufacturer = 0x0001 > iProduct = 0x0002 > iSerialNumber = 0x0003 > bNumConfigurations = 0x0001 > > $ usbconfig -d 7.2 dump_curr_config_desc > ugen7.2: at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON > (500mA) > > > Configuration index 0 > > bLength = 0x0009 > bDescriptorType = 0x0002 > wTotalLength = 0x0023 > bNumInterfaces = 0x0001 > bConfigurationValue = 0x0001 > iConfiguration = 0x0004 > bmAttributes = 0x0080 > bMaxPower = 0x00fa > > Interface 0 > bLength = 0x0009 > bDescriptorType = 0x0004 > bInterfaceNumber = 0x0000 > bAlternateSetting = 0x0000 > bNumEndpoints = 0x0002 > bInterfaceClass = 0x0008 > bInterfaceSubClass = 0x0006 > bInterfaceProtocol = 0x0050 > iInterface = 0x0006 > > Endpoint 0 > bLength = 0x0007 > bDescriptorType = 0x0005 > bEndpointAddress = 0x0081 > bmAttributes = 0x0002 > wMaxPacketSize = 0x0200 > bInterval = 0x0000 > bRefresh = 0x0000 > bSynchAddress = 0x0000 > > Endpoint 1 > bLength = 0x0007 > bDescriptorType = 0x0005 > bEndpointAddress = 0x0001 > bmAttributes = 0x0002 > wMaxPacketSize = 0x0200 > bInterval = 0x0000 > bRefresh = 0x0000 > bSynchAddress = 0x0000 > > Additional Descriptor > > bLength = 0x03 > bDescriptorType = 0x09 > bDescriptorSubType = 0x00 > RAW dump: > 0x00 | 0x03, 0x09, 0x00 Hi Jan, Could you check out the following thread: Re: HEAD memsticks broken? [USB/CAM Problems?] From: Joel Dahl To: mav@freebsd.org CC: It seems that only USB sticks labeled as "Kingston DataTraveler G3" are affected by r237478 (in my limited testing, at least). This particular model is what you get if you buy the cheapest Kingston model on the market right now. --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Feb 18 06:15:57 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 850A4A07 for ; Mon, 18 Feb 2013 06:15:57 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id 445BFE6E for ; Mon, 18 Feb 2013 06:15:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1U7K15-0005t5-6B; Mon, 18 Feb 2013 09:15:55 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:Subject:Cc:To:From; bh=ODDxRsRtQ4ShJS37u+Mi+WzwN3wrfXBAaevscQULsnA=; b=ej0rCZltqAMjqUb8uJZWwYSSipwh4b3zO9nw3mmDy2cRTWvGVUDJ1ORJYWRleOtXFvu+Foio7PyLhmrNNRzlbDDlpwrOAVUZCcieMpa7bLrMU6Gc+Xu+90bk5DxM9MjVcpyBW61vZooPc5ShWtRBXrUXQT9612+EcviftqatE0o=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1U7Jyd-000Ib5-C0; Mon, 18 Feb 2013 06:13:24 +0000 From: Jan Beich To: Hans Petter Selasky Subject: Re: sdcard read error with nokia n8 as mass storage Date: Sun, 17 Feb 2013 23:11:56 -0700 References: <1U77My-000GSe-V1@internal.tormail.org> <201302172220.57351.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1U7Jyd-000Ib5-C0@internal.tormail.org> Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2013 06:15:57 -0000 Hans Petter Selasky writes: > On Sunday 17 February 2013 17:24:23 Jan Beich wrote: > >> The phone has 16G of on-board and 16G sdcard memory. FreeBSD 10.0 detects >> both but only the former can be mounted. And there is no issue mounting >> the sdcard on Ubuntu or on FreeBSD via iSCSI (fileio). [...] forgotten debug log - http://pastebin.com/NzpSJBRA > Could you check out the following thread: > > Re: HEAD memsticks broken? [USB/CAM Problems?] > From: > Joel Dahl > To: > mav@freebsd.org > CC: > > It seems that only USB sticks labeled as "Kingston DataTraveler G3" > are affected by r237478 (in my limited testing, at least). This particular > model is what you get if you buy the cheapest Kingston model on the market > right now. > > --HPS No luck with the following amd64 kernels: $ strings kernel*/kernel | fgrep '@(#)' @(#)FreeBSD 7.4-RELEASE #0: Fri Feb 18 01:55:22 UTC 2011 @(#)FreeBSD 8.3-RELEASE #0: Mon Apr 9 21:23:18 UTC 2012 @(#)FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 @(#)FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 @(#)FreeBSD 10.0-CURRENT #0 r237477: Mon Feb 18 01:20:09 UTC 2013 @(#)FreeBSD 10.0-CURRENT #0 r246891: Sun Feb 17 11:36:49 UTC 2013 From owner-freebsd-usb@FreeBSD.ORG Mon Feb 18 11:06:54 2013 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BB5F1241 for ; Mon, 18 Feb 2013 11:06:54 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id A9C75E3E for ; Mon, 18 Feb 2013 11:06:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r1IB6sN5061738 for ; Mon, 18 Feb 2013 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1IB6scb061736 for freebsd-usb@FreeBSD.org; Mon, 18 Feb 2013 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 18 Feb 2013 11:06:54 GMT Message-Id: <201302181106.r1IB6scb061736@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Subject: Current problem reports assigned to freebsd-usb@FreeBSD.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2013 11:06:54 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/175731 usb detaching USB keyboard freezes other USB keyboards o usb/175639 usb not detect usb netcard D-LINK DUB-E100 rev C1 o usb/175599 usb [usbdevs][patch]Liebert UPS PSI1000 being assigned uhi o usb/175551 usb Seagate 2TB USB extern hard disk have errors with Free o usb/175454 usb update usbdevs and usb_quirk.c for SanDisk SDDR-289 o usb/175379 usb usb card-reader problem o usb/175302 usb don't mount virtual driver CD for my phone o usb/174963 usb buffalo wli-uc-gn wireless card sometimes unusable and o usb/174835 usb uaudio fails to create pcm/dsp device file o usb/174814 usb [PATCH] support for MiFi 2200 o usb/174695 usb usb keeps disconnecting mouse or keyboard o usb/174575 usb Interrupt storm error on startup o usb/174464 usb clone MAC address(es) on usb networks cdce(4) && ue[0- o usb/174254 usb MIDI keyboard not recognised o usb/173722 usb XHCI driver bug after suspend to ram (ACPI S3 mode) o usb/173616 usb LG USB DVD-RW USB STALL o usb/173182 usb usbus appears as a network device o usb/172937 usb FreeBSD 9.1-RC2 usb3 port disconnects o usb/172633 usb Sony Cybershot not recognized as USB mem stick o usb/172199 usb high interrupts load xhci o usb/171354 usb [umass] Medium not present error on flash drive [regre o usb/171262 usb plug in sdhc via usb reader reboots machine o usb/171197 usb ADATA Classic CH11 USB HDD doesn't work in FreeBSD 9.1 o usb/170699 usb FreeBSD 9.0 Doesn't list HDD or its partitions in part o usb/170688 usb patch][usbdevs][wlan] Patch for ASUS Black Diamond USB o usb/170606 usb r239222 kernel panic at boot - usb locking issue o usb/170358 usb [ums] Wrong (duplicate) button numbers o usb/170123 usb [umass] HP v210w USB stick not supported o usb/169935 usb [keyboard] Unable use USB keyboard while panic o usb/169789 usb [u3g] [patch] add support for huawei e3131 o usb/169461 usb [ugen] USB2 high-speed device detected as full speed o usb/169428 usb [ugen] ugen not detecting all endpoints on device [reg o usb/168551 usb [umass] Issues with embedded card reader (Laptop ASUS o usb/168132 usb [umass] MATSHITA memory card size reported wrong, moun o usb/167847 usb [ural] dlink dwl-122g e crashes(?) when trying wap2 cr o usb/167001 usb [USB] [PATCH] add support for Smart G2 64MB memory key o usb/165815 usb [usbdevs] [patch] add k3772z 3g modem support o usb/165163 usb [keyboard] The USB RF keyboard and mouse become non-re o usb/164058 usb [umass] Lexar 8GB USB flash drive doesn't work by defa f usb/163328 usb [usb] Support for Atheros USB abgn devices o kern/163091 usb [panic] Fatal trap 12: page fault while in kernel mode f usb/162306 usb usb devices cant get address asignation, no memories, o usb/162054 usb usbdump just hangs on 9.0-RC1 f usb/161793 usb poor EHCI usb2 i/o performance o usb/160436 usb ucom wedges machine on parity error ? o usb/160299 usb MicroSDHC-to-USB adapters do not work in FreeBSD 8.x o usb/160192 usb [install] Installation from USB-Stick doesn't find the o usb/159274 usb USB 3.0 Etron EJ168A does not work. f usb/159191 usb [fusefs-ntfs] write on fusefs-ntfs mounted partition r o usb/157376 usb LaCie USB disk not recognized o usb/157074 usb [boot] [usb8] vfs_mountroot_ask is called when no usb o usb/156898 usb [keyboard] usb keyboard does not work while boot (ps2 f usb/156735 usb Need Quirk for Goflex USB Disk Drives o usb/156726 usb [snd_uaudio]: snd_uaudio(4) fails to detach when mixer o usb/156725 usb USB stack stall cause complete system input loss o usb/156596 usb [ehci] Extremely high interrupt rate on ehci/uhci IRQ1 o usb/156000 usb rum(4) Fatal trap 18: integer divide fault while in ke f usb/155996 usb NanoBSD not booted as Disk o usb/155784 usb Problem with Transcend StoreJet 25M3 (2AJ1) on Asus M2 o usb/155663 usb [usbdevs] [patch] Add support for Supertop Nano 1GB US o usb/154753 usb [usbdevs] [patch] Support for Qualcomm USB modem/stora o usb/154506 usb [umass] Copying dir with large files makes FreeBSD loa o usb/154192 usb [umass] In Garmin Oregon GPS, only the first umass dev o i386/153851 usb [keyboard] keyboard issues on new Intel Mother boards. o usb/153703 usb [keyboard] My USB keyboard can not be used in 8-STABLE o usb/153609 usb [zyd] [panic] kernel: Fatal trap 12: page fault while o usb/153149 usb [umass] USB stick quirk regression [regression] o usb/152075 usb [usb8] [ehci] [request] Add quirk for CS5536 USB o usb/150892 usb [zyd] Whenever network contacted in any shape, way or o usb/150189 usb [run] [usb8] [patch] if_run appears to corrupt IP traf p usb/149764 usb [u3g] [patch] usbdevs update: Huawei K3765 3G modem o usb/149283 usb [uftdi] avrdude unable to talk to Arduino board (via u o usb/149162 usb [ural] ASUS WL-167g doesn't work in 8.1 (continue of 1 s usb/148702 usb [usb8] [request] IO DATA USB-RSAQ5 support on FreeBSD- o usb/148080 usb usbconfig(8) sometimes does not turn off the device o i386/147475 usb [install] FreeBSD 8.x does not install on ASUS K8N4-E o usb/146840 usb [hang] FreeBSD 7.2 / 7.3 / 8.0 hang at startup after e o usb/146153 usb [axe] [usb8] Hosts in network doesn't receive any pack f usb/146054 usb [urtw] [usb8] urtw driver potentially out of date f usb/145513 usb [usb8] New USB stack: no new devices after forced usb p usb/145455 usb [usb8] [patch] USB debug support cannot be disabled o usb/145415 usb [umass] [usb8] USB card reader does not create slices a usb/145184 usb GENERIC can't mount root from USB on Asus EEE o usb/145165 usb [keyboard] [usb8] ukbd_set_leds_callback: error=USB_ER f kern/144938 usb [keyboard] [boot] Boot Failure with Apple (MB869LL/A) o usb/144387 usb [run] [panic] if_run panic o usb/144043 usb [umass] [usb8] USB DLT tape drive throws random errors a usb/143790 usb [boot] [cam] can not boot from usb hdd f usb/143620 usb [cdce] [usb8] the module if_cdce doesn't support my Op f usb/143294 usb [usb8] copying process stops at some time (10 - 50 sec o usb/143286 usb [ukbd] [usb8] [boot] boot failures on RELENG_8 system p usb/143186 usb [usbdevs] [usb8] [patch] add USB device IDs for Google a usb/143139 usb [umass] [usb8] [patch] Quirk for Century EX35SW4_SB4 J p usb/143045 usb [umass] [usb8] [patch] mounting Fujitsu 2600Z camera d f usb/142989 usb [usb8] canon eos 50D attaches but detaches after few s f usb/142957 usb [umass] [usb8] [patch] patch for USB disk SYNCHRONIZE o usb/142719 usb [urtw] [usb8] AirLive WL-1600USB (RTL8187L chipset) fa f usb/142276 usb [umass] [usb8] Cache Synchronization Error with Olympu o usb/142229 usb [ums] [usb8] [hang] connecting a USB mouse to a Dell P f usb/141680 usb [uath] [usb8] Netgear WG111T not working with uath dri o usb/141664 usb [pcm] [usb8] Logitech USB microphone failure [regressi o usb/141474 usb [boot] [usb8] FreeBSD 8.0 can not install from USB CDR o usb/141212 usb [ukbd] [usb8] ukbd_set_leds_callback:700: error=USB_ER o kern/141011 usb [usb8] Encrypted root, geli password at boot; enter ke o usb/140920 usb [install] [usb8] USB based install fails on 8.0-RELEAS o usb/140893 usb [urtw] [usb8] WPA2 not working on rtl8187b o kern/140849 usb [ums] [usb8] USB mouse doesn't work under FreeBSD 8.0- a usb/140810 usb [uftdi] [usb8] 8.X copy and paste problem / tty overfl o usb/140477 usb [umass] [usb8] [patch] allow boot-time attachment of d o usb/140236 usb [msdosfs] [usb8] Labels wiped on external Journaled US o usb/140160 usb [usb8] [acpi] USB ports are no longer "active" after A o usb/138798 usb [boot] [usb8] 8.0-BETA4 can't boot from USB flash driv o usb/138659 usb [usb8][uftdi] driver broken in RELENG_8/CURRENT o usb/138124 usb [snd_uaudio] [usb8] Axed uaudio functionality in the u o usb/137377 usb [usb8] request support for Huawei E180 o usb/137341 usb [usb8][rum] driver if_rum doesn't work at all and thro f usb/137190 usb [usb8][patch] inhibit spurious button releases for som o usb/137189 usb [usb8][patch] create and use sysctl nodes for HID repo p usb/137188 usb [usb8][patch] correctly handle USB report descriptors o usb/137129 usb [ums] [usb8] SteelSeries Ikari USB laser mouse not att o usb/135542 usb [keyboard] boot loader does not work with a usb keyboa o usb/135206 usb machine reboots when inserted USB device f usb/135200 usb SAMSUNG i740 usb mass: Synchronize cache failed, statu o usb/134950 usb Lowering DTR for USB-modem via ubsa is not possible o usb/134299 usb Kernel Panic plugging in MF626 USB UMTS Stick u3g o usb/134193 usb System freeze on usb MP3 player insertion o usb/134085 usb [umass] [patch] Adding usb quirk for Sony USB flash dr o usb/133989 usb [usb8] [ukbd] USB keyboard dead at mountroot> prompt o usb/133712 usb [ural] [patch] RE: Fixed an issue with ural(4) that wa o usb/133390 usb umass crashes system in 7.1 when Olympus D-540 attache o usb/133296 usb [rum] driver not working properly in hostap mode o usb/132594 usb USB subsystem causes page fault and crashes o usb/132080 usb [patch] [usb] [rum] [panic] Kernel panic after NOMEM c o usb/132066 usb [ukbd] Keyboard failure USB keyboard DELL 760 o usb/132036 usb [panic] page fault when connecting Olympus C740 camera o usb/131583 usb [umass] Failure when detaching umass Device o usb/131576 usb [aue] ADMtek USB To LAN Converter can't send data o usb/131521 usb Registering Belkin UPS to usb_quirks.c o usb/131074 usb no run-time detection of usb devices plugged into exte o usb/130736 usb Page fault unplugging USB stick o usb/130208 usb Boot process severely hampered by umass0 error o usb/130122 usb [usb8] DVD drive detects as 'da' device f usb/129766 usb [usb] [panic] plugging in usb modem HUAWEI E226 panics o usb/129500 usb [umass] [panic] FreeBSD Crashes when connecting SanDis o usb/129311 usb [usb] [panic] Instant crash with an USB card reader o usb/128485 usb [umodem] [patch] Nokia N80 modem support o usb/128425 usb [umass] Cannot Connect Maxtor Onetouch 4 USB drive o usb/128418 usb [panic] [rum] loading if_rum causes panic, looks like o usb/127926 usb [boot] USB Timeout during bootup o usb/127342 usb [boot] [panic] enabling usb keyboard and mouse support o usb/127248 usb [ucom] panic while uplcom devices attach and detach o usb/126884 usb [ugen] [patch] Bug in buffer handling in ugen.c o usb/126848 usb [usb]: USB Keyboard hangs during Installation o usb/126740 usb [ulpt] doesn't work on 7.0-RELEASE, 10 second stall be o usb/126519 usb [usb] [panic] panic when plugging in an iphone o kern/126396 usb [panic] kernel panic after unplug USB Bluetooth device o usb/125631 usb [ums] [panic] kernel panic during bootup while 'Logite o usb/125510 usb [panic] repeated plug and unplug of USB mass storage d f usb/125450 usb [panic] Removing USB flash card while being accessed c o usb/125088 usb [keyboard] Touchpad not detected on Adesso AKB-430UG U o usb/124980 usb [panic] kernel panic on detaching unmounted umass devi o kern/124777 usb [ucom] USB cua devices don't revert to tty devices whe o usb/124758 usb [rum] [panic] rum panics SMP kernel o usb/124708 usb [panic] Kernel panic on USB KVM reattach o kern/124130 usb [usb] gmirror fails to start usb devices that were pre o usb/123969 usb [usb] Supermicro H8SMi-2 usb problem: port reset faile o usb/123714 usb [usb] [panic] Panic when hald-storage-probe runs with o usb/123691 usb usbd(8): usbd hangs o usb/123690 usb [usb] [panic] Panic on USB device insertion when usb l o usb/123611 usb [usb] BBB reset failed, STALLED from Imation/Mitsumi U o usb/122992 usb [umass] [patch] MotoROKR Z6 Phone not recognised by um o usb/122936 usb [ucom] [ubsa] Device does not receive interrupt o usb/122905 usb [ubsa] [patch] add Huawei E220 to ubsa o usb/122547 usb [ehci] USB Printer not being recognized after reboot o usb/122539 usb [ohci] [panic] AnyDATA ADU-E1000D - kernel panic: ohci o usb/122483 usb [panic] [ulpt] Repeatable panic in 7.0-STABLE o usb/122119 usb [umass] umass device causes creation of daX but not da o usb/121734 usb [ugen] ugen HP1022 printer device not working since up o usb/121708 usb [keyboard] nforce 650i mobo w/ usb keyboard infinite k o usb/121275 usb [boot] [panic] FreeBSD fails to boot with usb legacy s o usb/121169 usb [umass] Issues with usb mp3 player o usb/121045 usb [uftdi] [patch] Add support for PC-OP-RS1 and KURO-RS f usb/120786 usb [usb] [panic] Kernel panic when forced umount of a det o usb/120729 usb [panic] fault while in kernel mode with connecting USB o conf/120406 usb [devd] [patch] Handle newly attached pcm devices (eg. o usb/120321 usb [hang] System hangs when transferring data to WD MyBoo o usb/120283 usb [panic] Automation reboot with wireless keyboard & mou o usb/120034 usb [hang] 6.2 & 6.3 hangs on boot at usb0: OHCI with 1.5 o usb/119977 usb [ums] Mouse does not work in a Cherry-USB keyboard/mou o usb/119653 usb [cam] [patch] iriver s7 player sync cache error patch o usb/119633 usb [umass] umass0: BBB reset failed, IOERROR [regression] o usb/119509 usb [usb] USB flaky on Dell Optiplex 755 o usb/119389 usb [umass] Sony DSC-W1 CBI reset failed, STALLED [regress o usb/119227 usb [ubsa] [patch] ubsa buffer is too small; should be tun o usb/118480 usb [umass] Timeout in USB mass storage freezes vfs layer o usb/118353 usb [panic] [ppp] repeatable kernel panic during ppp(4) se o usb/118141 usb [ucom] usb serial and nokia phones ucomreadcb ucomread o usb/118140 usb [ucom] [patch] quick hack for ucom to get it behave wi o usb/118098 usb [umass] 6th gen iPod causes problems when disconnectin o usb/117955 usb [umass] [panic] inserting minolta dimage a2 crashes OS o usb/117946 usb [panic] D-Link DUB-E100 rev. B1 crashes FreeBSD 7.0-BE o usb/117938 usb [ums] [patch] Adding support for MS WL Natural and MS o usb/117911 usb [ums] [request] Mouse Gembird MUSWC not work o usb/117893 usb [umass] Lacie USB DVD writing failing o usb/117613 usb [uhci] [irq] uhci interrupt storm & USB leaked memory o usb/117598 usb [snd_uaudio] [patch] Not possible to record with Plant o usb/117313 usb [umass] [panic] panic on usb camera insertion o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a o usb/116561 usb [umodem] [panic] RELENG_6 umodem panic "trying to slee o usb/116282 usb [ulpt] Cannot print on USB HP LJ1018 or LJ1300 o usb/115935 usb [usbdevs] [patch] kernel counterproductively attaches o usb/115400 usb [ehci] Problem with EHCI on ASUS M2N4-SLI o usb/115298 usb [ulpt] [panic] Turning off USB printer panics kernel o usb/114916 usb [umass] [patch] USB Maxtor drive (L300RO) requires qui o kern/114780 usb [uplcom] [panic] Panics while stress testing the uplco o usb/114682 usb [umass] generic USB media-card reader unusable o usb/114310 usb [libusb] [patch] [panic] USB hub attachment panics ker o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff o usb/99431 usb [keyboard] FreeBSD on MSI 6566E (Intel 845E motherboar o usb/98343 usb [boot] BBB reset failed errors with Creative Muvo MP3 o usb/97472 usb [cam] [patch] add support for Olympus C150,D390 s usb/97286 usb [mouse] [request] MS Wireless Intellimouse Explorer 2. o usb/97175 usb [umass] [hang] USB cardreader hangs system o usb/96457 usb [umass] [panic] fatback on umass = reboot o usb/96224 usb [usb] [msdosfs] mount_msdosfs cause page fault in sync s usb/96120 usb [ums] [request] USB mouse not always detected s usb/95636 usb [umass] [boot] 5 minute delay at boot when using VT620 o usb/95562 usb [umass] Write Stress in USB Mass drive causes "vinvalb o usb/95037 usb [umass] USB disk not recognized on hot-plug. o usb/94897 usb [panic] Kernel Panic when cleanly unmounting USB disk o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94384 usb [panic] kernel panic with usb2 hardware o usb/93828 usb [ohci] [panic] ohci causes panic on boot (HP Pavillion o usb/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work o usb/92852 usb [ums] [patch] Vertical scroll not working properly on o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/92142 usb [uhub] SET_ADDR_FAILED and SHORT_XFER errors from usb o usb/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92052 usb [ulpt] usbd causes defunct process with busy file-hand o usb/91906 usb [ehci] [hang] FreeBSD hangs while booting with USB leg f usb/91896 usb camcontrol(8): Serial Number of USB Memory Sticks is n o usb/91811 usb [umass] Compact Flash in HP Photosmart 2610 return " o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91538 usb [ulpt] [patch] Unable to print to EPSON CX3500 o usb/91283 usb [boot] [regression] booting very slow with usb devices o usb/91238 usb [umass] USB tape unit fails to write a second tape fil o usb/90700 usb [umass] [panic] Kernel panic on connect/mount/use umas o usb/89954 usb [umass] [panic] USB Disk driver race condition? o usb/88743 usb [hang] [regression] USB makes kernel hang at boot (reg o usb/88408 usb [axe] axe0 read PHY failed o usb/87648 usb [mouse] Logitech USB-optical mouse problem. f usb/87224 usb [usb] Cannot mount USB Zip750 o usb/86767 usb [umass] [patch] bogus "slice starts beyond end of the o usb/86298 usb [mouse] Known good USB mouse won't work with correct s s usb/85067 usb [uscanner] Cannot attach ScanJet 4300C to usb device o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/83863 usb [ugen] Communication problem between opensc/openct via o usb/83756 usb [ums] [patch] Microsoft Intellimouse Explorer 4.0A doe o usb/83504 usb [kernel] [patch] SpeedTouch USB stop working on recent o usb/82520 usb [udbp] [reboot] Reboot when USL101 connected o usb/82350 usb [ucom] [panic] null pointer dereference in USB stack o usb/81621 usb [ehci] [hang] external hd hangs under load on ehci o usb/80935 usb [uvisor] [patch] uvisor.c is not work with CLIE TH55. s usb/80777 usb [request] usb_rem_task() should wait for callback to c s usb/80776 usb [udav] [request] UDAV device driver shouldn't use usb_ o usb/80774 usb [patch] have "usbd_find_desc" in line with the other " o usb/80361 usb [umass] [patch] mounting of Dell usb-stick fails f usb/80040 usb [sound] [hang] Use of sound mixer causes system freeze o usb/79723 usb [usb] [request] prepare for high speed isochronous tra o usb/78984 usb [umass] [patch] Creative MUVO umass failure o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device s usb/75928 usb [umass] [request] Cytronix SmartMedia card (SMC) reade o usb/75800 usb [ucom] ucom1: init failed STALLED error in time of syn o usb/75764 usb [umass] [patch] "umass0: Phase Error" - no device for s usb/74453 usb [umass] [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71155 usb [ulpt] misbehaving usb-printer hangs processes, causes o usb/69006 usb [usbdevs] [patch] Apple Cinema Display hangs USB ports o usb/67301 usb [uftdi] [panic] RTS and system panic o usb/66547 usb [ucom] Palm Tungsten T USB does not initialize correct o usb/63621 usb [umass] [panic] USB MemoryStick Reader stalls/crashes s usb/62257 usb [umass] [request] card reader UCR-61S2B is only half-s s usb/52026 usb [usb] [request] umass driver support for InSystem ISD2 s usb/51958 usb [urio] [patch] update for urio driver o usb/40948 usb [umass] [request] USB HP CDW8200 does not work o usb/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem 289 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Feb 18 17:57:26 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5FEA0F18 for ; Mon, 18 Feb 2013 17:57:26 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.c2i.net [212.247.154.226]) by mx1.freebsd.org (Postfix) with ESMTP id EDB47CB2 for ; Mon, 18 Feb 2013 17:57:25 +0000 (UTC) X-T2-Spam-Status: No, hits=0.0 required=5.0 Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 380184335; Mon, 18 Feb 2013 18:57:23 +0100 From: Hans Petter Selasky To: Jan Beich Subject: Re: sdcard read error with nokia n8 as mass storage Date: Mon, 18 Feb 2013 18:58:34 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-STABLE; KDE/4.8.4; amd64; ; ) References: <1U77My-000GSe-V1@internal.tormail.org> <201302172220.57351.hselasky@c2i.net> <1U7Jyd-000Ib5-C0@internal.tormail.org> In-Reply-To: <1U7Jyd-000Ib5-C0@internal.tormail.org> X-Face: ?p&W)c(+80hU; '{.$5K+zq{oC6y| /D'an*6mw>j'f:eBsex\Gi, Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2013 17:57:26 -0000 On Monday 18 February 2013 07:11:56 Jan Beich wrote: > Hans Petter Selasky writes: > > On Sunday 17 February 2013 17:24:23 Jan Beich wrote: > >> The phone has 16G of on-board and 16G sdcard memory. FreeBSD 10.0 > >> detects both but only the former can be mounted. And there is no issue > >> mounting the sdcard on Ubuntu or on FreeBSD via iSCSI (fileio). > > [...] > > forgotten debug log - http://pastebin.com/NzpSJBRA > Hi, Try this quirk: usbconfig -d x.y add_quirk UQ_MSC_NO_INQUIRY --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Feb 18 22:02:02 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 724F37E8 for ; Mon, 18 Feb 2013 22:02:02 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id 0F3BC9DB for ; Mon, 18 Feb 2013 22:02:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1U7YmT-0007yV-Vd; Tue, 19 Feb 2013 01:01:54 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:Subject:Cc:To:From; bh=yL/bqI+z7P2+tj63YFrHshhzo+UjVxrhr/gy/I9+ja4=; b=ZF3/48+JZpK9n3iFKk3jg181a7sz43p6wNUcHFNb9SDofCC05DR/24wEnG6mjS46WC2YQKcjHjE26iCLBu8mYP6hWfpn6g13Kt/MC2mDqZOF23L0iopwWfLSQ4j4AEYbYvwozLRrdBYOk+gdp50+WOn+9tbzltg8WHNDLzI8Zw4=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1U7Yio-000M2x-JX; Mon, 18 Feb 2013 21:58:10 +0000 From: Jan Beich To: Hans Petter Selasky Subject: Re: sdcard read error with nokia n8 as mass storage Date: Mon, 18 Feb 2013 10:57:25 -1100 References: <1U77My-000GSe-V1@internal.tormail.org> <201302172220.57351.hselasky@c2i.net> <1U7Jyd-000Ib5-C0@internal.tormail.org> <201302181858.34688.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1U7Yio-000M2x-JX@internal.tormail.org> Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2013 22:02:02 -0000 Hans Petter Selasky writes: > On Monday 18 February 2013 07:11:56 Jan Beich wrote: > >> Hans Petter Selasky writes: >> > On Sunday 17 February 2013 17:24:23 Jan Beich wrote: >> >> The phone has 16G of on-board and 16G sdcard memory. FreeBSD 10.0 >> >> detects both but only the former can be mounted. And there is no issue >> >> mounting the sdcard on Ubuntu or on FreeBSD via iSCSI (fileio). [...] >> >> $ usbdump -i usbus7 -s 0 -vvv # on attach >> >> forgotten linux usbmon dump - http://pastebin.com/Df9Zp6T5 >> >> [...] >> >> forgotten debug log - http://pastebin.com/NzpSJBRA http://pastebin.com/P9474rw4 # no quirks (via source edit) Why UQ_MSC_NO_SYNC_CACHE is always added for the device? on-board (da0) memory seems to mount/work just fine without + "Medium not present" is gone. $ usbconfig dump_device_quirks | fgrep 421 $ kenv | fgrep usb hw.usb.no_boot_wait="1" hw.usb.umass.debug="-1" > Try this quirk: > > usbconfig -d x.y add_quirk UQ_MSC_NO_INQUIRY http://pastebin.com/4R0MYTUK # UQ_MSC_NO_INQUIRY http://pastebin.com/AGHGiC3n # UQ_MSC_NO_INQUIRY + UQ_MSC_NO_SYNC_CACHE I've tried a few more (at random) with no luck either. http://pastebin.com/RW2cg51S # UQ_MSC_FORCE_SHORT_INQ http://pastebin.com/ahiUvS7f # UQ_MSC_WRONG_CSWSIG http://pastebin.com/Wf6Be9uN # UQ_MSC_IGNORE_RESIDUE http://pastebin.com/0W4pcKmY # UQ_MSC_READ_CAP_OFFBY1 Linux seems to use only CAPACITY_HEURISTICS quirk. From owner-freebsd-usb@FreeBSD.ORG Tue Feb 19 07:18:15 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 37BA38D0; Tue, 19 Feb 2013 07:18:15 +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 8396FE1; Tue, 19 Feb 2013 07:18:13 +0000 (UTC) X-T2-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_50 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 379897645; Tue, 19 Feb 2013 08:13:02 +0100 From: Hans Petter Selasky To: Jan Beich Subject: Re: sdcard read error with nokia n8 as mass storage Date: Tue, 19 Feb 2013 08:14:16 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-STABLE; KDE/4.8.4; amd64; ; ) References: <1U77My-000GSe-V1@internal.tormail.org> <201302181858.34688.hselasky@c2i.net> <1U7Yio-000M2x-JX@internal.tormail.org> In-Reply-To: <1U7Yio-000M2x-JX@internal.tormail.org> X-Face: ?p&W)c(+80hU; '{.$5K+zq{oC6y| /D'an*6mw>j'f:eBsex\Gi, Cc: mav@freebsd.org, freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2013 07:18:15 -0000 On Monday 18 February 2013 22:57:25 Jan Beich wrote: > Hans Petter Selasky writes: > > On Monday 18 February 2013 07:11:56 Jan Beich wrote: > >> Hans Petter Selasky writes: > >> > On Sunday 17 February 2013 17:24:23 Jan Beich wrote: > >> >> The phone has 16G of on-board and 16G sdcard memory. FreeBSD 10.0 > >> >> detects both but only the former can be mounted. And there is no > >> >> issue mounting the sdcard on Ubuntu or on FreeBSD via iSCSI > >> >> (fileio). > > [...] > > >> >> $ usbdump -i usbus7 -s 0 -vvv # on attach > >> >> > > forgotten linux usbmon dump - http://pastebin.com/Df9Zp6T5 > > >> [...] > >> > >> forgotten debug log - http://pastebin.com/NzpSJBRA > > http://pastebin.com/P9474rw4 # no quirks (via source edit) > > Why UQ_MSC_NO_SYNC_CACHE is always added for the device? on-board (da0) > memory seems to mount/work just fine without + "Medium not present" > is gone. > > $ usbconfig dump_device_quirks | fgrep 421 > > > $ kenv | fgrep usb > hw.usb.no_boot_wait="1" > hw.usb.umass.debug="-1" > > > Try this quirk: > > > > usbconfig -d x.y add_quirk UQ_MSC_NO_INQUIRY > > http://pastebin.com/4R0MYTUK # UQ_MSC_NO_INQUIRY > http://pastebin.com/AGHGiC3n # UQ_MSC_NO_INQUIRY + UQ_MSC_NO_SYNC_CACHE > > I've tried a few more (at random) with no luck either. > > http://pastebin.com/RW2cg51S # UQ_MSC_FORCE_SHORT_INQ > http://pastebin.com/ahiUvS7f # UQ_MSC_WRONG_CSWSIG > http://pastebin.com/Wf6Be9uN # UQ_MSC_IGNORE_RESIDUE > http://pastebin.com/0W4pcKmY # UQ_MSC_READ_CAP_OFFBY1 > > Linux seems to use only CAPACITY_HEURISTICS quirk. Hi, The device fails on READ_10. Maybe this command is not supported. I'm not sure how to reprogram CAM/SCSI layers to use READ_6 instead. --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Feb 19 09:29:47 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8B9F2737 for ; Tue, 19 Feb 2013 09:29:47 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by mx1.freebsd.org (Postfix) with ESMTP id 80DB9B33 for ; Tue, 19 Feb 2013 09:29:46 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id jk13so2881549bkc.25 for ; Tue, 19 Feb 2013 01:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=/6wqlBf2RRo1+0DkqA/2T42fMKHH4W3CoAcTeNqrft8=; b=JJlBVWIN/6izbZ9xupsRJuf1mrOUVQOoCKyUOQyi23CxwrXcccxLf2GPVnrrbmbYcd 9mJMv69LT3fKQp2fbidv/uXcjGOnZ4LkG2+6z/7K2s9aa1VeiZH7b2kFGQ5FRPToc7Nu zPyj6ZEh3+MA8HtMz4yDLU07aVaZUpIFzDDlUD0YARpJ8at0a/rcFW9+1KJ14KHfVDTd R35l//WZE3ikXKcDLVaFHZXSkf+hNMZ2Knu7c7Q/UHK+QQHObZtwIDQd6+E0+whyUhMt 3ylg7dQ+zS8N6KJZOVjocLvx5c9hzUM78uIH1IDAAj6dpkbfjSupkMVwBqJgbyVd/0OT 6DNA== X-Received: by 10.204.151.196 with SMTP id d4mr5901471bkw.37.1361266184981; Tue, 19 Feb 2013 01:29:44 -0800 (PST) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id s10sm21817389bkt.10.2013.02.19.01.29.43 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 01:29:44 -0800 (PST) Sender: Alexander Motin Message-ID: <51234605.3000300@FreeBSD.org> Date: Tue, 19 Feb 2013 11:29:41 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130125 Thunderbird/17.0.2 MIME-Version: 1.0 To: Hans Petter Selasky Subject: Re: sdcard read error with nokia n8 as mass storage References: <1U77My-000GSe-V1@internal.tormail.org> <201302181858.34688.hselasky@c2i.net> <1U7Yio-000M2x-JX@internal.tormail.org> <201302190814.16315.hselasky@c2i.net> In-Reply-To: <201302190814.16315.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org, Jan Beich X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2013 09:29:47 -0000 On 19.02.2013 09:14, Hans Petter Selasky wrote: > On Monday 18 February 2013 22:57:25 Jan Beich wrote: >> Hans Petter Selasky writes: >>> On Monday 18 February 2013 07:11:56 Jan Beich wrote: >>>> Hans Petter Selasky writes: >>>>> On Sunday 17 February 2013 17:24:23 Jan Beich wrote: >>>>>> The phone has 16G of on-board and 16G sdcard memory. FreeBSD 10.0 >>>>>> detects both but only the former can be mounted. And there is no >>>>>> issue mounting the sdcard on Ubuntu or on FreeBSD via iSCSI >>>>>> (fileio). >> >> [...] >> >>>>>> $ usbdump -i usbus7 -s 0 -vvv # on attach >>>>>> >> >> forgotten linux usbmon dump - http://pastebin.com/Df9Zp6T5 >> >>>> [...] >>>> >>>> forgotten debug log - http://pastebin.com/NzpSJBRA >> >> http://pastebin.com/P9474rw4 # no quirks (via source edit) >> >> Why UQ_MSC_NO_SYNC_CACHE is always added for the device? on-board (da0) >> memory seems to mount/work just fine without + "Medium not present" >> is gone. >> >> $ usbconfig dump_device_quirks | fgrep 421 >> >> >> $ kenv | fgrep usb >> hw.usb.no_boot_wait="1" >> hw.usb.umass.debug="-1" >> >>> Try this quirk: >>> >>> usbconfig -d x.y add_quirk UQ_MSC_NO_INQUIRY >> >> http://pastebin.com/4R0MYTUK # UQ_MSC_NO_INQUIRY >> http://pastebin.com/AGHGiC3n # UQ_MSC_NO_INQUIRY + UQ_MSC_NO_SYNC_CACHE >> >> I've tried a few more (at random) with no luck either. >> >> http://pastebin.com/RW2cg51S # UQ_MSC_FORCE_SHORT_INQ >> http://pastebin.com/ahiUvS7f # UQ_MSC_WRONG_CSWSIG >> http://pastebin.com/Wf6Be9uN # UQ_MSC_IGNORE_RESIDUE >> http://pastebin.com/0W4pcKmY # UQ_MSC_READ_CAP_OFFBY1 >> >> Linux seems to use only CAPACITY_HEURISTICS quirk. > > Hi, > > The device fails on READ_10. Maybe this command is not supported. I'm not sure > how to reprogram CAM/SCSI layers to use READ_6 instead. CAM DA driver uses shortest possible command, but no shorter then kern.cam.da.X.minimum_cmd_size value, that is 10 by default for umass due to cpi->hba_misc = PIM_NO_6_BYTE set in umass.c. -- Alexander Motin From owner-freebsd-usb@FreeBSD.ORG Tue Feb 19 22:33:42 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0733F74C for ; Tue, 19 Feb 2013 22:33:42 +0000 (UTC) (envelope-from aman.sawrup@bluecoat.com) Received: from synonym.bluecoat.com (synonym.bluecoat.com [199.91.133.5]) by mx1.freebsd.org (Postfix) with ESMTP id D32C4C1E for ; Tue, 19 Feb 2013 22:33:41 +0000 (UTC) Received: from [10.167.0.106] (aman-sawrup.waterloo.bluecoat.com [10.167.0.106]) by synonym.bluecoat.com (Postfix) with ESMTP id 5527A7FE1B8; Tue, 19 Feb 2013 14:26:20 -0800 (PST) Message-ID: <5123FC0B.70009@bluecoat.com> Date: Tue, 19 Feb 2013 17:26:19 -0500 From: Aman Sawrup User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-usb@freebsd.org Subject: Insufficient memory reserved for xfer->dma_page_ptr? References: <1360360082956-5785167.post@n5.nabble.com> <201302090001.57258.hselasky@c2i.net> In-Reply-To: <201302090001.57258.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2013 22:33:42 -0000 Hi Hans, I think I might have found a bug in usbd_transfer_setup_sub that causes insufficient memory allocated for xfer->dma_page_ptr. The code in question is: #if USB_HAVE_BUSDMA if (xfer->flags_int.bdma_enable) { /* * Setup "dma_page_ptr". * * Proof for formula below: * * Assume there are three USB frames having length "a", "b" and * "c". These USB frames will at maximum need "z" * "usb_page" structures. "z" is given by: * * z = ((a / USB_PAGE_SIZE) + 2) + ((b / USB_PAGE_SIZE) + 2) + * ((c / USB_PAGE_SIZE) + 2); * * Constraining "a", "b" and "c" like this: * * (a + b + c) <= parm->bufsize * * We know that: * * z <= ((parm->bufsize / USB_PAGE_SIZE) + (3*2)); * * Here is the general formula: */ xfer->dma_page_ptr = parm->dma_page_ptr; parm->dma_page_ptr += (2 * n_frbuffers); parm->dma_page_ptr += (parm->bufsize / USB_PAGE_SIZE); } #endif What I observe happening on a 64-bit x86 system is 4608 bytes reserved for xfer->dma_page_ptr. For example, this is what I see: (gdb) p parm->dma_page_ptr $75 = (struct usb_page *) 0x6dad46e0 (gdb) p xfer->dma_page_ptr $76 = (struct usb_page *) 0x6dad34e0 (gdb) p /d 0x6dad46e0 - 0x6dad34e0 $79 = 4608 (gdb) p /d sizeof(struct usb_page) $74 = 16 (gdb) p /d n_frbuffers $68 = 128 (gdb) p /d parm->bufsize $70 = 131072 I believe the amount of memory reserved needs to be much higher. For example, if sizeof(struct usb_page) is 16 bytes, then for n_frbuffers of 128 and parm->bufsize of 131072, we need the following amount of memory reserved: parm->bufsize / USB_PAGE_SIZE * n_frbuffers * sizeof(struct usb_page) = 131072 / 4096 * 128 * 16 = 65536 Thanks Aman From owner-freebsd-usb@FreeBSD.ORG Wed Feb 20 07:35:53 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3822E1DF for ; Wed, 20 Feb 2013 07:35:53 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe09.c2i.net [212.247.155.2]) by mx1.freebsd.org (Postfix) with ESMTP id C1E1C7F3 for ; Wed, 20 Feb 2013 07:35:52 +0000 (UTC) X-T2-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_50 Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe09.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 205622896; Wed, 20 Feb 2013 08:35:44 +0100 From: Hans Petter Selasky To: Aman Sawrup Subject: Re: Insufficient memory reserved for xfer->dma_page_ptr? Date: Wed, 20 Feb 2013 08:36:55 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-STABLE; KDE/4.8.4; amd64; ; ) References: <1360360082956-5785167.post@n5.nabble.com> <201302090001.57258.hselasky@c2i.net> <5123FC0B.70009@bluecoat.com> In-Reply-To: <5123FC0B.70009@bluecoat.com> X-Face: ?p&W)c( =?iso-8859-1?q?+80hU=3B=27=7B=2E=245K+zq=7BoC6y=7C=0A=09/D=27an*6mw?=>j'f:eBsex\Gi, Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2013 07:35:53 -0000 On Tuesday 19 February 2013 23:26:19 Aman Sawrup wrote: > I believe the amount of memory reserved needs to be much higher. For > example, if sizeof(struct usb_page) is 16 bytes, then for n_frbuffers of > 128 and parm->bufsize of 131072, we need the following amount of memory > reserved: > > parm->bufsize / USB_PAGE_SIZE * n_frbuffers * sizeof(struct usb_page) > = 131072 / 4096 * 128 * 16 > = 65536 Hi, The parm->bufsize is shared for all frbuffers, so the formula should be correct. In your computation you assume that parm->bufsize gives the maximum for each frbuffer. That is not the case. That means, when you configure bufsize, you must not exceed that size as a total when setting up frames. This include all transfer types. I think there are asserts for that so you should get a panic fairly quickly. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Feb 20 09:11:13 2013 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 72B5CDDD for ; Wed, 20 Feb 2013 09:11:13 +0000 (UTC) (envelope-from bsam@passap.ru) Received: from forward14.mail.yandex.net (forward14.mail.yandex.net [IPv6:2a02:6b8:0:801::4]) by mx1.freebsd.org (Postfix) with ESMTP id 259E4DD6 for ; Wed, 20 Feb 2013 09:11:13 +0000 (UTC) Received: from smtp14.mail.yandex.net (smtp14.mail.yandex.net [95.108.131.192]) by forward14.mail.yandex.net (Yandex) with ESMTP id 1393419816A3 for ; Wed, 20 Feb 2013 13:11:11 +0400 (MSK) Received: from smtp14.mail.yandex.net (localhost [127.0.0.1]) by smtp14.mail.yandex.net (Yandex) with ESMTP id E28E51B607AA for ; Wed, 20 Feb 2013 13:11:10 +0400 (MSK) Received: from 87.249.28.58.tel.ru (87.249.28.58.tel.ru [87.249.28.58]) by smtp14.mail.yandex.net (nwsmtp/Yandex) with ESMTP id BA5S6fcI-BA5SYoZ4; Wed, 20 Feb 2013 13:11:10 +0400 Message-ID: <5124932E.5080205@passap.ru> Date: Wed, 20 Feb 2013 13:11:10 +0400 From: Boris Samorodov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130113 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-usb@FreeBSD.org Subject: argyllcms and usb (0.1 and 1.0) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2013 09:11:13 -0000 Hello, All! I try to build argyllcms (http://www.argyllcms.com/) at FreeBSD: ----- % uname -a FreeBSD bsam.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #8 r246714: Tue Feb 12 22:26:27 SAMT 2013 bsam@bsam.wart.ru:/usr/obj/usr/src/sys/BB64X amd64 ----- The program uses USB-0.1 and USB-1.0. There is a remark at sources that since libusb1 does not support FreeBSD, usb-0.1 is used. When compiling I get the following error: ----- spectro/usbio.c:741:17: error: use of undeclared identifier 'dev'; did you mean 'div'? descriptor = dev->descriptor; /* Copy */ ^~~ div /usr/include/stdlib.h:91:8: note: 'div' declared here div_t div(int, int) __pure2; ^ spectro/usbio.c:741:20: error: member reference base type 'div_t (int, int)' is not a structure or union descriptor = dev->descriptor; /* Copy */ ~~~^ ~~~~~~~~~~ 5 warnings and 2 errors generated. cc -c -o spectro/usbio.o -DUNIX -D_THREAD_SAFE -pipe -O2 -DARGYLLCMS -Ispectro -Ih -Inumlib -Iicc -Icgats -Irspl -Ixicc -Igamut -Ispectro -Iplot -Ilibusb -Iucmm -I/usr/local/include spectro/usbio.c ----- Relevant (imho) parts from the source file: ----- [...] #ifdef USE_LIBUSB1 # include "libusb.h" #else # include "usb.h" #endif [...] /* Get a copy of the device descriptor so we can see device params */ #ifdef USE_LIBUSB1 if (libusb_get_device_descriptor(p->ppath->dev, &descriptor) != LIBUSB_SUCCESS) error("Get device descriptor on USB port '%s' failed with %d (%s)",p->ppath->path,rv,libusb_strerror(rv)); #else descriptor = dev->descriptor; /* Copy */ #endif ----- GCC version of the error message: ----- spectro/usbio.c: In function 'usb_open_port': spectro/usbio.c:741: error: 'dev' undeclared (first use in this function) spectro/usbio.c:741: error: (Each undeclared identifier is reported only once spectro/usbio.c:741: error: for each function it appears in.) ----- Seems (from my very inexperienced in USB POV) that the program wants libusb-0.1 but gets libusb-2.0... So I'm stuck here. Questons. 1. Should I use some additional flags to build sources using libusb-0.1? 2. Is a note about FreeBSD about libusb1 is stale and lubusb1 is supported? Sould I use some flags to use libusb1? Any help is appreciated. Thanks! -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-usb@FreeBSD.ORG Wed Feb 20 14:44:14 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 427BA685 for ; Wed, 20 Feb 2013 14:44:14 +0000 (UTC) (envelope-from aman.sawrup@bluecoat.com) Received: from synonym.bluecoat.com (synonym.bluecoat.com [199.91.133.5]) by mx1.freebsd.org (Postfix) with ESMTP id 333B48CF for ; Wed, 20 Feb 2013 14:44:13 +0000 (UTC) Received: from [10.167.0.106] (aman-sawrup.waterloo.bluecoat.com [10.167.0.106]) by synonym.bluecoat.com (Postfix) with ESMTP id 07AEF7FE190; Wed, 20 Feb 2013 06:44:12 -0800 (PST) Message-ID: <5124E13C.10003@bluecoat.com> Date: Wed, 20 Feb 2013 09:44:12 -0500 From: Aman Sawrup User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-usb@freebsd.org Subject: Re: Insufficient memory reserved for xfer->dma_page_ptr? References: <1360360082956-5785167.post@n5.nabble.com> <201302090001.57258.hselasky@c2i.net> <5123FC0B.70009@bluecoat.com> <201302200836.56015.hselasky@c2i.net> In-Reply-To: <201302200836.56015.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2013 14:44:14 -0000 Hi Hans, If I understand correctly, I need to set bufsize in struct usb_config as follows: [UMASS_T_BBB_DATA_READ] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .frames = 128, .bufsize = UMASS_BULK_SIZE * 128, .flags = {.proxy_buffer = 1,.short_xfer_ok = 1, UMASS_USB_FLAGS}, .callback = &umass_t_bbb_data_read_callback, .timeout = 0, /* overwritten later */ }, Thanks Aman On 02/20/2013 02:36 AM, Hans Petter Selasky wrote: > On Tuesday 19 February 2013 23:26:19 Aman Sawrup wrote: >> I believe the amount of memory reserved needs to be much higher. For >> example, if sizeof(struct usb_page) is 16 bytes, then for n_frbuffers of >> 128 and parm->bufsize of 131072, we need the following amount of memory >> reserved: >> >> parm->bufsize / USB_PAGE_SIZE * n_frbuffers * sizeof(struct usb_page) >> = 131072 / 4096 * 128 * 16 >> = 65536 > Hi, > > The parm->bufsize is shared for all frbuffers, so the formula should be > correct. In your computation you assume that parm->bufsize gives the maximum > for each frbuffer. That is not the case. > > That means, when you configure bufsize, you must not exceed that size as a > total when setting up frames. This include all transfer types. I think there > are asserts for that so you should get a panic fairly quickly. > > --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Feb 20 14:50:53 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 70E3E80D for ; Wed, 20 Feb 2013 14:50:53 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.c2i.net [212.247.154.226]) by mx1.freebsd.org (Postfix) with ESMTP id 0AB06913 for ; Wed, 20 Feb 2013 14:50:52 +0000 (UTC) X-T2-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_50 Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 380834828; Wed, 20 Feb 2013 15:50:44 +0100 From: Hans Petter Selasky To: Aman Sawrup Subject: Re: Insufficient memory reserved for xfer->dma_page_ptr? Date: Wed, 20 Feb 2013 15:51:56 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-STABLE; KDE/4.8.4; amd64; ; ) References: <1360360082956-5785167.post@n5.nabble.com> <201302200836.56015.hselasky@c2i.net> <5124E13C.10003@bluecoat.com> In-Reply-To: <5124E13C.10003@bluecoat.com> X-Face: ?p&W)c( =?iso-8859-1?q?+80hU=3B=27=7B=2E=245K+zq=7BoC6y=7C=0A=09/D=27an*6mw?=>j'f:eBsex\Gi, Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2013 14:50:53 -0000 On Wednesday 20 February 2013 15:44:12 Aman Sawrup wrote: > Hi Hans, > > If I understand correctly, I need to set bufsize in struct usb_config as > follows: > > [UMASS_T_BBB_DATA_READ] = { > .type = UE_BULK, > .endpoint = UE_ADDR_ANY, > .direction = UE_DIR_IN, > .frames = 128, > .bufsize = UMASS_BULK_SIZE * 128, > .flags = {.proxy_buffer = 1,.short_xfer_ok = 1, > UMASS_USB_FLAGS}, .callback = &umass_t_bbb_data_read_callback, > .timeout = 0, /* overwritten later */ > }, > > Thanks > Aman Yes, that is correct: "* 128" Do you see any problems using this setting? Also note that unless you specify ext_buffer in flags, the USB API will allocate a buffer for you. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Feb 20 17:03:00 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EDB89D1C for ; Wed, 20 Feb 2013 17:03:00 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe09.c2i.net [212.247.155.2]) by mx1.freebsd.org (Postfix) with ESMTP id 8624520C for ; Wed, 20 Feb 2013 17:03:00 +0000 (UTC) X-T2-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_50 Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe09.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 205828887; Wed, 20 Feb 2013 18:02:57 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Subject: Re: argyllcms and usb (0.1 and 1.0) Date: Wed, 20 Feb 2013 18:04:09 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-STABLE; KDE/4.8.4; amd64; ; ) References: <5124932E.5080205@passap.ru> In-Reply-To: <5124932E.5080205@passap.ru> X-Face: ?p&W)c(+80hU; '{.$5K+zq{oC6y| /D'an*6mw>j'f:eBsex\Gi, X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2013 17:03:01 -0000 On Wednesday 20 February 2013 10:11:10 Boris Samorodov wrote: > Hello, All! > > I try to build argyllcms (http://www.argyllcms.com/) at FreeBSD: > ----- > % uname -a > FreeBSD bsam.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #8 r246714: Tue > Feb 12 22:26:27 SAMT 2013 > bsam@bsam.wart.ru:/usr/obj/usr/src/sys/BB64X amd64 > ----- > > The program uses USB-0.1 and USB-1.0. There is a remark at sources > that since libusb1 does not support FreeBSD, usb-0.1 is used. > > When compiling I get the following error: > ----- > spectro/usbio.c:741:17: error: use of undeclared identifier 'dev'; did > you mean 'div'? > descriptor = dev->descriptor; /* Copy */ > ^~~ > div > /usr/include/stdlib.h:91:8: note: 'div' declared here > div_t div(int, int) __pure2; > ^ > spectro/usbio.c:741:20: error: member reference base type 'div_t (int, > int)' is not a structure or union > descriptor = dev->descriptor; /* Copy */ > ~~~^ ~~~~~~~~~~ > 5 warnings and 2 errors generated. > > cc -c -o spectro/usbio.o -DUNIX -D_THREAD_SAFE -pipe -O2 > -DARGYLLCMS -Ispectro -Ih -Inumlib -Iicc -Icgats -Irspl -Ixicc -Igamut > -Ispectro -Iplot -Ilibusb -Iucmm -I/usr/local/include spectro/usbio.c > ----- > > Relevant (imho) parts from the source file: > ----- > [...] > #ifdef USE_LIBUSB1 > # include "libusb.h" > #else > # include "usb.h" > #endif > [...] > /* Get a copy of the device descriptor so we can > see device params */ > #ifdef USE_LIBUSB1 > if (libusb_get_device_descriptor(p->ppath->dev, > &descriptor) != LIBUSB_SUCCESS) > error("Get device descriptor on USB port > '%s' failed with %d (%s)",p->ppath->path,rv,libusb_strerror(rv)); > #else > descriptor = dev->descriptor; /* Copy */ > #endif > ----- > > GCC version of the error message: > ----- > spectro/usbio.c: In function 'usb_open_port': > spectro/usbio.c:741: error: 'dev' undeclared (first use in this function) > spectro/usbio.c:741: error: (Each undeclared identifier is reported only > once > spectro/usbio.c:741: error: for each function it appears in.) > ----- > > Seems (from my very inexperienced in USB POV) that the program > wants libusb-0.1 but gets libusb-2.0... So I'm stuck here. > > Questons. > 1. Should I use some additional flags to build sources using libusb-0.1? > 2. Is a note about FreeBSD about libusb1 is stale and lubusb1 is > supported? Sould I use some flags to use libusb1? > > Any help is appreciated. Thanks! Hi, USE_LIBUSB1 should be set, and -lusb must be used as linker flag, not - lusb-1.0 like under linux. In FreeBSD -lusb is a multi-API library, including v0.1, v1.0 and v2.0. Header files are in /usr/include -HPS From owner-freebsd-usb@FreeBSD.ORG Wed Feb 20 19:26:55 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 11CF82A1 for ; Wed, 20 Feb 2013 19:26:55 +0000 (UTC) (envelope-from aman.sawrup@bluecoat.com) Received: from synonym.bluecoat.com (synonym.bluecoat.com [199.91.133.5]) by mx1.freebsd.org (Postfix) with ESMTP id 00FFEE43 for ; Wed, 20 Feb 2013 19:26:54 +0000 (UTC) Received: from [10.167.0.106] (aman-sawrup.waterloo.bluecoat.com [10.167.0.106]) by synonym.bluecoat.com (Postfix) with ESMTP id 221457FE1F3; Wed, 20 Feb 2013 11:26:52 -0800 (PST) Message-ID: <5125237C.7040101@bluecoat.com> Date: Wed, 20 Feb 2013 14:26:52 -0500 From: Aman Sawrup User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-usb@freebsd.org Subject: Re: Insufficient memory reserved for xfer->dma_page_ptr? References: <1360360082956-5785167.post@n5.nabble.com> <201302200836.56015.hselasky@c2i.net> <5124E13C.10003@bluecoat.com> <201302201551.56288.hselasky@c2i.net> In-Reply-To: <201302201551.56288.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2013 19:26:55 -0000 This setting worked! Thanks Aman On 02/20/2013 09:51 AM, Hans Petter Selasky wrote: > On Wednesday 20 February 2013 15:44:12 Aman Sawrup wrote: >> Hi Hans, >> >> If I understand correctly, I need to set bufsize in struct usb_config as >> follows: >> >> [UMASS_T_BBB_DATA_READ] = { >> .type = UE_BULK, >> .endpoint = UE_ADDR_ANY, >> .direction = UE_DIR_IN, >> .frames = 128, >> .bufsize = UMASS_BULK_SIZE * 128, >> .flags = {.proxy_buffer = 1,.short_xfer_ok = 1, >> UMASS_USB_FLAGS}, .callback = &umass_t_bbb_data_read_callback, >> .timeout = 0, /* overwritten later */ >> }, >> >> Thanks >> Aman > Yes, that is correct: "* 128" > > Do you see any problems using this setting? Also note that unless you specify > ext_buffer in flags, the USB API will allocate a buffer for you. > > --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Feb 21 01:11:19 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F3951406 for ; Thu, 21 Feb 2013 01:11:18 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: from mail-qe0-f47.google.com (mail-qe0-f47.google.com [209.85.128.47]) by mx1.freebsd.org (Postfix) with ESMTP id BE60494C for ; Thu, 21 Feb 2013 01:11:18 +0000 (UTC) Received: by mail-qe0-f47.google.com with SMTP id 2so3986787qea.20 for ; Wed, 20 Feb 2013 17:11:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=e208NUJR2pl6PN6cs6voCudBRijkaMXJ7JOnU9eUWhc=; b=lDEcjIgxLlCMLAGLCG87+g7Sji1mtRE+SFOymghMPv7EDXVRBz9D8onNQeKpuBdOCC /jY8ikxcAvN+FyFqgAT4mHEw2PY7ZZNaAApbDWS7QOSCXlaWj5F5m2NIbT5CTOIwUjtF dLgm+ZQnLL4ZU5dIFn9i0bBtOmj9VEjCh8NgQnWTUP+QGc3XZOZEI787RPpHJkyla77p Q5idnLmzLFnfWdERRLnsPO8itq3Kz8BImmsblTpMFEtcl8HZy7r3hEK5vrK1yM9qyLiu lg6kBQlfAx4Jn+nk1KqwIXFvCrxEEF06Y1BO0G4rtIyji60xA5nF8Auyi+J57hLU9vwK /nxA== MIME-Version: 1.0 X-Received: by 10.224.72.134 with SMTP id m6mr10278163qaj.42.1361409077974; Wed, 20 Feb 2013 17:11:17 -0800 (PST) Received: by 10.49.87.197 with HTTP; Wed, 20 Feb 2013 17:11:17 -0800 (PST) In-Reply-To: <201302201804.09100.hselasky@c2i.net> References: <5124932E.5080205@passap.ru> <201302201804.09100.hselasky@c2i.net> Date: Thu, 21 Feb 2013 09:11:17 +0800 Message-ID: Subject: Re: argyllcms and usb (0.1 and 1.0) From: Xiaofan Chen To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2013 01:11:19 -0000 On Thu, Feb 21, 2013 at 1:04 AM, Hans Petter Selasky wrote: > USE_LIBUSB1 should be set, and -lusb must be used as linker flag, not - > lusb-1.0 like under linux. > > In FreeBSD -lusb is a multi-API library, including v0.1, v1.0 and v2.0. Header > files are in /usr/include Maybe it is good to have a pkg-config pc file for libusb-0.1 and libusb-1.0 wrapper to point to the correct -lusb flag. Reference: http://freebsd.1045724.n5.nabble.com/libusb-config-missing-td4055538.html Or maybe it is good to have symbolic link to libusb-1.0.so. -- Xiaofan From owner-freebsd-usb@FreeBSD.ORG Fri Feb 22 08:15:50 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 69155D74 for ; Fri, 22 Feb 2013 08:15:50 +0000 (UTC) (envelope-from bsam@passap.ru) Received: from forward5h.mail.yandex.net (forward5h.mail.yandex.net [IPv6:2a02:6b8:0:f05::5]) by mx1.freebsd.org (Postfix) with ESMTP id D8BAEE27 for ; Fri, 22 Feb 2013 08:15:49 +0000 (UTC) Received: from smtp3h.mail.yandex.net (smtp3h.mail.yandex.net [84.201.186.20]) by forward5h.mail.yandex.net (Yandex) with ESMTP id 9F314D01FDE; Fri, 22 Feb 2013 12:15:46 +0400 (MSK) Received: from smtp3h.mail.yandex.net (localhost [127.0.0.1]) by smtp3h.mail.yandex.net (Yandex) with ESMTP id 3F1801B404F0; Fri, 22 Feb 2013 12:15:46 +0400 (MSK) Received: from 93.91.2.200.tel.ru (93.91.2.200.tel.ru [93.91.2.200]) by smtp3h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Fj0OKDkH-Fj0mLiLr; Fri, 22 Feb 2013 12:15:46 +0400 Message-ID: <51272931.4050407@passap.ru> Date: Fri, 22 Feb 2013 12:15:45 +0400 From: Boris Samorodov Organization: =?UTF-8?B?0JfQkNCeICLQktCQ0KDQoiI=?= User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Hans Petter Selasky Subject: Re: argyllcms and usb (0.1 and 1.0) References: <5124932E.5080205@passap.ru> <201302201804.09100.hselasky@c2i.net> In-Reply-To: <201302201804.09100.hselasky@c2i.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2013 08:15:50 -0000 20.02.2013 21:04, Hans Petter Selasky пишет: > On Wednesday 20 February 2013 10:11:10 Boris Samorodov wrote: >> Hello, All! >> >> I try to build argyllcms (http://www.argyllcms.com/) at FreeBSD: >> ----- >> % uname -a >> FreeBSD bsam.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #8 r246714: Tue >> Feb 12 22:26:27 SAMT 2013 >> bsam@bsam.wart.ru:/usr/obj/usr/src/sys/BB64X amd64 >> ----- >> >> The program uses USB-0.1 and USB-1.0. There is a remark at sources >> that since libusb1 does not support FreeBSD, usb-0.1 is used. >> >> When compiling I get the following error: >> ----- >> spectro/usbio.c:741:17: error: use of undeclared identifier 'dev'; did >> you mean 'div'? >> descriptor = dev->descriptor; /* Copy */ >> ^~~ >> div >> /usr/include/stdlib.h:91:8: note: 'div' declared here >> div_t div(int, int) __pure2; >> ^ >> spectro/usbio.c:741:20: error: member reference base type 'div_t (int, >> int)' is not a structure or union >> descriptor = dev->descriptor; /* Copy */ >> ~~~^ ~~~~~~~~~~ >> 5 warnings and 2 errors generated. >> >> cc -c -o spectro/usbio.o -DUNIX -D_THREAD_SAFE -pipe -O2 >> -DARGYLLCMS -Ispectro -Ih -Inumlib -Iicc -Icgats -Irspl -Ixicc -Igamut >> -Ispectro -Iplot -Ilibusb -Iucmm -I/usr/local/include spectro/usbio.c >> ----- >> >> Relevant (imho) parts from the source file: >> ----- >> [...] >> #ifdef USE_LIBUSB1 >> # include "libusb.h" >> #else >> # include "usb.h" >> #endif >> [...] >> /* Get a copy of the device descriptor so we can >> see device params */ >> #ifdef USE_LIBUSB1 >> if (libusb_get_device_descriptor(p->ppath->dev, >> &descriptor) != LIBUSB_SUCCESS) >> error("Get device descriptor on USB port >> '%s' failed with %d (%s)",p->ppath->path,rv,libusb_strerror(rv)); >> #else >> descriptor = dev->descriptor; /* Copy */ >> #endif >> ----- >> >> GCC version of the error message: >> ----- >> spectro/usbio.c: In function 'usb_open_port': >> spectro/usbio.c:741: error: 'dev' undeclared (first use in this function) >> spectro/usbio.c:741: error: (Each undeclared identifier is reported only >> once >> spectro/usbio.c:741: error: for each function it appears in.) >> ----- >> >> Seems (from my very inexperienced in USB POV) that the program >> wants libusb-0.1 but gets libusb-2.0... So I'm stuck here. >> >> Questons. >> 1. Should I use some additional flags to build sources using libusb-0.1? >> 2. Is a note about FreeBSD about libusb1 is stale and lubusb1 is >> supported? Sould I use some flags to use libusb1? >> >> Any help is appreciated. Thanks! > > USE_LIBUSB1 should be set, and -lusb must be used as linker flag, not - > lusb-1.0 like under linux. After a deeper look at the code I realised that actually the called LIBUSB1 is a USB-1.0 with some changes. The author call it "USB-1.0A". And this specific code is used at Linux and Windows drivers. And this code dosn't compile at FreeBSD. So I proceed with USB-0.1. The linker flag actually is "-lusb". > In FreeBSD -lusb is a multi-API library, including v0.1, v1.0 and v2.0. Header > files are in /usr/include Thanks, it was helpfull. With some changes at the code I managed to build argyllcms-1.4.0. -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-usb@FreeBSD.ORG Sat Feb 23 02:26:51 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 716671B7 for ; Sat, 23 Feb 2013 02:26:51 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: from mail-qa0-f42.google.com (mail-qa0-f42.google.com [209.85.216.42]) by mx1.freebsd.org (Postfix) with ESMTP id C55AB7CC for ; Sat, 23 Feb 2013 02:26:50 +0000 (UTC) Received: by mail-qa0-f42.google.com with SMTP id cr7so726429qab.8 for ; Fri, 22 Feb 2013 18:26:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=U3bv8946LbgyM12ElNKqb/lWX758XlQ+4rnemHZtNeA=; b=WA8hl8seVl9itCKTAQ79+xNrztjZcPMV0NTXcmZWD0PHy96//ISUM0XHV+Vun9JNrQ JRe9cS+S+mysbfohiFxD0kv51odEo/HvmpjIUwRdXT+MGYGOxkNS3jcXp84Q/CQPhdX7 A6KW1ztuUZ6omvebYKZAEGp63eXPHqR4zYHLwmOqc12qZwRLNoDngRk8fB60c90R7uMn 9U+TuGHmlW+Ih55pCS8dZvlD3Eqj1vJ2wiTWdtLKyEYDanb0lnav2NfHVg9h25WAkR9n tRPw3DztyqjjTkU1f3WXOlmU1nUkzyBFsll7nTrnLe1eIjR2qSDLW9r5dqHXK6L9L2hd mjYQ== MIME-Version: 1.0 X-Received: by 10.49.3.234 with SMTP id f10mr2213099qef.52.1361586404317; Fri, 22 Feb 2013 18:26:44 -0800 (PST) Received: by 10.49.87.197 with HTTP; Fri, 22 Feb 2013 18:26:44 -0800 (PST) In-Reply-To: <51272931.4050407@passap.ru> References: <5124932E.5080205@passap.ru> <201302201804.09100.hselasky@c2i.net> <51272931.4050407@passap.ru> Date: Sat, 23 Feb 2013 10:26:44 +0800 Message-ID: Subject: Re: argyllcms and usb (0.1 and 1.0) From: Xiaofan Chen To: Boris Samorodov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2013 02:26:51 -0000 On Fri, Feb 22, 2013 at 4:15 PM, Boris Samorodov wrote: >> USE_LIBUSB1 should be set, and -lusb must be used as linker flag, not - >> lusb-1.0 like under linux. > > After a deeper look at the code I realised that actually the called > LIBUSB1 is a USB-1.0 with some changes. The author call it "USB-1.0A". > And this specific code is used at Linux and Windows drivers. And this > code dosn't compile at FreeBSD. So I proceed with USB-0.1. It should not really matter. The USB-1.0A mod is more aimed under Windows (to support libusb0.sys) and a bit of mod for older Linux libusb-1.0.8. The API is still libusb-1.0 API. And of course the code does not compile for FreeBSD, in fact, libusb-1.0 and libusbx will not compile for FreeBSD since FreeBSD has its own libusb-1.0 API implementation (wrap around libusb20). libusb-1.0 and libusbx do have experimental support of OpenBSD and NetBSD which is based on ugen driver. > The linker flag actually is "-lusb". > >> In FreeBSD -lusb is a multi-API library, including v0.1, v1.0 and v2.0. >> Header files are in /usr/include > > Thanks, it was helpfull. With some changes at the code I managed to > build argyllcms-1.4.0. -- Xiaofan