hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/scsi/hptiop.c
....@@ -1,15 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * HighPoint RR3xxx/4xxx controller driver for Linux
34 * 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.
135 *
146 * Please report bugs/comments/suggestions to linux@highpoint-tech.com
157 *
....@@ -1180,7 +1172,6 @@
11801172 .eh_host_reset_handler = hptiop_reset,
11811173 .info = hptiop_info,
11821174 .emulated = 0,
1183
- .use_clustering = ENABLE_CLUSTERING,
11841175 .proc_name = driver_name,
11851176 .shost_attrs = hptiop_attrs,
11861177 .slave_configure = hptiop_slave_config,
....@@ -1293,6 +1284,7 @@
12931284 dma_addr_t start_phy;
12941285 void *start_virt;
12951286 u32 offset, i, req_size;
1287
+ int rc;
12961288
12971289 dprintk("hptiop_probe(%p)\n", pcidev);
12981290
....@@ -1309,11 +1301,14 @@
13091301
13101302 /* Enable 64bit DMA if possible */
13111303 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;
13171312 }
13181313
13191314 if (pci_request_regions(pcidev, driver_name)) {