Commit 6f842b91 authored by Linus Torvalds's avatar Linus Torvalds

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

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents d52a86be 4945fd78
...@@ -2190,7 +2190,7 @@ S: Fullarton 5063 ...@@ -2190,7 +2190,7 @@ S: Fullarton 5063
S: South Australia S: South Australia
N. Wolfgang Muees N. Wolfgang Muees
E: wmues@nexgo.de E: wolfgang@iksw-muees.de
D: Auerswald USB driver D: Auerswald USB driver
N: Ian A. Murdock N: Ian A. Murdock
......
...@@ -27,4 +27,4 @@ Future plans ...@@ -27,4 +27,4 @@ Future plans
============ ============
- Connection to ISDN4LINUX (the hisax interface) - Connection to ISDN4LINUX (the hisax interface)
The maintainer of this driver is wmues@nexgo.de The maintainer of this driver is wolfgang@iksw-muees.de
...@@ -1696,12 +1696,6 @@ M: dbrownell@users.sourceforge.net ...@@ -1696,12 +1696,6 @@ M: dbrownell@users.sourceforge.net
L: linux-usb-devel@lists.sourceforge.net L: linux-usb-devel@lists.sourceforge.net
S: Maintained S: Maintained
USB EHCI DRIVER
P: David Brownell
M: dbrownell@users.sourceforge.net
L: linux-usb-devel@lists.sourceforge.net
S: Maintained
USB HID/HIDBP/INPUT DRIVERS USB HID/HIDBP/INPUT DRIVERS
P: Vojtech Pavlik P: Vojtech Pavlik
M: vojtech@suse.cz M: vojtech@suse.cz
...@@ -1816,7 +1810,7 @@ S: Maintained ...@@ -1816,7 +1810,7 @@ S: Maintained
USB AUERSWALD DRIVER USB AUERSWALD DRIVER
P: Wolfgang Muees P: Wolfgang Muees
M: wmues@nexgo.de M: wolfgang@iksw-muees.de
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
S: Maintained S: Maintained
......
/*
* drivers.c
* (C) Copyright 1999 Randy Dunlap.
* (C) Copyright 1999, 2000 Thomas Sailer <sailer@ife.ee.ethz.ch>. (proc file per device)
* (C) Copyright 1999 Deti Fliegl (new USB architecture)
*
* $id$
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*************************************************************
*
* 1999-12-16: Thomas Sailer <sailer@ife.ee.ethz.ch>
* Converted the whole proc stuff to real
* read methods. Now not the whole device list needs to fit
* into one page, only the device list for one bus.
* Added a poll method to /proc/bus/usb/devices, to wake
* up an eventual usbd
* 2000-01-04: Thomas Sailer <sailer@ife.ee.ethz.ch>
* Turned into its own filesystem
*
* $Id: drivers.c,v 1.3 2000/01/11 13:58:24 tom Exp $
*/
#include <linux/fs.h>
#include <linux/gfp.h>
#include <linux/usb.h>
#include <linux/usbdevice_fs.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
/*****************************************************************/
/*
* Dump usb_driver_list.
*
* We now walk the list of registered USB drivers.
*/
static ssize_t usb_driver_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos)
{
struct list_head *tmp = usb_driver_list.next;
char *page, *start, *end;
ssize_t ret = 0;
unsigned int pos, len;
if (*ppos < 0)
return -EINVAL;
if (nbytes <= 0)
return 0;
if (!access_ok(VERIFY_WRITE, buf, nbytes))
return -EFAULT;
if (!(page = (char*) __get_free_page(GFP_KERNEL)))
return -ENOMEM;
start = page;
end = page + (PAGE_SIZE - 100);
pos = *ppos;
lock_kernel(); /* else drivers might be unloaded */
for (; tmp != &usb_driver_list; tmp = tmp->next) {
struct usb_driver *driver = list_entry(tmp, struct usb_driver, driver_list);
int minor = driver->fops ? driver->minor : -1;
if (minor == -1)
start += sprintf (start, " %s\n", driver->name);
else if (driver->num_minors == 1)
start += sprintf (start, " %3d: %s\n", minor, driver->name);
else
start += sprintf (start, "%3d-%3d: %s\n", minor, minor + driver->num_minors - 1, driver->name);
if (start > end) {
start += sprintf(start, "(truncated)\n");
break;
}
}
unlock_kernel();
if (start == page)
start += sprintf(start, "(none)\n");
len = start - page;
if (len > pos) {
len -= pos;
if (len > nbytes)
len = nbytes;
ret = len;
if (copy_to_user(buf, page + pos, len))
ret = -EFAULT;
else
*ppos += len;
}
free_page((unsigned long)page);
return ret;
}
static loff_t usb_driver_lseek(struct file * file, loff_t offset, int orig)
{
loff_t ret;
lock_kernel();
switch (orig) {
case 0:
file->f_pos = offset;
ret = file->f_pos;
break;
case 1:
file->f_pos += offset;
ret = file->f_pos;
break;
case 2:
default:
ret = -EINVAL;
}
unlock_kernel();
return ret;
}
struct file_operations usbdevfs_drivers_fops = {
.llseek = usb_driver_lseek,
.read = usb_driver_read,
};
...@@ -876,10 +876,11 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port, ...@@ -876,10 +876,11 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
* (quite rare, since most hubs have 4-6 ports). * (quite rare, since most hubs have 4-6 ports).
*/ */
pdev = dev->parent; pdev = dev->parent;
if (pdev->devpath [0] != '/') /* parent not root */ if (pdev->devpath [0] != '0') /* parent not root? */
len = snprintf (dev->devpath, sizeof dev->devpath, len = snprintf (dev->devpath, sizeof dev->devpath,
"%s.%d", pdev->devpath, port + 1); "%s.%d", pdev->devpath, port + 1);
else /* root == "/", root port 2 == "2", port 3 that hub "/2.3" */ /* root == "0", root port 2 == "2", port 3 that hub "2.3" */
else
len = snprintf (dev->devpath, sizeof dev->devpath, len = snprintf (dev->devpath, sizeof dev->devpath,
"%d", port + 1); "%d", port + 1);
if (len == sizeof dev->devpath) if (len == sizeof dev->devpath)
......
This diff is collapsed.
...@@ -995,7 +995,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus) ...@@ -995,7 +995,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus)
usb_bus_get(bus); usb_bus_get(bus);
if (!parent) if (!parent)
dev->devpath [0] = '/'; dev->devpath [0] = '0';
dev->bus = bus; dev->bus = bus;
dev->parent = parent; dev->parent = parent;
atomic_set(&dev->refcnt, 1); atomic_set(&dev->refcnt, 1);
......
...@@ -172,7 +172,7 @@ struct aiptek_features aiptek_features[] = { ...@@ -172,7 +172,7 @@ struct aiptek_features aiptek_features[] = {
}; };
struct usb_device_id aiptek_ids[] = { struct usb_device_id aiptek_ids[] = {
{USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x20), driver_info:0}, {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x20), .driver_info = 0},
{} {}
}; };
......
...@@ -712,18 +712,6 @@ static struct file_operations dabusb_fops = ...@@ -712,18 +712,6 @@ static struct file_operations dabusb_fops =
.release = dabusb_release, .release = dabusb_release,
}; };
static int dabusb_find_struct (void)
{
int u;
for (u = 0; u < NRDABUSB; u++) {
pdabusb_t s = &dabusb[u];
if (!s->usbdev)
return u;
}
return -1;
}
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
static void *dabusb_probe (struct usb_device *usbdev, unsigned int ifnum, static void *dabusb_probe (struct usb_device *usbdev, unsigned int ifnum,
const struct usb_device_id *id) const struct usb_device_id *id)
......
...@@ -1521,10 +1521,10 @@ static inline void usb_se401_remove_disconnected (struct usb_se401 *se401) ...@@ -1521,10 +1521,10 @@ static inline void usb_se401_remove_disconnected (struct usb_se401 *se401)
} }
static struct usb_driver se401_driver = { static struct usb_driver se401_driver = {
name: "se401", .name = "se401",
id_table: device_table, .id_table = device_table,
.probe = se401_probe, .probe = se401_probe,
disconnect: se401_disconnect .disconnect = se401_disconnect
}; };
......
...@@ -17,11 +17,13 @@ ...@@ -17,11 +17,13 @@
/* Request 0x51 Image Setup */ /* Request 0x51 Image Setup */
#if 0
/* 128x98 ? 0x3180 size */ /* 128x98 ? 0x3180 size */
static unsigned char s128x98bw[] = { static unsigned char s128x98bw[] = {
0, 0x34, 0xC4, 0x00, 0x00, 0x00, 0, 0, 0, 0x34, 0xC4, 0x00, 0x00, 0x00, 0, 0,
0x18, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00 0x18, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00
}; };
#endif
/* 128x122 3D80 size */ /* 128x122 3D80 size */
static unsigned char s128x122bw[] = { static unsigned char s128x122bw[] = {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* /*
* auerswald.c -- Auerswald PBX/System Telephone usb driver. * auerswald.c -- Auerswald PBX/System Telephone usb driver.
* *
* Copyright (C) 2001 Wolfgang Mes (wmues@nexgo.de) * Copyright (C) 2001 Wolfgang Mes (wolfgang@iksw-muees.de)
* *
* Very much code of this driver is borrowed from dabusb.c (Deti Fliegl) * Very much code of this driver is borrowed from dabusb.c (Deti Fliegl)
* and from the USB Skeleton driver (Greg Kroah-Hartman). Thank you. * and from the USB Skeleton driver (Greg Kroah-Hartman). Thank you.
...@@ -51,7 +51,7 @@ do { \ ...@@ -51,7 +51,7 @@ do { \
/*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/
/* Version Information */ /* Version Information */
#define DRIVER_VERSION "0.9.11" #define DRIVER_VERSION "0.9.11"
#define DRIVER_AUTHOR "Wolfgang Mes <wmues@nexgo.de>" #define DRIVER_AUTHOR "Wolfgang Mes <wolfgang@iksw-muees.de>"
#define DRIVER_DESC "Auerswald PBX/System Telephone usb driver" #define DRIVER_DESC "Auerswald PBX/System Telephone usb driver"
/*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/
......
...@@ -152,6 +152,7 @@ static struct usb_device_id usb_klsi_table[] = { ...@@ -152,6 +152,7 @@ static struct usb_device_id usb_klsi_table[] = {
{ USB_DEVICE(0x10bd, 0x1427) }, /* ASANTE USB To Ethernet Adapter */ { USB_DEVICE(0x10bd, 0x1427) }, /* ASANTE USB To Ethernet Adapter */
{ USB_DEVICE(0x1342, 0x0204) }, /* Mobility USB-Ethernet Adapter */ { USB_DEVICE(0x1342, 0x0204) }, /* Mobility USB-Ethernet Adapter */
{ USB_DEVICE(0x13d2, 0x0400) }, /* Shark Pocket Adapter */ { USB_DEVICE(0x13d2, 0x0400) }, /* Shark Pocket Adapter */
{ USB_DEVICE(0x1485, 0x0001) }, /* Silicom U2E */
{ USB_DEVICE(0x1645, 0x0005) }, /* Entrega E45 */ { USB_DEVICE(0x1645, 0x0005) }, /* Entrega E45 */
{ USB_DEVICE(0x1645, 0x0008) }, /* Entrega USB Ethernet Adapter */ { USB_DEVICE(0x1645, 0x0008) }, /* Entrega USB Ethernet Adapter */
{ USB_DEVICE(0x1645, 0x8005) }, /* PortGear Ethernet Adapter */ { USB_DEVICE(0x1645, 0x8005) }, /* PortGear Ethernet Adapter */
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* (26/7/2002) ganesh
* Fixed up broken error handling in ipaq_open. Retry the "kickstart"
* packet much harder - this drastically reduces connection failures.
*
* (30/4/2002) ganesh * (30/4/2002) ganesh
* Added support for the Casio EM500. Completely untested. Thanks * Added support for the Casio EM500. Completely untested. Thanks
* to info from Nathan <wfilardo@fuse.net> * to info from Nathan <wfilardo@fuse.net>
...@@ -54,6 +58,8 @@ ...@@ -54,6 +58,8 @@
#include "usb-serial.h" #include "usb-serial.h"
#include "ipaq.h" #include "ipaq.h"
#define KP_RETRIES 100
/* /*
* Version Information * Version Information
*/ */
...@@ -118,6 +124,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp) ...@@ -118,6 +124,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
struct ipaq_private *priv; struct ipaq_private *priv;
struct ipaq_packet *pkt; struct ipaq_packet *pkt;
int i, result = 0; int i, result = 0;
int retries = KP_RETRIES;
if (port_paranoia_check(port, __FUNCTION__)) { if (port_paranoia_check(port, __FUNCTION__)) {
return -ENODEV; return -ENODEV;
...@@ -192,31 +199,35 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp) ...@@ -192,31 +199,35 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
result = usb_submit_urb(port->read_urb, GFP_KERNEL); result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result) { if (result) {
err(__FUNCTION__ " - failed submitting read urb, error %d", result); err(__FUNCTION__ " - failed submitting read urb, error %d", result);
goto error;
} }
/* /*
* Send out two control messages observed in win98 sniffs. Not sure what * Send out control message observed in win98 sniffs. Not sure what
* they do. * it does, but from empirical observations, it seems that the device
* will start the chat sequence once one of these messages gets
* through. Since this has a reasonably high failure rate, we retry
* several times.
*/ */
result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21, while (retries--) {
0x1, 0, NULL, 0, 5 * HZ); result = usb_control_msg(serial->dev,
if (result < 0) { usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
err(__FUNCTION__ " - failed doing control urb, error %d", result); 0x1, 0, NULL, 0, HZ / 10 + 1);
if (result == 0) {
return 0;
} }
result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
0x1, 0, NULL, 0, 5 * HZ);
if (result < 0) {
err(__FUNCTION__ " - failed doing control urb, error %d", result);
} }
err(__FUNCTION__ " - failed doing control urb, error %d", result);
return result; goto error;
enomem: enomem:
result = -ENOMEM;
err(__FUNCTION__ " - Out of memory");
error:
ipaq_destroy_lists(port); ipaq_destroy_lists(port);
kfree(priv); kfree(priv);
err(__FUNCTION__ " - Out of memory"); return result;
return -ENOMEM;
} }
......
...@@ -86,7 +86,6 @@ ...@@ -86,7 +86,6 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <linux/usb.h>
#ifdef CONFIG_USB_SERIAL_DEBUG #ifdef CONFIG_USB_SERIAL_DEBUG
static int debug = 1; static int debug = 1;
......
...@@ -351,7 +351,8 @@ struct usb_bus { ...@@ -351,7 +351,8 @@ struct usb_bus {
int bandwidth_int_reqs; /* number of Interrupt requests */ int bandwidth_int_reqs; /* number of Interrupt requests */
int bandwidth_isoc_reqs; /* number of Isoc. requests */ int bandwidth_isoc_reqs; /* number of Isoc. requests */
struct dentry *dentry; /* usbfs dentry entry for the bus */ struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */
struct dentry *usbdevfs_dentry; /* usbdevfs dentry entry for the bus */
atomic_t refcnt; atomic_t refcnt;
}; };
...@@ -410,7 +411,8 @@ struct usb_device { ...@@ -410,7 +411,8 @@ struct usb_device {
void *hcpriv; /* Host Controller private data */ void *hcpriv; /* Host Controller private data */
struct list_head filelist; struct list_head filelist;
struct dentry *dentry; /* usbfs dentry entry for the device */ struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */
struct dentry *usbdevfs_dentry; /* usbdevfs dentry entry for the device */
/* /*
* Child devices - these can be either new devices * Child devices - these can be either new devices
......
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