hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/scsi/sym53c8xx_2/sym_glue.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Device driver for the SYMBIOS/LSILOGIC 53C8XX and 53C1010 family
34 * of PCI-SCSI IO processors.
....@@ -22,20 +23,6 @@
2223 * Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk>
2324 *
2425 *-----------------------------------------------------------------------------
25
- *
26
- * This program is free software; you can redistribute it and/or modify
27
- * it under the terms of the GNU General Public License as published by
28
- * the Free Software Foundation; either version 2 of the License, or
29
- * (at your option) any later version.
30
- *
31
- * This program is distributed in the hope that it will be useful,
32
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
33
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34
- * GNU General Public License for more details.
35
- *
36
- * You should have received a copy of the GNU General Public License
37
- * along with this program; if not, write to the Free Software
38
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3926 */
4027 #include <linux/ctype.h>
4128 #include <linux/init.h>
....@@ -169,12 +156,8 @@
169156 static int sym_xerr_cam_status(int cam_status, int x_status)
170157 {
171158 if (x_status) {
172
- if (x_status & XE_PARITY_ERR)
159
+ if (x_status & XE_PARITY_ERR)
173160 cam_status = DID_PARITY;
174
- else if (x_status &(XE_EXTRA_DATA|XE_SODL_UNRUN|XE_SWIDE_OVRUN))
175
- cam_status = DID_ERROR;
176
- else if (x_status & XE_BAD_PHASE)
177
- cam_status = DID_ERROR;
178161 else
179162 cam_status = DID_ERROR;
180163 }
....@@ -1312,9 +1295,9 @@
13121295 sprintf(np->s.inst_name, "sym%d", np->s.unit);
13131296
13141297 if ((SYM_CONF_DMA_ADDRESSING_MODE > 0) && (np->features & FE_DAC) &&
1315
- !pci_set_dma_mask(pdev, DMA_DAC_MASK)) {
1298
+ !dma_set_mask(&pdev->dev, DMA_DAC_MASK)) {
13161299 set_dac(np);
1317
- } else if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
1300
+ } else if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
13181301 printf_warning("%s: No suitable DMA available\n", sym_name(np));
13191302 goto attach_failed;
13201303 }
....@@ -1660,7 +1643,6 @@
16601643 .eh_bus_reset_handler = sym53c8xx_eh_bus_reset_handler,
16611644 .eh_host_reset_handler = sym53c8xx_eh_host_reset_handler,
16621645 .this_id = 7,
1663
- .use_clustering = ENABLE_CLUSTERING,
16641646 .max_sectors = 0xFFFF,
16651647 #ifdef SYM_LINUX_PROC_INFO_SUPPORT
16661648 .show_info = sym_show_info,
....@@ -1757,7 +1739,7 @@
17571739 * @state: current state of the PCI slot
17581740 */
17591741 static pci_ers_result_t sym2_io_error_detected(struct pci_dev *pdev,
1760
- enum pci_channel_state state)
1742
+ pci_channel_state_t state)
17611743 {
17621744 /* If slot is permanently frozen, turn everything off */
17631745 if (state == pci_channel_io_perm_failure) {
....@@ -1788,6 +1770,7 @@
17881770
17891771 /**
17901772 * sym2_reset_workarounds - hardware-specific work-arounds
1773
+ * @pdev: pointer to PCI device
17911774 *
17921775 * This routine is similar to sym_set_workarounds(), except
17931776 * that, at this point, we already know that the device was