struct kref kref;
struct list_head u132_list;
struct mutex sw_lock;
- struct semaphore scheduler_lock;
+ struct mutex scheduler_lock;
struct u132_platform_data *board;
struct platform_device *platform_dev;
struct u132_ring ring[MAX_U132_RINGS];
spin_unlock_irqrestore(&endp->queue_lock.slock, irqs);
kfree(urbq);
}
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
ring = endp->ring;
ring->in_use = 0;
u132_ring_cancel_work(u132, ring);
u132_ring_queue_work(u132, ring, 0);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_endp_put_kref(u132, endp);
usb_hcd_giveback_urb(hcd, urb, status);
return;
struct u132 *u132 = endp->u132;
u8 address = u132->addr[endp->usb_addr].address;
struct u132_udev *udev = &u132->udev[address];
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
1 & toggle_bits);
if (urb->actual_length > 0) {
int retval;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = edset_single(u132, ring, endp, urb,
address, endp->toggle_bits,
u132_hcd_interrupt_recv);
msecs_to_jiffies(urb->interval);
u132_ring_cancel_work(u132, ring);
u132_ring_queue_work(u132, ring, 0);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_endp_put_kref(u132, endp);
}
return;
endp->toggle_bits = toggle_bits;
usb_settoggle(udev->usb_device, endp->usb_endp, 0,
1 & toggle_bits);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
} else {
"g back INTERRUPT %s\n", urb,
cc_to_text[condition_code]);
}
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb,
cc_to_error[condition_code]);
return;
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
struct u132_endp *endp = data;
struct u132 *u132 = endp->u132;
u8 address = u132->addr[endp->usb_addr].address;
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
endp->toggle_bits = toggle_bits;
if (urb->transfer_buffer_length > urb->actual_length) {
int retval;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = edset_output(u132, ring, endp, urb, address,
endp->toggle_bits, u132_hcd_bulk_output_sent);
if (retval != 0)
u132_hcd_giveback_urb(u132, endp, urb, retval);
return;
} else {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
struct u132 *u132 = endp->u132;
u8 address = u132->addr[endp->usb_addr].address;
struct u132_udev *udev = &u132->udev[address];
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
endp->toggle_bits = toggle_bits;
usb_settoggle(udev->usb_device, endp->usb_endp, 0,
1 & toggle_bits);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = usb_ftdi_elan_edset_input(u132->platform_dev,
ring->number, endp, urb, address,
endp->usb_endp, endp->toggle_bits,
endp->toggle_bits = toggle_bits;
usb_settoggle(udev->usb_device, endp->usb_endp, 0,
1 & toggle_bits);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb,
cc_to_error[condition_code]);
return;
endp->toggle_bits = toggle_bits;
usb_settoggle(udev->usb_device, endp->usb_endp, 0,
1 & toggle_bits);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
} else if (condition_code == TD_DATAUNDERRUN) {
dev_warn(&u132->platform_dev->dev, "urb=%p(SHORT NOT OK"
") giving back BULK IN %s\n", urb,
cc_to_text[condition_code]);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
} else if (condition_code == TD_CC_STALL) {
endp->toggle_bits = 0x2;
usb_settoggle(udev->usb_device, endp->usb_endp, 0, 0);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb,
cc_to_error[condition_code]);
return;
dev_err(&u132->platform_dev->dev, "urb=%p giving back B"
"ULK IN code=%d %s\n", urb, condition_code,
cc_to_text[condition_code]);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb,
cc_to_error[condition_code]);
return;
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
{
struct u132_endp *endp = data;
struct u132 *u132 = endp->u132;
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
struct u132_endp *endp = data;
struct u132 *u132 = endp->u132;
u8 address = u132->addr[endp->usb_addr].address;
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
TD_DATAUNDERRUN) && ((urb->transfer_flags &
URB_SHORT_NOT_OK) == 0))) {
int retval;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = usb_ftdi_elan_edset_empty(u132->platform_dev,
ring->number, endp, urb, address,
endp->usb_endp, 0x3,
u132_hcd_giveback_urb(u132, endp, urb, retval);
return;
} else if (condition_code == TD_CC_STALL) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
dev_warn(&u132->platform_dev->dev, "giving back SETUP I"
"NPUT STALL urb %p\n", urb);
u132_hcd_giveback_urb(u132, endp, urb,
cc_to_error[condition_code]);
return;
} else {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
dev_err(&u132->platform_dev->dev, "giving back SETUP IN"
"PUT %s urb %p\n", cc_to_text[condition_code],
urb);
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
{
struct u132_endp *endp = data;
struct u132 *u132 = endp->u132;
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
struct u132_endp *endp = data;
struct u132 *u132 = endp->u132;
u8 address = u132->addr[endp->usb_addr].address;
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
if (usb_pipein(urb->pipe)) {
int retval;
struct u132_ring *ring = endp->ring;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = usb_ftdi_elan_edset_input(u132->platform_dev,
ring->number, endp, urb, address,
endp->usb_endp, 0,
} else {
int retval;
struct u132_ring *ring = endp->ring;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = usb_ftdi_elan_edset_input(u132->platform_dev,
ring->number, endp, urb, address,
endp->usb_endp, 0,
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
struct u132 *u132 = endp->u132;
u8 address = u132->addr[endp->usb_addr].address;
struct u132_udev *udev = &u132->udev[address];
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
u132->addr[0].address = 0;
endp->usb_addr = udev->usb_addr;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
{
struct u132_endp *endp = data;
struct u132 *u132 = endp->u132;
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
int retval;
struct u132_ring *ring = endp->ring;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = usb_ftdi_elan_edset_input(u132->platform_dev,
ring->number, endp, urb, 0, endp->usb_endp, 0,
u132_hcd_enumeration_empty_recv);
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
{
struct u132_endp *endp = data;
struct u132 *u132 = endp->u132;
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
struct u132_endp *endp = data;
struct u132 *u132 = endp->u132;
u8 address = u132->addr[endp->usb_addr].address;
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
*u++ = *b++;
urb->actual_length = len;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = usb_ftdi_elan_edset_empty(u132->platform_dev,
ring->number, endp, urb, address, endp->usb_endp, 0x3,
u132_hcd_initial_empty_sent);
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
struct u132_endp *endp = data;
struct u132 *u132 = endp->u132;
u8 address = u132->addr[endp->usb_addr].address;
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (u132->going > 1) {
dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
, u132->going);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_forget_urb(u132, endp, urb, -ENODEV);
return;
} else if (endp->dequeueing) {
endp->dequeueing = 0;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -EINTR);
return;
} else if (u132->going > 0) {
dev_err(&u132->platform_dev->dev, "device is being removed "
"urb=%p\n", urb);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, -ENODEV);
return;
} else if (!urb->unlinked) {
int retval;
struct u132_ring *ring = endp->ring;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = usb_ftdi_elan_edset_input(u132->platform_dev,
ring->number, endp, urb, address, endp->usb_endp, 0,
u132_hcd_initial_input_recv);
} else {
dev_err(&u132->platform_dev->dev, "CALLBACK called urb=%p "
"unlinked=%d\n", urb, urb->unlinked);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_hcd_giveback_urb(u132, endp, urb, 0);
return;
}
struct u132_ring *ring =
container_of(work, struct u132_ring, scheduler.work);
struct u132 *u132 = ring->u132;
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
if (ring->in_use) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_ring_put_kref(u132, ring);
return;
} else if (ring->curr_endp) {
ring->curr_endp = endp;
u132_endp_cancel_work(u132, last_endp);
u132_endp_queue_work(u132, last_endp, 0);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_ring_put_kref(u132, ring);
return;
} else {
last_endp->jiffies)) {
u132_endp_cancel_work(u132, last_endp);
u132_endp_queue_work(u132, last_endp, 0);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_ring_put_kref(u132, ring);
return;
} else {
}
if (wakeup > 0) {
u132_ring_requeue_work(u132, ring, wakeup);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
return;
} else {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_ring_put_kref(u132, ring);
return;
}
} else {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_ring_put_kref(u132, ring);
return;
}
struct u132_endp *endp =
container_of(work, struct u132_endp, scheduler.work);
struct u132 *u132 = endp->u132;
- down(&u132->scheduler_lock);
+ mutex_lock(&u132->scheduler_lock);
ring = endp->ring;
if (endp->edset_flush) {
endp->edset_flush = 0;
if (endp->dequeueing)
usb_ftdi_elan_edset_flush(u132->platform_dev,
ring->number, endp);
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_endp_put_kref(u132, endp);
return;
} else if (endp->active) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_endp_put_kref(u132, endp);
return;
} else if (ring->in_use) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_endp_put_kref(u132, endp);
return;
} else if (endp->queue_next == endp->queue_last) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_endp_put_kref(u132, endp);
return;
} else if (endp->pipetype == PIPE_INTERRUPT) {
u8 address = u132->addr[endp->usb_addr].address;
if (ring->in_use) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_endp_put_kref(u132, endp);
return;
} else {
endp->active = 1;
ring->curr_endp = endp;
ring->in_use = 1;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = edset_single(u132, ring, endp, urb, address,
endp->toggle_bits, u132_hcd_interrupt_recv);
if (retval != 0)
} else if (endp->pipetype == PIPE_CONTROL) {
u8 address = u132->addr[endp->usb_addr].address;
if (ring->in_use) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_endp_put_kref(u132, endp);
return;
} else if (address == 0) {
endp->active = 1;
ring->curr_endp = endp;
ring->in_use = 1;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = edset_setup(u132, ring, endp, urb, address,
0x2, u132_hcd_initial_setup_sent);
if (retval != 0)
endp->active = 1;
ring->curr_endp = endp;
ring->in_use = 1;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = edset_setup(u132, ring, endp, urb, 0, 0x2,
u132_hcd_enumeration_address_sent);
if (retval != 0)
endp->active = 1;
ring->curr_endp = endp;
ring->in_use = 1;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = edset_setup(u132, ring, endp, urb, address,
0x2, u132_hcd_configure_setup_sent);
if (retval != 0)
if (endp->input) {
u8 address = u132->addr[endp->usb_addr].address;
if (ring->in_use) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_endp_put_kref(u132, endp);
return;
} else {
endp->active = 1;
ring->curr_endp = endp;
ring->in_use = 1;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = edset_input(u132, ring, endp, urb,
address, endp->toggle_bits,
u132_hcd_bulk_input_recv);
} else { /* output pipe */
u8 address = u132->addr[endp->usb_addr].address;
if (ring->in_use) {
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
u132_endp_put_kref(u132, endp);
return;
} else {
endp->active = 1;
ring->curr_endp = endp;
ring->in_use = 1;
- up(&u132->scheduler_lock);
+ mutex_unlock(&u132->scheduler_lock);
retval = edset_output(u132, ring, endp, urb,
address, endp->toggle_bits,
u132_hcd_bulk_output_sent);
u132->power = 0;
u132->reset = 0;
mutex_init(&u132->sw_lock);
- init_MUTEX(&u132->scheduler_lock);
+ mutex_init(&u132->scheduler_lock);
while (rings-- > 0) {
struct u132_ring *ring = &u132->ring[rings];
ring->u132 = u132;