Skip to content

Commit cb8bac1

Browse files
Ron MercerJeff Garzik
authored andcommitted
qla3xxx: Remove API to change MTU.
This network device driver shares the same hardware as the qla4xxx iSCSI driver. Changing the MTU via the device interface will cause qla4xxx to crash as there is no way to make notification. Users wishing to change the MTU must do so using an iSCSI utility such as Qlogic SanSurfer. This forces the user to unload/reload this network device driver after the MTU value has been changed in flash. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
1 parent 04f1077 commit cb8bac1

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

drivers/net/qla3xxx.c

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3354,27 +3354,6 @@ static struct net_device_stats *ql3xxx_get_stats(struct net_device *dev)
33543354
return &qdev->stats;
33553355
}
33563356

3357-
static int ql3xxx_change_mtu(struct net_device *ndev, int new_mtu)
3358-
{
3359-
struct ql3_adapter *qdev = netdev_priv(ndev);
3360-
printk(KERN_ERR PFX "%s: new mtu size = %d.\n", ndev->name, new_mtu);
3361-
if (new_mtu != NORMAL_MTU_SIZE && new_mtu != JUMBO_MTU_SIZE) {
3362-
printk(KERN_ERR PFX
3363-
"%s: mtu size of %d is not valid. Use exactly %d or "
3364-
"%d.\n", ndev->name, new_mtu, NORMAL_MTU_SIZE,
3365-
JUMBO_MTU_SIZE);
3366-
return -EINVAL;
3367-
}
3368-
3369-
if (!netif_running(ndev)) {
3370-
ndev->mtu = new_mtu;
3371-
return 0;
3372-
}
3373-
3374-
ndev->mtu = new_mtu;
3375-
return ql_cycle_adapter(qdev,QL_DO_RESET);
3376-
}
3377-
33783357
static void ql3xxx_set_multicast_list(struct net_device *ndev)
33793358
{
33803359
/*
@@ -3666,7 +3645,6 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
36663645
ndev->hard_start_xmit = ql3xxx_send;
36673646
ndev->stop = ql3xxx_close;
36683647
ndev->get_stats = ql3xxx_get_stats;
3669-
ndev->change_mtu = ql3xxx_change_mtu;
36703648
ndev->set_multicast_list = ql3xxx_set_multicast_list;
36713649
SET_ETHTOOL_OPS(ndev, &ql3xxx_ethtool_ops);
36723650
ndev->set_mac_address = ql3xxx_set_mac_address;
@@ -3691,9 +3669,11 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
36913669

36923670
/* Validate and set parameters */
36933671
if (qdev->mac_index) {
3672+
ndev->mtu = qdev->nvram_data.macCfg_port1.etherMtu_mac ;
36943673
memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn2.macAddress,
36953674
ETH_ALEN);
36963675
} else {
3676+
ndev->mtu = qdev->nvram_data.macCfg_port0.etherMtu_mac ;
36973677
memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn0.macAddress,
36983678
ETH_ALEN);
36993679
}

0 commit comments

Comments
 (0)