|
@@ -661,31 +661,6 @@ static int bnx2fc_shost_config(struct fc_lport *lport, struct device *dev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static int bnx2fc_mfs_update(struct fc_lport *lport)
|
|
|
-{
|
|
|
- struct fcoe_port *port = lport_priv(lport);
|
|
|
- struct bnx2fc_hba *hba = port->priv;
|
|
|
- struct net_device *netdev = hba->netdev;
|
|
|
- u32 mfs;
|
|
|
- u32 max_mfs;
|
|
|
-
|
|
|
- mfs = netdev->mtu - (sizeof(struct fcoe_hdr) +
|
|
|
- sizeof(struct fcoe_crc_eof));
|
|
|
- max_mfs = BNX2FC_MAX_PAYLOAD + sizeof(struct fc_frame_header);
|
|
|
- BNX2FC_HBA_DBG(lport, "mfs = %d, max_mfs = %d\n", mfs, max_mfs);
|
|
|
- if (mfs > max_mfs)
|
|
|
- mfs = max_mfs;
|
|
|
-
|
|
|
- /* Adjust mfs to be a multiple of 256 bytes */
|
|
|
- mfs = (((mfs - sizeof(struct fc_frame_header)) / BNX2FC_MIN_PAYLOAD) *
|
|
|
- BNX2FC_MIN_PAYLOAD);
|
|
|
- mfs = mfs + sizeof(struct fc_frame_header);
|
|
|
-
|
|
|
- BNX2FC_HBA_DBG(lport, "Set MFS = %d\n", mfs);
|
|
|
- if (fc_set_mfs(lport, mfs))
|
|
|
- return -EINVAL;
|
|
|
- return 0;
|
|
|
-}
|
|
|
static void bnx2fc_link_speed_update(struct fc_lport *lport)
|
|
|
{
|
|
|
struct fcoe_port *port = lport_priv(lport);
|
|
@@ -754,7 +729,7 @@ static int bnx2fc_net_config(struct fc_lport *lport)
|
|
|
!hba->phys_dev->ethtool_ops->get_pauseparam)
|
|
|
return -EOPNOTSUPP;
|
|
|
|
|
|
- if (bnx2fc_mfs_update(lport))
|
|
|
+ if (fc_set_mfs(lport, BNX2FC_MFS))
|
|
|
return -EINVAL;
|
|
|
|
|
|
skb_queue_head_init(&port->fcoe_pending_queue);
|
|
@@ -825,14 +800,6 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event)
|
|
|
if (!test_bit(ADAPTER_STATE_UP, &hba->adapter_state))
|
|
|
printk(KERN_ERR "indicate_netevent: "\
|
|
|
"adapter is not UP!!\n");
|
|
|
- /* fall thru to update mfs if MTU has changed */
|
|
|
- case NETDEV_CHANGEMTU:
|
|
|
- BNX2FC_HBA_DBG(lport, "NETDEV_CHANGEMTU event\n");
|
|
|
- bnx2fc_mfs_update(lport);
|
|
|
- mutex_lock(&lport->lp_mutex);
|
|
|
- list_for_each_entry(vport, &lport->vports, list)
|
|
|
- bnx2fc_mfs_update(vport);
|
|
|
- mutex_unlock(&lport->lp_mutex);
|
|
|
break;
|
|
|
|
|
|
case NETDEV_DOWN:
|