aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-cd.c8
-rw-r--r--drivers/ide/ide-disk.c8
-rw-r--r--drivers/ide/ide-dma.c2
-rw-r--r--drivers/ide/ide-floppy.c6
-rw-r--r--drivers/ide/ide-io.c4
-rw-r--r--drivers/ide/ide-lib.c2
-rw-r--r--drivers/ide/ide-tape.c6
-rw-r--r--drivers/ide/ide-taskfile.c2
-rw-r--r--drivers/ide/pdc202xx_old.c2
-rw-r--r--drivers/ide/tc86c001.c2
-rw-r--r--drivers/ide/tx4939ide.c2
11 files changed, 22 insertions, 22 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 182320dd6ea1..eb4f3dc9f182 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -775,8 +775,8 @@ static ide_startstop_t cdrom_start_rw(ide_drive_t *drive, struct request *rq)
775 } 775 }
776 776
777 /* fs requests *must* be hardware frame aligned */ 777 /* fs requests *must* be hardware frame aligned */
778 if ((rq->nr_sectors & (sectors_per_frame - 1)) || 778 if ((blk_rq_sectors(rq) & (sectors_per_frame - 1)) ||
779 (rq->sector & (sectors_per_frame - 1))) 779 (blk_rq_pos(rq) & (sectors_per_frame - 1)))
780 return ide_stopped; 780 return ide_stopped;
781 781
782 /* use DMA, if possible */ 782 /* use DMA, if possible */
@@ -868,8 +868,8 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
868 cmd.rq = rq; 868 cmd.rq = rq;
869 869
870 if (blk_fs_request(rq) || rq->data_len) { 870 if (blk_fs_request(rq) || rq->data_len) {
871 ide_init_sg_cmd(&cmd, blk_fs_request(rq) ? (rq->nr_sectors << 9) 871 ide_init_sg_cmd(&cmd, blk_fs_request(rq) ?
872 : rq->data_len); 872 (blk_rq_sectors(rq) << 9) : rq->data_len);
873 ide_map_sg(drive, &cmd); 873 ide_map_sg(drive, &cmd);
874 } 874 }
875 875
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index c2438804d3c4..ad18e14043c5 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -82,7 +82,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
82 sector_t block) 82 sector_t block)
83{ 83{
84 ide_hwif_t *hwif = drive->hwif; 84 ide_hwif_t *hwif = drive->hwif;
85 u16 nsectors = (u16)rq->nr_sectors; 85 u16 nsectors = (u16)blk_rq_sectors(rq);
86 u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48); 86 u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48);
87 u8 dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA); 87 u8 dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA);
88 struct ide_cmd cmd; 88 struct ide_cmd cmd;
@@ -90,7 +90,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
90 ide_startstop_t rc; 90 ide_startstop_t rc;
91 91
92 if ((hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA) && lba48 && dma) { 92 if ((hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA) && lba48 && dma) {
93 if (block + rq->nr_sectors > 1ULL << 28) 93 if (block + blk_rq_sectors(rq) > 1ULL << 28)
94 dma = 0; 94 dma = 0;
95 else 95 else
96 lba48 = 0; 96 lba48 = 0;
@@ -195,9 +195,9 @@ static ide_startstop_t ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
195 195
196 ledtrig_ide_activity(); 196 ledtrig_ide_activity();
197 197
198 pr_debug("%s: %sing: block=%llu, sectors=%lu, buffer=0x%08lx\n", 198 pr_debug("%s: %sing: block=%llu, sectors=%u, buffer=0x%08lx\n",
199 drive->name, rq_data_dir(rq) == READ ? "read" : "writ", 199 drive->name, rq_data_dir(rq) == READ ? "read" : "writ",
200 (unsigned long long)block, rq->nr_sectors, 200 (unsigned long long)block, blk_rq_sectors(rq),
201 (unsigned long)rq->buffer); 201 (unsigned long)rq->buffer);
202 202
203 if (hwif->rw_disk) 203 if (hwif->rw_disk)
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index d9123ecae4a9..001f68f0bb28 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -103,7 +103,7 @@ ide_startstop_t ide_dma_intr(ide_drive_t *drive)
103 ide_finish_cmd(drive, cmd, stat); 103 ide_finish_cmd(drive, cmd, stat);
104 else 104 else
105 ide_complete_rq(drive, 0, 105 ide_complete_rq(drive, 0,
106 cmd->rq->nr_sectors << 9); 106 blk_rq_sectors(cmd->rq) << 9);
107 return ide_stopped; 107 return ide_stopped;
108 } 108 }
109 printk(KERN_ERR "%s: %s: bad DMA status (0x%02x)\n", 109 printk(KERN_ERR "%s: %s: bad DMA status (0x%02x)\n",
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 537b7c558033..1c460bd56375 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -194,7 +194,7 @@ static void idefloppy_create_rw_cmd(ide_drive_t *drive,
194{ 194{
195 struct ide_disk_obj *floppy = drive->driver_data; 195 struct ide_disk_obj *floppy = drive->driver_data;
196 int block = sector / floppy->bs_factor; 196 int block = sector / floppy->bs_factor;
197 int blocks = rq->nr_sectors / floppy->bs_factor; 197 int blocks = blk_rq_sectors(rq) / floppy->bs_factor;
198 int cmd = rq_data_dir(rq); 198 int cmd = rq_data_dir(rq);
199 199
200 ide_debug_log(IDE_DBG_FUNC, "block: %d, blocks: %d", block, blocks); 200 ide_debug_log(IDE_DBG_FUNC, "block: %d, blocks: %d", block, blocks);
@@ -259,8 +259,8 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,
259 goto out_end; 259 goto out_end;
260 } 260 }
261 if (blk_fs_request(rq)) { 261 if (blk_fs_request(rq)) {
262 if (((long)rq->sector % floppy->bs_factor) || 262 if (((long)blk_rq_pos(rq) % floppy->bs_factor) ||
263 (rq->nr_sectors % floppy->bs_factor)) { 263 (blk_rq_sectors(rq) % floppy->bs_factor)) {
264 printk(KERN_ERR PFX "%s: unsupported r/w rq size\n", 264 printk(KERN_ERR PFX "%s: unsupported r/w rq size\n",
265 drive->name); 265 drive->name);
266 goto out_end; 266 goto out_end;
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index df23bcbd94b4..59799ca55246 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -279,7 +279,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
279 279
280 if (cmd) { 280 if (cmd) {
281 if (cmd->protocol == ATA_PROT_PIO) { 281 if (cmd->protocol == ATA_PROT_PIO) {
282 ide_init_sg_cmd(cmd, rq->nr_sectors << 9); 282 ide_init_sg_cmd(cmd, blk_rq_sectors(rq) << 9);
283 ide_map_sg(drive, cmd); 283 ide_map_sg(drive, cmd);
284 } 284 }
285 285
@@ -387,7 +387,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
387 387
388 drv = *(struct ide_driver **)rq->rq_disk->private_data; 388 drv = *(struct ide_driver **)rq->rq_disk->private_data;
389 389
390 return drv->do_request(drive, rq, rq->sector); 390 return drv->do_request(drive, rq, blk_rq_pos(rq));
391 } 391 }
392 return do_special(drive); 392 return do_special(drive);
393kill_rq: 393kill_rq:
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index 56ff8c46c7d1..05b7fbc7ead5 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -114,7 +114,7 @@ static void ide_dump_ata_error(ide_drive_t *drive, u8 err)
114 114
115 if (rq) 115 if (rq)
116 printk(KERN_CONT ", sector=%llu", 116 printk(KERN_CONT ", sector=%llu",
117 (unsigned long long)rq->sector); 117 (unsigned long long)blk_rq_pos(rq));
118 } 118 }
119 printk(KERN_CONT "\n"); 119 printk(KERN_CONT "\n");
120} 120}
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 65c5b705883a..c6cf3a951f28 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -586,7 +586,7 @@ static void ide_tape_create_rw_cmd(idetape_tape_t *tape,
586 struct ide_atapi_pc *pc, struct request *rq, 586 struct ide_atapi_pc *pc, struct request *rq,
587 u8 opcode) 587 u8 opcode)
588{ 588{
589 unsigned int length = rq->nr_sectors; 589 unsigned int length = blk_rq_sectors(rq);
590 590
591 ide_init_pc(pc); 591 ide_init_pc(pc);
592 put_unaligned(cpu_to_be32(length), (unsigned int *) &pc->c[1]); 592 put_unaligned(cpu_to_be32(length), (unsigned int *) &pc->c[1]);
@@ -617,8 +617,8 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
617 struct ide_cmd cmd; 617 struct ide_cmd cmd;
618 u8 stat; 618 u8 stat;
619 619
620 debug_log(DBG_SENSE, "sector: %llu, nr_sectors: %lu\n" 620 debug_log(DBG_SENSE, "sector: %llu, nr_sectors: %u\n"
621 (unsigned long long)rq->sector, rq->nr_sectors); 621 (unsigned long long)blk_rq_pos(rq), blk_rq_sectors(rq));
622 622
623 if (!(blk_special_request(rq) || blk_sense_request(rq))) { 623 if (!(blk_special_request(rq) || blk_sense_request(rq))) {
624 /* We do not support buffer cache originated requests. */ 624 /* We do not support buffer cache originated requests. */
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index f400eb4d4aff..a0c3e1b2f73c 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -385,7 +385,7 @@ out_end:
385 if ((cmd->tf_flags & IDE_TFLAG_FS) == 0) 385 if ((cmd->tf_flags & IDE_TFLAG_FS) == 0)
386 ide_finish_cmd(drive, cmd, stat); 386 ide_finish_cmd(drive, cmd, stat);
387 else 387 else
388 ide_complete_rq(drive, 0, cmd->rq->nr_sectors << 9); 388 ide_complete_rq(drive, 0, blk_rq_sectors(cmd->rq) << 9);
389 return ide_stopped; 389 return ide_stopped;
390out_err: 390out_err:
391 ide_error_cmd(drive, cmd); 391 ide_error_cmd(drive, cmd);
diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c
index 248a54bd2386..c2a16a8f486d 100644
--- a/drivers/ide/pdc202xx_old.c
+++ b/drivers/ide/pdc202xx_old.c
@@ -177,7 +177,7 @@ static void pdc202xx_dma_start(ide_drive_t *drive)
177 u8 clock = inb(high_16 + 0x11); 177 u8 clock = inb(high_16 + 0x11);
178 178
179 outb(clock | (hwif->channel ? 0x08 : 0x02), high_16 + 0x11); 179 outb(clock | (hwif->channel ? 0x08 : 0x02), high_16 + 0x11);
180 word_count = (rq->nr_sectors << 8); 180 word_count = (blk_rq_sectors(rq) << 8);
181 word_count = (rq_data_dir(rq) == READ) ? 181 word_count = (rq_data_dir(rq) == READ) ?
182 word_count | 0x05000000 : 182 word_count | 0x05000000 :
183 word_count | 0x06000000; 183 word_count | 0x06000000;
diff --git a/drivers/ide/tc86c001.c b/drivers/ide/tc86c001.c
index b4cf42dc8a6f..05a93d6baecc 100644
--- a/drivers/ide/tc86c001.c
+++ b/drivers/ide/tc86c001.c
@@ -112,7 +112,7 @@ static void tc86c001_dma_start(ide_drive_t *drive)
112 ide_hwif_t *hwif = drive->hwif; 112 ide_hwif_t *hwif = drive->hwif;
113 unsigned long sc_base = hwif->config_data; 113 unsigned long sc_base = hwif->config_data;
114 unsigned long twcr_port = sc_base + (drive->dn ? 0x06 : 0x04); 114 unsigned long twcr_port = sc_base + (drive->dn ? 0x06 : 0x04);
115 unsigned long nsectors = hwif->rq->nr_sectors; 115 unsigned long nsectors = blk_rq_sectors(hwif->rq);
116 116
117 /* 117 /*
118 * We have to manually load the sector count and size into 118 * We have to manually load the sector count and size into
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index 564422d23976..5ca76224f6d1 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -307,7 +307,7 @@ static int tx4939ide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
307 tx4939ide_writew(SECTOR_SIZE / 2, base, drive->dn ? 307 tx4939ide_writew(SECTOR_SIZE / 2, base, drive->dn ?
308 TX4939IDE_Xfer_Cnt_2 : TX4939IDE_Xfer_Cnt_1); 308 TX4939IDE_Xfer_Cnt_2 : TX4939IDE_Xfer_Cnt_1);
309 309
310 tx4939ide_writew(cmd->rq->nr_sectors, base, TX4939IDE_Sec_Cnt); 310 tx4939ide_writew(blk_rq_sectors(cmd->rq), base, TX4939IDE_Sec_Cnt);
311 311
312 return 0; 312 return 0;
313} 313}