aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/hd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/hd.c')
-rw-r--r--drivers/block/hd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/hd.c b/drivers/block/hd.c
index 75b9ca95c4eb..a3b39940ce02 100644
--- a/drivers/block/hd.c
+++ b/drivers/block/hd.c
@@ -228,7 +228,7 @@ static void dump_status(const char *msg, unsigned int stat)
228 printk(", CHS=%d/%d/%d", (inb(HD_HCYL)<<8) + inb(HD_LCYL), 228 printk(", CHS=%d/%d/%d", (inb(HD_HCYL)<<8) + inb(HD_LCYL),
229 inb(HD_CURRENT) & 0xf, inb(HD_SECTOR)); 229 inb(HD_CURRENT) & 0xf, inb(HD_SECTOR));
230 if (CURRENT) 230 if (CURRENT)
231 printk(", sector=%ld", CURRENT->sector); 231 printk(", sector=%ld", blk_rq_pos(CURRENT));
232 } 232 }
233 printk("\n"); 233 printk("\n");
234 } 234 }
@@ -457,9 +457,9 @@ ok_to_read:
457 req = CURRENT; 457 req = CURRENT;
458 insw(HD_DATA, req->buffer, 256); 458 insw(HD_DATA, req->buffer, 256);
459#ifdef DEBUG 459#ifdef DEBUG
460 printk("%s: read: sector %ld, remaining = %ld, buffer=%p\n", 460 printk("%s: read: sector %ld, remaining = %u, buffer=%p\n",
461 req->rq_disk->disk_name, req->sector + 1, req->nr_sectors - 1, 461 req->rq_disk->disk_name, blk_rq_pos(req) + 1,
462 req->buffer+512); 462 blk_rq_sectors(req) - 1, req->buffer+512);
463#endif 463#endif
464 if (__blk_end_request(req, 0, 512)) { 464 if (__blk_end_request(req, 0, 512)) {
465 SET_HANDLER(&read_intr); 465 SET_HANDLER(&read_intr);
@@ -485,7 +485,7 @@ static void write_intr(void)
485 continue; 485 continue;
486 if (!OK_STATUS(i)) 486 if (!OK_STATUS(i))
487 break; 487 break;
488 if ((req->nr_sectors <= 1) || (i & DRQ_STAT)) 488 if ((blk_rq_sectors(req) <= 1) || (i & DRQ_STAT))
489 goto ok_to_write; 489 goto ok_to_write;
490 } while (--retries > 0); 490 } while (--retries > 0);
491 dump_status("write_intr", i); 491 dump_status("write_intr", i);
@@ -589,8 +589,8 @@ repeat:
589 return; 589 return;
590 } 590 }
591 disk = req->rq_disk->private_data; 591 disk = req->rq_disk->private_data;
592 block = req->sector; 592 block = blk_rq_pos(req);
593 nsect = req->nr_sectors; 593 nsect = blk_rq_sectors(req);
594 if (block >= get_capacity(req->rq_disk) || 594 if (block >= get_capacity(req->rq_disk) ||
595 ((block+nsect) > get_capacity(req->rq_disk))) { 595 ((block+nsect) > get_capacity(req->rq_disk))) {
596 printk("%s: bad access: block=%d, count=%d\n", 596 printk("%s: bad access: block=%d, count=%d\n",