diff options
author | Taku Izumi <izumi.taku@jp.fujitsu.com> | 2016-04-15 11:25:40 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-16 21:51:01 -0400 |
commit | 16bbec3a50efec46b679c3408c8be09f09dbcb7e (patch) | |
tree | 6d88a0df0e561aa52c2a9f18a747e6253e900fd9 /drivers/net/fjes/fjes_hw.c | |
parent | 19a0a7fd55af4658414de955f401cddaffc1f0ba (diff) | |
download | op-kernel-dev-16bbec3a50efec46b679c3408c8be09f09dbcb7e.zip op-kernel-dev-16bbec3a50efec46b679c3408c8be09f09dbcb7e.tar.gz |
fjes: Enhance changing MTU related work
This patch enhances the fjes_change_mtu() method
by introducing new flag named FJES_RX_MTU_CHANGING_DONE
in rx_status. At the same time, default MTU value is
changed into 65510 bytes.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fjes/fjes_hw.c')
-rw-r--r-- | drivers/net/fjes/fjes_hw.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/fjes/fjes_hw.c b/drivers/net/fjes/fjes_hw.c index b103adb..e9f494b 100644 --- a/drivers/net/fjes/fjes_hw.c +++ b/drivers/net/fjes/fjes_hw.c @@ -179,6 +179,8 @@ void fjes_hw_setup_epbuf(struct epbuf_handler *epbh, u8 *mac_addr, u32 mtu) for (i = 0; i < EP_BUFFER_SUPPORT_VLAN_MAX; i++) info->v1i.vlan_id[i] = vlan_id[i]; + + info->v1i.rx_status |= FJES_RX_MTU_CHANGING_DONE; } void @@ -810,7 +812,8 @@ bool fjes_hw_check_mtu(struct epbuf_handler *epbh, u32 mtu) { union ep_buffer_info *info = epbh->info; - return (info->v1i.frame_max == FJES_MTU_TO_FRAME_SIZE(mtu)); + return ((info->v1i.frame_max == FJES_MTU_TO_FRAME_SIZE(mtu)) && + info->v1i.rx_status & FJES_RX_MTU_CHANGING_DONE); } bool fjes_hw_check_vlan_id(struct epbuf_handler *epbh, u16 vlan_id) @@ -863,6 +866,9 @@ bool fjes_hw_epbuf_rx_is_empty(struct epbuf_handler *epbh) { union ep_buffer_info *info = epbh->info; + if (!(info->v1i.rx_status & FJES_RX_MTU_CHANGING_DONE)) + return true; + if (info->v1i.count_max == 0) return true; |