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.c | |
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.c')
-rw-r--r-- | drivers/scsi/megaraid.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 10d1aff9938a..66c652035730 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
@@ -658,7 +658,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy) | |||
658 | struct scatterlist *sg; | 658 | struct scatterlist *sg; |
659 | 659 | ||
660 | sg = scsi_sglist(cmd); | 660 | sg = scsi_sglist(cmd); |
661 | buf = kmap_atomic(sg->page, KM_IRQ0) + sg->offset; | 661 | buf = kmap_atomic(sg_page(sg), KM_IRQ0) + sg->offset; |
662 | 662 | ||
663 | memset(buf, 0, cmd->cmnd[4]); | 663 | memset(buf, 0, cmd->cmnd[4]); |
664 | kunmap_atomic(buf - sg->offset, KM_IRQ0); | 664 | kunmap_atomic(buf - sg->offset, KM_IRQ0); |
@@ -1542,10 +1542,8 @@ mega_cmd_done(adapter_t *adapter, u8 completed[], int nstatus, int status) | |||
1542 | if( cmd->cmnd[0] == INQUIRY && !islogical ) { | 1542 | if( cmd->cmnd[0] == INQUIRY && !islogical ) { |
1543 | 1543 | ||
1544 | sgl = scsi_sglist(cmd); | 1544 | sgl = scsi_sglist(cmd); |
1545 | if( sgl->page ) { | 1545 | if( sg_page(sgl) ) { |
1546 | c = *(unsigned char *) | 1546 | c = *(unsigned char *) sg_virt(&sgl[0]); |
1547 | page_address((&sgl[0])->page) + | ||
1548 | (&sgl[0])->offset; | ||
1549 | } else { | 1547 | } else { |
1550 | printk(KERN_WARNING | 1548 | printk(KERN_WARNING |
1551 | "megaraid: invalid sg.\n"); | 1549 | "megaraid: invalid sg.\n"); |