Re: Quirk for a USB mass storage device
On Sun, Oct 30, 2011 at 09:15:40PM +0100, Hans Petter Selasky wrote: > On Saturday 29 October 2011 20:38:07 Pawel Jakub Dawidek wrote: > > > + err = usbd_do_request(udev, NULL, &req, &buf); > > > + if (err) > > > + buf = 0; > > > + > > > + return (buf); > > > +} > > > > You could drop 'err' variable and just check function return directly. > > There is only one extra empty line at the begining of the function. > > No, because there is &buf. How about: if (usbd_do_request(udev, NULL, &req, &buf) != 0) buf = 0; return (buf); > I'll add your device to the device quirk list. Ok. How come did it work in the past? I don't think that my device was removed from the quirk list by accident? May other, similar devices not work as well with the current code? -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpkBaIV9mvb1.pgp Description: PGP signature
Re: Quirk for a USB mass storage device
On Sat, Oct 29, 2011 at 08:51:15AM +0200, Hans Petter Selasky wrote: > On Friday 28 October 2011 17:08:18 Gustau PĂ©rez wrote: > > >> Do you want the patch? I can generate it in a second if you wish. > > > > > > Yes, please do. > > > >This one applies over both current and 9.0RC1. > > > >Gus > > Hi Pawel and Gustau, > > Can you both clean out your own patches and try the attached one? Unfortunately it doesn't fix the problem for me. There is no change after applying the patch. The modules I have loaded: ehci usb umass (usb_quirk) As for the patch itself: > --- sys/dev/usb/usb_msctest.c (revision 226805) > +++ sys/dev/usb/usb_msctest.c (local) > @@ -603,6 +603,29 @@ > return (is_cdrom); > } > > +static uint8_t > +usb_msc_get_max_lun(struct usb_device *udev, uint8_t iface_index) > +{ > + struct usb_device_request req; > + usb_error_t err; > + uint8_t buf = 0; > + > + > + /* The Get Max Lun command is a class-specific request. */ > + req.bmRequestType = UT_READ_CLASS_INTERFACE; > + req.bRequest = 0xFE;/* GET_MAX_LUN */ > + USETW(req.wValue, 0); > + req.wIndex[0] = iface_index; > + req.wIndex[1] = 0; > + USETW(req.wLength, 1); > + > + err = usbd_do_request(udev, NULL, &req, &buf); > + if (err) > + buf = 0; > + > + return (buf); > +} You could drop 'err' variable and just check function return directly. There is only one extra empty line at the begining of the function. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgp4ojJMnP8vK.pgp Description: PGP signature
Re: umass(4) regression in 9.0-RC1.
On Fri, Oct 28, 2011 at 09:11:42AM +0200, Hans Petter Selasky wrote: > On Thursday 27 October 2011 20:51:15 Pawel Jakub Dawidek wrote: > > On Thu, Oct 27, 2011 at 08:42:09PM +0200, Hans Petter Selasky wrote: > > > This is the root HUB. Can you also show the actual device? > > > > Sorry, it wasn't connected, here it goes: > > > > ugen0.2: at usbus0, cfg=255 md=HOST spd=HIGH (480Mbps) > > pwr=ON > > > > bLength = 0x0012 > > bDescriptorType = 0x0001 > > bcdUSB = 0x0200 > > bDeviceClass = 0x > > bDeviceSubClass = 0x > > bDeviceProtocol = 0x > > bMaxPacketSize0 = 0x0008 > > idVendor = 0x0bda > > idProduct = 0x0119 > > bcdDevice = 0x1981 > > iManufacturer = 0x0001 > > iProduct = 0x0002 > > iSerialNumber = 0x0003 > > bNumConfigurations = 0x0001 > > Hi, > > The control request in question is mandatory according to the UMASS > specification, and I wonder why it times out and all other control requests > aswell. > > Could you try setting the no-synchronize cache quirk instead, and then plug > your device. > > I'm sorry, but this problem needs further investigation before we can make a > patch. It wasn't immediately obvious for me how to set the no-synchronize cache quirk, but I think I found it: # usbconfig add_quirk UQ_MSC_NO_SYNC_CACHE And it seems to work: umass0: on usbus0 (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI status: Check Condition (probe0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:28,0 (Not ready to ready change, medium may have changed) da0 at umass-sim0 bus 0 scbus13 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 30799MB (63076352 512 byte sectors: 255H 63S/T 3926C) -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpu3O0rHIFtf.pgp Description: PGP signature
Re: umass(4) regression in 9.0-RC1.
On Thu, Oct 27, 2011 at 08:42:09PM +0200, Hans Petter Selasky wrote: > This is the root HUB. Can you also show the actual device? Sorry, it wasn't connected, here it goes: ugen0.2: at usbus0, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x bDeviceSubClass = 0x bDeviceProtocol = 0x bMaxPacketSize0 = 0x0008 idVendor = 0x0bda idProduct = 0x0119 bcdDevice = 0x1981 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 bNumConfigurations = 0x0001 -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgp1av9ZOor21.pgp Description: PGP signature
Re: umass(4) regression in 9.0-RC1.
On Thu, Oct 27, 2011 at 08:30:44PM +0200, Hans Petter Selasky wrote: > What does usbconfig dump_device_desc, say about this device? ugen0.1: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0009 bDeviceSubClass = 0x bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x idProduct = 0x bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x bNumConfigurations = 0x0001 -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpwDXGruonKO.pgp Description: PGP signature
umass(4) regression in 9.0-RC1.
Hi. My SDHC card (via adapter) is no longer being detected after upgrade to 9.0-RC1. The same card with this adapter works on my laptop with older HEAD. usbus0: EHCI version 1.0 usbus0: on ehci0 usbus0: 480Mbps High Speed USB v2.0 ugen0.1: at usbus0 uhub0: on usbus0 uhub0: 10 ports with 10 removable, self powered # usbdevs -v usbdevs: no USB controllers found ehci0@pci0:0:10:1: class=0x0c0320 card=0x81fb1043 chip=0x036d10de rev=0xa2 hdr=0x00 vendor = 'nVidia Corporation' device = 'MCP55 USB Controller' class = serial bus subclass = USB After connecting the adapter with the card inside: kernel: ugen0.2: at usbus0 -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpaodxnUuuu4.pgp Description: PGP signature
Re: usb/160301: [patch] missing device usb and device ucom entries in manpages
Synopsis: [patch] missing device usb and device ucom entries in manpages State-Changed-From-To: closed->open State-Changed-By: pawel State-Changed-When: Fri Oct 21 15:57:17 UTC 2011 State-Changed-Why: wrong PR number, sorry http://www.freebsd.org/cgi/query-pr.cgi?pr=160301 ___ 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/160301: [patch] missing device usb and device ucom entries in manpages
Synopsis: [patch] missing device usb and device ucom entries in manpages State-Changed-From-To: open->closed State-Changed-By: pawel State-Changed-When: Fri Oct 21 15:46:59 UTC 2011 State-Changed-Why: superseeded by ports/161766 http://www.freebsd.org/cgi/query-pr.cgi?pr=160301 ___ 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"
AutoSense failed
Hi, Got two new 1TB Seagate Desktop USB drives that I plan to mirror however doing some I/O to the mirror or forcing a rebuild causes some CAM errors, no idea if this is CAM or USB related. Any ideas about this ? Missing quirk ? Any special debug output requests ? GEOM_MIRROR: Device data: provider da1 disconnected. GEOM_MIRROR: Device data: rebuilding provider da1. (da1:umass-sim1:1:0:0): AutoSense failed GEOM_MIRROR: Synchronization request failed (error=5). da1[WRITE(offset=3500933120, length=131072)] GEOM_MIRROR: Device data: provider da1 disconnected. USB controller: ehci0: mem 0xc000-0xc3ff irq 11 at device 29.7 on pci0 ehci0: [ITHREAD] usbus3: EHCI version 1.0 usbus3: on ehci0 Disks: ugen3.2: at usbus3 umass0: on usbus3 umass0: SCSI over Bulk-Only; quirks = 0x umass0:0:0:-1: Attached to scbus0 da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: Fixed Direct Access SCSI-4 device da0: 40.000MB/s transfers da0: 953869MB (1953525168 512 byte sectors: 255H 63S/T 121601C) ugen3.3: at usbus3 umass1: on usbus3 umass1: SCSI over Bulk-Only; quirks = 0x umass1:1:1:-1: Attached to scbus1 da1 at umass-sim1 bus 1 scbus1 target 0 lun 0 da1: Fixed Direct Access SCSI-4 device da1: 40.000MB/s transfers da1: 953869MB (1953525168 512 byte sectors: 255H 63S/T 121601C) usbconfig dump_device_desc: ugen3.2: at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x bDeviceSubClass = 0x bDeviceProtocol = 0x bMaxPacketSize0 = 0x0040 idVendor = 0x0bc2 idProduct = 0x3300 bcdDevice = 0x0130 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 <2GHK493R> bNumConfigurations = 0x0001 ugen3.3: at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x bDeviceSubClass = 0x bDeviceProtocol = 0x bMaxPacketSize0 = 0x0040 idVendor = 0x0bc2 idProduct = 0x3300 bcdDevice = 0x0130 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 bNumConfigurations = 0x0001 The iProduct and iSerialNumber data seems to randomly fail to be retrieved. -- Pawel ___ 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/142719: [urtw] [usb8] AirLive WL-1600USB (RTL8187L chipset) fails to work
>Number: 142719 >Category: usb >Synopsis: [urtw] [usb8] AirLive WL-1600USB (RTL8187L chipset) fails to >work >Confidential: no >Severity: non-critical >Priority: low >Responsible:freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 11 17:10:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Pawel Pekala >Release:FreeBSD 8.0-STABLE i386 >Organization: >Environment: System: FreeBSD 8.0-STABLE #0: Mon Jan 11 17:00:23 CET 2010 c...@caprica.slowicza.org:/usr/obj/usr/src/sys/CORN >Description: Device seems to be recognized as urtw0, but scanning for networks or setting IP address fails: [corn:~]# ifconfig urtw0 scan up ifconfig: unable to get scan results [corn:~]# ifconfig urtw0 inet 10.1.0.33 netmask 255.255.255.0 ifconfig: ioctl (SIOCAIFADDR): Invalid argument Here`s my dmesg: Copyright (c) 1992-2010 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.0-STABLE #0: Mon Jan 11 17:00:23 CET 2010 c...@caprica.slowicza.org:/usr/obj/usr/src/sys/CORN i386 Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz (2194.51-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x1067a Stepping = 10 Features=0xbfebfbff Features2=0x408e39d AMD Features=0x2010 AMD Features2=0x1 TSC: P-state invariant real memory = 2147483648 (2048 MB) avail memory = 2055544832 (1960 MB) ACPI APIC Table: <090909 APIC1656> FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: <090909 XSDT1656> on motherboard acpi0: [ITHREAD] acpi_ec0: port 0x62,0x66 on acpi0 acpi0: Power Button (fixed) unknown: I/O range not supported unknown: I/O range not supported acpi0: reservation of 0, a (3) failed acpi0: reservation of 10, 7dd0 (3) failed Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 acpi_hpet0: iomem 0xfed0-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 900 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 vgapci0: port 0xdc00-0xdc07 mem 0xfe40-0xfe7f,0xd000-0xdfff irq 16 at device 2.0 on pci0 agp0: on vgapci0 agp0: detected 32764k stolen memory agp0: aperture size is 256M vgapci1: mem 0xfe80-0xfe8f at device 2.1 on pci0 uhci0: port 0xd880-0xd89f irq 16 at device 26.0 on pci0 uhci0: [ITHREAD] uhci0: LegSup = 0x2f00 usbus0: on uhci0 uhci1: port 0xd800-0xd81f irq 21 at device 26.1 on pci0 uhci1: [ITHREAD] uhci1: LegSup = 0x2f00 usbus1: on uhci1 uhci2: port 0xd480-0xd49f irq 19 at device 26.2 on pci0 uhci2: [ITHREAD] uhci2: LegSup = 0x2f00 usbus2: on uhci2 ehci0: mem 0xfe9fbc00-0xfe9fbfff irq 18 at device 26.7 on pci0 ehci0: [ITHREAD] usbus3: EHCI version 1.0 usbus3: on ehci0 hdac0: mem 0xfe9f4000-0xfe9f7fff irq 22 at device 27.0 on pci0 hdac0: HDA Driver Revision: 20091113_0138 hdac0: [ITHREAD] pcib1: irq 16 at device 28.0 on pci0 pci1: on pcib1 pcib2: irq 17 at device 28.1 on pci0 pci2: on pcib2 pci2: at device 0.0 (no driver attached) pcib3: irq 17 at device 28.5 on pci0 pci3: on pcib3 ale0: port 0xec00-0xec7f mem 0xfebc-0xfebf irq 17 at device 0.0 on pci3 ale0: 960 Tx FIFO, 1024 Rx FIFO ale0: Using 1 MSI messages. miibus0: on ale0 atphy0: PHY 0 on miibus0 atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto ale0: Ethernet address: 90:e6:ba:98:7d:77 ale0: [FILTER] uhci3: port 0xd400-0xd41f irq 23 at device 29.0 on pci0 uhci3: [ITHREAD] uhci3: LegSup = 0x2f00 usbus4: on uhci3 uhci4: port 0xd080-0xd09f irq 19 at device 29.1 on pci0 uhci4: [ITHREAD] uhci4: LegSup = 0x2f00 usbus5: on uhci4 uhci5: port 0xd000-0xd01f irq 18 at device 29.2 on pci0 uhci5: [ITHREAD] uhci5: LegSup = 0x2f00 usbus6: on uhci5 ehci1: mem 0xfe9fb800-0xfe9fbbff irq 23 at device 29.7 on pci0 ehci1: [ITHREAD] usbus7: EHCI version 1.0 usbus7: on ehci1 pcib4: at device 30.0 on pci0 pci4: on pcib4 isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xcc00-0xcc07,0xc880-0xc883,0xc800-0xc807,0xc480-0xc483,0xc400-0xc41f mem 0xfe9fb000-0xfe9fb7ff irq 19 at device 31.2 on pci0 atapci0: [ITHREAD] atapci0: AHCI v1.20 controller with 4 3Gbps ports, PM not supported ata2: on atapci0 ata2: [ITHREAD] ata3: on atapci0 ata3: [ITHREAD] acpi_button0: on acpi0 acpi_lid0: on acpi0 acpi_tz0: on acpi0 acpi_acad0: on acpi0 battery0: on acpi0 atrtc0: port 0x70-0x71 irq 8 on acpi0 at
Re: usb/89889: [quirk] [patch] Motorola E398 Mobile Phone (TransFlash drive)
Synopsis: [quirk] [patch] Motorola E398 Mobile Phone (TransFlash drive) Responsible-Changed-From-To: freebsd-usb->pjd Responsible-Changed-By: pjd Responsible-Changed-When: Thu Dec 15 22:55:45 UTC 2005 Responsible-Changed-Why: I'll take this one. http://www.freebsd.org/cgi/query-pr.cgi?pr=89889 ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "[EMAIL PROTECTED]"