.. | .. |
---|
| 1 | +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) |
---|
1 | 2 | /* QLogic qed NIC Driver |
---|
2 | 3 | * Copyright (c) 2015-2017 QLogic Corporation |
---|
3 | | - * |
---|
4 | | - * This software is available to you under a choice of one of two |
---|
5 | | - * licenses. You may choose to be licensed under the terms of the GNU |
---|
6 | | - * General Public License (GPL) Version 2, available from the file |
---|
7 | | - * COPYING in the main directory of this source tree, or the |
---|
8 | | - * OpenIB.org BSD license below: |
---|
9 | | - * |
---|
10 | | - * Redistribution and use in source and binary forms, with or |
---|
11 | | - * without modification, are permitted provided that the following |
---|
12 | | - * conditions are met: |
---|
13 | | - * |
---|
14 | | - * - Redistributions of source code must retain the above |
---|
15 | | - * copyright notice, this list of conditions and the following |
---|
16 | | - * disclaimer. |
---|
17 | | - * |
---|
18 | | - * - Redistributions in binary form must reproduce the above |
---|
19 | | - * copyright notice, this list of conditions and the following |
---|
20 | | - * disclaimer in the documentation and /or other materials |
---|
21 | | - * provided with the distribution. |
---|
22 | | - * |
---|
23 | | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
---|
24 | | - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
---|
25 | | - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
---|
26 | | - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
---|
27 | | - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
---|
28 | | - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
---|
29 | | - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
---|
30 | | - * SOFTWARE. |
---|
| 4 | + * Copyright (c) 2019-2020 Marvell International Ltd. |
---|
31 | 5 | */ |
---|
32 | 6 | |
---|
33 | 7 | #include <linux/types.h> |
---|
.. | .. |
---|
143 | 117 | u8 abortive_dsconnect; |
---|
144 | 118 | }; |
---|
145 | 119 | |
---|
146 | | -static int |
---|
147 | | -qed_iscsi_async_event(struct qed_hwfn *p_hwfn, |
---|
148 | | - u8 fw_event_code, |
---|
149 | | - u16 echo, union event_ring_data *data, u8 fw_return_code) |
---|
| 120 | +static int qed_iscsi_async_event(struct qed_hwfn *p_hwfn, u8 fw_event_code, |
---|
| 121 | + __le16 echo, union event_ring_data *data, |
---|
| 122 | + u8 fw_return_code) |
---|
150 | 123 | { |
---|
151 | 124 | if (p_hwfn->p_iscsi_info->event_cb) { |
---|
152 | 125 | struct qed_iscsi_info *p_iscsi = p_hwfn->p_iscsi_info; |
---|
.. | .. |
---|
204 | 177 | return -EINVAL; |
---|
205 | 178 | } |
---|
206 | 179 | |
---|
207 | | - SET_FIELD(p_init->hdr.flags, |
---|
208 | | - ISCSI_SLOW_PATH_HDR_LAYER_CODE, ISCSI_SLOW_PATH_LAYER_CODE); |
---|
209 | | - p_init->hdr.op_code = ISCSI_RAMROD_CMD_ID_INIT_FUNC; |
---|
210 | | - |
---|
211 | 180 | val = p_params->half_way_close_timeout; |
---|
212 | 181 | p_init->half_way_close_timeout = cpu_to_le16(val); |
---|
213 | 182 | p_init->num_sq_pages_in_ring = p_params->num_sq_pages_in_ring; |
---|
214 | 183 | p_init->num_r2tq_pages_in_ring = p_params->num_r2tq_pages_in_ring; |
---|
215 | 184 | p_init->num_uhq_pages_in_ring = p_params->num_uhq_pages_in_ring; |
---|
216 | | - p_init->ll2_rx_queue_id = p_hwfn->hw_info.resc_start[QED_LL2_QUEUE] + |
---|
217 | | - p_params->ll2_ooo_queue_id; |
---|
| 185 | + p_init->ll2_rx_queue_id = |
---|
| 186 | + p_hwfn->hw_info.resc_start[QED_LL2_RAM_QUEUE] + |
---|
| 187 | + p_params->ll2_ooo_queue_id; |
---|
218 | 188 | |
---|
219 | 189 | p_init->func_params.log_page_size = p_params->log_page_size; |
---|
220 | 190 | val = p_params->num_tasks; |
---|
.. | .. |
---|
300 | 270 | dma_addr_t xhq_pbl_addr; |
---|
301 | 271 | dma_addr_t uhq_pbl_addr; |
---|
302 | 272 | u16 physical_q; |
---|
| 273 | + __le16 tmp; |
---|
303 | 274 | int rc = 0; |
---|
304 | 275 | u32 dval; |
---|
305 | 276 | u16 wval; |
---|
.. | .. |
---|
323 | 294 | |
---|
324 | 295 | /* Transmission PQ is the first of the PF */ |
---|
325 | 296 | physical_q = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD); |
---|
326 | | - p_conn->physical_q0 = cpu_to_le16(physical_q); |
---|
| 297 | + p_conn->physical_q0 = physical_q; |
---|
327 | 298 | p_ramrod->iscsi.physical_q0 = cpu_to_le16(physical_q); |
---|
328 | 299 | |
---|
329 | 300 | /* iSCSI Pure-ACK PQ */ |
---|
330 | 301 | physical_q = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_ACK); |
---|
331 | | - p_conn->physical_q1 = cpu_to_le16(physical_q); |
---|
| 302 | + p_conn->physical_q1 = physical_q; |
---|
332 | 303 | p_ramrod->iscsi.physical_q1 = cpu_to_le16(physical_q); |
---|
333 | 304 | |
---|
334 | | - p_ramrod->hdr.op_code = ISCSI_RAMROD_CMD_ID_OFFLOAD_CONN; |
---|
335 | | - SET_FIELD(p_ramrod->hdr.flags, ISCSI_SLOW_PATH_HDR_LAYER_CODE, |
---|
336 | | - p_conn->layer_code); |
---|
337 | | - |
---|
338 | 305 | p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); |
---|
339 | | - p_ramrod->fw_cid = cpu_to_le32(p_conn->icid); |
---|
340 | 306 | |
---|
341 | 307 | DMA_REGPAIR_LE(p_ramrod->iscsi.sq_pbl_addr, p_conn->sq_pbl_addr); |
---|
342 | 308 | |
---|
.. | .. |
---|
359 | 325 | p_tcp = &p_ramrod->tcp; |
---|
360 | 326 | |
---|
361 | 327 | p = (u16 *)p_conn->local_mac; |
---|
362 | | - p_tcp->local_mac_addr_hi = swab16(get_unaligned(p)); |
---|
363 | | - p_tcp->local_mac_addr_mid = swab16(get_unaligned(p + 1)); |
---|
364 | | - p_tcp->local_mac_addr_lo = swab16(get_unaligned(p + 2)); |
---|
| 328 | + tmp = cpu_to_le16(get_unaligned_be16(p)); |
---|
| 329 | + p_tcp->local_mac_addr_hi = tmp; |
---|
| 330 | + tmp = cpu_to_le16(get_unaligned_be16(p + 1)); |
---|
| 331 | + p_tcp->local_mac_addr_mid = tmp; |
---|
| 332 | + tmp = cpu_to_le16(get_unaligned_be16(p + 2)); |
---|
| 333 | + p_tcp->local_mac_addr_lo = tmp; |
---|
365 | 334 | |
---|
366 | 335 | p = (u16 *)p_conn->remote_mac; |
---|
367 | | - p_tcp->remote_mac_addr_hi = swab16(get_unaligned(p)); |
---|
368 | | - p_tcp->remote_mac_addr_mid = swab16(get_unaligned(p + 1)); |
---|
369 | | - p_tcp->remote_mac_addr_lo = swab16(get_unaligned(p + 2)); |
---|
| 336 | + tmp = cpu_to_le16(get_unaligned_be16(p)); |
---|
| 337 | + p_tcp->remote_mac_addr_hi = tmp; |
---|
| 338 | + tmp = cpu_to_le16(get_unaligned_be16(p + 1)); |
---|
| 339 | + p_tcp->remote_mac_addr_mid = tmp; |
---|
| 340 | + tmp = cpu_to_le16(get_unaligned_be16(p + 2)); |
---|
| 341 | + p_tcp->remote_mac_addr_lo = tmp; |
---|
370 | 342 | |
---|
371 | 343 | p_tcp->vlan_id = cpu_to_le16(p_conn->vlan_id); |
---|
372 | 344 | |
---|
.. | .. |
---|
425 | 397 | &((struct iscsi_spe_conn_offload_option2 *)p_ramrod)->tcp; |
---|
426 | 398 | |
---|
427 | 399 | p = (u16 *)p_conn->local_mac; |
---|
428 | | - p_tcp2->local_mac_addr_hi = swab16(get_unaligned(p)); |
---|
429 | | - p_tcp2->local_mac_addr_mid = swab16(get_unaligned(p + 1)); |
---|
430 | | - p_tcp2->local_mac_addr_lo = swab16(get_unaligned(p + 2)); |
---|
| 400 | + tmp = cpu_to_le16(get_unaligned_be16(p)); |
---|
| 401 | + p_tcp2->local_mac_addr_hi = tmp; |
---|
| 402 | + tmp = cpu_to_le16(get_unaligned_be16(p + 1)); |
---|
| 403 | + p_tcp2->local_mac_addr_mid = tmp; |
---|
| 404 | + tmp = cpu_to_le16(get_unaligned_be16(p + 2)); |
---|
| 405 | + p_tcp2->local_mac_addr_lo = tmp; |
---|
431 | 406 | |
---|
432 | 407 | p = (u16 *)p_conn->remote_mac; |
---|
433 | | - p_tcp2->remote_mac_addr_hi = swab16(get_unaligned(p)); |
---|
434 | | - p_tcp2->remote_mac_addr_mid = swab16(get_unaligned(p + 1)); |
---|
435 | | - p_tcp2->remote_mac_addr_lo = swab16(get_unaligned(p + 2)); |
---|
| 408 | + tmp = cpu_to_le16(get_unaligned_be16(p)); |
---|
| 409 | + p_tcp2->remote_mac_addr_hi = tmp; |
---|
| 410 | + tmp = cpu_to_le16(get_unaligned_be16(p + 1)); |
---|
| 411 | + p_tcp2->remote_mac_addr_mid = tmp; |
---|
| 412 | + tmp = cpu_to_le16(get_unaligned_be16(p + 2)); |
---|
| 413 | + p_tcp2->remote_mac_addr_lo = tmp; |
---|
436 | 414 | |
---|
437 | 415 | p_tcp2->vlan_id = cpu_to_le16(p_conn->vlan_id); |
---|
438 | 416 | p_tcp2->flags = cpu_to_le16(p_conn->tcp_flags); |
---|
.. | .. |
---|
492 | 470 | return rc; |
---|
493 | 471 | |
---|
494 | 472 | p_ramrod = &p_ent->ramrod.iscsi_conn_update; |
---|
495 | | - p_ramrod->hdr.op_code = ISCSI_RAMROD_CMD_ID_UPDATE_CONN; |
---|
496 | | - SET_FIELD(p_ramrod->hdr.flags, |
---|
497 | | - ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code); |
---|
498 | 473 | |
---|
499 | 474 | p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); |
---|
500 | | - p_ramrod->fw_cid = cpu_to_le32(p_conn->icid); |
---|
501 | 475 | p_ramrod->flags = p_conn->update_flag; |
---|
502 | 476 | p_ramrod->max_seq_size = cpu_to_le32(p_conn->max_seq_size); |
---|
503 | 477 | dval = p_conn->max_recv_pdu_length; |
---|
.. | .. |
---|
537 | 511 | return rc; |
---|
538 | 512 | |
---|
539 | 513 | p_ramrod = &p_ent->ramrod.iscsi_conn_mac_update; |
---|
540 | | - p_ramrod->hdr.op_code = ISCSI_RAMROD_CMD_ID_MAC_UPDATE; |
---|
541 | | - SET_FIELD(p_ramrod->hdr.flags, |
---|
542 | | - ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code); |
---|
543 | 514 | |
---|
544 | 515 | p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); |
---|
545 | | - p_ramrod->fw_cid = cpu_to_le32(p_conn->icid); |
---|
546 | 516 | ucval = p_conn->remote_mac[1]; |
---|
547 | 517 | ((u8 *)(&p_ramrod->remote_mac_addr_hi))[0] = ucval; |
---|
548 | 518 | ucval = p_conn->remote_mac[0]; |
---|
.. | .. |
---|
583 | 553 | return rc; |
---|
584 | 554 | |
---|
585 | 555 | p_ramrod = &p_ent->ramrod.iscsi_conn_terminate; |
---|
586 | | - p_ramrod->hdr.op_code = ISCSI_RAMROD_CMD_ID_TERMINATION_CONN; |
---|
587 | | - SET_FIELD(p_ramrod->hdr.flags, |
---|
588 | | - ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code); |
---|
589 | 556 | |
---|
590 | 557 | p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); |
---|
591 | | - p_ramrod->fw_cid = cpu_to_le32(p_conn->icid); |
---|
592 | 558 | p_ramrod->abortive = p_conn->abortive_dsconnect; |
---|
593 | 559 | |
---|
594 | 560 | DMA_REGPAIR_LE(p_ramrod->query_params_addr, |
---|
.. | .. |
---|
603 | 569 | enum spq_mode comp_mode, |
---|
604 | 570 | struct qed_spq_comp_cb *p_comp_addr) |
---|
605 | 571 | { |
---|
606 | | - struct iscsi_slow_path_hdr *p_ramrod = NULL; |
---|
607 | 572 | struct qed_spq_entry *p_ent = NULL; |
---|
608 | 573 | struct qed_sp_init_data init_data; |
---|
609 | 574 | int rc = -EINVAL; |
---|
.. | .. |
---|
621 | 586 | if (rc) |
---|
622 | 587 | return rc; |
---|
623 | 588 | |
---|
624 | | - p_ramrod = &p_ent->ramrod.iscsi_empty; |
---|
625 | | - p_ramrod->op_code = ISCSI_RAMROD_CMD_ID_CLEAR_SQ; |
---|
626 | | - SET_FIELD(p_ramrod->flags, |
---|
627 | | - ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code); |
---|
628 | | - |
---|
629 | 589 | return qed_spq_post(p_hwfn, p_ent, NULL); |
---|
630 | 590 | } |
---|
631 | 591 | |
---|
.. | .. |
---|
633 | 593 | enum spq_mode comp_mode, |
---|
634 | 594 | struct qed_spq_comp_cb *p_comp_addr) |
---|
635 | 595 | { |
---|
636 | | - struct iscsi_spe_func_dstry *p_ramrod = NULL; |
---|
637 | 596 | struct qed_spq_entry *p_ent = NULL; |
---|
638 | 597 | struct qed_sp_init_data init_data; |
---|
639 | 598 | int rc = 0; |
---|
.. | .. |
---|
650 | 609 | PROTOCOLID_ISCSI, &init_data); |
---|
651 | 610 | if (rc) |
---|
652 | 611 | return rc; |
---|
653 | | - |
---|
654 | | - p_ramrod = &p_ent->ramrod.iscsi_destroy; |
---|
655 | | - p_ramrod->hdr.op_code = ISCSI_RAMROD_CMD_ID_DESTROY_FUNC; |
---|
656 | 612 | |
---|
657 | 613 | rc = qed_spq_post(p_hwfn, p_ent, NULL); |
---|
658 | 614 | |
---|
.. | .. |
---|
728 | 684 | static int qed_iscsi_allocate_connection(struct qed_hwfn *p_hwfn, |
---|
729 | 685 | struct qed_iscsi_conn **p_out_conn) |
---|
730 | 686 | { |
---|
731 | | - u16 uhq_num_elements = 0, xhq_num_elements = 0, r2tq_num_elements = 0; |
---|
732 | 687 | struct scsi_terminate_extra_params *p_q_cnts = NULL; |
---|
733 | 688 | struct qed_iscsi_pf_params *p_params = NULL; |
---|
| 689 | + struct qed_chain_init_params params = { |
---|
| 690 | + .mode = QED_CHAIN_MODE_PBL, |
---|
| 691 | + .intended_use = QED_CHAIN_USE_TO_CONSUME_PRODUCE, |
---|
| 692 | + .cnt_type = QED_CHAIN_CNT_TYPE_U16, |
---|
| 693 | + }; |
---|
734 | 694 | struct tcp_upload_params *p_tcp = NULL; |
---|
735 | 695 | struct qed_iscsi_conn *p_conn = NULL; |
---|
736 | 696 | int rc = 0; |
---|
.. | .. |
---|
771 | 731 | goto nomem_upload_param; |
---|
772 | 732 | p_conn->tcp_upload_params_virt_addr = p_tcp; |
---|
773 | 733 | |
---|
774 | | - r2tq_num_elements = p_params->num_r2tq_pages_in_ring * |
---|
775 | | - QED_CHAIN_PAGE_SIZE / 0x80; |
---|
776 | | - rc = qed_chain_alloc(p_hwfn->cdev, |
---|
777 | | - QED_CHAIN_USE_TO_CONSUME_PRODUCE, |
---|
778 | | - QED_CHAIN_MODE_PBL, |
---|
779 | | - QED_CHAIN_CNT_TYPE_U16, |
---|
780 | | - r2tq_num_elements, 0x80, &p_conn->r2tq, NULL); |
---|
| 734 | + params.num_elems = p_params->num_r2tq_pages_in_ring * |
---|
| 735 | + QED_CHAIN_PAGE_SIZE / sizeof(struct iscsi_wqe); |
---|
| 736 | + params.elem_size = sizeof(struct iscsi_wqe); |
---|
| 737 | + |
---|
| 738 | + rc = qed_chain_alloc(p_hwfn->cdev, &p_conn->r2tq, ¶ms); |
---|
781 | 739 | if (rc) |
---|
782 | 740 | goto nomem_r2tq; |
---|
783 | 741 | |
---|
784 | | - uhq_num_elements = p_params->num_uhq_pages_in_ring * |
---|
| 742 | + params.num_elems = p_params->num_uhq_pages_in_ring * |
---|
785 | 743 | QED_CHAIN_PAGE_SIZE / sizeof(struct iscsi_uhqe); |
---|
786 | | - rc = qed_chain_alloc(p_hwfn->cdev, |
---|
787 | | - QED_CHAIN_USE_TO_CONSUME_PRODUCE, |
---|
788 | | - QED_CHAIN_MODE_PBL, |
---|
789 | | - QED_CHAIN_CNT_TYPE_U16, |
---|
790 | | - uhq_num_elements, |
---|
791 | | - sizeof(struct iscsi_uhqe), &p_conn->uhq, NULL); |
---|
| 744 | + params.elem_size = sizeof(struct iscsi_uhqe); |
---|
| 745 | + |
---|
| 746 | + rc = qed_chain_alloc(p_hwfn->cdev, &p_conn->uhq, ¶ms); |
---|
792 | 747 | if (rc) |
---|
793 | 748 | goto nomem_uhq; |
---|
794 | 749 | |
---|
795 | | - xhq_num_elements = uhq_num_elements; |
---|
796 | | - rc = qed_chain_alloc(p_hwfn->cdev, |
---|
797 | | - QED_CHAIN_USE_TO_CONSUME_PRODUCE, |
---|
798 | | - QED_CHAIN_MODE_PBL, |
---|
799 | | - QED_CHAIN_CNT_TYPE_U16, |
---|
800 | | - xhq_num_elements, |
---|
801 | | - sizeof(struct iscsi_xhqe), &p_conn->xhq, NULL); |
---|
| 750 | + params.elem_size = sizeof(struct iscsi_xhqe); |
---|
| 751 | + |
---|
| 752 | + rc = qed_chain_alloc(p_hwfn->cdev, &p_conn->xhq, ¶ms); |
---|
802 | 753 | if (rc) |
---|
803 | 754 | goto nomem; |
---|
804 | 755 | |
---|
.. | .. |
---|
1082 | 1033 | static int qed_fill_iscsi_dev_info(struct qed_dev *cdev, |
---|
1083 | 1034 | struct qed_dev_iscsi_info *info) |
---|
1084 | 1035 | { |
---|
1085 | | - struct qed_hwfn *hwfn = QED_LEADING_HWFN(cdev); |
---|
| 1036 | + struct qed_hwfn *hwfn = QED_AFFIN_HWFN(cdev); |
---|
1086 | 1037 | |
---|
1087 | 1038 | int rc; |
---|
1088 | 1039 | |
---|
.. | .. |
---|
1141 | 1092 | } |
---|
1142 | 1093 | |
---|
1143 | 1094 | /* Stop the iscsi */ |
---|
1144 | | - rc = qed_sp_iscsi_func_stop(QED_LEADING_HWFN(cdev), |
---|
1145 | | - QED_SPQ_MODE_EBLOCK, NULL); |
---|
| 1095 | + rc = qed_sp_iscsi_func_stop(QED_AFFIN_HWFN(cdev), QED_SPQ_MODE_EBLOCK, |
---|
| 1096 | + NULL); |
---|
1146 | 1097 | cdev->flags &= ~QED_FLAG_STORAGE_STARTED; |
---|
1147 | 1098 | |
---|
1148 | 1099 | return rc; |
---|
.. | .. |
---|
1161 | 1112 | return 0; |
---|
1162 | 1113 | } |
---|
1163 | 1114 | |
---|
1164 | | - rc = qed_sp_iscsi_func_start(QED_LEADING_HWFN(cdev), |
---|
1165 | | - QED_SPQ_MODE_EBLOCK, NULL, event_context, |
---|
1166 | | - async_event_cb); |
---|
| 1115 | + rc = qed_sp_iscsi_func_start(QED_AFFIN_HWFN(cdev), QED_SPQ_MODE_EBLOCK, |
---|
| 1116 | + NULL, event_context, async_event_cb); |
---|
1167 | 1117 | if (rc) { |
---|
1168 | 1118 | DP_NOTICE(cdev, "Failed to start iscsi\n"); |
---|
1169 | 1119 | return rc; |
---|
.. | .. |
---|
1182 | 1132 | return -ENOMEM; |
---|
1183 | 1133 | } |
---|
1184 | 1134 | |
---|
1185 | | - rc = qed_cxt_get_tid_mem_info(QED_LEADING_HWFN(cdev), |
---|
1186 | | - tid_info); |
---|
| 1135 | + rc = qed_cxt_get_tid_mem_info(QED_AFFIN_HWFN(cdev), tid_info); |
---|
1187 | 1136 | if (rc) { |
---|
1188 | 1137 | DP_NOTICE(cdev, "Failed to gather task information\n"); |
---|
1189 | 1138 | qed_iscsi_stop(cdev); |
---|
.. | .. |
---|
1215 | 1164 | return -ENOMEM; |
---|
1216 | 1165 | |
---|
1217 | 1166 | /* Acquire the connection */ |
---|
1218 | | - rc = qed_iscsi_acquire_connection(QED_LEADING_HWFN(cdev), NULL, |
---|
| 1167 | + rc = qed_iscsi_acquire_connection(QED_AFFIN_HWFN(cdev), NULL, |
---|
1219 | 1168 | &hash_con->con); |
---|
1220 | 1169 | if (rc) { |
---|
1221 | 1170 | DP_NOTICE(cdev, "Failed to acquire Connection\n"); |
---|
.. | .. |
---|
1229 | 1178 | hash_add(cdev->connections, &hash_con->node, *handle); |
---|
1230 | 1179 | |
---|
1231 | 1180 | if (p_doorbell) |
---|
1232 | | - *p_doorbell = qed_iscsi_get_db_addr(QED_LEADING_HWFN(cdev), |
---|
| 1181 | + *p_doorbell = qed_iscsi_get_db_addr(QED_AFFIN_HWFN(cdev), |
---|
1233 | 1182 | *handle); |
---|
1234 | 1183 | |
---|
1235 | 1184 | return 0; |
---|
.. | .. |
---|
1247 | 1196 | } |
---|
1248 | 1197 | |
---|
1249 | 1198 | hlist_del(&hash_con->node); |
---|
1250 | | - qed_iscsi_release_connection(QED_LEADING_HWFN(cdev), hash_con->con); |
---|
| 1199 | + qed_iscsi_release_connection(QED_AFFIN_HWFN(cdev), hash_con->con); |
---|
1251 | 1200 | kfree(hash_con); |
---|
1252 | 1201 | |
---|
1253 | 1202 | return 0; |
---|
.. | .. |
---|
1324 | 1273 | /* Set default values on other connection fields */ |
---|
1325 | 1274 | con->offl_flags = 0x1; |
---|
1326 | 1275 | |
---|
1327 | | - return qed_sp_iscsi_conn_offload(QED_LEADING_HWFN(cdev), con, |
---|
| 1276 | + return qed_sp_iscsi_conn_offload(QED_AFFIN_HWFN(cdev), con, |
---|
1328 | 1277 | QED_SPQ_MODE_EBLOCK, NULL); |
---|
1329 | 1278 | } |
---|
1330 | 1279 | |
---|
.. | .. |
---|
1351 | 1300 | con->first_seq_length = conn_info->first_seq_length; |
---|
1352 | 1301 | con->exp_stat_sn = conn_info->exp_stat_sn; |
---|
1353 | 1302 | |
---|
1354 | | - return qed_sp_iscsi_conn_update(QED_LEADING_HWFN(cdev), con, |
---|
| 1303 | + return qed_sp_iscsi_conn_update(QED_AFFIN_HWFN(cdev), con, |
---|
1355 | 1304 | QED_SPQ_MODE_EBLOCK, NULL); |
---|
1356 | 1305 | } |
---|
1357 | 1306 | |
---|
.. | .. |
---|
1366 | 1315 | return -EINVAL; |
---|
1367 | 1316 | } |
---|
1368 | 1317 | |
---|
1369 | | - return qed_sp_iscsi_conn_clear_sq(QED_LEADING_HWFN(cdev), |
---|
1370 | | - hash_con->con, |
---|
| 1318 | + return qed_sp_iscsi_conn_clear_sq(QED_AFFIN_HWFN(cdev), hash_con->con, |
---|
1371 | 1319 | QED_SPQ_MODE_EBLOCK, NULL); |
---|
1372 | 1320 | } |
---|
1373 | 1321 | |
---|
.. | .. |
---|
1385 | 1333 | |
---|
1386 | 1334 | hash_con->con->abortive_dsconnect = abrt_conn; |
---|
1387 | 1335 | |
---|
1388 | | - return qed_sp_iscsi_conn_terminate(QED_LEADING_HWFN(cdev), |
---|
1389 | | - hash_con->con, |
---|
| 1336 | + return qed_sp_iscsi_conn_terminate(QED_AFFIN_HWFN(cdev), hash_con->con, |
---|
1390 | 1337 | QED_SPQ_MODE_EBLOCK, NULL); |
---|
1391 | 1338 | } |
---|
1392 | 1339 | |
---|
1393 | 1340 | static int qed_iscsi_stats(struct qed_dev *cdev, struct qed_iscsi_stats *stats) |
---|
1394 | 1341 | { |
---|
1395 | | - return qed_iscsi_get_stats(QED_LEADING_HWFN(cdev), stats); |
---|
| 1342 | + return qed_iscsi_get_stats(QED_AFFIN_HWFN(cdev), stats); |
---|
1396 | 1343 | } |
---|
1397 | 1344 | |
---|
1398 | 1345 | static int qed_iscsi_change_mac(struct qed_dev *cdev, |
---|
.. | .. |
---|
1407 | 1354 | return -EINVAL; |
---|
1408 | 1355 | } |
---|
1409 | 1356 | |
---|
1410 | | - return qed_sp_iscsi_mac_update(QED_LEADING_HWFN(cdev), |
---|
1411 | | - hash_con->con, |
---|
| 1357 | + return qed_sp_iscsi_mac_update(QED_AFFIN_HWFN(cdev), hash_con->con, |
---|
1412 | 1358 | QED_SPQ_MODE_EBLOCK, NULL); |
---|
1413 | 1359 | } |
---|
1414 | 1360 | |
---|