usbnet = usb_get_intfdata(iface);
if (!usbnet || !usbnet->net) {
- DBG("failed to get netdevice\n");
+ ERR("failed to get netdevice\n");
return -ENXIO;
}
dev = (struct qcusbnet *)usbnet->data[0];
if (!dev) {
- DBG("failed to get QMIDevice\n");
+ ERR("failed to get QMIDevice\n");
return -ENXIO;
}
usbnet = usb_get_intfdata(iface);
if (!usbnet || !usbnet->net) {
- DBG("failed to get netdevice\n");
+ ERR("failed to get netdevice\n");
return -ENXIO;
}
dev = (struct qcusbnet *)usbnet->data[0];
if (!dev) {
- DBG("failed to get QMIDevice\n");
+ ERR("failed to get QMIDevice\n");
return -ENXIO;
}
ret = usbnet_resume(iface);
if (ret) {
- DBG("usbnet_resume error %d\n", ret);
+ ERR("usbnet_resume error %d\n", ret);
return ret;
}
ret = qc_startread(dev);
if (ret) {
- DBG("qc_startread error %d\n", ret);
+ ERR("qc_startread error %d\n", ret);
return ret;
}
struct usb_host_endpoint *out = NULL;
if (iface->num_altsetting != 1) {
- DBG("invalid num_altsetting %u\n", iface->num_altsetting);
+ ERR("invalid num_altsetting %u\n", iface->num_altsetting);
return -EINVAL;
}
for (i = 0; i < numends; i++) {
endpoint = iface->cur_altsetting->endpoint + i;
if (!endpoint) {
- DBG("invalid endpoint %u\n", i);
+ ERR("invalid endpoint %u\n", i);
return -EINVAL;
}
}
if (!in || !out) {
- DBG("invalid endpoints\n");
+ ERR("invalid bulk endpoints\n");
return -EINVAL;
}
if (usb_set_interface(usbnet->udev,
iface->cur_altsetting->desc.bInterfaceNumber, 0)) {
- DBG("unable to set interface\n");
+ ERR("unable to set interface\n");
return -EINVAL;
}
unsigned long flags;
struct worker *worker = urb->context;
if (!worker) {
- DBG("bad context\n");
+ ERR("bad context\n");
return;
}
if (urb->status)
- DBG("urb finished with error %d\n", urb->status);
+ ERR("urb finished with error %d\n", urb->status);
spin_lock_irqsave(&worker->active_lock, flags);
worker->active = ERR_PTR(-EAGAIN);
struct usbnet *usbnet = netdev_priv(netdev);
if (!usbnet || !usbnet->net) {
- DBG("failed to get usbnet device\n");
+ ERR("failed to get usbnet device\n");
return;
}
dev = (struct qcusbnet *)usbnet->data[0];
if (!dev) {
- DBG("failed to get QMIDevice\n");
+ ERR("failed to get QMIDevice\n");
return;
}
worker = &dev->worker;
struct usb_device *usbdev;
struct worker *worker = arg;
if (!worker) {
- DBG("passed null pointer\n");
+ ERR("passed null pointer\n");
return -EINVAL;
}
status = usb_autopm_get_interface(worker->iface);
if (status < 0) {
- DBG("unable to autoresume interface: %d\n", status);
+ ERR("unable to autoresume interface: %d\n", status);
if (status == -EPERM)
qc_suspend(worker->iface, PMSG_SUSPEND);
status = usb_submit_urb(worker->active, GFP_KERNEL);
if (status < 0) {
- DBG("Failed to submit URB: %d. Packet dropped\n", status);
+ ERR("Failed to submit URB: %d. Packet dropped\n", status);
spin_lock_irqsave(&worker->active_lock, activeflags);
usb_free_urb(worker->active);
worker->active = NULL;
DBG("\n");
if (!usbnet || !usbnet->net) {
- DBG("failed to get usbnet device\n");
+ ERR("failed to get usbnet device\n");
return NETDEV_TX_BUSY;
}
dev = (struct qcusbnet *)usbnet->data[0];
if (!dev) {
- DBG("failed to get QMIDevice\n");
+ ERR("failed to get QMIDevice\n");
return NETDEV_TX_BUSY;
}
worker = &dev->worker;
if (qc_isdown(dev, DOWN_DRIVER_SUSPENDED)) {
- DBG("device is suspended\n");
+ ERR("device is suspended\n");
dump_stack();
return NETDEV_TX_BUSY;
}
req = kmalloc(sizeof(*req), GFP_ATOMIC);
if (!req) {
- DBG("unable to allocate URBList memory\n");
+ ERR("unable to allocate URBList memory\n");
return NETDEV_TX_BUSY;
}
if (!req->urb) {
kfree(req);
- DBG("unable to allocate URB\n");
+ ERR("unable to allocate URB\n");
return NETDEV_TX_BUSY;
}
if (!data) {
usb_free_urb(req->urb);
kfree(req);
- DBG("unable to allocate URB data\n");
+ ERR("unable to allocate URB data\n");
return NETDEV_TX_BUSY;
}
memcpy(data, skb->data, skb->len);
struct usbnet *usbnet = netdev_priv(netdev);
if (!usbnet) {
- DBG("failed to get usbnet device\n");
+ ERR("failed to get usbnet device\n");
return -ENXIO;
}
dev = (struct qcusbnet *)usbnet->data[0];
if (!dev) {
- DBG("failed to get QMIDevice\n");
+ ERR("failed to get QMIDevice\n");
return -ENXIO;
}
dev->worker.thread = kthread_run(qcnet_worker, &dev->worker, "qcnet_worker");
if (IS_ERR(dev->worker.thread)) {
- DBG("AutoPM thread creation error\n");
+ ERR("AutoPM thread creation error\n");
return PTR_ERR(dev->worker.thread);
}
if (status == 0)
usb_autopm_put_interface(dev->iface);
} else {
- DBG("no USBNetOpen defined\n");
+ ERR("no USBNetOpen defined\n");
}
return status;
struct usbnet *usbnet = netdev_priv(netdev);
if (!usbnet || !usbnet->net) {
- DBG("failed to get netdevice\n");
+ ERR("failed to get netdevice\n");
return -ENXIO;
}
dev = (struct qcusbnet *)usbnet->data[0];
if (!dev) {
- DBG("failed to get QMIDevice\n");
+ ERR("failed to get QMIDevice\n");
return -ENXIO;
}
status = usbnet_probe(iface, vidpids);
if (status < 0) {
- DBG("usbnet_probe failed %d\n", status);
+ ERR("usbnet_probe failed %d\n", status);
return status;
}
usbnet = usb_get_intfdata(iface);
if (!usbnet || !usbnet->net) {
- DBG("failed to get netdevice\n");
+ ERR("failed to get netdevice\n");
return -ENXIO;
}
dev = kmalloc(sizeof(struct qcusbnet), GFP_KERNEL);
if (!dev) {
- DBG("failed to allocate device buffers\n");
+ ERR("failed to allocate device buffers\n");
return -ENOMEM;
}
netdevops = kmalloc(sizeof(struct net_device_ops), GFP_KERNEL);
if (!netdevops) {
- DBG("failed to allocate net device ops\n");
+ ERR("failed to allocate net device ops\n");
return -ENOMEM;
}
memcpy(netdevops, usbnet->net->netdev_ops, sizeof(struct net_device_ops));
{
devclass = class_create(THIS_MODULE, "QCQMI");
if (IS_ERR(devclass)) {
- DBG("error at class_create %ld\n", PTR_ERR(devclass));
+ ERR("error at class_create %ld\n", PTR_ERR(devclass));
return -ENOMEM;
}
printk(KERN_INFO "%s: %s\n", DRIVER_DESC, DRIVER_VERSION);
u16 tid;
if (!urb) {
- DBG("bad read URB\n");
+ ERR("bad read URB\n");
return;
}
dev = urb->context;
if (!device_valid(dev)) {
- DBG("Invalid device!\n");
+ ERR("Invalid device!\n");
return;
}
result = qmux_parse(&cid, data, size);
if (result < 0) {
- DBG("Read error parsing QMUX %d\n", result);
+ ERR("Read error parsing QMUX %d\n", result);
return;
}
client = list_entry(node, struct client, node);
if (client->cid == cid || (client->cid | 0xff00) == cid) {
copy = kmalloc(size, GFP_ATOMIC);
+ if (!copy) {
+ ERR("malloc failed\n");
+ spin_unlock_irqrestore(&dev->qmi.clients_lock, flags);
+ return;
+ }
memcpy(copy, data, size);
if (!client_addread(dev, client->cid, tid, copy, size)) {
- DBG("Error allocating pReadMemListEntry "
+ ERR("Error allocating pReadMemListEntry "
"read will be discarded\n");
kfree(copy);
spin_unlock_irqrestore(&dev->qmi.clients_lock, flags);
struct qcusbnet *dev = (struct qcusbnet *)urb->context;
if (!device_valid(dev)) {
- DBG("Invalid device!\n");
+ ERR("Invalid device!\n");
return;
}
read_callback, dev);
status = usb_submit_urb(dev->qmi.readurb, GFP_ATOMIC);
if (status) {
- DBG("Error submitting Read URB %d\n", status);
+ ERR("Error submitting Read URB %d\n", status);
return;
}
} else if ((urb->actual_length == 16) &&
urb->context, interval);
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status)
- DBG("Error re-submitting Int URB %d\n", status);
+ ERR("Error re-submitting Int URB %d\n", status);
return;
}
struct usb_host_endpoint *endpoint = NULL;
if (!device_valid(dev)) {
- DBG("Invalid device!\n");
+ ERR("Invalid device!\n");
return -ENXIO;
}
dev->qmi.readurb = usb_alloc_urb(0, GFP_KERNEL);
if (!dev->qmi.readurb) {
- DBG("Error allocating read urb\n");
+ ERR("Error allocating read urb\n");
return -ENOMEM;
}
dev->qmi.inturb = usb_alloc_urb(0, GFP_KERNEL);
if (!dev->qmi.inturb) {
usb_free_urb(dev->qmi.readurb);
- DBG("Error allocating int urb\n");
+ ERR("Error allocating int urb\n");
return -ENOMEM;
}
if (!dev->qmi.readbuf) {
usb_free_urb(dev->qmi.readurb);
usb_free_urb(dev->qmi.inturb);
- DBG("Error allocating read buffer\n");
+ ERR("Error allocating read buffer\n");
return -ENOMEM;
}
usb_free_urb(dev->qmi.readurb);
usb_free_urb(dev->qmi.inturb);
kfree(dev->qmi.readbuf);
- DBG("Error allocating int buffer\n");
+ ERR("Error allocating int buffer\n");
return -ENOMEM;
}
usb_free_urb(dev->qmi.inturb);
kfree(dev->qmi.readbuf);
kfree(dev->qmi.intbuf);
- DBG("Error allocating setup packet buffer\n");
+ ERR("Error allocating setup packet buffer\n");
return -ENOMEM;
}
for (i = 0; i < numends; i++) {
endpoint = dev->iface->cur_altsetting->endpoint + i;
if (!endpoint) {
- DBG("invalid endpoint %u\n", i);
+ ERR("invalid endpoint %u\n", i);
return -EINVAL;
}
unsigned long flags;
if (!device_valid(dev)) {
- DBG("Invalid device!\n");
+ ERR("Invalid device!\n");
return -ENXIO;
}
client = client_bycid(dev, cid);
if (!client) {
- DBG("Could not find matching client ID 0x%04X\n", cid);
+ ERR("Could not find matching client ID 0x%04X\n", cid);
spin_unlock_irqrestore(&dev->qmi.clients_lock, flags);
return -ENXIO;
}
}
if (!client_addnotify(dev, cid, tid, hook, data))
- DBG("Unable to register for notification\n");
+ ERR("Unable to register for notification\n");
spin_unlock_irqrestore(&dev->qmi.clients_lock, flags);
return 0;
u16 size;
if (!device_valid(dev)) {
- DBG("Invalid device!\n");
+ ERR("Invalid device!\n");
return -ENXIO;
}
client = client_bycid(dev, cid);
if (!client) {
- DBG("Could not find matching client ID 0x%04X\n", cid);
+ ERR("Could not find matching client ID 0x%04X\n", cid);
spin_unlock_irqrestore(&dev->qmi.clients_lock, flags);
return -ENXIO;
}
while (!client_delread(dev, cid, tid, &data, &size)) {
sema_init(&sem, 0);
if (!client_addnotify(dev, cid, tid, upsem, &sem)) {
- DBG("unable to register for notification\n");
+ ERR("unable to register for notification\n");
spin_unlock_irqrestore(&dev->qmi.clients_lock, flags);
return -EFAULT;
}
}
if (!device_valid(dev)) {
- DBG("Invalid device!\n");
+ ERR("Invalid device!\n");
return -ENXIO;
}
static void write_callback(struct urb *urb)
{
if (!urb) {
- DBG("null urb\n");
+ ERR("null urb\n");
return;
}
unsigned long flags;
if (!device_valid(dev)) {
- DBG("Invalid device!\n");
+ ERR("Invalid device!\n");
return -ENXIO;
}
urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) {
- DBG("URB mem error\n");
+ ERR("URB mem error\n");
return -ENOMEM;
}
result = usb_autopm_get_interface(dev->iface);
if (result < 0) {
- DBG("unable to resume interface: %d\n", result);
+ ERR("unable to resume interface: %d\n", result);
if (result == -EPERM)
qc_suspend(dev->iface, PMSG_SUSPEND);
result = usb_submit_urb(urb, GFP_KERNEL);
if (result < 0) {
- DBG("submit URB error %d\n", result);
+ ERR("submit URB error %d\n", result);
if (client_delurb(dev, cid) != urb)
- DBG("Didn't get write URB back\n");
+ ERR("Didn't get write URB back\n");
usb_free_urb(urb);
spin_unlock_irqrestore(&dev->qmi.clients_lock, flags);
result = down_interruptible(&sem);
if (!device_valid(dev)) {
- DBG("Invalid device!\n");
+ ERR("Invalid device!\n");
return -ENXIO;
}
usb_autopm_put_interface(dev->iface);
spin_lock_irqsave(&dev->qmi.clients_lock, flags);
if (client_delurb(dev, cid) != urb) {
- DBG("Didn't get write URB back\n");
+ ERR("Didn't get write URB back\n");
spin_unlock_irqrestore(&dev->qmi.clients_lock, flags);
return -EINVAL;
}
if (!urb->status) {
result = size;
} else {
- DBG("bad status = %d\n", urb->status);
+ ERR("bad status = %d\n", urb->status);
result = urb->status;
}
} else {
- DBG("Interrupted %d !!!\n", result);
- DBG("Device may be in bad state and need reset !!!\n");
+ ERR("Interrupted %d !!!\n", result);
+ ERR("Device may be in bad state and need reset !!!\n");
usb_kill_urb(urb);
}
u8 tid;
if (!device_valid(dev)) {
- DBG("Invalid device!\n");
+ ERR("Invalid device!\n");
return -ENXIO;
}
result = read_sync(dev, &rbuf, QMICTL, tid);
if (result < 0) {
- DBG("bad read data %d\n", result);
+ ERR("bad read data %d\n", result);
return result;
}
rbufsize = result;
client = kmalloc(sizeof(*client), GFP_ATOMIC);
if (!client) {
- DBG("Error allocating read list\n");
+ ERR("Error allocating read list\n");
spin_unlock_irqrestore(&dev->qmi.clients_lock, flags);
return -ENOMEM;
}
u8 tid;
if (!device_valid(dev)) {
- DBG("invalid device\n");
+ ERR("invalid device\n");
return;
}
tid = atomic_add_return(1, &dev->qmi.qmitid);
wbuf = qmictl_new_releasecid(tid, cid, &wbufsize);
if (!wbuf) {
- DBG("memory error\n");
+ ERR("memory error\n");
} else {
result = write_sync(dev, wbuf, wbufsize, QMICTL);
kfree(wbuf);
if (result < 0) {
- DBG("bad write status %d\n", result);
+ ERR("bad write status %d\n", result);
} else {
result = read_sync(dev, &rbuf, QMICTL, tid);
if (result < 0) {
- DBG("bad read status %d\n", result);
+ ERR("bad read status %d\n", result);
} else {
rbufsize = result;
result = qmictl_freecid_resp(rbuf, rbufsize);
kfree(rbuf);
if (result < 0)
- DBG("error %d parsing response\n", result);
+ ERR("error %d parsing response\n", result);
}
}
}
struct client *client;
if (!device_valid(dev)) {
- DBG("Invalid device\n");
+ ERR("Invalid device\n");
return NULL;
}
client = client_bycid(dev, cid);
if (!client) {
- DBG("Could not find this client's memory 0x%04X\n", cid);
+ ERR("Could not find this client's memory 0x%04X\n", cid);
return false;
}
req = kmalloc(sizeof(*req), GFP_ATOMIC);
if (!req) {
- DBG("Mem error\n");
+ ERR("Mem error\n");
return false;
}
client = client_bycid(dev, cid);
if (!client) {
- DBG("Could not find this client's memory 0x%04X\n", cid);
+ ERR("Could not find this client's memory 0x%04X\n", cid);
return false;
}
client = client_bycid(dev, cid);
if (!client) {
- DBG("Could not find this client's memory 0x%04X\n", cid);
+ ERR("Could not find this client's memory 0x%04X\n", cid);
return false;
}
req = kmalloc(sizeof(*req), GFP_ATOMIC);
if (!req) {
- DBG("Mem error\n");
+ ERR("Mem error\n");
return false;
}
client = client_bycid(dev, cid);
if (!client) {
- DBG("Could not find this client's memory 0x%04X\n", cid);
+ ERR("Could not find this client's memory 0x%04X\n", cid);
return false;
}
client = client_bycid(dev, cid);
if (!client) {
- DBG("Could not find this client's memory 0x%04X\n", cid);
+ ERR("Could not find this client's memory 0x%04X\n", cid);
return false;
}
req = kmalloc(sizeof(*req), GFP_ATOMIC);
if (!req) {
- DBG("Mem error\n");
+ ERR("Mem error\n");
return false;
}
client = client_bycid(dev, cid);
if (!client) {
- DBG("Could not find this client's memory 0x%04X\n", cid);
+ ERR("Could not find this client's memory 0x%04X\n", cid);
return NULL;
}
struct qcusbnet *dev = container_of(qmidev, struct qcusbnet, qmi);
if (!device_valid(dev)) {
- DBG("Invalid device\n");
+ ERR("Invalid device\n");
return -ENXIO;
}
file->private_data = kmalloc(sizeof(struct qmihandle), GFP_KERNEL);
if (!file->private_data) {
- DBG("Mem error\n");
+ ERR("Mem error\n");
return -ENOMEM;
}
struct qmihandle *handle = (struct qmihandle *)file->private_data;
if (!handle) {
- DBG("Bad file data\n");
+ ERR("Bad file data\n");
return -EBADF;
}
if (!device_valid(handle->dev)) {
- DBG("Invalid device! Updating f_ops\n");
+ ERR("Invalid device! Updating f_ops\n");
file->f_op = file->f_dentry->d_inode->i_fop;
return -ENXIO;
}
DBG("Setting up QMI for service %lu\n", arg);
if (!(u8)arg) {
- DBG("Cannot use QMICTL from userspace\n");
+ ERR("Cannot use QMICTL from userspace\n");
return -EINVAL;
}
if (handle->cid != (u16)-1) {
- DBG("Close the current connection before opening a new one\n");
+ ERR("Close the current connection before opening a new one\n");
return -EBADR;
}
case IOCTL_QMI_GET_DEVICE_VIDPID:
if (!arg) {
- DBG("Bad VIDPID buffer\n");
+ ERR("Bad VIDPID buffer\n");
return -EINVAL;
}
if (!handle->dev->usbnet) {
- DBG("Bad usbnet\n");
+ ERR("Bad usbnet\n");
return -ENOMEM;
}
if (!handle->dev->usbnet->udev) {
- DBG("Bad udev\n");
+ ERR("Bad udev\n");
return -ENOMEM;
}
result = copy_to_user((unsigned int *)arg, &vidpid, 4);
if (result)
- DBG("Copy to userspace failure\n");
+ ERR("Copy to userspace failure\n");
return result;
break;
case IOCTL_QMI_GET_DEVICE_MEID:
if (!arg) {
- DBG("Bad MEID buffer\n");
+ ERR("Bad MEID buffer\n");
return -EINVAL;
}
result = copy_to_user((unsigned int *)arg, &handle->dev->meid[0], 14);
if (result)
- DBG("copy to userspace failure\n");
+ ERR("copy to userspace failure\n");
return result;
break;
unsigned long flags;
if (!handle) {
- DBG("bad file data\n");
+ ERR("bad file data\n");
return -EBADF;
}
}
if (!device_valid(handle->dev)) {
- DBG("Invalid device! Updating f_ops\n");
+ ERR("Invalid device! Updating f_ops\n");
file->f_op = file->f_dentry->d_inode->i_fop;
return -ENXIO;
}
struct qmihandle *handle = (struct qmihandle *)file->private_data;
if (!handle) {
- DBG("Bad file data\n");
+ ERR("Bad file data\n");
return -EBADF;
}
if (!device_valid(handle->dev)) {
- DBG("Invalid device! Updating f_ops\n");
+ ERR("Invalid device! Updating f_ops\n");
file->f_op = file->f_dentry->d_inode->i_fop;
return -ENXIO;
}
if (handle->cid == (u16)-1) {
- DBG("Client ID must be set before reading 0x%04X\n",
+ ERR("Client ID must be set before reading 0x%04X\n",
handle->cid);
return -EBADR;
}
smalldata = data + qmux_size;
if (result > size) {
- DBG("Read data is too large for amount user has requested\n");
+ ERR("Read data is too large for amount user has requested\n");
kfree(data);
return -EOVERFLOW;
}
if (copy_to_user(buf, smalldata, result)) {
- DBG("Error copying read data to user\n");
+ ERR("Error copying read data to user\n");
result = -EFAULT;
}
struct qmihandle *handle = (struct qmihandle *)file->private_data;
if (!handle) {
- DBG("Bad file data\n");
+ ERR("Bad file data\n");
return -EBADF;
}
if (!device_valid(handle->dev)) {
- DBG("Invalid device! Updating f_ops\n");
+ ERR("Invalid device! Updating f_ops\n");
file->f_op = file->f_dentry->d_inode->i_fop;
return -ENXIO;
}
if (handle->cid == (u16)-1) {
- DBG("Client ID must be set before writing 0x%04X\n",
+ ERR("Client ID must be set before writing 0x%04X\n",
handle->cid);
return -EBADR;
}
return -ENOMEM;
status = copy_from_user(wbuf + qmux_size, buf, size);
if (status) {
- DBG("Unable to copy data from userspace %d\n", status);
+ ERR("Unable to copy data from userspace %d\n", status);
kfree(wbuf);
return status;
}
unsigned long flags;
if (!handle) {
- DBG("Bad file data\n");
+ ERR("Bad file data\n");
return -EBADF;
}
if (!device_valid(handle->dev)) {
- DBG("Invalid device! Updating f_ops\n");
+ ERR("Invalid device! Updating f_ops\n");
file->f_op = file->f_dentry->d_inode->i_fop;
return -ENXIO;
}
if (handle->cid == (u16)-1) {
- DBG("Client ID must be set before polling 0x%04X\n",
+ ERR("Client ID must be set before polling 0x%04X\n",
handle->cid);
return -EBADR;
}
client = client_bycid(handle->dev, handle->cid);
if (!client) {
- DBG("Could not find matching client ID 0x%04X\n", handle->cid);
+ ERR("Could not find matching client ID 0x%04X\n", handle->cid);
spin_unlock_irqrestore(&handle->dev->qmi.clients_lock, flags);
return -ENXIO;
}
}
if (!qmi_ready(dev, 30000)) {
- DBG("Device unresponsive to QMI\n");
+ ERR("Device unresponsive to QMI\n");
return -ETIMEDOUT;
}
result = cdev_add(&dev->qmi.cdev, devno, 1);
if (result) {
- DBG("error adding cdev\n");
+ ERR("error adding cdev\n");
return result;
}
name = strstr(dev->usbnet->net->name, "qmi");
if (!name) {
- DBG("Bad net name: %s\n", dev->usbnet->net->name);
+ ERR("Bad net name: %s\n", dev->usbnet->net->name);
return -ENXIO;
}
name += strlen("qmi");
qmiidx = simple_strtoul(name, NULL, 10);
if (qmiidx < 0) {
- DBG("Bad minor number\n");
+ ERR("Bad minor number\n");
return -ENXIO;
}
int count = 0;
if (!device_valid(dev)) {
- DBG("wrong device\n");
+ ERR("wrong device\n");
return;
}
u8 tid;
if (!device_valid(dev)) {
- DBG("Invalid device\n");
+ ERR("Invalid device\n");
return -EFAULT;
}
unsigned long flags;
if (!device_valid(dev)) {
- DBG("Invalid device\n");
+ ERR("Invalid device\n");
return;
}
spin_unlock_irqrestore(&dev->qmi.clients_lock, flags);
if (!ret) {
- DBG("WDS callback failed to get data\n");
+ ERR("WDS callback failed to get data\n");
return;
}
result = qmiwds_event_resp(rbuf, rbufsize, &dstats);
if (result < 0) {
- DBG("bad WDS packet\n");
+ ERR("bad WDS packet\n");
} else {
if (dstats.txofl != (u32)-1)
stats->tx_fifo_errors = dstats.txofl;
result = read_async(dev, cid, 0, wds_callback, data);
if (result != 0)
- DBG("unable to setup next async read\n");
+ ERR("unable to setup next async read\n");
}
static int setup_wds_callback(struct qcusbnet *dev)
u16 cid;
if (!device_valid(dev)) {
- DBG("Invalid device\n");
+ ERR("Invalid device\n");
return -EFAULT;
}
result = read_async(dev, cid, 0, wds_callback, NULL);
if (result) {
- DBG("unable to setup async read\n");
+ ERR("unable to setup async read\n");
return result;
}
dev->iface->cur_altsetting->desc.bInterfaceNumber,
NULL, 0, 100);
if (result < 0) {
- DBG("Bad SetControlLineState status %d\n", result);
+ ERR("Bad SetControlLineState status %d\n", result);
return result;
}
u16 cid;
if (!device_valid(dev)) {
- DBG("Invalid device\n");
+ ERR("Invalid device\n");
return -EFAULT;
}
kfree(rbuf);
if (result < 0) {
- DBG("bad get MEID resp\n");
+ ERR("bad get MEID resp\n");
memset(&dev->meid[0], '0', 14);
}