diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 15:19:53 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 15:19:53 -0400 |
commit | 45711f1af6eff1a6d010703b4862e0d2b9afd056 (patch) | |
tree | 3d0048f46e3df9d217d56127462ebe680348bd5a /drivers/scsi/megaraid | |
parent | 78c2f0b8c285c5305b3e67b0595200541e15eb43 (diff) |
[SG] Update drivers to use sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 78779209ac89..c8923108183a 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c | |||
@@ -1584,10 +1584,8 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) | |||
1584 | caddr_t vaddr; | 1584 | caddr_t vaddr; |
1585 | 1585 | ||
1586 | sgl = scsi_sglist(scp); | 1586 | sgl = scsi_sglist(scp); |
1587 | if (sgl->page) { | 1587 | if (sg_page(sgl)) { |
1588 | vaddr = (caddr_t) | 1588 | vaddr = (caddr_t) sg_virt(&sgl[0]); |
1589 | (page_address((&sgl[0])->page) | ||
1590 | + (&sgl[0])->offset); | ||
1591 | 1589 | ||
1592 | memset(vaddr, 0, scp->cmnd[4]); | 1590 | memset(vaddr, 0, scp->cmnd[4]); |
1593 | } | 1591 | } |
@@ -2328,10 +2326,8 @@ megaraid_mbox_dpc(unsigned long devp) | |||
2328 | && IS_RAID_CH(raid_dev, scb->dev_channel)) { | 2326 | && IS_RAID_CH(raid_dev, scb->dev_channel)) { |
2329 | 2327 | ||
2330 | sgl = scsi_sglist(scp); | 2328 | sgl = scsi_sglist(scp); |
2331 | if (sgl->page) { | 2329 | if (sg_page(sgl)) { |
2332 | c = *(unsigned char *) | 2330 | c = *(unsigned char *) sg_virt(&sgl[0]); |
2333 | (page_address((&sgl[0])->page) + | ||
2334 | (&sgl[0])->offset); | ||
2335 | } else { | 2331 | } else { |
2336 | con_log(CL_ANN, (KERN_WARNING | 2332 | con_log(CL_ANN, (KERN_WARNING |
2337 | "megaraid mailbox: invalid sg:%d\n", | 2333 | "megaraid mailbox: invalid sg:%d\n", |