diff options
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.c')
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 8702c8d728d..c66b9fa7d67 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -439,8 +439,12 @@ static int fcoe_netdev_config(struct fc_lport *lp, struct net_device *netdev) | |||
439 | * user-configured limit. If the MFS is too low, fcoe_link_ok() | 439 | * user-configured limit. If the MFS is too low, fcoe_link_ok() |
440 | * will return 0, so do this first. | 440 | * will return 0, so do this first. |
441 | */ | 441 | */ |
442 | mfs = netdev->mtu - (sizeof(struct fcoe_hdr) + | 442 | mfs = netdev->mtu; |
443 | sizeof(struct fcoe_crc_eof)); | 443 | if (netdev->features & NETIF_F_FCOE_MTU) { |
444 | mfs = FCOE_MTU; | ||
445 | FCOE_NETDEV_DBG(netdev, "Supports FCOE_MTU of %d bytes\n", mfs); | ||
446 | } | ||
447 | mfs -= (sizeof(struct fcoe_hdr) + sizeof(struct fcoe_crc_eof)); | ||
444 | if (fc_set_mfs(lp, mfs)) | 448 | if (fc_set_mfs(lp, mfs)) |
445 | return -EINVAL; | 449 | return -EINVAL; |
446 | 450 | ||
@@ -1570,6 +1574,8 @@ static int fcoe_device_notification(struct notifier_block *notifier, | |||
1570 | case NETDEV_CHANGE: | 1574 | case NETDEV_CHANGE: |
1571 | break; | 1575 | break; |
1572 | case NETDEV_CHANGEMTU: | 1576 | case NETDEV_CHANGEMTU: |
1577 | if (netdev->features & NETIF_F_FCOE_MTU) | ||
1578 | break; | ||
1573 | mfs = netdev->mtu - (sizeof(struct fcoe_hdr) + | 1579 | mfs = netdev->mtu - (sizeof(struct fcoe_hdr) + |
1574 | sizeof(struct fcoe_crc_eof)); | 1580 | sizeof(struct fcoe_crc_eof)); |
1575 | if (mfs >= FC_MIN_MAX_FRAME) | 1581 | if (mfs >= FC_MIN_MAX_FRAME) |