hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/scsi/a100u2w.c
....@@ -1078,7 +1078,6 @@
10781078 .can_queue = 1,
10791079 .this_id = 1,
10801080 .sg_tablesize = SG_ALL,
1081
- .use_clustering = ENABLE_CLUSTERING,
10821081 };
10831082
10841083 static int inia100_probe_one(struct pci_dev *pdev,
....@@ -1094,7 +1093,7 @@
10941093
10951094 if (pci_enable_device(pdev))
10961095 goto out;
1097
- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
1096
+ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
10981097 printk(KERN_WARNING "Unable to set 32bit DMA "
10991098 "on inia100 adapter, ignoring.\n");
11001099 goto out_disable_device;
....@@ -1124,7 +1123,8 @@
11241123
11251124 /* Get total memory needed for SCB */
11261125 sz = ORC_MAXQUEUE * sizeof(struct orc_scb);
1127
- host->scb_virt = pci_zalloc_consistent(pdev, sz, &host->scb_phys);
1126
+ host->scb_virt = dma_alloc_coherent(&pdev->dev, sz, &host->scb_phys,
1127
+ GFP_KERNEL);
11281128 if (!host->scb_virt) {
11291129 printk("inia100: SCB memory allocation error\n");
11301130 goto out_host_put;
....@@ -1132,7 +1132,8 @@
11321132
11331133 /* Get total memory needed for ESCB */
11341134 sz = ORC_MAXQUEUE * sizeof(struct orc_extended_scb);
1135
- host->escb_virt = pci_zalloc_consistent(pdev, sz, &host->escb_phys);
1135
+ host->escb_virt = dma_alloc_coherent(&pdev->dev, sz, &host->escb_phys,
1136
+ GFP_KERNEL);
11361137 if (!host->escb_virt) {
11371138 printk("inia100: ESCB memory allocation error\n");
11381139 goto out_free_scb_array;
....@@ -1177,10 +1178,12 @@
11771178 out_free_irq:
11781179 free_irq(shost->irq, shost);
11791180 out_free_escb_array:
1180
- pci_free_consistent(pdev, ORC_MAXQUEUE * sizeof(struct orc_extended_scb),
1181
+ dma_free_coherent(&pdev->dev,
1182
+ ORC_MAXQUEUE * sizeof(struct orc_extended_scb),
11811183 host->escb_virt, host->escb_phys);
11821184 out_free_scb_array:
1183
- pci_free_consistent(pdev, ORC_MAXQUEUE * sizeof(struct orc_scb),
1185
+ dma_free_coherent(&pdev->dev,
1186
+ ORC_MAXQUEUE * sizeof(struct orc_scb),
11841187 host->scb_virt, host->scb_phys);
11851188 out_host_put:
11861189 scsi_host_put(shost);
....@@ -1200,9 +1203,11 @@
12001203 scsi_remove_host(shost);
12011204
12021205 free_irq(shost->irq, shost);
1203
- pci_free_consistent(pdev, ORC_MAXQUEUE * sizeof(struct orc_extended_scb),
1206
+ dma_free_coherent(&pdev->dev,
1207
+ ORC_MAXQUEUE * sizeof(struct orc_extended_scb),
12041208 host->escb_virt, host->escb_phys);
1205
- pci_free_consistent(pdev, ORC_MAXQUEUE * sizeof(struct orc_scb),
1209
+ dma_free_coherent(&pdev->dev,
1210
+ ORC_MAXQUEUE * sizeof(struct orc_scb),
12061211 host->scb_virt, host->scb_phys);
12071212 release_region(shost->io_port, 256);
12081213