Lines Matching refs:cdev

184 	p_ramrod->sw_fid = qed_concrete_to_sw_fid(p_hwfn->cdev,  in qed_sp_vport_start()
444 static int qed_filter_accept_cmd(struct qed_dev *cdev, in qed_filter_accept_cmd() argument
458 for_each_hwfn(cdev, i) { in qed_filter_accept_cmd()
459 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_filter_accept_cmd()
466 DP_ERR(cdev, "Update rx_mode failed %d\n", rc); in qed_filter_accept_cmd()
1173 qed_filter_mcast_cmd(struct qed_dev *cdev, in qed_filter_mcast_cmd() argument
1187 for_each_hwfn(cdev, i) { in qed_filter_mcast_cmd()
1188 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_filter_mcast_cmd()
1206 static int qed_filter_ucast_cmd(struct qed_dev *cdev, in qed_filter_ucast_cmd() argument
1214 for_each_hwfn(cdev, i) { in qed_filter_ucast_cmd()
1215 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_filter_ucast_cmd()
1233 static int qed_fill_eth_dev_info(struct qed_dev *cdev, in qed_fill_eth_dev_info() argument
1242 if (cdev->int_params.out.int_mode == QED_INT_MODE_MSIX) { in qed_fill_eth_dev_info()
1243 for_each_hwfn(cdev, i) in qed_fill_eth_dev_info()
1244 info->num_queues += FEAT_NUM(&cdev->hwfns[i], in qed_fill_eth_dev_info()
1246 if (cdev->int_params.fp_msix_cnt) in qed_fill_eth_dev_info()
1248 cdev->int_params.fp_msix_cnt); in qed_fill_eth_dev_info()
1250 info->num_queues = cdev->num_hwfns; in qed_fill_eth_dev_info()
1253 info->num_vlan_filters = RESC_NUM(&cdev->hwfns[0], QED_VLAN); in qed_fill_eth_dev_info()
1255 cdev->hwfns[0].hw_info.hw_mac_addr); in qed_fill_eth_dev_info()
1257 qed_fill_dev_info(cdev, &info->common); in qed_fill_eth_dev_info()
1262 static void qed_register_eth_ops(struct qed_dev *cdev, in qed_register_eth_ops() argument
1266 cdev->protocol_ops.eth = ops; in qed_register_eth_ops()
1267 cdev->ops_cookie = cookie; in qed_register_eth_ops()
1270 static int qed_start_vport(struct qed_dev *cdev, in qed_start_vport() argument
1278 for_each_hwfn(cdev, i) { in qed_start_vport()
1279 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_start_vport()
1290 DP_ERR(cdev, "Failed to start VPORT\n"); in qed_start_vport()
1296 DP_VERBOSE(cdev, (QED_MSG_SPQ | NETIF_MSG_IFUP), in qed_start_vport()
1301 qed_reset_vport_stats(cdev); in qed_start_vport()
1306 static int qed_stop_vport(struct qed_dev *cdev, in qed_stop_vport() argument
1311 for_each_hwfn(cdev, i) { in qed_stop_vport()
1312 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_stop_vport()
1319 DP_ERR(cdev, "Failed to stop VPORT\n"); in qed_stop_vport()
1326 static int qed_update_vport(struct qed_dev *cdev, in qed_update_vport() argument
1333 if (!cdev) in qed_update_vport()
1351 if (cdev->num_hwfns > 1 && params->update_rss_flg) { in qed_update_vport()
1364 if (cdev->num_hwfns < max + 1) { in qed_update_vport()
1365 int divisor = (max + cdev->num_hwfns - 1) / in qed_update_vport()
1366 cdev->num_hwfns; in qed_update_vport()
1368 DP_VERBOSE(cdev, (QED_MSG_SPQ | NETIF_MSG_IFUP), in qed_update_vport()
1376 DP_VERBOSE(cdev, (QED_MSG_SPQ | NETIF_MSG_IFUP), in qed_update_vport()
1401 for_each_hwfn(cdev, i) { in qed_update_vport()
1402 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_update_vport()
1409 DP_ERR(cdev, "Failed to update VPORT\n"); in qed_update_vport()
1413 DP_VERBOSE(cdev, (QED_MSG_SPQ | NETIF_MSG_IFUP), in qed_update_vport()
1422 static int qed_start_rxq(struct qed_dev *cdev, in qed_start_rxq() argument
1433 hwfn_index = params->rss_id % cdev->num_hwfns; in qed_start_rxq()
1434 p_hwfn = &cdev->hwfns[hwfn_index]; in qed_start_rxq()
1437 params->queue_id /= cdev->num_hwfns; in qed_start_rxq()
1449 DP_ERR(cdev, "Failed to start RXQ#%d\n", params->queue_id); in qed_start_rxq()
1453 DP_VERBOSE(cdev, (QED_MSG_SPQ | NETIF_MSG_IFUP), in qed_start_rxq()
1461 static int qed_stop_rxq(struct qed_dev *cdev, in qed_stop_rxq() argument
1467 hwfn_index = params->rss_id % cdev->num_hwfns; in qed_stop_rxq()
1468 p_hwfn = &cdev->hwfns[hwfn_index]; in qed_stop_rxq()
1471 params->rx_queue_id / cdev->num_hwfns, in qed_stop_rxq()
1475 DP_ERR(cdev, "Failed to stop RXQ#%d\n", params->rx_queue_id); in qed_stop_rxq()
1482 static int qed_start_txq(struct qed_dev *cdev, in qed_start_txq() argument
1491 hwfn_index = p_params->rss_id % cdev->num_hwfns; in qed_start_txq()
1492 p_hwfn = &cdev->hwfns[hwfn_index]; in qed_start_txq()
1495 p_params->queue_id /= cdev->num_hwfns; in qed_start_txq()
1505 DP_ERR(cdev, "Failed to start TXQ#%d\n", p_params->queue_id); in qed_start_txq()
1509 DP_VERBOSE(cdev, (QED_MSG_SPQ | NETIF_MSG_IFUP), in qed_start_txq()
1518 static int qed_fastpath_stop(struct qed_dev *cdev) in qed_fastpath_stop() argument
1520 qed_hw_stop_fastpath(cdev); in qed_fastpath_stop()
1525 static int qed_stop_txq(struct qed_dev *cdev, in qed_stop_txq() argument
1531 hwfn_index = params->rss_id % cdev->num_hwfns; in qed_stop_txq()
1532 p_hwfn = &cdev->hwfns[hwfn_index]; in qed_stop_txq()
1535 params->tx_queue_id / cdev->num_hwfns); in qed_stop_txq()
1537 DP_ERR(cdev, "Failed to stop TXQ#%d\n", params->tx_queue_id); in qed_stop_txq()
1544 static int qed_configure_filter_rx_mode(struct qed_dev *cdev, in qed_configure_filter_rx_mode() argument
1566 return qed_filter_accept_cmd(cdev, 0, accept_flags, in qed_configure_filter_rx_mode()
1570 static int qed_configure_filter_ucast(struct qed_dev *cdev, in qed_configure_filter_ucast() argument
1577 cdev, in qed_configure_filter_ucast()
1594 DP_NOTICE(cdev, "Unknown unicast filter type %d\n", in qed_configure_filter_ucast()
1613 return qed_filter_ucast_cmd(cdev, &ucast, QED_SPQ_MODE_CB, NULL); in qed_configure_filter_ucast()
1616 static int qed_configure_filter_mcast(struct qed_dev *cdev, in qed_configure_filter_mcast() argument
1631 DP_NOTICE(cdev, "Unknown multicast filter type %d\n", in qed_configure_filter_mcast()
1639 return qed_filter_mcast_cmd(cdev, &mcast, in qed_configure_filter_mcast()
1643 static int qed_configure_filter(struct qed_dev *cdev, in qed_configure_filter() argument
1650 return qed_configure_filter_ucast(cdev, &params->filter.ucast); in qed_configure_filter()
1652 return qed_configure_filter_mcast(cdev, &params->filter.mcast); in qed_configure_filter()
1655 return qed_configure_filter_rx_mode(cdev, accept_flags); in qed_configure_filter()
1657 DP_NOTICE(cdev, "Unknown filter type %d\n", in qed_configure_filter()