diff --git a/[refs] b/[refs] index a89149247743..55a3603d1c4d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 +refs/heads/master: 16be87ea170ae6cfaa9f47f79d14f7577d8cb420 diff --git a/trunk/Documentation/hwmon/lm90 b/trunk/Documentation/hwmon/lm90 index 0e8411710238..e0d5206d1de3 100644 --- a/trunk/Documentation/hwmon/lm90 +++ b/trunk/Documentation/hwmon/lm90 @@ -8,7 +8,7 @@ Supported chips: Datasheet: Publicly available at the National Semiconductor website http://www.national.com/pf/LM/LM90.html * National Semiconductor LM89 - Prefix: 'lm89' (no auto-detection) + Prefix: 'lm99' Addresses scanned: I2C 0x4c and 0x4d Datasheet: Publicly available at the National Semiconductor website http://www.national.com/mpf/LM/LM89.html diff --git a/trunk/Makefile b/trunk/Makefile index e9c5d47f31cd..8e540515cb97 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 28 -EXTRAVERSION = -rc2 +EXTRAVERSION = -rc1 NAME = Killer Bat of Doom # *DOCUMENTATION* diff --git a/trunk/drivers/acpi/processor_perflib.c b/trunk/drivers/acpi/processor_perflib.c index dc98f7a6f2c4..dbcf260ea93f 100644 --- a/trunk/drivers/acpi/processor_perflib.c +++ b/trunk/drivers/acpi/processor_perflib.c @@ -38,7 +38,10 @@ #include #endif + +#ifdef CONFIG_X86 #include +#endif #include #include @@ -360,11 +363,13 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr) * the BIOS is older than the CPU and does not know its frequencies */ update_bios: +#ifdef CONFIG_X86 if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){ if(boot_cpu_has(X86_FEATURE_EST)) printk(KERN_WARNING FW_BUG "BIOS needs update for CPU " "frequency support\n"); } +#endif return result; } diff --git a/trunk/drivers/char/amiserial.c b/trunk/drivers/char/amiserial.c index b97aebd7aeb8..98821f97583c 100644 --- a/trunk/drivers/char/amiserial.c +++ b/trunk/drivers/char/amiserial.c @@ -2071,13 +2071,12 @@ module_init(rs_init) module_exit(rs_exit) -#if defined(CONFIG_SERIAL_CONSOLE) && !defined(MODULE) - /* * ------------------------------------------------------------ * Serial console driver * ------------------------------------------------------------ */ +#ifdef CONFIG_SERIAL_CONSOLE static void amiga_serial_putc(char c) { @@ -2131,7 +2130,6 @@ static int __init amiserial_console_init(void) return 0; } console_initcall(amiserial_console_init); - -#endif /* CONFIG_SERIAL_CONSOLE && !MODULE */ +#endif MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/hwmon/abituguru3.c b/trunk/drivers/hwmon/abituguru3.c index 70bb854086df..d9e7a49d6cbf 100644 --- a/trunk/drivers/hwmon/abituguru3.c +++ b/trunk/drivers/hwmon/abituguru3.c @@ -178,7 +178,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "+3.3V", 10, 0, 20, 1, 0 }, { "5VSB", 11, 0, 30, 1, 0 }, { "CPU", 24, 1, 1, 1, 0 }, - { "System", 25, 1, 1, 1, 0 }, + { "System ", 25, 1, 1, 1, 0 }, { "PWM", 26, 1, 1, 1, 0 }, { "CPU Fan", 32, 2, 60, 1, 0 }, { "NB Fan", 33, 2, 60, 1, 0 }, @@ -200,7 +200,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "+3.3V", 10, 0, 20, 1, 0 }, { "5VSB", 11, 0, 30, 1, 0 }, { "CPU", 24, 1, 1, 1, 0 }, - { "System", 25, 1, 1, 1, 0 }, + { "System ", 25, 1, 1, 1, 0 }, { "PWM1", 26, 1, 1, 1, 0 }, { "PWM2", 27, 1, 1, 1, 0 }, { "PWM3", 28, 1, 1, 1, 0 }, @@ -229,7 +229,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "+3.3V", 10, 0, 20, 1, 0 }, { "5VSB", 11, 0, 30, 1, 0 }, { "CPU", 24, 1, 1, 1, 0 }, - { "System", 25, 1, 1, 1, 0 }, + { "System ", 25, 1, 1, 1, 0 }, { "PWM", 26, 1, 1, 1, 0 }, { "CPU Fan", 32, 2, 60, 1, 0 }, { "NB Fan", 33, 2, 60, 1, 0 }, @@ -250,7 +250,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "+3.3V", 10, 0, 20, 1, 0 }, { "5VSB", 11, 0, 30, 1, 0 }, { "CPU", 24, 1, 1, 1, 0 }, - { "System", 25, 1, 1, 1, 0 }, + { "System ", 25, 1, 1, 1, 0 }, { "PWM", 26, 1, 1, 1, 0 }, { "CPU Fan", 32, 2, 60, 1, 0 }, { "NB Fan", 33, 2, 60, 1, 0 }, @@ -342,7 +342,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "+3.3V", 10, 0, 20, 1, 0 }, { "5VSB", 11, 0, 30, 1, 0 }, { "CPU", 24, 1, 1, 1, 0 }, - { "System", 25, 1, 1, 1, 0 }, + { "System ", 25, 1, 1, 1, 0 }, { "PWM1", 26, 1, 1, 1, 0 }, { "PWM2", 27, 1, 1, 1, 0 }, { "PWM3", 28, 1, 1, 1, 0 }, @@ -371,7 +371,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "+3.3V", 10, 0, 20, 1, 0 }, { "5VSB", 11, 0, 30, 1, 0 }, { "CPU", 24, 1, 1, 1, 0 }, - { "System", 25, 1, 1, 1, 0 }, + { "System ", 25, 1, 1, 1, 0 }, { "PWM", 26, 1, 1, 1, 0 }, { "CPU Fan", 32, 2, 60, 1, 0 }, { "NB Fan", 33, 2, 60, 1, 0 }, @@ -402,7 +402,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX3 Fan", 36, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x0016, "AW9D-MAX (Intel i975-ICH7)", { + { 0x0016, NULL /* AW9D-MAX, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR2", 1, 0, 20, 1, 0 }, { "DDR2 VTT", 2, 0, 10, 1, 0 }, @@ -416,7 +416,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "+3.3V", 10, 0, 20, 1, 0 }, { "5VSB", 11, 0, 30, 1, 0 }, { "CPU", 24, 1, 1, 1, 0 }, - { "System", 25, 1, 1, 1, 0 }, + { "System ", 25, 1, 1, 1, 0 }, { "PWM1", 26, 1, 1, 1, 0 }, { "PWM2", 27, 1, 1, 1, 0 }, { "PWM3", 28, 1, 1, 1, 0 }, @@ -446,7 +446,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "ATX +3.3V", 10, 0, 20, 1, 0 }, { "ATX 5VSB", 11, 0, 30, 1, 0 }, { "CPU", 24, 1, 1, 1, 0 }, - { "System", 26, 1, 1, 1, 0 }, + { "System ", 26, 1, 1, 1, 0 }, { "PWM", 27, 1, 1, 1, 0 }, { "CPU FAN", 32, 2, 60, 1, 0 }, { "SYS FAN", 34, 2, 60, 1, 0 }, @@ -469,7 +469,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "+3.3V", 10, 0, 20, 1, 0 }, { "5VSB", 11, 0, 30, 1, 0 }, { "CPU", 24, 1, 1, 1, 0 }, - { "System", 25, 1, 1, 1, 0 }, + { "System ", 25, 1, 1, 1, 0 }, { "PWM Phase1", 26, 1, 1, 1, 0 }, { "PWM Phase2", 27, 1, 1, 1, 0 }, { "PWM Phase3", 28, 1, 1, 1, 0 }, @@ -487,7 +487,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "DDR2", 13, 0, 20, 1, 0 }, { "DDR2 VTT", 14, 0, 10, 1, 0 }, { "CPU VTT", 3, 0, 20, 1, 0 }, - { "NB 1.2V", 4, 0, 10, 1, 0 }, + { "NB 1.2V ", 4, 0, 10, 1, 0 }, { "SB 1.5V", 6, 0, 10, 1, 0 }, { "HyperTransport", 5, 0, 10, 1, 0 }, { "ATX +12V (24-Pin)", 12, 0, 60, 1, 0 }, @@ -496,7 +496,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "ATX +3.3V", 10, 0, 20, 1, 0 }, { "ATX 5VSB", 11, 0, 30, 1, 0 }, { "CPU", 24, 1, 1, 1, 0 }, - { "System", 25, 1, 1, 1, 0 }, + { "System ", 25, 1, 1, 1, 0 }, { "PWM Phase1", 26, 1, 1, 1, 0 }, { "PWM Phase2", 27, 1, 1, 1, 0 }, { "PWM Phase3", 28, 1, 1, 1, 0 }, @@ -523,8 +523,8 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "+3.3V", 10, 0, 20, 1, 0 }, { "5VSB", 11, 0, 30, 1, 0 }, { "CPU", 24, 1, 1, 1, 0 }, - { "System", 25, 1, 1, 1, 0 }, - { "PWM", 26, 1, 1, 1, 0 }, + { "System ", 25, 1, 1, 1, 0 }, + { "PWM ", 26, 1, 1, 1, 0 }, { "PWM Phase2", 27, 1, 1, 1, 0 }, { "PWM Phase3", 28, 1, 1, 1, 0 }, { "PWM Phase4", 29, 1, 1, 1, 0 }, @@ -947,7 +947,7 @@ static int __devinit abituguru3_probe(struct platform_device *pdev) if (!abituguru3_motherboards[i].dmi_name) { printk(KERN_WARNING ABIT_UGURU3_NAME ": this motherboard was " "not detected using DMI. Please send the output of " - "\"dmidecode\" to the abituguru3 maintainer " + "\"dmidecode\" to the abituguru3 maintainer" "(see MAINTAINERS)\n"); } #endif diff --git a/trunk/drivers/hwmon/adt7473.c b/trunk/drivers/hwmon/adt7473.c index b9a8ea30c99c..3a0b63136479 100644 --- a/trunk/drivers/hwmon/adt7473.c +++ b/trunk/drivers/hwmon/adt7473.c @@ -319,24 +319,35 @@ static struct adt7473_data *adt7473_update_device(struct device *dev) } /* - * Conversions + * On this chip, voltages are given as a count of steps between a minimum + * and maximum voltage, not a direct voltage. */ - -/* IN are scaled acording to built-in resistors */ -static const int adt7473_scaling[] = { /* .001 Volts */ - 2250, 3300 +static const int volt_convert_table[][2] = { + {2997, 3}, + {4395, 4}, }; -#define SCALE(val, from, to) (((val) * (to) + ((from) / 2)) / (from)) static int decode_volt(int volt_index, u8 raw) { - return SCALE(raw, 192, adt7473_scaling[volt_index]); + int cmax = volt_convert_table[volt_index][0]; + int cmin = volt_convert_table[volt_index][1]; + return ((raw * (cmax - cmin)) / 255) + cmin; } static u8 encode_volt(int volt_index, int cooked) { - int raw = SCALE(cooked, adt7473_scaling[volt_index], 192); - return SENSORS_LIMIT(raw, 0, 255); + int cmax = volt_convert_table[volt_index][0]; + int cmin = volt_convert_table[volt_index][1]; + u8 x; + + if (cooked > cmax) + cooked = cmax; + else if (cooked < cmin) + cooked = cmin; + + x = ((cooked - cmin) * 255) / (cmax - cmin); + + return x; } static ssize_t show_volt_min(struct device *dev, diff --git a/trunk/drivers/hwmon/hwmon-vid.c b/trunk/drivers/hwmon/hwmon-vid.c index bfc296145bba..c54eff92be4a 100644 --- a/trunk/drivers/hwmon/hwmon-vid.c +++ b/trunk/drivers/hwmon/hwmon-vid.c @@ -180,7 +180,6 @@ static struct vrm_model vrm_models[] = { {X86_VENDOR_AMD, 0x6, ANY, ANY, 90}, /* Athlon Duron etc */ {X86_VENDOR_AMD, 0xF, 0x3F, ANY, 24}, /* Athlon 64, Opteron */ {X86_VENDOR_AMD, 0xF, ANY, ANY, 25}, /* NPT family 0Fh */ - {X86_VENDOR_AMD, 0x10, ANY, ANY, 25}, /* NPT family 10h */ {X86_VENDOR_INTEL, 0x6, 0x9, ANY, 13}, /* Pentium M (130 nm) */ {X86_VENDOR_INTEL, 0x6, 0xB, ANY, 85}, /* Tualatin */ {X86_VENDOR_INTEL, 0x6, 0xD, ANY, 13}, /* Pentium M (90 nm) */ diff --git a/trunk/drivers/hwmon/lm90.c b/trunk/drivers/hwmon/lm90.c index 96a701866726..3edeebc0b835 100644 --- a/trunk/drivers/hwmon/lm90.c +++ b/trunk/drivers/hwmon/lm90.c @@ -12,9 +12,9 @@ * made by National Semiconductor. Both have an increased remote * temperature measurement accuracy (1 degree), and the LM99 * additionally shifts remote temperatures (measured and limits) by 16 - * degrees, which allows for higher temperatures measurement. + * degrees, which allows for higher temperatures measurement. The + * driver doesn't handle it since it can be done easily in user-space. * Note that there is no way to differentiate between both chips. - * When device is auto-detected, the driver will assume an LM99. * * This driver also supports the LM86, another sensor chip made by * National Semiconductor. It is exactly similar to the LM90 except it @@ -169,8 +169,8 @@ static const struct i2c_device_id lm90_id[] = { { "adt7461", adt7461 }, { "lm90", lm90 }, { "lm86", lm86 }, - { "lm89", lm86 }, - { "lm99", lm99 }, + { "lm89", lm99 }, + { "lm99", lm99 }, /* Missing temperature offset */ { "max6646", max6646 }, { "max6647", max6646 }, { "max6649", max6646 }, @@ -366,10 +366,6 @@ static ssize_t show_temp8(struct device *dev, struct device_attribute *devattr, else temp = temp_from_s8(data->temp8[attr->index]); - /* +16 degrees offset for temp2 for the LM99 */ - if (data->kind == lm99 && attr->index == 3) - temp += 16000; - return sprintf(buf, "%d\n", temp); } @@ -389,10 +385,6 @@ static ssize_t set_temp8(struct device *dev, struct device_attribute *devattr, long val = simple_strtol(buf, NULL, 10); int nr = attr->index; - /* +16 degrees offset for temp2 for the LM99 */ - if (data->kind == lm99 && attr->index == 3) - val -= 16000; - mutex_lock(&data->update_lock); if (data->kind == adt7461) data->temp8[nr] = temp_to_u8_adt7461(data, val); @@ -419,10 +411,6 @@ static ssize_t show_temp11(struct device *dev, struct device_attribute *devattr, else temp = temp_from_s16(data->temp11[attr->index]); - /* +16 degrees offset for temp2 for the LM99 */ - if (data->kind == lm99 && attr->index <= 2) - temp += 16000; - return sprintf(buf, "%d\n", temp); } @@ -444,10 +432,6 @@ static ssize_t set_temp11(struct device *dev, struct device_attribute *devattr, long val = simple_strtol(buf, NULL, 10); int nr = attr->index; - /* +16 degrees offset for temp2 for the LM99 */ - if (data->kind == lm99 && attr->index <= 2) - val -= 16000; - mutex_lock(&data->update_lock); if (data->kind == adt7461) data->temp11[nr] = temp_to_u16_adt7461(data, val); @@ -477,15 +461,9 @@ static ssize_t show_temphyst(struct device *dev, struct device_attribute *devatt if (data->kind == adt7461) temp = temp_from_u8_adt7461(data, data->temp8[attr->index]); - else if (data->kind == max6646) - temp = temp_from_u8(data->temp8[attr->index]); else temp = temp_from_s8(data->temp8[attr->index]); - /* +16 degrees offset for temp2 for the LM99 */ - if (data->kind == lm99 && attr->index == 3) - temp += 16000; - return sprintf(buf, "%d\n", temp - temp_from_s8(data->temp_hyst)); } @@ -495,19 +473,12 @@ static ssize_t set_temphyst(struct device *dev, struct device_attribute *dummy, struct i2c_client *client = to_i2c_client(dev); struct lm90_data *data = i2c_get_clientdata(client); long val = simple_strtol(buf, NULL, 10); - int temp; + long hyst; mutex_lock(&data->update_lock); - if (data->kind == adt7461) - temp = temp_from_u8_adt7461(data, data->temp8[2]); - else if (data->kind == max6646) - temp = temp_from_u8(data->temp8[2]); - else - temp = temp_from_s8(data->temp8[2]); - - data->temp_hyst = hyst_to_reg(temp - val); + hyst = temp_from_s8(data->temp8[2]) - val; i2c_smbus_write_byte_data(client, LM90_REG_W_TCRIT_HYST, - data->temp_hyst); + hyst_to_reg(hyst)); mutex_unlock(&data->update_lock); return count; } @@ -711,15 +682,6 @@ static int lm90_detect(struct i2c_client *new_client, int kind, } else if ((chip_id & 0xF0) == 0x30) { /* LM89/LM99 */ kind = lm99; - dev_info(&adapter->dev, - "Assuming LM99 chip at " - "0x%02x\n", address); - dev_info(&adapter->dev, - "If it is an LM89, pass " - "force_lm86=%d,0x%02x when " - "loading the lm90 driver\n", - i2c_adapter_id(adapter), - address); } else if (address == 0x4C && (chip_id & 0xF0) == 0x10) { /* LM86 */ diff --git a/trunk/drivers/hwmon/w83781d.c b/trunk/drivers/hwmon/w83781d.c index fc12bd412e3a..d4d1b859d4f1 100644 --- a/trunk/drivers/hwmon/w83781d.c +++ b/trunk/drivers/hwmon/w83781d.c @@ -1968,7 +1968,7 @@ w83781d_isa_register(void) return res; } -static void +static void __exit w83781d_isa_unregister(void) { if (pdev) { @@ -2017,7 +2017,7 @@ w83781d_isa_register(void) return 0; } -static void +static void __exit w83781d_isa_unregister(void) { } diff --git a/trunk/drivers/ide/icside.c b/trunk/drivers/ide/icside.c index 2d848010499d..76bdc9a27f6f 100644 --- a/trunk/drivers/ide/icside.c +++ b/trunk/drivers/ide/icside.c @@ -690,9 +690,9 @@ static int __init icside_init(void) return ecard_register_driver(&icside_driver); } -static void __exit icside_exit(void) +static void __exit icside_exit(void); { - ecard_remove_driver(&icside_driver); + ecard_unregister_driver(&icside_driver); } MODULE_AUTHOR("Russell King "); diff --git a/trunk/drivers/ide/rapide.c b/trunk/drivers/ide/rapide.c index d5003ca69801..78d27d9ae430 100644 --- a/trunk/drivers/ide/rapide.c +++ b/trunk/drivers/ide/rapide.c @@ -11,7 +11,7 @@ #include -static const struct ide_port_info rapide_port_info = { +static struct const ide_port_info rapide_port_info = { .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA, }; @@ -97,7 +97,7 @@ static int __init rapide_init(void) static void __exit rapide_exit(void) { - ecard_remove_driver(&rapide_driver); + ecard_unregister_driver(&rapide_driver); } MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/net/r8169.c b/trunk/drivers/net/r8169.c index 4b7cb389dc49..2b4e975770f3 100644 --- a/trunk/drivers/net/r8169.c +++ b/trunk/drivers/net/r8169.c @@ -1915,6 +1915,92 @@ static void rtl_disable_msi(struct pci_dev *pdev, struct rtl8169_private *tp) } } +static int rtl_eeprom_read(struct pci_dev *pdev, int cap, int addr, __le32 *val) +{ + int ret, count = 100; + u16 status = 0; + u32 value; + + ret = pci_write_config_word(pdev, cap + PCI_VPD_ADDR, addr); + if (ret < 0) + return ret; + + do { + udelay(10); + ret = pci_read_config_word(pdev, cap + PCI_VPD_ADDR, &status); + if (ret < 0) + return ret; + } while (!(status & PCI_VPD_ADDR_F) && --count); + + if (!(status & PCI_VPD_ADDR_F)) + return -ETIMEDOUT; + + ret = pci_read_config_dword(pdev, cap + PCI_VPD_DATA, &value); + if (ret < 0) + return ret; + + *val = cpu_to_le32(value); + + return 0; +} + +static void rtl_init_mac_address(struct rtl8169_private *tp, + void __iomem *ioaddr) +{ + struct pci_dev *pdev = tp->pci_dev; + int vpd_cap; + __le32 sig; + u8 mac[8]; + u8 cfg1; + + cfg1 = RTL_R8(Config1); + if (!(cfg1 & VPD)) { + if (netif_msg_probe(tp)) + dev_info(&pdev->dev, "VPD access disabled, enabling\n"); + RTL_W8(Cfg9346, Cfg9346_Unlock); + RTL_W8(Config1, cfg1 | VPD); + RTL_W8(Cfg9346, Cfg9346_Lock); + } + + vpd_cap = pci_find_capability(pdev, PCI_CAP_ID_VPD); + if (!vpd_cap) + return; + + if (rtl_eeprom_read(pdev, vpd_cap, RTL_EEPROM_SIG_ADDR, &sig) < 0) + return; + + if ((sig & RTL_EEPROM_SIG_MASK) != RTL_EEPROM_SIG) { + dev_info(&pdev->dev, "Missing EEPROM signature: %08x\n", sig); + return; + } + + /* + * MAC address is stored in EEPROM at offset 0x0e + * Realtek says: "The VPD address does not have to be a DWORD-aligned + * address as defined in the PCI 2.2 Specifications, but the VPD data + * is always consecutive 4-byte data starting from the VPD address + * specified." + */ + if (rtl_eeprom_read(pdev, vpd_cap, 0x000e, (__le32*)&mac[0]) < 0 || + rtl_eeprom_read(pdev, vpd_cap, 0x0012, (__le32*)&mac[4]) < 0) { + if (netif_msg_probe(tp)) { + dev_warn(&pdev->dev, + "reading MAC address from EEPROM failed\n"); + } + return; + } + + if (netif_msg_probe(tp)) { + DECLARE_MAC_BUF(buf); + + dev_info(&pdev->dev, "MAC address found in EEPROM: %s\n", + print_mac(buf, mac)); + } + + if (is_valid_ether_addr(mac)) + rtl_rar_set(tp, mac); +} + static int __devinit rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -2092,6 +2178,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) tp->mmio_addr = ioaddr; + rtl_init_mac_address(tp, ioaddr); + /* Get MAC address */ for (i = 0; i < MAC_ADDR_LEN; i++) dev->dev_addr[i] = RTL_R8(MAC0 + i); diff --git a/trunk/fs/compat.c b/trunk/fs/compat.c index e5f49f538502..fe3c9bf87608 100644 --- a/trunk/fs/compat.c +++ b/trunk/fs/compat.c @@ -1684,9 +1684,8 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, return -EFAULT; to = &end_time; - if (poll_select_set_timeout(to, - tv.tv_sec + (tv.tv_usec / USEC_PER_SEC), - (tv.tv_usec % USEC_PER_SEC) * NSEC_PER_USEC)) + if (poll_select_set_timeout(to, tv.tv_sec, + tv.tv_usec * NSEC_PER_USEC)) return -EINVAL; } diff --git a/trunk/fs/eventpoll.c b/trunk/fs/eventpoll.c index aec5c13f6341..99368bda0261 100644 --- a/trunk/fs/eventpoll.c +++ b/trunk/fs/eventpoll.c @@ -930,15 +930,8 @@ static int ep_send_events(struct eventpoll *ep, struct epoll_event __user *event * inside the main ready-list here. */ for (nepi = ep->ovflist; (epi = nepi) != NULL; - nepi = epi->next, epi->next = EP_UNACTIVE_PTR) { - /* - * If the above loop quit with errors, the epoll item might still - * be linked to "txlist", and the list_splice() done below will - * take care of those cases. - */ - if (!ep_is_linked(&epi->rdllink)) - list_add_tail(&epi->rdllink, &ep->rdllist); - } + nepi = epi->next, epi->next = EP_UNACTIVE_PTR) + list_add_tail(&epi->rdllink, &ep->rdllist); /* * We need to set back ep->ovflist to EP_UNACTIVE_PTR, so that after * releasing the lock, events will be queued in the normal way inside diff --git a/trunk/fs/ext3/dir.c b/trunk/fs/ext3/dir.c index 5853f4440af4..4c82531ea0a8 100644 --- a/trunk/fs/ext3/dir.c +++ b/trunk/fs/ext3/dir.c @@ -456,8 +456,17 @@ static int ext3_dx_readdir(struct file * filp, if (info->extra_fname) { if (call_filldir(filp, dirent, filldir, info->extra_fname)) goto finished; + info->extra_fname = NULL; - goto next_node; + info->curr_node = rb_next(info->curr_node); + if (!info->curr_node) { + if (info->next_hash == ~0) { + filp->f_pos = EXT3_HTREE_EOF; + goto finished; + } + info->curr_hash = info->next_hash; + info->curr_minor_hash = 0; + } } else if (!info->curr_node) info->curr_node = rb_first(&info->root); @@ -489,14 +498,9 @@ static int ext3_dx_readdir(struct file * filp, info->curr_minor_hash = fname->minor_hash; if (call_filldir(filp, dirent, filldir, fname)) break; - next_node: + info->curr_node = rb_next(info->curr_node); - if (info->curr_node) { - fname = rb_entry(info->curr_node, struct fname, - rb_hash); - info->curr_hash = fname->hash; - info->curr_minor_hash = fname->minor_hash; - } else { + if (!info->curr_node) { if (info->next_hash == ~0) { filp->f_pos = EXT3_HTREE_EOF; break; diff --git a/trunk/fs/ext4/dir.c b/trunk/fs/ext4/dir.c index fed5b610df5a..3ca6a2b7632d 100644 --- a/trunk/fs/ext4/dir.c +++ b/trunk/fs/ext4/dir.c @@ -459,8 +459,17 @@ static int ext4_dx_readdir(struct file *filp, if (info->extra_fname) { if (call_filldir(filp, dirent, filldir, info->extra_fname)) goto finished; + info->extra_fname = NULL; - goto next_node; + info->curr_node = rb_next(info->curr_node); + if (!info->curr_node) { + if (info->next_hash == ~0) { + filp->f_pos = EXT4_HTREE_EOF; + goto finished; + } + info->curr_hash = info->next_hash; + info->curr_minor_hash = 0; + } } else if (!info->curr_node) info->curr_node = rb_first(&info->root); @@ -492,14 +501,9 @@ static int ext4_dx_readdir(struct file *filp, info->curr_minor_hash = fname->minor_hash; if (call_filldir(filp, dirent, filldir, fname)) break; - next_node: + info->curr_node = rb_next(info->curr_node); - if (info->curr_node) { - fname = rb_entry(info->curr_node, struct fname, - rb_hash); - info->curr_hash = fname->hash; - info->curr_minor_hash = fname->minor_hash; - } else { + if (!info->curr_node) { if (info->next_hash == ~0) { filp->f_pos = EXT4_HTREE_EOF; break; diff --git a/trunk/fs/select.c b/trunk/fs/select.c index 87df51eadcf2..448e44001286 100644 --- a/trunk/fs/select.c +++ b/trunk/fs/select.c @@ -519,9 +519,8 @@ asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, return -EFAULT; to = &end_time; - if (poll_select_set_timeout(to, - tv.tv_sec + (tv.tv_usec / USEC_PER_SEC), - (tv.tv_usec % USEC_PER_SEC) * NSEC_PER_USEC)) + if (poll_select_set_timeout(to, tv.tv_sec, + tv.tv_usec * NSEC_PER_USEC)) return -EINVAL; } diff --git a/trunk/init/main.c b/trunk/init/main.c index 7e117a231af1..130d1a0eef11 100644 --- a/trunk/init/main.c +++ b/trunk/init/main.c @@ -768,7 +768,6 @@ static void __init do_initcalls(void) static void __init do_basic_setup(void) { rcu_init_sched(); /* needed by module_init stage. */ - init_workqueues(); usermodehelper_init(); driver_init(); init_irq_proc(); @@ -852,6 +851,8 @@ static int __init kernel_init(void * unused) cad_pid = task_pid(current); + init_workqueues(); + smp_prepare_cpus(setup_max_cpus); do_pre_smp_initcalls(); diff --git a/trunk/kernel/cgroup.c b/trunk/kernel/cgroup.c index 35eebd5510c2..046c1609606b 100644 --- a/trunk/kernel/cgroup.c +++ b/trunk/kernel/cgroup.c @@ -2104,7 +2104,7 @@ static void *cgroup_tasks_start(struct seq_file *s, loff_t *pos) down_read(&cgrp->pids_mutex); if (pid) { int end = cgrp->pids_length; - + int i; while (index < end) { int mid = (index + end) / 2; if (cgrp->tasks_pids[mid] == pid) { diff --git a/trunk/kernel/stop_machine.c b/trunk/kernel/stop_machine.c index 9bc4c00872c9..8aff79d90ddc 100644 --- a/trunk/kernel/stop_machine.c +++ b/trunk/kernel/stop_machine.c @@ -160,4 +160,4 @@ static int __init stop_machine_init(void) stop_machine_work = alloc_percpu(struct work_struct); return 0; } -core_initcall(stop_machine_init); +early_initcall(stop_machine_init); diff --git a/trunk/net/wireless/Kconfig b/trunk/net/wireless/Kconfig index 646c7121dbc0..7d82be07fa1d 100644 --- a/trunk/net/wireless/Kconfig +++ b/trunk/net/wireless/Kconfig @@ -16,7 +16,7 @@ config NL80211 config WIRELESS_OLD_REGULATORY bool "Old wireless static regulatory definitions" - default y + default n ---help--- This option enables the old static regulatory information and uses it within the new framework. This is available @@ -40,10 +40,11 @@ config WIRELESS_OLD_REGULATORY ieee80211_regdom module parameter. This is being phased out and you should stop using them ASAP. - Say Y unless you have installed a new userspace application. - Also say Y if have one currently depending on the ieee80211_regdom - module parameter and cannot port it to use the new userspace - interfaces. + Say N unless you cannot install a new userspace application + or have one currently depending on the ieee80211_regdom module + parameter and cannot port it to use the new userspace interfaces. + + This is scheduled for removal for 2.6.29. config WIRELESS_EXT bool "Wireless extensions" diff --git a/trunk/scripts/kconfig/confdata.c b/trunk/scripts/kconfig/confdata.c index 830d9eae11f9..b91cf241a539 100644 --- a/trunk/scripts/kconfig/confdata.c +++ b/trunk/scripts/kconfig/confdata.c @@ -852,7 +852,8 @@ void conf_set_all_new_symbols(enum conf_def_mode mode) } - sym_clear_all_valid(); + if (modules_sym) + sym_calc_value(modules_sym); if (mode != def_random) return;