2.6.x net driver fixes
Subsystems (2)
PATCH 1/1 2.6.x net driver fixes
Please pull from the 'upstream-fixes' branch of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
to receive the fixes described in the attached diffstat/changelog/patch.
drivers/net/8139cp.c | 7 ++++++ drivers/net/dm9000.c | 52 ++++++++++++++++++++++++------------------------- drivers/net/ioc3-eth.c | 8 +++---- 3 files changed, 37 insertions(+), 30 deletions(-)
commit 2ae2d77cfa424587014cb34a89eed0ff2149fd5c
Author: Ben Dooks <[email protected]> Date: Sat Jul 23 17:29:38 2005 +0100
[PATCH] DM9000 - incorrect ioctl() handling
The DM9000 driver is responding to ioctl() calls it should not be. This can cause problems with the wireless tools incorrectly indentifying the device as wireless capable, and crashing under certain operations.
This patch also moves the version printk() to the init call, so that you only get it once for multiple devices, and to show it is loaded if there are no defined dm9000s
commit 9ef9ac51cc5fa5f5811230b5fb242536b636ff47
Author: Ben Dooks <[email protected]> Date: Sat Jul 23 17:25:18 2005 +0100
[PATCH] DM9000 - spinlock fixes
Fix DM9000 driver usage of spinlocks, which mainly came to light when running a kernel with spinlock debugging. These come down to:
1) Un-initialised spin lock
2) Several cases of using spin_xxx(lock) and not spin_xxx(&lock)
3) move the locking around the phy reg for read/write to only keep the lock when actually reading or writing to the phy.
commit a4cf0761493495681d72dcc0b34efb86e94a5527
Author: Pierre Ossman <[email protected]> Date: Mon Jul 4 00:22:53 2005 +0200
[PATCH] 8139cp - redetect link after suspend
After suspend the driver needs to retest link status in case the cable has been inserted or removed during the suspend.
commit 852ea22ab24df4c64c0211c3b6d6358eb0e759f9
Author: Ralf Baechle <[email protected]> Date: Tue Aug 2 11:01:27 2005 +0100
[PATCH] IOC3 fixes
- Using the right register clearly improves chances of getting the MII code and thus the driver working at all.
- On startup check the media type before setting up duplex or we might spend the first 1.2s with a wrong duplex setting.
- Get rid of whitespace lines.
drivers/net/8139cp.c +7 -0
@@ -1897,6 +1897,7 @@ static int cp_resume (struct pci_dev *pd {struct net_device *dev;struct cp_private *cp; +unsigned long flags; dev =pci_get_drvdata (pdev); cp =netdev_priv (dev);
@@ -1910,6 +1911,12 @@ static int cp_resume (struct pci_dev *pdcp_init_hw (cp);netif_start_queue (dev); + +spin_lock_irqsave (&cp->lock, flags); + +mii_check_media (&cp->mii_if,netif_msg_link (cp), FALSE); + +spin_unlock_irqrestore (&cp->lock, flags);return 0 ; }
drivers/net/dm9000.c +26 -26
153 lines not on this page · raw message
drivers/net/ioc3-eth.c +4 -4
@@ -499,7 +499,7 @@ static int ioc3_mdio_read(struct net_devioc3_w_micr ((phy <<MICR_PHYADDR_SHIFT ) | reg |MICR_READTRIG );while (ioc3_r_micr () &MICR_BUSY ); -return ioc3_r_micr () &MIDR_DATA_MASK ; +return ioc3_r_midr_r () &MIDR_DATA_MASK ; }static void ioc3_mdio_write (struct net_device *dev,int phy,int reg,int data)
@@ -1291,7 +1291,6 @@ static int ioc3_probe(struct pci_dev *pd dev->features =NETIF_F_IP_CSUM ;#endif -ioc3_setup_duplex (ip); sw_physid1 =ioc3_mdio_read (dev, ip->mii.phy_id,MII_PHYSID1 ); sw_physid2 =ioc3_mdio_read (dev, ip->mii.phy_id,MII_PHYSID2 );
@@ -1300,6 +1299,7 @@ static int ioc3_probe(struct pci_dev *pd goto out_stop;mii_check_media (&ip->mii,1 ,1 ); +ioc3_setup_duplex (ip); vendor = (sw_physid1 <<12 ) | (sw_physid2 >>4 ); model = (sw_physid2 >>4 ) &0x3f ;
@@ -1524,7 +1524,7 @@ static void ioc3_get_drvinfo (struct net struct ethtool_drvinfo *info) {struct ioc3_private *ip =netdev_priv (dev); - +strcpy (info->driver,IOC3_NAME );strcpy (info->version,IOC3_VERSION );strcpy (info->bus_info,pci_name (ip->pdev));
@@ -1550,7 +1550,7 @@ static int ioc3_set_settings(struct net_spin_lock_irq (&ip->ioc3_lock); rc =mii_ethtool_sset (&ip->mii, cmd);spin_unlock_irq (&ip->ioc3_lock); - +return rc; }