diff options
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 8917154d96c7..591856131c4e 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -1779,7 +1779,7 @@ static int prot_verify_read(struct scsi_cmnd *SCpnt, sector_t start_sec, scsi_for_each_prot_sg(SCpnt, psgl, scsi_prot_sg_count(SCpnt), i) { int len = min(psgl->length, resid); - paddr = kmap_atomic(sg_page(psgl), KM_IRQ0) + psgl->offset; + paddr = kmap_atomic(sg_page(psgl)) + psgl->offset; memcpy(paddr, dif_storep + dif_offset(sector), len); sector += len >> 3; @@ -1789,7 +1789,7 @@ static int prot_verify_read(struct scsi_cmnd *SCpnt, sector_t start_sec, sector = do_div(tmp_sec, sdebug_store_sectors); } resid -= len; - kunmap_atomic(paddr, KM_IRQ0); + kunmap_atomic(paddr); } dix_reads++; @@ -1882,12 +1882,12 @@ static int prot_verify_write(struct scsi_cmnd *SCpnt, sector_t start_sec, BUG_ON(scsi_sg_count(SCpnt) == 0); BUG_ON(scsi_prot_sg_count(SCpnt) == 0); - paddr = kmap_atomic(sg_page(psgl), KM_IRQ1) + psgl->offset; + paddr = kmap_atomic(sg_page(psgl)) + psgl->offset; ppage_offset = 0; /* For each data page */ scsi_for_each_sg(SCpnt, dsgl, scsi_sg_count(SCpnt), i) { - daddr = kmap_atomic(sg_page(dsgl), KM_IRQ0) + dsgl->offset; + daddr = kmap_atomic(sg_page(dsgl)) + dsgl->offset; /* For each sector-sized chunk in data page */ for (j = 0 ; j < dsgl->length ; j += scsi_debug_sector_size) { @@ -1896,10 +1896,10 @@ static int prot_verify_write(struct scsi_cmnd *SCpnt, sector_t start_sec, * protection page advance to the next one */ if (ppage_offset >= psgl->length) { - kunmap_atomic(paddr, KM_IRQ1); + kunmap_atomic(paddr); psgl = sg_next(psgl); BUG_ON(psgl == NULL); - paddr = kmap_atomic(sg_page(psgl), KM_IRQ1) + paddr = kmap_atomic(sg_page(psgl)) + psgl->offset; ppage_offset = 0; } @@ -1972,10 +1972,10 @@ static int prot_verify_write(struct scsi_cmnd *SCpnt, sector_t start_sec, ppage_offset += sizeof(struct sd_dif_tuple); } - kunmap_atomic(daddr, KM_IRQ0); + kunmap_atomic(daddr); } - kunmap_atomic(paddr, KM_IRQ1); + kunmap_atomic(paddr); dix_writes++; @@ -1983,8 +1983,8 @@ static int prot_verify_write(struct scsi_cmnd *SCpnt, sector_t start_sec, out: dif_errors++; - kunmap_atomic(daddr, KM_IRQ0); - kunmap_atomic(paddr, KM_IRQ1); + kunmap_atomic(daddr); + kunmap_atomic(paddr); return ret; } @@ -2304,7 +2304,7 @@ static int resp_xdwriteread(struct scsi_cmnd *scp, unsigned long long lba, offset = 0; for_each_sg(sdb->table.sgl, sg, sdb->table.nents, i) { - kaddr = (unsigned char *)kmap_atomic(sg_page(sg), KM_USER0); + kaddr = (unsigned char *)kmap_atomic(sg_page(sg)); if (!kaddr) goto out; @@ -2312,7 +2312,7 @@ static int resp_xdwriteread(struct scsi_cmnd *scp, unsigned long long lba, *(kaddr + sg->offset + j) ^= *(buf + offset + j); offset += sg->length; - kunmap_atomic(kaddr, KM_USER0); + kunmap_atomic(kaddr); } ret = 0; out: |