.. | .. |
---|
485 | 485 | /** |
---|
486 | 486 | * bnx2fc_send_session_destroy_req - initiates FCoE Session destroy |
---|
487 | 487 | * |
---|
488 | | - * @port: port structure pointer |
---|
| 488 | + * @hba: adapter structure pointer |
---|
489 | 489 | * @tgt: bnx2fc_rport structure pointer |
---|
490 | 490 | */ |
---|
491 | 491 | int bnx2fc_send_session_destroy_req(struct bnx2fc_hba *hba, |
---|
.. | .. |
---|
633 | 633 | u16 xid; |
---|
634 | 634 | u32 frame_len, len; |
---|
635 | 635 | struct bnx2fc_cmd *io_req = NULL; |
---|
636 | | - struct fcoe_task_ctx_entry *task, *task_page; |
---|
637 | 636 | struct bnx2fc_interface *interface = tgt->port->priv; |
---|
638 | 637 | struct bnx2fc_hba *hba = interface->hba; |
---|
639 | | - int task_idx, index; |
---|
640 | 638 | int rc = 0; |
---|
641 | 639 | u64 err_warn_bit_map; |
---|
642 | 640 | u8 err_warn = 0xff; |
---|
.. | .. |
---|
702 | 700 | BNX2FC_TGT_DBG(tgt, "buf_offsets - tx = 0x%x, rx = 0x%x\n", |
---|
703 | 701 | err_entry->data.tx_buf_off, err_entry->data.rx_buf_off); |
---|
704 | 702 | |
---|
705 | | - |
---|
706 | 703 | if (xid > hba->max_xid) { |
---|
707 | 704 | BNX2FC_TGT_DBG(tgt, "xid(0x%x) out of FW range\n", |
---|
708 | 705 | xid); |
---|
709 | 706 | goto ret_err_rqe; |
---|
710 | 707 | } |
---|
711 | 708 | |
---|
712 | | - task_idx = xid / BNX2FC_TASKS_PER_PAGE; |
---|
713 | | - index = xid % BNX2FC_TASKS_PER_PAGE; |
---|
714 | | - task_page = (struct fcoe_task_ctx_entry *) |
---|
715 | | - hba->task_ctx[task_idx]; |
---|
716 | | - task = &(task_page[index]); |
---|
717 | 709 | |
---|
718 | 710 | io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid]; |
---|
719 | 711 | if (!io_req) |
---|
.. | .. |
---|
837 | 829 | } |
---|
838 | 830 | BNX2FC_TGT_DBG(tgt, "warn = 0x%x\n", err_warn); |
---|
839 | 831 | |
---|
840 | | - task_idx = xid / BNX2FC_TASKS_PER_PAGE; |
---|
841 | | - index = xid % BNX2FC_TASKS_PER_PAGE; |
---|
842 | | - task_page = (struct fcoe_task_ctx_entry *) |
---|
843 | | - interface->hba->task_ctx[task_idx]; |
---|
844 | | - task = &(task_page[index]); |
---|
845 | 832 | io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid]; |
---|
846 | 833 | if (!io_req) |
---|
847 | 834 | goto ret_warn_rqe; |
---|
.. | .. |
---|
870 | 857 | } |
---|
871 | 858 | } |
---|
872 | 859 | |
---|
873 | | -void bnx2fc_process_cq_compl(struct bnx2fc_rport *tgt, u16 wqe) |
---|
| 860 | +void bnx2fc_process_cq_compl(struct bnx2fc_rport *tgt, u16 wqe, |
---|
| 861 | + unsigned char *rq_data, u8 num_rq, |
---|
| 862 | + struct fcoe_task_ctx_entry *task) |
---|
874 | 863 | { |
---|
875 | | - struct fcoe_task_ctx_entry *task; |
---|
876 | | - struct fcoe_task_ctx_entry *task_page; |
---|
877 | 864 | struct fcoe_port *port = tgt->port; |
---|
878 | 865 | struct bnx2fc_interface *interface = port->priv; |
---|
879 | 866 | struct bnx2fc_hba *hba = interface->hba; |
---|
880 | 867 | struct bnx2fc_cmd *io_req; |
---|
881 | | - int task_idx, index; |
---|
| 868 | + |
---|
882 | 869 | u16 xid; |
---|
883 | 870 | u8 cmd_type; |
---|
884 | 871 | u8 rx_state = 0; |
---|
885 | | - u8 num_rq; |
---|
886 | 872 | |
---|
887 | 873 | spin_lock_bh(&tgt->tgt_lock); |
---|
| 874 | + |
---|
888 | 875 | xid = wqe & FCOE_PEND_WQ_CQE_TASK_ID; |
---|
889 | | - if (xid >= hba->max_tasks) { |
---|
890 | | - printk(KERN_ERR PFX "ERROR:xid out of range\n"); |
---|
891 | | - spin_unlock_bh(&tgt->tgt_lock); |
---|
892 | | - return; |
---|
893 | | - } |
---|
894 | | - task_idx = xid / BNX2FC_TASKS_PER_PAGE; |
---|
895 | | - index = xid % BNX2FC_TASKS_PER_PAGE; |
---|
896 | | - task_page = (struct fcoe_task_ctx_entry *)hba->task_ctx[task_idx]; |
---|
897 | | - task = &(task_page[index]); |
---|
898 | | - |
---|
899 | | - num_rq = ((task->rxwr_txrd.var_ctx.rx_flags & |
---|
900 | | - FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE) >> |
---|
901 | | - FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE_SHIFT); |
---|
902 | | - |
---|
903 | 876 | io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid]; |
---|
904 | 877 | |
---|
905 | 878 | if (io_req == NULL) { |
---|
.. | .. |
---|
919 | 892 | switch (cmd_type) { |
---|
920 | 893 | case BNX2FC_SCSI_CMD: |
---|
921 | 894 | if (rx_state == FCOE_TASK_RX_STATE_COMPLETED) { |
---|
922 | | - bnx2fc_process_scsi_cmd_compl(io_req, task, num_rq); |
---|
| 895 | + bnx2fc_process_scsi_cmd_compl(io_req, task, num_rq, |
---|
| 896 | + rq_data); |
---|
923 | 897 | spin_unlock_bh(&tgt->tgt_lock); |
---|
924 | 898 | return; |
---|
925 | 899 | } |
---|
.. | .. |
---|
936 | 910 | |
---|
937 | 911 | case BNX2FC_TASK_MGMT_CMD: |
---|
938 | 912 | BNX2FC_IO_DBG(io_req, "Processing TM complete\n"); |
---|
939 | | - bnx2fc_process_tm_compl(io_req, task, num_rq); |
---|
| 913 | + bnx2fc_process_tm_compl(io_req, task, num_rq, rq_data); |
---|
940 | 914 | break; |
---|
941 | 915 | |
---|
942 | 916 | case BNX2FC_ABTS: |
---|
.. | .. |
---|
991 | 965 | FCOE_CQE_TOGGLE_BIT_SHIFT); |
---|
992 | 966 | msg = *((u32 *)rx_db); |
---|
993 | 967 | writel(cpu_to_le32(msg), tgt->ctx_base); |
---|
994 | | - mmiowb(); |
---|
995 | 968 | |
---|
996 | 969 | } |
---|
997 | 970 | |
---|
998 | | -static struct bnx2fc_work *bnx2fc_alloc_work(struct bnx2fc_rport *tgt, u16 wqe) |
---|
| 971 | +static struct bnx2fc_work *bnx2fc_alloc_work(struct bnx2fc_rport *tgt, u16 wqe, |
---|
| 972 | + unsigned char *rq_data, u8 num_rq, |
---|
| 973 | + struct fcoe_task_ctx_entry *task) |
---|
999 | 974 | { |
---|
1000 | 975 | struct bnx2fc_work *work; |
---|
1001 | 976 | work = kzalloc(sizeof(struct bnx2fc_work), GFP_ATOMIC); |
---|
.. | .. |
---|
1005 | 980 | INIT_LIST_HEAD(&work->list); |
---|
1006 | 981 | work->tgt = tgt; |
---|
1007 | 982 | work->wqe = wqe; |
---|
| 983 | + work->num_rq = num_rq; |
---|
| 984 | + work->task = task; |
---|
| 985 | + if (rq_data) |
---|
| 986 | + memcpy(work->rq_data, rq_data, BNX2FC_RQ_BUF_SZ); |
---|
| 987 | + |
---|
1008 | 988 | return work; |
---|
1009 | 989 | } |
---|
1010 | 990 | |
---|
1011 | 991 | /* Pending work request completion */ |
---|
1012 | | -static void bnx2fc_pending_work(struct bnx2fc_rport *tgt, unsigned int wqe) |
---|
| 992 | +static bool bnx2fc_pending_work(struct bnx2fc_rport *tgt, unsigned int wqe) |
---|
1013 | 993 | { |
---|
1014 | 994 | unsigned int cpu = wqe % num_possible_cpus(); |
---|
1015 | 995 | struct bnx2fc_percpu_s *fps; |
---|
1016 | 996 | struct bnx2fc_work *work; |
---|
| 997 | + struct fcoe_task_ctx_entry *task; |
---|
| 998 | + struct fcoe_task_ctx_entry *task_page; |
---|
| 999 | + struct fcoe_port *port = tgt->port; |
---|
| 1000 | + struct bnx2fc_interface *interface = port->priv; |
---|
| 1001 | + struct bnx2fc_hba *hba = interface->hba; |
---|
| 1002 | + unsigned char *rq_data = NULL; |
---|
| 1003 | + unsigned char rq_data_buff[BNX2FC_RQ_BUF_SZ]; |
---|
| 1004 | + int task_idx, index; |
---|
| 1005 | + u16 xid; |
---|
| 1006 | + u8 num_rq; |
---|
| 1007 | + int i; |
---|
| 1008 | + |
---|
| 1009 | + xid = wqe & FCOE_PEND_WQ_CQE_TASK_ID; |
---|
| 1010 | + if (xid >= hba->max_tasks) { |
---|
| 1011 | + pr_err(PFX "ERROR:xid out of range\n"); |
---|
| 1012 | + return false; |
---|
| 1013 | + } |
---|
| 1014 | + |
---|
| 1015 | + task_idx = xid / BNX2FC_TASKS_PER_PAGE; |
---|
| 1016 | + index = xid % BNX2FC_TASKS_PER_PAGE; |
---|
| 1017 | + task_page = (struct fcoe_task_ctx_entry *)hba->task_ctx[task_idx]; |
---|
| 1018 | + task = &task_page[index]; |
---|
| 1019 | + |
---|
| 1020 | + num_rq = ((task->rxwr_txrd.var_ctx.rx_flags & |
---|
| 1021 | + FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE) >> |
---|
| 1022 | + FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE_SHIFT); |
---|
| 1023 | + |
---|
| 1024 | + memset(rq_data_buff, 0, BNX2FC_RQ_BUF_SZ); |
---|
| 1025 | + |
---|
| 1026 | + if (!num_rq) |
---|
| 1027 | + goto num_rq_zero; |
---|
| 1028 | + |
---|
| 1029 | + rq_data = bnx2fc_get_next_rqe(tgt, 1); |
---|
| 1030 | + |
---|
| 1031 | + if (num_rq > 1) { |
---|
| 1032 | + /* We do not need extra sense data */ |
---|
| 1033 | + for (i = 1; i < num_rq; i++) |
---|
| 1034 | + bnx2fc_get_next_rqe(tgt, 1); |
---|
| 1035 | + } |
---|
| 1036 | + |
---|
| 1037 | + if (rq_data) |
---|
| 1038 | + memcpy(rq_data_buff, rq_data, BNX2FC_RQ_BUF_SZ); |
---|
| 1039 | + |
---|
| 1040 | + /* return RQ entries */ |
---|
| 1041 | + for (i = 0; i < num_rq; i++) |
---|
| 1042 | + bnx2fc_return_rqe(tgt, 1); |
---|
| 1043 | + |
---|
| 1044 | +num_rq_zero: |
---|
1017 | 1045 | |
---|
1018 | 1046 | fps = &per_cpu(bnx2fc_percpu, cpu); |
---|
1019 | 1047 | spin_lock_bh(&fps->fp_work_lock); |
---|
1020 | 1048 | if (fps->iothread) { |
---|
1021 | | - work = bnx2fc_alloc_work(tgt, wqe); |
---|
| 1049 | + work = bnx2fc_alloc_work(tgt, wqe, rq_data_buff, |
---|
| 1050 | + num_rq, task); |
---|
1022 | 1051 | if (work) { |
---|
1023 | 1052 | list_add_tail(&work->list, &fps->work_list); |
---|
1024 | 1053 | wake_up_process(fps->iothread); |
---|
1025 | 1054 | spin_unlock_bh(&fps->fp_work_lock); |
---|
1026 | | - return; |
---|
| 1055 | + return true; |
---|
1027 | 1056 | } |
---|
1028 | 1057 | } |
---|
1029 | 1058 | spin_unlock_bh(&fps->fp_work_lock); |
---|
1030 | | - bnx2fc_process_cq_compl(tgt, wqe); |
---|
| 1059 | + bnx2fc_process_cq_compl(tgt, wqe, |
---|
| 1060 | + rq_data_buff, num_rq, task); |
---|
| 1061 | + |
---|
| 1062 | + return true; |
---|
1031 | 1063 | } |
---|
1032 | 1064 | |
---|
1033 | 1065 | int bnx2fc_process_new_cqes(struct bnx2fc_rport *tgt) |
---|
.. | .. |
---|
1064 | 1096 | /* Unsolicited event notification */ |
---|
1065 | 1097 | bnx2fc_process_unsol_compl(tgt, wqe); |
---|
1066 | 1098 | } else { |
---|
1067 | | - bnx2fc_pending_work(tgt, wqe); |
---|
1068 | | - num_free_sqes++; |
---|
| 1099 | + if (bnx2fc_pending_work(tgt, wqe)) |
---|
| 1100 | + num_free_sqes++; |
---|
1069 | 1101 | } |
---|
1070 | 1102 | cqe++; |
---|
1071 | 1103 | tgt->cq_cons_idx++; |
---|
.. | .. |
---|
1123 | 1155 | struct fcoe_kcqe *ofld_kcqe) |
---|
1124 | 1156 | { |
---|
1125 | 1157 | struct bnx2fc_rport *tgt; |
---|
1126 | | - struct fcoe_port *port; |
---|
1127 | 1158 | struct bnx2fc_interface *interface; |
---|
1128 | 1159 | u32 conn_id; |
---|
1129 | 1160 | u32 context_id; |
---|
.. | .. |
---|
1137 | 1168 | } |
---|
1138 | 1169 | BNX2FC_TGT_DBG(tgt, "Entered ofld compl - context_id = 0x%x\n", |
---|
1139 | 1170 | ofld_kcqe->fcoe_conn_context_id); |
---|
1140 | | - port = tgt->port; |
---|
1141 | 1171 | interface = tgt->port->priv; |
---|
1142 | 1172 | if (hba != interface->hba) { |
---|
1143 | 1173 | printk(KERN_ERR PFX "ERROR:ofld_cmpl: HBA mis-match\n"); |
---|
.. | .. |
---|
1304 | 1334 | /** |
---|
1305 | 1335 | * bnx2fc_indicae_kcqe - process KCQE |
---|
1306 | 1336 | * |
---|
1307 | | - * @hba: adapter structure pointer |
---|
1308 | | - * @kcqe: kcqe pointer |
---|
| 1337 | + * @context: adapter structure pointer |
---|
| 1338 | + * @kcq: kcqe pointer |
---|
1309 | 1339 | * @num_cqe: Number of completion queue elements |
---|
1310 | 1340 | * |
---|
1311 | 1341 | * Generic KCQ event handler |
---|
.. | .. |
---|
1374 | 1404 | break; |
---|
1375 | 1405 | |
---|
1376 | 1406 | case FCOE_KCQE_OPCODE_FCOE_ERROR: |
---|
1377 | | - /* fall thru */ |
---|
1378 | 1407 | default: |
---|
1379 | 1408 | printk(KERN_ERR PFX "unknown opcode 0x%x\n", |
---|
1380 | 1409 | kcqe->op_code); |
---|
.. | .. |
---|
1409 | 1438 | (tgt->sq_curr_toggle_bit << 15); |
---|
1410 | 1439 | msg = *((u32 *)sq_db); |
---|
1411 | 1440 | writel(cpu_to_le32(msg), tgt->ctx_base); |
---|
1412 | | - mmiowb(); |
---|
1413 | 1441 | |
---|
1414 | 1442 | } |
---|
1415 | 1443 | |
---|
.. | .. |
---|
1425 | 1453 | reg_base = pci_resource_start(hba->pcidev, |
---|
1426 | 1454 | BNX2X_DOORBELL_PCI_BAR); |
---|
1427 | 1455 | reg_off = (1 << BNX2X_DB_SHIFT) * (context_id & 0x1FFFF); |
---|
1428 | | - tgt->ctx_base = ioremap_nocache(reg_base + reg_off, 4); |
---|
| 1456 | + tgt->ctx_base = ioremap(reg_base + reg_off, 4); |
---|
1429 | 1457 | if (!tgt->ctx_base) |
---|
1430 | 1458 | return -ENOMEM; |
---|
1431 | 1459 | return 0; |
---|
.. | .. |
---|
1465 | 1493 | { |
---|
1466 | 1494 | struct scsi_cmnd *sc_cmd = orig_io_req->sc_cmd; |
---|
1467 | 1495 | struct bnx2fc_rport *tgt = seq_clnp_req->tgt; |
---|
1468 | | - struct bnx2fc_interface *interface = tgt->port->priv; |
---|
1469 | 1496 | struct fcoe_bd_ctx *bd = orig_io_req->bd_tbl->bd_tbl; |
---|
1470 | | - struct fcoe_task_ctx_entry *orig_task; |
---|
1471 | | - struct fcoe_task_ctx_entry *task_page; |
---|
1472 | 1497 | struct fcoe_ext_mul_sges_ctx *sgl; |
---|
1473 | 1498 | u8 task_type = FCOE_TASK_TYPE_SEQUENCE_CLEANUP; |
---|
1474 | 1499 | u8 orig_task_type; |
---|
.. | .. |
---|
1477 | 1502 | u64 phys_addr = (u64)orig_io_req->bd_tbl->bd_tbl_dma; |
---|
1478 | 1503 | u32 orig_offset = offset; |
---|
1479 | 1504 | int bd_count; |
---|
1480 | | - int orig_task_idx, index; |
---|
1481 | 1505 | int i; |
---|
1482 | 1506 | |
---|
1483 | 1507 | memset(task, 0, sizeof(struct fcoe_task_ctx_entry)); |
---|
.. | .. |
---|
1527 | 1551 | offset; /* adjusted offset */ |
---|
1528 | 1552 | task->txwr_only.sgl_ctx.sgl.mul_sgl.cur_sge_idx = i; |
---|
1529 | 1553 | } else { |
---|
1530 | | - orig_task_idx = orig_xid / BNX2FC_TASKS_PER_PAGE; |
---|
1531 | | - index = orig_xid % BNX2FC_TASKS_PER_PAGE; |
---|
1532 | | - |
---|
1533 | | - task_page = (struct fcoe_task_ctx_entry *) |
---|
1534 | | - interface->hba->task_ctx[orig_task_idx]; |
---|
1535 | | - orig_task = &(task_page[index]); |
---|
1536 | 1554 | |
---|
1537 | 1555 | /* Multiple SGEs were used for this IO */ |
---|
1538 | 1556 | sgl = &task->rxwr_only.union_ctx.read_info.sgl_ctx.sgl; |
---|
.. | .. |
---|
1857 | 1875 | * entries. Hence the limit with one page is 8192 task context |
---|
1858 | 1876 | * entries. |
---|
1859 | 1877 | */ |
---|
1860 | | - hba->task_ctx_bd_tbl = dma_zalloc_coherent(&hba->pcidev->dev, |
---|
1861 | | - PAGE_SIZE, |
---|
1862 | | - &hba->task_ctx_bd_dma, |
---|
1863 | | - GFP_KERNEL); |
---|
| 1878 | + hba->task_ctx_bd_tbl = dma_alloc_coherent(&hba->pcidev->dev, |
---|
| 1879 | + PAGE_SIZE, |
---|
| 1880 | + &hba->task_ctx_bd_dma, |
---|
| 1881 | + GFP_KERNEL); |
---|
1864 | 1882 | if (!hba->task_ctx_bd_tbl) { |
---|
1865 | 1883 | printk(KERN_ERR PFX "unable to allocate task context BDT\n"); |
---|
1866 | 1884 | rc = -1; |
---|
.. | .. |
---|
1894 | 1912 | task_ctx_bdt = (struct regpair *)hba->task_ctx_bd_tbl; |
---|
1895 | 1913 | for (i = 0; i < task_ctx_arr_sz; i++) { |
---|
1896 | 1914 | |
---|
1897 | | - hba->task_ctx[i] = dma_zalloc_coherent(&hba->pcidev->dev, |
---|
1898 | | - PAGE_SIZE, |
---|
1899 | | - &hba->task_ctx_dma[i], |
---|
1900 | | - GFP_KERNEL); |
---|
| 1915 | + hba->task_ctx[i] = dma_alloc_coherent(&hba->pcidev->dev, |
---|
| 1916 | + PAGE_SIZE, |
---|
| 1917 | + &hba->task_ctx_dma[i], |
---|
| 1918 | + GFP_KERNEL); |
---|
1901 | 1919 | if (!hba->task_ctx[i]) { |
---|
1902 | 1920 | printk(KERN_ERR PFX "unable to alloc task context\n"); |
---|
1903 | 1921 | rc = -1; |
---|
.. | .. |
---|
2031 | 2049 | } |
---|
2032 | 2050 | |
---|
2033 | 2051 | for (i = 0; i < segment_count; ++i) { |
---|
2034 | | - hba->hash_tbl_segments[i] = dma_zalloc_coherent(&hba->pcidev->dev, |
---|
2035 | | - BNX2FC_HASH_TBL_CHUNK_SIZE, |
---|
2036 | | - &dma_segment_array[i], |
---|
2037 | | - GFP_KERNEL); |
---|
| 2052 | + hba->hash_tbl_segments[i] = dma_alloc_coherent(&hba->pcidev->dev, |
---|
| 2053 | + BNX2FC_HASH_TBL_CHUNK_SIZE, |
---|
| 2054 | + &dma_segment_array[i], |
---|
| 2055 | + GFP_KERNEL); |
---|
2038 | 2056 | if (!hba->hash_tbl_segments[i]) { |
---|
2039 | 2057 | printk(KERN_ERR PFX "hash segment alloc failed\n"); |
---|
2040 | 2058 | goto cleanup_dma; |
---|
2041 | 2059 | } |
---|
2042 | 2060 | } |
---|
2043 | 2061 | |
---|
2044 | | - hba->hash_tbl_pbl = dma_zalloc_coherent(&hba->pcidev->dev, PAGE_SIZE, |
---|
2045 | | - &hba->hash_tbl_pbl_dma, |
---|
2046 | | - GFP_KERNEL); |
---|
| 2062 | + hba->hash_tbl_pbl = dma_alloc_coherent(&hba->pcidev->dev, PAGE_SIZE, |
---|
| 2063 | + &hba->hash_tbl_pbl_dma, |
---|
| 2064 | + GFP_KERNEL); |
---|
2047 | 2065 | if (!hba->hash_tbl_pbl) { |
---|
2048 | 2066 | printk(KERN_ERR PFX "hash table pbl alloc failed\n"); |
---|
2049 | 2067 | goto cleanup_dma; |
---|
.. | .. |
---|
2060 | 2078 | pbl = hba->hash_tbl_pbl; |
---|
2061 | 2079 | i = 0; |
---|
2062 | 2080 | while (*pbl && *(pbl + 1)) { |
---|
2063 | | - u32 lo; |
---|
2064 | | - u32 hi; |
---|
2065 | | - lo = *pbl; |
---|
2066 | 2081 | ++pbl; |
---|
2067 | | - hi = *pbl; |
---|
2068 | 2082 | ++pbl; |
---|
2069 | 2083 | ++i; |
---|
2070 | 2084 | } |
---|
.. | .. |
---|
2104 | 2118 | return -ENOMEM; |
---|
2105 | 2119 | |
---|
2106 | 2120 | mem_size = BNX2FC_NUM_MAX_SESS * sizeof(struct regpair); |
---|
2107 | | - hba->t2_hash_tbl_ptr = dma_zalloc_coherent(&hba->pcidev->dev, |
---|
2108 | | - mem_size, |
---|
2109 | | - &hba->t2_hash_tbl_ptr_dma, |
---|
2110 | | - GFP_KERNEL); |
---|
| 2121 | + hba->t2_hash_tbl_ptr = dma_alloc_coherent(&hba->pcidev->dev, mem_size, |
---|
| 2122 | + &hba->t2_hash_tbl_ptr_dma, |
---|
| 2123 | + GFP_KERNEL); |
---|
2111 | 2124 | if (!hba->t2_hash_tbl_ptr) { |
---|
2112 | 2125 | printk(KERN_ERR PFX "unable to allocate t2 hash table ptr\n"); |
---|
2113 | 2126 | bnx2fc_free_fw_resc(hba); |
---|
.. | .. |
---|
2116 | 2129 | |
---|
2117 | 2130 | mem_size = BNX2FC_NUM_MAX_SESS * |
---|
2118 | 2131 | sizeof(struct fcoe_t2_hash_table_entry); |
---|
2119 | | - hba->t2_hash_tbl = dma_zalloc_coherent(&hba->pcidev->dev, mem_size, |
---|
2120 | | - &hba->t2_hash_tbl_dma, |
---|
2121 | | - GFP_KERNEL); |
---|
| 2132 | + hba->t2_hash_tbl = dma_alloc_coherent(&hba->pcidev->dev, mem_size, |
---|
| 2133 | + &hba->t2_hash_tbl_dma, |
---|
| 2134 | + GFP_KERNEL); |
---|
2122 | 2135 | if (!hba->t2_hash_tbl) { |
---|
2123 | 2136 | printk(KERN_ERR PFX "unable to allocate t2 hash table\n"); |
---|
2124 | 2137 | bnx2fc_free_fw_resc(hba); |
---|
.. | .. |
---|
2140 | 2153 | return -ENOMEM; |
---|
2141 | 2154 | } |
---|
2142 | 2155 | |
---|
2143 | | - hba->stats_buffer = dma_zalloc_coherent(&hba->pcidev->dev, PAGE_SIZE, |
---|
2144 | | - &hba->stats_buf_dma, |
---|
2145 | | - GFP_KERNEL); |
---|
| 2156 | + hba->stats_buffer = dma_alloc_coherent(&hba->pcidev->dev, PAGE_SIZE, |
---|
| 2157 | + &hba->stats_buf_dma, |
---|
| 2158 | + GFP_KERNEL); |
---|
2146 | 2159 | if (!hba->stats_buffer) { |
---|
2147 | 2160 | printk(KERN_ERR PFX "unable to alloc Stats Buffer\n"); |
---|
2148 | 2161 | bnx2fc_free_fw_resc(hba); |
---|