@@ -1094,7 +1094,7 @@ static int inia100_probe_one(struct pci_dev *pdev,
1094
1094
1095
1095
if (pci_enable_device (pdev ))
1096
1096
goto out ;
1097
- if (pci_set_dma_mask ( pdev , DMA_BIT_MASK (32 ))) {
1097
+ if (dma_set_mask ( & pdev -> dev , DMA_BIT_MASK (32 ))) {
1098
1098
printk (KERN_WARNING "Unable to set 32bit DMA "
1099
1099
"on inia100 adapter, ignoring.\n" );
1100
1100
goto out_disable_device ;
@@ -1124,15 +1124,17 @@ static int inia100_probe_one(struct pci_dev *pdev,
1124
1124
1125
1125
/* Get total memory needed for SCB */
1126
1126
sz = ORC_MAXQUEUE * sizeof (struct orc_scb );
1127
- host -> scb_virt = pci_zalloc_consistent (pdev , sz , & host -> scb_phys );
1127
+ host -> scb_virt = dma_zalloc_coherent (& pdev -> dev , sz , & host -> scb_phys ,
1128
+ GFP_KERNEL );
1128
1129
if (!host -> scb_virt ) {
1129
1130
printk ("inia100: SCB memory allocation error\n" );
1130
1131
goto out_host_put ;
1131
1132
}
1132
1133
1133
1134
/* Get total memory needed for ESCB */
1134
1135
sz = ORC_MAXQUEUE * sizeof (struct orc_extended_scb );
1135
- host -> escb_virt = pci_zalloc_consistent (pdev , sz , & host -> escb_phys );
1136
+ host -> escb_virt = dma_zalloc_coherent (& pdev -> dev , sz , & host -> escb_phys ,
1137
+ GFP_KERNEL );
1136
1138
if (!host -> escb_virt ) {
1137
1139
printk ("inia100: ESCB memory allocation error\n" );
1138
1140
goto out_free_scb_array ;
@@ -1177,10 +1179,12 @@ static int inia100_probe_one(struct pci_dev *pdev,
1177
1179
out_free_irq :
1178
1180
free_irq (shost -> irq , shost );
1179
1181
out_free_escb_array :
1180
- pci_free_consistent (pdev , ORC_MAXQUEUE * sizeof (struct orc_extended_scb ),
1182
+ dma_free_coherent (& pdev -> dev ,
1183
+ ORC_MAXQUEUE * sizeof (struct orc_extended_scb ),
1181
1184
host -> escb_virt , host -> escb_phys );
1182
1185
out_free_scb_array :
1183
- pci_free_consistent (pdev , ORC_MAXQUEUE * sizeof (struct orc_scb ),
1186
+ dma_free_coherent (& pdev -> dev ,
1187
+ ORC_MAXQUEUE * sizeof (struct orc_scb ),
1184
1188
host -> scb_virt , host -> scb_phys );
1185
1189
out_host_put :
1186
1190
scsi_host_put (shost );
@@ -1200,9 +1204,11 @@ static void inia100_remove_one(struct pci_dev *pdev)
1200
1204
scsi_remove_host (shost );
1201
1205
1202
1206
free_irq (shost -> irq , shost );
1203
- pci_free_consistent (pdev , ORC_MAXQUEUE * sizeof (struct orc_extended_scb ),
1207
+ dma_free_coherent (& pdev -> dev ,
1208
+ ORC_MAXQUEUE * sizeof (struct orc_extended_scb ),
1204
1209
host -> escb_virt , host -> escb_phys );
1205
- pci_free_consistent (pdev , ORC_MAXQUEUE * sizeof (struct orc_scb ),
1210
+ dma_free_coherent (& pdev -> dev ,
1211
+ ORC_MAXQUEUE * sizeof (struct orc_scb ),
1206
1212
host -> scb_virt , host -> scb_phys );
1207
1213
release_region (shost -> io_port , 256 );
1208
1214
0 commit comments