ChangeSet 1.1474.148.19, 2004/01/27 14:37:40-08:00, stern@rowland.harvard.edu [PATCH] USB: Update sound/usb/usbaudio.c On Tue, 27 Jan 2004, Greg KH wrote: > Hm, can you send me a patch to fix up snd_usb_extigy_boot_quirk() in > sound/usb/usbaudio.c now that this patch broke that code? :) Here it is. The problem with changing things in the core is always that you may miss some of the repercussions. In this case the patch will restore the code's original functionality. However the whole thing looks a bit creaky to me. Changing device descriptors and who knows what else without informing usbcore isn't a good idea. What this code _really_ appears to need is some form of usb_device_reenumerate(). Such a function would fit very nicely into the framework I've worked out for the revised usb_device_reset(); maybe I'll add it in there. It would do essentially the same thing as device_reset except for skipping the actual port reset. sound/usb/usbaudio.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c --- a/sound/usb/usbaudio.c Tue Jan 27 15:12:32 2004 +++ b/sound/usb/usbaudio.c Tue Jan 27 15:12:32 2004 @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -2560,9 +2561,10 @@ err = usb_control_msg(dev, usb_sndctrlpipe(dev,0), 0x10, 0x43, 0x0001, 0x000a, NULL, 0, HZ); if (err < 0) snd_printdd("error sending boot message: %d\n", err); - err = usb_get_device_descriptor(dev); + err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, + &dev->descriptor, sizeof(dev->descriptor)); config = dev->actconfig; - if (err < 0) snd_printdd("error usb_get_device_descriptor: %d\n", err); + if (err < 0) snd_printdd("error usb_get_descriptor: %d\n", err); err = usb_reset_configuration(dev); if (err < 0) snd_printdd("error usb_reset_configuration: %d\n", err); snd_printdd("extigy_boot: new boot length = %d\n", get_cfg_desc(config)->wTotalLength);