aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/megaraid.c')
-rw-r--r--drivers/scsi/megaraid.c8
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");