David and Greg:
This patch fixes usbnet and usbtest. When checking endpoints, they
iterate through all interfaces out to intf->max_altsetting, but they
should only go up to intf->num_altsetting. The max_altsetting value
refers to the amount of space _allocated_ for usb_host_interface
structures, not the number that are really in use.
Greg, please apply unless David objects.
Alan Stern
# This is a BitKeeper generated patch for the following project:
# Project Name: greg k-h's linux 2.5 USB kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1668 -> 1.1669
# drivers/usb/net/usbnet.c 1.105 -> 1.106
# drivers/usb/misc/usbtest.c 1.36 -> 1.37
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/15 [EMAIL PROTECTED] 1.1669
# Replace intf->max_altsetting with intf->num_altsetting
# --------------------------------------------
#
diff -Nru a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
--- a/drivers/usb/misc/usbtest.c Mon Sep 15 10:43:22 2003
+++ b/drivers/usb/misc/usbtest.c Mon Sep 15 10:43:22 2003
@@ -87,7 +87,7 @@
struct usb_host_endpoint *in, *out;
struct usb_device *udev;
- for (tmp = 0; tmp < intf->max_altsetting; tmp++) {
+ for (tmp = 0; tmp < intf->num_altsetting; tmp++) {
unsigned ep;
in = out = 0;
diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
--- a/drivers/usb/net/usbnet.c Mon Sep 15 10:43:22 2003
+++ b/drivers/usb/net/usbnet.c Mon Sep 15 10:43:22 2003
@@ -312,7 +312,7 @@
struct usb_host_interface *alt;
struct usb_host_endpoint *in, *out;
- for (tmp = 0; tmp < intf->max_altsetting; tmp++) {
+ for (tmp = 0; tmp < intf->num_altsetting; tmp++) {
unsigned ep;
in = out = 0;
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel