.. | .. |
---|
1078 | 1078 | .can_queue = 1, |
---|
1079 | 1079 | .this_id = 1, |
---|
1080 | 1080 | .sg_tablesize = SG_ALL, |
---|
1081 | | - .use_clustering = ENABLE_CLUSTERING, |
---|
1082 | 1081 | }; |
---|
1083 | 1082 | |
---|
1084 | 1083 | static int inia100_probe_one(struct pci_dev *pdev, |
---|
.. | .. |
---|
1094 | 1093 | |
---|
1095 | 1094 | if (pci_enable_device(pdev)) |
---|
1096 | 1095 | goto out; |
---|
1097 | | - if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { |
---|
| 1096 | + if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) { |
---|
1098 | 1097 | printk(KERN_WARNING "Unable to set 32bit DMA " |
---|
1099 | 1098 | "on inia100 adapter, ignoring.\n"); |
---|
1100 | 1099 | goto out_disable_device; |
---|
.. | .. |
---|
1124 | 1123 | |
---|
1125 | 1124 | /* Get total memory needed for SCB */ |
---|
1126 | 1125 | 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); |
---|
1128 | 1128 | if (!host->scb_virt) { |
---|
1129 | 1129 | printk("inia100: SCB memory allocation error\n"); |
---|
1130 | 1130 | goto out_host_put; |
---|
.. | .. |
---|
1132 | 1132 | |
---|
1133 | 1133 | /* Get total memory needed for ESCB */ |
---|
1134 | 1134 | 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); |
---|
1136 | 1137 | if (!host->escb_virt) { |
---|
1137 | 1138 | printk("inia100: ESCB memory allocation error\n"); |
---|
1138 | 1139 | goto out_free_scb_array; |
---|
.. | .. |
---|
1177 | 1178 | out_free_irq: |
---|
1178 | 1179 | free_irq(shost->irq, shost); |
---|
1179 | 1180 | 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), |
---|
1181 | 1183 | host->escb_virt, host->escb_phys); |
---|
1182 | 1184 | 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), |
---|
1184 | 1187 | host->scb_virt, host->scb_phys); |
---|
1185 | 1188 | out_host_put: |
---|
1186 | 1189 | scsi_host_put(shost); |
---|
.. | .. |
---|
1200 | 1203 | scsi_remove_host(shost); |
---|
1201 | 1204 | |
---|
1202 | 1205 | 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), |
---|
1204 | 1208 | 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), |
---|
1206 | 1211 | host->scb_virt, host->scb_phys); |
---|
1207 | 1212 | release_region(shost->io_port, 256); |
---|
1208 | 1213 | |
---|