Commit 234d5b73 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://linuxusb.bkbits.net/linus-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 718443d7 1fa273f8
...@@ -1720,7 +1720,7 @@ L: linux-usb-devel@lists.sourceforge.net ...@@ -1720,7 +1720,7 @@ L: linux-usb-devel@lists.sourceforge.net
W: http://www.suse.cz/development/input/ W: http://www.suse.cz/development/input/
S: Maintained S: Maintained
USB HUB USB HUB DRIVER
P: Johannes Erdfelt P: Johannes Erdfelt
M: johannes@erdfelt.com M: johannes@erdfelt.com
L: linux-usb-users@lists.sourceforge.net L: linux-usb-users@lists.sourceforge.net
...@@ -1863,13 +1863,12 @@ W: http://www.linux-usb.org ...@@ -1863,13 +1863,12 @@ W: http://www.linux-usb.org
S: Supported S: Supported
USB UHCI DRIVER USB UHCI DRIVER
P: Georg Acher P: Johannes Erdfelt
M: usb@in.tum.de M: johannes@erdfelt.com
L: linux-usb-users@lists.sourceforge.net L: linux-usb-users@lists.sourceforge.net
L: linux-usb-devel@lists.sourceforge.net L: linux-usb-devel@lists.sourceforge.net
W: http://usb.in.tum.de
S: Maintained S: Maintained
USB "USBNET" DRIVER USB "USBNET" DRIVER
P: David Brownell P: David Brownell
M: dbrownell@users.sourceforge.net M: dbrownell@users.sourceforge.net
......
...@@ -97,7 +97,7 @@ int dev_hotplug (struct device *dev, const char *action) ...@@ -97,7 +97,7 @@ int dev_hotplug (struct device *dev, const char *action)
scratch += sprintf (scratch, "ACTION=%s", action) + 1; scratch += sprintf (scratch, "ACTION=%s", action) + 1;
envp [i++] = scratch; envp [i++] = scratch;
scratch += sprintf (scratch, "DEVICE=%s", dev_path) + 1; scratch += sprintf (scratch, "DEVPATH=%s", dev_path) + 1;
if (dev->bus->hotplug) { if (dev->bus->hotplug) {
/* have the bus specific function add its stuff */ /* have the bus specific function add its stuff */
......
...@@ -378,8 +378,8 @@ void cpia_unregister_camera(struct cam_data *cam); ...@@ -378,8 +378,8 @@ void cpia_unregister_camera(struct cam_data *cam);
/* ErrorCode */ /* ErrorCode */
#define ERROR_FLICKER_BELOW_MIN_EXP 0x01 /*flicker exposure got below minimum exposure */ #define ERROR_FLICKER_BELOW_MIN_EXP 0x01 /*flicker exposure got below minimum exposure */
#define ALOG(lineno,fmt,args...) printk(fmt,lineno,##args) #define ALOG(fmt,args...) printk(fmt, ##args)
#define LOG(fmt,args...) ALOG((__LINE__),KERN_INFO __FILE__":%s(%d):"fmt, __FUNCTION__, ##args) #define LOG(fmt,args...) ALOG(KERN_INFO __FILE__ ":%s(%d):" fmt, __FUNCTION__, __LINE__, ##args)
#ifdef _CPIA_DEBUG_ #ifdef _CPIA_DEBUG_
#define ADBG(lineno,fmt,args...) printk(fmt, jiffies, lineno, ##args) #define ADBG(lineno,fmt,args...) printk(fmt, jiffies, lineno, ##args)
......
...@@ -99,6 +99,34 @@ show_serial (struct device *dev, char *buf, size_t count, loff_t off) ...@@ -99,6 +99,34 @@ show_serial (struct device *dev, char *buf, size_t count, loff_t off)
} }
static DEVICE_ATTR(serial,S_IRUGO,show_serial,NULL); static DEVICE_ATTR(serial,S_IRUGO,show_serial,NULL);
static ssize_t
show_speed (struct device *dev, char *buf, size_t count, loff_t off)
{
struct usb_device *udev;
char *speed;
if (off)
return 0;
udev = to_usb_device (dev);
switch (udev->speed) {
case USB_SPEED_LOW:
speed = "1.5";
break;
case USB_SPEED_UNKNOWN:
case USB_SPEED_FULL:
speed = "12";
break;
case USB_SPEED_HIGH:
speed = "480";
break;
default:
speed = "unknown";
}
return sprintf (buf, "%s\n", speed);
}
static DEVICE_ATTR(speed, S_IRUGO, show_speed, NULL);
/* Descriptor fields */ /* Descriptor fields */
#define usb_descriptor_attr(field, format_string) \ #define usb_descriptor_attr(field, format_string) \
static ssize_t \ static ssize_t \
...@@ -136,6 +164,7 @@ void usb_create_driverfs_dev_files (struct usb_device *udev) ...@@ -136,6 +164,7 @@ void usb_create_driverfs_dev_files (struct usb_device *udev)
device_create_file (dev, &dev_attr_bDeviceClass); device_create_file (dev, &dev_attr_bDeviceClass);
device_create_file (dev, &dev_attr_bDeviceSubClass); device_create_file (dev, &dev_attr_bDeviceSubClass);
device_create_file (dev, &dev_attr_bDeviceProtocol); device_create_file (dev, &dev_attr_bDeviceProtocol);
device_create_file (dev, &dev_attr_speed);
if (udev->descriptor.iManufacturer) if (udev->descriptor.iManufacturer)
device_create_file (dev, &dev_attr_manufacturer); device_create_file (dev, &dev_attr_manufacturer);
......
...@@ -556,14 +556,6 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp, ...@@ -556,14 +556,6 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
* *
* FIXME reduce hardwired intelligence here * FIXME reduce hardwired intelligence here
*/ */
envp [i++] = scratch;
length += snprintf (scratch, buffer_size - length,
"%s", "DEVFS=/proc/bus/usb");
if ((buffer_size - length <= 0) || (i >= num_envp))
return -ENOMEM;
++length;
scratch += length;
envp [i++] = scratch; envp [i++] = scratch;
length += snprintf (scratch, buffer_size - length, length += snprintf (scratch, buffer_size - length,
"DEVICE=/proc/bus/usb/%03d/%03d", "DEVICE=/proc/bus/usb/%03d/%03d",
......
This diff is collapsed.
...@@ -358,7 +358,7 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol ...@@ -358,7 +358,7 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol
if (cflag & CRTSCTS) { if (cflag & CRTSCTS) {
i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0), i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE,
0x0, 0x41, NULL, 0, 100); 0x0, 0x41, NULL, 0, 100);
dbg ("0x40:0x1:0x0:0x41 %d", i); dbg ("0x40:0x1:0x0:0x41 %d", i);
} }
......
...@@ -421,4 +421,23 @@ extern int device_suspend(u32 state, u32 level); ...@@ -421,4 +421,23 @@ extern int device_suspend(u32 state, u32 level);
extern void device_resume(u32 level); extern void device_resume(u32 level);
extern void device_shutdown(void); extern void device_shutdown(void);
/* debugging and troubleshooting/diagnostic helpers. */
#ifdef DEBUG
#define dev_dbg(dev, format, arg...) \
printk (KERN_DEBUG "%s %s: " format , \
dev.driver->name , dev.bus_id , ## arg)
#else
#define dev_dbg(dev, format, arg...) do {} while (0)
#endif
#define dev_err(dev, format, arg...) \
printk (KERN_ERR "%s %s: " format , \
dev.driver->name , dev.bus_id , ## arg)
#define dev_info(dev, format, arg...) \
printk (KERN_INFO "%s %s: " format , \
dev.driver->name , dev.bus_id , ## arg)
#define dev_warn(dev, format, arg...) \
printk (KERN_WARN "%s %s: " format , \
dev.driver->name , dev.bus_id , ## arg)
#endif /* _DEVICE_H_ */ #endif /* _DEVICE_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment