.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * SCSI low-level driver for the MESH (Macintosh Enhanced SCSI Hardware) |
---|
3 | 4 | * bus adaptor found on Power Macintosh computers. |
---|
.. | .. |
---|
30 | 31 | #include <linux/reboot.h> |
---|
31 | 32 | #include <linux/spinlock.h> |
---|
32 | 33 | #include <linux/pci.h> |
---|
| 34 | +#include <linux/pgtable.h> |
---|
33 | 35 | #include <asm/dbdma.h> |
---|
34 | 36 | #include <asm/io.h> |
---|
35 | | -#include <asm/pgtable.h> |
---|
36 | 37 | #include <asm/prom.h> |
---|
37 | 38 | #include <asm/irq.h> |
---|
38 | 39 | #include <asm/hydra.h> |
---|
.. | .. |
---|
1456 | 1457 | /* huh? we expected a phase mismatch */ |
---|
1457 | 1458 | ms->n_msgin = 0; |
---|
1458 | 1459 | ms->msgphase = msg_in; |
---|
1459 | | - /* fall through */ |
---|
| 1460 | + fallthrough; |
---|
1460 | 1461 | |
---|
1461 | 1462 | case msg_in: |
---|
1462 | 1463 | /* should have some message bytes in fifo */ |
---|
.. | .. |
---|
1844 | 1845 | .this_id = 7, |
---|
1845 | 1846 | .sg_tablesize = SG_ALL, |
---|
1846 | 1847 | .cmd_per_lun = 2, |
---|
1847 | | - .use_clustering = DISABLE_CLUSTERING, |
---|
| 1848 | + .max_segment_size = 65535, |
---|
1848 | 1849 | }; |
---|
1849 | 1850 | |
---|
1850 | 1851 | static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match) |
---|
.. | .. |
---|
1921 | 1922 | /* We use the PCI APIs for now until the generic one gets fixed |
---|
1922 | 1923 | * enough or until we get some macio-specific versions |
---|
1923 | 1924 | */ |
---|
1924 | | - dma_cmd_space = pci_zalloc_consistent(macio_get_pci_dev(mdev), |
---|
1925 | | - ms->dma_cmd_size, &dma_cmd_bus); |
---|
| 1925 | + dma_cmd_space = dma_alloc_coherent(&macio_get_pci_dev(mdev)->dev, |
---|
| 1926 | + ms->dma_cmd_size, &dma_cmd_bus, |
---|
| 1927 | + GFP_KERNEL); |
---|
1926 | 1928 | if (dma_cmd_space == NULL) { |
---|
1927 | 1929 | printk(KERN_ERR "mesh: can't allocate DMA table\n"); |
---|
1928 | 1930 | goto out_unmap; |
---|
.. | .. |
---|
1980 | 1982 | */ |
---|
1981 | 1983 | mesh_shutdown(mdev); |
---|
1982 | 1984 | set_mesh_power(ms, 0); |
---|
1983 | | - pci_free_consistent(macio_get_pci_dev(mdev), ms->dma_cmd_size, |
---|
| 1985 | + dma_free_coherent(&macio_get_pci_dev(mdev)->dev, ms->dma_cmd_size, |
---|
1984 | 1986 | ms->dma_cmd_space, ms->dma_cmd_bus); |
---|
1985 | 1987 | out_unmap: |
---|
1986 | 1988 | iounmap(ms->dma); |
---|
.. | .. |
---|
2013 | 2015 | iounmap(ms->dma); |
---|
2014 | 2016 | |
---|
2015 | 2017 | /* Free DMA commands memory */ |
---|
2016 | | - pci_free_consistent(macio_get_pci_dev(mdev), ms->dma_cmd_size, |
---|
| 2018 | + dma_free_coherent(&macio_get_pci_dev(mdev)->dev, ms->dma_cmd_size, |
---|
2017 | 2019 | ms->dma_cmd_space, ms->dma_cmd_bus); |
---|
2018 | 2020 | |
---|
2019 | 2021 | /* Release memory resources */ |
---|