| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/drivers/acorn/scsi/powertec.c |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 1997-2005 Russell King |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | 6 | */ |
|---|
| 10 | 7 | #include <linux/module.h> |
|---|
| 11 | 8 | #include <linux/blkdev.h> |
|---|
| .. | .. |
|---|
| 17 | 14 | #include <linux/interrupt.h> |
|---|
| 18 | 15 | #include <linux/init.h> |
|---|
| 19 | 16 | #include <linux/dma-mapping.h> |
|---|
| 17 | +#include <linux/pgtable.h> |
|---|
| 20 | 18 | |
|---|
| 21 | 19 | #include <asm/dma.h> |
|---|
| 22 | 20 | #include <asm/ecard.h> |
|---|
| 23 | 21 | #include <asm/io.h> |
|---|
| 24 | | -#include <asm/pgtable.h> |
|---|
| 25 | 22 | |
|---|
| 26 | 23 | #include "../scsi.h" |
|---|
| 27 | 24 | #include <scsi/scsi_host.h> |
|---|
| .. | .. |
|---|
| 141 | 138 | |
|---|
| 142 | 139 | bufs = copy_SCp_to_sg(&info->sg[0], SCp, NR_SG); |
|---|
| 143 | 140 | |
|---|
| 144 | | - if (direction == DMA_OUT) |
|---|
| 145 | | - map_dir = DMA_TO_DEVICE, |
|---|
| 141 | + if (direction == DMA_OUT) { |
|---|
| 142 | + map_dir = DMA_TO_DEVICE; |
|---|
| 146 | 143 | dma_dir = DMA_MODE_WRITE; |
|---|
| 147 | | - else |
|---|
| 148 | | - map_dir = DMA_FROM_DEVICE, |
|---|
| 144 | + } else { |
|---|
| 145 | + map_dir = DMA_FROM_DEVICE; |
|---|
| 149 | 146 | dma_dir = DMA_MODE_READ; |
|---|
| 147 | + } |
|---|
| 150 | 148 | |
|---|
| 151 | 149 | dma_map_sg(dev, info->sg, bufs, map_dir); |
|---|
| 152 | 150 | |
|---|
| .. | .. |
|---|
| 294 | 292 | .sg_tablesize = SG_MAX_SEGMENTS, |
|---|
| 295 | 293 | .dma_boundary = IOMD_DMA_BOUNDARY, |
|---|
| 296 | 294 | .cmd_per_lun = 2, |
|---|
| 297 | | - .use_clustering = ENABLE_CLUSTERING, |
|---|
| 298 | 295 | .proc_name = "powertec", |
|---|
| 299 | 296 | }; |
|---|
| 300 | 297 | |
|---|