Commit 3642fd58 authored by Patrick Mochel's avatar Patrick Mochel

Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin

into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core
parents 8bed75c8 d3b2fbb5
...@@ -12,31 +12,36 @@ network devices. ...@@ -12,31 +12,36 @@ network devices.
struct net_device synchronization rules struct net_device synchronization rules
======================================= =======================================
dev->open: dev->open:
Locking: Inside rtnl_lock() semaphore. Synchronization: rtnl_lock() semaphore.
Sleeping: OK Context: process
dev->stop: dev->stop:
Locking: Inside rtnl_lock() semaphore. Synchronization: rtnl_lock() semaphore.
Sleeping: OK Context: process
Notes: netif_running() is guaranteed false when this is called
dev->do_ioctl: dev->do_ioctl:
Locking: Inside rtnl_lock() semaphore. Synchronization: rtnl_lock() semaphore.
Sleeping: OK Context: process
dev->get_stats: dev->get_stats:
Locking: Inside dev_base_lock spinlock. Synchronization: dev_base_lock rwlock.
Sleeping: NO Context: nominally process, but don't sleep inside an rwlock
dev->hard_start_xmit: dev->hard_start_xmit:
Locking: Inside dev->xmit_lock spinlock. Synchronization: dev->xmit_lock spinlock.
Sleeping: NO Context: BHs disabled
dev->tx_timeout: dev->tx_timeout:
Locking: Inside dev->xmit_lock spinlock. Synchronization: dev->xmit_lock spinlock.
Sleeping: NO Context: BHs disabled
dev->set_multicast_list: dev->set_multicast_list:
Locking: Inside dev->xmit_lock spinlock. Synchronization: dev->xmit_lock spinlock.
Sleeping: NO Context: BHs disabled
dev->poll:
Synchronization: __LINK_STATE_RX_SCHED bit in dev->state. See
dev_close code and comments in net/core/dev.c for more info.
Context: softirq
...@@ -751,6 +751,8 @@ static struct file_operations pp_fops = { ...@@ -751,6 +751,8 @@ static struct file_operations pp_fops = {
static int __init ppdev_init (void) static int __init ppdev_init (void)
{ {
int i;
if (register_chrdev (PP_MAJOR, CHRDEV, &pp_fops)) { if (register_chrdev (PP_MAJOR, CHRDEV, &pp_fops)) {
printk (KERN_WARNING CHRDEV ": unable to get major %d\n", printk (KERN_WARNING CHRDEV ": unable to get major %d\n",
PP_MAJOR); PP_MAJOR);
......
...@@ -707,12 +707,20 @@ static void ewrk3_init(struct net_device *dev) ...@@ -707,12 +707,20 @@ static void ewrk3_init(struct net_device *dev)
struct ewrk3_private *lp = (struct ewrk3_private *) dev->priv; struct ewrk3_private *lp = (struct ewrk3_private *) dev->priv;
u_char csr, page; u_char csr, page;
u_long iobase = dev->base_addr; u_long iobase = dev->base_addr;
int i;
/* /*
** Enable any multicasts ** Enable any multicasts
*/ */
set_multicast_list(dev); set_multicast_list(dev);
/*
** Set hardware MAC address. Address is initialized from the EEPROM
** during startup but may have since been changed by the user.
*/
for (i=0; i<ETH_ALEN; i++)
outb(dev->dev_addr[i], EWRK3_PAR0 + i);
/* /*
** Clean out any remaining entries in all the queues here ** Clean out any remaining entries in all the queues here
*/ */
...@@ -1754,23 +1762,17 @@ static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr) ...@@ -1754,23 +1762,17 @@ static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr)
return 0; return 0;
} }
#ifdef BROKEN
/* Blink LED for identification */ /* Blink LED for identification */
case ETHTOOL_PHYS_ID: { case ETHTOOL_PHYS_ID: {
struct ethtool_value edata; struct ethtool_value edata;
u_long flags; u_long flags;
long delay, ret;
u_char cr; u_char cr;
int count; int count;
wait_queue_head_t wait;
init_waitqueue_head(&wait);
if (copy_from_user(&edata, useraddr, sizeof(edata))) if (copy_from_user(&edata, useraddr, sizeof(edata)))
return -EFAULT; return -EFAULT;
/* Toggle LED 4x per second */ /* Toggle LED 4x per second */
delay = HZ >> 2;
count = edata.data << 2; count = edata.data << 2;
spin_lock_irqsave(&lp->hw_lock, flags); spin_lock_irqsave(&lp->hw_lock, flags);
...@@ -1791,24 +1793,21 @@ static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr) ...@@ -1791,24 +1793,21 @@ static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr)
/* Wait a little while */ /* Wait a little while */
spin_unlock_irqrestore(&lp->hw_lock, flags); spin_unlock_irqrestore(&lp->hw_lock, flags);
ret = delay; set_current_state(TASK_UNINTERRUPTIBLE);
__wait_event_interruptible_timeout(wait, 0, ret); schedule_timeout(HZ>>2);
spin_lock_irqsave(&lp->hw_lock, flags); spin_lock_irqsave(&lp->hw_lock, flags);
/* Exit if we got a signal */ /* Exit if we got a signal */
if (ret == -ERESTARTSYS) if (signal_pending(current))
goto out; break;
} }
ret = 0;
out:
lp->led_mask = CR_LED; lp->led_mask = CR_LED;
cr = inb(EWRK3_CR); cr = inb(EWRK3_CR);
outb(cr & ~CR_LED, EWRK3_CR); outb(cr & ~CR_LED, EWRK3_CR);
spin_unlock_irqrestore(&lp->hw_lock, flags); spin_unlock_irqrestore(&lp->hw_lock, flags);
return ret; return signal_pending(current) ? -ERESTARTSYS : 0;
} }
#endif /* BROKEN */
} }
......
...@@ -508,7 +508,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -508,7 +508,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
spin_lock_init(&tp->lock); spin_lock_init(&tp->lock);
pdev->driver_data = dev; pci_set_drvdata(pdev, dev);
printk(KERN_INFO "%s: %s at 0x%lx, " printk(KERN_INFO "%s: %s at 0x%lx, "
"%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, " "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, "
...@@ -618,7 +618,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -618,7 +618,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
static void __devexit static void __devexit
rtl8169_remove_one(struct pci_dev *pdev) rtl8169_remove_one(struct pci_dev *pdev)
{ {
struct net_device *dev = pdev->driver_data; struct net_device *dev = pci_get_drvdata(pdev);
struct rtl8169_private *tp = (struct rtl8169_private *) (dev->priv); struct rtl8169_private *tp = (struct rtl8169_private *) (dev->priv);
assert(dev != NULL); assert(dev != NULL);
...@@ -633,7 +633,7 @@ rtl8169_remove_one(struct pci_dev *pdev) ...@@ -633,7 +633,7 @@ rtl8169_remove_one(struct pci_dev *pdev)
sizeof (struct net_device) + sizeof (struct rtl8169_private)); sizeof (struct net_device) + sizeof (struct rtl8169_private));
kfree(dev); kfree(dev);
pdev->driver_data = NULL; pci_set_drvdata(pdev, NULL);
} }
static int static int
......
...@@ -384,7 +384,6 @@ extern "C" { ...@@ -384,7 +384,6 @@ extern "C" {
/* VPD Region */ /* VPD Region */
/* PCI_VPD_ADR_REG 16 bit VPD Address Register */ /* PCI_VPD_ADR_REG 16 bit VPD Address Register */
#define PCI_VPD_FLAG (1L<<15) /* Bit 15: starts VPD rd/wd cycle*/ #define PCI_VPD_FLAG (1L<<15) /* Bit 15: starts VPD rd/wd cycle*/
#define PCI_VPD_ADDR (0x3fffL<<0) /* Bit 14..0: VPD address */
/* /*
* Control Register File: * Control Register File:
......
...@@ -1039,7 +1039,6 @@ ...@@ -1039,7 +1039,6 @@
/* PCI_VPD_NITEM 8 bit (ML) Next Item Ptr */ /* PCI_VPD_NITEM 8 bit (ML) Next Item Ptr */
/* PCI_VPD_ADR_REG 16 bit (ML) VPD Address Register */ /* PCI_VPD_ADR_REG 16 bit (ML) VPD Address Register */
#define PCI_VPD_FLAG (1<<15) /* Bit 15 starts VPD rd/wd cycle*/ #define PCI_VPD_FLAG (1<<15) /* Bit 15 starts VPD rd/wd cycle*/
#define PCI_VPD_ADDR (0x3fff<<0) /* Bit 0..14 VPD address */
/* PCI_VPD_DAT_REG 32 bit (ML) VPD Data Register */ /* PCI_VPD_DAT_REG 32 bit (ML) VPD Data Register */
......
...@@ -2014,7 +2014,6 @@ static int __init de_init_one (struct pci_dev *pdev, ...@@ -2014,7 +2014,6 @@ static int __init de_init_one (struct pci_dev *pdev,
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
dev->irq = pdev->irq; dev->irq = pdev->irq;
init_timer(&de->media_timer);
de = dev->priv; de = dev->priv;
de->de21040 = ent->driver_data == 0 ? 1 : 0; de->de21040 = ent->driver_data == 0 ? 1 : 0;
...@@ -2217,8 +2216,7 @@ static struct pci_driver de_driver = { ...@@ -2217,8 +2216,7 @@ static struct pci_driver de_driver = {
.name = DRV_NAME, .name = DRV_NAME,
.id_table = de_pci_tbl, .id_table = de_pci_tbl,
.probe = de_init_one, .probe = de_init_one,
#warning only here to fix build. should be __exit_p not __devexit_p. .remove = __exit_p(de_remove_one),
.remove = __devexit_p(de_remove_one),
#ifdef CONFIG_PM #ifdef CONFIG_PM
.suspend = de_suspend, .suspend = de_suspend,
.resume = de_resume, .resume = de_resume,
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
/* $Id: i2c-id.h,v 1.52 2002/07/10 13:28:44 abz Exp $ */ /* $Id: i2c-id.h,v 1.56 2002/10/13 15:50:02 mds Exp $ */
#ifndef I2C_ID_H #ifndef I2C_ID_H
#define I2C_ID_H #define I2C_ID_H
...@@ -143,6 +143,8 @@ ...@@ -143,6 +143,8 @@
#define I2C_DRIVERID_SMSC47M1 1031 #define I2C_DRIVERID_SMSC47M1 1031
#define I2C_DRIVERID_VT1211 1032 #define I2C_DRIVERID_VT1211 1032
#define I2C_DRIVERID_LM92 1033 #define I2C_DRIVERID_LM92 1033
#define I2C_DRIVERID_VT8231 1034
#define I2C_DRIVERID_SMARTBATT 1035
/* /*
* ---- Adapter types ---------------------------------------------------- * ---- Adapter types ----------------------------------------------------
...@@ -161,6 +163,7 @@ ...@@ -161,6 +163,7 @@
#define I2C_ALGO_ACB 0x070000 /* ACCESS.bus algorithm */ #define I2C_ALGO_ACB 0x070000 /* ACCESS.bus algorithm */
#define I2C_ALGO_IIC 0x080000 /* ITE IIC bus */ #define I2C_ALGO_IIC 0x080000 /* ITE IIC bus */
#define I2C_ALGO_SAA7134 0x090000 #define I2C_ALGO_SAA7134 0x090000
#define I2C_ALGO_MPC824X 0x0a0000 /* Motorola 8240 / 8245 */
#define I2C_ALGO_EC 0x100000 /* ACPI embedded controller */ #define I2C_ALGO_EC 0x100000 /* ACPI embedded controller */
#define I2C_ALGO_MPC8XX 0x110000 /* MPC8xx PowerPC I2C algorithm */ #define I2C_ALGO_MPC8XX 0x110000 /* MPC8xx PowerPC I2C algorithm */
...@@ -206,6 +209,9 @@ ...@@ -206,6 +209,9 @@
/* --- ACPI Embedded controller algorithms */ /* --- ACPI Embedded controller algorithms */
#define I2C_HW_ACPI_EC 0x00 #define I2C_HW_ACPI_EC 0x00
/* --- MPC824x PowerPC adapters */
#define I2C_HW_MPC824X 0x00 /* Motorola 8240 / 8245 */
/* --- MPC8xx PowerPC adapters */ /* --- MPC8xx PowerPC adapters */
#define I2C_HW_MPC8XX_EPON 0x00 /* Eponymous MPC8xx I2C adapter */ #define I2C_HW_MPC8XX_EPON 0x00 /* Eponymous MPC8xx I2C adapter */
...@@ -225,6 +231,8 @@ ...@@ -225,6 +231,8 @@
#define I2C_HW_SMBUS_AMD756 0x05 #define I2C_HW_SMBUS_AMD756 0x05
#define I2C_HW_SMBUS_SIS5595 0x06 #define I2C_HW_SMBUS_SIS5595 0x06
#define I2C_HW_SMBUS_ALI1535 0x07 #define I2C_HW_SMBUS_ALI1535 0x07
#define I2C_HW_SMBUS_SIS630 0x08
#define I2C_HW_SMBUS_SIS645 0x09
/* --- ISA pseudo-adapter */ /* --- ISA pseudo-adapter */
#define I2C_HW_ISA 0x00 #define I2C_HW_ISA 0x00
......
...@@ -66,7 +66,6 @@ struct i2c_driver; ...@@ -66,7 +66,6 @@ struct i2c_driver;
struct i2c_client_address_data; struct i2c_client_address_data;
union i2c_smbus_data; union i2c_smbus_data;
/* /*
* The master routines are the ones normally used to transmit data to devices * The master routines are the ones normally used to transmit data to devices
* on a bus (or read from them). Apart from two basic transfer functions to * on a bus (or read from them). Apart from two basic transfer functions to
......
...@@ -42,10 +42,15 @@ ...@@ -42,10 +42,15 @@
discard it in modules) */ discard it in modules) */
#define __init __attribute__ ((__section__ (".init.text"))) #define __init __attribute__ ((__section__ (".init.text")))
#define __initdata __attribute__ ((__section__ (".init.data"))) #define __initdata __attribute__ ((__section__ (".init.data")))
#define __exit __attribute__ ((__section__(".exit.text")))
#define __exitdata __attribute__ ((__section__(".exit.data"))) #define __exitdata __attribute__ ((__section__(".exit.data")))
#define __exit_call __attribute__ ((unused,__section__ (".exitcall.exit"))) #define __exit_call __attribute__ ((unused,__section__ (".exitcall.exit")))
#ifdef MODULE
#define __exit __attribute__ ((__section__(".exit.text")))
#else
#define __exit __attribute__ ((unused,__section__(".exit.text")))
#endif
/* For assembly routines */ /* For assembly routines */
#define __INIT .section ".init.text","ax" #define __INIT .section ".init.text","ax"
#define __FINIT .previous #define __FINIT .previous
...@@ -185,4 +190,10 @@ extern struct kernel_param __setup_start, __setup_end; ...@@ -185,4 +190,10 @@ extern struct kernel_param __setup_start, __setup_end;
#define __devexit_p(x) NULL #define __devexit_p(x) NULL
#endif #endif
#ifdef MODULE
#define __exit_p(x) x
#else
#define __exit_p(x) NULL
#endif
#endif /* _LINUX_INIT_H */ #endif /* _LINUX_INIT_H */
...@@ -180,7 +180,7 @@ static struct { char *name; int minor; } entries[] = { ...@@ -180,7 +180,7 @@ static struct { char *name; int minor; } entries[] = {
{"route6", 11}, {"route6", 11},
{"ip6_fw", 13}, {"ip6_fw", 13},
{"dnrtmsg", 13}, {"dnrtmsg", 13},
} };
static void __init make_devfs_entries (const char *name, int minor) static void __init make_devfs_entries (const char *name, int minor)
{ {
...@@ -192,6 +192,8 @@ static void __init make_devfs_entries (const char *name, int minor) ...@@ -192,6 +192,8 @@ static void __init make_devfs_entries (const char *name, int minor)
int __init init_netlink(void) int __init init_netlink(void)
{ {
int i;
if (register_chrdev(NETLINK_MAJOR,"netlink", &netlink_fops)) { if (register_chrdev(NETLINK_MAJOR,"netlink", &netlink_fops)) {
printk(KERN_ERR "netlink: unable to get major %d\n", NETLINK_MAJOR); printk(KERN_ERR "netlink: unable to get major %d\n", NETLINK_MAJOR);
return -EIO; return -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment