Commit fe0e4341 authored by Jens Axboe's avatar Jens Axboe

Merge axboe@brick.kernel.dk:/mnt/kernel/ide/linux-2.5

into hera.kernel.org:/home/axboe/BK/linux-2.5-ide
parents 76d07e0f 37eb06f8
...@@ -173,7 +173,7 @@ static ide_startstop_t read_intr (ide_drive_t *drive) ...@@ -173,7 +173,7 @@ static ide_startstop_t read_intr (ide_drive_t *drive)
drive->name, rq->sector, rq->sector+nsect-1, drive->name, rq->sector, rq->sector+nsect-1,
(unsigned long) rq->buffer+(nsect<<9), rq->nr_sectors-nsect); (unsigned long) rq->buffer+(nsect<<9), rq->nr_sectors-nsect);
#endif #endif
ide_unmap_buffer(to, &flags); ide_unmap_buffer(rq, to, &flags);
rq->sector += nsect; rq->sector += nsect;
rq->errors = 0; rq->errors = 0;
i = (rq->nr_sectors -= nsect); i = (rq->nr_sectors -= nsect);
...@@ -227,7 +227,7 @@ static ide_startstop_t write_intr (ide_drive_t *drive) ...@@ -227,7 +227,7 @@ static ide_startstop_t write_intr (ide_drive_t *drive)
unsigned long flags; unsigned long flags;
char *to = ide_map_buffer(rq, &flags); char *to = ide_map_buffer(rq, &flags);
taskfile_output_data(drive, to, SECTOR_WORDS); taskfile_output_data(drive, to, SECTOR_WORDS);
ide_unmap_buffer(to, &flags); ide_unmap_buffer(rq, to, &flags);
if (HWGROUP(drive)->handler != NULL) if (HWGROUP(drive)->handler != NULL)
BUG(); BUG();
ide_set_handler(drive, &write_intr, WAIT_CMD, NULL); ide_set_handler(drive, &write_intr, WAIT_CMD, NULL);
...@@ -304,7 +304,7 @@ int ide_multwrite (ide_drive_t *drive, unsigned int mcount) ...@@ -304,7 +304,7 @@ int ide_multwrite (ide_drive_t *drive, unsigned int mcount)
* re-entering us on the last transfer. * re-entering us on the last transfer.
*/ */
taskfile_output_data(drive, buffer, nsect<<7); taskfile_output_data(drive, buffer, nsect<<7);
ide_unmap_buffer(buffer, &flags); ide_unmap_buffer(rq, buffer, &flags);
} while (mcount); } while (mcount);
return 0; return 0;
...@@ -522,7 +522,7 @@ static ide_startstop_t do_rw_disk (ide_drive_t *drive, struct request *rq, unsig ...@@ -522,7 +522,7 @@ static ide_startstop_t do_rw_disk (ide_drive_t *drive, struct request *rq, unsig
BUG(); BUG();
ide_set_handler(drive, &write_intr, WAIT_CMD, NULL); ide_set_handler(drive, &write_intr, WAIT_CMD, NULL);
taskfile_output_data(drive, to, SECTOR_WORDS); taskfile_output_data(drive, to, SECTOR_WORDS);
ide_unmap_buffer(to, &flags); ide_unmap_buffer(rq, to, &flags);
} }
return ide_started; return ide_started;
} }
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
#endif #endif
#define task_map_rq(rq, flags) ide_map_buffer((rq), (flags)) #define task_map_rq(rq, flags) ide_map_buffer((rq), (flags))
#define task_unmap_rq(rq, buf, flags) ide_unmap_buffer((buf), (flags)) #define task_unmap_rq(rq, buf, flags) ide_unmap_buffer((rq), (buf), (flags))
inline u32 task_read_24 (ide_drive_t *drive) inline u32 task_read_24 (ide_drive_t *drive)
{ {
......
...@@ -894,8 +894,9 @@ extern inline void *ide_map_buffer(struct request *rq, unsigned long *flags) ...@@ -894,8 +894,9 @@ extern inline void *ide_map_buffer(struct request *rq, unsigned long *flags)
return rq->buffer + task_rq_offset(rq); return rq->buffer + task_rq_offset(rq);
} }
extern inline void ide_unmap_buffer(char *buffer, unsigned long *flags) extern inline void ide_unmap_buffer(struct request *rq, char *buffer, unsigned long *flags)
{ {
if (rq->bio)
bio_kunmap_irq(buffer, flags); bio_kunmap_irq(buffer, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment