Greg:
This patch makes the necessary updates to the bluetty, cdc-acm, and usblp
class drivers for the new interface/altsetting paradigm. The changes are
quite small.
Unfortunately, the audio and usb-midi drivers are in much worse shape.
They will require more in-depth hacking, to come later...
Alan Stern
===== drivers/usb/class/bluetty.c 1.59 vs edited =====
--- 1.59/drivers/usb/class/bluetty.c Wed Sep 3 11:47:17 2003
+++ edited/drivers/usb/class/bluetty.c Fri Mar 5 11:11:33 2004
@@ -1025,7 +1025,7 @@
int num_bulk_in = 0;
int num_bulk_out = 0;
- interface = &intf->altsetting[0];
+ interface = intf->cur_altsetting;
control_out_endpoint = interface->desc.bInterfaceNumber;
/* find the endpoints that we need */
===== drivers/usb/class/cdc-acm.c 1.72 vs edited =====
--- 1.72/drivers/usb/class/cdc-acm.c Tue Feb 10 00:33:09 2004
+++ edited/drivers/usb/class/cdc-acm.c Fri Mar 5 11:16:32 2004
@@ -595,12 +595,12 @@
* is there it's not for call management ... so use
* the cdc union descriptor whenever there is one.
*/
- ifcom = intf->altsetting + 0;
+ ifcom = intf->cur_altsetting;
if (intf == cfacm->interface[j]) {
- ifdata = cfacm->interface[j + 1]->altsetting + 0;
+ ifdata = cfacm->interface[j + 1]->cur_altsetting;
data = cfacm->interface[j + 1];
} else if (intf == cfacm->interface[j + 1]) {
- ifdata = cfacm->interface[j]->altsetting + 0;
+ ifdata = cfacm->interface[j]->cur_altsetting;
data = cfacm->interface[j];
} else
continue;
===== drivers/usb/class/usblp.c 1.94 vs edited =====
--- 1.94/drivers/usb/class/usblp.c Fri Feb 27 13:09:14 2004
+++ edited/drivers/usb/class/usblp.c Fri Mar 5 11:40:58 2004
@@ -133,6 +133,7 @@
wait_queue_head_t wait; /* Zzzzz ... */
int readcount; /* Counter for reads */
int ifnum; /* Interface number */
+ struct usb_interface *intf; /* The interface */
/* Alternate-setting numbers and endpoints for each protocol
* (7/1/{index=1,2,3}) that the device supports: */
struct {
@@ -829,7 +830,8 @@
usblp->dev = dev;
init_MUTEX (&usblp->sem);
init_waitqueue_head(&usblp->wait);
- usblp->ifnum = intf->altsetting->desc.bInterfaceNumber;
+ usblp->ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
+ usblp->intf = intf;
usblp->writeurb = usb_alloc_urb(0, GFP_KERNEL);
if (!usblp->writeurb) {
@@ -965,7 +967,7 @@
struct usb_endpoint_descriptor *epd, *epwrite, *epread;
int p, i, e;
- if_alt = usblp->dev->actconfig->interface[usblp->ifnum];
+ if_alt = usblp->intf;
for (p = 0; p < USBLP_MAX_PROTOCOLS; p++)
usblp->protocol[p].alt_setting = -1;
@@ -1014,7 +1016,8 @@
epread = NULL;
}
- usblp->protocol[ifd->desc.bInterfaceProtocol].alt_setting = i;
+ usblp->protocol[ifd->desc.bInterfaceProtocol].alt_setting =
+ ifd->desc.bAlternateSetting;
usblp->protocol[ifd->desc.bInterfaceProtocol].epwrite = epwrite;
usblp->protocol[ifd->desc.bInterfaceProtocol].epread = epread;
}
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel