Hi,

these calls either are unnecessary or harmful.

        Regards
                Oliver


You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

===================================================================


[EMAIL PROTECTED], 2003-03-30 03:46:26+02:00, [EMAIL PROTECTED]
  - remove unnecessary calls to usb_set_configuration


 class/usb-midi.c |   31 -------------------------------
 core/hub.c       |    6 +++++-
 2 files changed, 5 insertions(+), 32 deletions(-)


diff -Nru a/drivers/usb/class/usb-midi.c b/drivers/usb/class/usb-midi.c
--- a/drivers/usb/class/usb-midi.c      Sun Mar 30 03:46:59 2003
+++ b/drivers/usb/class/usb-midi.c      Sun Mar 30 03:46:59 2003
@@ -1806,22 +1806,6 @@
        printk(KERN_INFO "usb-midi: Found YAMAHA USB-MIDI device on dev %04x:%04x, 
iface %d\n",
               d->descriptor.idVendor, d->descriptor.idProduct, ifnum);
 
-       for ( i=0 ; i < d->descriptor.bNumConfigurations ; i++ ) {
-               if ( d->config+i == c ) goto configfound;
-       }
-
-       printk(KERN_INFO "usb-midi: Config not found.\n");
-
-       return -EINVAL;
-
- configfound:
-
-       /* this may not be necessary. */
-       if ( usb_set_configuration( d, c->desc.bConfigurationValue ) < 0 ) {
-               printk(KERN_INFO "usb-midi: Could not set config.\n");
-               return -EINVAL;
-       }
-
        ret = usb_get_descriptor( d, USB_DT_CONFIG, i, buf, USB_DT_CONFIG_SIZE );
        if ( ret < 0 ) {
                printk(KERN_INFO "usb-midi: Could not get config (error=%d).\n", ret);
@@ -1916,21 +1900,6 @@
        printk(KERN_INFO "usb-midi: Found MIDISTREAMING on dev %04x:%04x, iface %d\n",
               d->descriptor.idVendor, d->descriptor.idProduct, ifnum);
 
-       for ( i=0 ; i < d->descriptor.bNumConfigurations ; i++ ) {
-               if ( d->config+i == c ) goto configfound;
-       }
-
-       printk(KERN_INFO "usb-midi: Config not found.\n");
-
-       return -EINVAL;
-
- configfound:
-
-       /* this may not be necessary. */
-       if ( usb_set_configuration( d, c->desc.bConfigurationValue ) < 0 ) {
-               printk(KERN_INFO "usb-midi: Could not set config.\n");
-               return -EINVAL;
-       }
 
        /* From USB Spec v2.0, Section 9.5.
           If the class or vendor specific descriptors use the same format
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c    Sun Mar 30 03:46:59 2003
+++ b/drivers/usb/core/hub.c    Sun Mar 30 03:46:59 2003
@@ -1312,7 +1312,11 @@
 {
        struct device *gdev = &udev->dev;
        int r;
-       
+
+       /* this needs to make sure that no interface is probed
+          while we reset the device
+          we use the bus lock of the generic driver core
+       */
        down_read(&gdev->bus->subsys.rwsem);
        r = usb_physical_reset_device(udev);
        up_read(&gdev->bus->subsys.rwsem);

===================================================================


This BitKeeper patch contains the following changesets:
1.1564
## Wrapped with gzip_uu ##


begin 664 bkpatch18700
M'XL(`)-,ACX``ZV5ZT_;,!#`/]=_Q4E\`Z7Q(\Y+ZL0&TS9MTA`3WR:A/*Y-
MU#1&[EMAIL PROTECTED];[EMAIL PROTECTED](I%Y]]OL?OG`.X<&C3B6GJ:[3L`#X;U]$GMJ;%
M:656V-1M_VMJ[(*4Y\:0TE\/^YL5?K[T.HOH_-[E4C.:=)9U106D<^E$3-7=
M2/?["M/)^<=/%]_>GS,VF\%)E;4+_($=S&8L7QZ7/3;3I359M=YON%,/DG,A
MA-1<Z5#H0<9*!8,(>5Z26,HHF>=APC8>'6_S_:$MQ95,1!C0/[EMAIL PROTECTED]@[EMAIL PROTECTED]
M'0;`E4^/XB2D09C*\(C+E'/881N.)'B<?8#_C^"$%>"!Q96Y1NC;[EMAIL PROTECTED]
MH<B:[EMAIL PROTECTED])\Z;"[+$P[KQ>]S;K:M.PKB$!JS<[N4\J\5UZ,\8RS=UNB*.TZ
M]K'"?M7GT^(^FH!3'@[EMAIL PROTECTED]<O;`9F$LWAN^+8[F9)*K
M2,3DT\+BXGCC4&%6#Q<WF1LE;U67]<:$Y"%/>*B5C@>A-.=#*`,5J5S-HYPG
MJ/'EOFTQ3QXJ2D`02BJD2!(YPKP]HNUD[YG1G80_FU'"G0]K:\F(>Q+?PBX3
M$%&J>2K5$1?/PJ[!$V\&.U5SA6WG(,M-WT%CBF7=+J8$]%CY[^#9F_$A/L_^
MD>([EMAIL PROTECTED],OXUNPGF_B'[EMAIL PROTECTED]:Q'#MME2T17&^1QK,[EMAIL 
PROTECTED]&=9P4"
MS;NR)L>[EMAIL PROTECTED];A!NDQJ76I.D()5[7!6ZTU,D.Q]&\=V.(8.;C]P);M'5Q
M&Q>[EMAIL PROTECTED]/UYBWQ6HM$E8CI)[EMAIL PROTECTED]<H?HE1R@'3[T=
M5ON=H9M>WL7<HS3L15[,J=]"$A)!PE]_S*+"8NGZU2R,(C7^E?X`+EAM&YT'
"````
`
end



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to