diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:47 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:47 -0400 |
commit | bf717c0a2e18dbe82eeb28e57b0abede3cdf45d6 (patch) | |
tree | 98d209372f0fed08fca6c4936677ee09cf435209 /drivers/ide/ide-io.c | |
parent | 35b5d0be3d8de9a5ac51471c12029fb115200cdc (diff) |
ide: keep track of number of bytes instead of sectors in struct ide_cmd
* Pass number of bytes instead of sectors to ide_init_sg_cmd().
* Pass number of bytes to process to ide_pio_sector() and rename
it to ide_pio_bytes().
* Rename ->nsect field to ->nbytes in struct ide_cmd and use
->nbytes, ->nleft and ->cursg_ofs to keep track of number of
bytes instead of sectors.
There should be no functional changes caused by this patch.
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index b4901b690c9a..1adc5e2e7fb3 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -245,9 +245,9 @@ void ide_map_sg(ide_drive_t *drive, struct ide_cmd *cmd) | |||
245 | } | 245 | } |
246 | EXPORT_SYMBOL_GPL(ide_map_sg); | 246 | EXPORT_SYMBOL_GPL(ide_map_sg); |
247 | 247 | ||
248 | void ide_init_sg_cmd(struct ide_cmd *cmd, int nsect) | 248 | void ide_init_sg_cmd(struct ide_cmd *cmd, unsigned int nr_bytes) |
249 | { | 249 | { |
250 | cmd->nsect = cmd->nleft = nsect; | 250 | cmd->nbytes = cmd->nleft = nr_bytes; |
251 | cmd->cursg_ofs = 0; | 251 | cmd->cursg_ofs = 0; |
252 | cmd->cursg = NULL; | 252 | cmd->cursg = NULL; |
253 | } | 253 | } |
@@ -272,7 +272,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, | |||
272 | 272 | ||
273 | if (cmd) { | 273 | if (cmd) { |
274 | if (cmd->protocol == ATA_PROT_PIO) { | 274 | if (cmd->protocol == ATA_PROT_PIO) { |
275 | ide_init_sg_cmd(cmd, rq->nr_sectors); | 275 | ide_init_sg_cmd(cmd, rq->nr_sectors << 9); |
276 | ide_map_sg(drive, cmd); | 276 | ide_map_sg(drive, cmd); |
277 | } | 277 | } |
278 | 278 | ||