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.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c
index b2ed2a3e6fca..b12202c5da2d 100644
--- a/drivers/usb/storage/sddr09.c
+++ b/drivers/usb/storage/sddr09.c
@@ -705,7 +705,8 @@ sddr09_read_data(struct us_data *us,
705 unsigned char *buffer; 705 unsigned char *buffer;
706 unsigned int lba, maxlba, pba; 706 unsigned int lba, maxlba, pba;
707 unsigned int page, pages; 707 unsigned int page, pages;
708 unsigned int len, index, offset; 708 unsigned int len, offset;
709 struct scatterlist *sg;
709 int result; 710 int result;
710 711
711 // Figure out the initial LBA and page 712 // Figure out the initial LBA and page
@@ -730,7 +731,8 @@ sddr09_read_data(struct us_data *us,
730 // contiguous LBA's. Another exercise left to the student. 731 // contiguous LBA's. Another exercise left to the student.
731 732
732 result = 0; 733 result = 0;
733 index = offset = 0; 734 offset = 0;
735 sg = NULL;
734 736
735 while (sectors > 0) { 737 while (sectors > 0) {
736 738
@@ -777,7 +779,7 @@ sddr09_read_data(struct us_data *us,
777 779
778 // Store the data in the transfer buffer 780 // Store the data in the transfer buffer
779 usb_stor_access_xfer_buf(buffer, len, us->srb, 781 usb_stor_access_xfer_buf(buffer, len, us->srb,
780 &index, &offset, TO_XFER_BUF); 782 &sg, &offset, TO_XFER_BUF);
781 783
782 page = 0; 784 page = 0;
783 lba++; 785 lba++;
@@ -931,7 +933,8 @@ sddr09_write_data(struct us_data *us,
931 unsigned int pagelen, blocklen; 933 unsigned int pagelen, blocklen;
932 unsigned char *blockbuffer; 934 unsigned char *blockbuffer;
933 unsigned char *buffer; 935 unsigned char *buffer;
934 unsigned int len, index, offset; 936 unsigned int len, offset;
937 struct scatterlist *sg;
935 int result; 938 int result;
936 939
937 // Figure out the initial LBA and page 940 // Figure out the initial LBA and page
@@ -968,7 +971,8 @@ sddr09_write_data(struct us_data *us,
968 } 971 }
969 972
970 result = 0; 973 result = 0;
971 index = offset = 0; 974 offset = 0;
975 sg = NULL;
972 976
973 while (sectors > 0) { 977 while (sectors > 0) {
974 978
@@ -987,7 +991,7 @@ sddr09_write_data(struct us_data *us,
987 991
988 // Get the data from the transfer buffer 992 // Get the data from the transfer buffer
989 usb_stor_access_xfer_buf(buffer, len, us->srb, 993 usb_stor_access_xfer_buf(buffer, len, us->srb,
990 &index, &offset, FROM_XFER_BUF); 994 &sg, &offset, FROM_XFER_BUF);
991 995
992 result = sddr09_write_lba(us, lba, page, pages, 996 result = sddr09_write_lba(us, lba, page, pages,
993 buffer, blockbuffer); 997 buffer, blockbuffer);