Skip to content

Commit

Permalink
staging: et131x: Remove module_param et131x_speed_set
Browse files Browse the repository at this point in the history
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 <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mark Einon authored and Greg Kroah-Hartman committed Aug 29, 2011
1 parent 694bd60 commit fca7737
Showing 1 changed file with 2 additions and 48 deletions.
50 changes: 2 additions & 48 deletions drivers/staging/et131x/et131x_initpci.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 */

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit fca7737

Please sign in to comment.