Am Sonntag, 10. Juni 2007 schrieb Alfred E. Heggestad: > From: Alfred E. Heggestad <[EMAIL PROTECTED]> > > This driver adds support for USB VoIP phones using the CM109 chipset, > such as the KIP-1000. Keypad is scanned and events are reported to > the input subsystem. The buzzer can be activated by sending SND_TONE > or SND_BELL to the input device. > The driver has been tested with linux 2.6.21.3 on i386 and AMD64, > and linux 2.6.21.1 on Broadcom BCM3302 (MIPS, OpenWRT Project) > More testing and code review is welcome.. > > Signed-off-by: Alfred E. Heggestad <[EMAIL PROTECTED]> > > --- >
+ ret = usb_submit_urb(dev->urb_ctl, GFP_KERNEL); Must be GFP_ATOMIC + if (ret) + err("%s - usb_submit_urb failed %d", __FUNCTION__, ret); +} + +static void urb_ctl_callback(struct urb *urb) +{ + struct cm109_dev *dev = urb->context; + int ret = 0; + +#ifdef CM109_DEBUG + dbg("### URB CTL: [0x%02x 0x%02x 0x%02x 0x%02x]", + dev->ctl_data->byte[0], + dev->ctl_data->byte[1], + dev->ctl_data->byte[2], + dev->ctl_data->byte[3]); +#endif + + if (urb->status) + err("%s - urb status %d", __FUNCTION__, urb->status); + + spin_lock(&dev->submit_lock); + /* ask for a response */ + if (!dev->disconnecting) + ret = usb_submit_urb(dev->urb_irq, GFP_KERNEL); Must be GFP_ATOMIC +static void buzz(struct cm109_dev *dev, int on) +{ + int ret; + + if (dev == NULL) { + err("buzz: dev is NULL\n"); + return; + } + + dbg("Buzzer %s", on ? "on" : "off"); + if (on) + dev->ctl_data->byte[HID_OR0] |= BUZZER_ON; + else + dev->ctl_data->byte[HID_OR0] &= ~BUZZER_ON; + + ret = usb_submit_urb(dev->urb_ctl, GFP_KERNEL); Must be GFP_ATOMIC Regards Oliver ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel