ftdi->stuck_status = 0;
ftdi->synchronized = 0;
} else if ((ftdi->stuck_status++ % 60) == 1) {
- dev_err(&ftdi->udev->dev, "WRONG type of card inserted "
- "- please remove\n");
+ dev_err(&ftdi->udev->dev, "WRONG type of card inserted - please remove\n");
} else
- dev_err(&ftdi->udev->dev, "WRONG type of card inserted "
- "- checked %d times\n", ftdi->stuck_status);
+ dev_err(&ftdi->udev->dev, "WRONG type of card inserted - checked %d times\n",
+ ftdi->stuck_status);
work_delay_in_msec = 100;
} else if (ftdi->enumerated == 0) {
if (ftdi_elan_enumeratePCI(ftdi) == 0) {
ftdi->initialized = 1;
work_delay_in_msec = 500;
} else {
- dev_err(&ftdi->udev->dev, "initialized failed - trying "
- "again in 10 seconds\n");
+ dev_err(&ftdi->udev->dev, "initialized failed - trying again in 10 seconds\n");
work_delay_in_msec = 1 *1000;
}
} else if (ftdi->registered == 0) {
work_delay_in_msec = 250;
} else if (ftdi->controlreg & 0x00400000) {
if (ftdi->gone_away > 0) {
- dev_err(&ftdi->udev->dev, "PCI device eject con"
- "firmed platform_dev.dev.parent=%p plat"
- "form_dev.dev=%p\n",
+ dev_err(&ftdi->udev->dev, "PCI device eject confirmed platform_dev.dev.parent=%p platform_dev.dev=%p\n",
ftdi->platform_dev.dev.parent,
&ftdi->platform_dev.dev);
platform_device_unregister(&ftdi->platform_dev);
total_size = ftdi_elan_total_command_size(ftdi, command_size);
urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) {
- dev_err(&ftdi->udev->dev, "could not get a urb to write %d comm"
- "ands totaling %d bytes to the Uxxx\n", command_size,
- total_size);
+ dev_err(&ftdi->udev->dev, "could not get a urb to write %d commands totaling %d bytes to the Uxxx\n",
+ command_size, total_size);
return -ENOMEM;
}
buf = usb_alloc_coherent(ftdi->udev, total_size, GFP_KERNEL,
&urb->transfer_dma);
if (!buf) {
- dev_err(&ftdi->udev->dev, "could not get a buffer to write %d c"
- "ommands totaling %d bytes to the Uxxx\n", command_size,
- total_size);
+ dev_err(&ftdi->udev->dev, "could not get a buffer to write %d commands totaling %d bytes to the Uxxx\n",
+ command_size, total_size);
usb_free_urb(urb);
return -ENOMEM;
}
}
retval = usb_submit_urb(urb, GFP_KERNEL);
if (retval) {
- dev_err(&ftdi->udev->dev, "failed %d to submit urb %p to write "
- "%d commands totaling %d bytes to the Uxxx\n", retval,
- urb, command_size, total_size);
+ dev_err(&ftdi->udev->dev, "failed %d to submit urb %p to write %d commands totaling %d bytes to the Uxxx\n",
+ retval, urb, command_size, total_size);
usb_free_coherent(ftdi->udev, total_size, buf, urb->transfer_dma);
usb_free_urb(urb);
return retval;
goto have;
} else if (retval == -ETIMEDOUT) {
if (retry_on_timeout-- > 0) {
- dev_err(&ftdi->udev->dev, "TIMED OUT with packe"
- "t_bytes = %d with total %d bytes%s\n",
+ dev_err(&ftdi->udev->dev, "TIMED OUT with packet_bytes = %d with total %d bytes%s\n",
packet_bytes, bytes_read, diag);
goto more;
} else if (bytes_read > 0) {
bytes_read, diag);
return -ENOMEM;
} else {
- dev_err(&ftdi->udev->dev, "TIMED OUT with packe"
- "t_bytes = %d with total %d bytes%s\n",
+ dev_err(&ftdi->udev->dev, "TIMED OUT with packet_bytes = %d with total %d bytes%s\n",
packet_bytes, bytes_read, diag);
return -ENOMEM;
}
} else if (retval == -EILSEQ) {
- dev_err(&ftdi->udev->dev, "error = %d with packet_bytes"
- " = %d with total %d bytes%s\n", retval,
- packet_bytes, bytes_read, diag);
+ dev_err(&ftdi->udev->dev, "error = %d with packet_bytes = %d with total %d bytes%s\n",
+ retval, packet_bytes, bytes_read, diag);
return retval;
} else if (retval) {
- dev_err(&ftdi->udev->dev, "error = %d with packet_bytes"
- " = %d with total %d bytes%s\n", retval,
- packet_bytes, bytes_read, diag);
+ dev_err(&ftdi->udev->dev, "error = %d with packet_bytes = %d with total %d bytes%s\n",
+ retval, packet_bytes, bytes_read, diag);
return retval;
} else if (packet_bytes == 2) {
unsigned char s0 = ftdi->bulk_in_buffer[0];
} else if (buscmd == 0x06) {
} else if (buscmd == 0x0A) {
} else
- dev_err(&ftdi->udev->dev, "Uxxx unknown(%0X) va"
- "lue = %08X\n", buscmd, data);
+ dev_err(&ftdi->udev->dev, "Uxxx unknown(%0X) value = %08X\n",
+ buscmd, data);
goto have;
} else {
if ((ftdi->response[0] & 0x80) == 0x00) {
} else if (retry_on_status-- > 0) {
goto more;
} else {
- dev_err(&ftdi->udev->dev, "STATUS ERROR retry l"
- "imit reached\n");
+ dev_err(&ftdi->udev->dev, "STATUS ERROR retry limit reached\n");
return -EFAULT;
}
} else if (packet_bytes > 0) {
char b1 = ftdi->bulk_in_buffer[0];
- dev_err(&ftdi->udev->dev, "only one byte flushed from F"
- "TDI = %02X\n", b1);
+ dev_err(&ftdi->udev->dev, "only one byte flushed from FTDI = %02X\n",
+ b1);
if (retry_on_status-- > 0) {
goto more;
} else {
- dev_err(&ftdi->udev->dev, "STATUS ERROR retry l"
- "imit reached\n");
+ dev_err(&ftdi->udev->dev, "STATUS ERROR retry limit reached\n");
return -EFAULT;
}
} else if (retval == -ETIMEDOUT) {
if (retry_on_timeout-- > 0) {
goto more;
} else {
- dev_err(&ftdi->udev->dev, "TIMED OUT retry limi"
- "t reached\n");
+ dev_err(&ftdi->udev->dev, "TIMED OUT retry limit reached\n");
return -ENOMEM;
}
} else if (retval == 0) {
if (retry_on_empty-- > 0) {
goto more;
} else {
- dev_err(&ftdi->udev->dev, "empty packet retry l"
- "imit reached\n");
+ dev_err(&ftdi->udev->dev, "empty packet retry limit reached\n");
return -ENOMEM;
}
} else {
int i = 0;
urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) {
- dev_err(&ftdi->udev->dev, "could not alloc a urb for flush sequ"
- "ence\n");
+ dev_err(&ftdi->udev->dev, "could not alloc a urb for flush sequence\n");
return -ENOMEM;
}
buf = usb_alloc_coherent(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma);
if (!buf) {
- dev_err(&ftdi->udev->dev, "could not get a buffer for flush seq"
- "uence\n");
+ dev_err(&ftdi->udev->dev, "could not get a buffer for flush sequence\n");
usb_free_urb(urb);
return -ENOMEM;
}
urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
retval = usb_submit_urb(urb, GFP_KERNEL);
if (retval) {
- dev_err(&ftdi->udev->dev, "failed to submit urb containing the "
- "flush sequence\n");
+ dev_err(&ftdi->udev->dev, "failed to submit urb containing the flush sequence\n");
usb_free_coherent(ftdi->udev, i, buf, urb->transfer_dma);
usb_free_urb(urb);
return -ENOMEM;
int i = 0;
urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) {
- dev_err(&ftdi->udev->dev, "could not get a urb for the reset se"
- "quence\n");
+ dev_err(&ftdi->udev->dev, "could not get a urb for the reset sequence\n");
return -ENOMEM;
}
buf = usb_alloc_coherent(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma);
if (!buf) {
- dev_err(&ftdi->udev->dev, "could not get a buffer for the reset"
- " sequence\n");
+ dev_err(&ftdi->udev->dev, "could not get a buffer for the reset sequence\n");
usb_free_urb(urb);
return -ENOMEM;
}
urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
retval = usb_submit_urb(urb, GFP_KERNEL);
if (retval) {
- dev_err(&ftdi->udev->dev, "failed to submit urb containing the "
- "reset sequence\n");
+ dev_err(&ftdi->udev->dev, "failed to submit urb containing the reset sequence\n");
usb_free_coherent(ftdi->udev, i, buf, urb->transfer_dma);
usb_free_urb(urb);
return -ENOMEM;
} else if (read_stop-- > 0) {
goto read;
} else {
- dev_err(&ftdi->udev->dev, "retr"
- "y limit reached\n");
+ dev_err(&ftdi->udev->dev, "retry limit reached\n");
continue;
}
}
if (read_stop-- > 0) {
goto read;
} else {
- dev_err(&ftdi->udev->dev, "retr"
- "y limit reached\n");
+ dev_err(&ftdi->udev->dev, "retry limit reached\n");
continue;
}
} else {
if (read_stop-- > 0) {
goto read;
} else {
- dev_err(&ftdi->udev->dev, "retr"
- "y limit reached\n");
+ dev_err(&ftdi->udev->dev, "retry limit reached\n");
continue;
}
}
if (read_stop-- > 0) {
goto read;
} else {
- dev_err(&ftdi->udev->dev, "retry limit "
- "reached\n");
+ dev_err(&ftdi->udev->dev, "retry limit reached\n");
continue;
}
} else if (retval == -ETIMEDOUT) {
if (retry_on_timeout-- > 0) {
goto read;
} else {
- dev_err(&ftdi->udev->dev, "TIMED OUT re"
- "try limit reached\n");
+ dev_err(&ftdi->udev->dev, "TIMED OUT retry limit reached\n");
continue;
}
} else if (retval == 0) {
if (retry_on_empty-- > 0) {
goto read;
} else {
- dev_err(&ftdi->udev->dev, "empty packet"
- " retry limit reached\n");
+ dev_err(&ftdi->udev->dev, "empty packet retry limit reached\n");
continue;
}
} else {
if (read_stop-- > 0) {
goto read;
} else {
- dev_err(&ftdi->udev->dev, "retry limit "
- "reached\n");
+ dev_err(&ftdi->udev->dev, "retry limit reached\n");
continue;
}
}
return -EFAULT;
} else if (packet_bytes > 0) {
char b1 = ftdi->bulk_in_buffer[0];
- dev_err(&ftdi->udev->dev, "only one byte flushed from F"
- "TDI = %02X\n", b1);
+ dev_err(&ftdi->udev->dev, "only one byte flushed from FTDI = %02X\n", b1);
if (retry_on_status-- > 0) {
msleep(5);
goto more;
} else {
- dev_err(&ftdi->udev->dev, "STATUS ERROR retry l"
- "imit reached\n");
+ dev_err(&ftdi->udev->dev, "STATUS ERROR retry limit reached\n");
return -EFAULT;
}
} else if (retval == -ETIMEDOUT) {
if (retry_on_timeout-- > 0) {
goto more;
} else {
- dev_err(&ftdi->udev->dev, "TIMED OUT retry limi"
- "t reached\n");
+ dev_err(&ftdi->udev->dev, "TIMED OUT retry limit reached\n");
return -ENOMEM;
}
} else if (retval == 0) {
if (retry_on_empty-- > 0) {
goto more;
} else {
- dev_err(&ftdi->udev->dev, "empty packet retry l"
- "imit reached\n");
+ dev_err(&ftdi->udev->dev, "empty packet retry limit reached\n");
return -ENOMEM;
}
} else {
if (ftdi->card_ejected) {
} else {
ftdi->card_ejected = 1;
- dev_err(&ftdi->udev->dev, "CARD EJECTED - controlreg = "
- "%08X\n", ftdi->controlreg);
+ dev_err(&ftdi->udev->dev, "CARD EJECTED - controlreg = %08X\n",
+ ftdi->controlreg);
}
return -ENODEV;
} else {
ftdi->platform_data.device) {
return 0;
} else {
- dev_err(&ftdi->udev->dev, "vendor=%04X pciVID=%04X devi"
- "ce=%04X pciPID=%04X\n",
+ dev_err(&ftdi->udev->dev, "vendor=%04X pciVID=%04X device=%04X pciPID=%04X\n",
ftdi->platform_data.vendor, pciVID,
ftdi->platform_data.device, pciPID);
return -ENODEV;
return retval;
if (0 != (status & OHCI_HCR)) {
if (--reset_timeout == 0) {
- dev_err(&ftdi->udev->dev, "USB HC reset timed o"
- "ut!\n");
+ dev_err(&ftdi->udev->dev, "USB HC reset timed out!\n");
return -ENODEV;
} else {
msleep(5);
ftdi->bulk_in_endpointAddr = endpoint->bEndpointAddress;
ftdi->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL);
if (!ftdi->bulk_in_buffer) {
- dev_err(&ftdi->udev->dev, "Could not allocate b"
- "ulk_in_buffer\n");
+ dev_err(&ftdi->udev->dev, "Could not allocate bulk_in_buffer\n");
retval = -ENOMEM;
goto error;
}
}
}
if (!(ftdi->bulk_in_endpointAddr && ftdi->bulk_out_endpointAddr)) {
- dev_err(&ftdi->udev->dev, "Could not find both bulk-in and bulk"
- "-out endpoints\n");
+ dev_err(&ftdi->udev->dev, "Could not find both bulk-in and bulk-out endpoints\n");
retval = -ENODEV;
goto error;
}
ftdi->bulk_out_endpointAddr == 0x02) {
retval = usb_register_dev(interface, &ftdi_elan_jtag_class);
if (retval) {
- dev_err(&ftdi->udev->dev, "Not able to get a minor for "
- "this device.\n");
+ dev_err(&ftdi->udev->dev, "Not able to get a minor for this device\n");
usb_set_intfdata(interface, NULL);
retval = -ENOMEM;
goto error;
} else {
ftdi->class = &ftdi_elan_jtag_class;
- dev_info(&ftdi->udev->dev, "USB FDTI=%p JTAG interface "
- "%d now attached to ftdi%d\n", ftdi,
- iface_desc->desc.bInterfaceNumber,
+ dev_info(&ftdi->udev->dev, "USB FDTI=%p JTAG interface %d now attached to ftdi%d\n",
+ ftdi, iface_desc->desc.bInterfaceNumber,
interface->minor);
return 0;
}
ftdi->bulk_in_endpointAddr == 0x83 &&
ftdi->bulk_out_endpointAddr == 0x04) {
ftdi->class = NULL;
- dev_info(&ftdi->udev->dev, "USB FDTI=%p ELAN interface %d now a"
- "ctivated\n", ftdi, iface_desc->desc.bInterfaceNumber);
+ dev_info(&ftdi->udev->dev, "USB FDTI=%p ELAN interface %d now activated\n",
+ ftdi, iface_desc->desc.bInterfaceNumber);
INIT_DELAYED_WORK(&ftdi->status_work, ftdi_elan_status_work);
INIT_DELAYED_WORK(&ftdi->command_work, ftdi_elan_command_work);
INIT_DELAYED_WORK(&ftdi->respond_work, ftdi_elan_respond_work);
struct usb_class_driver *class = ftdi->class;
usb_set_intfdata(interface, NULL);
usb_deregister_dev(interface, class);
- dev_info(&ftdi->udev->dev, "USB FTDI U132 jtag interface on min"
- "or %d now disconnected\n", minor);
+ dev_info(&ftdi->udev->dev, "USB FTDI U132 jtag interface on minor %d now disconnected\n",
+ minor);
} else {
ftdi_status_cancel_work(ftdi);
ftdi_command_cancel_work(ftdi);
flush_workqueue(respond_queue);
ftdi->disconnected += 1;
usb_set_intfdata(interface, NULL);
- dev_info(&ftdi->udev->dev, "USB FTDI U132 host controller inter"
- "face now disconnected\n");
+ dev_info(&ftdi->udev->dev, "USB FTDI U132 host controller interface now disconnected\n");
}
ftdi_elan_put_kref(ftdi);
}