On Tue, Feb 05, 2008 at 01:30:23PM -0500, Alan Stern wrote:
> On Tue, 5 Feb 2008, Fabio Venturi wrote:
> 
> > Opppsss!!!
> > Too many outputs to deal with :(
> > I'm not sure that was right,
> > this is right one for sure:
> > 
> > + { USB_DEVICE(0x10d6, 0x2200), .driver_info = USB_QUIRK_STRING_FETCH_255},
> 
> This patch should not have produced the output you posted.  Are you 
> sure the patched module was installed and running?  The easiest way to 
> tell is to have CONFIG_USB_DEBUG enabled and see if the dmesg log says 
> anything about a USB quirk when you plug in the device.
> 
> Alan Stern

I don't see any USB quirk in dmesg,
the initd file is rebuilt every time I change
something in the kernel with mkinitcpio on ArchLinux.

The patched quirks.c is:

// -------------- START OF QUIRKS.C -------------------

/*
 * USB device quirk handling logic and table
 *
 * Copyright (c) 2007 Oliver Neukum
 * Copyright (c) 2007 Greg Kroah-Hartman <[EMAIL PROTECTED]>
 *
 * This program is free software; you can redistribute it and/or modify
 * it
 * under the terms of the GNU General Public License as published by the
 * Free
 * Software Foundation, version 2.
 *
 *
 */

#include <linux/usb.h>
#include <linux/usb/quirks.h>
#include "usb.h"

/* List of quirky USB devices.  Please keep this list ordered by:
 *      1) Vendor ID
 *      2) Product ID
 *      3) Class ID
 *
 * as we want specific devices to be overridden first, and only after
 * that, any
 * class specific quirks.
 *
 * Right now the logic aborts if it finds a valid device in the table,
 * we might
 * want to change that in the future if it turns out that a whole class
 * of
 * devices is broken...
 */
static const struct usb_device_id usb_quirk_list[] = {
        /* Action Semiconductors flash disk */
        {USB_DEVICE(0x10d6, 0x0022), .driver_info =
USB_QUIRK_STRING_FETCH_255},

        /* CBM - Flash disk */
        { USB_DEVICE(0x0204, 0x6025), .driver_info =
USB_QUIRK_RESET_RESUME },

        /* HP 5300/5370C scanner */
        { USB_DEVICE(0x03f0, 0x0701), .driver_info =
USB_QUIRK_STRING_FETCH_255 },

        /* INTEL VALUE SSD */
        { USB_DEVICE(0x8086, 0xf1a5), .driver_info =
USB_QUIRK_RESET_RESUME },

        /* M-Systems Flash Disk Pioneers */
        { USB_DEVICE(0x08ec, 0x1000), .driver_info =
USB_QUIRK_RESET_RESUME },

        /* Philips PSC805 audio device */
        { USB_DEVICE(0x0471, 0x0155), .driver_info =
USB_QUIRK_RESET_RESUME },

        /* SKYMEDI USB_DRIVE */
        { USB_DEVICE(0x1516, 0x8628), .driver_info =
USB_QUIRK_RESET_RESUME },

        { }  /* terminating entry must be last */
};

static const struct usb_device_id *find_id(struct usb_device *udev)
{
        const struct usb_device_id *id = usb_quirk_list;

        for (; id->idVendor || id->bDeviceClass || id->bInterfaceClass
||
                        id->driver_info; id++) {
                if (usb_match_device(udev, id))
                        return id;
        }
        return NULL;
}

/*
 * Detect any quirks the device has, and do any housekeeping for it if
 * needed.
 */
void usb_detect_quirks(struct usb_device *udev)
{
        const struct usb_device_id *id = usb_quirk_list;

        id = find_id(udev);
        if (id)
                udev->quirks = (u32)(id->driver_info);
        if (udev->quirks)
                dev_dbg(&udev->dev, "USB quirks for this device: %x\n",
                                udev->quirks);

        /* By default, disable autosuspend for all non-hubs */
#ifdef  CONFIG_USB_SUSPEND
        if (udev->descriptor.bDeviceClass != USB_CLASS_HUB)
                udev->autosuspend_disabled = 1;
#endif
}

// ------------------ END OF QUIRKS.C ---------------------------

but this:
dev_dbg(&udev->dev, "USB quirks for this device: %x\n", udev->quirks);
never happens

The dmesg is:

hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0008
ehci_hcd 0000:00:03.3: GetStatus port 3 status 001803 POWER sig=j CSC
CONNECT
hub 1-0:1.0: port 3, status 0501, change 0001, 480 Mb/s
hub 1-0:1.0: debounce: port 3: total 100ms stable 100ms status 0x501
ehci_hcd 0000:00:03.3: port 3 high speed
ehci_hcd 0000:00:03.3: GetStatus port 3 status 001005 POWER sig=se0 PE
CONNECT
usb 1-3: new high speed USB device using ehci_hcd and address 21
ehci_hcd 0000:00:03.3: port 3 high speed
ehci_hcd 0000:00:03.3: GetStatus port 3 status 001005 POWER sig=se0 PE
CONNECT
usb 1-3: config 1 interface 0 altsetting 0 endpoint 0x83 has an invalid
bInterval 200, changing to 11
usb 1-3: default language 0x0409
ehci_hcd 0000:00:03.3: devpath 3 ep0in 3strikes
ehci_hcd 0000:00:03.3: devpath 3 ep0in 3strikes
ehci_hcd 0000:00:03.3: devpath 3 ep0in 3strikes
ehci_hcd 0000:00:03.3: devpath 3 ep0in 3strikes
usb 1-3: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-3: Product: Actions Mtp Device 000001
usb 1-3: uevent
usb 1-3: usb_probe_device
usb 1-3: configuration #1 chosen from 1 choice
ehci_hcd 0000:00:03.3: devpath 3 ep0out 3strikes
usb 1-3: can't set config #1, error -71
drivers/usb/core/inode.c: creating file '021'
hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0008
ehci_hcd 0000:00:03.3: GetStatus port 3 status 001002 POWER sig=se0 CSC
hub 1-0:1.0: port 3, status 0100, change 0001, 12 Mb/s
usb 1-3: USB disconnect, address 21
usb 1-3: unregistering device
usb 1-3: usb_disable_device nuking all URBs
usb_endpoint usbdev1.21_ep00: ep_device_release called for
usbdev1.21_ep00
usb 1-3: uevent
hub 1-0:1.0: debounce: port 3: total 100ms stable 100ms status 0x100

// ------ END DMESG -----------------------------


and this is the usbmon output:

dbac30c0 333350579 C Ii:1:001:1 0:2048 1 = 10
dbac30c0 333350600 S Ii:1:001:1 -115:2048 4 <
c9c7bcc0 333350989 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 333351095 C Ci:1:001:0 0 4 = 01050100
c9c7bcc0 333351111 S Co:1:001:0 s 23 01 0010 0004 0000 0
c9c7bcc0 333351134 C Co:1:001:0 0 0
c9c7bcc0 333351223 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 333351236 C Ci:1:001:0 0 4 = 01050000
c9c7bcc0 333377131 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 333377173 C Ci:1:001:0 0 4 = 01050000
c9c7bcc0 333403213 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 333403283 C Ci:1:001:0 0 4 = 01050000
c9c7bcc0 333429569 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 333429630 C Ci:1:001:0 0 4 = 01050000
c9c7bcc0 333455250 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 333455318 C Ci:1:001:0 0 4 = 01050000
c9c7bcc0 333455571 S Co:1:001:0 s 23 03 0004 0004 0000 0
c9c7bcc0 333455586 C Co:1:001:0 0 0
c9c7bcc0 333506136 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 333507772 C Ci:1:001:0 0 4 = 03051000
c9c7bcc0 333558286 S Co:1:001:0 s 23 01 0014 0004 0000 0
c9c7bcc0 333558356 C Co:1:001:0 0 0
c9c7bcc0 333558679 S Ci:1:000:0 s 80 06 0100 0000 0040 64 <
c9c7bcc0 333559252 C Ci:1:000:0 0 18 = 12010002 ff000040 d6100022
00010102 0301
c9c7bcc0 333559295 S Co:1:001:0 s 23 03 0004 0004 0000 0
c9c7bcc0 333559309 C Co:1:001:0 0 0
c9c7bcc0 333610142 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 333610791 C Ci:1:001:0 0 4 = 03051000
c9c7bcc0 333661293 S Co:1:001:0 s 23 01 0014 0004 0000 0
c9c7bcc0 333661361 C Co:1:001:0 0 0
c9c7bcc0 333661375 S Co:1:000:0 s 00 05 000f 0000 0000 0
c9c7bcc0 333661590 C Co:1:000:0 0 0
c9c7bcc0 333673134 S Ci:1:015:0 s 80 06 0100 0000 0012 18 <
c9c7bcc0 333673586 C Ci:1:015:0 0 18 = 12010002 ff000040 d6100022
00010102 0301
c9c7bcc0 333676094 S Ci:1:015:0 s 80 06 0200 0000 0009 9 <
c9c7bcc0 333676207 C Ci:1:015:0 0 9 = 09022700 0101ee80 96
c9c7bcc0 333676227 S Ci:1:015:0 s 80 06 0200 0000 0027 39 <
c9c7bcc0 333676330 C Ci:1:015:0 0 39 = 09022700 0101ee80 96090400
00030805 50000705 01020002 00070582 02000200
c9c7ba40 333676639 S Ci:1:015:0 s 80 06 0300 0000 00ff 255 <
c9c7ba40 333676706 C Ci:1:015:0 0 4 = 04030904
c9c7ba40 333676800 S Ci:1:015:0 s 80 06 0302 0409 00ff 255 <
c9c7ba40 333677457 C Ci:1:015:0 0 52 = 34034100 63007400 69006f00
6e007300 20004d00 74007000 20004400 65007600
c9c7ba40 333677487 S Ci:1:015:0 s 80 06 0301 0409 00ff 255 <
c9c7ba40 335071788 C Ci:1:015:0 -71 64 = 40034100 63007400 69006f00
6e007300 20005300 65006d00 69006300 6f006e00
dbac30c0 335071804 C Ii:1:001:1 0:2048 1 = 10
dbac30c0 335071809 S Ii:1:001:1 -115:2048 4 <
c9c7ba40 335072105 S Ci:1:015:0 s 80 06 0301 0409 0002 2 <
c9c7ba40 335072265 C Ci:1:015:0 -71 0
c9c7ba40 335072362 S Ci:1:015:0 s 80 06 0303 0409 00ff 255 <
c9c7ba40 335072513 C Ci:1:015:0 -71 0
c9c7ba40 335072601 S Ci:1:015:0 s 80 06 0303 0409 0002 2 <
c9c7ba40 335072763 C Ci:1:015:0 -71 0
c9c7ba40 335074218 S Co:1:015:0 s 00 09 0001 0000 0000 0
c9c7ba40 335074391 C Co:1:015:0 -71 0
c9c7ba40 335074746 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7ba40 335074843 C Ci:1:001:0 0 4 = 00010100
c9c7ba40 335074857 S Co:1:001:0 s 23 01 0010 0004 0000 0
c9c7ba40 335074870 C Co:1:001:0 0 0
c9c7bcc0 335075674 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 335075694 C Ci:1:001:0 0 4 = 00010000
c9c7bcc0 335101130 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 335101194 C Ci:1:001:0 0 4 = 00010000
c9c7bcc0 335127360 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 335127426 C Ci:1:001:0 0 4 = 00010000
c9c7bcc0 335153131 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 335153198 C Ci:1:001:0 0 4 = 00010000
c9c7bcc0 335179145 S Ci:1:001:0 s a3 00 0000 0004 0004 4 <
c9c7bcc0 335179207 C Ci:1:001:0 0 4 = 00010000

// ----END OF USBMON ---------------------------

Is this:
{USB_DEVICE(0x10d6, 0x0022), .driver_info = USB_QUIRK_STRING_FETCH_255},
right?

Regards,
Fabio
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to