|
@@ -439,8 +439,12 @@ static int fcoe_netdev_config(struct fc_lport *lp, struct net_device *netdev)
|
|
|
* user-configured limit. If the MFS is too low, fcoe_link_ok()
|
|
|
* will return 0, so do this first.
|
|
|
*/
|
|
|
- mfs = netdev->mtu - (sizeof(struct fcoe_hdr) +
|
|
|
- sizeof(struct fcoe_crc_eof));
|
|
|
+ mfs = netdev->mtu;
|
|
|
+ if (netdev->features & NETIF_F_FCOE_MTU) {
|
|
|
+ mfs = FCOE_MTU;
|
|
|
+ FCOE_NETDEV_DBG(netdev, "Supports FCOE_MTU of %d bytes\n", mfs);
|
|
|
+ }
|
|
|
+ mfs -= (sizeof(struct fcoe_hdr) + sizeof(struct fcoe_crc_eof));
|
|
|
if (fc_set_mfs(lp, mfs))
|
|
|
return -EINVAL;
|
|
|
|
|
@@ -1570,6 +1574,8 @@ static int fcoe_device_notification(struct notifier_block *notifier,
|
|
|
case NETDEV_CHANGE:
|
|
|
break;
|
|
|
case NETDEV_CHANGEMTU:
|
|
|
+ if (netdev->features & NETIF_F_FCOE_MTU)
|
|
|
+ break;
|
|
|
mfs = netdev->mtu - (sizeof(struct fcoe_hdr) +
|
|
|
sizeof(struct fcoe_crc_eof));
|
|
|
if (mfs >= FC_MIN_MAX_FRAME)
|