aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/eepro100.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-24 10:15:13 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-24 10:15:13 -0700
commita319a2773a13bab56a0d0b3744ba8703324313b5 (patch)
treef02c86acabd1031439fd422a167784007e84ebb1 /drivers/net/eepro100.c
parente18fa700c9a31360bc8f193aa543b7ef7b39a06b (diff)
parent183798799216fad36c7219fe8d4d6dee6b8fa755 (diff)
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (217 commits) net/ieee80211: fix more crypto-related build breakage [PATCH] Spidernet: add ethtool -S (show statistics) [NET] GT96100: Delete bitrotting ethernet driver [PATCH] mv643xx_eth: restrict to 32-bit PPC_MULTIPLATFORM [PATCH] Cirrus Logic ep93xx ethernet driver r8169: the MMIO region of the 8167 stands behin BAR#1 e1000, ixgb: Remove pointless wrappers [PATCH] Remove powerpc specific parts of 3c509 driver [PATCH] s2io: Switch to pci_get_device [PATCH] gt96100: move to pci_get_device API [PATCH] ehea: bugfix for register access functions [PATCH] e1000 disable device on PCI error drivers/net/phy/fixed: #if 0 some incomplete code drivers/net: const-ify ethtool_ops declarations [PATCH] ethtool: allow const ethtool_ops [PATCH] sky2: big endian [PATCH] sky2: fiber support [PATCH] sky2: tx pause bug fix drivers/net: Trim trailing whitespace [PATCH] ehea: IBM eHEA Ethernet Device Driver ... Manually resolved conflicts in drivers/net/ixgb/ixgb_main.c and drivers/net/sky2.c related to CHECKSUM_HW/CHECKSUM_PARTIAL changes by commit 84fa7933a33f806bbbaae6775e87459b1ec584c0 that just happened to be next to unrelated changes in this update.
Diffstat (limited to 'drivers/net/eepro100.c')
-rw-r--r--drivers/net/eepro100.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index e445988c92e..499e93b31f5 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -494,9 +494,9 @@ static struct net_device_stats *speedo_get_stats(struct net_device *dev);
static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static void set_rx_mode(struct net_device *dev);
static void speedo_show_state(struct net_device *dev);
-static struct ethtool_ops ethtool_ops;
+static const struct ethtool_ops ethtool_ops;
+
-
#ifdef honor_default_port
/* Optional driver feature to allow forcing the transceiver setting.
@@ -646,7 +646,7 @@ static int __devinit speedo_found1(struct pci_dev *pdev,
option = 0;
rtnl_lock();
- if (dev_alloc_name(dev, dev->name) < 0)
+ if (dev_alloc_name(dev, dev->name) < 0)
goto err_free_unlock;
/* Read the station address EEPROM before doing the reset.
@@ -825,10 +825,10 @@ static int __devinit speedo_found1(struct pci_dev *pdev,
sp->mii_if.dev = dev;
sp->mii_if.mdio_read = mdio_read;
sp->mii_if.mdio_write = mdio_write;
-
+
sp->rx_bug = (eeprom[3] & 0x03) == 3 ? 0 : 1;
- if (((pdev->device > 0x1030 && (pdev->device < 0x103F)))
- || (pdev->device == 0x2449) || (pdev->device == 0x2459)
+ if (((pdev->device > 0x1030 && (pdev->device < 0x103F)))
+ || (pdev->device == 0x2449) || (pdev->device == 0x2459)
|| (pdev->device == 0x245D)) {
sp->chip_id = 1;
}
@@ -1208,7 +1208,7 @@ static void speedo_show_state(struct net_device *dev)
int i;
if (netif_msg_pktdata(sp)) {
- printk(KERN_DEBUG "%s: Tx ring dump, Tx queue %u / %u:\n",
+ printk(KERN_DEBUG "%s: Tx ring dump, Tx queue %u / %u:\n",
dev->name, sp->cur_tx, sp->dirty_tx);
for (i = 0; i < TX_RING_SIZE; i++)
printk(KERN_DEBUG "%s: %c%c%2d %8.8x.\n", dev->name,
@@ -1586,7 +1586,7 @@ static irqreturn_t speedo_interrupt(int irq, void *dev_instance, struct pt_regs
/* Always check if all rx buffers are allocated. --SAW */
speedo_refill_rx_buffers(dev, 0);
-
+
spin_lock(&sp->lock);
/*
* The chip may have suspended reception for various reasons.
@@ -1607,8 +1607,8 @@ static irqreturn_t speedo_interrupt(int irq, void *dev_instance, struct pt_regs
/* these are all reserved values */
break;
}
-
-
+
+
/* User interrupt, Command/Tx unit interrupt or CU not active. */
if (status & 0xA400) {
speedo_tx_buffer_gc(dev);
@@ -1619,7 +1619,7 @@ static irqreturn_t speedo_interrupt(int irq, void *dev_instance, struct pt_regs
netif_wake_queue(dev); /* Attention: under a spinlock. --SAW */
}
}
-
+
spin_unlock(&sp->lock);
if (--boguscnt < 0) {
@@ -2015,7 +2015,7 @@ static void speedo_set_msglevel(struct net_device *dev, u32 v)
sp->msg_enable = v;
}
-static struct ethtool_ops ethtool_ops = {
+static const struct ethtool_ops ethtool_ops = {
.get_drvinfo = speedo_get_drvinfo,
.get_settings = speedo_get_settings,
.set_settings = speedo_set_settings,
@@ -2263,7 +2263,7 @@ static void set_rx_mode(struct net_device *dev)
sp->rx_mode = new_rx_mode;
}
-
+
#ifdef CONFIG_PM
static int eepro100_suspend(struct pci_dev *pdev, pm_message_t state)
{
@@ -2275,12 +2275,12 @@ static int eepro100_suspend(struct pci_dev *pdev, pm_message_t state)
if (!netif_running(dev))
return 0;
-
+
del_timer_sync(&sp->timer);
netif_device_detach(dev);
iowrite32(PortPartialReset, ioaddr + SCBPort);
-
+
/* XXX call pci_set_power_state ()? */
pci_disable_device(pdev);
pci_set_power_state (pdev, PCI_D3hot);
@@ -2324,7 +2324,7 @@ static void __devexit eepro100_remove_one (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata (pdev);
struct speedo_private *sp = netdev_priv(dev);
-
+
unregister_netdev(dev);
release_region(pci_resource_start(pdev, 1), pci_resource_len(pdev, 1));
@@ -2337,7 +2337,7 @@ static void __devexit eepro100_remove_one (struct pci_dev *pdev)
pci_disable_device(pdev);
free_netdev(dev);
}
-
+
static struct pci_device_id eepro100_pci_tbl[] = {
{ PCI_VENDOR_ID_INTEL, 0x1229, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, 0x1209, PCI_ANY_ID, PCI_ANY_ID, },
@@ -2368,7 +2368,7 @@ static struct pci_device_id eepro100_pci_tbl[] = {
{ 0,}
};
MODULE_DEVICE_TABLE(pci, eepro100_pci_tbl);
-
+
static struct pci_driver eepro100_driver = {
.name = "eepro100",
.id_table = eepro100_pci_tbl,
@@ -2385,7 +2385,7 @@ static int __init eepro100_init_module(void)
#ifdef MODULE
printk(version);
#endif
- return pci_module_init(&eepro100_driver);
+ return pci_register_driver(&eepro100_driver);
}
static void __exit eepro100_cleanup_module(void)
@@ -2395,7 +2395,7 @@ static void __exit eepro100_cleanup_module(void)
module_init(eepro100_init_module);
module_exit(eepro100_cleanup_module);
-
+
/*
* Local variables:
* compile-command: "gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -c eepro100.c `[ -f /usr/include/linux/modversions.h ] && echo -DMODVERSIONS`"