Loading drivers/emac-dwc-eqos/DWC_ETH_QOS_drv.c +67 −55 Original line number Diff line number Diff line Loading @@ -3133,11 +3133,12 @@ static void DWC_ETH_QOS_consume_page_split_hdr( { if (page2_used) buffer->page2 = NULL; if (skb != NULL) { skb->len += length; skb->data_len += length; skb->truesize += length; } } /* Receive Checksum Offload configuration */ static inline void DWC_ETH_QOS_config_rx_csum(struct DWC_ETH_QOS_prv_data *pdata, Loading Loading @@ -3244,7 +3245,7 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( unsigned short payload_len = 0; unsigned char intermediate_desc_cnt = 0; unsigned char buf2_used = 0; int ret; int ret = 0; DBGPR("-->DWC_ETH_QOS_clean_split_hdr_rx_irq: qinx = %u, quota = %d\n", qinx, quota); Loading Loading @@ -3343,14 +3344,12 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( } else { /* this is the middle of a chain */ payload_len = pdata->rx_buffer_len; skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page2, 0, payload_len); if (desc_data->skb_top != NULL) skb_fill_page_desc(desc_data->skb_top,skb_shinfo(desc_data->skb_top)->nr_frags,buffer->page2, 0,payload_len); /* re-use this skb, as consumed only the page */ buffer->skb = skb; } if (desc_data->skb_top != NULL) DWC_ETH_QOS_consume_page_split_hdr(buffer, desc_data->skb_top, payload_len, buf2_used); Loading @@ -3368,16 +3367,14 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( (pdata->rx_buffer_len * intermediate_desc_cnt) - buffer->rx_hdr_size); } skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page2, 0, payload_len); if (desc_data->skb_top != NULL) { skb_fill_page_desc(desc_data->skb_top,skb_shinfo(desc_data->skb_top)->nr_frags,buffer->page2, 0,payload_len); /* re-use this skb, as consumed only the page */ buffer->skb = skb; skb = desc_data->skb_top; } desc_data->skb_top = NULL; if (skb != NULL) DWC_ETH_QOS_consume_page_split_hdr(buffer, skb, payload_len, buf2_used); } else { Loading Loading @@ -3422,11 +3419,13 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( hdr_len = 0; } if (skb != NULL) { DWC_ETH_QOS_config_rx_csum(pdata, skb, RX_NORMAL_DESC); #ifdef DWC_ETH_QOS_ENABLE_VLAN_TAG DWC_ETH_QOS_get_rx_vlan(pdata, skb, RX_NORMAL_DESC); #endif } #ifdef YDEBUG_FILTER DWC_ETH_QOS_check_rx_filter_status(RX_NORMAL_DESC); Loading @@ -3435,6 +3434,7 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( if ((pdata->hw_feat.tsstssel) && (pdata->hwts_rx_en)) { /* get rx tstamp if available */ if (hw_if->rx_tstamp_available(RX_NORMAL_DESC)) { if (skb != NULL ) ret = DWC_ETH_QOS_get_rx_hwtstamp(pdata, skb, desc_data, qinx); if (ret == 0) { Loading @@ -3442,6 +3442,7 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( * time stamp, hence delay the packet reception */ buffer->skb = skb; if (skb != NULL) buffer->dma = dma_map_single(GET_MEM_PDEV_DEV, skb->data, pdata->rx_buffer_len, DMA_FROM_DEVICE); if (dma_mapping_error(GET_MEM_PDEV_DEV, buffer->dma)) Loading @@ -3462,8 +3463,10 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( #endif /* update the statistics */ dev->stats.rx_packets++; if ( skb != NULL) { dev->stats.rx_bytes += skb->len; DWC_ETH_QOS_receive_skb(pdata, dev, skb, qinx); } received++; next_desc: desc_data->dirty_rx++; Loading Loading @@ -3524,7 +3527,7 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, u16 pkt_len; UCHAR intermediate_desc_cnt = 0; unsigned int buf2_used; int ret; int ret = 0 ; DBGPR("-->DWC_ETH_QOS_clean_jumbo_rx_irq: qinx = %u, quota = %d\n", qinx, quota); Loading Loading @@ -3595,19 +3598,21 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, pdata->rx_buffer_len); } else { /* this is the middle of a chain */ if (desc_data->skb_top != NULL) { skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page, 0, pdata->rx_buffer_len); DBGPR("RX: pkt in second buffer pointer\n"); skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page2, 0, pdata->rx_buffer_len); } /* re-use this skb, as consumed only the page */ buffer->skb = skb; } if (desc_data->skb_top != NULL ) DWC_ETH_QOS_consume_page(buffer, desc_data->skb_top, (pdata->rx_buffer_len * 2), Loading @@ -3619,18 +3624,20 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, pkt_len = (pkt_len - (pdata->rx_buffer_len * intermediate_desc_cnt)); if (pkt_len > pdata->rx_buffer_len) { if (desc_data->skb_top != NULL) { skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page, 0, pdata->rx_buffer_len); DBGPR("RX: pkt in second buffer pointer\n"); skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page2, 0, (pkt_len - pdata->rx_buffer_len)); } buf2_used = 1; } else { if (desc_data->skb_top != NULL) skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page, 0, Loading @@ -3639,8 +3646,10 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, } /* re-use this skb, as consumed only the page */ buffer->skb = skb; if (desc_data->skb_top != NULL) skb = desc_data->skb_top; desc_data->skb_top = NULL; if (skb != NULL) DWC_ETH_QOS_consume_page(buffer, skb, pkt_len, buf2_used); Loading Loading @@ -3691,11 +3700,13 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, intermediate_desc_cnt = 0; } if (skb != NULL) { DWC_ETH_QOS_config_rx_csum(pdata, skb, RX_NORMAL_DESC); #ifdef DWC_ETH_QOS_ENABLE_VLAN_TAG DWC_ETH_QOS_get_rx_vlan(pdata, skb, RX_NORMAL_DESC); #endif } #ifdef YDEBUG_FILTER DWC_ETH_QOS_check_rx_filter_status(RX_NORMAL_DESC); Loading @@ -3704,15 +3715,16 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, if ((pdata->hw_feat.tsstssel) && (pdata->hwts_rx_en)) { /* get rx tstamp if available */ if (hw_if->rx_tstamp_available(RX_NORMAL_DESC)) { ret = DWC_ETH_QOS_get_rx_hwtstamp(pdata, skb, desc_data, qinx); if (skb != NULL) ret = DWC_ETH_QOS_get_rx_hwtstamp(pdata, skb, desc_data, qinx); if (ret == 0) { /* device has not yet updated the CONTEXT desc to hold the * time stamp, hence delay the packet reception */ buffer->skb = skb; buffer->dma = dma_map_single(GET_MEM_PDEV_DEV, skb->data, pdata->rx_buffer_len, DMA_FROM_DEVICE); if (skb != NULL) buffer->dma = dma_map_single(GET_MEM_PDEV_DEV, skb->data, pdata->rx_buffer_len, DMA_FROM_DEVICE); if (dma_mapping_error(GET_MEM_PDEV_DEV, buffer->dma)) dev_alert(&pdata->pdev->dev, "failed to do the RX dma map\n"); Loading @@ -3732,16 +3744,16 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, #endif /* update the statistics */ dev->stats.rx_packets++; if (skb != NULL) { dev->stats.rx_bytes += skb->len; /* eth type trans needs skb->data to point to something */ if (!pskb_may_pull(skb, ETH_HLEN)) { dev_alert(&pdata->pdev->dev, "pskb_may_pull failed\n"); dev_kfree_skb_any(skb); goto next_desc; } DWC_ETH_QOS_receive_skb(pdata, dev, skb, qinx); } received++; next_desc: desc_data->dirty_rx++; Loading drivers/emac-dwc-eqos/DWC_ETH_QOS_ipa.c +3 −3 Original line number Diff line number Diff line Loading @@ -525,7 +525,7 @@ static int DWC_ETH_QOS_ipa_offload_resume(struct DWC_ETH_QOS_prv_data *pdata) static int DWC_ETH_QOS_ipa_ready(struct DWC_ETH_QOS_prv_data *pdata) { int ret; int ret = 0 ; EMACDBG("Enter \n"); Loading Loading @@ -960,8 +960,8 @@ static int DWC_ETH_QOS_ipa_offload_connect(struct DWC_ETH_QOS_prv_data *pdata) struct DWC_ETH_QOS_prv_ipa_data *ntn_ipa = &pdata->prv_ipa; struct ipa_uc_offload_conn_in_params in; struct ipa_uc_offload_conn_out_params out; struct ipa_ntn_setup_info rx_setup_info; struct ipa_ntn_setup_info tx_setup_info; struct ipa_ntn_setup_info rx_setup_info = {0}; struct ipa_ntn_setup_info tx_setup_info = {0}; struct ipa_perf_profile profile; int ret = 0; int i = 0; Loading drivers/emac-dwc-eqos/DWC_ETH_QOS_platform.c +1 −1 Original line number Diff line number Diff line Loading @@ -969,7 +969,7 @@ int DWC_ETH_QOS_qmp_mailbox_init(struct DWC_ETH_QOS_prv_data *pdata) pdata->qmp_mbox_client = devm_kzalloc( &pdata->pdev->dev, sizeof(*pdata->qmp_mbox_client), GFP_KERNEL); if (IS_ERR(pdata->qmp_mbox_client)){ if (pdata->qmp_mbox_client == NULL || IS_ERR(pdata->qmp_mbox_client)){ EMACERR("qmp alloc client failed\n"); return -1; } Loading Loading
drivers/emac-dwc-eqos/DWC_ETH_QOS_drv.c +67 −55 Original line number Diff line number Diff line Loading @@ -3133,11 +3133,12 @@ static void DWC_ETH_QOS_consume_page_split_hdr( { if (page2_used) buffer->page2 = NULL; if (skb != NULL) { skb->len += length; skb->data_len += length; skb->truesize += length; } } /* Receive Checksum Offload configuration */ static inline void DWC_ETH_QOS_config_rx_csum(struct DWC_ETH_QOS_prv_data *pdata, Loading Loading @@ -3244,7 +3245,7 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( unsigned short payload_len = 0; unsigned char intermediate_desc_cnt = 0; unsigned char buf2_used = 0; int ret; int ret = 0; DBGPR("-->DWC_ETH_QOS_clean_split_hdr_rx_irq: qinx = %u, quota = %d\n", qinx, quota); Loading Loading @@ -3343,14 +3344,12 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( } else { /* this is the middle of a chain */ payload_len = pdata->rx_buffer_len; skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page2, 0, payload_len); if (desc_data->skb_top != NULL) skb_fill_page_desc(desc_data->skb_top,skb_shinfo(desc_data->skb_top)->nr_frags,buffer->page2, 0,payload_len); /* re-use this skb, as consumed only the page */ buffer->skb = skb; } if (desc_data->skb_top != NULL) DWC_ETH_QOS_consume_page_split_hdr(buffer, desc_data->skb_top, payload_len, buf2_used); Loading @@ -3368,16 +3367,14 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( (pdata->rx_buffer_len * intermediate_desc_cnt) - buffer->rx_hdr_size); } skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page2, 0, payload_len); if (desc_data->skb_top != NULL) { skb_fill_page_desc(desc_data->skb_top,skb_shinfo(desc_data->skb_top)->nr_frags,buffer->page2, 0,payload_len); /* re-use this skb, as consumed only the page */ buffer->skb = skb; skb = desc_data->skb_top; } desc_data->skb_top = NULL; if (skb != NULL) DWC_ETH_QOS_consume_page_split_hdr(buffer, skb, payload_len, buf2_used); } else { Loading Loading @@ -3422,11 +3419,13 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( hdr_len = 0; } if (skb != NULL) { DWC_ETH_QOS_config_rx_csum(pdata, skb, RX_NORMAL_DESC); #ifdef DWC_ETH_QOS_ENABLE_VLAN_TAG DWC_ETH_QOS_get_rx_vlan(pdata, skb, RX_NORMAL_DESC); #endif } #ifdef YDEBUG_FILTER DWC_ETH_QOS_check_rx_filter_status(RX_NORMAL_DESC); Loading @@ -3435,6 +3434,7 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( if ((pdata->hw_feat.tsstssel) && (pdata->hwts_rx_en)) { /* get rx tstamp if available */ if (hw_if->rx_tstamp_available(RX_NORMAL_DESC)) { if (skb != NULL ) ret = DWC_ETH_QOS_get_rx_hwtstamp(pdata, skb, desc_data, qinx); if (ret == 0) { Loading @@ -3442,6 +3442,7 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( * time stamp, hence delay the packet reception */ buffer->skb = skb; if (skb != NULL) buffer->dma = dma_map_single(GET_MEM_PDEV_DEV, skb->data, pdata->rx_buffer_len, DMA_FROM_DEVICE); if (dma_mapping_error(GET_MEM_PDEV_DEV, buffer->dma)) Loading @@ -3462,8 +3463,10 @@ static int DWC_ETH_QOS_clean_split_hdr_rx_irq( #endif /* update the statistics */ dev->stats.rx_packets++; if ( skb != NULL) { dev->stats.rx_bytes += skb->len; DWC_ETH_QOS_receive_skb(pdata, dev, skb, qinx); } received++; next_desc: desc_data->dirty_rx++; Loading Loading @@ -3524,7 +3527,7 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, u16 pkt_len; UCHAR intermediate_desc_cnt = 0; unsigned int buf2_used; int ret; int ret = 0 ; DBGPR("-->DWC_ETH_QOS_clean_jumbo_rx_irq: qinx = %u, quota = %d\n", qinx, quota); Loading Loading @@ -3595,19 +3598,21 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, pdata->rx_buffer_len); } else { /* this is the middle of a chain */ if (desc_data->skb_top != NULL) { skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page, 0, pdata->rx_buffer_len); DBGPR("RX: pkt in second buffer pointer\n"); skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page2, 0, pdata->rx_buffer_len); } /* re-use this skb, as consumed only the page */ buffer->skb = skb; } if (desc_data->skb_top != NULL ) DWC_ETH_QOS_consume_page(buffer, desc_data->skb_top, (pdata->rx_buffer_len * 2), Loading @@ -3619,18 +3624,20 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, pkt_len = (pkt_len - (pdata->rx_buffer_len * intermediate_desc_cnt)); if (pkt_len > pdata->rx_buffer_len) { if (desc_data->skb_top != NULL) { skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page, 0, pdata->rx_buffer_len); DBGPR("RX: pkt in second buffer pointer\n"); skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page2, 0, (pkt_len - pdata->rx_buffer_len)); } buf2_used = 1; } else { if (desc_data->skb_top != NULL) skb_fill_page_desc(desc_data->skb_top, skb_shinfo(desc_data->skb_top)->nr_frags, buffer->page, 0, Loading @@ -3639,8 +3646,10 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, } /* re-use this skb, as consumed only the page */ buffer->skb = skb; if (desc_data->skb_top != NULL) skb = desc_data->skb_top; desc_data->skb_top = NULL; if (skb != NULL) DWC_ETH_QOS_consume_page(buffer, skb, pkt_len, buf2_used); Loading Loading @@ -3691,11 +3700,13 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, intermediate_desc_cnt = 0; } if (skb != NULL) { DWC_ETH_QOS_config_rx_csum(pdata, skb, RX_NORMAL_DESC); #ifdef DWC_ETH_QOS_ENABLE_VLAN_TAG DWC_ETH_QOS_get_rx_vlan(pdata, skb, RX_NORMAL_DESC); #endif } #ifdef YDEBUG_FILTER DWC_ETH_QOS_check_rx_filter_status(RX_NORMAL_DESC); Loading @@ -3704,15 +3715,16 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, if ((pdata->hw_feat.tsstssel) && (pdata->hwts_rx_en)) { /* get rx tstamp if available */ if (hw_if->rx_tstamp_available(RX_NORMAL_DESC)) { ret = DWC_ETH_QOS_get_rx_hwtstamp(pdata, skb, desc_data, qinx); if (skb != NULL) ret = DWC_ETH_QOS_get_rx_hwtstamp(pdata, skb, desc_data, qinx); if (ret == 0) { /* device has not yet updated the CONTEXT desc to hold the * time stamp, hence delay the packet reception */ buffer->skb = skb; buffer->dma = dma_map_single(GET_MEM_PDEV_DEV, skb->data, pdata->rx_buffer_len, DMA_FROM_DEVICE); if (skb != NULL) buffer->dma = dma_map_single(GET_MEM_PDEV_DEV, skb->data, pdata->rx_buffer_len, DMA_FROM_DEVICE); if (dma_mapping_error(GET_MEM_PDEV_DEV, buffer->dma)) dev_alert(&pdata->pdev->dev, "failed to do the RX dma map\n"); Loading @@ -3732,16 +3744,16 @@ static int DWC_ETH_QOS_clean_jumbo_rx_irq(struct DWC_ETH_QOS_prv_data *pdata, #endif /* update the statistics */ dev->stats.rx_packets++; if (skb != NULL) { dev->stats.rx_bytes += skb->len; /* eth type trans needs skb->data to point to something */ if (!pskb_may_pull(skb, ETH_HLEN)) { dev_alert(&pdata->pdev->dev, "pskb_may_pull failed\n"); dev_kfree_skb_any(skb); goto next_desc; } DWC_ETH_QOS_receive_skb(pdata, dev, skb, qinx); } received++; next_desc: desc_data->dirty_rx++; Loading
drivers/emac-dwc-eqos/DWC_ETH_QOS_ipa.c +3 −3 Original line number Diff line number Diff line Loading @@ -525,7 +525,7 @@ static int DWC_ETH_QOS_ipa_offload_resume(struct DWC_ETH_QOS_prv_data *pdata) static int DWC_ETH_QOS_ipa_ready(struct DWC_ETH_QOS_prv_data *pdata) { int ret; int ret = 0 ; EMACDBG("Enter \n"); Loading Loading @@ -960,8 +960,8 @@ static int DWC_ETH_QOS_ipa_offload_connect(struct DWC_ETH_QOS_prv_data *pdata) struct DWC_ETH_QOS_prv_ipa_data *ntn_ipa = &pdata->prv_ipa; struct ipa_uc_offload_conn_in_params in; struct ipa_uc_offload_conn_out_params out; struct ipa_ntn_setup_info rx_setup_info; struct ipa_ntn_setup_info tx_setup_info; struct ipa_ntn_setup_info rx_setup_info = {0}; struct ipa_ntn_setup_info tx_setup_info = {0}; struct ipa_perf_profile profile; int ret = 0; int i = 0; Loading
drivers/emac-dwc-eqos/DWC_ETH_QOS_platform.c +1 −1 Original line number Diff line number Diff line Loading @@ -969,7 +969,7 @@ int DWC_ETH_QOS_qmp_mailbox_init(struct DWC_ETH_QOS_prv_data *pdata) pdata->qmp_mbox_client = devm_kzalloc( &pdata->pdev->dev, sizeof(*pdata->qmp_mbox_client), GFP_KERNEL); if (IS_ERR(pdata->qmp_mbox_client)){ if (pdata->qmp_mbox_client == NULL || IS_ERR(pdata->qmp_mbox_client)){ EMACERR("qmp alloc client failed\n"); return -1; } Loading