aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-28 17:44:41 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-28 17:44:41 -0400
commit9f87abe892f899f19df8d472f937ee955cd6264b (patch)
treef42dda5a9c12c043e3190de7dd43b0cee8e00c8b /drivers/scsi/ide-scsi.c
parent7c0daf2681f140dd9f39cd95966f471b5c904d8a (diff)
ide: add ide_pad_transfer() helper
* Add ide_pad_transfer() helper (which uses ->{in,out}put_data methods internally so the transfer is also padded to drive+host requirements) and use it instead of ide_atapi_{write_zeros,discard_data}(). * Remove no longer needed ide_atapi_{write_zeros,discard_data}(). Cc: Borislav Petkov <petkovbb@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 7964cc146152..44d8d5163a1a 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -164,7 +164,7 @@ static void idescsi_input_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
164 164
165 if (bcount) { 165 if (bcount) {
166 printk (KERN_ERR "ide-scsi: scatter gather table too small, discarding data\n"); 166 printk (KERN_ERR "ide-scsi: scatter gather table too small, discarding data\n");
167 ide_atapi_discard_data(drive, bcount); 167 ide_pad_transfer(drive, 0, bcount);
168 } 168 }
169} 169}
170 170
@@ -201,7 +201,7 @@ static void idescsi_output_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
201 201
202 if (bcount) { 202 if (bcount) {
203 printk (KERN_ERR "ide-scsi: scatter gather table too small, padding with zeros\n"); 203 printk (KERN_ERR "ide-scsi: scatter gather table too small, padding with zeros\n");
204 ide_atapi_write_zeros(drive, bcount); 204 ide_pad_transfer(drive, 1, bcount);
205 } 205 }
206} 206}
207 207
@@ -438,7 +438,7 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
438 } 438 }
439 pc->xferred += temp; 439 pc->xferred += temp;
440 pc->cur_pos += temp; 440 pc->cur_pos += temp;
441 ide_atapi_discard_data(drive, bcount - temp); 441 ide_pad_transfer(drive, 0, bcount - temp);
442 ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry); 442 ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry);
443 return ide_started; 443 return ide_started;
444 } 444 }