| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Device driver for the SYMBIOS/LSILOGIC 53C8XX and 53C1010 family |
|---|
| 3 | 4 | * of PCI-SCSI IO processors. |
|---|
| .. | .. |
|---|
| 22 | 23 | * Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk> |
|---|
| 23 | 24 | * |
|---|
| 24 | 25 | *----------------------------------------------------------------------------- |
|---|
| 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 |
|---|
| 39 | 26 | */ |
|---|
| 40 | 27 | #include <linux/ctype.h> |
|---|
| 41 | 28 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 169 | 156 | static int sym_xerr_cam_status(int cam_status, int x_status) |
|---|
| 170 | 157 | { |
|---|
| 171 | 158 | if (x_status) { |
|---|
| 172 | | - if (x_status & XE_PARITY_ERR) |
|---|
| 159 | + if (x_status & XE_PARITY_ERR) |
|---|
| 173 | 160 | 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; |
|---|
| 178 | 161 | else |
|---|
| 179 | 162 | cam_status = DID_ERROR; |
|---|
| 180 | 163 | } |
|---|
| .. | .. |
|---|
| 1312 | 1295 | sprintf(np->s.inst_name, "sym%d", np->s.unit); |
|---|
| 1313 | 1296 | |
|---|
| 1314 | 1297 | 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)) { |
|---|
| 1316 | 1299 | 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))) { |
|---|
| 1318 | 1301 | printf_warning("%s: No suitable DMA available\n", sym_name(np)); |
|---|
| 1319 | 1302 | goto attach_failed; |
|---|
| 1320 | 1303 | } |
|---|
| .. | .. |
|---|
| 1660 | 1643 | .eh_bus_reset_handler = sym53c8xx_eh_bus_reset_handler, |
|---|
| 1661 | 1644 | .eh_host_reset_handler = sym53c8xx_eh_host_reset_handler, |
|---|
| 1662 | 1645 | .this_id = 7, |
|---|
| 1663 | | - .use_clustering = ENABLE_CLUSTERING, |
|---|
| 1664 | 1646 | .max_sectors = 0xFFFF, |
|---|
| 1665 | 1647 | #ifdef SYM_LINUX_PROC_INFO_SUPPORT |
|---|
| 1666 | 1648 | .show_info = sym_show_info, |
|---|
| .. | .. |
|---|
| 1757 | 1739 | * @state: current state of the PCI slot |
|---|
| 1758 | 1740 | */ |
|---|
| 1759 | 1741 | 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) |
|---|
| 1761 | 1743 | { |
|---|
| 1762 | 1744 | /* If slot is permanently frozen, turn everything off */ |
|---|
| 1763 | 1745 | if (state == pci_channel_io_perm_failure) { |
|---|
| .. | .. |
|---|
| 1788 | 1770 | |
|---|
| 1789 | 1771 | /** |
|---|
| 1790 | 1772 | * sym2_reset_workarounds - hardware-specific work-arounds |
|---|
| 1773 | + * @pdev: pointer to PCI device |
|---|
| 1791 | 1774 | * |
|---|
| 1792 | 1775 | * This routine is similar to sym_set_workarounds(), except |
|---|
| 1793 | 1776 | * that, at this point, we already know that the device was |
|---|