From: Mark Einon Date: Mon, 29 Aug 2011 17:42:40 +0000 (+0100) Subject: staging: et131x: Remove module_param et131x_speed_set X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fca7737f5c4bdf11f5a62bf7d79c9c60f15ceaff;p=mv-sheeva.git staging: et131x: Remove module_param et131x_speed_set Manual setting of speed/duplex will be achieved using ethtool. Remove the driver specific module_param that also does this. Signed-off-by: Mark Einon Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c index 813a72ffa9d..a184ac1669e 100644 --- a/drivers/staging/et131x/et131x_initpci.c +++ b/drivers/staging/et131x/et131x_initpci.c @@ -1,6 +1,6 @@ /* * Agere Systems Inc. - * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs + * 10/100/1000 Base-T Ethernet Driver for the ET1310 and ET131x series MACs * * Copyright © 2005 Agere Systems Inc. * All rights reserved. @@ -97,30 +97,6 @@ #define INTERNAL_MEM_SIZE 0x400 /* 1024 of internal memory */ #define INTERNAL_MEM_RX_OFFSET 0x1FF /* 50% Tx, 50% Rx */ -/* Defines for Parameter Default/Min/Max vaules */ -#define PARM_SPEED_DUPLEX_MIN 0 -#define PARM_SPEED_DUPLEX_MAX 5 - -/* Module parameter for manual speed setting - * Set Link speed and dublex manually (0-5) [0] - * 1 : 10Mb Half-Duplex - * 2 : 10Mb Full-Duplex - * 3 : 100Mb Half-Duplex - * 4 : 100Mb Full-Duplex - * 5 : 1000Mb Full-Duplex - * 0 : Auto Speed Auto Duplex // default - */ -static u32 et131x_speed_set; -module_param(et131x_speed_set, uint, 0); -MODULE_PARM_DESC(et131x_speed_set, - "Set Link speed and dublex manually (0-5) [0]\n" - "1 : 10Mb Half-Duplex\n" - "2 : 10Mb Full-Duplex\n" - "3 : 100Mb Half-Duplex\n" - "4 : 100Mb Full-Duplex\n" - "5 : 1000Mb Full-Duplex\n" - "0 : Auto Speed Auto Dublex"); - /** * et131x_hwaddr_init - set up the MAC Address on the ET1310 * @adapter: pointer to our private adapter structure @@ -531,29 +507,12 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev, spin_lock_init(&adapter->fbr_lock); spin_lock_init(&adapter->phy_lock); - /* Parse configuration parameters into the private adapter struct */ - if (et131x_speed_set) - dev_info(&adapter->pdev->dev, - "Speed set manually to : %d\n", et131x_speed_set); - - adapter->speed_duplex = et131x_speed_set; + adapter->speed_duplex = 0; /* Auto Speed Auto Duplex */ adapter->registry_jumbo_packet = 1514; /* 1514-9216 */ /* Set the MAC address to a default */ memcpy(adapter->addr, default_mac, ETH_ALEN); - /* Decode speed_duplex - * - * Set up as if we are auto negotiating always and then change if we - * go into force mode - * - * If we are the 10/100 device, and gigabit is somehow requested then - * knock it down to 100 full. - */ - if (adapter->pdev->device == ET131X_PCI_DEVICE_ID_FAST && - adapter->speed_duplex == 5) - adapter->speed_duplex = 4; - adapter->ai_force_speed = speed[adapter->speed_duplex]; adapter->ai_force_duplex = duplex[adapter->speed_duplex]; /* Auto FDX */ @@ -790,11 +749,6 @@ static struct pci_driver et131x_driver = { */ static int __init et131x_init_module(void) { - if (et131x_speed_set < PARM_SPEED_DUPLEX_MIN || - et131x_speed_set > PARM_SPEED_DUPLEX_MAX) { - printk(KERN_WARNING "et131x: invalid speed setting ignored.\n"); - et131x_speed_set = 0; - } return pci_register_driver(&et131x_driver); }