diff options
author | Tejun Heo <tj@kernel.org> | 2009-05-07 09:24:39 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-11 03:50:54 -0400 |
commit | 83096ebf1263b2c1ee5e653ba37d993d02e3eb7b (patch) | |
tree | 2226b71a616ec1cb2d37511c6a09ba9507a1cd69 /drivers/scsi/eata.c | |
parent | 5b93629b4509c03ffa87a9316412fedf6f58cb37 (diff) |
block: convert to pos and nr_sectors accessors
With recent cleanups, there is no place where low level driver
directly manipulates request fields. This means that the 'hard'
request fields always equal the !hard fields. Convert all
rq->sectors, nr_sectors and current_nr_sectors references to
accessors.
While at it, drop superflous blk_rq_pos() < 0 test in swim.c.
[ Impact: use pos and nr_sectors accessors ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Tested-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Acked-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Acked-by: Mike Miller <mike.miller@hp.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Paul Clements <paul.clements@steeleye.com>
Cc: Tim Waugh <tim@cyberelk.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Dario Ballabio <ballabio_dario@emc.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: unsik Kim <donari75@gmail.com>
Cc: Laurent Vivier <Laurent@lvivier.info>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/eata.c')
-rw-r--r-- | drivers/scsi/eata.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index be5099dd94b..c7076ce25e2 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c | |||
@@ -1825,7 +1825,7 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt, | |||
1825 | if (linked_comm && SCpnt->device->queue_depth > 2 | 1825 | if (linked_comm && SCpnt->device->queue_depth > 2 |
1826 | && TLDEV(SCpnt->device->type)) { | 1826 | && TLDEV(SCpnt->device->type)) { |
1827 | ha->cp_stat[i] = READY; | 1827 | ha->cp_stat[i] = READY; |
1828 | flush_dev(SCpnt->device, SCpnt->request->sector, ha, 0); | 1828 | flush_dev(SCpnt->device, blk_rq_pos(SCpnt->request), ha, 0); |
1829 | return 0; | 1829 | return 0; |
1830 | } | 1830 | } |
1831 | 1831 | ||
@@ -2144,13 +2144,13 @@ static int reorder(struct hostdata *ha, unsigned long cursec, | |||
2144 | if (!cpp->din) | 2144 | if (!cpp->din) |
2145 | input_only = 0; | 2145 | input_only = 0; |
2146 | 2146 | ||
2147 | if (SCpnt->request->sector < minsec) | 2147 | if (blk_rq_pos(SCpnt->request) < minsec) |
2148 | minsec = SCpnt->request->sector; | 2148 | minsec = blk_rq_pos(SCpnt->request); |
2149 | if (SCpnt->request->sector > maxsec) | 2149 | if (blk_rq_pos(SCpnt->request) > maxsec) |
2150 | maxsec = SCpnt->request->sector; | 2150 | maxsec = blk_rq_pos(SCpnt->request); |
2151 | 2151 | ||
2152 | sl[n] = SCpnt->request->sector; | 2152 | sl[n] = blk_rq_pos(SCpnt->request); |
2153 | ioseek += SCpnt->request->nr_sectors; | 2153 | ioseek += blk_rq_sectors(SCpnt->request); |
2154 | 2154 | ||
2155 | if (!n) | 2155 | if (!n) |
2156 | continue; | 2156 | continue; |
@@ -2190,7 +2190,7 @@ static int reorder(struct hostdata *ha, unsigned long cursec, | |||
2190 | k = il[n]; | 2190 | k = il[n]; |
2191 | cpp = &ha->cp[k]; | 2191 | cpp = &ha->cp[k]; |
2192 | SCpnt = cpp->SCpnt; | 2192 | SCpnt = cpp->SCpnt; |
2193 | ll[n] = SCpnt->request->nr_sectors; | 2193 | ll[n] = blk_rq_sectors(SCpnt->request); |
2194 | pl[n] = SCpnt->serial_number; | 2194 | pl[n] = SCpnt->serial_number; |
2195 | 2195 | ||
2196 | if (!n) | 2196 | if (!n) |
@@ -2236,12 +2236,12 @@ static int reorder(struct hostdata *ha, unsigned long cursec, | |||
2236 | cpp = &ha->cp[k]; | 2236 | cpp = &ha->cp[k]; |
2237 | SCpnt = cpp->SCpnt; | 2237 | SCpnt = cpp->SCpnt; |
2238 | scmd_printk(KERN_INFO, SCpnt, | 2238 | scmd_printk(KERN_INFO, SCpnt, |
2239 | "%s pid %ld mb %d fc %d nr %d sec %ld ns %ld" | 2239 | "%s pid %ld mb %d fc %d nr %d sec %ld ns %u" |
2240 | " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n", | 2240 | " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n", |
2241 | (ihdlr ? "ihdlr" : "qcomm"), | 2241 | (ihdlr ? "ihdlr" : "qcomm"), |
2242 | SCpnt->serial_number, k, flushcount, | 2242 | SCpnt->serial_number, k, flushcount, |
2243 | n_ready, SCpnt->request->sector, | 2243 | n_ready, blk_rq_pos(SCpnt->request), |
2244 | SCpnt->request->nr_sectors, cursec, YESNO(s), | 2244 | blk_rq_sectors(SCpnt->request), cursec, YESNO(s), |
2245 | YESNO(r), YESNO(rev), YESNO(input_only), | 2245 | YESNO(r), YESNO(rev), YESNO(input_only), |
2246 | YESNO(overlap), cpp->din); | 2246 | YESNO(overlap), cpp->din); |
2247 | } | 2247 | } |
@@ -2408,7 +2408,7 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost) | |||
2408 | 2408 | ||
2409 | if (linked_comm && SCpnt->device->queue_depth > 2 | 2409 | if (linked_comm && SCpnt->device->queue_depth > 2 |
2410 | && TLDEV(SCpnt->device->type)) | 2410 | && TLDEV(SCpnt->device->type)) |
2411 | flush_dev(SCpnt->device, SCpnt->request->sector, ha, 1); | 2411 | flush_dev(SCpnt->device, blk_rq_pos(SCpnt->request), ha, 1); |
2412 | 2412 | ||
2413 | tstatus = status_byte(spp->target_status); | 2413 | tstatus = status_byte(spp->target_status); |
2414 | 2414 | ||