.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/drivers/acorn/scsi/cumana_2.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 | * Changelog: |
---|
11 | 8 | * 30-08-1997 RMK 0.0.0 Created, READONLY version. |
---|
.. | .. |
---|
26 | 23 | #include <linux/interrupt.h> |
---|
27 | 24 | #include <linux/init.h> |
---|
28 | 25 | #include <linux/dma-mapping.h> |
---|
| 26 | +#include <linux/pgtable.h> |
---|
29 | 27 | |
---|
30 | 28 | #include <asm/dma.h> |
---|
31 | 29 | #include <asm/ecard.h> |
---|
32 | 30 | #include <asm/io.h> |
---|
33 | | -#include <asm/pgtable.h> |
---|
34 | 31 | |
---|
35 | 32 | #include "../scsi.h" |
---|
36 | 33 | #include <scsi/scsi_host.h> |
---|
.. | .. |
---|
169 | 166 | |
---|
170 | 167 | bufs = copy_SCp_to_sg(&info->sg[0], SCp, NR_SG); |
---|
171 | 168 | |
---|
172 | | - if (direction == DMA_OUT) |
---|
173 | | - map_dir = DMA_TO_DEVICE, |
---|
174 | | - dma_dir = DMA_MODE_WRITE, |
---|
| 169 | + if (direction == DMA_OUT) { |
---|
| 170 | + map_dir = DMA_TO_DEVICE; |
---|
| 171 | + dma_dir = DMA_MODE_WRITE; |
---|
175 | 172 | alatch_dir = ALATCH_DMA_OUT; |
---|
176 | | - else |
---|
177 | | - map_dir = DMA_FROM_DEVICE, |
---|
178 | | - dma_dir = DMA_MODE_READ, |
---|
| 173 | + } else { |
---|
| 174 | + map_dir = DMA_FROM_DEVICE; |
---|
| 175 | + dma_dir = DMA_MODE_READ; |
---|
179 | 176 | alatch_dir = ALATCH_DMA_IN; |
---|
| 177 | + } |
---|
180 | 178 | |
---|
181 | 179 | dma_map_sg(dev, info->sg, bufs, map_dir); |
---|
182 | 180 | |
---|
.. | .. |
---|
329 | 327 | cumanascsi_2_terminator_ctl(host, 0); |
---|
330 | 328 | else |
---|
331 | 329 | ret = -EINVAL; |
---|
332 | | - } else |
---|
| 330 | + } else { |
---|
333 | 331 | ret = -EINVAL; |
---|
334 | | - } else |
---|
| 332 | + } |
---|
| 333 | + } else { |
---|
335 | 334 | ret = -EINVAL; |
---|
| 335 | + } |
---|
336 | 336 | |
---|
337 | 337 | return ret; |
---|
338 | 338 | } |
---|
.. | .. |
---|
367 | 367 | .this_id = 7, |
---|
368 | 368 | .sg_tablesize = SG_MAX_SEGMENTS, |
---|
369 | 369 | .dma_boundary = IOMD_DMA_BOUNDARY, |
---|
370 | | - .use_clustering = DISABLE_CLUSTERING, |
---|
371 | 370 | .proc_name = "cumanascsi2", |
---|
372 | 371 | }; |
---|
373 | 372 | |
---|