Skip to contentSkip to conversation

net driver fixes

PATCH In review Jeff Garzik 3 participants 5 messages Jan 30, 2008 – Jan 31, 2008

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net driver fixes

First pass through the queue that built up over the weekend (plus a few others that just missed 2.6.24 release), with a focus specifically on fixes.

Please pull from 'upstream-davem' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-davem

to receive the following updates:

 MAINTAINERS                     |    2 -
 drivers/net/Kconfig             |    9 ++--
 drivers/net/arm/at91_ether.c    |    2 +-
 drivers/net/bfin_mac.c          |  107 +++++++++++++++++++++++++--------------
 drivers/net/bfin_mac.h          |   31 ++----------
 drivers/net/bonding/bond_main.c |  106 ++++++++++++++++++++------------------
 drivers/net/bonding/bonding.h   |    4 +-
 drivers/net/cxgb3/mc5.c         |    2 +-
 drivers/net/cxgb3/sge.c         |    2 +-
 drivers/net/cxgb3/t3_hw.c       |   22 ++++----
 drivers/net/forcedeth.c         |   61 ++++++++++------------
 drivers/net/natsemi.c           |   18 +------
 drivers/net/pci-skeleton.c      |   49 +++++++++---------
 drivers/net/phy/Kconfig         |    5 ++
 drivers/net/phy/Makefile        |    1 +
 drivers/net/phy/mdio_bus.c      |    2 +-
 drivers/net/phy/phy.c           |   68 +++++++++++++++++--------
 drivers/net/phy/phy_device.c    |   11 ++--
 drivers/net/phy/realtek.c       |   80 +++++++++++++++++++++++++++++
 drivers/net/sis190.c            |    2 +-
 drivers/net/sky2.c              |   14 +++--
 include/linux/phy.h             |    5 +-
 22 files changed, 355 insertions(+), 248 deletions(-)
 create mode 100644 drivers/net/phy/realtek.c

Aidan Williams (1):
EMAC driver: bf537 MAC multicast hash filtering patch

Alexey Demin (1):

      EMAC driver: fix bug - invalidate data cache of new_skb->data range when cache is WB

Andy Gospodarek (1):
bonding: fix race that causes invalid statistics

Ayaz Abdulla (6):
forcedeth: reset register fix
forcedeth: checksum fix
forcedeth: updated copyright section
forcedeth: tx pause fix
forcedeth: multicast fix
forcedeth: mac address mcp77/79

Bryan Wu (3):
EMAC driver: shorten the mdelay value to solve netperf performance issue EMAC driver: define MDC_CLK=2.5MHz and caculate mdc_div according to SCLK. EMAC driver: Fix bug: The clock divisor is set to all ones at reset.

Jay Vosburgh (6):
bonding: fix parameter parsing
bonding: fix set_multicast_list locking
bonding: fix NULL pointer deref in startup processing
bonding: do not acquire rtnl in ARP monitor
bonding: update version
bonding: update MAINTAINERS

Jeff Garzik (1):
[netdrvr] sis190: build fix

Jike Song (1):
pci-skeleton: Misc fixes to build neatly

Kim Phillips (1):
phylib: Add Realtek 821x eth PHY support

Mark Brown (1):
natsemi: Update locking documentation

Michael Hennerich (1):
EMAC driver: ADSP-BF52x arch/mach support

Mike Frysinger (1):
EMAC driver: use simpler comment headers and strip out information that is maintained in the scm's log

Nate Case (1):
PHYLIB: Locking fixes for PHY I/O potentially sleeping

Roel Kluin (1):
drivers/net/arm/at91_ether.c: logical/bitand typo in function reset_phy()

Roland Dreier (1):
cxgb3: Remove incorrect __devinit annotations

Stephen Hemminger (2):
sky2: restore multicast addresses after recovery
sky2: fix Wake On Lan interaction with BIOS

Vitja Makarov (1):
EMAC driver: add power down mode

MAINTAINERS +0 -2
index 10011d9..77ad82a 100644
@@ -939,8 +939,6 @@ M:	[email protected]
 S:	Maintained
 
 BONDING DRIVER
-P:	Chad Tindel
-M:	[email protected]
 P:	Jay Vosburgh
 M:	[email protected]
 L:	[email protected]
drivers/net/Kconfig +5 -4
index 5a2d1dd..ca2552b 100644
@@ -814,8 +814,8 @@ config ULTRA32
 	  will be called smc-ultra32.
 
 config BFIN_MAC
-	tristate "Blackfin 536/537 on-chip mac support"
-	depends on NET_ETHERNET && (BF537 || BF536) && (!BF537_PORT_H)
+	tristate "Blackfin 527/536/537 on-chip mac support"
+	depends on NET_ETHERNET && (BF527 || BF537 || BF536) && (!BF537_PORT_H)
 	select CRC32
 	select MII
 	select PHYLIB
@@ -828,7 +828,7 @@ config BFIN_MAC
 
 config BFIN_MAC_USE_L1
 	bool "Use L1 memory for rx/tx packets"
-	depends on BFIN_MAC && BF537
+	depends on BFIN_MAC && (BF527 || BF537)
 	default y
 	help
 	  To get maximum network performance, you should use L1 memory as rx/tx buffers.
@@ -855,7 +855,8 @@ config BFIN_RX_DESC_NUM
 config BFIN_MAC_RMII
 	bool "RMII PHY Interface (EXPERIMENTAL)"
 	depends on BFIN_MAC && EXPERIMENTAL
-	default n
+	default y if BFIN527_EZKIT
+	default n if BFIN537_STAMP
 	help
 	  Use Reduced PHY MII Interface
 
drivers/net/arm/at91_ether.c +1 -1
index 25b114a..0ae0d83 100644
@@ -384,7 +384,7 @@ static void reset_phy(struct net_device *dev)
 	/* Wait until PHY reset is complete */
 	do {
 		read_phy(lp->phy_address, MII_BMCR, &bmcr);
-	} while (!(bmcr && BMCR_RESET));
+	} while (!(bmcr & BMCR_RESET));
 
 	disable_mdi();
 	spin_unlock_irq(&lp->lock);
drivers/net/bfin_mac.c +69 -38

205 lines not on this page · raw message

drivers/net/bfin_mac.h +4 -27
index 5970ea7..f774d5a 100644
@@ -1,34 +1,11 @@
 /*
- * File:	drivers/net/bfin_mac.c
- * Based on:
- * Maintainer:
- * 		Bryan Wu <[email protected]>
+ * Blackfin On-Chip MAC Driver
  *
- * Original author:
- * 		Luke Yang <[email protected]>
+ * Copyright 2004-2007 Analog Devices Inc.
  *
- * Created:
- * Description:
+ * Enter bugs at http://blackfin.uclinux.org/
  *
- * Modified:
- *		Copyright 2004-2006 Analog Devices Inc.
- *
- * Bugs:	Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software ;  you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation ;  either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY ;  without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program ;  see the file COPYING.
- * If not, write to the Free Software Foundation,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Licensed under the GPL-2 or later.
  */
 
 #define BFIN_MAC_CSUM_OFFLOAD
drivers/net/bonding/bond_main.c +56 -50

235 lines not on this page · raw message

drivers/net/bonding/bonding.h +2 -2
index 6d83be4..67ccad6 100644
@@ -22,8 +22,8 @@
 #include "bond_3ad.h"
 #include "bond_alb.h"
 
-#define DRV_VERSION	"3.2.3"
-#define DRV_RELDATE	"December 6, 2007"
+#define DRV_VERSION	"3.2.4"
+#define DRV_RELDATE	"January 28, 2008"
 #define DRV_NAME	"bonding"
 #define DRV_DESCRIPTION	"Ethernet Channel Bonding Driver"
 
drivers/net/cxgb3/mc5.c +1 -1
index 84c1ffa..4c4d6e8 100644
@@ -452,7 +452,7 @@ void t3_mc5_intr_handler(struct mc5 *mc5)
 	t3_write_reg(adap, A_MC5_DB_INT_CAUSE, cause);
 }
 
-void __devinit t3_mc5_prep(struct adapter *adapter, struct mc5 *mc5, int mode)
+void t3_mc5_prep(struct adapter *adapter, struct mc5 *mc5, int mode)
 {
 #define K * 1024
 
drivers/net/cxgb3/sge.c +1 -1
index cb684d3..9ca8c66 100644
@@ -2836,7 +2836,7 @@ void t3_sge_init(struct adapter *adap, struct sge_params *p)
  *	defaults for the assorted SGE parameters, which admins can change until
  *	they are used to initialize the SGE.
  */
-void __devinit t3_sge_prep(struct adapter *adap, struct sge_params *p)
+void t3_sge_prep(struct adapter *adap, struct sge_params *p)
 {
 	int i;
 
drivers/net/cxgb3/t3_hw.c +10 -12
index 7469935..a99496a 100644
@@ -2675,7 +2675,7 @@ void t3_tp_set_max_rxsize(struct adapter *adap, unsigned int size)
 		     V_PMMAXXFERLEN0(size) | V_PMMAXXFERLEN1(size));
 }
 
-static void __devinit init_mtus(unsigned short mtus[])
+static void init_mtus(unsigned short mtus[])
 {
 	/*
 	 * See draft-mathis-plpmtud-00.txt for the values.  The min is 88 so
@@ -2703,7 +2703,7 @@ static void __devinit init_mtus(unsigned short mtus[])
 /*
  * Initial congestion control parameters.
  */
-static void __devinit init_cong_ctrl(unsigned short *a, unsigned short *b)
+static void init_cong_ctrl(unsigned short *a, unsigned short *b)
 {
 	a[0] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = 1;
 	a[9] = 2;
@@ -3354,8 +3354,7 @@ out_err:
  *	Determines a card's PCI mode and associated parameters, such as speed
  *	and width.
  */
-static void __devinit get_pci_mode(struct adapter *adapter,
-				   struct pci_params *p)
+static void get_pci_mode(struct adapter *adapter, struct pci_params *p)
 {
 	static unsigned short speed_map[] = { 33, 66, 100, 133 };
 	u32 pci_mode, pcie_cap;
@@ -3395,8 +3394,7 @@ static void __devinit get_pci_mode(struct adapter *adapter,
  *	capabilities and default speed/duplex/flow-control/autonegotiation
  *	settings.
  */
-static void __devinit init_link_config(struct link_config *lc,
-				       unsigned int caps)
+static void init_link_config(struct link_config *lc, unsigned int caps)
 {
 	lc->supported = caps;
 	lc->requested_speed = lc->speed = SPEED_INVALID;
@@ -3419,7 +3417,7 @@ static void __devinit init_link_config(struct link_config *lc,
  *	Calculates the size of an MC7 memory in bytes from the value of its
  *	configuration register.
  */
-static unsigned int __devinit mc7_calc_size(u32 cfg)
+static unsigned int mc7_calc_size(u32 cfg)
 {
 	unsigned int width = G_WIDTH(cfg);
 	unsigned int banks = !!(cfg & F_BKS) + 1;
@@ -3430,8 +3428,8 @@ static unsigned int __devinit mc7_calc_size(u32 cfg)
 	return MBs << 20;
 }
 
-static void __devinit mc7_prep(struct adapter *adapter, struct mc7 *mc7,
-			       unsigned int base_addr, const char *name)
+static void mc7_prep(struct adapter *adapter, struct mc7 *mc7,
+		     unsigned int base_addr, const char *name)
 {
 	u32 cfg;
 
@@ -3517,7 +3515,7 @@ static int t3_reset_adapter(struct adapter *adapter)
 	return 0;
 }
 
-static int __devinit init_parity(struct adapter *adap)
+static int init_parity(struct adapter *adap)
 {
 		int i, err, addr;
 
@@ -3552,8 +3550,8 @@ static int __devinit init_parity(struct adapter *adap)
  * for some adapter tunables, take PHYs out of reset, and initialize the MDIO
  * interface.
  */
-int __devinit t3_prep_adapter(struct adapter *adapter,
-			      const struct adapter_info *ai, int reset)
+int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
+		    int reset)
 {
 	int ret;
 	unsigned int i, j = 0;
drivers/net/forcedeth.c +28 -33

151 lines not on this page · raw message

drivers/net/natsemi.c +2 -16
index c329a4f..0a3e604 100644
@@ -203,22 +203,8 @@ skbuff at an offset of "+2", 16-byte aligning the IP header.
 IIId. Synchronization
 
 Most operations are synchronized on the np->lock irq spinlock, except the
-performance critical codepaths:
-
-The rx process only runs in the interrupt handler. Access from outside
-the interrupt handler is only permitted after disable_irq().
-
-The rx process usually runs under the netif_tx_lock. If np->intr_tx_reap
-is set, then access is permitted under spin_lock_irq(&np->lock).
-
-Thus configuration functions that want to access everything must call
-	disable_irq(dev->irq);
-	netif_tx_lock_bh(dev);
-	spin_lock_irq(&np->lock);
-
-IV. Notes
-
-NatSemi PCI network controllers are very uncommon.
+recieve and transmit paths which are synchronised using a combination of
+hardware descriptor ownership, disabling interrupts and NAPI poll scheduling.
 
 IVb. References
 
drivers/net/pci-skeleton.c +25 -24

191 lines not on this page · raw message

drivers/net/phy/Kconfig +5 -0
index 54b2ba9..e4594bc 100644
@@ -60,6 +60,11 @@ config ICPLUS_PHY
 	---help---
 	  Currently supports the IP175C PHY.
 
+config REALTEK_PHY
+	tristate "Drivers for Realtek PHYs"
+	---help---
+	  Supports the Realtek 821x PHY.
+
 config FIXED_PHY
 	tristate "Drivers for PHY emulation on fixed speed/link"
 	---help---
drivers/net/phy/Makefile +1 -0
index 3d6cc7b..5997d6e 100644
@@ -12,5 +12,6 @@ obj-$(CONFIG_SMSC_PHY)		+= smsc.o
 obj-$(CONFIG_VITESSE_PHY)	+= vitesse.o
 obj-$(CONFIG_BROADCOM_PHY)	+= broadcom.o
 obj-$(CONFIG_ICPLUS_PHY)	+= icplus.o
+obj-$(CONFIG_REALTEK_PHY)	+= realtek.o
 obj-$(CONFIG_FIXED_PHY)		+= fixed.o
 obj-$(CONFIG_MDIO_BITBANG)	+= mdio-bitbang.o
drivers/net/phy/mdio_bus.c +1 -1
index c30196d..6e9f619 100644
@@ -49,7 +49,7 @@ int mdiobus_register(struct mii_bus *bus)
 	int i;
 	int err = 0;
 
-	spin_lock_init(&bus->mdio_lock);
+	mutex_init(&bus->mdio_lock);
 
 	if (NULL == bus || NULL == bus->name ||
 			NULL == bus->read ||
drivers/net/phy/phy.c +46 -22

177 lines not on this page · raw message

drivers/net/phy/phy_device.c +5 -6
index 5b9e175..f4c4fd8 100644
@@ -25,7 +25,6 @@
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
-#include <linux/spinlock.h>
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/mii.h>
@@ -80,7 +79,7 @@ struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id)
 
 	dev->state = PHY_DOWN;
 
-	spin_lock_init(&dev->lock);
+	mutex_init(&dev->lock);
 
 	return dev;
 }
@@ -656,7 +655,7 @@ static int phy_probe(struct device *dev)
 	if (!(phydrv->flags & PHY_HAS_INTERRUPT))
 		phydev->irq = PHY_POLL;
 
-	spin_lock_bh(&phydev->lock);
+	mutex_lock(&phydev->lock);
 
 	/* Start out supporting everything. Eventually,
 	 * a controller will attach, and may modify one
@@ -670,7 +669,7 @@ static int phy_probe(struct device *dev)
 	if (phydev->drv->probe)
 		err = phydev->drv->probe(phydev);
 
-	spin_unlock_bh(&phydev->lock);
+	mutex_unlock(&phydev->lock);
 
 	return err;
 
@@ -682,9 +681,9 @@ static int phy_remove(struct device *dev)
 
 	phydev = to_phy_device(dev);
 
-	spin_lock_bh(&phydev->lock);
+	mutex_lock(&phydev->lock);
 	phydev->state = PHY_DOWN;
-	spin_unlock_bh(&phydev->lock);
+	mutex_unlock(&phydev->lock);
 
 	if (phydev->drv->remove)
 		phydev->drv->remove(phydev);
drivers/net/phy/realtek.c new file +80 -0

80 lines not on this page · raw message

drivers/net/sis190.c +1 -1
index b570402..2e9e88b 100644
@@ -326,7 +326,7 @@ static const struct {
 	{ "SiS 191 PCI Gigabit Ethernet adapter" },
 };
 
-static struct pci_device_id sis190_pci_tbl[] __devinitdata = {
+static struct pci_device_id sis190_pci_tbl[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 },
 	{ 0, },
drivers/net/sky2.c +9 -5
index 626190e..dc06236 100644
@@ -623,6 +623,7 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff)
 	static const u32 phy_power[] = { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD };
 	static const u32 coma_mode[] = { PCI_Y2_PHY1_COMA, PCI_Y2_PHY2_COMA };
 
+	sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
 	reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
 	/* Turn on/off phy power saving */
 	if (onoff)
@@ -634,7 +635,8 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff)
 		reg1 |= coma_mode[port];
 
 	sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
-	reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
+	sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
+	sky2_pci_read32(hw, PCI_DEV_REG1);
 
 	udelay(100);
 }
@@ -1422,6 +1424,7 @@ static int sky2_up(struct net_device *dev)
 	imask |= portirq_msk[port];
 	sky2_write32(hw, B0_IMSK, imask);
 
+	sky2_set_multicast(dev);
 	return 0;
 
 err_out:
@@ -2436,6 +2439,7 @@ static void sky2_hw_intr(struct sky2_hw *hw)
 	if (status & (Y2_IS_MST_ERR | Y2_IS_IRQ_STAT)) {
 		u16 pci_err;
 
+		sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
 		pci_err = sky2_pci_read16(hw, PCI_STATUS);
 		if (net_ratelimit())
 			dev_err(&pdev->dev, "PCI hardware error (0x%x)\n",
@@ -2443,12 +2447,14 @@ static void sky2_hw_intr(struct sky2_hw *hw)
 
 		sky2_pci_write16(hw, PCI_STATUS,
 				      pci_err | PCI_STATUS_ERROR_BITS);
+		sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
 	}
 
 	if (status & Y2_IS_PCI_EXP) {
 		/* PCI-Express uncorrectable Error occurred */
 		u32 err;
 
+		sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
 		err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS);
 		sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS,
 			     0xfffffffful);
@@ -2456,6 +2462,7 @@ static void sky2_hw_intr(struct sky2_hw *hw)
 			dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err);
 
 		sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS);
+		sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
 	}
 
 	if (status & Y2_HWE_L1_MASK)
@@ -2831,6 +2838,7 @@ static void sky2_reset(struct sky2_hw *hw)
 	}
 
 	sky2_power_on(hw);
+	sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
 
 	for (i = 0; i < hw->ports; i++) {
 		sky2_write8(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_SET);
@@ -3554,8 +3562,6 @@ static int sky2_set_ringparam(struct net_device *dev,
 		err = sky2_up(dev);
 		if (err)
 			dev_close(dev);
-		else
-			sky2_set_multicast(dev);
 	}
 
 	return err;
@@ -4389,8 +4395,6 @@ static int sky2_resume(struct pci_dev *pdev)
 				dev_close(dev);
 				goto out;
 			}
-
-			sky2_set_multicast(dev);
 		}
 	}
 
include/linux/phy.h +3 -2
index 554836e..5e43ae7 100644
@@ -88,7 +88,7 @@ struct mii_bus {
 
 	/* A lock to ensure that only one thing can read/write
 	 * the MDIO bus at a time */
-	spinlock_t mdio_lock;
+	struct mutex mdio_lock;
 
 	struct device *dev;
 
@@ -284,10 +284,11 @@ struct phy_device {
 
 	/* Interrupt and Polling infrastructure */
 	struct work_struct phy_queue;
+	struct work_struct state_queue;
 	struct timer_list phy_timer;
 	atomic_t irq_disable;
 
-	spinlock_t lock;
+	struct mutex lock;
 
 	struct net_device *attached_dev;
 
#1 lore raw
Quoted 3 lines

Jeff Garzik (1):
[netdrvr] sis190: build fix

But you did it wrong...
sis190.c b/drivers/net/sis190.c

drivers/net/sis190.c static const struct { · line 332

Quoted 12 lines

index b570402..2e9e88b 100644

drivers/net/sis190.c +1 -1
@@ -326,7 +326,7 @@ static const struct {
 	{ "SiS 191 PCI Gigabit Ethernet adapter" },
 };
 
-static struct pci_device_id sis190_pci_tbl[] __devinitdata = {
+static struct pci_device_id sis190_pci_tbl[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 },
 	{ 0, },

The __devinitdata is OK, it is the following _devinitdata that had to be _devinitconst.

Sam

#2 lore raw
Quoted 12 lines · Sam Ravnborg
Quoted 2 lines

Jeff Garzik (1):
[netdrvr] sis190: build fix

But you did it wrong...
sis190.c b/drivers/net/sis190.c

Quoted 7 lines

index b570402..2e9e88b 100644

drivers/net/sis190.c +0 -0
@@ -326,7 +326,7 @@ static const struct {
 	{ "SiS 191 PCI Gigabit Ethernet adapter" },
 };
 
Quoted 7 lines

drivers/net/sis190.c static const struct { · line 332

Quoted 5 lines
drivers/net/sis190.c +1 -1
-static struct pci_device_id sis190_pci_tbl[] __devinitdata = {
+static struct pci_device_id sis190_pci_tbl[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 },
 	{ 0, },

The __devinitdata is OK, it is the following _devinitdata that had to be _devinitconst.

Cool. Either way is fine with me. I just wanted to get a build fix upstream ASAP, one I was sure would work.

Jeff

#3 lore raw
In reply to Sam Ravnborg

Sam Ravnborg <[email protected]> :
[...]

Quoted 8 lines

drivers/net/sis190.c static const struct { · line 332

Quoted 5 lines
drivers/net/sis190.c +1 -1
-static struct pci_device_id sis190_pci_tbl[] __devinitdata = {
+static struct pci_device_id sis190_pci_tbl[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 },
 	{ 0, },

The __devinitdata is OK, it is the following _devinitdata that had to be _devinitconst.

Strangely enough, removing the devinitdata from the sis190_pci_tbl silents the error message here. Do you have an explanation ?

Signature · 1 line
Ueimor
#4 lore raw
Quoted 11 lines · Francois Romieu

Sam Ravnborg <[email protected]> :
[...]

Quoted 8 lines

drivers/net/sis190.c static const struct { · line 332

Quoted 5 lines
drivers/net/sis190.c +1 -1
-static struct pci_device_id sis190_pci_tbl[] __devinitdata = {
+static struct pci_device_id sis190_pci_tbl[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 },
 	{ 0, },

The __devinitdata is OK, it is the following _devinitdata that had to be _devinitconst.

Quoted 2 lines

Strangely enough, removing the devinitdata from the sis190_pci_tbl silents the error message here. Do you have an explanation ?

gcc compalins if you add const and non-const data to the same section which is the case in this driver.

The bug are exposed now where __devinitdata are no longer an empty define.

Sam