diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2012-03-13 14:22:18 -0400 |
---|---|---|
committer | Francois Romieu <romieu@fr.zoreil.com> | 2012-04-07 05:45:26 -0400 |
commit | 2d5fb6283cb921a1f66454f8a603aaa973cbc24b (patch) | |
tree | 661d7a7f62052c3306c9ddcab2f88fae75f7725c | |
parent | ea8f2ed0f1b943e499e760feced4038f95b2b71f (diff) |
starfire: remove deprecated options.
Some settings are duplicated between ethtool link management and module
options. The latter is trimmed. The half duplex, speed and autonegotiation
defaults are kept unchanged.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ion Badulescu <ionut@badula.org>
-rw-r--r-- | drivers/net/ethernet/adaptec/starfire.c | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/drivers/net/ethernet/adaptec/starfire.c b/drivers/net/ethernet/adaptec/starfire.c index 4f27bff32d18..d920a529ba22 100644 --- a/drivers/net/ethernet/adaptec/starfire.c +++ b/drivers/net/ethernet/adaptec/starfire.c | |||
@@ -114,15 +114,6 @@ static int rx_copybreak /* = 0 */; | |||
114 | #define DMA_BURST_SIZE 128 | 114 | #define DMA_BURST_SIZE 128 |
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | /* Used to pass the media type, etc. | ||
118 | Both 'options[]' and 'full_duplex[]' exist for driver interoperability. | ||
119 | The media type is usually passed in 'options[]'. | ||
120 | These variables are deprecated, use ethtool instead. -Ion | ||
121 | */ | ||
122 | #define MAX_UNITS 8 /* More are supported, limit only on options */ | ||
123 | static int options[MAX_UNITS] = {0, }; | ||
124 | static int full_duplex[MAX_UNITS] = {0, }; | ||
125 | |||
126 | /* Operational parameters that are set at compile time. */ | 117 | /* Operational parameters that are set at compile time. */ |
127 | 118 | ||
128 | /* The "native" ring sizes are either 256 or 2048. | 119 | /* The "native" ring sizes are either 256 or 2048. |
@@ -192,8 +183,6 @@ module_param(debug, int, 0); | |||
192 | module_param(rx_copybreak, int, 0); | 183 | module_param(rx_copybreak, int, 0); |
193 | module_param(intr_latency, int, 0); | 184 | module_param(intr_latency, int, 0); |
194 | module_param(small_frames, int, 0); | 185 | module_param(small_frames, int, 0); |
195 | module_param_array(options, int, NULL, 0); | ||
196 | module_param_array(full_duplex, int, NULL, 0); | ||
197 | module_param(enable_hw_cksum, int, 0); | 186 | module_param(enable_hw_cksum, int, 0); |
198 | MODULE_PARM_DESC(max_interrupt_work, "Maximum events handled per interrupt"); | 187 | MODULE_PARM_DESC(max_interrupt_work, "Maximum events handled per interrupt"); |
199 | MODULE_PARM_DESC(mtu, "MTU (all boards)"); | 188 | MODULE_PARM_DESC(mtu, "MTU (all boards)"); |
@@ -201,8 +190,6 @@ MODULE_PARM_DESC(debug, "Debug level (0-6)"); | |||
201 | MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames"); | 190 | MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames"); |
202 | MODULE_PARM_DESC(intr_latency, "Maximum interrupt latency, in microseconds"); | 191 | MODULE_PARM_DESC(intr_latency, "Maximum interrupt latency, in microseconds"); |
203 | MODULE_PARM_DESC(small_frames, "Maximum size of receive frames that bypass interrupt latency (0,64,128,256,512)"); | 192 | MODULE_PARM_DESC(small_frames, "Maximum size of receive frames that bypass interrupt latency (0,64,128,256,512)"); |
204 | MODULE_PARM_DESC(options, "Deprecated: Bits 0-3: media type, bit 17: full duplex"); | ||
205 | MODULE_PARM_DESC(full_duplex, "Deprecated: Forced full-duplex setting (0/1)"); | ||
206 | MODULE_PARM_DESC(enable_hw_cksum, "Enable/disable hardware cksum support (0/1)"); | 193 | MODULE_PARM_DESC(enable_hw_cksum, "Enable/disable hardware cksum support (0/1)"); |
207 | 194 | ||
208 | /* | 195 | /* |
@@ -657,10 +644,10 @@ static const struct net_device_ops netdev_ops = { | |||
657 | static int __devinit starfire_init_one(struct pci_dev *pdev, | 644 | static int __devinit starfire_init_one(struct pci_dev *pdev, |
658 | const struct pci_device_id *ent) | 645 | const struct pci_device_id *ent) |
659 | { | 646 | { |
647 | struct device *d = &pdev->dev; | ||
660 | struct netdev_private *np; | 648 | struct netdev_private *np; |
661 | int i, irq, option, chip_idx = ent->driver_data; | 649 | int i, irq, chip_idx = ent->driver_data; |
662 | struct net_device *dev; | 650 | struct net_device *dev; |
663 | static int card_idx = -1; | ||
664 | long ioaddr; | 651 | long ioaddr; |
665 | void __iomem *base; | 652 | void __iomem *base; |
666 | int drv_flags, io_size; | 653 | int drv_flags, io_size; |
@@ -673,15 +660,13 @@ static int __devinit starfire_init_one(struct pci_dev *pdev, | |||
673 | printk(version); | 660 | printk(version); |
674 | #endif | 661 | #endif |
675 | 662 | ||
676 | card_idx++; | ||
677 | |||
678 | if (pci_enable_device (pdev)) | 663 | if (pci_enable_device (pdev)) |
679 | return -EIO; | 664 | return -EIO; |
680 | 665 | ||
681 | ioaddr = pci_resource_start(pdev, 0); | 666 | ioaddr = pci_resource_start(pdev, 0); |
682 | io_size = pci_resource_len(pdev, 0); | 667 | io_size = pci_resource_len(pdev, 0); |
683 | if (!ioaddr || ((pci_resource_flags(pdev, 0) & IORESOURCE_MEM) == 0)) { | 668 | if (!ioaddr || ((pci_resource_flags(pdev, 0) & IORESOURCE_MEM) == 0)) { |
684 | printk(KERN_ERR DRV_NAME " %d: no PCI MEM resources, aborting\n", card_idx); | 669 | dev_err(d, "no PCI MEM resources, aborting\n"); |
685 | return -ENODEV; | 670 | return -ENODEV; |
686 | } | 671 | } |
687 | 672 | ||
@@ -694,14 +679,14 @@ static int __devinit starfire_init_one(struct pci_dev *pdev, | |||
694 | irq = pdev->irq; | 679 | irq = pdev->irq; |
695 | 680 | ||
696 | if (pci_request_regions (pdev, DRV_NAME)) { | 681 | if (pci_request_regions (pdev, DRV_NAME)) { |
697 | printk(KERN_ERR DRV_NAME " %d: cannot reserve PCI resources, aborting\n", card_idx); | 682 | dev_err(d, "cannot reserve PCI resources, aborting\n"); |
698 | goto err_out_free_netdev; | 683 | goto err_out_free_netdev; |
699 | } | 684 | } |
700 | 685 | ||
701 | base = ioremap(ioaddr, io_size); | 686 | base = ioremap(ioaddr, io_size); |
702 | if (!base) { | 687 | if (!base) { |
703 | printk(KERN_ERR DRV_NAME " %d: cannot remap %#x @ %#lx, aborting\n", | 688 | dev_err(d, "cannot remap %#x @ %#lx, aborting\n", |
704 | card_idx, io_size, ioaddr); | 689 | io_size, ioaddr); |
705 | goto err_out_free_res; | 690 | goto err_out_free_res; |
706 | } | 691 | } |
707 | 692 | ||
@@ -769,19 +754,6 @@ static int __devinit starfire_init_one(struct pci_dev *pdev, | |||
769 | 754 | ||
770 | drv_flags = netdrv_tbl[chip_idx].drv_flags; | 755 | drv_flags = netdrv_tbl[chip_idx].drv_flags; |
771 | 756 | ||
772 | option = card_idx < MAX_UNITS ? options[card_idx] : 0; | ||
773 | |||
774 | /* The lower four bits are the media type. */ | ||
775 | if (option & 0x200) | ||
776 | np->mii_if.full_duplex = 1; | ||
777 | |||
778 | if (card_idx < MAX_UNITS && full_duplex[card_idx] > 0) | ||
779 | np->mii_if.full_duplex = 1; | ||
780 | |||
781 | if (np->mii_if.full_duplex) | ||
782 | np->mii_if.force_media = 1; | ||
783 | else | ||
784 | np->mii_if.force_media = 0; | ||
785 | np->speed100 = 1; | 757 | np->speed100 = 1; |
786 | 758 | ||
787 | /* timer resolution is 128 * 0.8us */ | 759 | /* timer resolution is 128 * 0.8us */ |