aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-05-07 09:24:39 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-05-11 03:50:54 -0400
commit83096ebf1263b2c1ee5e653ba37d993d02e3eb7b (patch)
tree2226b71a616ec1cb2d37511c6a09ba9507a1cd69 /drivers/scsi/lpfc
parent5b93629b4509c03ffa87a9316412fedf6f58cb37 (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/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 36fd2e75da1c..a8fab3977116 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -1313,10 +1313,10 @@ lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd,
1313 uint32_t bgstat = bgf->bgstat; 1313 uint32_t bgstat = bgf->bgstat;
1314 uint64_t failing_sector = 0; 1314 uint64_t failing_sector = 0;
1315 1315
1316 printk(KERN_ERR "BG ERROR in cmd 0x%x lba 0x%llx blk cnt 0x%lx " 1316 printk(KERN_ERR "BG ERROR in cmd 0x%x lba 0x%llx blk cnt 0x%x "
1317 "bgstat=0x%x bghm=0x%x\n", 1317 "bgstat=0x%x bghm=0x%x\n",
1318 cmd->cmnd[0], (unsigned long long)scsi_get_lba(cmd), 1318 cmd->cmnd[0], (unsigned long long)scsi_get_lba(cmd),
1319 cmd->request->nr_sectors, bgstat, bghm); 1319 blk_rq_sectors(cmd->request), bgstat, bghm);
1320 1320
1321 spin_lock(&_dump_buf_lock); 1321 spin_lock(&_dump_buf_lock);
1322 if (!_dump_buf_done) { 1322 if (!_dump_buf_done) {
@@ -2375,15 +2375,15 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
2375 if (cmnd->cmnd[0] == READ_10) 2375 if (cmnd->cmnd[0] == READ_10)
2376 lpfc_printf_vlog(vport, KERN_WARNING, LOG_BG, 2376 lpfc_printf_vlog(vport, KERN_WARNING, LOG_BG,
2377 "9035 BLKGRD: READ @ sector %llu, " 2377 "9035 BLKGRD: READ @ sector %llu, "
2378 "count %lu\n", 2378 "count %u\n",
2379 (unsigned long long)scsi_get_lba(cmnd), 2379 (unsigned long long)scsi_get_lba(cmnd),
2380 cmnd->request->nr_sectors); 2380 blk_rq_sectors(cmnd->request));
2381 else if (cmnd->cmnd[0] == WRITE_10) 2381 else if (cmnd->cmnd[0] == WRITE_10)
2382 lpfc_printf_vlog(vport, KERN_WARNING, LOG_BG, 2382 lpfc_printf_vlog(vport, KERN_WARNING, LOG_BG,
2383 "9036 BLKGRD: WRITE @ sector %llu, " 2383 "9036 BLKGRD: WRITE @ sector %llu, "
2384 "count %lu cmd=%p\n", 2384 "count %u cmd=%p\n",
2385 (unsigned long long)scsi_get_lba(cmnd), 2385 (unsigned long long)scsi_get_lba(cmnd),
2386 cmnd->request->nr_sectors, 2386 blk_rq_sectors(cmnd->request),
2387 cmnd); 2387 cmnd);
2388 2388
2389 err = lpfc_bg_scsi_prep_dma_buf(phba, lpfc_cmd); 2389 err = lpfc_bg_scsi_prep_dma_buf(phba, lpfc_cmd);
@@ -2403,15 +2403,15 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
2403 if (cmnd->cmnd[0] == READ_10) 2403 if (cmnd->cmnd[0] == READ_10)
2404 lpfc_printf_vlog(vport, KERN_WARNING, LOG_BG, 2404 lpfc_printf_vlog(vport, KERN_WARNING, LOG_BG,
2405 "9040 dbg: READ @ sector %llu, " 2405 "9040 dbg: READ @ sector %llu, "
2406 "count %lu\n", 2406 "count %u\n",
2407 (unsigned long long)scsi_get_lba(cmnd), 2407 (unsigned long long)scsi_get_lba(cmnd),
2408 cmnd->request->nr_sectors); 2408 blk_rq_sectors(cmnd->request));
2409 else if (cmnd->cmnd[0] == WRITE_10) 2409 else if (cmnd->cmnd[0] == WRITE_10)
2410 lpfc_printf_vlog(vport, KERN_WARNING, LOG_BG, 2410 lpfc_printf_vlog(vport, KERN_WARNING, LOG_BG,
2411 "9041 dbg: WRITE @ sector %llu, " 2411 "9041 dbg: WRITE @ sector %llu, "
2412 "count %lu cmd=%p\n", 2412 "count %u cmd=%p\n",
2413 (unsigned long long)scsi_get_lba(cmnd), 2413 (unsigned long long)scsi_get_lba(cmnd),
2414 cmnd->request->nr_sectors, cmnd); 2414 blk_rq_sectors(cmnd->request), cmnd);
2415 else 2415 else
2416 lpfc_printf_vlog(vport, KERN_WARNING, LOG_BG, 2416 lpfc_printf_vlog(vport, KERN_WARNING, LOG_BG,
2417 "9042 dbg: parser not implemented\n"); 2417 "9042 dbg: parser not implemented\n");