aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qla3xxx.c
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2007-02-26 14:06:36 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-27 04:21:44 -0500
commitcb8bac12ec92ec469ecfe0967429bf9032f835c1 (patch)
tree9114d79c982706b567d6f8bdf7e5d1a72d1f2c6f /drivers/net/qla3xxx.c
parent04f10773535248466455ae80c1eedeb205c81e9a (diff)
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>
Diffstat (limited to 'drivers/net/qla3xxx.c')
-rwxr-xr-xdrivers/net/qla3xxx.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index df18aada17a7..c25a1f728715 100755
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3354,27 +3354,6 @@ static struct net_device_stats *ql3xxx_get_stats(struct net_device *dev)
3354 return &qdev->stats; 3354 return &qdev->stats;
3355} 3355}
3356 3356
3357static 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
3378static void ql3xxx_set_multicast_list(struct net_device *ndev) 3357static void ql3xxx_set_multicast_list(struct net_device *ndev)
3379{ 3358{
3380 /* 3359 /*
@@ -3666,7 +3645,6 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
3666 ndev->hard_start_xmit = ql3xxx_send; 3645 ndev->hard_start_xmit = ql3xxx_send;
3667 ndev->stop = ql3xxx_close; 3646 ndev->stop = ql3xxx_close;
3668 ndev->get_stats = ql3xxx_get_stats; 3647 ndev->get_stats = ql3xxx_get_stats;
3669 ndev->change_mtu = ql3xxx_change_mtu;
3670 ndev->set_multicast_list = ql3xxx_set_multicast_list; 3648 ndev->set_multicast_list = ql3xxx_set_multicast_list;
3671 SET_ETHTOOL_OPS(ndev, &ql3xxx_ethtool_ops); 3649 SET_ETHTOOL_OPS(ndev, &ql3xxx_ethtool_ops);
3672 ndev->set_mac_address = ql3xxx_set_mac_address; 3650 ndev->set_mac_address = ql3xxx_set_mac_address;
@@ -3691,9 +3669,11 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
3691 3669
3692 /* Validate and set parameters */ 3670 /* Validate and set parameters */
3693 if (qdev->mac_index) { 3671 if (qdev->mac_index) {
3672 ndev->mtu = qdev->nvram_data.macCfg_port1.etherMtu_mac ;
3694 memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn2.macAddress, 3673 memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn2.macAddress,
3695 ETH_ALEN); 3674 ETH_ALEN);
3696 } else { 3675 } else {
3676 ndev->mtu = qdev->nvram_data.macCfg_port0.etherMtu_mac ;
3697 memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn0.macAddress, 3677 memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn0.macAddress,
3698 ETH_ALEN); 3678 ETH_ALEN);
3699 } 3679 }