netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ron Mercer <ron.mercer@qlogic.com>
To: jeff@garzik.org
Cc: ron.mercer@qlogic.com, romieu@fr.zoreil.com,
	benjamin.li@qlogic.com, netdev@vger.kernel.org
Subject: [PATCH 06/13] qla3xxx: Remove API to change MTU.
Date: Mon, 26 Feb 2007 11:06:36 -0800	[thread overview]
Message-ID: <11725168032636-git-send-email-ron.mercer@qlogic.com> (raw)
In-Reply-To: <20070226190450.GA7325@linux-7mw0.qlogic.org>

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>
---
 drivers/net/qla3xxx.c |   24 ++----------------------
 1 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 59cebd6..b86cef0 100755
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3372,27 +3372,6 @@ static struct net_device_stats *ql3xxx_get_stats(struct net_device *dev)
 	return &qdev->stats;
 }
 
-static int ql3xxx_change_mtu(struct net_device *ndev, int new_mtu)
-{
-	struct ql3_adapter *qdev = netdev_priv(ndev);
-	printk(KERN_ERR PFX "%s:  new mtu size = %d.\n", ndev->name, new_mtu);
-	if (new_mtu != NORMAL_MTU_SIZE && new_mtu != JUMBO_MTU_SIZE) {
-		printk(KERN_ERR PFX
-		       "%s: mtu size of %d is not valid.  Use exactly %d or "
-		       "%d.\n", ndev->name, new_mtu, NORMAL_MTU_SIZE,
-		       JUMBO_MTU_SIZE);
-		return -EINVAL;
-	}
-
-	if (!netif_running(ndev)) {
-		ndev->mtu = new_mtu;
-		return 0;
-	}
-
-	ndev->mtu = new_mtu;
-	return ql_cycle_adapter(qdev,QL_DO_RESET);
-}
-
 static void ql3xxx_set_multicast_list(struct net_device *ndev)
 {
 	/*
@@ -3684,7 +3663,6 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
 	ndev->hard_start_xmit = ql3xxx_send;
 	ndev->stop = ql3xxx_close;
 	ndev->get_stats = ql3xxx_get_stats;
-	ndev->change_mtu = ql3xxx_change_mtu;
 	ndev->set_multicast_list = ql3xxx_set_multicast_list;
 	SET_ETHTOOL_OPS(ndev, &ql3xxx_ethtool_ops);
 	ndev->set_mac_address = ql3xxx_set_mac_address;
@@ -3709,9 +3687,11 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
 
 	/* Validate and set parameters */
 	if (qdev->mac_index) {
+		ndev->mtu = qdev->nvram_data.macCfg_port1.etherMtu_mac ;
 		memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn2.macAddress,
 		       ETH_ALEN);
 	} else {
+		ndev->mtu = qdev->nvram_data.macCfg_port0.etherMtu_mac ;
 		memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn0.macAddress,
 		       ETH_ALEN);
 	}
-- 
1.5.0.rc4.16.g9e258


  parent reply	other threads:[~2007-02-26 19:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26 19:04 [PATCH 0/13] qla3xxx: bugfixes and cleanup after IBM/Redhat testing Ron Mercer
2007-02-26 19:06 ` [PATCH 01/13] qla3xxx: Return proper error codes when the 4022/4032 is being probed Ron Mercer
2007-02-27  9:22   ` Jeff Garzik
2007-03-01  0:48     ` [PATCH] qla3xxx: bugfix for line omitted in previous patch Ron Mercer
2007-03-03  1:17       ` Jeff Garzik
2007-02-26 19:06 ` [PATCH 02/13] qla3xxx: Remove unnecessary memset() in qla3xxx_send() Ron Mercer
2007-02-26 19:06 ` [PATCH 03/13] qla3xxx: Changed to use netdev_alloc_skb() from dev_alloc_skb Ron Mercer
2007-02-26 19:06 ` [PATCH 04/13] qla3xxx: Add ethtool functionality to report pause parameters Ron Mercer
2007-02-26 19:06 ` [PATCH 05/13] qla3xxx: Fix deadlock issue on error paths Ron Mercer
2007-02-26 19:06 ` Ron Mercer [this message]
2007-02-26 19:06 ` [PATCH 07/13] qla3xxx: Dynamically size the rx buffer queue based on the MTU Ron Mercer
2007-02-26 19:06 ` [PATCH 08/13] qla3xxx: Clean up receive process Ron Mercer
2007-02-26 19:06 ` [PATCH 09/13] qla3xxx: bugfix: Fixed jumbo frame handling for 3032 chip Ron Mercer
2007-02-26 19:06 ` [PATCH 10/13] qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue(), ql_alloc_large_buffers(), and ql3xxx_send() Ron Mercer
2007-02-26 19:06 ` [PATCH 11/13] qla3xxx: bugfix tx reset after stress conditions Ron Mercer
2007-02-26 19:06 ` [PATCH 12/13] qla3xxx: Kernic Panic on pSeries under " Ron Mercer
2007-02-26 19:06 ` [PATCH 13/13] qla3xxx: Bumping driver version number Ron Mercer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11725168032636-git-send-email-ron.mercer@qlogic.com \
    --to=ron.mercer@qlogic.com \
    --cc=benjamin.li@qlogic.com \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).