diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-03-03 19:08:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:55 -0400 |
commit | 441b62c1edb986827154768d89bbac0ba779984f (patch) | |
tree | 13724c22d1b190a36f0ddbba38554e6c66bea6af /drivers/usb/serial/io_ti.c | |
parent | 14722ef4acedc643f0b78b7165ceff2d300dae4d (diff) |
USB: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/io_ti.c')
-rw-r--r-- | drivers/usb/serial/io_ti.c | 364 |
1 files changed, 182 insertions, 182 deletions
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 856e4d9afd6f..0d412ede839a 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c | |||
@@ -290,7 +290,7 @@ static int TIReadVendorRequestSync (struct usb_device *dev, | |||
290 | return status; | 290 | return status; |
291 | if (status != size) { | 291 | if (status != size) { |
292 | dbg ("%s - wanted to write %d, but only wrote %d", | 292 | dbg ("%s - wanted to write %d, but only wrote %d", |
293 | __FUNCTION__, size, status); | 293 | __func__, size, status); |
294 | return -ECOMM; | 294 | return -ECOMM; |
295 | } | 295 | } |
296 | return 0; | 296 | return 0; |
@@ -320,7 +320,7 @@ static int TISendVendorRequestSync (struct usb_device *dev, | |||
320 | return status; | 320 | return status; |
321 | if (status != size) { | 321 | if (status != size) { |
322 | dbg ("%s - wanted to write %d, but only wrote %d", | 322 | dbg ("%s - wanted to write %d, but only wrote %d", |
323 | __FUNCTION__, size, status); | 323 | __func__, size, status); |
324 | return -ECOMM; | 324 | return -ECOMM; |
325 | } | 325 | } |
326 | return 0; | 326 | return 0; |
@@ -344,7 +344,7 @@ static int TIPurgeDataSync (struct usb_serial_port *port, __u16 mask) | |||
344 | { | 344 | { |
345 | int port_number = port->number - port->serial->minor; | 345 | int port_number = port->number - port->serial->minor; |
346 | 346 | ||
347 | dbg ("%s - port %d, mask %x", __FUNCTION__, port_number, mask); | 347 | dbg ("%s - port %d, mask %x", __func__, port_number, mask); |
348 | 348 | ||
349 | return TIWriteCommandSync (port->serial->dev, | 349 | return TIWriteCommandSync (port->serial->dev, |
350 | UMPC_PURGE_PORT, | 350 | UMPC_PURGE_PORT, |
@@ -369,7 +369,7 @@ static int TIReadDownloadMemory(struct usb_device *dev, int start_address, | |||
369 | __u8 read_length; | 369 | __u8 read_length; |
370 | __be16 be_start_address; | 370 | __be16 be_start_address; |
371 | 371 | ||
372 | dbg ("%s - @ %x for %d", __FUNCTION__, start_address, length); | 372 | dbg ("%s - @ %x for %d", __func__, start_address, length); |
373 | 373 | ||
374 | /* Read in blocks of 64 bytes | 374 | /* Read in blocks of 64 bytes |
375 | * (TI firmware can't handle more than 64 byte reads) | 375 | * (TI firmware can't handle more than 64 byte reads) |
@@ -381,7 +381,7 @@ static int TIReadDownloadMemory(struct usb_device *dev, int start_address, | |||
381 | read_length = (__u8)length; | 381 | read_length = (__u8)length; |
382 | 382 | ||
383 | if (read_length > 1) { | 383 | if (read_length > 1) { |
384 | dbg ("%s - @ %x for %d", __FUNCTION__, | 384 | dbg ("%s - @ %x for %d", __func__, |
385 | start_address, read_length); | 385 | start_address, read_length); |
386 | } | 386 | } |
387 | be_start_address = cpu_to_be16 (start_address); | 387 | be_start_address = cpu_to_be16 (start_address); |
@@ -393,12 +393,12 @@ static int TIReadDownloadMemory(struct usb_device *dev, int start_address, | |||
393 | read_length); // TransferBufferLength | 393 | read_length); // TransferBufferLength |
394 | 394 | ||
395 | if (status) { | 395 | if (status) { |
396 | dbg ("%s - ERROR %x", __FUNCTION__, status); | 396 | dbg ("%s - ERROR %x", __func__, status); |
397 | return status; | 397 | return status; |
398 | } | 398 | } |
399 | 399 | ||
400 | if (read_length > 1) { | 400 | if (read_length > 1) { |
401 | usb_serial_debug_data(debug, &dev->dev, __FUNCTION__, | 401 | usb_serial_debug_data(debug, &dev->dev, __func__, |
402 | read_length, buffer); | 402 | read_length, buffer); |
403 | } | 403 | } |
404 | 404 | ||
@@ -434,13 +434,13 @@ static int TIReadBootMemory (struct edgeport_serial *serial, int start_address, | |||
434 | &buffer[i], // TransferBuffer | 434 | &buffer[i], // TransferBuffer |
435 | 0x01); // TransferBufferLength | 435 | 0x01); // TransferBufferLength |
436 | if (status) { | 436 | if (status) { |
437 | dbg ("%s - ERROR %x", __FUNCTION__, status); | 437 | dbg ("%s - ERROR %x", __func__, status); |
438 | return status; | 438 | return status; |
439 | } | 439 | } |
440 | } | 440 | } |
441 | 441 | ||
442 | dbg ("%s - start_address = %x, length = %d", __FUNCTION__, start_address, length); | 442 | dbg ("%s - start_address = %x, length = %d", __func__, start_address, length); |
443 | usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, length, buffer); | 443 | usb_serial_debug_data(debug, &serial->serial->dev->dev, __func__, length, buffer); |
444 | 444 | ||
445 | serial->TiReadI2C = 1; | 445 | serial->TiReadI2C = 1; |
446 | 446 | ||
@@ -472,8 +472,8 @@ static int TIWriteBootMemory (struct edgeport_serial *serial, int start_address, | |||
472 | return status; | 472 | return status; |
473 | } | 473 | } |
474 | 474 | ||
475 | dbg ("%s - start_sddr = %x, length = %d", __FUNCTION__, start_address, length); | 475 | dbg ("%s - start_sddr = %x, length = %d", __func__, start_address, length); |
476 | usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, length, buffer); | 476 | usb_serial_debug_data(debug, &serial->serial->dev->dev, __func__, length, buffer); |
477 | 477 | ||
478 | return status; | 478 | return status; |
479 | } | 479 | } |
@@ -494,8 +494,8 @@ static int TIWriteDownloadI2C (struct edgeport_serial *serial, int start_address | |||
494 | if (write_length > length) | 494 | if (write_length > length) |
495 | write_length = length; | 495 | write_length = length; |
496 | 496 | ||
497 | dbg ("%s - BytesInFirstPage Addr = %x, length = %d", __FUNCTION__, start_address, write_length); | 497 | dbg ("%s - BytesInFirstPage Addr = %x, length = %d", __func__, start_address, write_length); |
498 | usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, write_length, buffer); | 498 | usb_serial_debug_data(debug, &serial->serial->dev->dev, __func__, write_length, buffer); |
499 | 499 | ||
500 | /* Write first page */ | 500 | /* Write first page */ |
501 | be_start_address = cpu_to_be16 (start_address); | 501 | be_start_address = cpu_to_be16 (start_address); |
@@ -506,7 +506,7 @@ static int TIWriteDownloadI2C (struct edgeport_serial *serial, int start_address | |||
506 | buffer, // TransferBuffer | 506 | buffer, // TransferBuffer |
507 | write_length); | 507 | write_length); |
508 | if (status) { | 508 | if (status) { |
509 | dbg ("%s - ERROR %d", __FUNCTION__, status); | 509 | dbg ("%s - ERROR %d", __func__, status); |
510 | return status; | 510 | return status; |
511 | } | 511 | } |
512 | 512 | ||
@@ -521,8 +521,8 @@ static int TIWriteDownloadI2C (struct edgeport_serial *serial, int start_address | |||
521 | else | 521 | else |
522 | write_length = length; | 522 | write_length = length; |
523 | 523 | ||
524 | dbg ("%s - Page Write Addr = %x, length = %d", __FUNCTION__, start_address, write_length); | 524 | dbg ("%s - Page Write Addr = %x, length = %d", __func__, start_address, write_length); |
525 | usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, write_length, buffer); | 525 | usb_serial_debug_data(debug, &serial->serial->dev->dev, __func__, write_length, buffer); |
526 | 526 | ||
527 | /* Write next page */ | 527 | /* Write next page */ |
528 | be_start_address = cpu_to_be16 (start_address); | 528 | be_start_address = cpu_to_be16 (start_address); |
@@ -533,7 +533,7 @@ static int TIWriteDownloadI2C (struct edgeport_serial *serial, int start_address | |||
533 | buffer, // TransferBuffer | 533 | buffer, // TransferBuffer |
534 | write_length); // TransferBufferLength | 534 | write_length); // TransferBufferLength |
535 | if (status) { | 535 | if (status) { |
536 | dev_err (&serial->serial->dev->dev, "%s - ERROR %d\n", __FUNCTION__, status); | 536 | dev_err (&serial->serial->dev->dev, "%s - ERROR %d\n", __func__, status); |
537 | return status; | 537 | return status; |
538 | } | 538 | } |
539 | 539 | ||
@@ -559,7 +559,7 @@ static int TIIsTxActive (struct edgeport_port *port) | |||
559 | 559 | ||
560 | oedb = kmalloc (sizeof (* oedb), GFP_KERNEL); | 560 | oedb = kmalloc (sizeof (* oedb), GFP_KERNEL); |
561 | if (!oedb) { | 561 | if (!oedb) { |
562 | dev_err (&port->port->dev, "%s - out of memory\n", __FUNCTION__); | 562 | dev_err (&port->port->dev, "%s - out of memory\n", __func__); |
563 | return -ENOMEM; | 563 | return -ENOMEM; |
564 | } | 564 | } |
565 | 565 | ||
@@ -579,7 +579,7 @@ static int TIIsTxActive (struct edgeport_port *port) | |||
579 | if (status) | 579 | if (status) |
580 | goto exit_is_tx_active; | 580 | goto exit_is_tx_active; |
581 | 581 | ||
582 | dbg ("%s - XByteCount 0x%X", __FUNCTION__, oedb->XByteCount); | 582 | dbg ("%s - XByteCount 0x%X", __func__, oedb->XByteCount); |
583 | 583 | ||
584 | /* and the LSR */ | 584 | /* and the LSR */ |
585 | status = TIReadRam (port->port->serial->dev, | 585 | status = TIReadRam (port->port->serial->dev, |
@@ -589,7 +589,7 @@ static int TIIsTxActive (struct edgeport_port *port) | |||
589 | 589 | ||
590 | if (status) | 590 | if (status) |
591 | goto exit_is_tx_active; | 591 | goto exit_is_tx_active; |
592 | dbg ("%s - LSR = 0x%X", __FUNCTION__, *lsr); | 592 | dbg ("%s - LSR = 0x%X", __func__, *lsr); |
593 | 593 | ||
594 | /* If either buffer has data or we are transmitting then return TRUE */ | 594 | /* If either buffer has data or we are transmitting then return TRUE */ |
595 | if ((oedb->XByteCount & 0x80 ) != 0 ) | 595 | if ((oedb->XByteCount & 0x80 ) != 0 ) |
@@ -600,7 +600,7 @@ static int TIIsTxActive (struct edgeport_port *port) | |||
600 | 600 | ||
601 | /* We return Not Active if we get any kind of error */ | 601 | /* We return Not Active if we get any kind of error */ |
602 | exit_is_tx_active: | 602 | exit_is_tx_active: |
603 | dbg ("%s - return %d", __FUNCTION__, bytes_left ); | 603 | dbg ("%s - return %d", __func__, bytes_left ); |
604 | 604 | ||
605 | kfree(lsr); | 605 | kfree(lsr); |
606 | kfree(oedb); | 606 | kfree(oedb); |
@@ -664,11 +664,11 @@ static int TIChooseConfiguration (struct usb_device *dev) | |||
664 | // we want. However, we just support one config at this point, | 664 | // we want. However, we just support one config at this point, |
665 | // configuration # 1, which is Config Descriptor 0. | 665 | // configuration # 1, which is Config Descriptor 0. |
666 | 666 | ||
667 | dbg ("%s - Number of Interfaces = %d", __FUNCTION__, dev->config->desc.bNumInterfaces); | 667 | dbg ("%s - Number of Interfaces = %d", __func__, dev->config->desc.bNumInterfaces); |
668 | dbg ("%s - MAX Power = %d", __FUNCTION__, dev->config->desc.bMaxPower*2); | 668 | dbg ("%s - MAX Power = %d", __func__, dev->config->desc.bMaxPower*2); |
669 | 669 | ||
670 | if (dev->config->desc.bNumInterfaces != 1) { | 670 | if (dev->config->desc.bNumInterfaces != 1) { |
671 | dev_err (&dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __FUNCTION__); | 671 | dev_err (&dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __func__); |
672 | return -ENODEV; | 672 | return -ENODEV; |
673 | } | 673 | } |
674 | 674 | ||
@@ -751,7 +751,7 @@ static int ValidChecksum(struct ti_i2c_desc *rom_desc, __u8 *buffer) | |||
751 | cs = (__u8)(cs + buffer[i]); | 751 | cs = (__u8)(cs + buffer[i]); |
752 | } | 752 | } |
753 | if (cs != rom_desc->CheckSum) { | 753 | if (cs != rom_desc->CheckSum) { |
754 | dbg ("%s - Mismatch %x - %x", __FUNCTION__, rom_desc->CheckSum, cs); | 754 | dbg ("%s - Mismatch %x - %x", __func__, rom_desc->CheckSum, cs); |
755 | return -EINVAL; | 755 | return -EINVAL; |
756 | } | 756 | } |
757 | return 0; | 757 | return 0; |
@@ -769,12 +769,12 @@ static int TiValidateI2cImage (struct edgeport_serial *serial) | |||
769 | 769 | ||
770 | rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); | 770 | rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); |
771 | if (!rom_desc) { | 771 | if (!rom_desc) { |
772 | dev_err (dev, "%s - out of memory\n", __FUNCTION__); | 772 | dev_err (dev, "%s - out of memory\n", __func__); |
773 | return -ENOMEM; | 773 | return -ENOMEM; |
774 | } | 774 | } |
775 | buffer = kmalloc (TI_MAX_I2C_SIZE, GFP_KERNEL); | 775 | buffer = kmalloc (TI_MAX_I2C_SIZE, GFP_KERNEL); |
776 | if (!buffer) { | 776 | if (!buffer) { |
777 | dev_err (dev, "%s - out of memory when allocating buffer\n", __FUNCTION__); | 777 | dev_err (dev, "%s - out of memory when allocating buffer\n", __func__); |
778 | kfree (rom_desc); | 778 | kfree (rom_desc); |
779 | return -ENOMEM; | 779 | return -ENOMEM; |
780 | } | 780 | } |
@@ -785,7 +785,7 @@ static int TiValidateI2cImage (struct edgeport_serial *serial) | |||
785 | goto ExitTiValidateI2cImage; | 785 | goto ExitTiValidateI2cImage; |
786 | 786 | ||
787 | if (*buffer != UMP5152 && *buffer != UMP3410) { | 787 | if (*buffer != UMP5152 && *buffer != UMP3410) { |
788 | dev_err (dev, "%s - invalid buffer signature\n", __FUNCTION__); | 788 | dev_err (dev, "%s - invalid buffer signature\n", __func__); |
789 | status = -ENODEV; | 789 | status = -ENODEV; |
790 | goto ExitTiValidateI2cImage; | 790 | goto ExitTiValidateI2cImage; |
791 | } | 791 | } |
@@ -801,11 +801,11 @@ static int TiValidateI2cImage (struct edgeport_serial *serial) | |||
801 | 801 | ||
802 | if ((start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size) > TI_MAX_I2C_SIZE) { | 802 | if ((start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size) > TI_MAX_I2C_SIZE) { |
803 | status = -ENODEV; | 803 | status = -ENODEV; |
804 | dbg ("%s - structure too big, erroring out.", __FUNCTION__); | 804 | dbg ("%s - structure too big, erroring out.", __func__); |
805 | break; | 805 | break; |
806 | } | 806 | } |
807 | 807 | ||
808 | dbg ("%s Type = 0x%x", __FUNCTION__, rom_desc->Type); | 808 | dbg ("%s Type = 0x%x", __func__, rom_desc->Type); |
809 | 809 | ||
810 | // Skip type 2 record | 810 | // Skip type 2 record |
811 | ttype = rom_desc->Type & 0x0f; | 811 | ttype = rom_desc->Type & 0x0f; |
@@ -845,13 +845,13 @@ static int TIReadManufDescriptor (struct edgeport_serial *serial, __u8 *buffer) | |||
845 | 845 | ||
846 | rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); | 846 | rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); |
847 | if (!rom_desc) { | 847 | if (!rom_desc) { |
848 | dev_err (&serial->serial->dev->dev, "%s - out of memory\n", __FUNCTION__); | 848 | dev_err (&serial->serial->dev->dev, "%s - out of memory\n", __func__); |
849 | return -ENOMEM; | 849 | return -ENOMEM; |
850 | } | 850 | } |
851 | start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_ION, rom_desc); | 851 | start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_ION, rom_desc); |
852 | 852 | ||
853 | if (!start_address) { | 853 | if (!start_address) { |
854 | dbg ("%s - Edge Descriptor not found in I2C", __FUNCTION__); | 854 | dbg ("%s - Edge Descriptor not found in I2C", __func__); |
855 | status = -ENODEV; | 855 | status = -ENODEV; |
856 | goto exit; | 856 | goto exit; |
857 | } | 857 | } |
@@ -867,12 +867,12 @@ static int TIReadManufDescriptor (struct edgeport_serial *serial, __u8 *buffer) | |||
867 | status = ValidChecksum(rom_desc, buffer); | 867 | status = ValidChecksum(rom_desc, buffer); |
868 | 868 | ||
869 | desc = (struct edge_ti_manuf_descriptor *)buffer; | 869 | desc = (struct edge_ti_manuf_descriptor *)buffer; |
870 | dbg ( "%s - IonConfig 0x%x", __FUNCTION__, desc->IonConfig ); | 870 | dbg ( "%s - IonConfig 0x%x", __func__, desc->IonConfig ); |
871 | dbg ( "%s - Version %d", __FUNCTION__, desc->Version ); | 871 | dbg ( "%s - Version %d", __func__, desc->Version ); |
872 | dbg ( "%s - Cpu/Board 0x%x", __FUNCTION__, desc->CpuRev_BoardRev ); | 872 | dbg ( "%s - Cpu/Board 0x%x", __func__, desc->CpuRev_BoardRev ); |
873 | dbg ( "%s - NumPorts %d", __FUNCTION__, desc->NumPorts ); | 873 | dbg ( "%s - NumPorts %d", __func__, desc->NumPorts ); |
874 | dbg ( "%s - NumVirtualPorts %d", __FUNCTION__, desc->NumVirtualPorts ); | 874 | dbg ( "%s - NumVirtualPorts %d", __func__, desc->NumVirtualPorts ); |
875 | dbg ( "%s - TotalPorts %d", __FUNCTION__, desc->TotalPorts ); | 875 | dbg ( "%s - TotalPorts %d", __func__, desc->TotalPorts ); |
876 | 876 | ||
877 | exit: | 877 | exit: |
878 | kfree (rom_desc); | 878 | kfree (rom_desc); |
@@ -902,7 +902,7 @@ static int BuildI2CFirmwareHeader (__u8 *header, struct device *dev) | |||
902 | 902 | ||
903 | buffer = kmalloc (buffer_size, GFP_KERNEL); | 903 | buffer = kmalloc (buffer_size, GFP_KERNEL); |
904 | if (!buffer) { | 904 | if (!buffer) { |
905 | dev_err (dev, "%s - out of memory\n", __FUNCTION__); | 905 | dev_err (dev, "%s - out of memory\n", __func__); |
906 | return -ENOMEM; | 906 | return -ENOMEM; |
907 | } | 907 | } |
908 | 908 | ||
@@ -955,11 +955,11 @@ static int TIGetI2cTypeInBootMode (struct edgeport_serial *serial) | |||
955 | &data, // TransferBuffer | 955 | &data, // TransferBuffer |
956 | 0x01); // TransferBufferLength | 956 | 0x01); // TransferBufferLength |
957 | if (status) | 957 | if (status) |
958 | dbg ("%s - read 2 status error = %d", __FUNCTION__, status); | 958 | dbg ("%s - read 2 status error = %d", __func__, status); |
959 | else | 959 | else |
960 | dbg ("%s - read 2 data = 0x%x", __FUNCTION__, data); | 960 | dbg ("%s - read 2 data = 0x%x", __func__, data); |
961 | if ((!status) && (data == UMP5152 || data == UMP3410)) { | 961 | if ((!status) && (data == UMP5152 || data == UMP3410)) { |
962 | dbg ("%s - ROM_TYPE_II", __FUNCTION__); | 962 | dbg ("%s - ROM_TYPE_II", __func__); |
963 | serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II; | 963 | serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II; |
964 | return 0; | 964 | return 0; |
965 | } | 965 | } |
@@ -972,16 +972,16 @@ static int TIGetI2cTypeInBootMode (struct edgeport_serial *serial) | |||
972 | &data, // TransferBuffer | 972 | &data, // TransferBuffer |
973 | 0x01); // TransferBufferLength | 973 | 0x01); // TransferBufferLength |
974 | if (status) | 974 | if (status) |
975 | dbg ("%s - read 3 status error = %d", __FUNCTION__, status); | 975 | dbg ("%s - read 3 status error = %d", __func__, status); |
976 | else | 976 | else |
977 | dbg ("%s - read 2 data = 0x%x", __FUNCTION__, data); | 977 | dbg ("%s - read 2 data = 0x%x", __func__, data); |
978 | if ((!status) && (data == UMP5152 || data == UMP3410)) { | 978 | if ((!status) && (data == UMP5152 || data == UMP3410)) { |
979 | dbg ("%s - ROM_TYPE_III", __FUNCTION__); | 979 | dbg ("%s - ROM_TYPE_III", __func__); |
980 | serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_III; | 980 | serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_III; |
981 | return 0; | 981 | return 0; |
982 | } | 982 | } |
983 | 983 | ||
984 | dbg ("%s - Unknown", __FUNCTION__); | 984 | dbg ("%s - Unknown", __func__); |
985 | serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II; | 985 | serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II; |
986 | return -ENODEV; | 986 | return -ENODEV; |
987 | } | 987 | } |
@@ -1063,7 +1063,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1063 | 1063 | ||
1064 | interface = &serial->serial->interface->cur_altsetting->desc; | 1064 | interface = &serial->serial->interface->cur_altsetting->desc; |
1065 | if (!interface) { | 1065 | if (!interface) { |
1066 | dev_err (dev, "%s - no interface set, error!\n", __FUNCTION__); | 1066 | dev_err (dev, "%s - no interface set, error!\n", __func__); |
1067 | return -ENODEV; | 1067 | return -ENODEV; |
1068 | } | 1068 | } |
1069 | 1069 | ||
@@ -1099,7 +1099,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1099 | */ | 1099 | */ |
1100 | ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL); | 1100 | ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL); |
1101 | if (!ti_manuf_desc) { | 1101 | if (!ti_manuf_desc) { |
1102 | dev_err (dev, "%s - out of memory.\n", __FUNCTION__); | 1102 | dev_err (dev, "%s - out of memory.\n", __func__); |
1103 | return -ENOMEM; | 1103 | return -ENOMEM; |
1104 | } | 1104 | } |
1105 | status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc); | 1105 | status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc); |
@@ -1110,7 +1110,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1110 | 1110 | ||
1111 | // Check version number of ION descriptor | 1111 | // Check version number of ION descriptor |
1112 | if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) { | 1112 | if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) { |
1113 | dbg ( "%s - Wrong CPU Rev %d (Must be 2)", __FUNCTION__, | 1113 | dbg ( "%s - Wrong CPU Rev %d (Must be 2)", __func__, |
1114 | TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev)); | 1114 | TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev)); |
1115 | kfree (ti_manuf_desc); | 1115 | kfree (ti_manuf_desc); |
1116 | return -EINVAL; | 1116 | return -EINVAL; |
@@ -1118,7 +1118,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1118 | 1118 | ||
1119 | rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); | 1119 | rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); |
1120 | if (!rom_desc) { | 1120 | if (!rom_desc) { |
1121 | dev_err (dev, "%s - out of memory.\n", __FUNCTION__); | 1121 | dev_err (dev, "%s - out of memory.\n", __func__); |
1122 | kfree (ti_manuf_desc); | 1122 | kfree (ti_manuf_desc); |
1123 | return -ENOMEM; | 1123 | return -ENOMEM; |
1124 | } | 1124 | } |
@@ -1128,11 +1128,11 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1128 | struct ti_i2c_firmware_rec *firmware_version; | 1128 | struct ti_i2c_firmware_rec *firmware_version; |
1129 | __u8 record; | 1129 | __u8 record; |
1130 | 1130 | ||
1131 | dbg ("%s - Found Type FIRMWARE (Type 2) record", __FUNCTION__); | 1131 | dbg ("%s - Found Type FIRMWARE (Type 2) record", __func__); |
1132 | 1132 | ||
1133 | firmware_version = kmalloc (sizeof (*firmware_version), GFP_KERNEL); | 1133 | firmware_version = kmalloc (sizeof (*firmware_version), GFP_KERNEL); |
1134 | if (!firmware_version) { | 1134 | if (!firmware_version) { |
1135 | dev_err (dev, "%s - out of memory.\n", __FUNCTION__); | 1135 | dev_err (dev, "%s - out of memory.\n", __func__); |
1136 | kfree (rom_desc); | 1136 | kfree (rom_desc); |
1137 | kfree (ti_manuf_desc); | 1137 | kfree (ti_manuf_desc); |
1138 | return -ENOMEM; | 1138 | return -ENOMEM; |
@@ -1158,7 +1158,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1158 | (OperationalCodeImageVersion.MinorVersion); | 1158 | (OperationalCodeImageVersion.MinorVersion); |
1159 | 1159 | ||
1160 | dbg ("%s - >>>Firmware Versions Device %d.%d Driver %d.%d", | 1160 | dbg ("%s - >>>Firmware Versions Device %d.%d Driver %d.%d", |
1161 | __FUNCTION__, | 1161 | __func__, |
1162 | firmware_version->Ver_Major, | 1162 | firmware_version->Ver_Major, |
1163 | firmware_version->Ver_Minor, | 1163 | firmware_version->Ver_Minor, |
1164 | OperationalCodeImageVersion.MajorVersion, | 1164 | OperationalCodeImageVersion.MajorVersion, |
@@ -1167,7 +1167,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1167 | // Check if we have an old version in the I2C and update if necessary | 1167 | // Check if we have an old version in the I2C and update if necessary |
1168 | if (download_cur_ver != download_new_ver) { | 1168 | if (download_cur_ver != download_new_ver) { |
1169 | dbg ("%s - Update I2C Download from %d.%d to %d.%d", | 1169 | dbg ("%s - Update I2C Download from %d.%d to %d.%d", |
1170 | __FUNCTION__, | 1170 | __func__, |
1171 | firmware_version->Ver_Major, | 1171 | firmware_version->Ver_Major, |
1172 | firmware_version->Ver_Minor, | 1172 | firmware_version->Ver_Minor, |
1173 | OperationalCodeImageVersion.MajorVersion, | 1173 | OperationalCodeImageVersion.MajorVersion, |
@@ -1209,14 +1209,14 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1209 | } | 1209 | } |
1210 | 1210 | ||
1211 | if (record != I2C_DESC_TYPE_FIRMWARE_BLANK) { | 1211 | if (record != I2C_DESC_TYPE_FIRMWARE_BLANK) { |
1212 | dev_err (dev, "%s - error resetting device\n", __FUNCTION__); | 1212 | dev_err (dev, "%s - error resetting device\n", __func__); |
1213 | kfree (firmware_version); | 1213 | kfree (firmware_version); |
1214 | kfree (rom_desc); | 1214 | kfree (rom_desc); |
1215 | kfree (ti_manuf_desc); | 1215 | kfree (ti_manuf_desc); |
1216 | return -ENODEV; | 1216 | return -ENODEV; |
1217 | } | 1217 | } |
1218 | 1218 | ||
1219 | dbg ("%s - HARDWARE RESET", __FUNCTION__); | 1219 | dbg ("%s - HARDWARE RESET", __func__); |
1220 | 1220 | ||
1221 | // Reset UMP -- Back to BOOT MODE | 1221 | // Reset UMP -- Back to BOOT MODE |
1222 | status = TISendVendorRequestSync (serial->serial->dev, | 1222 | status = TISendVendorRequestSync (serial->serial->dev, |
@@ -1226,7 +1226,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1226 | NULL, // TransferBuffer | 1226 | NULL, // TransferBuffer |
1227 | 0); // TransferBufferLength | 1227 | 0); // TransferBufferLength |
1228 | 1228 | ||
1229 | dbg ( "%s - HARDWARE RESET return %d", __FUNCTION__, status); | 1229 | dbg ( "%s - HARDWARE RESET return %d", __func__, status); |
1230 | 1230 | ||
1231 | /* return an error on purpose. */ | 1231 | /* return an error on purpose. */ |
1232 | kfree (firmware_version); | 1232 | kfree (firmware_version); |
@@ -1244,7 +1244,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1244 | 1244 | ||
1245 | header = kmalloc (HEADER_SIZE, GFP_KERNEL); | 1245 | header = kmalloc (HEADER_SIZE, GFP_KERNEL); |
1246 | if (!header) { | 1246 | if (!header) { |
1247 | dev_err (dev, "%s - out of memory.\n", __FUNCTION__); | 1247 | dev_err (dev, "%s - out of memory.\n", __func__); |
1248 | kfree (rom_desc); | 1248 | kfree (rom_desc); |
1249 | kfree (ti_manuf_desc); | 1249 | kfree (ti_manuf_desc); |
1250 | return -ENOMEM; | 1250 | return -ENOMEM; |
@@ -1252,14 +1252,14 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1252 | 1252 | ||
1253 | vheader = kmalloc (HEADER_SIZE, GFP_KERNEL); | 1253 | vheader = kmalloc (HEADER_SIZE, GFP_KERNEL); |
1254 | if (!vheader) { | 1254 | if (!vheader) { |
1255 | dev_err (dev, "%s - out of memory.\n", __FUNCTION__); | 1255 | dev_err (dev, "%s - out of memory.\n", __func__); |
1256 | kfree (header); | 1256 | kfree (header); |
1257 | kfree (rom_desc); | 1257 | kfree (rom_desc); |
1258 | kfree (ti_manuf_desc); | 1258 | kfree (ti_manuf_desc); |
1259 | return -ENOMEM; | 1259 | return -ENOMEM; |
1260 | } | 1260 | } |
1261 | 1261 | ||
1262 | dbg ("%s - Found Type BLANK FIRMWARE (Type F2) record", __FUNCTION__); | 1262 | dbg ("%s - Found Type BLANK FIRMWARE (Type F2) record", __func__); |
1263 | 1263 | ||
1264 | // In order to update the I2C firmware we must change the type 2 record to type 0xF2. | 1264 | // In order to update the I2C firmware we must change the type 2 record to type 0xF2. |
1265 | // This will force the UMP to come up in Boot Mode. Then while in boot mode, the driver | 1265 | // This will force the UMP to come up in Boot Mode. Then while in boot mode, the driver |
@@ -1297,7 +1297,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1297 | vheader); | 1297 | vheader); |
1298 | 1298 | ||
1299 | if (status) { | 1299 | if (status) { |
1300 | dbg ("%s - can't read header back", __FUNCTION__); | 1300 | dbg ("%s - can't read header back", __func__); |
1301 | kfree (vheader); | 1301 | kfree (vheader); |
1302 | kfree (header); | 1302 | kfree (header); |
1303 | kfree (rom_desc); | 1303 | kfree (rom_desc); |
@@ -1305,7 +1305,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1305 | return status; | 1305 | return status; |
1306 | } | 1306 | } |
1307 | if (memcmp(vheader, header, HEADER_SIZE)) { | 1307 | if (memcmp(vheader, header, HEADER_SIZE)) { |
1308 | dbg ("%s - write download record failed", __FUNCTION__); | 1308 | dbg ("%s - write download record failed", __func__); |
1309 | kfree (vheader); | 1309 | kfree (vheader); |
1310 | kfree (header); | 1310 | kfree (header); |
1311 | kfree (rom_desc); | 1311 | kfree (rom_desc); |
@@ -1316,7 +1316,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1316 | kfree (vheader); | 1316 | kfree (vheader); |
1317 | kfree (header); | 1317 | kfree (header); |
1318 | 1318 | ||
1319 | dbg ("%s - Start firmware update", __FUNCTION__); | 1319 | dbg ("%s - Start firmware update", __func__); |
1320 | 1320 | ||
1321 | // Tell firmware to copy download image into I2C | 1321 | // Tell firmware to copy download image into I2C |
1322 | status = TISendVendorRequestSync (serial->serial->dev, | 1322 | status = TISendVendorRequestSync (serial->serial->dev, |
@@ -1326,9 +1326,9 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1326 | NULL, // TransferBuffer | 1326 | NULL, // TransferBuffer |
1327 | 0); // TransferBufferLength | 1327 | 0); // TransferBufferLength |
1328 | 1328 | ||
1329 | dbg ("%s - Update complete 0x%x", __FUNCTION__, status); | 1329 | dbg ("%s - Update complete 0x%x", __func__, status); |
1330 | if (status) { | 1330 | if (status) { |
1331 | dev_err (dev, "%s - UMPC_COPY_DNLD_TO_I2C failed\n", __FUNCTION__); | 1331 | dev_err (dev, "%s - UMPC_COPY_DNLD_TO_I2C failed\n", __func__); |
1332 | kfree (rom_desc); | 1332 | kfree (rom_desc); |
1333 | kfree (ti_manuf_desc); | 1333 | kfree (ti_manuf_desc); |
1334 | return status; | 1334 | return status; |
@@ -1352,7 +1352,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1352 | return status; | 1352 | return status; |
1353 | 1353 | ||
1354 | if (le16_to_cpu(serial->serial->dev->descriptor.idVendor) != USB_VENDOR_ID_ION) { | 1354 | if (le16_to_cpu(serial->serial->dev->descriptor.idVendor) != USB_VENDOR_ID_ION) { |
1355 | dbg ("%s - VID = 0x%x", __FUNCTION__, | 1355 | dbg ("%s - VID = 0x%x", __func__, |
1356 | le16_to_cpu(serial->serial->dev->descriptor.idVendor)); | 1356 | le16_to_cpu(serial->serial->dev->descriptor.idVendor)); |
1357 | serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II; | 1357 | serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II; |
1358 | goto StayInBootMode; | 1358 | goto StayInBootMode; |
@@ -1366,7 +1366,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1366 | 1366 | ||
1367 | // Registry variable set? | 1367 | // Registry variable set? |
1368 | if (TIStayInBootMode) { | 1368 | if (TIStayInBootMode) { |
1369 | dbg ("%s - TIStayInBootMode", __FUNCTION__); | 1369 | dbg ("%s - TIStayInBootMode", __func__); |
1370 | goto StayInBootMode; | 1370 | goto StayInBootMode; |
1371 | } | 1371 | } |
1372 | 1372 | ||
@@ -1383,7 +1383,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1383 | */ | 1383 | */ |
1384 | ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL); | 1384 | ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL); |
1385 | if (!ti_manuf_desc) { | 1385 | if (!ti_manuf_desc) { |
1386 | dev_err (dev, "%s - out of memory.\n", __FUNCTION__); | 1386 | dev_err (dev, "%s - out of memory.\n", __func__); |
1387 | return -ENOMEM; | 1387 | return -ENOMEM; |
1388 | } | 1388 | } |
1389 | status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc); | 1389 | status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc); |
@@ -1394,7 +1394,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1394 | 1394 | ||
1395 | // Check for version 2 | 1395 | // Check for version 2 |
1396 | if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) { | 1396 | if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) { |
1397 | dbg ("%s - Wrong CPU Rev %d (Must be 2)", __FUNCTION__, | 1397 | dbg ("%s - Wrong CPU Rev %d (Must be 2)", __func__, |
1398 | TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev)); | 1398 | TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev)); |
1399 | kfree (ti_manuf_desc); | 1399 | kfree (ti_manuf_desc); |
1400 | goto StayInBootMode; | 1400 | goto StayInBootMode; |
@@ -1418,7 +1418,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1418 | buffer_size = (((1024 * 16) - 512) + sizeof(struct ti_i2c_image_header)); | 1418 | buffer_size = (((1024 * 16) - 512) + sizeof(struct ti_i2c_image_header)); |
1419 | buffer = kmalloc (buffer_size, GFP_KERNEL); | 1419 | buffer = kmalloc (buffer_size, GFP_KERNEL); |
1420 | if (!buffer) { | 1420 | if (!buffer) { |
1421 | dev_err (dev, "%s - out of memory\n", __FUNCTION__); | 1421 | dev_err (dev, "%s - out of memory\n", __func__); |
1422 | return -ENOMEM; | 1422 | return -ENOMEM; |
1423 | } | 1423 | } |
1424 | 1424 | ||
@@ -1438,20 +1438,20 @@ static int TIDownloadFirmware (struct edgeport_serial *serial) | |||
1438 | header->CheckSum = cs; | 1438 | header->CheckSum = cs; |
1439 | 1439 | ||
1440 | // Download the operational code | 1440 | // Download the operational code |
1441 | dbg ("%s - Downloading operational code image (TI UMP)", __FUNCTION__); | 1441 | dbg ("%s - Downloading operational code image (TI UMP)", __func__); |
1442 | status = TIDownloadCodeImage (serial, buffer, buffer_size); | 1442 | status = TIDownloadCodeImage (serial, buffer, buffer_size); |
1443 | 1443 | ||
1444 | kfree (buffer); | 1444 | kfree (buffer); |
1445 | 1445 | ||
1446 | if (status) { | 1446 | if (status) { |
1447 | dbg ("%s - Error downloading operational code image", __FUNCTION__); | 1447 | dbg ("%s - Error downloading operational code image", __func__); |
1448 | return status; | 1448 | return status; |
1449 | } | 1449 | } |
1450 | 1450 | ||
1451 | // Device will reboot | 1451 | // Device will reboot |
1452 | serial->product_info.TiMode = TI_MODE_TRANSITIONING; | 1452 | serial->product_info.TiMode = TI_MODE_TRANSITIONING; |
1453 | 1453 | ||
1454 | dbg ("%s - Download successful -- Device rebooting...", __FUNCTION__); | 1454 | dbg ("%s - Download successful -- Device rebooting...", __func__); |
1455 | 1455 | ||
1456 | /* return an error on purpose */ | 1456 | /* return an error on purpose */ |
1457 | return -ENODEV; | 1457 | return -ENODEV; |
@@ -1470,7 +1470,7 @@ static int TISetDtr (struct edgeport_port *port) | |||
1470 | { | 1470 | { |
1471 | int port_number = port->port->number - port->port->serial->minor; | 1471 | int port_number = port->port->number - port->port->serial->minor; |
1472 | 1472 | ||
1473 | dbg ("%s", __FUNCTION__); | 1473 | dbg ("%s", __func__); |
1474 | port->shadow_mcr |= MCR_DTR; | 1474 | port->shadow_mcr |= MCR_DTR; |
1475 | 1475 | ||
1476 | return TIWriteCommandSync (port->port->serial->dev, | 1476 | return TIWriteCommandSync (port->port->serial->dev, |
@@ -1485,7 +1485,7 @@ static int TIClearDtr (struct edgeport_port *port) | |||
1485 | { | 1485 | { |
1486 | int port_number = port->port->number - port->port->serial->minor; | 1486 | int port_number = port->port->number - port->port->serial->minor; |
1487 | 1487 | ||
1488 | dbg ("%s", __FUNCTION__); | 1488 | dbg ("%s", __func__); |
1489 | port->shadow_mcr &= ~MCR_DTR; | 1489 | port->shadow_mcr &= ~MCR_DTR; |
1490 | 1490 | ||
1491 | return TIWriteCommandSync (port->port->serial->dev, | 1491 | return TIWriteCommandSync (port->port->serial->dev, |
@@ -1500,7 +1500,7 @@ static int TISetRts (struct edgeport_port *port) | |||
1500 | { | 1500 | { |
1501 | int port_number = port->port->number - port->port->serial->minor; | 1501 | int port_number = port->port->number - port->port->serial->minor; |
1502 | 1502 | ||
1503 | dbg ("%s", __FUNCTION__); | 1503 | dbg ("%s", __func__); |
1504 | port->shadow_mcr |= MCR_RTS; | 1504 | port->shadow_mcr |= MCR_RTS; |
1505 | 1505 | ||
1506 | return TIWriteCommandSync (port->port->serial->dev, | 1506 | return TIWriteCommandSync (port->port->serial->dev, |
@@ -1515,7 +1515,7 @@ static int TIClearRts (struct edgeport_port *port) | |||
1515 | { | 1515 | { |
1516 | int port_number = port->port->number - port->port->serial->minor; | 1516 | int port_number = port->port->number - port->port->serial->minor; |
1517 | 1517 | ||
1518 | dbg ("%s", __FUNCTION__); | 1518 | dbg ("%s", __func__); |
1519 | port->shadow_mcr &= ~MCR_RTS; | 1519 | port->shadow_mcr &= ~MCR_RTS; |
1520 | 1520 | ||
1521 | return TIWriteCommandSync (port->port->serial->dev, | 1521 | return TIWriteCommandSync (port->port->serial->dev, |
@@ -1530,7 +1530,7 @@ static int TISetLoopBack (struct edgeport_port *port) | |||
1530 | { | 1530 | { |
1531 | int port_number = port->port->number - port->port->serial->minor; | 1531 | int port_number = port->port->number - port->port->serial->minor; |
1532 | 1532 | ||
1533 | dbg ("%s", __FUNCTION__); | 1533 | dbg ("%s", __func__); |
1534 | 1534 | ||
1535 | return TIWriteCommandSync (port->port->serial->dev, | 1535 | return TIWriteCommandSync (port->port->serial->dev, |
1536 | UMPC_SET_CLR_LOOPBACK, | 1536 | UMPC_SET_CLR_LOOPBACK, |
@@ -1544,7 +1544,7 @@ static int TIClearLoopBack (struct edgeport_port *port) | |||
1544 | { | 1544 | { |
1545 | int port_number = port->port->number - port->port->serial->minor; | 1545 | int port_number = port->port->number - port->port->serial->minor; |
1546 | 1546 | ||
1547 | dbg ("%s", __FUNCTION__); | 1547 | dbg ("%s", __func__); |
1548 | 1548 | ||
1549 | return TIWriteCommandSync (port->port->serial->dev, | 1549 | return TIWriteCommandSync (port->port->serial->dev, |
1550 | UMPC_SET_CLR_LOOPBACK, | 1550 | UMPC_SET_CLR_LOOPBACK, |
@@ -1558,7 +1558,7 @@ static int TISetBreak (struct edgeport_port *port) | |||
1558 | { | 1558 | { |
1559 | int port_number = port->port->number - port->port->serial->minor; | 1559 | int port_number = port->port->number - port->port->serial->minor; |
1560 | 1560 | ||
1561 | dbg ("%s", __FUNCTION__); | 1561 | dbg ("%s", __func__); |
1562 | 1562 | ||
1563 | return TIWriteCommandSync (port->port->serial->dev, | 1563 | return TIWriteCommandSync (port->port->serial->dev, |
1564 | UMPC_SET_CLR_BREAK, | 1564 | UMPC_SET_CLR_BREAK, |
@@ -1572,7 +1572,7 @@ static int TIClearBreak (struct edgeport_port *port) | |||
1572 | { | 1572 | { |
1573 | int port_number = port->port->number - port->port->serial->minor; | 1573 | int port_number = port->port->number - port->port->serial->minor; |
1574 | 1574 | ||
1575 | dbg ("%s", __FUNCTION__); | 1575 | dbg ("%s", __func__); |
1576 | 1576 | ||
1577 | return TIWriteCommandSync (port->port->serial->dev, | 1577 | return TIWriteCommandSync (port->port->serial->dev, |
1578 | UMPC_SET_CLR_BREAK, | 1578 | UMPC_SET_CLR_BREAK, |
@@ -1586,7 +1586,7 @@ static int TIRestoreMCR (struct edgeport_port *port, __u8 mcr) | |||
1586 | { | 1586 | { |
1587 | int status = 0; | 1587 | int status = 0; |
1588 | 1588 | ||
1589 | dbg ("%s - %x", __FUNCTION__, mcr); | 1589 | dbg ("%s - %x", __func__, mcr); |
1590 | 1590 | ||
1591 | if (mcr & MCR_DTR) | 1591 | if (mcr & MCR_DTR) |
1592 | status = TISetDtr (port); | 1592 | status = TISetDtr (port); |
@@ -1640,7 +1640,7 @@ static void handle_new_msr (struct edgeport_port *edge_port, __u8 msr) | |||
1640 | struct async_icount *icount; | 1640 | struct async_icount *icount; |
1641 | struct tty_struct *tty; | 1641 | struct tty_struct *tty; |
1642 | 1642 | ||
1643 | dbg ("%s - %02x", __FUNCTION__, msr); | 1643 | dbg ("%s - %02x", __func__, msr); |
1644 | 1644 | ||
1645 | if (msr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) { | 1645 | if (msr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) { |
1646 | icount = &edge_port->icount; | 1646 | icount = &edge_port->icount; |
@@ -1679,7 +1679,7 @@ static void handle_new_lsr (struct edgeport_port *edge_port, int lsr_data, __u8 | |||
1679 | struct async_icount *icount; | 1679 | struct async_icount *icount; |
1680 | __u8 new_lsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK)); | 1680 | __u8 new_lsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK)); |
1681 | 1681 | ||
1682 | dbg ("%s - %02x", __FUNCTION__, new_lsr); | 1682 | dbg ("%s - %02x", __func__, new_lsr); |
1683 | 1683 | ||
1684 | edge_port->shadow_lsr = lsr; | 1684 | edge_port->shadow_lsr = lsr; |
1685 | 1685 | ||
@@ -1722,7 +1722,7 @@ static void edge_interrupt_callback (struct urb *urb) | |||
1722 | __u8 msr; | 1722 | __u8 msr; |
1723 | int status = urb->status; | 1723 | int status = urb->status; |
1724 | 1724 | ||
1725 | dbg("%s", __FUNCTION__); | 1725 | dbg("%s", __func__); |
1726 | 1726 | ||
1727 | switch (status) { | 1727 | switch (status) { |
1728 | case 0: | 1728 | case 0: |
@@ -1733,34 +1733,34 @@ static void edge_interrupt_callback (struct urb *urb) | |||
1733 | case -ESHUTDOWN: | 1733 | case -ESHUTDOWN: |
1734 | /* this urb is terminated, clean up */ | 1734 | /* this urb is terminated, clean up */ |
1735 | dbg("%s - urb shutting down with status: %d", | 1735 | dbg("%s - urb shutting down with status: %d", |
1736 | __FUNCTION__, status); | 1736 | __func__, status); |
1737 | return; | 1737 | return; |
1738 | default: | 1738 | default: |
1739 | dev_err(&urb->dev->dev, "%s - nonzero urb status received: " | 1739 | dev_err(&urb->dev->dev, "%s - nonzero urb status received: " |
1740 | "%d\n", __FUNCTION__, status); | 1740 | "%d\n", __func__, status); |
1741 | goto exit; | 1741 | goto exit; |
1742 | } | 1742 | } |
1743 | 1743 | ||
1744 | if (!length) { | 1744 | if (!length) { |
1745 | dbg ("%s - no data in urb", __FUNCTION__); | 1745 | dbg ("%s - no data in urb", __func__); |
1746 | goto exit; | 1746 | goto exit; |
1747 | } | 1747 | } |
1748 | 1748 | ||
1749 | usb_serial_debug_data(debug, &edge_serial->serial->dev->dev, __FUNCTION__, length, data); | 1749 | usb_serial_debug_data(debug, &edge_serial->serial->dev->dev, __func__, length, data); |
1750 | 1750 | ||
1751 | if (length != 2) { | 1751 | if (length != 2) { |
1752 | dbg ("%s - expecting packet of size 2, got %d", __FUNCTION__, length); | 1752 | dbg ("%s - expecting packet of size 2, got %d", __func__, length); |
1753 | goto exit; | 1753 | goto exit; |
1754 | } | 1754 | } |
1755 | 1755 | ||
1756 | port_number = TIUMP_GET_PORT_FROM_CODE (data[0]); | 1756 | port_number = TIUMP_GET_PORT_FROM_CODE (data[0]); |
1757 | function = TIUMP_GET_FUNC_FROM_CODE (data[0]); | 1757 | function = TIUMP_GET_FUNC_FROM_CODE (data[0]); |
1758 | dbg ("%s - port_number %d, function %d, info 0x%x", | 1758 | dbg ("%s - port_number %d, function %d, info 0x%x", |
1759 | __FUNCTION__, port_number, function, data[1]); | 1759 | __func__, port_number, function, data[1]); |
1760 | port = edge_serial->serial->port[port_number]; | 1760 | port = edge_serial->serial->port[port_number]; |
1761 | edge_port = usb_get_serial_port_data(port); | 1761 | edge_port = usb_get_serial_port_data(port); |
1762 | if (!edge_port) { | 1762 | if (!edge_port) { |
1763 | dbg ("%s - edge_port not found", __FUNCTION__); | 1763 | dbg ("%s - edge_port not found", __func__); |
1764 | return; | 1764 | return; |
1765 | } | 1765 | } |
1766 | switch (function) { | 1766 | switch (function) { |
@@ -1769,12 +1769,12 @@ static void edge_interrupt_callback (struct urb *urb) | |||
1769 | if (lsr & UMP_UART_LSR_DATA_MASK) { | 1769 | if (lsr & UMP_UART_LSR_DATA_MASK) { |
1770 | /* Save the LSR event for bulk read completion routine */ | 1770 | /* Save the LSR event for bulk read completion routine */ |
1771 | dbg ("%s - LSR Event Port %u LSR Status = %02x", | 1771 | dbg ("%s - LSR Event Port %u LSR Status = %02x", |
1772 | __FUNCTION__, port_number, lsr); | 1772 | __func__, port_number, lsr); |
1773 | edge_port->lsr_event = 1; | 1773 | edge_port->lsr_event = 1; |
1774 | edge_port->lsr_mask = lsr; | 1774 | edge_port->lsr_mask = lsr; |
1775 | } else { | 1775 | } else { |
1776 | dbg ("%s - ===== Port %d LSR Status = %02x ======", | 1776 | dbg ("%s - ===== Port %d LSR Status = %02x ======", |
1777 | __FUNCTION__, port_number, lsr); | 1777 | __func__, port_number, lsr); |
1778 | handle_new_lsr (edge_port, 0, lsr, 0); | 1778 | handle_new_lsr (edge_port, 0, lsr, 0); |
1779 | } | 1779 | } |
1780 | break; | 1780 | break; |
@@ -1783,13 +1783,13 @@ static void edge_interrupt_callback (struct urb *urb) | |||
1783 | /* Copy MSR from UMP */ | 1783 | /* Copy MSR from UMP */ |
1784 | msr = data[1]; | 1784 | msr = data[1]; |
1785 | dbg ("%s - ===== Port %u MSR Status = %02x ======\n", | 1785 | dbg ("%s - ===== Port %u MSR Status = %02x ======\n", |
1786 | __FUNCTION__, port_number, msr); | 1786 | __func__, port_number, msr); |
1787 | handle_new_msr (edge_port, msr); | 1787 | handle_new_msr (edge_port, msr); |
1788 | break; | 1788 | break; |
1789 | 1789 | ||
1790 | default: | 1790 | default: |
1791 | dev_err (&urb->dev->dev, "%s - Unknown Interrupt code from UMP %x\n", | 1791 | dev_err (&urb->dev->dev, "%s - Unknown Interrupt code from UMP %x\n", |
1792 | __FUNCTION__, data[1]); | 1792 | __func__, data[1]); |
1793 | break; | 1793 | break; |
1794 | 1794 | ||
1795 | } | 1795 | } |
@@ -1798,7 +1798,7 @@ exit: | |||
1798 | retval = usb_submit_urb (urb, GFP_ATOMIC); | 1798 | retval = usb_submit_urb (urb, GFP_ATOMIC); |
1799 | if (retval) | 1799 | if (retval) |
1800 | dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n", | 1800 | dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n", |
1801 | __FUNCTION__, retval); | 1801 | __func__, retval); |
1802 | } | 1802 | } |
1803 | 1803 | ||
1804 | static void edge_bulk_in_callback (struct urb *urb) | 1804 | static void edge_bulk_in_callback (struct urb *urb) |
@@ -1810,7 +1810,7 @@ static void edge_bulk_in_callback (struct urb *urb) | |||
1810 | int port_number; | 1810 | int port_number; |
1811 | int status = urb->status; | 1811 | int status = urb->status; |
1812 | 1812 | ||
1813 | dbg("%s", __FUNCTION__); | 1813 | dbg("%s", __func__); |
1814 | 1814 | ||
1815 | switch (status) { | 1815 | switch (status) { |
1816 | case 0: | 1816 | case 0: |
@@ -1821,18 +1821,18 @@ static void edge_bulk_in_callback (struct urb *urb) | |||
1821 | case -ESHUTDOWN: | 1821 | case -ESHUTDOWN: |
1822 | /* this urb is terminated, clean up */ | 1822 | /* this urb is terminated, clean up */ |
1823 | dbg("%s - urb shutting down with status: %d", | 1823 | dbg("%s - urb shutting down with status: %d", |
1824 | __FUNCTION__, status); | 1824 | __func__, status); |
1825 | return; | 1825 | return; |
1826 | default: | 1826 | default: |
1827 | dev_err (&urb->dev->dev,"%s - nonzero read bulk status received: %d\n", | 1827 | dev_err (&urb->dev->dev,"%s - nonzero read bulk status received: %d\n", |
1828 | __FUNCTION__, status); | 1828 | __func__, status); |
1829 | } | 1829 | } |
1830 | 1830 | ||
1831 | if (status == -EPIPE) | 1831 | if (status == -EPIPE) |
1832 | goto exit; | 1832 | goto exit; |
1833 | 1833 | ||
1834 | if (status) { | 1834 | if (status) { |
1835 | dev_err(&urb->dev->dev,"%s - stopping read!\n", __FUNCTION__); | 1835 | dev_err(&urb->dev->dev,"%s - stopping read!\n", __func__); |
1836 | return; | 1836 | return; |
1837 | } | 1837 | } |
1838 | 1838 | ||
@@ -1841,7 +1841,7 @@ static void edge_bulk_in_callback (struct urb *urb) | |||
1841 | if (edge_port->lsr_event) { | 1841 | if (edge_port->lsr_event) { |
1842 | edge_port->lsr_event = 0; | 1842 | edge_port->lsr_event = 0; |
1843 | dbg ("%s ===== Port %u LSR Status = %02x, Data = %02x ======", | 1843 | dbg ("%s ===== Port %u LSR Status = %02x, Data = %02x ======", |
1844 | __FUNCTION__, port_number, edge_port->lsr_mask, *data); | 1844 | __func__, port_number, edge_port->lsr_mask, *data); |
1845 | handle_new_lsr (edge_port, 1, edge_port->lsr_mask, *data); | 1845 | handle_new_lsr (edge_port, 1, edge_port->lsr_mask, *data); |
1846 | /* Adjust buffer length/pointer */ | 1846 | /* Adjust buffer length/pointer */ |
1847 | --urb->actual_length; | 1847 | --urb->actual_length; |
@@ -1850,10 +1850,10 @@ static void edge_bulk_in_callback (struct urb *urb) | |||
1850 | 1850 | ||
1851 | tty = edge_port->port->tty; | 1851 | tty = edge_port->port->tty; |
1852 | if (tty && urb->actual_length) { | 1852 | if (tty && urb->actual_length) { |
1853 | usb_serial_debug_data(debug, &edge_port->port->dev, __FUNCTION__, urb->actual_length, data); | 1853 | usb_serial_debug_data(debug, &edge_port->port->dev, __func__, urb->actual_length, data); |
1854 | 1854 | ||
1855 | if (edge_port->close_pending) { | 1855 | if (edge_port->close_pending) { |
1856 | dbg ("%s - close is pending, dropping data on the floor.", __FUNCTION__); | 1856 | dbg ("%s - close is pending, dropping data on the floor.", __func__); |
1857 | } else { | 1857 | } else { |
1858 | edge_tty_recv(&edge_port->port->dev, tty, data, urb->actual_length); | 1858 | edge_tty_recv(&edge_port->port->dev, tty, data, urb->actual_length); |
1859 | } | 1859 | } |
@@ -1872,7 +1872,7 @@ exit: | |||
1872 | spin_unlock(&edge_port->ep_lock); | 1872 | spin_unlock(&edge_port->ep_lock); |
1873 | if (retval) | 1873 | if (retval) |
1874 | dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n", | 1874 | dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n", |
1875 | __FUNCTION__, retval); | 1875 | __func__, retval); |
1876 | } | 1876 | } |
1877 | 1877 | ||
1878 | static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned char *data, int length) | 1878 | static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned char *data, int length) |
@@ -1883,7 +1883,7 @@ static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned c | |||
1883 | cnt = tty_buffer_request_room(tty, length); | 1883 | cnt = tty_buffer_request_room(tty, length); |
1884 | if (cnt < length) { | 1884 | if (cnt < length) { |
1885 | dev_err(dev, "%s - dropping data, %d bytes lost\n", | 1885 | dev_err(dev, "%s - dropping data, %d bytes lost\n", |
1886 | __FUNCTION__, length - cnt); | 1886 | __func__, length - cnt); |
1887 | if(cnt == 0) | 1887 | if(cnt == 0) |
1888 | break; | 1888 | break; |
1889 | } | 1889 | } |
@@ -1901,7 +1901,7 @@ static void edge_bulk_out_callback (struct urb *urb) | |||
1901 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); | 1901 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); |
1902 | int status = urb->status; | 1902 | int status = urb->status; |
1903 | 1903 | ||
1904 | dbg ("%s - port %d", __FUNCTION__, port->number); | 1904 | dbg ("%s - port %d", __func__, port->number); |
1905 | 1905 | ||
1906 | edge_port->ep_write_urb_in_use = 0; | 1906 | edge_port->ep_write_urb_in_use = 0; |
1907 | 1907 | ||
@@ -1914,11 +1914,11 @@ static void edge_bulk_out_callback (struct urb *urb) | |||
1914 | case -ESHUTDOWN: | 1914 | case -ESHUTDOWN: |
1915 | /* this urb is terminated, clean up */ | 1915 | /* this urb is terminated, clean up */ |
1916 | dbg("%s - urb shutting down with status: %d", | 1916 | dbg("%s - urb shutting down with status: %d", |
1917 | __FUNCTION__, status); | 1917 | __func__, status); |
1918 | return; | 1918 | return; |
1919 | default: | 1919 | default: |
1920 | dev_err(&urb->dev->dev, "%s - nonzero write bulk status " | 1920 | dev_err(&urb->dev->dev, "%s - nonzero write bulk status " |
1921 | "received: %d\n", __FUNCTION__, status); | 1921 | "received: %d\n", __func__, status); |
1922 | } | 1922 | } |
1923 | 1923 | ||
1924 | /* send any buffered data */ | 1924 | /* send any buffered data */ |
@@ -1936,7 +1936,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) | |||
1936 | u16 open_settings; | 1936 | u16 open_settings; |
1937 | u8 transaction_timeout; | 1937 | u8 transaction_timeout; |
1938 | 1938 | ||
1939 | dbg("%s - port %d", __FUNCTION__, port->number); | 1939 | dbg("%s - port %d", __func__, port->number); |
1940 | 1940 | ||
1941 | if (edge_port == NULL) | 1941 | if (edge_port == NULL) |
1942 | return -ENODEV; | 1942 | return -ENODEV; |
@@ -1959,7 +1959,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) | |||
1959 | } | 1959 | } |
1960 | 1960 | ||
1961 | dbg ("%s - port_number = %d, uart_base = %04x, dma_address = %04x", | 1961 | dbg ("%s - port_number = %d, uart_base = %04x, dma_address = %04x", |
1962 | __FUNCTION__, port_number, edge_port->uart_base, edge_port->dma_address); | 1962 | __func__, port_number, edge_port->uart_base, edge_port->dma_address); |
1963 | 1963 | ||
1964 | dev = port->serial->dev; | 1964 | dev = port->serial->dev; |
1965 | 1965 | ||
@@ -1970,7 +1970,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) | |||
1970 | status = TIClearLoopBack (edge_port); | 1970 | status = TIClearLoopBack (edge_port); |
1971 | if (status) { | 1971 | if (status) { |
1972 | dev_err(&port->dev,"%s - cannot send clear loopback command, %d\n", | 1972 | dev_err(&port->dev,"%s - cannot send clear loopback command, %d\n", |
1973 | __FUNCTION__, status); | 1973 | __func__, status); |
1974 | return status; | 1974 | return status; |
1975 | } | 1975 | } |
1976 | 1976 | ||
@@ -1989,7 +1989,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) | |||
1989 | UMP_PIPE_TRANS_TIMEOUT_ENA | | 1989 | UMP_PIPE_TRANS_TIMEOUT_ENA | |
1990 | (transaction_timeout << 2)); | 1990 | (transaction_timeout << 2)); |
1991 | 1991 | ||
1992 | dbg ("%s - Sending UMPC_OPEN_PORT", __FUNCTION__); | 1992 | dbg ("%s - Sending UMPC_OPEN_PORT", __func__); |
1993 | 1993 | ||
1994 | /* Tell TI to open and start the port */ | 1994 | /* Tell TI to open and start the port */ |
1995 | status = TIWriteCommandSync (dev, | 1995 | status = TIWriteCommandSync (dev, |
@@ -1999,7 +1999,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) | |||
1999 | NULL, | 1999 | NULL, |
2000 | 0); | 2000 | 0); |
2001 | if (status) { | 2001 | if (status) { |
2002 | dev_err(&port->dev,"%s - cannot send open command, %d\n", __FUNCTION__, status); | 2002 | dev_err(&port->dev,"%s - cannot send open command, %d\n", __func__, status); |
2003 | return status; | 2003 | return status; |
2004 | } | 2004 | } |
2005 | 2005 | ||
@@ -2011,14 +2011,14 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) | |||
2011 | NULL, | 2011 | NULL, |
2012 | 0); | 2012 | 0); |
2013 | if (status) { | 2013 | if (status) { |
2014 | dev_err(&port->dev,"%s - cannot send start DMA command, %d\n", __FUNCTION__, status); | 2014 | dev_err(&port->dev,"%s - cannot send start DMA command, %d\n", __func__, status); |
2015 | return status; | 2015 | return status; |
2016 | } | 2016 | } |
2017 | 2017 | ||
2018 | /* Clear TX and RX buffers in UMP */ | 2018 | /* Clear TX and RX buffers in UMP */ |
2019 | status = TIPurgeDataSync (port, UMP_PORT_DIR_OUT | UMP_PORT_DIR_IN); | 2019 | status = TIPurgeDataSync (port, UMP_PORT_DIR_OUT | UMP_PORT_DIR_IN); |
2020 | if (status) { | 2020 | if (status) { |
2021 | dev_err(&port->dev,"%s - cannot send clear buffers command, %d\n", __FUNCTION__, status); | 2021 | dev_err(&port->dev,"%s - cannot send clear buffers command, %d\n", __func__, status); |
2022 | return status; | 2022 | return status; |
2023 | } | 2023 | } |
2024 | 2024 | ||
@@ -2030,7 +2030,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) | |||
2030 | &edge_port->shadow_msr, // TransferBuffer | 2030 | &edge_port->shadow_msr, // TransferBuffer |
2031 | 1); // TransferBufferLength | 2031 | 1); // TransferBufferLength |
2032 | if (status) { | 2032 | if (status) { |
2033 | dev_err(&port->dev,"%s - cannot send read MSR command, %d\n", __FUNCTION__, status); | 2033 | dev_err(&port->dev,"%s - cannot send read MSR command, %d\n", __func__, status); |
2034 | return status; | 2034 | return status; |
2035 | } | 2035 | } |
2036 | 2036 | ||
@@ -2047,7 +2047,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) | |||
2047 | /* we are the first port to be opened, let's post the interrupt urb */ | 2047 | /* we are the first port to be opened, let's post the interrupt urb */ |
2048 | urb = edge_serial->serial->port[0]->interrupt_in_urb; | 2048 | urb = edge_serial->serial->port[0]->interrupt_in_urb; |
2049 | if (!urb) { | 2049 | if (!urb) { |
2050 | dev_err (&port->dev, "%s - no interrupt urb present, exiting\n", __FUNCTION__); | 2050 | dev_err (&port->dev, "%s - no interrupt urb present, exiting\n", __func__); |
2051 | status = -EINVAL; | 2051 | status = -EINVAL; |
2052 | goto release_es_lock; | 2052 | goto release_es_lock; |
2053 | } | 2053 | } |
@@ -2056,7 +2056,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) | |||
2056 | urb->dev = dev; | 2056 | urb->dev = dev; |
2057 | status = usb_submit_urb (urb, GFP_KERNEL); | 2057 | status = usb_submit_urb (urb, GFP_KERNEL); |
2058 | if (status) { | 2058 | if (status) { |
2059 | dev_err (&port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status); | 2059 | dev_err (&port->dev, "%s - usb_submit_urb failed with value %d\n", __func__, status); |
2060 | goto release_es_lock; | 2060 | goto release_es_lock; |
2061 | } | 2061 | } |
2062 | } | 2062 | } |
@@ -2071,7 +2071,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) | |||
2071 | /* start up our bulk read urb */ | 2071 | /* start up our bulk read urb */ |
2072 | urb = port->read_urb; | 2072 | urb = port->read_urb; |
2073 | if (!urb) { | 2073 | if (!urb) { |
2074 | dev_err (&port->dev, "%s - no read urb present, exiting\n", __FUNCTION__); | 2074 | dev_err (&port->dev, "%s - no read urb present, exiting\n", __func__); |
2075 | status = -EINVAL; | 2075 | status = -EINVAL; |
2076 | goto unlink_int_urb; | 2076 | goto unlink_int_urb; |
2077 | } | 2077 | } |
@@ -2081,13 +2081,13 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) | |||
2081 | urb->dev = dev; | 2081 | urb->dev = dev; |
2082 | status = usb_submit_urb (urb, GFP_KERNEL); | 2082 | status = usb_submit_urb (urb, GFP_KERNEL); |
2083 | if (status) { | 2083 | if (status) { |
2084 | dev_err (&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status); | 2084 | dev_err (&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __func__, status); |
2085 | goto unlink_int_urb; | 2085 | goto unlink_int_urb; |
2086 | } | 2086 | } |
2087 | 2087 | ||
2088 | ++edge_serial->num_ports_open; | 2088 | ++edge_serial->num_ports_open; |
2089 | 2089 | ||
2090 | dbg("%s - exited", __FUNCTION__); | 2090 | dbg("%s - exited", __func__); |
2091 | 2091 | ||
2092 | goto release_es_lock; | 2092 | goto release_es_lock; |
2093 | 2093 | ||
@@ -2106,7 +2106,7 @@ static void edge_close (struct usb_serial_port *port, struct file *filp) | |||
2106 | int port_number; | 2106 | int port_number; |
2107 | int status; | 2107 | int status; |
2108 | 2108 | ||
2109 | dbg("%s - port %d", __FUNCTION__, port->number); | 2109 | dbg("%s - port %d", __func__, port->number); |
2110 | 2110 | ||
2111 | edge_serial = usb_get_serial_data(port->serial); | 2111 | edge_serial = usb_get_serial_data(port->serial); |
2112 | edge_port = usb_get_serial_port_data(port); | 2112 | edge_port = usb_get_serial_port_data(port); |
@@ -2126,7 +2126,7 @@ static void edge_close (struct usb_serial_port *port, struct file *filp) | |||
2126 | 2126 | ||
2127 | /* assuming we can still talk to the device, | 2127 | /* assuming we can still talk to the device, |
2128 | * send a close port command to it */ | 2128 | * send a close port command to it */ |
2129 | dbg("%s - send umpc_close_port", __FUNCTION__); | 2129 | dbg("%s - send umpc_close_port", __func__); |
2130 | port_number = port->number - port->serial->minor; | 2130 | port_number = port->number - port->serial->minor; |
2131 | status = TIWriteCommandSync (port->serial->dev, | 2131 | status = TIWriteCommandSync (port->serial->dev, |
2132 | UMPC_CLOSE_PORT, | 2132 | UMPC_CLOSE_PORT, |
@@ -2144,7 +2144,7 @@ static void edge_close (struct usb_serial_port *port, struct file *filp) | |||
2144 | mutex_unlock(&edge_serial->es_lock); | 2144 | mutex_unlock(&edge_serial->es_lock); |
2145 | edge_port->close_pending = 0; | 2145 | edge_port->close_pending = 0; |
2146 | 2146 | ||
2147 | dbg("%s - exited", __FUNCTION__); | 2147 | dbg("%s - exited", __func__); |
2148 | } | 2148 | } |
2149 | 2149 | ||
2150 | static int edge_write (struct usb_serial_port *port, const unsigned char *data, int count) | 2150 | static int edge_write (struct usb_serial_port *port, const unsigned char *data, int count) |
@@ -2152,10 +2152,10 @@ static int edge_write (struct usb_serial_port *port, const unsigned char *data, | |||
2152 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); | 2152 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); |
2153 | unsigned long flags; | 2153 | unsigned long flags; |
2154 | 2154 | ||
2155 | dbg("%s - port %d", __FUNCTION__, port->number); | 2155 | dbg("%s - port %d", __func__, port->number); |
2156 | 2156 | ||
2157 | if (count == 0) { | 2157 | if (count == 0) { |
2158 | dbg("%s - write request of 0 bytes", __FUNCTION__); | 2158 | dbg("%s - write request of 0 bytes", __func__); |
2159 | return 0; | 2159 | return 0; |
2160 | } | 2160 | } |
2161 | 2161 | ||
@@ -2181,7 +2181,7 @@ static void edge_send(struct usb_serial_port *port) | |||
2181 | unsigned long flags; | 2181 | unsigned long flags; |
2182 | 2182 | ||
2183 | 2183 | ||
2184 | dbg("%s - port %d", __FUNCTION__, port->number); | 2184 | dbg("%s - port %d", __func__, port->number); |
2185 | 2185 | ||
2186 | spin_lock_irqsave(&edge_port->ep_lock, flags); | 2186 | spin_lock_irqsave(&edge_port->ep_lock, flags); |
2187 | 2187 | ||
@@ -2203,7 +2203,7 @@ static void edge_send(struct usb_serial_port *port) | |||
2203 | 2203 | ||
2204 | spin_unlock_irqrestore(&edge_port->ep_lock, flags); | 2204 | spin_unlock_irqrestore(&edge_port->ep_lock, flags); |
2205 | 2205 | ||
2206 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer); | 2206 | usb_serial_debug_data(debug, &port->dev, __func__, count, port->write_urb->transfer_buffer); |
2207 | 2207 | ||
2208 | /* set up our urb */ | 2208 | /* set up our urb */ |
2209 | usb_fill_bulk_urb (port->write_urb, port->serial->dev, | 2209 | usb_fill_bulk_urb (port->write_urb, port->serial->dev, |
@@ -2216,7 +2216,7 @@ static void edge_send(struct usb_serial_port *port) | |||
2216 | /* send the data out the bulk port */ | 2216 | /* send the data out the bulk port */ |
2217 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); | 2217 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); |
2218 | if (result) { | 2218 | if (result) { |
2219 | dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result); | 2219 | dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, result); |
2220 | edge_port->ep_write_urb_in_use = 0; | 2220 | edge_port->ep_write_urb_in_use = 0; |
2221 | // TODO: reschedule edge_send | 2221 | // TODO: reschedule edge_send |
2222 | } else { | 2222 | } else { |
@@ -2237,7 +2237,7 @@ static int edge_write_room (struct usb_serial_port *port) | |||
2237 | int room = 0; | 2237 | int room = 0; |
2238 | unsigned long flags; | 2238 | unsigned long flags; |
2239 | 2239 | ||
2240 | dbg("%s - port %d", __FUNCTION__, port->number); | 2240 | dbg("%s - port %d", __func__, port->number); |
2241 | 2241 | ||
2242 | if (edge_port == NULL) | 2242 | if (edge_port == NULL) |
2243 | return -ENODEV; | 2243 | return -ENODEV; |
@@ -2248,7 +2248,7 @@ static int edge_write_room (struct usb_serial_port *port) | |||
2248 | room = edge_buf_space_avail(edge_port->ep_out_buf); | 2248 | room = edge_buf_space_avail(edge_port->ep_out_buf); |
2249 | spin_unlock_irqrestore(&edge_port->ep_lock, flags); | 2249 | spin_unlock_irqrestore(&edge_port->ep_lock, flags); |
2250 | 2250 | ||
2251 | dbg("%s - returns %d", __FUNCTION__, room); | 2251 | dbg("%s - returns %d", __func__, room); |
2252 | return room; | 2252 | return room; |
2253 | } | 2253 | } |
2254 | 2254 | ||
@@ -2258,7 +2258,7 @@ static int edge_chars_in_buffer (struct usb_serial_port *port) | |||
2258 | int chars = 0; | 2258 | int chars = 0; |
2259 | unsigned long flags; | 2259 | unsigned long flags; |
2260 | 2260 | ||
2261 | dbg("%s - port %d", __FUNCTION__, port->number); | 2261 | dbg("%s - port %d", __func__, port->number); |
2262 | 2262 | ||
2263 | if (edge_port == NULL) | 2263 | if (edge_port == NULL) |
2264 | return -ENODEV; | 2264 | return -ENODEV; |
@@ -2269,7 +2269,7 @@ static int edge_chars_in_buffer (struct usb_serial_port *port) | |||
2269 | chars = edge_buf_data_avail(edge_port->ep_out_buf); | 2269 | chars = edge_buf_data_avail(edge_port->ep_out_buf); |
2270 | spin_unlock_irqrestore(&edge_port->ep_lock, flags); | 2270 | spin_unlock_irqrestore(&edge_port->ep_lock, flags); |
2271 | 2271 | ||
2272 | dbg ("%s - returns %d", __FUNCTION__, chars); | 2272 | dbg ("%s - returns %d", __func__, chars); |
2273 | return chars; | 2273 | return chars; |
2274 | } | 2274 | } |
2275 | 2275 | ||
@@ -2279,14 +2279,14 @@ static void edge_throttle (struct usb_serial_port *port) | |||
2279 | struct tty_struct *tty; | 2279 | struct tty_struct *tty; |
2280 | int status; | 2280 | int status; |
2281 | 2281 | ||
2282 | dbg("%s - port %d", __FUNCTION__, port->number); | 2282 | dbg("%s - port %d", __func__, port->number); |
2283 | 2283 | ||
2284 | if (edge_port == NULL) | 2284 | if (edge_port == NULL) |
2285 | return; | 2285 | return; |
2286 | 2286 | ||
2287 | tty = port->tty; | 2287 | tty = port->tty; |
2288 | if (!tty) { | 2288 | if (!tty) { |
2289 | dbg ("%s - no tty available", __FUNCTION__); | 2289 | dbg ("%s - no tty available", __func__); |
2290 | return; | 2290 | return; |
2291 | } | 2291 | } |
2292 | 2292 | ||
@@ -2295,7 +2295,7 @@ static void edge_throttle (struct usb_serial_port *port) | |||
2295 | unsigned char stop_char = STOP_CHAR(tty); | 2295 | unsigned char stop_char = STOP_CHAR(tty); |
2296 | status = edge_write (port, &stop_char, 1); | 2296 | status = edge_write (port, &stop_char, 1); |
2297 | if (status <= 0) { | 2297 | if (status <= 0) { |
2298 | dev_err(&port->dev, "%s - failed to write stop character, %d\n", __FUNCTION__, status); | 2298 | dev_err(&port->dev, "%s - failed to write stop character, %d\n", __func__, status); |
2299 | } | 2299 | } |
2300 | } | 2300 | } |
2301 | 2301 | ||
@@ -2312,14 +2312,14 @@ static void edge_unthrottle (struct usb_serial_port *port) | |||
2312 | struct tty_struct *tty; | 2312 | struct tty_struct *tty; |
2313 | int status; | 2313 | int status; |
2314 | 2314 | ||
2315 | dbg("%s - port %d", __FUNCTION__, port->number); | 2315 | dbg("%s - port %d", __func__, port->number); |
2316 | 2316 | ||
2317 | if (edge_port == NULL) | 2317 | if (edge_port == NULL) |
2318 | return; | 2318 | return; |
2319 | 2319 | ||
2320 | tty = port->tty; | 2320 | tty = port->tty; |
2321 | if (!tty) { | 2321 | if (!tty) { |
2322 | dbg ("%s - no tty available", __FUNCTION__); | 2322 | dbg ("%s - no tty available", __func__); |
2323 | return; | 2323 | return; |
2324 | } | 2324 | } |
2325 | 2325 | ||
@@ -2328,7 +2328,7 @@ static void edge_unthrottle (struct usb_serial_port *port) | |||
2328 | unsigned char start_char = START_CHAR(tty); | 2328 | unsigned char start_char = START_CHAR(tty); |
2329 | status = edge_write (port, &start_char, 1); | 2329 | status = edge_write (port, &start_char, 1); |
2330 | if (status <= 0) { | 2330 | if (status <= 0) { |
2331 | dev_err(&port->dev, "%s - failed to write start character, %d\n", __FUNCTION__, status); | 2331 | dev_err(&port->dev, "%s - failed to write start character, %d\n", __func__, status); |
2332 | } | 2332 | } |
2333 | } | 2333 | } |
2334 | 2334 | ||
@@ -2337,7 +2337,7 @@ static void edge_unthrottle (struct usb_serial_port *port) | |||
2337 | if (C_CRTSCTS(tty)) { | 2337 | if (C_CRTSCTS(tty)) { |
2338 | status = restart_read(edge_port); | 2338 | status = restart_read(edge_port); |
2339 | if (status) | 2339 | if (status) |
2340 | dev_err(&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status); | 2340 | dev_err(&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __func__, status); |
2341 | } | 2341 | } |
2342 | 2342 | ||
2343 | } | 2343 | } |
@@ -2387,13 +2387,13 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi | |||
2387 | int status; | 2387 | int status; |
2388 | int port_number = edge_port->port->number - edge_port->port->serial->minor; | 2388 | int port_number = edge_port->port->number - edge_port->port->serial->minor; |
2389 | 2389 | ||
2390 | dbg("%s - port %d", __FUNCTION__, edge_port->port->number); | 2390 | dbg("%s - port %d", __func__, edge_port->port->number); |
2391 | 2391 | ||
2392 | tty = edge_port->port->tty; | 2392 | tty = edge_port->port->tty; |
2393 | 2393 | ||
2394 | config = kmalloc (sizeof (*config), GFP_KERNEL); | 2394 | config = kmalloc (sizeof (*config), GFP_KERNEL); |
2395 | if (!config) { | 2395 | if (!config) { |
2396 | dev_err (&edge_port->port->dev, "%s - out of memory\n", __FUNCTION__); | 2396 | dev_err (&edge_port->port->dev, "%s - out of memory\n", __func__); |
2397 | return; | 2397 | return; |
2398 | } | 2398 | } |
2399 | 2399 | ||
@@ -2409,20 +2409,20 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi | |||
2409 | switch (cflag & CSIZE) { | 2409 | switch (cflag & CSIZE) { |
2410 | case CS5: | 2410 | case CS5: |
2411 | config->bDataBits = UMP_UART_CHAR5BITS; | 2411 | config->bDataBits = UMP_UART_CHAR5BITS; |
2412 | dbg ("%s - data bits = 5", __FUNCTION__); | 2412 | dbg ("%s - data bits = 5", __func__); |
2413 | break; | 2413 | break; |
2414 | case CS6: | 2414 | case CS6: |
2415 | config->bDataBits = UMP_UART_CHAR6BITS; | 2415 | config->bDataBits = UMP_UART_CHAR6BITS; |
2416 | dbg ("%s - data bits = 6", __FUNCTION__); | 2416 | dbg ("%s - data bits = 6", __func__); |
2417 | break; | 2417 | break; |
2418 | case CS7: | 2418 | case CS7: |
2419 | config->bDataBits = UMP_UART_CHAR7BITS; | 2419 | config->bDataBits = UMP_UART_CHAR7BITS; |
2420 | dbg ("%s - data bits = 7", __FUNCTION__); | 2420 | dbg ("%s - data bits = 7", __func__); |
2421 | break; | 2421 | break; |
2422 | default: | 2422 | default: |
2423 | case CS8: | 2423 | case CS8: |
2424 | config->bDataBits = UMP_UART_CHAR8BITS; | 2424 | config->bDataBits = UMP_UART_CHAR8BITS; |
2425 | dbg ("%s - data bits = 8", __FUNCTION__); | 2425 | dbg ("%s - data bits = 8", __func__); |
2426 | break; | 2426 | break; |
2427 | } | 2427 | } |
2428 | 2428 | ||
@@ -2430,32 +2430,32 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi | |||
2430 | if (cflag & PARODD) { | 2430 | if (cflag & PARODD) { |
2431 | config->wFlags |= UMP_MASK_UART_FLAGS_PARITY; | 2431 | config->wFlags |= UMP_MASK_UART_FLAGS_PARITY; |
2432 | config->bParity = UMP_UART_ODDPARITY; | 2432 | config->bParity = UMP_UART_ODDPARITY; |
2433 | dbg("%s - parity = odd", __FUNCTION__); | 2433 | dbg("%s - parity = odd", __func__); |
2434 | } else { | 2434 | } else { |
2435 | config->wFlags |= UMP_MASK_UART_FLAGS_PARITY; | 2435 | config->wFlags |= UMP_MASK_UART_FLAGS_PARITY; |
2436 | config->bParity = UMP_UART_EVENPARITY; | 2436 | config->bParity = UMP_UART_EVENPARITY; |
2437 | dbg("%s - parity = even", __FUNCTION__); | 2437 | dbg("%s - parity = even", __func__); |
2438 | } | 2438 | } |
2439 | } else { | 2439 | } else { |
2440 | config->bParity = UMP_UART_NOPARITY; | 2440 | config->bParity = UMP_UART_NOPARITY; |
2441 | dbg("%s - parity = none", __FUNCTION__); | 2441 | dbg("%s - parity = none", __func__); |
2442 | } | 2442 | } |
2443 | 2443 | ||
2444 | if (cflag & CSTOPB) { | 2444 | if (cflag & CSTOPB) { |
2445 | config->bStopBits = UMP_UART_STOPBIT2; | 2445 | config->bStopBits = UMP_UART_STOPBIT2; |
2446 | dbg("%s - stop bits = 2", __FUNCTION__); | 2446 | dbg("%s - stop bits = 2", __func__); |
2447 | } else { | 2447 | } else { |
2448 | config->bStopBits = UMP_UART_STOPBIT1; | 2448 | config->bStopBits = UMP_UART_STOPBIT1; |
2449 | dbg("%s - stop bits = 1", __FUNCTION__); | 2449 | dbg("%s - stop bits = 1", __func__); |
2450 | } | 2450 | } |
2451 | 2451 | ||
2452 | /* figure out the flow control settings */ | 2452 | /* figure out the flow control settings */ |
2453 | if (cflag & CRTSCTS) { | 2453 | if (cflag & CRTSCTS) { |
2454 | config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW; | 2454 | config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW; |
2455 | config->wFlags |= UMP_MASK_UART_FLAGS_RTS_FLOW; | 2455 | config->wFlags |= UMP_MASK_UART_FLAGS_RTS_FLOW; |
2456 | dbg("%s - RTS/CTS is enabled", __FUNCTION__); | 2456 | dbg("%s - RTS/CTS is enabled", __func__); |
2457 | } else { | 2457 | } else { |
2458 | dbg("%s - RTS/CTS is disabled", __FUNCTION__); | 2458 | dbg("%s - RTS/CTS is disabled", __func__); |
2459 | tty->hw_stopped = 0; | 2459 | tty->hw_stopped = 0; |
2460 | restart_read(edge_port); | 2460 | restart_read(edge_port); |
2461 | } | 2461 | } |
@@ -2469,18 +2469,18 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi | |||
2469 | if (I_IXOFF(tty)) { | 2469 | if (I_IXOFF(tty)) { |
2470 | config->wFlags |= UMP_MASK_UART_FLAGS_IN_X; | 2470 | config->wFlags |= UMP_MASK_UART_FLAGS_IN_X; |
2471 | dbg ("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", | 2471 | dbg ("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", |
2472 | __FUNCTION__, config->cXon, config->cXoff); | 2472 | __func__, config->cXon, config->cXoff); |
2473 | } else { | 2473 | } else { |
2474 | dbg ("%s - INBOUND XON/XOFF is disabled", __FUNCTION__); | 2474 | dbg ("%s - INBOUND XON/XOFF is disabled", __func__); |
2475 | } | 2475 | } |
2476 | 2476 | ||
2477 | /* if we are implementing OUTBOUND XON/XOFF */ | 2477 | /* if we are implementing OUTBOUND XON/XOFF */ |
2478 | if (I_IXON(tty)) { | 2478 | if (I_IXON(tty)) { |
2479 | config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X; | 2479 | config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X; |
2480 | dbg ("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", | 2480 | dbg ("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", |
2481 | __FUNCTION__, config->cXon, config->cXoff); | 2481 | __func__, config->cXon, config->cXoff); |
2482 | } else { | 2482 | } else { |
2483 | dbg ("%s - OUTBOUND XON/XOFF is disabled", __FUNCTION__); | 2483 | dbg ("%s - OUTBOUND XON/XOFF is disabled", __func__); |
2484 | } | 2484 | } |
2485 | } | 2485 | } |
2486 | 2486 | ||
@@ -2499,7 +2499,7 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi | |||
2499 | 2499 | ||
2500 | /* FIXME: Recompute actual baud from divisor here */ | 2500 | /* FIXME: Recompute actual baud from divisor here */ |
2501 | 2501 | ||
2502 | dbg ("%s - baud rate = %d, wBaudRate = %d", __FUNCTION__, baud, config->wBaudRate); | 2502 | dbg ("%s - baud rate = %d, wBaudRate = %d", __func__, baud, config->wBaudRate); |
2503 | 2503 | ||
2504 | dbg ("wBaudRate: %d", (int)(461550L / config->wBaudRate)); | 2504 | dbg ("wBaudRate: %d", (int)(461550L / config->wBaudRate)); |
2505 | dbg ("wFlags: 0x%x", config->wFlags); | 2505 | dbg ("wFlags: 0x%x", config->wFlags); |
@@ -2522,7 +2522,7 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi | |||
2522 | sizeof(*config)); | 2522 | sizeof(*config)); |
2523 | if (status) { | 2523 | if (status) { |
2524 | dbg ("%s - error %d when trying to write config to device", | 2524 | dbg ("%s - error %d when trying to write config to device", |
2525 | __FUNCTION__, status); | 2525 | __func__, status); |
2526 | } | 2526 | } |
2527 | 2527 | ||
2528 | kfree (config); | 2528 | kfree (config); |
@@ -2538,12 +2538,12 @@ static void edge_set_termios (struct usb_serial_port *port, struct ktermios *old | |||
2538 | 2538 | ||
2539 | cflag = tty->termios->c_cflag; | 2539 | cflag = tty->termios->c_cflag; |
2540 | 2540 | ||
2541 | dbg("%s - clfag %08x iflag %08x", __FUNCTION__, | 2541 | dbg("%s - clfag %08x iflag %08x", __func__, |
2542 | tty->termios->c_cflag, tty->termios->c_iflag); | 2542 | tty->termios->c_cflag, tty->termios->c_iflag); |
2543 | dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__, | 2543 | dbg("%s - old clfag %08x old iflag %08x", __func__, |
2544 | old_termios->c_cflag, old_termios->c_iflag); | 2544 | old_termios->c_cflag, old_termios->c_iflag); |
2545 | 2545 | ||
2546 | dbg("%s - port %d", __FUNCTION__, port->number); | 2546 | dbg("%s - port %d", __func__, port->number); |
2547 | 2547 | ||
2548 | if (edge_port == NULL) | 2548 | if (edge_port == NULL) |
2549 | return; | 2549 | return; |
@@ -2560,7 +2560,7 @@ static int edge_tiocmset (struct usb_serial_port *port, struct file *file, unsig | |||
2560 | unsigned int mcr; | 2560 | unsigned int mcr; |
2561 | unsigned long flags; | 2561 | unsigned long flags; |
2562 | 2562 | ||
2563 | dbg("%s - port %d", __FUNCTION__, port->number); | 2563 | dbg("%s - port %d", __func__, port->number); |
2564 | 2564 | ||
2565 | spin_lock_irqsave(&edge_port->ep_lock, flags); | 2565 | spin_lock_irqsave(&edge_port->ep_lock, flags); |
2566 | mcr = edge_port->shadow_mcr; | 2566 | mcr = edge_port->shadow_mcr; |
@@ -2594,7 +2594,7 @@ static int edge_tiocmget(struct usb_serial_port *port, struct file *file) | |||
2594 | unsigned int mcr; | 2594 | unsigned int mcr; |
2595 | unsigned long flags; | 2595 | unsigned long flags; |
2596 | 2596 | ||
2597 | dbg("%s - port %d", __FUNCTION__, port->number); | 2597 | dbg("%s - port %d", __func__, port->number); |
2598 | 2598 | ||
2599 | spin_lock_irqsave(&edge_port->ep_lock, flags); | 2599 | spin_lock_irqsave(&edge_port->ep_lock, flags); |
2600 | 2600 | ||
@@ -2608,7 +2608,7 @@ static int edge_tiocmget(struct usb_serial_port *port, struct file *file) | |||
2608 | | ((msr & EDGEPORT_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */ | 2608 | | ((msr & EDGEPORT_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */ |
2609 | 2609 | ||
2610 | 2610 | ||
2611 | dbg("%s -- %x", __FUNCTION__, result); | 2611 | dbg("%s -- %x", __func__, result); |
2612 | spin_unlock_irqrestore(&edge_port->ep_lock, flags); | 2612 | spin_unlock_irqrestore(&edge_port->ep_lock, flags); |
2613 | 2613 | ||
2614 | return result; | 2614 | return result; |
@@ -2648,30 +2648,30 @@ static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned | |||
2648 | struct async_icount cnow; | 2648 | struct async_icount cnow; |
2649 | struct async_icount cprev; | 2649 | struct async_icount cprev; |
2650 | 2650 | ||
2651 | dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd); | 2651 | dbg("%s - port %d, cmd = 0x%x", __func__, port->number, cmd); |
2652 | 2652 | ||
2653 | switch (cmd) { | 2653 | switch (cmd) { |
2654 | case TIOCINQ: | 2654 | case TIOCINQ: |
2655 | dbg("%s - (%d) TIOCINQ", __FUNCTION__, port->number); | 2655 | dbg("%s - (%d) TIOCINQ", __func__, port->number); |
2656 | // return get_number_bytes_avail(edge_port, (unsigned int *) arg); | 2656 | // return get_number_bytes_avail(edge_port, (unsigned int *) arg); |
2657 | break; | 2657 | break; |
2658 | 2658 | ||
2659 | case TIOCSERGETLSR: | 2659 | case TIOCSERGETLSR: |
2660 | dbg("%s - (%d) TIOCSERGETLSR", __FUNCTION__, port->number); | 2660 | dbg("%s - (%d) TIOCSERGETLSR", __func__, port->number); |
2661 | // return get_lsr_info(edge_port, (unsigned int *) arg); | 2661 | // return get_lsr_info(edge_port, (unsigned int *) arg); |
2662 | break; | 2662 | break; |
2663 | 2663 | ||
2664 | case TIOCGSERIAL: | 2664 | case TIOCGSERIAL: |
2665 | dbg("%s - (%d) TIOCGSERIAL", __FUNCTION__, port->number); | 2665 | dbg("%s - (%d) TIOCGSERIAL", __func__, port->number); |
2666 | return get_serial_info(edge_port, (struct serial_struct __user *) arg); | 2666 | return get_serial_info(edge_port, (struct serial_struct __user *) arg); |
2667 | break; | 2667 | break; |
2668 | 2668 | ||
2669 | case TIOCSSERIAL: | 2669 | case TIOCSSERIAL: |
2670 | dbg("%s - (%d) TIOCSSERIAL", __FUNCTION__, port->number); | 2670 | dbg("%s - (%d) TIOCSSERIAL", __func__, port->number); |
2671 | break; | 2671 | break; |
2672 | 2672 | ||
2673 | case TIOCMIWAIT: | 2673 | case TIOCMIWAIT: |
2674 | dbg("%s - (%d) TIOCMIWAIT", __FUNCTION__, port->number); | 2674 | dbg("%s - (%d) TIOCMIWAIT", __func__, port->number); |
2675 | cprev = edge_port->icount; | 2675 | cprev = edge_port->icount; |
2676 | while (1) { | 2676 | while (1) { |
2677 | interruptible_sleep_on(&edge_port->delta_msr_wait); | 2677 | interruptible_sleep_on(&edge_port->delta_msr_wait); |
@@ -2694,7 +2694,7 @@ static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned | |||
2694 | break; | 2694 | break; |
2695 | 2695 | ||
2696 | case TIOCGICOUNT: | 2696 | case TIOCGICOUNT: |
2697 | dbg ("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, | 2697 | dbg ("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __func__, |
2698 | port->number, edge_port->icount.rx, edge_port->icount.tx); | 2698 | port->number, edge_port->icount.rx, edge_port->icount.tx); |
2699 | if (copy_to_user((void __user *)arg, &edge_port->icount, sizeof(edge_port->icount))) | 2699 | if (copy_to_user((void __user *)arg, &edge_port->icount, sizeof(edge_port->icount))) |
2700 | return -EFAULT; | 2700 | return -EFAULT; |
@@ -2709,7 +2709,7 @@ static void edge_break (struct usb_serial_port *port, int break_state) | |||
2709 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); | 2709 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); |
2710 | int status; | 2710 | int status; |
2711 | 2711 | ||
2712 | dbg ("%s - state = %d", __FUNCTION__, break_state); | 2712 | dbg ("%s - state = %d", __func__, break_state); |
2713 | 2713 | ||
2714 | /* chase the port close */ | 2714 | /* chase the port close */ |
2715 | TIChasePort (edge_port, 0, 0); | 2715 | TIChasePort (edge_port, 0, 0); |
@@ -2721,7 +2721,7 @@ static void edge_break (struct usb_serial_port *port, int break_state) | |||
2721 | } | 2721 | } |
2722 | if (status) { | 2722 | if (status) { |
2723 | dbg ("%s - error %d sending break set/clear command.", | 2723 | dbg ("%s - error %d sending break set/clear command.", |
2724 | __FUNCTION__, status); | 2724 | __func__, status); |
2725 | } | 2725 | } |
2726 | } | 2726 | } |
2727 | 2727 | ||
@@ -2738,7 +2738,7 @@ static int edge_startup (struct usb_serial *serial) | |||
2738 | /* create our private serial structure */ | 2738 | /* create our private serial structure */ |
2739 | edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL); | 2739 | edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL); |
2740 | if (edge_serial == NULL) { | 2740 | if (edge_serial == NULL) { |
2741 | dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); | 2741 | dev_err(&serial->dev->dev, "%s - Out of memory\n", __func__); |
2742 | return -ENOMEM; | 2742 | return -ENOMEM; |
2743 | } | 2743 | } |
2744 | mutex_init(&edge_serial->es_lock); | 2744 | mutex_init(&edge_serial->es_lock); |
@@ -2755,13 +2755,13 @@ static int edge_startup (struct usb_serial *serial) | |||
2755 | for (i = 0; i < serial->num_ports; ++i) { | 2755 | for (i = 0; i < serial->num_ports; ++i) { |
2756 | edge_port = kzalloc(sizeof(struct edgeport_port), GFP_KERNEL); | 2756 | edge_port = kzalloc(sizeof(struct edgeport_port), GFP_KERNEL); |
2757 | if (edge_port == NULL) { | 2757 | if (edge_port == NULL) { |
2758 | dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); | 2758 | dev_err(&serial->dev->dev, "%s - Out of memory\n", __func__); |
2759 | goto cleanup; | 2759 | goto cleanup; |
2760 | } | 2760 | } |
2761 | spin_lock_init(&edge_port->ep_lock); | 2761 | spin_lock_init(&edge_port->ep_lock); |
2762 | edge_port->ep_out_buf = edge_buf_alloc(EDGE_OUT_BUF_SIZE); | 2762 | edge_port->ep_out_buf = edge_buf_alloc(EDGE_OUT_BUF_SIZE); |
2763 | if (edge_port->ep_out_buf == NULL) { | 2763 | if (edge_port->ep_out_buf == NULL) { |
2764 | dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); | 2764 | dev_err(&serial->dev->dev, "%s - Out of memory\n", __func__); |
2765 | kfree(edge_port); | 2765 | kfree(edge_port); |
2766 | goto cleanup; | 2766 | goto cleanup; |
2767 | } | 2767 | } |
@@ -2790,7 +2790,7 @@ static void edge_shutdown (struct usb_serial *serial) | |||
2790 | int i; | 2790 | int i; |
2791 | struct edgeport_port *edge_port; | 2791 | struct edgeport_port *edge_port; |
2792 | 2792 | ||
2793 | dbg ("%s", __FUNCTION__); | 2793 | dbg ("%s", __func__); |
2794 | 2794 | ||
2795 | for (i = 0; i < serial->num_ports; ++i) { | 2795 | for (i = 0; i < serial->num_ports; ++i) { |
2796 | edge_port = usb_get_serial_port_data(serial->port[i]); | 2796 | edge_port = usb_get_serial_port_data(serial->port[i]); |
@@ -2822,12 +2822,12 @@ static ssize_t store_uart_mode(struct device *dev, | |||
2822 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); | 2822 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); |
2823 | unsigned int v = simple_strtoul(valbuf, NULL, 0); | 2823 | unsigned int v = simple_strtoul(valbuf, NULL, 0); |
2824 | 2824 | ||
2825 | dbg("%s: setting uart_mode = %d", __FUNCTION__, v); | 2825 | dbg("%s: setting uart_mode = %d", __func__, v); |
2826 | 2826 | ||
2827 | if (v < 256) | 2827 | if (v < 256) |
2828 | edge_port->bUartMode = v; | 2828 | edge_port->bUartMode = v; |
2829 | else | 2829 | else |
2830 | dev_err(dev, "%s - uart_mode %d is invalid\n", __FUNCTION__, v); | 2830 | dev_err(dev, "%s - uart_mode %d is invalid\n", __func__, v); |
2831 | 2831 | ||
2832 | return count; | 2832 | return count; |
2833 | } | 2833 | } |