Re: Gadget serial driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/11/10 23:48, Greg KH wrote:
On Fri, Nov 12, 2010 at 08:26:22PM +0100, Jef Driesen wrote:
Hi,

The g_serial kernel module has two idVendor and idProduct parameters. I
used those in the past to simulate a usb device with non-default VID/PID,
e.g.

sudo modprobe g_serial idVendor=0xFFFF idProduct=0x0005 use_acm=1

But recently this stopped working. Whatever values I pass the default
values (0525:a4a7) get used. The parameters are still there in
drivers/usb/gadget/composite.c, but it looks like there values aren't used
anywhere in the g_serial module (serial.c). Only the hardcoded defaults are
used there.

I don't know exactly which version used to work, but I think it was 2.6.32.
The one I'm running now is 2.6.35. Both are ubuntu kernels.

Can you try a kernel.org kernel?  We have no idea what is patched in
ubuntu kernels :(

Sure. LIt loks like Ubuntu didn't patch their g_serial driver. Kernel.org v2.6.32 is working fine, and v2.6.35 is not, just like the Ubuntu ones.

If you can narrow it down to a version, and then a commit (using 'git
bisect') that would be the best.

After running

git bisect start -- drivers/usb/gadget/

I could narrow down to this commit:

commit 1ab83238740ff1e1773d5c13ecac43c60cf4aec4
Author: Robert Lukassen <Robert.Lukassen@xxxxxxxxxx>
Date:   Fri May 7 09:19:53 2010 +0200

    USB: gadget: Allow function access to device ID data during bind()

    This is a patch that makes sure that the device ID data (idVendor,
    idProduct and bcdDevice) are assigned to the descriptor in the cdev
    structure *before* the composite gadget starts binding. This allows the
    composite driver, and all the composite functions it uses, access to
    that data.

    In one of the composite functions we created, we needed to register an
    input device and wanted to use the idVendor, idProduct and bcdDevice
    codes to properly initialize the id field of the input device. We could
    not do that because the idVendor, idProduct and bcdDevice values were
    only set in the cdec structure *after* the composite->bind(cdev) call.

    Signed-off-by: Robert Lukassen <robert.lukassen@xxxxxxxxxx>
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>


Note that I didn't do a full kernel compile during the bisecting. To speed up the process, I just build the g_serial module against my running kernel. I suppose that's fine, but if not let me know.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux