.. | .. |
---|
208 | 208 | |
---|
209 | 209 | #define IPS_DMA_DIR(scb) ((!scb->scsi_cmd || ips_is_passthru(scb->scsi_cmd) || \ |
---|
210 | 210 | DMA_NONE == scb->scsi_cmd->sc_data_direction) ? \ |
---|
211 | | - PCI_DMA_BIDIRECTIONAL : \ |
---|
| 211 | + DMA_BIDIRECTIONAL : \ |
---|
212 | 212 | scb->scsi_cmd->sc_data_direction) |
---|
213 | 213 | |
---|
214 | 214 | #ifdef IPS_DEBUG |
---|
.. | .. |
---|
365 | 365 | .this_id = -1, |
---|
366 | 366 | .sg_tablesize = IPS_MAX_SG, |
---|
367 | 367 | .cmd_per_lun = 3, |
---|
368 | | - .use_clustering = ENABLE_CLUSTERING, |
---|
369 | 368 | .no_write_same = 1, |
---|
370 | 369 | }; |
---|
371 | 370 | |
---|
.. | .. |
---|
499 | 498 | int i; |
---|
500 | 499 | char *key; |
---|
501 | 500 | char *value; |
---|
502 | | - IPS_OPTION options[] = { |
---|
| 501 | + static const IPS_OPTION options[] = { |
---|
503 | 502 | {"noi2o", &ips_force_i2o, 0}, |
---|
504 | 503 | {"nommap", &ips_force_memio, 0}, |
---|
505 | 504 | {"ioctlsize", &ips_ioctlsize, IPS_IOCTL_SIZE}, |
---|
.. | .. |
---|
1529 | 1528 | if (ha->ioctl_data && length <= ha->ioctl_len) |
---|
1530 | 1529 | return 0; |
---|
1531 | 1530 | /* there is no buffer or it's not big enough, allocate a new one */ |
---|
1532 | | - bigger_buf = pci_alloc_consistent(ha->pcidev, length, &dma_busaddr); |
---|
| 1531 | + bigger_buf = dma_alloc_coherent(&ha->pcidev->dev, length, &dma_busaddr, |
---|
| 1532 | + GFP_KERNEL); |
---|
1533 | 1533 | if (bigger_buf) { |
---|
1534 | 1534 | /* free the old memory */ |
---|
1535 | | - pci_free_consistent(ha->pcidev, ha->ioctl_len, ha->ioctl_data, |
---|
1536 | | - ha->ioctl_busaddr); |
---|
| 1535 | + dma_free_coherent(&ha->pcidev->dev, ha->ioctl_len, |
---|
| 1536 | + ha->ioctl_data, ha->ioctl_busaddr); |
---|
1537 | 1537 | /* use the new memory */ |
---|
1538 | 1538 | ha->ioctl_data = (char *) bigger_buf; |
---|
1539 | 1539 | ha->ioctl_len = length; |
---|
.. | .. |
---|
1678 | 1678 | } else if (!ha->flash_data) { |
---|
1679 | 1679 | datasize = pt->CoppCP.cmd.flashfw.total_packets * |
---|
1680 | 1680 | pt->CoppCP.cmd.flashfw.count; |
---|
1681 | | - ha->flash_data = pci_alloc_consistent(ha->pcidev, |
---|
1682 | | - datasize, |
---|
1683 | | - &ha->flash_busaddr); |
---|
| 1681 | + ha->flash_data = dma_alloc_coherent(&ha->pcidev->dev, |
---|
| 1682 | + datasize, &ha->flash_busaddr, GFP_KERNEL); |
---|
1684 | 1683 | if (!ha->flash_data){ |
---|
1685 | 1684 | printk(KERN_WARNING "Unable to allocate a flash buffer\n"); |
---|
1686 | 1685 | return IPS_FAILURE; |
---|
.. | .. |
---|
1801 | 1800 | } |
---|
1802 | 1801 | if (IPS_USE_ENH_SGLIST(ha)) { |
---|
1803 | 1802 | scb->sg_list.enh_list[indx].address_lo = |
---|
1804 | | - cpu_to_le32(pci_dma_lo32(busaddr)); |
---|
| 1803 | + cpu_to_le32(lower_32_bits(busaddr)); |
---|
1805 | 1804 | scb->sg_list.enh_list[indx].address_hi = |
---|
1806 | | - cpu_to_le32(pci_dma_hi32(busaddr)); |
---|
| 1805 | + cpu_to_le32(upper_32_bits(busaddr)); |
---|
1807 | 1806 | scb->sg_list.enh_list[indx].length = cpu_to_le32(e_len); |
---|
1808 | 1807 | } else { |
---|
1809 | 1808 | scb->sg_list.std_list[indx].address = |
---|
1810 | | - cpu_to_le32(pci_dma_lo32(busaddr)); |
---|
| 1809 | + cpu_to_le32(lower_32_bits(busaddr)); |
---|
1811 | 1810 | scb->sg_list.std_list[indx].length = cpu_to_le32(e_len); |
---|
1812 | 1811 | } |
---|
1813 | 1812 | |
---|
.. | .. |
---|
1858 | 1857 | |
---|
1859 | 1858 | scb->data_len = ha->flash_datasize; |
---|
1860 | 1859 | scb->data_busaddr = |
---|
1861 | | - pci_map_single(ha->pcidev, ha->flash_data, scb->data_len, |
---|
| 1860 | + dma_map_single(&ha->pcidev->dev, ha->flash_data, scb->data_len, |
---|
1862 | 1861 | IPS_DMA_DIR(scb)); |
---|
1863 | 1862 | scb->flags |= IPS_SCB_MAP_SINGLE; |
---|
1864 | 1863 | scb->cmd.flashfw.command_id = IPS_COMMAND_ID(ha, scb); |
---|
.. | .. |
---|
1880 | 1879 | if (ha->flash_data == ips_FlashData) |
---|
1881 | 1880 | test_and_clear_bit(0, &ips_FlashDataInUse); |
---|
1882 | 1881 | else if (ha->flash_data) |
---|
1883 | | - pci_free_consistent(ha->pcidev, ha->flash_len, ha->flash_data, |
---|
1884 | | - ha->flash_busaddr); |
---|
| 1882 | + dma_free_coherent(&ha->pcidev->dev, ha->flash_len, |
---|
| 1883 | + ha->flash_data, ha->flash_busaddr); |
---|
1885 | 1884 | ha->flash_data = NULL; |
---|
1886 | 1885 | } |
---|
1887 | 1886 | |
---|
.. | .. |
---|
2240 | 2239 | major = 0; |
---|
2241 | 2240 | minor = 0; |
---|
2242 | 2241 | |
---|
2243 | | - strncpy(ha->bios_version, " ?", 8); |
---|
| 2242 | + memcpy(ha->bios_version, " ?", 8); |
---|
2244 | 2243 | |
---|
2245 | 2244 | if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD) { |
---|
2246 | 2245 | if (IPS_USE_MEMIO(ha)) { |
---|
.. | .. |
---|
3516 | 3515 | inquiry.Flags[1] = |
---|
3517 | 3516 | IPS_SCSI_INQ_WBus16 | |
---|
3518 | 3517 | IPS_SCSI_INQ_Sync; |
---|
3519 | | - strncpy(inquiry.VendorId, "IBM ", |
---|
| 3518 | + memcpy(inquiry.VendorId, "IBM ", |
---|
3520 | 3519 | 8); |
---|
3521 | | - strncpy(inquiry.ProductId, |
---|
| 3520 | + memcpy(inquiry.ProductId, |
---|
3522 | 3521 | "SERVERAID ", 16); |
---|
3523 | | - strncpy(inquiry.ProductRevisionLevel, |
---|
| 3522 | + memcpy(inquiry.ProductRevisionLevel, |
---|
3524 | 3523 | "1.00", 4); |
---|
3525 | 3524 | |
---|
3526 | 3525 | ips_scmd_buf_write(scb->scsi_cmd, |
---|
.. | .. |
---|
4037 | 4036 | inquiry.Flags[0] = IPS_SCSI_INQ_Address16; |
---|
4038 | 4037 | inquiry.Flags[1] = |
---|
4039 | 4038 | IPS_SCSI_INQ_WBus16 | IPS_SCSI_INQ_Sync | IPS_SCSI_INQ_CmdQue; |
---|
4040 | | - strncpy(inquiry.VendorId, "IBM ", 8); |
---|
4041 | | - strncpy(inquiry.ProductId, "SERVERAID ", 16); |
---|
4042 | | - strncpy(inquiry.ProductRevisionLevel, "1.00", 4); |
---|
| 4039 | + memcpy(inquiry.VendorId, "IBM ", 8); |
---|
| 4040 | + memcpy(inquiry.ProductId, "SERVERAID ", 16); |
---|
| 4041 | + memcpy(inquiry.ProductRevisionLevel, "1.00", 4); |
---|
4043 | 4042 | |
---|
4044 | 4043 | ips_scmd_buf_write(scb->scsi_cmd, &inquiry, sizeof (inquiry)); |
---|
4045 | 4044 | |
---|
.. | .. |
---|
4213 | 4212 | |
---|
4214 | 4213 | if (ha) { |
---|
4215 | 4214 | if (ha->enq) { |
---|
4216 | | - pci_free_consistent(ha->pcidev, sizeof(IPS_ENQ), |
---|
| 4215 | + dma_free_coherent(&ha->pcidev->dev, sizeof(IPS_ENQ), |
---|
4217 | 4216 | ha->enq, ha->enq_busaddr); |
---|
4218 | 4217 | ha->enq = NULL; |
---|
4219 | 4218 | } |
---|
.. | .. |
---|
4222 | 4221 | ha->conf = NULL; |
---|
4223 | 4222 | |
---|
4224 | 4223 | if (ha->adapt) { |
---|
4225 | | - pci_free_consistent(ha->pcidev, |
---|
| 4224 | + dma_free_coherent(&ha->pcidev->dev, |
---|
4226 | 4225 | sizeof (IPS_ADAPTER) + |
---|
4227 | 4226 | sizeof (IPS_IO_CMD), ha->adapt, |
---|
4228 | 4227 | ha->adapt->hw_status_start); |
---|
.. | .. |
---|
4230 | 4229 | } |
---|
4231 | 4230 | |
---|
4232 | 4231 | if (ha->logical_drive_info) { |
---|
4233 | | - pci_free_consistent(ha->pcidev, |
---|
| 4232 | + dma_free_coherent(&ha->pcidev->dev, |
---|
4234 | 4233 | sizeof (IPS_LD_INFO), |
---|
4235 | 4234 | ha->logical_drive_info, |
---|
4236 | 4235 | ha->logical_drive_info_dma_addr); |
---|
.. | .. |
---|
4244 | 4243 | ha->subsys = NULL; |
---|
4245 | 4244 | |
---|
4246 | 4245 | if (ha->ioctl_data) { |
---|
4247 | | - pci_free_consistent(ha->pcidev, ha->ioctl_len, |
---|
| 4246 | + dma_free_coherent(&ha->pcidev->dev, ha->ioctl_len, |
---|
4248 | 4247 | ha->ioctl_data, ha->ioctl_busaddr); |
---|
4249 | 4248 | ha->ioctl_data = NULL; |
---|
4250 | 4249 | ha->ioctl_datasize = 0; |
---|
.. | .. |
---|
4277 | 4276 | ips_deallocatescbs(ips_ha_t * ha, int cmds) |
---|
4278 | 4277 | { |
---|
4279 | 4278 | if (ha->scbs) { |
---|
4280 | | - pci_free_consistent(ha->pcidev, |
---|
| 4279 | + dma_free_coherent(&ha->pcidev->dev, |
---|
4281 | 4280 | IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * cmds, |
---|
4282 | 4281 | ha->scbs->sg_list.list, |
---|
4283 | 4282 | ha->scbs->sg_busaddr); |
---|
4284 | | - pci_free_consistent(ha->pcidev, sizeof (ips_scb_t) * cmds, |
---|
| 4283 | + dma_free_coherent(&ha->pcidev->dev, sizeof (ips_scb_t) * cmds, |
---|
4285 | 4284 | ha->scbs, ha->scbs->scb_busaddr); |
---|
4286 | 4285 | ha->scbs = NULL; |
---|
4287 | 4286 | } /* end if */ |
---|
.. | .. |
---|
4308 | 4307 | METHOD_TRACE("ips_allocatescbs", 1); |
---|
4309 | 4308 | |
---|
4310 | 4309 | /* Allocate memory for the SCBs */ |
---|
4311 | | - ha->scbs = |
---|
4312 | | - pci_alloc_consistent(ha->pcidev, ha->max_cmds * sizeof (ips_scb_t), |
---|
4313 | | - &command_dma); |
---|
| 4310 | + ha->scbs = dma_alloc_coherent(&ha->pcidev->dev, |
---|
| 4311 | + ha->max_cmds * sizeof (ips_scb_t), |
---|
| 4312 | + &command_dma, GFP_KERNEL); |
---|
4314 | 4313 | if (ha->scbs == NULL) |
---|
4315 | 4314 | return 0; |
---|
4316 | | - ips_sg.list = |
---|
4317 | | - pci_alloc_consistent(ha->pcidev, |
---|
4318 | | - IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * |
---|
4319 | | - ha->max_cmds, &sg_dma); |
---|
| 4315 | + ips_sg.list = dma_alloc_coherent(&ha->pcidev->dev, |
---|
| 4316 | + IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * ha->max_cmds, |
---|
| 4317 | + &sg_dma, GFP_KERNEL); |
---|
4320 | 4318 | if (ips_sg.list == NULL) { |
---|
4321 | | - pci_free_consistent(ha->pcidev, |
---|
| 4319 | + dma_free_coherent(&ha->pcidev->dev, |
---|
4322 | 4320 | ha->max_cmds * sizeof (ips_scb_t), ha->scbs, |
---|
4323 | 4321 | command_dma); |
---|
4324 | 4322 | return 0; |
---|
.. | .. |
---|
4447 | 4445 | if (scb->flags & IPS_SCB_MAP_SG) |
---|
4448 | 4446 | scsi_dma_unmap(scb->scsi_cmd); |
---|
4449 | 4447 | else if (scb->flags & IPS_SCB_MAP_SINGLE) |
---|
4450 | | - pci_unmap_single(ha->pcidev, scb->data_busaddr, scb->data_len, |
---|
4451 | | - IPS_DMA_DIR(scb)); |
---|
| 4448 | + dma_unmap_single(&ha->pcidev->dev, scb->data_busaddr, |
---|
| 4449 | + scb->data_len, IPS_DMA_DIR(scb)); |
---|
4452 | 4450 | |
---|
4453 | 4451 | /* check to make sure this is not our "special" scb */ |
---|
4454 | 4452 | if (IPS_COMMAND_ID(ha, scb) < (ha->max_cmds - 1)) { |
---|
.. | .. |
---|
4560 | 4558 | dma_addr_t command_dma; |
---|
4561 | 4559 | |
---|
4562 | 4560 | /* Create a usuable SCB */ |
---|
4563 | | - scb = pci_alloc_consistent(ha->pcidev, sizeof(ips_scb_t), &command_dma); |
---|
| 4561 | + scb = dma_alloc_coherent(&ha->pcidev->dev, sizeof(ips_scb_t), |
---|
| 4562 | + &command_dma, GFP_KERNEL); |
---|
4564 | 4563 | if (scb) { |
---|
4565 | 4564 | memset(scb, 0, sizeof(ips_scb_t)); |
---|
4566 | 4565 | ips_init_scb(ha, scb); |
---|
.. | .. |
---|
4595 | 4594 | /* Now RESET and INIT the adapter */ |
---|
4596 | 4595 | (*ha->func.reset) (ha); |
---|
4597 | 4596 | |
---|
4598 | | - pci_free_consistent(ha->pcidev, sizeof(ips_scb_t), scb, command_dma); |
---|
| 4597 | + dma_free_coherent(&ha->pcidev->dev, sizeof(ips_scb_t), scb, command_dma); |
---|
4599 | 4598 | return; |
---|
4600 | 4599 | } |
---|
4601 | 4600 | |
---|
.. | .. |
---|
4698 | 4697 | uint8_t Isr; |
---|
4699 | 4698 | uint8_t Cbsp; |
---|
4700 | 4699 | uint8_t PostByte[IPS_MAX_POST_BYTES]; |
---|
4701 | | - uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES]; |
---|
4702 | 4700 | int i, j; |
---|
4703 | 4701 | |
---|
4704 | 4702 | METHOD_TRACE("ips_init_copperhead", 1); |
---|
.. | .. |
---|
4743 | 4741 | /* error occurred */ |
---|
4744 | 4742 | return (0); |
---|
4745 | 4743 | |
---|
4746 | | - ConfigByte[i] = inb(ha->io_addr + IPS_REG_ISPR); |
---|
| 4744 | + inb(ha->io_addr + IPS_REG_ISPR); |
---|
4747 | 4745 | outb(Isr, ha->io_addr + IPS_REG_HISR); |
---|
4748 | 4746 | } |
---|
4749 | 4747 | |
---|
.. | .. |
---|
4792 | 4790 | uint8_t Isr = 0; |
---|
4793 | 4791 | uint8_t Cbsp; |
---|
4794 | 4792 | uint8_t PostByte[IPS_MAX_POST_BYTES]; |
---|
4795 | | - uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES]; |
---|
4796 | 4793 | int i, j; |
---|
4797 | 4794 | |
---|
4798 | 4795 | METHOD_TRACE("ips_init_copperhead_memio", 1); |
---|
.. | .. |
---|
4837 | 4834 | /* error occurred */ |
---|
4838 | 4835 | return (0); |
---|
4839 | 4836 | |
---|
4840 | | - ConfigByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); |
---|
| 4837 | + readb(ha->mem_ptr + IPS_REG_ISPR); |
---|
4841 | 4838 | writeb(Isr, ha->mem_ptr + IPS_REG_HISR); |
---|
4842 | 4839 | } |
---|
4843 | 4840 | |
---|
.. | .. |
---|
5623 | 5620 | /* change values (as needed) */ |
---|
5624 | 5621 | ha->nvram->operating_system = IPS_OS_LINUX; |
---|
5625 | 5622 | ha->nvram->adapter_type = ha->ad_type; |
---|
5626 | | - strncpy((char *) ha->nvram->driver_high, IPS_VERSION_HIGH, 4); |
---|
5627 | | - strncpy((char *) ha->nvram->driver_low, IPS_VERSION_LOW, 4); |
---|
5628 | | - strncpy((char *) ha->nvram->bios_high, ha->bios_version, 4); |
---|
5629 | | - strncpy((char *) ha->nvram->bios_low, ha->bios_version + 4, 4); |
---|
| 5623 | + memcpy((char *) ha->nvram->driver_high, IPS_VERSION_HIGH, 4); |
---|
| 5624 | + memcpy((char *) ha->nvram->driver_low, IPS_VERSION_LOW, 4); |
---|
| 5625 | + memcpy((char *) ha->nvram->bios_high, ha->bios_version, 4); |
---|
| 5626 | + memcpy((char *) ha->nvram->bios_low, ha->bios_version + 4, 4); |
---|
5630 | 5627 | |
---|
5631 | 5628 | ha->nvram->versioning = 0; /* Indicate the Driver Does Not Support Versioning */ |
---|
5632 | 5629 | |
---|
.. | .. |
---|
6678 | 6675 | sh->sg_tablesize = sh->hostt->sg_tablesize; |
---|
6679 | 6676 | sh->can_queue = sh->hostt->can_queue; |
---|
6680 | 6677 | sh->cmd_per_lun = sh->hostt->cmd_per_lun; |
---|
6681 | | - sh->use_clustering = sh->hostt->use_clustering; |
---|
6682 | 6678 | sh->max_sectors = 128; |
---|
6683 | 6679 | |
---|
6684 | 6680 | sh->max_id = ha->ntargets; |
---|
.. | .. |
---|
6837 | 6833 | uint32_t mem_addr; |
---|
6838 | 6834 | uint32_t io_len; |
---|
6839 | 6835 | uint32_t mem_len; |
---|
6840 | | - uint8_t bus; |
---|
6841 | | - uint8_t func; |
---|
6842 | 6836 | int j; |
---|
6843 | 6837 | int index; |
---|
6844 | 6838 | dma_addr_t dma_address; |
---|
.. | .. |
---|
6857 | 6851 | |
---|
6858 | 6852 | if (index >= IPS_MAX_ADAPTERS) |
---|
6859 | 6853 | return -1; |
---|
6860 | | - |
---|
6861 | | - /* stuff that we get in dev */ |
---|
6862 | | - bus = pci_dev->bus->number; |
---|
6863 | | - func = pci_dev->devfn; |
---|
6864 | 6854 | |
---|
6865 | 6855 | /* Init MEM/IO addresses to 0 */ |
---|
6866 | 6856 | mem_addr = 0; |
---|
.. | .. |
---|
6926 | 6916 | * it! Also, don't use 64bit addressing if dma addresses |
---|
6927 | 6917 | * are guaranteed to be < 4G. |
---|
6928 | 6918 | */ |
---|
6929 | | - if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) && |
---|
6930 | | - !pci_set_dma_mask(ha->pcidev, DMA_BIT_MASK(64))) { |
---|
| 6919 | + if (sizeof(dma_addr_t) > 4 && IPS_HAS_ENH_SGLIST(ha) && |
---|
| 6920 | + !dma_set_mask(&ha->pcidev->dev, DMA_BIT_MASK(64))) { |
---|
6931 | 6921 | (ha)->flags |= IPS_HA_ENH_SG; |
---|
6932 | 6922 | } else { |
---|
6933 | | - if (pci_set_dma_mask(ha->pcidev, DMA_BIT_MASK(32)) != 0) { |
---|
| 6923 | + if (dma_set_mask(&ha->pcidev->dev, DMA_BIT_MASK(32)) != 0) { |
---|
6934 | 6924 | printk(KERN_WARNING "Unable to set DMA Mask\n"); |
---|
6935 | 6925 | return ips_abort_init(ha, index); |
---|
6936 | 6926 | } |
---|
6937 | 6927 | } |
---|
6938 | 6928 | if(ips_cd_boot && !ips_FlashData){ |
---|
6939 | | - ips_FlashData = pci_alloc_consistent(pci_dev, PAGE_SIZE << 7, |
---|
6940 | | - &ips_flashbusaddr); |
---|
| 6929 | + ips_FlashData = dma_alloc_coherent(&pci_dev->dev, |
---|
| 6930 | + PAGE_SIZE << 7, &ips_flashbusaddr, GFP_KERNEL); |
---|
6941 | 6931 | } |
---|
6942 | 6932 | |
---|
6943 | | - ha->enq = pci_alloc_consistent(pci_dev, sizeof (IPS_ENQ), |
---|
6944 | | - &ha->enq_busaddr); |
---|
| 6933 | + ha->enq = dma_alloc_coherent(&pci_dev->dev, sizeof (IPS_ENQ), |
---|
| 6934 | + &ha->enq_busaddr, GFP_KERNEL); |
---|
6945 | 6935 | if (!ha->enq) { |
---|
6946 | 6936 | IPS_PRINTK(KERN_WARNING, pci_dev, |
---|
6947 | 6937 | "Unable to allocate host inquiry structure\n"); |
---|
6948 | 6938 | return ips_abort_init(ha, index); |
---|
6949 | 6939 | } |
---|
6950 | 6940 | |
---|
6951 | | - ha->adapt = pci_alloc_consistent(pci_dev, sizeof (IPS_ADAPTER) + |
---|
6952 | | - sizeof (IPS_IO_CMD), &dma_address); |
---|
| 6941 | + ha->adapt = dma_alloc_coherent(&pci_dev->dev, |
---|
| 6942 | + sizeof (IPS_ADAPTER) + sizeof (IPS_IO_CMD), |
---|
| 6943 | + &dma_address, GFP_KERNEL); |
---|
6953 | 6944 | if (!ha->adapt) { |
---|
6954 | 6945 | IPS_PRINTK(KERN_WARNING, pci_dev, |
---|
6955 | 6946 | "Unable to allocate host adapt & dummy structures\n"); |
---|
.. | .. |
---|
6960 | 6951 | |
---|
6961 | 6952 | |
---|
6962 | 6953 | |
---|
6963 | | - ha->logical_drive_info = pci_alloc_consistent(pci_dev, sizeof (IPS_LD_INFO), &dma_address); |
---|
| 6954 | + ha->logical_drive_info = dma_alloc_coherent(&pci_dev->dev, |
---|
| 6955 | + sizeof (IPS_LD_INFO), &dma_address, GFP_KERNEL); |
---|
6964 | 6956 | if (!ha->logical_drive_info) { |
---|
6965 | 6957 | IPS_PRINTK(KERN_WARNING, pci_dev, |
---|
6966 | 6958 | "Unable to allocate logical drive info structure\n"); |
---|
.. | .. |
---|
6998 | 6990 | if (ips_ioctlsize < PAGE_SIZE) |
---|
6999 | 6991 | ips_ioctlsize = PAGE_SIZE; |
---|
7000 | 6992 | |
---|
7001 | | - ha->ioctl_data = pci_alloc_consistent(pci_dev, ips_ioctlsize, |
---|
7002 | | - &ha->ioctl_busaddr); |
---|
| 6993 | + ha->ioctl_data = dma_alloc_coherent(&pci_dev->dev, ips_ioctlsize, |
---|
| 6994 | + &ha->ioctl_busaddr, GFP_KERNEL); |
---|
7003 | 6995 | ha->ioctl_len = ips_ioctlsize; |
---|
7004 | 6996 | if (!ha->ioctl_data) { |
---|
7005 | 6997 | IPS_PRINTK(KERN_WARNING, pci_dev, |
---|