Commit 726bdba7 authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/disk1/davem/BK/network-2.5

into nuts.ninka.net:/disk1/davem/BK/net-2.5
parents 1eb12c6d a8f97595
...@@ -71,6 +71,7 @@ EXPORT_SYMBOL_NOVERS(__down_failed_trylock); ...@@ -71,6 +71,7 @@ EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
EXPORT_SYMBOL_NOVERS(__up_wakeup); EXPORT_SYMBOL_NOVERS(__up_wakeup);
/* Networking helper routines. */ /* Networking helper routines. */
EXPORT_SYMBOL(csum_partial_copy_nocheck); EXPORT_SYMBOL(csum_partial_copy_nocheck);
EXPORT_SYMBOL(ip_compute_csum);
/* Delay loops */ /* Delay loops */
EXPORT_SYMBOL(__udelay); EXPORT_SYMBOL(__udelay);
EXPORT_SYMBOL(__ndelay); EXPORT_SYMBOL(__ndelay);
...@@ -113,6 +114,7 @@ EXPORT_SYMBOL(mmx_clear_page); ...@@ -113,6 +114,7 @@ EXPORT_SYMBOL(mmx_clear_page);
EXPORT_SYMBOL(mmx_copy_page); EXPORT_SYMBOL(mmx_copy_page);
#endif #endif
EXPORT_SYMBOL(cpu_pda);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
EXPORT_SYMBOL(cpu_data); EXPORT_SYMBOL(cpu_data);
EXPORT_SYMBOL(cpu_online_map); EXPORT_SYMBOL(cpu_online_map);
......
...@@ -514,16 +514,14 @@ acpi_ds_init_buffer_field ( ...@@ -514,16 +514,14 @@ acpi_ds_init_buffer_field (
goto cleanup; goto cleanup;
} }
/* Entire field must fit within the current length of the buffer */ /* Entire field must fit within the current length of the buffer */
if ((bit_offset + bit_count) > if ((bit_offset + bit_count) >
(8 * (u32) buffer_desc->buffer.length)) { (8 * (u32) buffer_desc->buffer.length)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Field [%4.4s] size %d exceeds Buffer [%4.4s] size %d (bits)\n", "Field size %d exceeds Buffer size %d (bits)\n",
((struct acpi_namespace_node *) result_desc)->name.ascii, bit_offset + bit_count, 8 * (u32) buffer_desc->buffer.length));
bit_offset + bit_count,
buffer_desc->buffer.node->name.ascii,
8 * (u32) buffer_desc->buffer.length));
status = AE_AML_BUFFER_LIMIT; status = AE_AML_BUFFER_LIMIT;
goto cleanup; goto cleanup;
} }
......
...@@ -94,13 +94,6 @@ static struct acpi_ec *ec_ecdt; ...@@ -94,13 +94,6 @@ static struct acpi_ec *ec_ecdt;
/* External interfaces use first EC only, so remember */ /* External interfaces use first EC only, so remember */
static struct acpi_device *first_ec; static struct acpi_device *first_ec;
/*
* We use kernel thread to handle ec's gpe query, so the query may defer.
* The query need a context, which can be freed when we replace ec_ecdt
* with EC device. So defered query may have a wrong context.
* We use an indication to avoid it
*/
static int ec_device_init = 0;
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
Transaction Management Transaction Management
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
...@@ -400,11 +393,8 @@ acpi_ec_gpe_handler ( ...@@ -400,11 +393,8 @@ acpi_ec_gpe_handler (
acpi_disable_gpe(NULL, ec->gpe_bit, ACPI_ISR); acpi_disable_gpe(NULL, ec->gpe_bit, ACPI_ISR);
if (!ec_device_init) status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
acpi_ec_gpe_query(ec); /* directly query when device didn't init */ acpi_ec_gpe_query, ec);
else
status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
acpi_ec_gpe_query, ec);
} }
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
...@@ -599,8 +589,6 @@ acpi_ec_add ( ...@@ -599,8 +589,6 @@ acpi_ec_add (
we now have the *real* EC info, so kill the makeshift one.*/ we now have the *real* EC info, so kill the makeshift one.*/
acpi_evaluate_integer(ec->handle, "_UID", NULL, &uid); acpi_evaluate_integer(ec->handle, "_UID", NULL, &uid);
if (ec_ecdt && ec_ecdt->uid == uid) { if (ec_ecdt && ec_ecdt->uid == uid) {
acpi_disable_gpe(NULL, ec_ecdt->gpe_bit, ACPI_NOT_ISR);
ec_device_init = 1;
acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, acpi_remove_address_space_handler(ACPI_ROOT_OBJECT,
ACPI_ADR_SPACE_EC, &acpi_ec_space_handler); ACPI_ADR_SPACE_EC, &acpi_ec_space_handler);
......
...@@ -187,7 +187,6 @@ static int bt832_attach(struct i2c_adapter *adap, int addr, ...@@ -187,7 +187,6 @@ static int bt832_attach(struct i2c_adapter *adap, int addr,
t->client.data = t; t->client.data = t;
i2c_attach_client(&t->client); i2c_attach_client(&t->client);
MOD_INC_USE_COUNT;
if(! bt832_init(&t->client)) { if(! bt832_init(&t->client)) {
bt832_detach(&t->client); bt832_detach(&t->client);
return -1; return -1;
...@@ -210,7 +209,6 @@ static int bt832_detach(struct i2c_client *client) ...@@ -210,7 +209,6 @@ static int bt832_detach(struct i2c_client *client)
printk("bt832: detach.\n"); printk("bt832: detach.\n");
i2c_detach_client(client); i2c_detach_client(client);
kfree(t); kfree(t);
MOD_DEC_USE_COUNT;
return 0; return 0;
} }
......
...@@ -2439,8 +2439,8 @@ hauppauge_tuner[] __devinitdata = ...@@ -2439,8 +2439,8 @@ hauppauge_tuner[] __devinitdata =
{ TUNER_TEMIC_4039FR5_NTSC, "Temic 4039FR5" }, { TUNER_TEMIC_4039FR5_NTSC, "Temic 4039FR5" },
{ TUNER_PHILIPS_FQ1216ME, "Philips FQ1216 ME" }, { TUNER_PHILIPS_FQ1216ME, "Philips FQ1216 ME" },
{ TUNER_TEMIC_4066FY5_PAL_I, "Temic 4066FY5" }, { TUNER_TEMIC_4066FY5_PAL_I, "Temic 4066FY5" },
{ TUNER_ABSENT, "Philips TD1536" }, { TUNER_PHILIPS_NTSC, "Philips TD1536" },
{ TUNER_ABSENT, "Philips TD1536D" }, { TUNER_PHILIPS_NTSC, "Philips TD1536D" },
{ TUNER_PHILIPS_NTSC, "Philips FMR1236" }, /* mono radio */ { TUNER_PHILIPS_NTSC, "Philips FMR1236" }, /* mono radio */
{ TUNER_ABSENT, "Philips FI1256MP" }, { TUNER_ABSENT, "Philips FI1256MP" },
{ TUNER_ABSENT, "Samsung TCPQ9091P" }, { TUNER_ABSENT, "Samsung TCPQ9091P" },
......
...@@ -247,7 +247,7 @@ static int ...@@ -247,7 +247,7 @@ static int
bttv_i2c_wait_done(struct bttv *btv) bttv_i2c_wait_done(struct bttv *btv)
{ {
u32 stat; u32 stat;
int timeout; unsigned long timeout;
timeout = jiffies + HZ/100 + 1; /* 10ms */ timeout = jiffies + HZ/100 + 1; /* 10ms */
for (;;) { for (;;) {
......
...@@ -214,7 +214,6 @@ static int saa5249_attach(struct i2c_adapter *adap, int addr, int kind) ...@@ -214,7 +214,6 @@ static int saa5249_attach(struct i2c_adapter *adap, int addr, int kind)
} }
t->client = client; t->client = client;
i2c_attach_client(client); i2c_attach_client(client);
MOD_INC_USE_COUNT;
return 0; return 0;
} }
...@@ -237,7 +236,6 @@ static int saa5249_detach(struct i2c_client *client) ...@@ -237,7 +236,6 @@ static int saa5249_detach(struct i2c_client *client)
kfree(vd->priv); kfree(vd->priv);
kfree(vd); kfree(vd);
kfree(client); kfree(client);
MOD_DEC_USE_COUNT;
return 0; return 0;
} }
......
...@@ -134,7 +134,6 @@ tuner_attach(struct i2c_adapter *adap, int addr, int kind) ...@@ -134,7 +134,6 @@ tuner_attach(struct i2c_adapter *adap, int addr, int kind)
printk("tuner: SAB3036 found, status %02x\n", tuner_getstatus(client)); printk("tuner: SAB3036 found, status %02x\n", tuner_getstatus(client));
i2c_attach_client(client); i2c_attach_client(client);
MOD_INC_USE_COUNT;
if (i2c_master_send(client, buffer, 2) != 2) if (i2c_master_send(client, buffer, 2) != 2)
printk("tuner: i2c i/o error 1\n"); printk("tuner: i2c i/o error 1\n");
...@@ -148,7 +147,6 @@ tuner_attach(struct i2c_adapter *adap, int addr, int kind) ...@@ -148,7 +147,6 @@ tuner_attach(struct i2c_adapter *adap, int addr, int kind)
static int static int
tuner_detach(struct i2c_client *c) tuner_detach(struct i2c_client *c)
{ {
MOD_DEC_USE_COUNT;
return 0; return 0;
} }
......
...@@ -109,6 +109,8 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Richard Proctor (rnp@netlink.co.nz ...@@ -109,6 +109,8 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Richard Proctor (rnp@netlink.co.nz
#include "3c527.h" #include "3c527.h"
MODULE_LICENSE("GPL");
/* /*
* The name of the card. Is used for messages and in the requests for * The name of the card. Is used for messages and in the requests for
* io regions, irqs and dma channels * io regions, irqs and dma channels
......
...@@ -245,6 +245,7 @@ static struct pci_device_id rtl8139_pci_tbl[] = { ...@@ -245,6 +245,7 @@ static struct pci_device_id rtl8139_pci_tbl[] = {
{0x1186, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, {0x1186, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x13d1, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, {0x13d1, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1259, 0xa117, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, {0x1259, 0xa117, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1259, 0xa11e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x14ea, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, {0x14ea, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x14ea, 0xab07, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, {0x14ea, 0xab07, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x11db, 0x1234, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, {0x11db, 0x1234, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
......
...@@ -1036,13 +1036,8 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -1036,13 +1036,8 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
goto release; goto release;
} }
printk(KERN_INFO "%s: ether1 in slot %d, ", for (i = 0; i < 6; i++)
dev->name, ec->slot_no);
for (i = 0; i < 6; i++) {
dev->dev_addr[i] = inb(IDPROM_ADDRESS + i); dev->dev_addr[i] = inb(IDPROM_ADDRESS + i);
printk ("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
}
if (ether1_init_2(dev)) { if (ether1_init_2(dev)) {
ret = -ENODEV; ret = -ENODEV;
...@@ -1061,6 +1056,12 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -1061,6 +1056,12 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
if (ret) if (ret)
goto release; goto release;
printk(KERN_INFO "%s: ether1 in slot %d, ",
dev->name, ec->slot_no);
for (i = 0; i < 6; i++)
printk ("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
ecard_set_drvdata(ec, dev); ecard_set_drvdata(ec, dev);
return 0; return 0;
......
...@@ -881,10 +881,6 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -881,10 +881,6 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
break; break;
} }
printk("%s: %s in slot %d, ", dev->name, name, ec->slot_no);
for (i = 0; i < 6; i++)
printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
if (ether3_init_2(dev)) { if (ether3_init_2(dev)) {
ret = -ENODEV; ret = -ENODEV;
goto failed; goto failed;
...@@ -902,6 +898,10 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -902,6 +898,10 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
if (ret) if (ret)
goto failed; goto failed;
printk("%s: %s in slot %d, ", dev->name, name, ec->slot_no);
for (i = 0; i < 6; i++)
printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
ecard_set_drvdata(ec, dev); ecard_set_drvdata(ec, dev);
return 0; return 0;
......
...@@ -665,12 +665,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -665,12 +665,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
break; break;
} }
printk(KERN_INFO "%s: %s in slot %d, ",
dev->name, dev_type, ec->slot_no);
for (i = 0; i < 6; i++)
printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
ei_local = (struct ei_device *) dev->priv; ei_local = (struct ei_device *) dev->priv;
if (ec->cid.product == PROD_ANT_ETHERM) { if (ec->cid.product == PROD_ANT_ETHERM) {
ei_local->tx_start_page = ETHERM_TX_START_PAGE; ei_local->tx_start_page = ETHERM_TX_START_PAGE;
...@@ -698,6 +692,12 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -698,6 +692,12 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
if (ret) if (ret)
goto release; goto release;
printk(KERN_INFO "%s: %s in slot %d, ",
dev->name, dev_type, ec->slot_no);
for (i = 0; i < 6; i++)
printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
ecard_set_drvdata(ec, dev); ecard_set_drvdata(ec, dev);
return 0; return 0;
......
...@@ -2238,8 +2238,9 @@ static int bond_release_all(struct net_device *master) ...@@ -2238,8 +2238,9 @@ static int bond_release_all(struct net_device *master)
static void bond_mii_monitor(struct net_device *master) static void bond_mii_monitor(struct net_device *master)
{ {
bonding_t *bond = (struct bonding *) master->priv; bonding_t *bond = (struct bonding *) master->priv;
slave_t *slave, *bestslave, *oldcurrent; slave_t *slave, *oldcurrent;
int slave_died = 0; int slave_died = 0;
int do_failover = 0;
read_lock(&bond->lock); read_lock(&bond->lock);
...@@ -2249,7 +2250,6 @@ static void bond_mii_monitor(struct net_device *master) ...@@ -2249,7 +2250,6 @@ static void bond_mii_monitor(struct net_device *master)
* program could monitor the link itself if needed. * program could monitor the link itself if needed.
*/ */
bestslave = NULL;
slave = (slave_t *)bond; slave = (slave_t *)bond;
read_lock(&bond->ptrlock); read_lock(&bond->ptrlock);
...@@ -2257,8 +2257,6 @@ static void bond_mii_monitor(struct net_device *master) ...@@ -2257,8 +2257,6 @@ static void bond_mii_monitor(struct net_device *master)
read_unlock(&bond->ptrlock); read_unlock(&bond->ptrlock);
while ((slave = slave->prev) != (slave_t *)bond) { while ((slave = slave->prev) != (slave_t *)bond) {
/* use updelay+1 to match an UP slave even when updelay is 0 */
int mindelay = updelay + 1;
struct net_device *dev = slave->dev; struct net_device *dev = slave->dev;
int link_state; int link_state;
u16 old_speed = slave->speed; u16 old_speed = slave->speed;
...@@ -2269,14 +2267,7 @@ static void bond_mii_monitor(struct net_device *master) ...@@ -2269,14 +2267,7 @@ static void bond_mii_monitor(struct net_device *master)
switch (slave->link) { switch (slave->link) {
case BOND_LINK_UP: /* the link was up */ case BOND_LINK_UP: /* the link was up */
if (link_state == BMSR_LSTATUS) { if (link_state == BMSR_LSTATUS) {
/* link stays up, tell that this one /* link stays up, nothing more to do */
is immediately available */
if (IS_UP(dev) && (mindelay > -2)) {
/* -2 is the best case :
this slave was already up */
mindelay = -2;
bestslave = slave;
}
break; break;
} }
else { /* link going down */ else { /* link going down */
...@@ -2316,6 +2307,7 @@ static void bond_mii_monitor(struct net_device *master) ...@@ -2316,6 +2307,7 @@ static void bond_mii_monitor(struct net_device *master)
(bond_mode == BOND_MODE_8023AD)) { (bond_mode == BOND_MODE_8023AD)) {
bond_set_slave_inactive_flags(slave); bond_set_slave_inactive_flags(slave);
} }
printk(KERN_INFO printk(KERN_INFO
"%s: link status definitely down " "%s: link status definitely down "
"for interface %s, disabling it", "for interface %s, disabling it",
...@@ -2332,12 +2324,10 @@ static void bond_mii_monitor(struct net_device *master) ...@@ -2332,12 +2324,10 @@ static void bond_mii_monitor(struct net_device *master)
bond_alb_handle_link_change(bond, slave, BOND_LINK_DOWN); bond_alb_handle_link_change(bond, slave, BOND_LINK_DOWN);
} }
write_lock(&bond->ptrlock); if (slave == oldcurrent) {
if (slave == bond->current_slave) { do_failover = 1;
/* find a new interface and be verbose */
reselect_active_interface(bond);
} }
write_unlock(&bond->ptrlock);
slave_died = 1; slave_died = 1;
} else { } else {
slave->delay--; slave->delay--;
...@@ -2352,13 +2342,6 @@ static void bond_mii_monitor(struct net_device *master) ...@@ -2352,13 +2342,6 @@ static void bond_mii_monitor(struct net_device *master)
master->name, master->name,
(downdelay - slave->delay) * miimon, (downdelay - slave->delay) * miimon,
dev->name); dev->name);
if (IS_UP(dev) && (mindelay > -1)) {
/* -1 is a good case : this slave went
down only for a short time */
mindelay = -1;
bestslave = slave;
}
} }
break; break;
case BOND_LINK_DOWN: /* the link was down */ case BOND_LINK_DOWN: /* the link was down */
...@@ -2428,26 +2411,12 @@ static void bond_mii_monitor(struct net_device *master) ...@@ -2428,26 +2411,12 @@ static void bond_mii_monitor(struct net_device *master)
bond_alb_handle_link_change(bond, slave, BOND_LINK_UP); bond_alb_handle_link_change(bond, slave, BOND_LINK_UP);
} }
write_lock(&bond->ptrlock); if ((oldcurrent == NULL) ||
if ( (bond->primary_slave != NULL) (slave == bond->primary_slave)) {
&& (slave == bond->primary_slave) ) do_failover = 1;
reselect_active_interface(bond); }
write_unlock(&bond->ptrlock); } else {
}
else
slave->delay--; slave->delay--;
/* we'll also look for the mostly eligible slave */
if (bond->primary_slave == NULL) {
if (IS_UP(dev) && (slave->delay < mindelay)) {
mindelay = slave->delay;
bestslave = slave;
}
} else if ( (IS_UP(bond->primary_slave->dev)) ||
( (!IS_UP(bond->primary_slave->dev)) &&
(IS_UP(dev) && (slave->delay < mindelay)) ) ) {
mindelay = slave->delay;
bestslave = slave;
} }
} }
break; break;
...@@ -2466,26 +2435,17 @@ static void bond_mii_monitor(struct net_device *master) ...@@ -2466,26 +2435,17 @@ static void bond_mii_monitor(struct net_device *master)
} /* end of while */ } /* end of while */
/* if (do_failover) {
* if there's no active interface and we discovered that one write_lock(&bond->ptrlock);
* of the slaves could be activated earlier, so we do it.
*/
read_lock(&bond->ptrlock);
oldcurrent = bond->current_slave;
read_unlock(&bond->ptrlock);
/* no active interface at the moment or need to bring up the primary */ reselect_active_interface(bond);
if (oldcurrent == NULL) { /* no active interface at the moment */ if (oldcurrent && !bond->current_slave) {
if (bestslave != NULL) { /* last chance to find one ? */
write_lock(&bond->ptrlock);
change_active_interface(bond, bestslave);
write_unlock(&bond->ptrlock);
} else if (slave_died) {
/* print this message only once a slave has just died */
printk(KERN_INFO printk(KERN_INFO
"%s: now running without any active interface !\n", "%s: now running without any active interface !\n",
master->name); master->name);
} }
write_unlock(&bond->ptrlock);
} }
read_unlock(&bond->lock); read_unlock(&bond->lock);
...@@ -2503,9 +2463,10 @@ static void bond_mii_monitor(struct net_device *master) ...@@ -2503,9 +2463,10 @@ static void bond_mii_monitor(struct net_device *master)
static void loadbalance_arp_monitor(struct net_device *master) static void loadbalance_arp_monitor(struct net_device *master)
{ {
bonding_t *bond; bonding_t *bond;
slave_t *slave; slave_t *slave, *oldcurrent;
int the_delta_in_ticks = arp_interval * HZ / 1000; int the_delta_in_ticks = arp_interval * HZ / 1000;
int next_timer = jiffies + (arp_interval * HZ / 1000); int next_timer = jiffies + (arp_interval * HZ / 1000);
int do_failover = 0;
bond = (struct bonding *) master->priv; bond = (struct bonding *) master->priv;
if (master->priv == NULL) { if (master->priv == NULL) {
...@@ -2529,6 +2490,10 @@ static void loadbalance_arp_monitor(struct net_device *master) ...@@ -2529,6 +2490,10 @@ static void loadbalance_arp_monitor(struct net_device *master)
read_lock(&bond->lock); read_lock(&bond->lock);
read_lock(&bond->ptrlock);
oldcurrent = bond->current_slave;
read_unlock(&bond->ptrlock);
/* see if any of the previous devices are up now (i.e. they have /* see if any of the previous devices are up now (i.e. they have
* xmt and rcv traffic). the current_slave does not come into * xmt and rcv traffic). the current_slave does not come into
* the picture unless it is null. also, slave->jiffies is not needed * the picture unless it is null. also, slave->jiffies is not needed
...@@ -2555,21 +2520,19 @@ static void loadbalance_arp_monitor(struct net_device *master) ...@@ -2555,21 +2520,19 @@ static void loadbalance_arp_monitor(struct net_device *master)
* current_slave being null after enslaving * current_slave being null after enslaving
* is closed. * is closed.
*/ */
write_lock(&bond->ptrlock); if (oldcurrent == NULL) {
if (bond->current_slave == NULL) {
printk(KERN_INFO printk(KERN_INFO
"%s: link status definitely up " "%s: link status definitely up "
"for interface %s, ", "for interface %s, ",
master->name, master->name,
slave->dev->name); slave->dev->name);
reselect_active_interface(bond); do_failover = 1;
} else { } else {
printk(KERN_INFO printk(KERN_INFO
"%s: interface %s is now up\n", "%s: interface %s is now up\n",
master->name, master->name,
slave->dev->name); slave->dev->name);
} }
write_unlock(&bond->ptrlock);
} }
} else { } else {
/* slave->link == BOND_LINK_UP */ /* slave->link == BOND_LINK_UP */
...@@ -2592,11 +2555,9 @@ static void loadbalance_arp_monitor(struct net_device *master) ...@@ -2592,11 +2555,9 @@ static void loadbalance_arp_monitor(struct net_device *master)
master->name, master->name,
slave->dev->name); slave->dev->name);
write_lock(&bond->ptrlock); if (slave == oldcurrent) {
if (slave == bond->current_slave) { do_failover = 1;
reselect_active_interface(bond);
} }
write_unlock(&bond->ptrlock);
} }
} }
...@@ -2612,6 +2573,19 @@ static void loadbalance_arp_monitor(struct net_device *master) ...@@ -2612,6 +2573,19 @@ static void loadbalance_arp_monitor(struct net_device *master)
} }
} }
if (do_failover) {
write_lock(&bond->ptrlock);
reselect_active_interface(bond);
if (oldcurrent && !bond->current_slave) {
printk(KERN_INFO
"%s: now running without any active interface !\n",
master->name);
}
write_unlock(&bond->ptrlock);
}
read_unlock(&bond->lock); read_unlock(&bond->lock);
rtnl_exunlock(); rtnl_exunlock();
rtnl_shunlock(); rtnl_shunlock();
......
...@@ -502,6 +502,8 @@ static void fmvj18x_config(dev_link_t *link) ...@@ -502,6 +502,8 @@ static void fmvj18x_config(dev_link_t *link)
} }
if (link->io.NumPorts2 != 0) { if (link->io.NumPorts2 != 0) {
link->irq.Attributes =
IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT;
ret = mfc_try_io_port(link); ret = mfc_try_io_port(link);
if (ret != CS_SUCCESS) goto cs_failed; if (ret != CS_SUCCESS) goto cs_failed;
} else if (cardtype == UNGERMANN) { } else if (cardtype == UNGERMANN) {
......
...@@ -136,7 +136,7 @@ typedef struct ibmtr_dev_t { ...@@ -136,7 +136,7 @@ typedef struct ibmtr_dev_t {
struct net_device *dev; struct net_device *dev;
dev_node_t node; dev_node_t node;
window_handle_t sram_win_handle; window_handle_t sram_win_handle;
struct tok_info ti; struct tok_info *ti;
} ibmtr_dev_t; } ibmtr_dev_t;
static void netdev_get_drvinfo(struct net_device *dev, static void netdev_get_drvinfo(struct net_device *dev,
...@@ -168,13 +168,18 @@ static dev_link_t *ibmtr_attach(void) ...@@ -168,13 +168,18 @@ static dev_link_t *ibmtr_attach(void)
DEBUG(0, "ibmtr_attach()\n"); DEBUG(0, "ibmtr_attach()\n");
/* Create new token-ring device */ /* Create new token-ring device */
dev = alloc_trdev(sizeof(*info)); info = kmalloc(sizeof(*info), GFP_KERNEL);
if (!dev) if (!info) return NULL;
return NULL; memset(info,0,sizeof(*info));
info = dev->priv; dev = alloc_trdev(sizeof(struct tok_info));
if (!dev) {
kfree(info);
return NULL;
}
link = &info->link; link = &info->link;
link->priv = info; link->priv = info;
info->ti = dev->priv;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 4; link->io.NumPorts1 = 4;
...@@ -265,6 +270,7 @@ static void ibmtr_detach(dev_link_t *link) ...@@ -265,6 +270,7 @@ static void ibmtr_detach(dev_link_t *link)
*linkp = link->next; *linkp = link->next;
unregister_netdev(dev); unregister_netdev(dev);
free_netdev(dev); free_netdev(dev);
kfree(info);
} /* ibmtr_detach */ } /* ibmtr_detach */
/*====================================================================== /*======================================================================
......
...@@ -292,6 +292,7 @@ struct rtl8169_private { ...@@ -292,6 +292,7 @@ struct rtl8169_private {
MODULE_AUTHOR("Realtek"); MODULE_AUTHOR("Realtek");
MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver"); MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver");
MODULE_PARM(media, "1-" __MODULE_STRING(MAX_UNITS) "i"); MODULE_PARM(media, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_LICENSE("GPL");
static int rtl8169_open(struct net_device *dev); static int rtl8169_open(struct net_device *dev);
static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev); static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev);
......
...@@ -1438,7 +1438,7 @@ static void sis900_tx_timeout(struct net_device *net_dev) ...@@ -1438,7 +1438,7 @@ static void sis900_tx_timeout(struct net_device *net_dev)
pci_unmap_single(sis_priv->pci_dev, pci_unmap_single(sis_priv->pci_dev,
sis_priv->tx_ring[i].bufptr, skb->len, sis_priv->tx_ring[i].bufptr, skb->len,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
dev_kfree_skb(skb); dev_kfree_skb_irq(skb);
sis_priv->tx_skbuff[i] = 0; sis_priv->tx_skbuff[i] = 0;
sis_priv->tx_ring[i].cmdsts = 0; sis_priv->tx_ring[i].cmdsts = 0;
sis_priv->tx_ring[i].bufptr = 0; sis_priv->tx_ring[i].bufptr = 0;
......
...@@ -139,6 +139,7 @@ TODO: bugfixes (no bugs known as of right now) ...@@ -139,6 +139,7 @@ TODO: bugfixes (no bugs known as of right now)
#include <linux/config.h> #include <linux/config.h>
#include <linux/version.h> #include <linux/version.h>
#include <linux/module.h> #include <linux/module.h>
#include <asm/io.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
...@@ -1174,15 +1175,9 @@ static int netdev_open(struct net_device *dev) ...@@ -1174,15 +1175,9 @@ static int netdev_open(struct net_device *dev)
TX_DESC_SPACING | TX_DESC_TYPE, TX_DESC_SPACING | TX_DESC_TYPE,
ioaddr + TxDescCtrl); ioaddr + TxDescCtrl);
#if defined(ADDR_64BITS) writel( (np->queue_mem_dma >> 16) >> 16, ioaddr + RxDescQHiAddr);
writel(np->queue_mem_dma >> 32, ioaddr + RxDescQHiAddr); writel( (np->queue_mem_dma >> 16) >> 16, ioaddr + TxRingHiAddr);
writel(np->queue_mem_dma >> 32, ioaddr + TxRingHiAddr); writel( (np->queue_mem_dma >> 16) >> 16, ioaddr + CompletionHiAddr);
writel(np->queue_mem_dma >> 32, ioaddr + CompletionHiAddr);
#else
writel(0, ioaddr + RxDescQHiAddr);
writel(0, ioaddr + TxRingHiAddr);
writel(0, ioaddr + CompletionHiAddr);
#endif
writel(np->rx_ring_dma, ioaddr + RxDescQAddr); writel(np->rx_ring_dma, ioaddr + RxDescQAddr);
writel(np->tx_ring_dma, ioaddr + TxRingPtr); writel(np->tx_ring_dma, ioaddr + TxRingPtr);
......
...@@ -152,7 +152,7 @@ static char version[] __initdata = ...@@ -152,7 +152,7 @@ static char version[] __initdata =
/* this allows displaying full adapter information */ /* this allows displaying full adapter information */
char *channel_def[] __initdata = { "ISA", "MCA", "ISA P&P" }; char *channel_def[] __devinitdata = { "ISA", "MCA", "ISA P&P" };
static char pcchannelid[] __devinitdata = { static char pcchannelid[] __devinitdata = {
0x05, 0x00, 0x04, 0x09, 0x05, 0x00, 0x04, 0x09,
...@@ -864,7 +864,8 @@ static int tok_open(struct net_device *dev) ...@@ -864,7 +864,8 @@ static int tok_open(struct net_device *dev)
ti->sram_virt &= ~1; /* to reverse what we do in tok_close */ ti->sram_virt &= ~1; /* to reverse what we do in tok_close */
/* init the spinlock */ /* init the spinlock */
ti->lock = (spinlock_t) SPIN_LOCK_UNLOCKED; ti->lock = (spinlock_t) SPIN_LOCK_UNLOCKED;
init_timer(&ti->tr_timer);
i = tok_init_card(dev); i = tok_init_card(dev);
if (i) return i; if (i) return i;
...@@ -1033,7 +1034,7 @@ static int tok_close(struct net_device *dev) ...@@ -1033,7 +1034,7 @@ static int tok_close(struct net_device *dev)
/* Important for PCMCIA hot unplug, otherwise, we'll pull the card, */ /* Important for PCMCIA hot unplug, otherwise, we'll pull the card, */
/* unloading the module from memory, and then if a timer pops, ouch */ /* unloading the module from memory, and then if a timer pops, ouch */
del_timer(&ti->tr_timer); del_timer_sync(&ti->tr_timer);
outb(0, dev->base_addr + ADAPTRESET); outb(0, dev->base_addr + ADAPTRESET);
ti->sram_virt |= 1; ti->sram_virt |= 1;
ti->open_status = CLOSED; ti->open_status = CLOSED;
......
...@@ -982,6 +982,7 @@ static void timer_func( struct net_device *dev ); ...@@ -982,6 +982,7 @@ static void timer_func( struct net_device *dev );
static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
#ifdef WIRELESS_EXT #ifdef WIRELESS_EXT
struct iw_statistics *airo_get_wireless_stats (struct net_device *dev); struct iw_statistics *airo_get_wireless_stats (struct net_device *dev);
static void airo_read_wireless_stats (struct airo_info *local);
#endif /* WIRELESS_EXT */ #endif /* WIRELESS_EXT */
#ifdef CISCO_EXT #ifdef CISCO_EXT
static int readrids(struct net_device *dev, aironet_ioctl *comp); static int readrids(struct net_device *dev, aironet_ioctl *comp);
...@@ -1027,7 +1028,7 @@ struct airo_info { ...@@ -1027,7 +1028,7 @@ struct airo_info {
#define FLAG_PENDING_XMIT 9 #define FLAG_PENDING_XMIT 9
#define FLAG_PENDING_XMIT11 10 #define FLAG_PENDING_XMIT11 10
#define FLAG_PCI 11 #define FLAG_PCI 11
#define JOB_MASK 0xff0000 #define JOB_MASK 0x1ff0000
#define JOB_DIE 16 #define JOB_DIE 16
#define JOB_XMIT 17 #define JOB_XMIT 17
#define JOB_XMIT11 18 #define JOB_XMIT11 18
...@@ -1036,6 +1037,7 @@ struct airo_info { ...@@ -1036,6 +1037,7 @@ struct airo_info {
#define JOB_MIC 21 #define JOB_MIC 21
#define JOB_EVENT 22 #define JOB_EVENT 22
#define JOB_AUTOWEP 23 #define JOB_AUTOWEP 23
#define JOB_WSTATS 24
int (*bap_read)(struct airo_info*, u16 *pu16Dst, int bytelen, int (*bap_read)(struct airo_info*, u16 *pu16Dst, int bytelen,
int whichbap); int whichbap);
unsigned short *flash; unsigned short *flash;
...@@ -1692,8 +1694,8 @@ static int writeConfigRid(struct airo_info*ai, int lock) { ...@@ -1692,8 +1694,8 @@ static int writeConfigRid(struct airo_info*ai, int lock) {
return PC4500_writerid( ai, RID_CONFIG, &cfgr, sizeof(cfgr), lock); return PC4500_writerid( ai, RID_CONFIG, &cfgr, sizeof(cfgr), lock);
} }
static int readStatusRid(struct airo_info*ai, StatusRid *statr) { static int readStatusRid(struct airo_info*ai, StatusRid *statr, int lock) {
int rc = PC4500_readrid(ai, RID_STATUS, statr, sizeof(*statr), 1); int rc = PC4500_readrid(ai, RID_STATUS, statr, sizeof(*statr), lock);
u16 *s; u16 *s;
statr->len = le16_to_cpu(statr->len); statr->len = le16_to_cpu(statr->len);
...@@ -2415,6 +2417,8 @@ static int airo_thread(void *data) { ...@@ -2415,6 +2417,8 @@ static int airo_thread(void *data) {
airo_end_xmit11(dev); airo_end_xmit11(dev);
else if (test_bit(JOB_STATS, &ai->flags)) else if (test_bit(JOB_STATS, &ai->flags))
airo_read_stats(ai); airo_read_stats(ai);
else if (test_bit(JOB_WSTATS, &ai->flags))
airo_read_wireless_stats(ai);
else if (test_bit(JOB_PROMISC, &ai->flags)) else if (test_bit(JOB_PROMISC, &ai->flags))
airo_set_promisc(ai); airo_set_promisc(ai);
#ifdef MICSUPPORT #ifdef MICSUPPORT
...@@ -2944,7 +2948,6 @@ static u16 setup_card(struct airo_info *ai, u8 *mac) ...@@ -2944,7 +2948,6 @@ static u16 setup_card(struct airo_info *ai, u8 *mac)
ai->config.opmode = adhoc ? MODE_STA_IBSS : MODE_STA_ESS; ai->config.opmode = adhoc ? MODE_STA_IBSS : MODE_STA_ESS;
ai->config.authType = AUTH_OPEN; ai->config.authType = AUTH_OPEN;
ai->config.modulation = MOD_CCK; ai->config.modulation = MOD_CCK;
ai->config._reserved1a[0] = 2; /* ??? */
#ifdef MICSUPPORT #ifdef MICSUPPORT
if ((cap_rid.len>=sizeof(cap_rid)) && (cap_rid.extSoftCap&1) && if ((cap_rid.len>=sizeof(cap_rid)) && (cap_rid.extSoftCap&1) &&
...@@ -3723,7 +3726,7 @@ static int proc_status_open( struct inode *inode, struct file *file ) { ...@@ -3723,7 +3726,7 @@ static int proc_status_open( struct inode *inode, struct file *file ) {
return -ENOMEM; return -ENOMEM;
} }
readStatusRid(apriv, &status_rid); readStatusRid(apriv, &status_rid, 1);
readCapabilityRid(apriv, &cap_rid); readCapabilityRid(apriv, &cap_rid);
i = sprintf(data->rbuffer, "Status: %s%s%s%s%s%s%s%s%s\n", i = sprintf(data->rbuffer, "Status: %s%s%s%s%s%s%s%s%s\n",
...@@ -4767,7 +4770,7 @@ static int airo_get_freq(struct net_device *dev, ...@@ -4767,7 +4770,7 @@ static int airo_get_freq(struct net_device *dev,
if ((local->config.opmode & 0xFF) == MODE_STA_ESS) if ((local->config.opmode & 0xFF) == MODE_STA_ESS)
status_rid.channel = local->config.channelSet; status_rid.channel = local->config.channelSet;
else else
readStatusRid(local, &status_rid); readStatusRid(local, &status_rid, 1);
#ifdef WEXT_USECHANNELS #ifdef WEXT_USECHANNELS
fwrq->m = ((int)status_rid.channel) + 1; fwrq->m = ((int)status_rid.channel) + 1;
...@@ -4842,7 +4845,7 @@ static int airo_get_essid(struct net_device *dev, ...@@ -4842,7 +4845,7 @@ static int airo_get_essid(struct net_device *dev,
struct airo_info *local = dev->priv; struct airo_info *local = dev->priv;
StatusRid status_rid; /* Card status info */ StatusRid status_rid; /* Card status info */
readStatusRid(local, &status_rid); readStatusRid(local, &status_rid, 1);
/* Note : if dwrq->flags != 0, we should /* Note : if dwrq->flags != 0, we should
* get the relevant SSID from the SSID list... */ * get the relevant SSID from the SSID list... */
...@@ -4906,7 +4909,7 @@ static int airo_get_wap(struct net_device *dev, ...@@ -4906,7 +4909,7 @@ static int airo_get_wap(struct net_device *dev,
struct airo_info *local = dev->priv; struct airo_info *local = dev->priv;
StatusRid status_rid; /* Card status info */ StatusRid status_rid; /* Card status info */
readStatusRid(local, &status_rid); readStatusRid(local, &status_rid, 1);
/* Tentative. This seems to work, wow, I'm lucky !!! */ /* Tentative. This seems to work, wow, I'm lucky !!! */
memcpy(awrq->sa_data, status_rid.bssid[0], ETH_ALEN); memcpy(awrq->sa_data, status_rid.bssid[0], ETH_ALEN);
...@@ -5039,7 +5042,7 @@ static int airo_get_rate(struct net_device *dev, ...@@ -5039,7 +5042,7 @@ static int airo_get_rate(struct net_device *dev,
struct airo_info *local = dev->priv; struct airo_info *local = dev->priv;
StatusRid status_rid; /* Card status info */ StatusRid status_rid; /* Card status info */
readStatusRid(local, &status_rid); readStatusRid(local, &status_rid, 1);
vwrq->value = status_rid.currentXmitRate * 500000; vwrq->value = status_rid.currentXmitRate * 500000;
/* If more than one rate, set auto */ /* If more than one rate, set auto */
...@@ -5755,7 +5758,7 @@ static int airo_get_aplist(struct net_device *dev, ...@@ -5755,7 +5758,7 @@ static int airo_get_aplist(struct net_device *dev,
} }
if (!i) { if (!i) {
StatusRid status_rid; /* Card status info */ StatusRid status_rid; /* Card status info */
readStatusRid(local, &status_rid); readStatusRid(local, &status_rid, 1);
for (i = 0; for (i = 0;
i < min(IW_MAX_AP, 4) && i < min(IW_MAX_AP, 4) &&
(status_rid.bssid[i][0] (status_rid.bssid[i][0]
...@@ -6562,16 +6565,17 @@ static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -6562,16 +6565,17 @@ static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
* *
* Jean * Jean
*/ */
struct iw_statistics *airo_get_wireless_stats(struct net_device *dev) static void airo_read_wireless_stats(struct airo_info *local)
{ {
struct airo_info *local = dev->priv;
StatusRid status_rid; StatusRid status_rid;
StatsRid stats_rid; StatsRid stats_rid;
u32 *vals = stats_rid.vals; u32 *vals = stats_rid.vals;
/* Get stats out of the card */ /* Get stats out of the card */
readStatusRid(local, &status_rid); clear_bit(JOB_WSTATS, &local->flags);
readStatsRid(local, &stats_rid, RID_STATS, 1); readStatusRid(local, &status_rid, 0);
readStatsRid(local, &stats_rid, RID_STATS, 0);
up(&local->sem);
/* The status */ /* The status */
local->wstats.status = status_rid.mode; local->wstats.status = status_rid.mode;
...@@ -6598,6 +6602,19 @@ struct iw_statistics *airo_get_wireless_stats(struct net_device *dev) ...@@ -6598,6 +6602,19 @@ struct iw_statistics *airo_get_wireless_stats(struct net_device *dev)
local->wstats.discard.retries = vals[10]; local->wstats.discard.retries = vals[10];
local->wstats.discard.misc = vals[1] + vals[32]; local->wstats.discard.misc = vals[1] + vals[32];
local->wstats.miss.beacon = vals[34]; local->wstats.miss.beacon = vals[34];
}
struct iw_statistics *airo_get_wireless_stats(struct net_device *dev)
{
struct airo_info *local = dev->priv;
/* Get stats out of the card if available */
if (down_trylock(&local->sem) != 0) {
set_bit(JOB_WSTATS, &local->flags);
wake_up_interruptible(&local->thr_wait);
} else
airo_read_wireless_stats(local);
return &local->wstats; return &local->wstats;
} }
#endif /* WIRELESS_EXT */ #endif /* WIRELESS_EXT */
......
...@@ -132,13 +132,19 @@ pci_setup_cardbus(struct pci_bus *bus) ...@@ -132,13 +132,19 @@ pci_setup_cardbus(struct pci_bus *bus)
PCI-to-PCI Bridge Architecture Specification rev. 1.1 (1998) PCI-to-PCI Bridge Architecture Specification rev. 1.1 (1998)
requires that if there is no I/O ports or memory behind the requires that if there is no I/O ports or memory behind the
bridge, corresponding range must be turned off by writing base bridge, corresponding range must be turned off by writing base
value greater than limit to the bridge's base/limit registers. */ value greater than limit to the bridge's base/limit registers.
Note: care must be taken when updating I/O base/limit registers
of bridges which support 32-bit I/O. This update requires two
config space writes, so it's quite possible that an I/O window of
the bridge will have some undesirable address (e.g. 0) after the
first write. Ditto 64-bit prefetchable MMIO. */
static void __devinit static void __devinit
pci_setup_bridge(struct pci_bus *bus) pci_setup_bridge(struct pci_bus *bus)
{ {
struct pci_dev *bridge = bus->self; struct pci_dev *bridge = bus->self;
struct pci_bus_region region; struct pci_bus_region region;
u32 l; u32 l, io_upper16;
DBGC((KERN_INFO "PCI: Bus %d, bridge: %s\n", DBGC((KERN_INFO "PCI: Bus %d, bridge: %s\n",
bus->number, pci_name(bridge))); bus->number, pci_name(bridge)));
...@@ -151,20 +157,22 @@ pci_setup_bridge(struct pci_bus *bus) ...@@ -151,20 +157,22 @@ pci_setup_bridge(struct pci_bus *bus)
l |= (region.start >> 8) & 0x00f0; l |= (region.start >> 8) & 0x00f0;
l |= region.end & 0xf000; l |= region.end & 0xf000;
/* Set up upper 16 bits of I/O base/limit. */ /* Set up upper 16 bits of I/O base/limit. */
pci_write_config_word(bridge, PCI_IO_BASE_UPPER16, io_upper16 = (region.end & 0xffff0000) | (region.start >> 16);
region.start >> 16);
pci_write_config_word(bridge, PCI_IO_LIMIT_UPPER16,
region.end >> 16);
DBGC((KERN_INFO " IO window: %04lx-%04lx\n", DBGC((KERN_INFO " IO window: %04lx-%04lx\n",
region.start, region.end)); region.start, region.end));
} }
else { else {
/* Clear upper 16 bits of I/O base/limit. */ /* Clear upper 16 bits of I/O base/limit. */
pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, 0); io_upper16 = 0;
l = 0x00f0; l = 0x00f0;
DBGC((KERN_INFO " IO window: disabled.\n")); DBGC((KERN_INFO " IO window: disabled.\n"));
} }
/* Temporarily disable the I/O range before updating PCI_IO_BASE. */
pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, 0x0000ffff);
/* Update lower 16 bits of I/O base/limit. */
pci_write_config_dword(bridge, PCI_IO_BASE, l); pci_write_config_dword(bridge, PCI_IO_BASE, l);
/* Update upper 16 bits of I/O base/limit. */
pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, io_upper16);
/* Set up the top and bottom of the PCI Memory segment /* Set up the top and bottom of the PCI Memory segment
for this bus. */ for this bus. */
...@@ -181,8 +189,9 @@ pci_setup_bridge(struct pci_bus *bus) ...@@ -181,8 +189,9 @@ pci_setup_bridge(struct pci_bus *bus)
} }
pci_write_config_dword(bridge, PCI_MEMORY_BASE, l); pci_write_config_dword(bridge, PCI_MEMORY_BASE, l);
/* Clear out the upper 32 bits of PREF base/limit. */ /* Clear out the upper 32 bits of PREF limit.
pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, 0); If PCI_PREF_BASE_UPPER32 was non-zero, this temporarily
disables PREF range, which is ok. */
pci_write_config_dword(bridge, PCI_PREF_LIMIT_UPPER32, 0); pci_write_config_dword(bridge, PCI_PREF_LIMIT_UPPER32, 0);
/* Set up PREF base/limit. */ /* Set up PREF base/limit. */
...@@ -199,6 +208,9 @@ pci_setup_bridge(struct pci_bus *bus) ...@@ -199,6 +208,9 @@ pci_setup_bridge(struct pci_bus *bus)
} }
pci_write_config_dword(bridge, PCI_PREF_MEMORY_BASE, l); pci_write_config_dword(bridge, PCI_PREF_MEMORY_BASE, l);
/* Clear out the upper 32 bits of PREF base. */
pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, 0);
/* Check if we have VGA behind the bridge. /* Check if we have VGA behind the bridge.
Enable ISA in either case (FIXME!). */ Enable ISA in either case (FIXME!). */
l = (bus->resource[0]->flags & IORESOURCE_BUS_HAS_VGA) ? 0x0c : 0x04; l = (bus->resource[0]->flags & IORESOURCE_BUS_HAS_VGA) ? 0x0c : 0x04;
......
...@@ -461,6 +461,7 @@ static void yenta_clear_maps(struct yenta_socket *socket) ...@@ -461,6 +461,7 @@ static void yenta_clear_maps(struct yenta_socket *socket)
static int yenta_sock_init(struct pcmcia_socket *sock) static int yenta_sock_init(struct pcmcia_socket *sock)
{ {
struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket); struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket);
u32 state;
u16 bridge; u16 bridge;
bridge = config_readw(socket, CB_BRIDGE_CONTROL) & ~CB_BRIDGE_INTR; bridge = config_readw(socket, CB_BRIDGE_CONTROL) & ~CB_BRIDGE_INTR;
...@@ -472,7 +473,10 @@ static int yenta_sock_init(struct pcmcia_socket *sock) ...@@ -472,7 +473,10 @@ static int yenta_sock_init(struct pcmcia_socket *sock)
exca_writeb(socket, I365_GENCTL, 0x00); exca_writeb(socket, I365_GENCTL, 0x00);
/* Redo card voltage interrogation */ /* Redo card voltage interrogation */
cb_writel(socket, CB_SOCKET_FORCE, CB_CVSTEST); state = cb_readl(socket, CB_SOCKET_STATE);
if (!(state & (CB_CDETECT1 | CB_CDETECT2 | CB_5VCARD |
CB_3VCARD | CB_XVCARD | CB_YVCARD)))
cb_writel(socket, CB_SOCKET_FORCE, CB_CVSTEST);
yenta_clear_maps(socket); yenta_clear_maps(socket);
......
...@@ -1160,7 +1160,7 @@ int __init isapnp_init(void) ...@@ -1160,7 +1160,7 @@ int __init isapnp_init(void)
return 0; return 0;
} }
device_initcall(isapnp_init); fs_initcall(isapnp_init);
/* format is: noisapnp */ /* format is: noisapnp */
......
...@@ -1707,6 +1707,9 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i) ...@@ -1707,6 +1707,9 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i)
strcat(stat_buf, "\n"); strcat(stat_buf, "\n");
ret += sprintf(buf + ret, stat_buf); ret += sprintf(buf + ret, stat_buf);
} else {
strcat(buf, "\n");
ret++;
} }
#undef STATBIT #undef STATBIT
#undef INFOBIT #undef INFOBIT
......
...@@ -73,7 +73,7 @@ config USB_SERIAL_BELKIN ...@@ -73,7 +73,7 @@ config USB_SERIAL_BELKIN
config USB_SERIAL_WHITEHEAT config USB_SERIAL_WHITEHEAT
tristate "USB ConnectTech WhiteHEAT Serial Driver" tristate "USB ConnectTech WhiteHEAT Serial Driver"
depends on USB_SERIAL depends on USB_SERIAL && BROKEN_ON_SMP
help help
Say Y here if you want to use a ConnectTech WhiteHEAT 4 port Say Y here if you want to use a ConnectTech WhiteHEAT 4 port
USB to serial converter device. USB to serial converter device.
......
...@@ -444,7 +444,7 @@ struct digi_port { ...@@ -444,7 +444,7 @@ struct digi_port {
/* Local Function Declarations */ /* Local Function Declarations */
static void digi_wakeup_write( struct usb_serial_port *port ); static void digi_wakeup_write( struct usb_serial_port *port );
static void digi_wakeup_write_lock( struct usb_serial_port *port ); static void digi_wakeup_write_lock(void *);
static int digi_write_oob_command( struct usb_serial_port *port, static int digi_write_oob_command( struct usb_serial_port *port,
unsigned char *buf, int count, int interruptible ); unsigned char *buf, int count, int interruptible );
static int digi_write_inb_command( struct usb_serial_port *port, static int digi_write_inb_command( struct usb_serial_port *port,
...@@ -608,9 +608,9 @@ static inline long cond_wait_interruptible_timeout_irqrestore( ...@@ -608,9 +608,9 @@ static inline long cond_wait_interruptible_timeout_irqrestore(
* on writes. * on writes.
*/ */
static void digi_wakeup_write_lock( struct usb_serial_port *port ) static void digi_wakeup_write_lock(void *arg)
{ {
struct usb_serial_port *port = arg;
unsigned long flags; unsigned long flags;
struct digi_port *priv = usb_get_serial_port_data(port); struct digi_port *priv = usb_get_serial_port_data(port);
......
...@@ -677,7 +677,7 @@ static void dio_zero_block(struct dio *dio, int end) ...@@ -677,7 +677,7 @@ static void dio_zero_block(struct dio *dio, int end)
this_chunk_bytes = this_chunk_blocks << dio->blkbits; this_chunk_bytes = this_chunk_blocks << dio->blkbits;
page = ZERO_PAGE(dio->cur_user_address); page = ZERO_PAGE(dio->curr_user_address);
if (submit_page_section(dio, page, 0, this_chunk_bytes, if (submit_page_section(dio, page, 0, this_chunk_bytes,
dio->next_block_for_io)) dio->next_block_for_io))
return; return;
......
...@@ -147,10 +147,13 @@ static int start_this_handle(journal_t *journal, handle_t *handle) ...@@ -147,10 +147,13 @@ static int start_this_handle(journal_t *journal, handle_t *handle)
* lock to be released. * lock to be released.
*/ */
if (transaction->t_state == T_LOCKED) { if (transaction->t_state == T_LOCKED) {
DEFINE_WAIT(wait);
prepare_to_wait(&journal->j_wait_transaction_locked,
&wait, TASK_UNINTERRUPTIBLE);
spin_unlock(&journal->j_state_lock); spin_unlock(&journal->j_state_lock);
jbd_debug(3, "Handle %p stalling...\n", handle); schedule();
wait_event(journal->j_wait_transaction_locked, finish_wait(&journal->j_wait_transaction_locked, &wait);
transaction->t_state != T_LOCKED);
goto repeat; goto repeat;
} }
......
...@@ -511,9 +511,6 @@ void __invalidate_metapages(struct inode *ip, s64 addr, int len) ...@@ -511,9 +511,6 @@ void __invalidate_metapages(struct inode *ip, s64 addr, int len)
if (mp) { if (mp) {
set_bit(META_discard, &mp->flag); set_bit(META_discard, &mp->flag);
spin_unlock(&meta_lock); spin_unlock(&meta_lock);
lock_page(mp->page);
block_invalidatepage(mp->page, 0);
unlock_page(mp->page);
} else { } else {
spin_unlock(&meta_lock); spin_unlock(&meta_lock);
page = find_lock_page(mapping, lblock>>l2BlocksPerPage); page = find_lock_page(mapping, lblock>>l2BlocksPerPage);
......
...@@ -49,7 +49,6 @@ struct serial_struct { ...@@ -49,7 +49,6 @@ struct serial_struct {
unsigned short iomem_reg_shift; unsigned short iomem_reg_shift;
unsigned int port_high; unsigned int port_high;
unsigned long iomap_base; /* cookie passed into ioremap */ unsigned long iomap_base; /* cookie passed into ioremap */
int reserved[1];
}; };
/* /*
......
...@@ -1658,7 +1658,7 @@ static struct module *load_module(void __user *umod, ...@@ -1658,7 +1658,7 @@ static struct module *load_module(void __user *umod,
NULL); NULL);
} }
if (err < 0) if (err < 0)
goto cleanup; goto arch_cleanup;
/* Get rid of temporary copy */ /* Get rid of temporary copy */
vfree(hdr); vfree(hdr);
...@@ -1666,6 +1666,8 @@ static struct module *load_module(void __user *umod, ...@@ -1666,6 +1666,8 @@ static struct module *load_module(void __user *umod,
/* Done! */ /* Done! */
return mod; return mod;
arch_cleanup:
module_arch_cleanup(mod);
cleanup: cleanup:
module_unload_free(mod); module_unload_free(mod);
module_free(mod, mod->module_init); module_free(mod, mod->module_init);
......
...@@ -3049,7 +3049,7 @@ static int __init net_dev_init(void) ...@@ -3049,7 +3049,7 @@ static int __init net_dev_init(void)
return rc; return rc;
} }
subsys_initcall(net_dev_init); fs_initcall(net_dev_init);
EXPORT_SYMBOL(__dev_get); EXPORT_SYMBOL(__dev_get);
EXPORT_SYMBOL(__dev_get_by_flags); EXPORT_SYMBOL(__dev_get_by_flags);
......
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