.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * HighPoint RR3xxx/4xxx controller driver for Linux |
---|
3 | 4 | * Copyright (C) 2006-2015 HighPoint Technologies, Inc. All Rights Reserved. |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License as published by |
---|
7 | | - * the Free Software Foundation; version 2 of the License. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope that it will be useful, |
---|
10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | | - * GNU General Public License for more details. |
---|
13 | 5 | * |
---|
14 | 6 | * Please report bugs/comments/suggestions to linux@highpoint-tech.com |
---|
15 | 7 | * |
---|
.. | .. |
---|
1180 | 1172 | .eh_host_reset_handler = hptiop_reset, |
---|
1181 | 1173 | .info = hptiop_info, |
---|
1182 | 1174 | .emulated = 0, |
---|
1183 | | - .use_clustering = ENABLE_CLUSTERING, |
---|
1184 | 1175 | .proc_name = driver_name, |
---|
1185 | 1176 | .shost_attrs = hptiop_attrs, |
---|
1186 | 1177 | .slave_configure = hptiop_slave_config, |
---|
.. | .. |
---|
1293 | 1284 | dma_addr_t start_phy; |
---|
1294 | 1285 | void *start_virt; |
---|
1295 | 1286 | u32 offset, i, req_size; |
---|
| 1287 | + int rc; |
---|
1296 | 1288 | |
---|
1297 | 1289 | dprintk("hptiop_probe(%p)\n", pcidev); |
---|
1298 | 1290 | |
---|
.. | .. |
---|
1309 | 1301 | |
---|
1310 | 1302 | /* Enable 64bit DMA if possible */ |
---|
1311 | 1303 | iop_ops = (struct hptiop_adapter_ops *)id->driver_data; |
---|
1312 | | - if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(iop_ops->hw_dma_bit_mask))) { |
---|
1313 | | - if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(32))) { |
---|
1314 | | - printk(KERN_ERR "hptiop: fail to set dma_mask\n"); |
---|
1315 | | - goto disable_pci_device; |
---|
1316 | | - } |
---|
| 1304 | + rc = dma_set_mask(&pcidev->dev, |
---|
| 1305 | + DMA_BIT_MASK(iop_ops->hw_dma_bit_mask)); |
---|
| 1306 | + if (rc) |
---|
| 1307 | + rc = dma_set_mask(&pcidev->dev, DMA_BIT_MASK(32)); |
---|
| 1308 | + |
---|
| 1309 | + if (rc) { |
---|
| 1310 | + printk(KERN_ERR "hptiop: fail to set dma_mask\n"); |
---|
| 1311 | + goto disable_pci_device; |
---|
1317 | 1312 | } |
---|
1318 | 1313 | |
---|
1319 | 1314 | if (pci_request_regions(pcidev, driver_name)) { |
---|