Re: argyllcms and usb (0.1 and 1.0)
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 b...@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_tdiv(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 ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
argyllcms and usb (0.1 and 1.0)
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 b...@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_tdiv(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 ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: [usb] Kingston 8Gb is not usable
to device kernel: (da0:umass-sim0:0:0:0): Periph invalidated kernel: (da0:umass-sim0:0:0:0): lost device - 0 outstanding, 4 refs kernel: (da0:umass-sim0:0:0:0): removing device entry kernel: (da0:umass-sim0:0:0:0): Periph destroyed - -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: [usb] Kingston 8Gb is not usable
27.06.2012 15:51, Alexander Motin пишет: The only change after that I see potentially related is r237478. It adds more checks when fetching SCSI sense data, that for some reason are not working in your case. I still can not completely understand why there was no any READ CAPACITY errors reported before, but may be I am missing something. You can try to revert that revision for check. Confirm. Reverting this commit alone helps here. Both my system with patched kernel uses /dev/da0 and patched kernel works if the system is booted from the stick. Though it is a little bit noisy. ;-) Since now I know that it shouldn't here is a question: should I file a PR on this noisiness (i.e. error reporting, etc.)? -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
[usb] Kingston 8Gb is not usable
Hi! I've got a Kingston USB 8Gb stick. It was too noisy (with respect to /var/log/messages) but worked. The system was upgraded today morning: - % uname -a FreeBSD bsam.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #17 r237572: Tue Jun 26 04:22:18 SAMT 2012 b...@bsam.wart.ru:/usr/obj/usr/src/sys/BBX i386 - And the stick is no longer usable: - Jun 26 15:27:40 bsam kernel: ugen7.5: Kingston at usbus7 Jun 26 15:27:40 bsam kernel: umass0: Kingston DT101 II, class 0/0, rev 2.00/1.00, addr 5 on usbus7 Jun 26 15:27:40 bsam kernel: umass0: SCSI over Bulk-Only; quirks = 0x0100 Jun 26 15:27:40 bsam kernel: umass0:11:0:-1: Attached to scbus11 Jun 26 15:27:40 bsam kernel: da0 at umass-sim0 bus 0 scbus11 target 0 lun 0 Jun 26 15:27:40 bsam kernel: da0: Kingston DT101 II 1.00 Removable Direct Access SCSI-2 device Jun 26 15:27:40 bsam kernel: da0: 40.000MB/s transfers Jun 26 15:27:40 bsam kernel: da0: 7634MB (15636304 512 byte sectors: 255H 63S/T 973C) Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): PREVENT ALLOW MEDIUM REMOVAL. CDB: 1e 0 0 0 1 0 Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): CAM status: SCSI Status Error Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): SCSI status: Check Condition Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): SCSI sense: No sense data present Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): Retrying command (per sense data) Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): PREVENT ALLOW MEDIUM REMOVAL. CDB: 1e 0 0 0 1 0 Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): CAM status: SCSI Status Error Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): SCSI status: Check Condition Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): SCSI sense: No sense data present Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): Error 5, Retries exhausted Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0 Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): CAM status: SCSI Status Error Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): SCSI status: Check Condition Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): SCSI sense: No sense data present Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): Retrying command (per sense data) Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0 Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): CAM status: SCSI Status Error Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): SCSI status: Check Condition Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): SCSI sense: No sense data present Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): Error 5, Retries exhausted Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): got CAM status 0x8c Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): fatal error, failed to attach to device Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): lost device - 0 outstanding, 4 refs Jun 26 15:27:40 bsam kernel: (da0:umass-sim0:0:0:0): removing device entry - The previous kernel/world was from Jun 14. The last 5 lines didn't occur and the disk /dev/da* was usable. Quirks were the same. -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: USB_ERR_TIMEOUT and USB_ERR_STALLED
On Sat, 23 Oct 2010 16:49:59 -0700 Weongyo Jeong wrote: On Thu, Oct 21, 2010 at 10:56:12PM +0200, Hans Petter Selasky wrote: Weongyo is working on a usbdump utility to monitor ongoing USB traffic. It's merged into HEAD not too lately. :-) Did I miss something? - % svn info /usr/src Path: /usr/src URL: svn+ssh://svn.freebsd.org/base/head Repository Root: svn+ssh://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 214315 Node Kind: directory Schedule: normal Last Changed Author: julian Last Changed Rev: 214309 Last Changed Date: 2010-10-25 03:25:14 +0400 (пн, 25 окт 2010) % svn status /usr/src % find /usr/src -name usbdump % - -- WBR, Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone Internet SP FreeBSD Committer, http://www.FreeBSD.org The Power To Serve ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: USB_ERR_TIMEOUT and USB_ERR_STALLED
On Mon, 25 Oct 2010 08:58:08 +0200 Hans Petter Selasky wrote: On Monday 25 October 2010 08:16:00 Boris Samorodov wrote: On Sat, 23 Oct 2010 16:49:59 -0700 Weongyo Jeong wrote: On Thu, Oct 21, 2010 at 10:56:12PM +0200, Hans Petter Selasky wrote: Weongyo is working on a usbdump utility to monitor ongoing USB traffic. It's merged into HEAD not too lately. :-) Did I miss something? - % svn info /usr/src Path: /usr/src URL: svn+ssh://svn.freebsd.org/base/head Repository Root: svn+ssh://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 214315 Node Kind: directory Schedule: normal Last Changed Author: julian Last Changed Rev: 214309 Last Changed Date: 2010-10-25 03:25:14 +0400 (пн, 25 окт 2010) % svn status /usr/src % find /usr/src -name usbdump % - It is in Weongyo's branch and not -head. hselasky@: OK. Thanks. weongyo@: It will be a great tool. -- WBR, Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone Internet SP FreeBSD Committer, http://www.FreeBSD.org The Power To Serve ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
[umass] card reader at 9-CURRENT
Hello List, I own a card reader which happend to work fine until this week. Two days ago I renewed my 9-CURRENT (seems from 3 Oct but actually I didn't use the card reader with that kernel). The card reader does not work properly: - bb% uname -a FreeBSD bb.ipt.ru 9.0-CURRENT FreeBSD 9.0-CURRENT #3: Tue Oct 6 17:00:54 MSD 2009 r...@bb.ipt.ru:/usr/obj/usr/src/sys/BB i386 - Here is a debugging info: ftp://ftp.ipt.ru/pub/tmp/usb/messages.usb.debug.bad.txt The same card works at other system: - % uname -a FreeBSD tba.bsam.ru 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Mon Oct 5 19:56:42 MSD 2009 r...@tba.bsam.ru:/usr/obj/usr/src/sys/TBA amd64 - And debug from this system: ftp://ftp.ipt.ru/pub/tmp/usb/messages.usb.debug.good.txt Any help is appreciated. Thanks. -- WBR, Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone Internet SP FreeBSD Committer, http://www.FreeBSD.org The Power To Serve ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org