Subversion Repositories shark

Compare Revisions

Regard whitespace Rev 1049 → Rev 1048

/shark/trunk/drivers/usb/serial/pl2303.c
259,8 → 259,9
spin_lock_irqsave(&priv->lock, flags);
 
if (!priv->termios_initialized) {
printk(KERN_INFO "@####### termios initializated\n");
*(port->tty->termios) = tty_std_termios;
port->tty->termios->c_cflag = B4800 | CS8 | CREAD | HUPCL | CLOCAL;
port->tty->termios->c_cflag = B38400 | CS8 | CREAD | HUPCL | CLOCAL;
priv->termios_initialized = 1;
}
 
435,6 → 436,7
 
/* Setup termios */
if (port->tty) {
printk(KERN_INFO "#####@ set termios");
pl2303_set_termios (port, &tmp_termios);
}
 
/shark/trunk/drivers/usb/serial/usb-serial.c
434,7 → 434,6
int i;
 
dbg("%s", __FUNCTION__);
printk("Returning serial %d ports %d\n", serial->minor, serial->num_ports);
 
if (serial == NULL)
return;
1229,7 → 1228,7
port->dev.release = &port_release;
 
snprintf26(&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number);
/*dbg ("%s - registering %s", __FUNCTION__, port->dev.bus_id);*/
dbg ("%s - registering %s", __FUNCTION__, port->dev.bus_id);
device_register (&port->dev);
}
 
1343,7 → 1342,7
usb_serial_tty_driver->subtype = SERIAL_TYPE_NORMAL;
usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
usb_serial_tty_driver->init_termios = tty_std_termios;
usb_serial_tty_driver->init_termios.c_cflag = B4800 | CS8 | CREAD | HUPCL | CLOCAL;
usb_serial_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
tty_set_operations(usb_serial_tty_driver, &serial_ops);
result = tty_register_driver(usb_serial_tty_driver);
if (result) {
/shark/trunk/drivers/usb/serial/tty_io.c
54,7 → 54,7
struct termios tty_std_termios = { /* for the benefit of tty drivers */
.c_iflag = ICRNL | IXON,
.c_oflag = OPOST | ONLCR,
.c_cflag = B4800 | CS8 | CREAD | HUPCL,
.c_cflag = B38400 | CS8 | CREAD | HUPCL,
.c_lflag = ISIG | ICANON | ECHO | ECHOE | ECHOK |
ECHOCTL | ECHOKE | IEXTEN,
.c_cc = INIT_C_CC
127,40 → 127,14
 
}
 
/*
* This routine is called out of the software interrupt to flush data
* from the flip buffer to the line discipline.
*/
static void flush_to_ldisc(void *private_)
void tty_flip_buffer_push(struct tty_struct *tty)
{
struct tty_struct *tty = (struct tty_struct *) private_;
unsigned char *cp;
char *fp;
int count;
 
if (tty->flip.buf_num) {
cp = tty->flip.char_buf + TTY_FLIPBUF_SIZE;
fp = tty->flip.flag_buf + TTY_FLIPBUF_SIZE;
tty->flip.buf_num = 0;
tty->flip.char_buf_ptr = tty->flip.char_buf;
tty->flip.flag_buf_ptr = tty->flip.flag_buf;
} else {
cp = tty->flip.char_buf;
fp = tty->flip.flag_buf;
tty->flip.buf_num = 1;
tty->flip.char_buf_ptr = tty->flip.char_buf + TTY_FLIPBUF_SIZE;
tty->flip.flag_buf_ptr = tty->flip.flag_buf + TTY_FLIPBUF_SIZE;
printk(KERN_INFO "%c\n", *(tty->flip.char_buf_ptr -1));
}
count = tty->flip.count;
tty->flip.count = 0;
 
tty->ldisc.receive_buf(tty, cp, fp, count);
}
static void flush_to_ldisc(void *private_)
{
 
 
void tty_flip_buffer_push(struct tty_struct *tty)
{
flush_to_ldisc((void *) tty);
}
 
static struct tty_struct *alloc_tty_struct(void)
168,8 → 142,8
struct tty_struct *tty;
 
tty = kmalloc(sizeof(struct tty_struct), GFP_KERNEL);
if (tty)
memset(tty, 0, sizeof(struct tty_struct));
// if (tty)
// memset(tty, 0, sizeof(struct tty_struct));
return tty;
}
 
204,65 → 178,10
extern int serial_open (struct tty_struct *tty, struct file * filp);
extern int serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count);
 
static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count)
struct tty_struct *tty;
int serial_usbport_open(int port_number)
{
const unsigned char *p;
char *f, flags = TTY_NORMAL;
int i;
char buf[64];
unsigned long cpuflags;
if (!tty->read_buf)
return;
 
spin_lock_irqsave(&tty->read_lock, cpuflags);
i = min(N_TTY_BUF_SIZE - tty->read_cnt, \
N_TTY_BUF_SIZE - tty->read_head);
i = min(count, i);
memcpy(tty->read_buf + tty->read_head, cp, i);
tty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1);
tty->read_cnt += i;
spin_unlock_irqrestore(&tty->read_lock, cpuflags);
 
//** for (i=0; i<count; i++)
//** printk("%c", *(cp+i) );
}
 
/*
* Check whether to call the driver.unthrottle function.
* We test the TTY_THROTTLED bit first so that it always
* indicates the current state.
*/
static void check_unthrottle(struct tty_struct * tty)
{
if (tty->count &&
test_and_clear_bit(TTY_THROTTLED, &tty->flags) &&
tty->driver->unthrottle)
tty->driver->unthrottle(tty);
}
 
/*
* Reset the read buffer counters, clear the flags,
* and make sure the driver is unthrottled. Called
* from n_tty_open() and n_tty_flush_buffer().
*/
static void reset_buffer_flags(struct tty_struct *tty)
{
unsigned long flags;
 
spin_lock_irqsave(&tty->read_lock, flags);
tty->read_head = tty->read_tail = tty->read_cnt = 0;
spin_unlock_irqrestore(&tty->read_lock, flags);
tty->canon_head = tty->canon_data = tty->erasing = 0;
memset(&tty->read_flags, 0, sizeof tty->read_flags);
check_unthrottle(tty);
}
 
int serial_usbport_open(void **private, int port_number)
{
int retval;
struct tty_struct *tty;
tty = alloc_tty_struct();
if(!tty)
goto fail_no_mem;
269,51 → 188,23
 
initialize_tty_struct (tty);
 
tty->termios = kmalloc (sizeof(struct termios), GFP_KERNEL);
tty->termios = malloc (sizeof(struct termios));
*(tty->termios) = tty_std_termios;
tty->index = port_number;
tty->ldisc.receive_buf = n_tty_receive_buf;
if (!tty->read_buf) {
tty->read_buf = kmalloc(N_TTY_BUF_SIZE, GFP_KERNEL);
if (!tty->read_buf)
return -ENOMEM;
}
memset(tty->read_buf, 0, N_TTY_BUF_SIZE);
reset_buffer_flags(tty);
 
retval = serial_open(tty, NULL);
*private = (void*)tty;
return retval;
 
fail_no_mem:
return -ENOMEM;
}
 
int serial_usbport_write(void *private, const unsigned char *buf, int count)
int serial_usbport_write(const unsigned char *buf, int count)
{
int retval;
struct tty_struct *tty = (struct tty_struct*) private;
retval = serial_write(tty, 0, buf, count);
return retval;
}
 
int serial_usbport_read(void *private, char* data_in)
{
char c;
struct tty_struct *tty = (struct tty_struct*) private;
unsigned long flags;
 
if (tty->read_cnt)
{
c = tty->read_buf[tty->read_tail];
tty->read_tail = ((tty->read_tail+1) & \
(N_TTY_BUF_SIZE-1));
tty->read_cnt--;
*data_in = c;
return 1;
// printk(KERN_DEBUG "######### retval=%d\n", retval);
}
*data_in = 0;
return 0;
}
/shark/trunk/drivers/usb/serial/bus.c
57,7 → 57,6
struct usb_serial_port *port;
int retval = 0;
int minor;
int i;
 
port = to_usb_serial_port(dev);
if (!port) {
83,8 → 82,6
dev_info(&port->serial->dev->dev,
"%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)\n",
driver->name, minor, minor);
/* for (i=0; i<20; i++)
printk("ttyusb%d\n", minor);*/
 
exit:
return retval;
/shark/trunk/drivers/usb/include/drivers/shark_usbserial26.h
File deleted
/shark/trunk/drivers/usb/include/drivers/shark_pwc26.h
File deleted
/shark/trunk/drivers/usb/shark_glue/shark_pwc.c
File deleted
/shark/trunk/drivers/usb/shark_glue/shark_serial.c
File deleted
/shark/trunk/drivers/usb/shark_glue/shark_usb.c
9,9 → 9,6
extern int uhci_hcd_init(void);
extern void uhci_hcd_cleanup(void);
 
extern int ehci_hcd_init(void);
extern void ehci_hcd_cleanup(void);
 
extern int usb_mouse_init(void);
extern void usb_mouse_exit(void);
 
31,7 → 28,6
return 0;
 
usb_init();
ehci_hcd_init();
ohci_hcd_pci_init();
uhci_hcd_init();
usb_mouse_init();
49,7 → 45,6
if (usb_installed == FALSE)
return -1;
ehci_hcd_cleanup();
ohci_hcd_pci_cleanup();
uhci_hcd_cleanup();
usb_mouse_exit();
56,8 → 51,6
usb_kbd_exit();
hid_exit();
usb_exit();
 
usb_installed = FALSE;
 
return 0;
}
/shark/trunk/drivers/usb/core/hcd.c
1168,7 → 1168,6
struct device *sys = 0;
unsigned long flags;
struct completion_splice splice;
struct list_head *tmp; /* 2.6.1 */
int retval;
 
if (!urb)
1207,22 → 1206,10
*/
WARN_ON (!HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_HALT);
 
/* insist the urb is still queued */
list_for_each(tmp, &dev->urb_list) {
if (tmp == &urb->urb_list)
break;
}
if (tmp != &urb->urb_list) {
retval = -EINVAL;
goto done;
}
 
/* removed for 2.6.1
if (!urb->hcpriv) {
retval = -EINVAL;
goto done;
}
*/
 
/* Any status except -EINPROGRESS means something already started to
* unlink this URB from the hardware. So there's no more work to do.
/shark/trunk/drivers/usb/core/buffer.c
114,9 → 114,9
 
for (i = 0; i < HCD_BUFFER_POOLS; i++) {
if (size <= pool_max [i])
return pci_pool_alloc_usb (hcd->pool [i], mem_flags, dma);
return pci_pool_alloc (hcd->pool [i], mem_flags, dma);
}
return pci_alloc_consistent_usb (hcd->pdev, size, dma);
return pci_alloc_consistent (hcd->pdev, size, dma);
}
 
void hcd_buffer_free (
/shark/trunk/drivers/usb/core/hub.c
128,22 → 128,14
static void hub_irq(struct urb *urb, struct pt_regs *regs)
{
struct usb_hub *hub = (struct usb_hub *)urb->context;
//** unsigned long flags; 2.6.1
unsigned long flags;
int status;
 
spin_lock(&hub_event_lock);
hub->urb_active = 0;
if (hub->urb_complete) { /* disconnect or rmmod */
complete(hub->urb_complete);
goto done;
}
 
switch (urb->status) {
case -ENOENT: /* synchronous unlink */
case -ECONNRESET: /* async unlink */
case -ESHUTDOWN: /* hardware going away */
goto done;
//** return; 2.6.1
return;
default: /* presumably an error */
/* Cause a hub reset after 10 consecutive errors */
161,12 → 153,12
hub->nerrors = 0;
 
/* Something happened, let khubd figure it out */
//** spin_lock_irqsave(&hub_event_lock, flags); 2.6.1
spin_lock_irqsave(&hub_event_lock, flags);
if (list_empty(&hub->event_list)) {
list_add(&hub->event_list, &hub_event_list);
wake_up(&khubd_wait);
}
//** spin_unlock_irqrestore(&hub_event_lock, flags); 2.6.1
spin_unlock_irqrestore(&hub_event_lock, flags);
 
resubmit:
if ((status = usb_submit_urb (hub->urb, GFP_ATOMIC)) != 0
173,11 → 165,6
/* ENODEV means we raced disconnect() */
&& status != -ENODEV)
dev_err (&hub->intf->dev, "resubmit --> %d\n", urb->status);
if (status == 0)
hub->urb_active = 1;
done:
spin_unlock(&hub_event_lock);
}
 
/* USB 2.0 spec Section 11.24.2.3 */
482,7 → 469,6
message = "couldn't submit status urb";
goto fail;
}
hub->urb_active = 1;
/* Wake up khubd */
wake_up(&khubd_wait);
501,7 → 487,6
static void hub_disconnect(struct usb_interface *intf)
{
struct usb_hub *hub = usb_get_intfdata (intf);
DECLARE_COMPLETION(urb_complete);
unsigned long flags;
 
if (!hub)
509,11 → 494,12
 
usb_set_intfdata (intf, NULL);
spin_lock_irqsave(&hub_event_lock, flags);
hub->urb_complete = &urb_complete;
 
/* Delete it and then reset it */
list_del_init(&hub->event_list);
list_del_init(&hub->hub_list);
list_del(&hub->event_list);
INIT_LIST_HEAD(&hub->event_list);
list_del(&hub->hub_list);
INIT_LIST_HEAD(&hub->hub_list);
 
spin_unlock_irqrestore(&hub_event_lock, flags);
 
526,8 → 512,6
 
if (hub->urb) {
usb_unlink_urb(hub->urb);
if (hub->urb_active)
wait_for_completion(&urb_complete);
usb_free_urb(hub->urb);
hub->urb = NULL;
}
1168,6 → 1152,7
// if (current->flags & PF_FREEZE)
// refrigerator(PF_IOTHREAD);
} while (!signal_pending(current));
printk(KERN_DEBUG "File: %s @hub_thread_exit\n", __FILE__);
 
dbg("hub_thread exiting");
complete_and_exit(&khubd_exited, 0);
/shark/trunk/drivers/usb/core/hub.h
172,8 → 172,6
struct usb_hub {
struct usb_interface *intf; /* the "real" device */
struct urb *urb; /* for interrupt polling pipe */
struct completion *urb_complete; /* wait for urb to end */
unsigned int urb_active:1;
 
/* buffer for urb ... 1 bit each for hub and children, rounded up */
char (*buffer)[(USB_MAXCHILDREN + 1 + 7) / 8];
/shark/trunk/drivers/usb/core/message.c
26,6 → 26,7
 
static void usb_api_blocking_completion(struct urb *urb, struct pt_regs *regs)
{
//printk(KERN_INFO "api\n");
complete((struct completion *)urb->context);
}
 
49,7 → 50,9
struct completion done;
struct timer_list timer;
int status;
struct pt_regs *regs;
 
 
init_completion(&done);
urb->context = &done;
urb->transfer_flags |= URB_ASYNC_UNLINK;
315,6 → 318,15
int urb_flags;
int dma;
 
{
int i;
for (i=0; i<20; i++)
{
wait_ms26(300);
printk(KERN_INFO "usb_sg_init!!!!!!!\n");
}
}
 
if (!io || !dev || !sg
|| usb_pipecontrol (pipe)
|| usb_pipeisoc (pipe)
1103,8 → 1115,7
goto out;
 
dev->actconfig = cp;
//** if (!configuration) 2.6.1
if (!cp)
if (!configuration)
dev->state = USB_STATE_ADDRESS;
else {
dev->state = USB_STATE_CONFIGURED;
/shark/trunk/drivers/usb/core/usb.c
95,14 → 95,12
if (!driver->probe)
return error;
 
/* driver claim() doesn't yet affect dev->driver... */
if (intf->driver)
return error;
 
id = usb_match_id (intf, driver->id_table);
if (id) {
dev_dbg (dev, "%s - got id\n", __FUNCTION__);
down (&driver->serialize);
error = driver->probe (intf, id);
up (&driver->serialize);
}
if (!error)
intf->driver = driver;
113,21 → 111,21
int usb_unbind_interface(struct device *dev)
{
struct usb_interface *intf = to_usb_interface(dev);
struct usb_driver *driver = intf->driver;
struct usb_driver *driver = to_usb_driver(dev->driver);
 
down(&driver->serialize);
 
/* release all urbs for this interface */
usb_disable_interface(interface_to_usbdev(intf), intf);
 
if (driver && driver->disconnect)
driver->disconnect(intf);
if (intf->driver && intf->driver->disconnect)
intf->driver->disconnect(intf);
 
/* reset other interface state */
usb_set_interface(interface_to_usbdev(intf),
intf->altsetting[0].desc.bInterfaceNumber,
0);
usb_set_intfdata(intf, NULL);
intf->driver = NULL;
/* force a release and re-initialize the interface */
usb_driver_release_interface(driver, intf);
 
up(&driver->serialize);
 
return 0;
}
 
274,12 → 272,20
if (!iface || !driver)
return -EINVAL;
 
if (iface->driver)
/* this is mainly to lock against usbfs */
lock_kernel();
if (iface->driver) {
unlock_kernel();
err ("%s driver booted %s off interface %p",
driver->name, iface->driver->name, iface);
return -EBUSY;
} else {
dbg("%s driver claimed interface %p", driver->name, iface);
}
 
/* FIXME should device_bind_driver() */
iface->driver = driver;
usb_set_intfdata(iface, priv);
unlock_kernel();
return 0;
}
 
323,15 → 329,9
void usb_driver_release_interface(struct usb_driver *driver, struct usb_interface *iface)
{
/* this should never happen, don't release something that's not ours */
if (!iface || !iface->driver || iface->driver != driver)
if (iface->driver && iface->driver != driver)
return;
 
if (iface->dev.driver) {
/* FIXME should be the ONLY case here */
device_release_driver(&iface->dev);
return;
}
 
usb_set_interface(interface_to_usbdev(iface),
iface->altsetting[0].desc.bInterfaceNumber,
0);
582,7 → 582,7
* FIXME reduce hardwired intelligence here
*/
envp [i++] = scratch;
length += snprintf26 (scratch, buffer_size - length,
length += snprintf (scratch, buffer_size - length,
"DEVICE=/proc/bus/usb/%03d/%03d",
usb_dev->bus->busnum, usb_dev->devnum);
if ((buffer_size - length <= 0) || (i >= num_envp))
593,7 → 593,7
 
/* per-device configurations are common */
envp [i++] = scratch;
length += snprintf26 (scratch, buffer_size - length, "PRODUCT=%x/%x/%x",
length += snprintf (scratch, buffer_size - length, "PRODUCT=%x/%x/%x",
usb_dev->descriptor.idVendor,
usb_dev->descriptor.idProduct,
usb_dev->descriptor.bcdDevice);
604,7 → 604,7
 
/* class-based driver binding models */
envp [i++] = scratch;
length += snprintf26 (scratch, buffer_size - length, "TYPE=%d/%d/%d",
length += snprintf (scratch, buffer_size - length, "TYPE=%d/%d/%d",
usb_dev->descriptor.bDeviceClass,
usb_dev->descriptor.bDeviceSubClass,
usb_dev->descriptor.bDeviceProtocol);
621,7 → 621,7
* $DEVPATH/bInterfaceNumber if necessary.
*/
envp [i++] = scratch;
length += snprintf26 (scratch, buffer_size - length,
length += snprintf (scratch, buffer_size - length,
"INTERFACE=%d/%d/%d",
intf->altsetting[alt].desc.bInterfaceClass,
intf->altsetting[alt].desc.bInterfaceSubClass,
993,9 → 993,7
int err = -EINVAL;
int i;
int j;
int config;
 
 
/*
* Set the driver for the usb device to point to the "generic" driver.
* This prevents the main usb device from being sent to the usb bus
1111,35 → 1109,21
 
/* choose and set the configuration. that registers the interfaces
* with the driver core, and lets usb device drivers bind to them.
* NOTE: should interact with hub power budgeting.
*/
config = dev->config[0].desc.bConfigurationValue;
if (dev->descriptor.bNumConfigurations != 1) {
for (i = 0; i < dev->descriptor.bNumConfigurations; i++) {
/* heuristic: Linux is more likely to have class
* drivers, so avoid vendor-specific interfaces.
*/
if (dev->config[i].interface[0]->altsetting
->desc.bInterfaceClass
== USB_CLASS_VENDOR_SPEC)
continue;
config = dev->config[i].desc.bConfigurationValue;
break;
}
dev_info(&dev->dev,
"configuration #%d chosen from %d choices\n",
config,
dev->config[0].desc.bConfigurationValue,
dev->descriptor.bNumConfigurations);
}
err = usb_set_configuration(dev, config);
 
err = usb_set_configuration(dev,
dev->config[0].desc.bConfigurationValue);
if (err) {
dev_err(&dev->dev, "can't set config #%d, error %d\n",
config, err);
dev->config[0].desc.bConfigurationValue, err);
device_del(&dev->dev);
goto fail;
}
 
/* USB device state == configured ... usable */
 
/* add a /proc/bus/usb entry */
/shark/trunk/drivers/usb/host/ohci-mem.c
13,7 → 13,7
* There's basically three types of memory:
* - data used only by the HCD ... kmalloc is fine
* - async and periodic schedules, shared by HC and HCD ... these
* need to use pci_pool or pci_alloc_consistent_usb
* need to use pci_pool or pci_alloc_consistent
* - driver buffers, read/written by HC ... the hcd glue or the
* device driver provides us with dma addresses
*
96,7 → 96,7
dma_addr_t dma;
struct td *td;
 
td = pci_pool_alloc_usb (hc->td_cache, mem_flags, &dma);
td = pci_pool_alloc (hc->td_cache, mem_flags, &dma);
if (td) {
/* in case hc fetches it, make it look dead */
memset (td, 0, sizeof *td);
130,7 → 130,7
dma_addr_t dma;
struct ed *ed;
 
ed = pci_pool_alloc_usb (hc->ed_cache, mem_flags, &dma);
ed = pci_pool_alloc (hc->ed_cache, mem_flags, &dma);
if (ed) {
memset (ed, 0, sizeof (*ed));
INIT_LIST_HEAD (&ed->td_list);
/shark/trunk/drivers/usb/host/ehci-hcd.c
121,10 → 121,8
 
/* Initial IRQ latency: lower than default */
static int log2_irq_thresh = 0; // 0 to 6
 
/*module_param (log2_irq_thresh, int, S_IRUGO);
module_param (log2_irq_thresh, int, S_IRUGO);
MODULE_PARM_DESC (log2_irq_thresh, "log2 IRQ latency, 1-64 microframes");
*/
 
#define INTR_MASK (STS_IAA | STS_FATAL | STS_ERR | STS_INT)
 
485,7 → 483,7
* involved with the root hub.
*/
ehci->reboot_notifier.notifier_call = ehci_reboot;
// register_reboot_notifier (&ehci->reboot_notifier);
register_reboot_notifier (&ehci->reboot_notifier);
 
ehci->hcd.state = USB_STATE_RUNNING;
writel (FLAG_CF, &ehci->regs->configured_flag);
542,7 → 540,7
 
/* let companion controllers work when we aren't */
writel (0, &ehci->regs->configured_flag);
// unregister_reboot_notifier (&ehci->reboot_notifier);
unregister_reboot_notifier (&ehci->reboot_notifier);
 
remove_debug_files (ehci);
 
1013,7 → 1011,7
MODULE_AUTHOR (DRIVER_AUTHOR);
MODULE_LICENSE ("GPL");
 
/*static*/ int __init ehci_hcd_init (void)
static int __init init (void)
{
if (usb_disabled())
return -ENODEV;
1025,10 → 1023,10
 
return pci_module_init (&ehci_pci_driver);
}
//module_init (init);
module_init (init);
 
/*static*/ void __exit ehci_hcd_cleanup (void)
static void __exit cleanup (void)
{
pci_unregister_driver (&ehci_pci_driver);
}
//module_exit (cleanup);
module_exit (cleanup);
/shark/trunk/drivers/usb/host/ehci.h
134,7 → 134,7
t = EHCI_SHRINK_JIFFIES;
break;
}
t += jiffies26;
t += jiffies;
// all timings except IAA watchdog can be overridden.
// async queue SHRINK often precedes IAA. while it's ready
// to go OFF neither can matter, and afterwards the IO
/shark/trunk/drivers/usb/host/ohci-hcd.c
40,7 → 40,7
* 2001/03/24 td/ed hashing to remove bus_to_virt (Steve Longerbeam);
pci_map_single (db)
* 2001/03/21 td and dev/ed allocation uses new pci_pool API (db)
* 2001/03/07 hcca allocation uses pci_alloc_consistent_usb (Steve Longerbeam)
* 2001/03/07 hcca allocation uses pci_alloc_consistent (Steve Longerbeam)
*
* 2000/09/26 fixed races in removing the private portion of the urb
* 2000/09/07 disable bulk and control lists when unlinking the last
/shark/trunk/drivers/usb/host/ehci-mem.c
24,7 → 24,7
* There's basically three types of memory:
* - data used only by the HCD ... kmalloc is fine
* - async and periodic schedules, shared by HC and HCD ... these
* need to use pci_pool or pci_alloc_consistent_usb
* need to use pci_pool or pci_alloc_consistent
* - driver buffers, read/written by HC ... single shot DMA mapped
*
* There's also PCI "register" data, which is memory mapped.
74,7 → 74,7
struct ehci_qtd *qtd;
dma_addr_t dma;
 
qtd = pci_pool_alloc_usb (ehci->qtd_pool, flags, &dma);
qtd = pci_pool_alloc (ehci->qtd_pool, flags, &dma);
if (qtd != 0) {
ehci_qtd_init (qtd, dma);
}
93,7 → 93,7
dma_addr_t dma;
 
qh = (struct ehci_qh *)
pci_pool_alloc_usb (ehci->qh_pool, flags, &dma);
pci_pool_alloc (ehci->qh_pool, flags, &dma);
if (!qh)
return qh;
 
224,7 → 224,7
 
/* Hardware periodic table */
ehci->periodic = (u32 *)
pci_alloc_consistent_usb (ehci->hcd.pdev,
pci_alloc_consistent (ehci->hcd.pdev,
ehci->periodic_size * sizeof (u32),
&ehci->periodic_dma);
if (ehci->periodic == 0) {
/shark/trunk/drivers/usb/host/uhci-hcd.c
145,7 → 145,7
dma_addr_t dma_handle;
struct uhci_td *td;
 
td = pci_pool_alloc_usb(uhci->td_pool, GFP_ATOMIC, &dma_handle);
td = pci_pool_alloc(uhci->td_pool, GFP_ATOMIC, &dma_handle);
if (!td)
return NULL;
 
305,7 → 305,7
dma_addr_t dma_handle;
struct uhci_qh *qh;
 
qh = pci_pool_alloc_usb(uhci->qh_pool, GFP_ATOMIC, &dma_handle);
qh = pci_pool_alloc(uhci->qh_pool, GFP_ATOMIC, &dma_handle);
if (!qh)
return NULL;
 
2208,11 → 2208,6
 
uhci->io_addr = (unsigned long) hcd->regs;
 
/* Turn off all interrupts 2.6.1 */
outw(0, uhci->io_addr + USBINTR);
 
 
 
/* Maybe kick BIOS off this hardware. Then reset, so we won't get
* interrupts from any previous setup.
*/
2285,7 → 2280,7
 
spin_lock_init(&uhci->frame_list_lock);
 
uhci->fl = pci_alloc_consistent_usb(hcd->pdev, sizeof(*uhci->fl), &dma_handle);
uhci->fl = pci_alloc_consistent(hcd->pdev, sizeof(*uhci->fl), &dma_handle);
if (!uhci->fl) {
err("unable to allocate consistent memory for frame list");
goto err_alloc_fl;
/shark/trunk/drivers/usb/host/ohci-pci.c
46,7 → 46,7
int ret;
 
if (hcd->pdev) {
ohci->hcca = pci_alloc_consistent_usb (hcd->pdev,
ohci->hcca = pci_alloc_consistent (hcd->pdev,
sizeof *ohci->hcca, &ohci->hcca_dma);
 
if (!ohci->hcca)
/shark/trunk/drivers/usb/host/ehci-sched.c
626,7 → 626,7
for (frame_index = 0, first_itd = 0;
frame_index < urb->number_of_packets;
frame_index++) {
itd = pci_pool_alloc_usb (ehci->itd_pool, mem_flags, &itd_dma);
itd = pci_pool_alloc (ehci->itd_pool, mem_flags, &itd_dma);
if (!itd) {
status = -ENOMEM;
goto fail;