aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/sddr09.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/storage/sddr09.c')
-rw-r--r--drivers/usb/storage/sddr09.c146
1 files changed, 70 insertions, 76 deletions
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c
index 7bd54e0d5120..732027f33200 100644
--- a/drivers/usb/storage/sddr09.c
+++ b/drivers/usb/storage/sddr09.c
@@ -105,8 +105,6 @@ static struct us_unusual_dev sddr09_unusual_dev_list[] = {
105#define LSB_of(s) ((s)&0xFF) 105#define LSB_of(s) ((s)&0xFF)
106#define MSB_of(s) ((s)>>8) 106#define MSB_of(s) ((s)>>8)
107 107
108/* #define US_DEBUGP printk */
109
110/* 108/*
111 * First some stuff that does not belong here: 109 * First some stuff that does not belong here:
112 * data on SmartMedia and other cards, completely 110 * data on SmartMedia and other cards, completely
@@ -347,7 +345,7 @@ sddr09_test_unit_ready(struct us_data *us) {
347 345
348 result = sddr09_send_scsi_command(us, command, 6); 346 result = sddr09_send_scsi_command(us, command, 6);
349 347
350 US_DEBUGP("sddr09_test_unit_ready returns %d\n", result); 348 usb_stor_dbg(us, "sddr09_test_unit_ready returns %d\n", result);
351 349
352 return result; 350 return result;
353} 351}
@@ -423,8 +421,8 @@ sddr09_readX(struct us_data *us, int x, unsigned long fromaddress,
423 result = sddr09_send_scsi_command(us, command, 12); 421 result = sddr09_send_scsi_command(us, command, 12);
424 422
425 if (result) { 423 if (result) {
426 US_DEBUGP("Result for send_control in sddr09_read2%d %d\n", 424 usb_stor_dbg(us, "Result for send_control in sddr09_read2%d %d\n",
427 x, result); 425 x, result);
428 return result; 426 return result;
429 } 427 }
430 428
@@ -432,8 +430,8 @@ sddr09_readX(struct us_data *us, int x, unsigned long fromaddress,
432 buf, bulklen, use_sg, NULL); 430 buf, bulklen, use_sg, NULL);
433 431
434 if (result != USB_STOR_XFER_GOOD) { 432 if (result != USB_STOR_XFER_GOOD) {
435 US_DEBUGP("Result for bulk_transfer in sddr09_read2%d %d\n", 433 usb_stor_dbg(us, "Result for bulk_transfer in sddr09_read2%d %d\n",
436 x, result); 434 x, result);
437 return -EIO; 435 return -EIO;
438 } 436 }
439 return 0; 437 return 0;
@@ -494,8 +492,7 @@ sddr09_read22(struct us_data *us, unsigned long fromaddress,
494 int nr_of_pages, int pageshift, unsigned char *buf, int use_sg) { 492 int nr_of_pages, int pageshift, unsigned char *buf, int use_sg) {
495 493
496 int bulklen = (nr_of_pages << pageshift) + (nr_of_pages << CONTROL_SHIFT); 494 int bulklen = (nr_of_pages << pageshift) + (nr_of_pages << CONTROL_SHIFT);
497 US_DEBUGP("sddr09_read22: reading %d pages, %d bytes\n", 495 usb_stor_dbg(us, "reading %d pages, %d bytes\n", nr_of_pages, bulklen);
498 nr_of_pages, bulklen);
499 return sddr09_readX(us, 2, fromaddress, nr_of_pages, bulklen, 496 return sddr09_readX(us, 2, fromaddress, nr_of_pages, bulklen,
500 buf, use_sg); 497 buf, use_sg);
501} 498}
@@ -538,7 +535,7 @@ sddr09_erase(struct us_data *us, unsigned long Eaddress) {
538 unsigned char *command = us->iobuf; 535 unsigned char *command = us->iobuf;
539 int result; 536 int result;
540 537
541 US_DEBUGP("sddr09_erase: erase address %lu\n", Eaddress); 538 usb_stor_dbg(us, "erase address %lu\n", Eaddress);
542 539
543 memset(command, 0, 12); 540 memset(command, 0, 12);
544 command[0] = 0xEA; 541 command[0] = 0xEA;
@@ -551,8 +548,8 @@ sddr09_erase(struct us_data *us, unsigned long Eaddress) {
551 result = sddr09_send_scsi_command(us, command, 12); 548 result = sddr09_send_scsi_command(us, command, 12);
552 549
553 if (result) 550 if (result)
554 US_DEBUGP("Result for send_control in sddr09_erase %d\n", 551 usb_stor_dbg(us, "Result for send_control in sddr09_erase %d\n",
555 result); 552 result);
556 553
557 return result; 554 return result;
558} 555}
@@ -609,8 +606,8 @@ sddr09_writeX(struct us_data *us,
609 result = sddr09_send_scsi_command(us, command, 12); 606 result = sddr09_send_scsi_command(us, command, 12);
610 607
611 if (result) { 608 if (result) {
612 US_DEBUGP("Result for send_control in sddr09_writeX %d\n", 609 usb_stor_dbg(us, "Result for send_control in sddr09_writeX %d\n",
613 result); 610 result);
614 return result; 611 return result;
615 } 612 }
616 613
@@ -618,8 +615,8 @@ sddr09_writeX(struct us_data *us,
618 buf, bulklen, use_sg, NULL); 615 buf, bulklen, use_sg, NULL);
619 616
620 if (result != USB_STOR_XFER_GOOD) { 617 if (result != USB_STOR_XFER_GOOD) {
621 US_DEBUGP("Result for bulk_transfer in sddr09_writeX %d\n", 618 usb_stor_dbg(us, "Result for bulk_transfer in sddr09_writeX %d\n",
622 result); 619 result);
623 return -EIO; 620 return -EIO;
624 } 621 }
625 return 0; 622 return 0;
@@ -687,8 +684,8 @@ sddr09_read_sg_test_only(struct us_data *us) {
687 result = sddr09_send_scsi_command(us, command, 4*nsg+3); 684 result = sddr09_send_scsi_command(us, command, 4*nsg+3);
688 685
689 if (result) { 686 if (result) {
690 US_DEBUGP("Result for send_control in sddr09_read_sg %d\n", 687 usb_stor_dbg(us, "Result for send_control in sddr09_read_sg %d\n",
691 result); 688 result);
692 return result; 689 return result;
693 } 690 }
694 691
@@ -700,8 +697,8 @@ sddr09_read_sg_test_only(struct us_data *us) {
700 buf, bulklen, NULL); 697 buf, bulklen, NULL);
701 kfree(buf); 698 kfree(buf);
702 if (result != USB_STOR_XFER_GOOD) { 699 if (result != USB_STOR_XFER_GOOD) {
703 US_DEBUGP("Result for bulk_transfer in sddr09_read_sg %d\n", 700 usb_stor_dbg(us, "Result for bulk_transfer in sddr09_read_sg %d\n",
704 result); 701 result);
705 return -EIO; 702 return -EIO;
706 } 703 }
707 704
@@ -727,7 +724,7 @@ sddr09_read_status(struct us_data *us, unsigned char *status) {
727 unsigned char *data = us->iobuf; 724 unsigned char *data = us->iobuf;
728 int result; 725 int result;
729 726
730 US_DEBUGP("Reading status...\n"); 727 usb_stor_dbg(us, "Reading status...\n");
731 728
732 memset(command, 0, 12); 729 memset(command, 0, 12);
733 command[0] = 0xEC; 730 command[0] = 0xEC;
@@ -789,8 +786,8 @@ sddr09_read_data(struct us_data *us,
789 786
790 /* Not overflowing capacity? */ 787 /* Not overflowing capacity? */
791 if (lba >= maxlba) { 788 if (lba >= maxlba) {
792 US_DEBUGP("Error: Requested lba %u exceeds " 789 usb_stor_dbg(us, "Error: Requested lba %u exceeds maximum %u\n",
793 "maximum %u\n", lba, maxlba); 790 lba, maxlba);
794 result = -EIO; 791 result = -EIO;
795 break; 792 break;
796 } 793 }
@@ -800,8 +797,8 @@ sddr09_read_data(struct us_data *us,
800 797
801 if (pba == UNDEF) { /* this lba was never written */ 798 if (pba == UNDEF) { /* this lba was never written */
802 799
803 US_DEBUGP("Read %d zero pages (LBA %d) page %d\n", 800 usb_stor_dbg(us, "Read %d zero pages (LBA %d) page %d\n",
804 pages, lba, page); 801 pages, lba, page);
805 802
806 /* This is not really an error. It just means 803 /* This is not really an error. It just means
807 that the block has never been written. 804 that the block has never been written.
@@ -811,9 +808,8 @@ sddr09_read_data(struct us_data *us,
811 memset(buffer, 0, len); 808 memset(buffer, 0, len);
812 809
813 } else { 810 } else {
814 US_DEBUGP("Read %d pages, from PBA %d" 811 usb_stor_dbg(us, "Read %d pages, from PBA %d (LBA %d) page %d\n",
815 " (LBA %d) page %d\n", 812 pages, pba, lba, page);
816 pages, pba, lba, page);
817 813
818 address = ((pba << info->blockshift) + page) << 814 address = ((pba << info->blockshift) + page) <<
819 info->pageshift; 815 info->pageshift;
@@ -916,14 +912,14 @@ sddr09_write_lba(struct us_data *us, unsigned int lba,
916 cptr = bptr + info->pagesize; 912 cptr = bptr + info->pagesize;
917 nand_compute_ecc(bptr, ecc); 913 nand_compute_ecc(bptr, ecc);
918 if (!nand_compare_ecc(cptr+13, ecc)) { 914 if (!nand_compare_ecc(cptr+13, ecc)) {
919 US_DEBUGP("Warning: bad ecc in page %d- of pba %d\n", 915 usb_stor_dbg(us, "Warning: bad ecc in page %d- of pba %d\n",
920 i, pba); 916 i, pba);
921 nand_store_ecc(cptr+13, ecc); 917 nand_store_ecc(cptr+13, ecc);
922 } 918 }
923 nand_compute_ecc(bptr+(info->pagesize / 2), ecc); 919 nand_compute_ecc(bptr+(info->pagesize / 2), ecc);
924 if (!nand_compare_ecc(cptr+8, ecc)) { 920 if (!nand_compare_ecc(cptr+8, ecc)) {
925 US_DEBUGP("Warning: bad ecc in page %d+ of pba %d\n", 921 usb_stor_dbg(us, "Warning: bad ecc in page %d+ of pba %d\n",
926 i, pba); 922 i, pba);
927 nand_store_ecc(cptr+8, ecc); 923 nand_store_ecc(cptr+8, ecc);
928 } 924 }
929 cptr[6] = cptr[11] = MSB_of(lbap); 925 cptr[6] = cptr[11] = MSB_of(lbap);
@@ -943,22 +939,21 @@ sddr09_write_lba(struct us_data *us, unsigned int lba,
943 nand_store_ecc(cptr+8, ecc); 939 nand_store_ecc(cptr+8, ecc);
944 } 940 }
945 941
946 US_DEBUGP("Rewrite PBA %d (LBA %d)\n", pba, lba); 942 usb_stor_dbg(us, "Rewrite PBA %d (LBA %d)\n", pba, lba);
947 943
948 result = sddr09_write_inplace(us, address>>1, info->blocksize, 944 result = sddr09_write_inplace(us, address>>1, info->blocksize,
949 info->pageshift, blockbuffer, 0); 945 info->pageshift, blockbuffer, 0);
950 946
951 US_DEBUGP("sddr09_write_inplace returns %d\n", result); 947 usb_stor_dbg(us, "sddr09_write_inplace returns %d\n", result);
952 948
953#if 0 949#if 0
954 { 950 {
955 unsigned char status = 0; 951 unsigned char status = 0;
956 int result2 = sddr09_read_status(us, &status); 952 int result2 = sddr09_read_status(us, &status);
957 if (result2) 953 if (result2)
958 US_DEBUGP("sddr09_write_inplace: cannot read status\n"); 954 usb_stor_dbg(us, "cannot read status\n");
959 else if (status != 0xc0) 955 else if (status != 0xc0)
960 US_DEBUGP("sddr09_write_inplace: status after write: 0x%x\n", 956 usb_stor_dbg(us, "status after write: 0x%x\n", status);
961 status);
962 } 957 }
963#endif 958#endif
964 959
@@ -1031,8 +1026,8 @@ sddr09_write_data(struct us_data *us,
1031 1026
1032 /* Not overflowing capacity? */ 1027 /* Not overflowing capacity? */
1033 if (lba >= maxlba) { 1028 if (lba >= maxlba) {
1034 US_DEBUGP("Error: Requested lba %u exceeds " 1029 usb_stor_dbg(us, "Error: Requested lba %u exceeds maximum %u\n",
1035 "maximum %u\n", lba, maxlba); 1030 lba, maxlba);
1036 result = -EIO; 1031 result = -EIO;
1037 break; 1032 break;
1038 } 1033 }
@@ -1064,8 +1059,8 @@ sddr09_read_control(struct us_data *us,
1064 unsigned char *content, 1059 unsigned char *content,
1065 int use_sg) { 1060 int use_sg) {
1066 1061
1067 US_DEBUGP("Read control address %lu, blocks %d\n", 1062 usb_stor_dbg(us, "Read control address %lu, blocks %d\n",
1068 address, blocks); 1063 address, blocks);
1069 1064
1070 return sddr09_read21(us, address, blocks, 1065 return sddr09_read21(us, address, blocks,
1071 CONTROL_SHIFT, content, use_sg); 1066 CONTROL_SHIFT, content, use_sg);
@@ -1111,21 +1106,21 @@ sddr09_get_wp(struct us_data *us, struct sddr09_card_info *info) {
1111 1106
1112 result = sddr09_read_status(us, &status); 1107 result = sddr09_read_status(us, &status);
1113 if (result) { 1108 if (result) {
1114 US_DEBUGP("sddr09_get_wp: read_status fails\n"); 1109 usb_stor_dbg(us, "read_status fails\n");
1115 return result; 1110 return result;
1116 } 1111 }
1117 US_DEBUGP("sddr09_get_wp: status 0x%02X", status); 1112 usb_stor_dbg(us, "status 0x%02X", status);
1118 if ((status & 0x80) == 0) { 1113 if ((status & 0x80) == 0) {
1119 info->flags |= SDDR09_WP; /* write protected */ 1114 info->flags |= SDDR09_WP; /* write protected */
1120 US_DEBUGP(" WP"); 1115 US_DEBUGPX(" WP");
1121 } 1116 }
1122 if (status & 0x40) 1117 if (status & 0x40)
1123 US_DEBUGP(" Ready"); 1118 US_DEBUGPX(" Ready");
1124 if (status & LUNBITS) 1119 if (status & LUNBITS)
1125 US_DEBUGP(" Suspended"); 1120 US_DEBUGPX(" Suspended");
1126 if (status & 0x1) 1121 if (status & 0x1)
1127 US_DEBUGP(" Error"); 1122 US_DEBUGPX(" Error");
1128 US_DEBUGP("\n"); 1123 US_DEBUGPX("\n");
1129 return 0; 1124 return 0;
1130} 1125}
1131 1126
@@ -1154,12 +1149,12 @@ sddr09_get_cardinfo(struct us_data *us, unsigned char flags) {
1154 char blurbtxt[256]; 1149 char blurbtxt[256];
1155 int result; 1150 int result;
1156 1151
1157 US_DEBUGP("Reading capacity...\n"); 1152 usb_stor_dbg(us, "Reading capacity...\n");
1158 1153
1159 result = sddr09_read_deviceID(us, deviceID); 1154 result = sddr09_read_deviceID(us, deviceID);
1160 1155
1161 if (result) { 1156 if (result) {
1162 US_DEBUGP("Result of read_deviceID is %d\n", result); 1157 usb_stor_dbg(us, "Result of read_deviceID is %d\n", result);
1163 printk(KERN_WARNING "sddr09: could not read card info\n"); 1158 printk(KERN_WARNING "sddr09: could not read card info\n");
1164 return NULL; 1159 return NULL;
1165 } 1160 }
@@ -1392,7 +1387,7 @@ sddr09_read_map(struct us_data *us) {
1392 lbact += ct; 1387 lbact += ct;
1393 } 1388 }
1394 info->lbact = lbact; 1389 info->lbact = lbact;
1395 US_DEBUGP("Found %d LBA's\n", lbact); 1390 usb_stor_dbg(us, "Found %d LBA's\n", lbact);
1396 result = 0; 1391 result = 0;
1397 1392
1398 done: 1393 done:
@@ -1423,18 +1418,18 @@ sddr09_common_init(struct us_data *us) {
1423 1418
1424 /* set the configuration -- STALL is an acceptable response here */ 1419 /* set the configuration -- STALL is an acceptable response here */
1425 if (us->pusb_dev->actconfig->desc.bConfigurationValue != 1) { 1420 if (us->pusb_dev->actconfig->desc.bConfigurationValue != 1) {
1426 US_DEBUGP("active config #%d != 1 ??\n", us->pusb_dev 1421 usb_stor_dbg(us, "active config #%d != 1 ??\n",
1427 ->actconfig->desc.bConfigurationValue); 1422 us->pusb_dev->actconfig->desc.bConfigurationValue);
1428 return -EINVAL; 1423 return -EINVAL;
1429 } 1424 }
1430 1425
1431 result = usb_reset_configuration(us->pusb_dev); 1426 result = usb_reset_configuration(us->pusb_dev);
1432 US_DEBUGP("Result of usb_reset_configuration is %d\n", result); 1427 usb_stor_dbg(us, "Result of usb_reset_configuration is %d\n", result);
1433 if (result == -EPIPE) { 1428 if (result == -EPIPE) {
1434 US_DEBUGP("-- stall on control interface\n"); 1429 usb_stor_dbg(us, "-- stall on control interface\n");
1435 } else if (result != 0) { 1430 } else if (result != 0) {
1436 /* it's not a stall, but another error -- time to bail */ 1431 /* it's not a stall, but another error -- time to bail */
1437 US_DEBUGP("-- Unknown error. Rejecting device\n"); 1432 usb_stor_dbg(us, "-- Unknown error. Rejecting device\n");
1438 return -EINVAL; 1433 return -EINVAL;
1439 } 1434 }
1440 1435
@@ -1464,20 +1459,20 @@ usb_stor_sddr09_dpcm_init(struct us_data *us) {
1464 1459
1465 result = sddr09_send_command(us, 0x01, USB_DIR_IN, data, 2); 1460 result = sddr09_send_command(us, 0x01, USB_DIR_IN, data, 2);
1466 if (result) { 1461 if (result) {
1467 US_DEBUGP("sddr09_init: send_command fails\n"); 1462 usb_stor_dbg(us, "send_command fails\n");
1468 return result; 1463 return result;
1469 } 1464 }
1470 1465
1471 US_DEBUGP("SDDR09init: %02X %02X\n", data[0], data[1]); 1466 usb_stor_dbg(us, "%02X %02X\n", data[0], data[1]);
1472 // get 07 02 1467 // get 07 02
1473 1468
1474 result = sddr09_send_command(us, 0x08, USB_DIR_IN, data, 2); 1469 result = sddr09_send_command(us, 0x08, USB_DIR_IN, data, 2);
1475 if (result) { 1470 if (result) {
1476 US_DEBUGP("sddr09_init: 2nd send_command fails\n"); 1471 usb_stor_dbg(us, "2nd send_command fails\n");
1477 return result; 1472 return result;
1478 } 1473 }
1479 1474
1480 US_DEBUGP("SDDR09init: %02X %02X\n", data[0], data[1]); 1475 usb_stor_dbg(us, "%02X %02X\n", data[0], data[1]);
1481 // get 07 00 1476 // get 07 00
1482 1477
1483 result = sddr09_request_sense(us, data, 18); 1478 result = sddr09_request_sense(us, data, 18);
@@ -1507,7 +1502,7 @@ static int dpcm_transport(struct scsi_cmnd *srb, struct us_data *us)
1507{ 1502{
1508 int ret; 1503 int ret;
1509 1504
1510 US_DEBUGP("dpcm_transport: LUN=%d\n", srb->device->lun); 1505 usb_stor_dbg(us, "LUN=%d\n", srb->device->lun);
1511 1506
1512 switch (srb->device->lun) { 1507 switch (srb->device->lun) {
1513 case 0: 1508 case 0:
@@ -1533,8 +1528,7 @@ static int dpcm_transport(struct scsi_cmnd *srb, struct us_data *us)
1533 break; 1528 break;
1534 1529
1535 default: 1530 default:
1536 US_DEBUGP("dpcm_transport: Invalid LUN %d\n", 1531 usb_stor_dbg(us, "Invalid LUN %d\n", srb->device->lun);
1537 srb->device->lun);
1538 ret = USB_STOR_TRANSPORT_ERROR; 1532 ret = USB_STOR_TRANSPORT_ERROR;
1539 break; 1533 break;
1540 } 1534 }
@@ -1640,8 +1634,8 @@ static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us)
1640 or for all pages. */ 1634 or for all pages. */
1641 /* %% We should check DBD %% */ 1635 /* %% We should check DBD %% */
1642 if (modepage == 0x01 || modepage == 0x3F) { 1636 if (modepage == 0x01 || modepage == 0x3F) {
1643 US_DEBUGP("SDDR09: Dummy up request for " 1637 usb_stor_dbg(us, "Dummy up request for mode page 0x%x\n",
1644 "mode page 0x%x\n", modepage); 1638 modepage);
1645 1639
1646 memcpy(ptr, mode_page_01, sizeof(mode_page_01)); 1640 memcpy(ptr, mode_page_01, sizeof(mode_page_01));
1647 ((__be16*)ptr)[0] = cpu_to_be16(sizeof(mode_page_01) - 2); 1641 ((__be16*)ptr)[0] = cpu_to_be16(sizeof(mode_page_01) - 2);
@@ -1667,8 +1661,8 @@ static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us)
1667 page |= short_pack(srb->cmnd[5], srb->cmnd[4]); 1661 page |= short_pack(srb->cmnd[5], srb->cmnd[4]);
1668 pages = short_pack(srb->cmnd[8], srb->cmnd[7]); 1662 pages = short_pack(srb->cmnd[8], srb->cmnd[7]);
1669 1663
1670 US_DEBUGP("READ_10: read page %d pagect %d\n", 1664 usb_stor_dbg(us, "READ_10: read page %d pagect %d\n",
1671 page, pages); 1665 page, pages);
1672 1666
1673 result = sddr09_read_data(us, page, pages); 1667 result = sddr09_read_data(us, page, pages);
1674 return (result == 0 ? USB_STOR_TRANSPORT_GOOD : 1668 return (result == 0 ? USB_STOR_TRANSPORT_GOOD :
@@ -1682,8 +1676,8 @@ static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us)
1682 page |= short_pack(srb->cmnd[5], srb->cmnd[4]); 1676 page |= short_pack(srb->cmnd[5], srb->cmnd[4]);
1683 pages = short_pack(srb->cmnd[8], srb->cmnd[7]); 1677 pages = short_pack(srb->cmnd[8], srb->cmnd[7]);
1684 1678
1685 US_DEBUGP("WRITE_10: write page %d pagect %d\n", 1679 usb_stor_dbg(us, "WRITE_10: write page %d pagect %d\n",
1686 page, pages); 1680 page, pages);
1687 1681
1688 result = sddr09_write_data(us, page, pages); 1682 result = sddr09_write_data(us, page, pages);
1689 return (result == 0 ? USB_STOR_TRANSPORT_GOOD : 1683 return (result == 0 ? USB_STOR_TRANSPORT_GOOD :
@@ -1710,12 +1704,12 @@ static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us)
1710 for (i=0; i<12; i++) 1704 for (i=0; i<12; i++)
1711 sprintf(ptr+strlen(ptr), "%02X ", srb->cmnd[i]); 1705 sprintf(ptr+strlen(ptr), "%02X ", srb->cmnd[i]);
1712 1706
1713 US_DEBUGP("SDDR09: Send control for command %s\n", ptr); 1707 usb_stor_dbg(us, "Send control for command %s\n", ptr);
1714 1708
1715 result = sddr09_send_scsi_command(us, srb->cmnd, 12); 1709 result = sddr09_send_scsi_command(us, srb->cmnd, 12);
1716 if (result) { 1710 if (result) {
1717 US_DEBUGP("sddr09_transport: sddr09_send_scsi_command " 1711 usb_stor_dbg(us, "sddr09_send_scsi_command returns %d\n",
1718 "returns %d\n", result); 1712 result);
1719 return USB_STOR_TRANSPORT_ERROR; 1713 return USB_STOR_TRANSPORT_ERROR;
1720 } 1714 }
1721 1715
@@ -1727,10 +1721,10 @@ static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us)
1727 unsigned int pipe = (srb->sc_data_direction == DMA_TO_DEVICE) 1721 unsigned int pipe = (srb->sc_data_direction == DMA_TO_DEVICE)
1728 ? us->send_bulk_pipe : us->recv_bulk_pipe; 1722 ? us->send_bulk_pipe : us->recv_bulk_pipe;
1729 1723
1730 US_DEBUGP("SDDR09: %s %d bytes\n", 1724 usb_stor_dbg(us, "%s %d bytes\n",
1731 (srb->sc_data_direction == DMA_TO_DEVICE) ? 1725 (srb->sc_data_direction == DMA_TO_DEVICE) ?
1732 "sending" : "receiving", 1726 "sending" : "receiving",
1733 scsi_bufflen(srb)); 1727 scsi_bufflen(srb));
1734 1728
1735 result = usb_stor_bulk_srb(us, pipe, srb); 1729 result = usb_stor_bulk_srb(us, pipe, srb);
1736 1730