aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/datafab.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/storage/datafab.c')
-rw-r--r--drivers/usb/storage/datafab.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c
index c87ad1bae1d6..579e9f52053a 100644
--- a/drivers/usb/storage/datafab.c
+++ b/drivers/usb/storage/datafab.c
@@ -98,7 +98,8 @@ static int datafab_read_data(struct us_data *us,
98 unsigned char thistime; 98 unsigned char thistime;
99 unsigned int totallen, alloclen; 99 unsigned int totallen, alloclen;
100 int len, result; 100 int len, result;
101 unsigned int sg_idx = 0, sg_offset = 0; 101 unsigned int sg_offset = 0;
102 struct scatterlist *sg = NULL;
102 103
103 // we're working in LBA mode. according to the ATA spec, 104 // we're working in LBA mode. according to the ATA spec,
104 // we can support up to 28-bit addressing. I don't know if Datafab 105 // we can support up to 28-bit addressing. I don't know if Datafab
@@ -155,7 +156,7 @@ static int datafab_read_data(struct us_data *us,
155 156
156 // Store the data in the transfer buffer 157 // Store the data in the transfer buffer
157 usb_stor_access_xfer_buf(buffer, len, us->srb, 158 usb_stor_access_xfer_buf(buffer, len, us->srb,
158 &sg_idx, &sg_offset, TO_XFER_BUF); 159 &sg, &sg_offset, TO_XFER_BUF);
159 160
160 sector += thistime; 161 sector += thistime;
161 totallen -= len; 162 totallen -= len;
@@ -181,7 +182,8 @@ static int datafab_write_data(struct us_data *us,
181 unsigned char thistime; 182 unsigned char thistime;
182 unsigned int totallen, alloclen; 183 unsigned int totallen, alloclen;
183 int len, result; 184 int len, result;
184 unsigned int sg_idx = 0, sg_offset = 0; 185 unsigned int sg_offset = 0;
186 struct scatterlist *sg = NULL;
185 187
186 // we're working in LBA mode. according to the ATA spec, 188 // we're working in LBA mode. according to the ATA spec,
187 // we can support up to 28-bit addressing. I don't know if Datafab 189 // we can support up to 28-bit addressing. I don't know if Datafab
@@ -217,7 +219,7 @@ static int datafab_write_data(struct us_data *us,
217 219
218 // Get the data from the transfer buffer 220 // Get the data from the transfer buffer
219 usb_stor_access_xfer_buf(buffer, len, us->srb, 221 usb_stor_access_xfer_buf(buffer, len, us->srb,
220 &sg_idx, &sg_offset, FROM_XFER_BUF); 222 &sg, &sg_offset, FROM_XFER_BUF);
221 223
222 command[0] = 0; 224 command[0] = 0;
223 command[1] = thistime; 225 command[1] = thistime;