Mon, Apr 11, 2016 at 10:10:46AM CEST, izumi.t...@jp.fujitsu.com wrote:
>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.t...@jp.fujitsu.com>

<snip>  
        
>@@ -793,19 +798,54 @@ static int fjes_change_mtu(struct net_device *netdev, 
>int new_mtu)
>                       if (new_mtu == netdev->mtu)
>                               return 0;
> 
>-                      if (running)
>-                              fjes_close(netdev);
>+                      ret = 0;
>+                      break;
>+              }
>+      }
>+
>+      if (ret)
>+              return ret;
> 
>-                      netdev->mtu = new_mtu;
>+      if (running) {
>+              for (epidx = 0; epidx < hw->max_epid; epidx++) {
>+                      if (epidx == hw->my_epid)
>+                              continue;
>+                      hw->ep_shm_info[epidx].tx.info->v1i.rx_status &=
>+                              ~FJES_RX_MTU_CHANGING_DONE;
>+              }
>+              netif_tx_stop_all_queues(netdev);
>+              netif_carrier_off(netdev);
>+              cancel_work_sync(&adapter->tx_stall_task);
>+              napi_disable(&adapter->napi);
> 
>-                      if (running)
>-                              ret = fjes_open(netdev);
>+              msleep(1000);

Will it be enough? I would rather sleep 2000ms here, just to be sure :)

Reply via email to