aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorFugang Duan <b38611@freescale.com>2014-07-09 04:52:04 -0400
committerFugang Duan <b38611@freescale.com>2014-07-10 03:45:33 -0400
commita00ea708bece559aec4daaba721597366f1b9efd (patch)
treee9818717aff94fea6345d769341b1147ad16940f /drivers/net
parentbf43cf9c6c56da8862a2b2cdd461f78cd80632b8 (diff)
ENGR00322047 net: fec: set ftype for AVB bandwidth reservation
Set the related ftype field for each queue for AVB bandwidth reservation. Signed-off-by: Fugang Duan <B38611@freescale.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 853b19f0e613..d26d8ae98148 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -389,6 +389,8 @@ static int fec_enet_txq_submit_frag_skb(struct fec_enet_priv_tx_q *txq,
389 } 389 }
390 390
391 if (fep->bufdesc_ex) { 391 if (fep->bufdesc_ex) {
392 if (id_entry->driver_data & FEC_QUIRK_HAS_AVB)
393 estatus |= FEC_TX_BD_FTYPE(queue);
392 if (skb->ip_summed == CHECKSUM_PARTIAL) 394 if (skb->ip_summed == CHECKSUM_PARTIAL)
393 estatus |= BD_ENET_TX_PINS | BD_ENET_TX_IINS; 395 estatus |= BD_ENET_TX_PINS | BD_ENET_TX_IINS;
394 ebdp->cbd_bdu = 0; 396 ebdp->cbd_bdu = 0;
@@ -524,6 +526,9 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq,
524 fec_ptp_do_txstamp(skb))) 526 fec_ptp_do_txstamp(skb)))
525 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS; 527 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
526 528
529 if (id_entry->driver_data & FEC_QUIRK_HAS_AVB)
530 estatus |= FEC_TX_BD_FTYPE(queue);
531
527 if (skb->ip_summed == CHECKSUM_PARTIAL) 532 if (skb->ip_summed == CHECKSUM_PARTIAL)
528 estatus |= BD_ENET_TX_PINS | BD_ENET_TX_IINS; 533 estatus |= BD_ENET_TX_PINS | BD_ENET_TX_IINS;
529 534
@@ -576,6 +581,7 @@ fec_enet_txq_put_data_tso(struct fec_enet_priv_tx_q *txq, struct sk_buff *skb,
576 const struct platform_device_id *id_entry = 581 const struct platform_device_id *id_entry =
577 platform_get_device_id(fep->pdev); 582 platform_get_device_id(fep->pdev);
578 struct bufdesc_ex *ebdp = (struct bufdesc_ex *)bdp; 583 struct bufdesc_ex *ebdp = (struct bufdesc_ex *)bdp;
584 unsigned short queue = skb_get_queue_mapping(skb);
579 unsigned short status; 585 unsigned short status;
580 unsigned int estatus = 0; 586 unsigned int estatus = 0;
581 587
@@ -605,6 +611,8 @@ fec_enet_txq_put_data_tso(struct fec_enet_priv_tx_q *txq, struct sk_buff *skb,
605 } 611 }
606 612
607 if (fep->bufdesc_ex) { 613 if (fep->bufdesc_ex) {
614 if (id_entry->driver_data & FEC_QUIRK_HAS_AVB)
615 estatus |= FEC_TX_BD_FTYPE(queue);
608 if (skb->ip_summed == CHECKSUM_PARTIAL) 616 if (skb->ip_summed == CHECKSUM_PARTIAL)
609 estatus |= BD_ENET_TX_PINS | BD_ENET_TX_IINS; 617 estatus |= BD_ENET_TX_PINS | BD_ENET_TX_IINS;
610 ebdp->cbd_bdu = 0; 618 ebdp->cbd_bdu = 0;
@@ -634,6 +642,7 @@ fec_enet_txq_put_hdr_tso(struct fec_enet_priv_tx_q *txq, struct sk_buff *skb,
634 platform_get_device_id(fep->pdev); 642 platform_get_device_id(fep->pdev);
635 int hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); 643 int hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
636 struct bufdesc_ex *ebdp = (struct bufdesc_ex *)bdp; 644 struct bufdesc_ex *ebdp = (struct bufdesc_ex *)bdp;
645 unsigned short queue = skb_get_queue_mapping(skb);
637 void *bufaddr; 646 void *bufaddr;
638 unsigned long dmabuf; 647 unsigned long dmabuf;
639 unsigned short status; 648 unsigned short status;
@@ -668,6 +677,8 @@ fec_enet_txq_put_hdr_tso(struct fec_enet_priv_tx_q *txq, struct sk_buff *skb,
668 bdp->cbd_datlen = hdr_len; 677 bdp->cbd_datlen = hdr_len;
669 678
670 if (fep->bufdesc_ex) { 679 if (fep->bufdesc_ex) {
680 if (id_entry->driver_data & FEC_QUIRK_HAS_AVB)
681 estatus |= FEC_TX_BD_FTYPE(queue);
671 if (skb->ip_summed == CHECKSUM_PARTIAL) 682 if (skb->ip_summed == CHECKSUM_PARTIAL)
672 estatus |= BD_ENET_TX_PINS | BD_ENET_TX_IINS; 683 estatus |= BD_ENET_TX_PINS | BD_ENET_TX_IINS;
673 ebdp->cbd_bdu = 0; 684 ebdp->cbd_bdu = 0;