Linux 2.6.27.5
Subsystems (36)
We (the -stable team) are announcing the release of the 2.6.27.5 kernel.
It contains a wide range of bugfixes, and all users of the 2.6.27 kernel series are strongly encouraged to upgrade. Very strongly. Did I mention that you all should upgrade? Seriously, what are you waiting for? Running those old kernel trees prior to .27? Are you crazy? You really want to run this one. It's all shiny new and has that lovely new-kernel smell that we all know and love.
I'll also be replying to this message with a copy of the patch between 2.6.27.4 and 2.6.27.5
The updated 2.6.27.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.27.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.27.y.git;a=summarythanks,
greg k-h
------------
Documentation/i2c/busses/i2c-sis96x | 2 MAINTAINERS | 20 - Makefile | 2 arch/powerpc/configs/linkstation_defconfig | 7 arch/powerpc/mm/hash_utils_64.c | 6 arch/powerpc/mm/numa.c | 113 +++++- arch/powerpc/platforms/embedded6xx/linkstation.c | 14 arch/s390/kernel/smp.c | 24 - arch/sparc64/kernel/trampoline.S | 18 - arch/x86/kernel/process_64.c | 4 arch/x86/kernel/rtc.c | 22 + arch/x86/mm/pat.c | 4 drivers/acpi/button.c | 3 drivers/acpi/ec.c | 374 +++++++++++------------ drivers/acpi/hardware/hwsleep.c | 7 drivers/acpi/reboot.c | 25 + drivers/ata/libata-core.c | 2 drivers/ata/pata_it821x.c | 3 drivers/ata/sata_nv.c | 53 +-- drivers/ata/sata_promise.c | 20 + drivers/base/sys.c | 6 drivers/char/agp/intel-agp.c | 12 drivers/char/ipmi/ipmi_devintf.c | 1 drivers/firewire/fw-cdev.c | 6 drivers/firewire/fw-sbp2.c | 38 +- drivers/firewire/fw-topology.c | 6 drivers/firewire/fw-transaction.h | 2 drivers/hid/usbhid/hid-quirks.c | 4 drivers/i2c/busses/scx200_i2c.c | 1 drivers/input/keyboard/atkbd.c | 10 drivers/media/dvb/frontends/s5h1411.c | 35 +- drivers/media/video/pvrusb2/pvrusb2-encoder.c | 4 drivers/net/atlx/atl1.c | 7 drivers/net/atlx/atl1.h | 2 drivers/net/bonding/bond_alb.c | 13 drivers/net/wireless/libertas/scan.c | 4 drivers/pci/probe.c | 2 drivers/rtc/rtc-cmos.c | 33 +- drivers/scsi/sd.c | 10 drivers/usb/core/hcd.c | 35 +- drivers/usb/core/hcd.h | 1 drivers/usb/core/hub.c | 1 drivers/usb/core/urb.c | 15 drivers/usb/storage/unusual_devs.h | 9 fs/hfsplus/bitmap.c | 12 fs/hfsplus/catalog.c | 5 include/linux/sched.h | 4 include/math-emu/op-common.h | 17 - include/net/scm.h | 5 kernel/sched_clock.c | 6 kernel/sched_features.h | 2 net/core/scm.c | 24 + net/ipv4/tcp_output.c | 33 +- net/ipv6/tcp_ipv6.c | 2 net/sched/sch_generic.c | 2 scripts/package/mkspec | 3 security/commoncap.c | 6 sound/core/control.c | 4 sound/pci/hda/hda_intel.c | 29 + 59 files changed, 744 insertions(+), 390 deletions(-)
Alan Stern (1):
USB: fix crash when URBs are unlinked after the device is gone
Alexey Starikovskiy (3):
ACPI: EC: do transaction from interrupt context
ACPI: EC: Rename some variables
ACPI: EC: Check for IBF=0 periodically if not in GPE mode
Andi Kleen (1):
sysfs: Fix return values for sysdev_store_{ulong, int}Andrea Shepard (1):
sparc64: Fix race in arch/sparc64/kernel/trampoline.S
Andy Gospodarek (1):
bonding: fix panic when taking bond interface down before removing module
Bjorn Helgaas (2):
rtc-cmos: look for PNP RTC first, then for platform RTC
x86: register a platform RTC device if PNP doesn't describe it
Boris Dores (1):
V4L: pvrusb2: Keep MPEG PTSs from drifting away
Dan Nicholson (1):
Revert "HID: Invert HWHEEL mappings for some Logitech mice"
Dave Kleikamp (1):
sched_clock: prevent scd->clock from moving backwards
David Miller (1):
net: Fix recursive descent in __scm_destroy().
David Rientjes (1):
x86: avoid dereferencing beyond stack + THREAD_SIZE
Devin Heitmueller (2):
DVB: s5h1411: Perform s5h1411 soft reset after tuning
DVB: s5h1411: Power down s5h1411 when not in use
Eric Anholt (1):
agp: Fix stolen memory counting on G4X.
Eric Sesterhenn (2):
hfsplus: fix Buffer overflow with a corrupted image
hfsplus: check read_mapping_page() return value
Evgeniy Manachkin (1):
kbuild: mkspec - fix build rpm
Florian Westphal (1):
syncookies: fix inclusion of tcp options in syn-ack
Greg Kroah-Hartman (1):
Linux 2.6.27.5
Guennadi Liakhovetski (1):
powerpc: fix i2c on PPC linkstation / kurobox machines
Guillem Jover (1):
ACPI: Always report a sync event after a lid state change
Heiko Carstens (1):
S390: Fix sysdev class file creation.
Ilpo Järvinen (2):
tcp: Restore ordering of TCP options for the sake of inter-operability
tcpv6: fix option space offsets with md5
Ingo Molnar (1):
sched: disable the hrtick for now
Jamie Wellnitz (1):
SCSI: sd: Fix handling of NO_SENSE check condition
Jarek Poplawski (1):
pkt_sched: sch_generic: Fix oops in sch_teql
Jay Cliburn (1):
atl1: fix vlan tag regression
Jay Fenlason (3):
firewire: Survive more than 256 bus resets
firewire: fix struct fw_node memory leak
firewire: fw-sbp2: fix races
Jean Delvare (1):
i2c: The i2c mailing list is moving
Johannes Berg (1):
libertas: fix buffer overrun
Jon Tollefson (3):
powerpc: Reserve in bootmem lmb reserved regions that cross NUMA nodes powerpc/numa: Make memory reserve code more robust
powerpc: Don't use a 16G page if beyond mem= limits
Kumar Gala (1):
math-emu: Fix signalling of underflow and inexact while packing result.
Lennart Sorensen (1):
scx200_i2c: Add missing class parameter
Matthew Garrett (2):
ACPI: Clear WAK_STS on resume
Input: atkbd - expand Latitude's force release quirk to other Dells
Mikael Pettersson (1):
sata_promise: add ATA engine reset to reset ops
Ondrej Zary (1):
libata: Fix LBA48 on pata_it821x RAID volumes.
Peter Chubb (1):
PCI: fix 64-vbit prefetchable memory resource BARs
Phil Dibowitz (1):
USB: storage: Avoid I/O errors when issuing SCSI ioctls to JMicron USB/ATA bridge
Ravikiran G Thirumalai (1):
x86: fix /dev/mem mmap breakage when PAT is disabled
Scott James Remnant (1):
ipmi: add MODULE_ALIAS to load ipmi_devintf with ipmi_si
Serge Hallyn (1):
file caps: always start with clear bprm->caps_*
Stefan Richter (3):
firewire: fix setting tag and sy in iso transmission
firewire: fix ioctl() return code
firewire: fw-sbp2: delay first login to avoid retries
Steven Toth (1):
DVB: s5h1411: bugfix: Setting serial or parallel mode could destroy bits
Takashi Iwai (2):
ALSA: hda - Add reboot notifier
ALSA: use correct lock in snd_ctl_dev_disconnect()
Tejun Heo (2):
libata: initialize port_task when !CONFIG_ATA_SFF
sata_nv: fix generic, nf2/3 detection regression
Zhao Yakui (1):
ACPI: Ingore the RESET_REG_SUP bit when using ACPI reset mechanism
Documentation/i2c/busses/i2c-sis96x +1 -1
@@ -42,7 +42,7 @@ I suspect that this driver could be made to work for the following SiS chipsets as well: 635, and 635T. If anyone owns a board with those chips AND is willing to risk crashing & burning an otherwise well-behaved kernel in the name of progress... please contact me at <[email protected]> or -via the project's mailing list: <[email protected]>. Please send bug +via the linux-i2c mailing list: <[email protected]>. Please send bug reports and/or success stories as well.
MAINTAINERS +10 -10
@@ -360,7 +360,7 @@ S: Maintained ALI1563 I2C DRIVER P: Rudolf Marek M: [email protected] -L: [email protected] +L: [email protected] S: Maintained ALPHA PORT
@@ -1681,7 +1681,7 @@ FREESCALE I2C CPM DRIVER P: Jochen Friedrich M: [email protected] L: [email protected] -L: [email protected] +L: [email protected] S: Maintained FREESCALE SOC FS_ENET DRIVER
@@ -1982,7 +1982,7 @@ S: Maintained I2C/SMBUS STUB DRIVER P: Mark M. Hoffman M: [email protected] -L: [email protected] +L: [email protected] S: Maintained I2C SUBSYSTEM
@@ -1990,14 +1990,14 @@ P: Jean Delvare (PC drivers, core) M: [email protected] P: Ben Dooks (embedded platforms) M: [email protected] -L: [email protected] +L: [email protected] T: quilt http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/ S: Maintained I2C-TINY-USB DRIVER P: Till Harbaum M: [email protected] -L: [email protected] +L: [email protected] T: http://www.harbaum.org/till/i2c_tiny_usb S: Maintained
@@ -3070,7 +3070,7 @@ S: Maintained OPENCORES I2C BUS DRIVER P: Peter Korsgaard M: [email protected] -L: [email protected] +L: [email protected] S: Maintained ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
@@ -3144,7 +3144,7 @@ S: Maintained PA SEMI SMBUS DRIVER P: Olof Johansson M: [email protected] -L: [email protected] +L: [email protected] S: Maintained PARALLEL PORT SUPPORT
@@ -3280,7 +3280,7 @@ S: Maintained PNXxxxx I2C DRIVER P: Vitaly Wool M: [email protected] -L: [email protected] +L: [email protected] S: Maintained PPP PROTOCOL DRIVERS AND COMPRESSORS
@@ -3725,7 +3725,7 @@ S: Maintained SIS 96X I2C/SMBUS DRIVER P: Mark M. Hoffman M: [email protected] -L: [email protected] +L: [email protected] S: Maintained SIS FRAMEBUFFER DRIVER
@@ -4445,7 +4445,7 @@ S: Maintained VIAPRO SMBUS DRIVER P: Jean Delvare M: [email protected] -L: [email protected] +L: [email protected] S: Maintained VIA VELOCITY NETWORK DRIVER
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 27 -EXTRAVERSION = .4 +EXTRAVERSION = .5 NAME = Trembling Tortoise # *DOCUMENTATION*
arch/powerpc/configs/linkstation_defconfig +3 -4
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.27-rc4 -# Thu Aug 21 00:52:05 2008 +# Linux kernel version: 2.6.27 +# Fri Oct 24 00:42:39 2008 # # CONFIG_PPC64 is not set
@@ -934,7 +934,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4 CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set -CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_SERIAL_OF_PLATFORM is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256
@@ -1211,7 +1211,6 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_ALAUDA is not set # CONFIG_USB_STORAGE_ONETOUCH is not set # CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_STORAGE_SIERRA is not set # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set # CONFIG_USB_LIBUSUAL is not set
arch/powerpc/mm/hash_utils_64.c +4 -2
@@ -381,8 +381,10 @@ static int __init htab_dt_scan_hugepage_blocks(unsigned long node,printk (KERN_INFO "Huge page(16GB) memory: " "addr = 0x%lX size = 0x%lX pages = %d\n" , phys_addr, block_size, expected_pages); -lmb_reserve (phys_addr, block_size * expected_pages); -add_gpage (phys_addr, block_size, expected_pages); +if (phys_addr + (16 *GB ) <=lmb_end_of_DRAM ()) { +lmb_reserve (phys_addr, block_size * expected_pages); +add_gpage (phys_addr, block_size, expected_pages); + }return 0 ; }
arch/powerpc/mm/numa.c +85 -28
129 lines not on this page · raw message
arch/powerpc/platforms/embedded6xx/linkstation.c +14 -0
@@ -13,6 +13,7 @@#include <linux/kernel.h> #include <linux/initrd.h> #include <linux/mtd/physmap.h> +#include <linux/of_platform.h> #include <asm/time.h> #include <asm/prom.h>
@@ -54,6 +55,19 @@ static struct mtd_partition linkstation_physmap_partitions[] = { }, }; +static __initdata struct of_device_id of_bus_ids[] = { + { .type ="soc" , }, + { .compatible ="simple-bus" , }, + {}, +}; + +static int __init declare_of_platform_devices (void ) +{ +of_platform_bus_probe (NULL , of_bus_ids,NULL ); +return 0 ; +} +machine_device_initcall (linkstation, declare_of_platform_devices); +static int __init linkstation_add_bridge (struct device_node *dev) {#ifdef CONFIG_PCI
arch/s390/kernel/smp.c +9 -15
@@ -1117,9 +1117,7 @@ out:return rc; } -static ssize_t __ref rescan_store (struct sys_device *dev, -struct sysdev_attribute *attr, -const char *buf, +static ssize_t __ref rescan_store (struct sysdev_class *class,const char *buf,size_t count) {int rc;
@@ -1127,12 +1125,10 @@ static ssize_t __ref rescan_store(struct sys_device *dev, rc =smp_rescan_cpus ();return rc ? rc : count; } -static SYSDEV_ATTR(rescan, 0200, NULL, rescan_store); +static SYSDEV_CLASS_ATTR(rescan, 0200, NULL, rescan_store);#endif /* CONFIG_HOTPLUG_CPU */ -static ssize_t dispatching_show (struct sys_device *dev, -struct sysdev_attribute *attr, -char *buf) +static ssize_t dispatching_show (struct sysdev_class *class,char *buf) {ssize_t count;
@@ -1142,9 +1138,8 @@ static ssize_t dispatching_show(struct sys_device *dev,return count; } -static ssize_t dispatching_store (struct sys_device *dev, -struct sysdev_attribute *attr, -const char *buf,size_t count) +static ssize_t dispatching_store (struct sysdev_class *dev,const char *buf, +size_t count) {int val, rc;char delim;
@@ -1166,7 +1161,8 @@ out:put_online_cpus ();return rc ? rc : count; } -static SYSDEV_ATTR(dispatching, 0644, dispatching_show, dispatching_store); +static SYSDEV_CLASS_ATTR(dispatching, 0644, dispatching_show, + dispatching_store);static int __init topology_init (void ) {
@@ -1176,13 +1172,11 @@ static int __init topology_init(void)register_cpu_notifier (&smp_cpu_nb);#ifdef CONFIG_HOTPLUG_CPU - rc =sysfs_create_file (&cpu_sysdev_class.kset.kobj, - &attr_rescan.attr); + rc =sysdev_class_create_file (&cpu_sysdev_class, &attr_rescan);if (rc)return rc;#endif - rc =sysfs_create_file (&cpu_sysdev_class.kset.kobj, - &attr_dispatching.attr); + rc =sysdev_class_create_file (&cpu_sysdev_class, &attr_dispatching);if (rc)return rc;for_each_present_cpu (cpu) {
arch/sparc64/kernel/trampoline.S +14 -4
@@ -328,6 +328,12 @@ after_lock_tlb: wrpr %g0, 0, %wstate + sethi %hi(prom_entry_lock), %g2 +1: ldstub [%g2 + %lo(prom_entry_lock)], %g1 + membar #StoreLoad | #StoreStore + brnz,pn %g1, 1b + nop + /* As a hack, put &init_thread_union into %g6. * prom_world() loads from here to restore the %asi * register.
@@ -337,7 +343,7 @@ after_lock_tlb: sethi %hi(is_sun4v), %o0 lduw [%o0 + %lo(is_sun4v)], %o0 - brz,pt %o0, 1f + brz,pt %o0, 2f nop TRAP_LOAD_TRAP_BLOCK(%g2, %g3)
@@ -369,10 +375,10 @@ after_lock_tlb: call %o1 add %sp, (2047 + 128), %o0 - ba,pt %xcc, 2f + ba,pt %xcc, 3f nop -1: sethi %hi(sparc64_ttable_tl0), %o0 +2: sethi %hi(sparc64_ttable_tl0), %o0 set prom_set_trap_table_name, %g2 stx %g2, [%sp + 2047 + 128 + 0x00] mov 1, %g2
@@ -386,7 +392,11 @@ after_lock_tlb: call %o1 add %sp, (2047 + 128), %o0 -2: ldx [%l0], %g6 +3: sethi %hi(prom_entry_lock), %g2 + stb %g0, [%g2 + %lo(prom_entry_lock)] + membar #StoreStore | #StoreLoad + + ldx [%l0], %g6 ldx [%g6 + TI_TASK], %g4 mov 1, %g5
arch/x86/kernel/process_64.c +2 -2
@@ -729,12 +729,12 @@ unsigned long get_wchan(struct task_struct *p)if (!p || p == current || p->state==TASK_RUNNING )return 0 ; stack = (unsigned long )task_stack_page (p); -if (p->thread.sp < stack || p->thread.sp > stack+THREAD_SIZE ) +if (p->thread.sp < stack || p->thread.sp >= stack+THREAD_SIZE )return 0 ; fp = *(u64 *)(p->thread.sp); do { if (fp < (unsigned long)stack || - fp > (unsigned long)stack+THREAD_SIZE) + fp >= (unsigned long)stack+THREAD_SIZE) return 0; ip = *(u64 *)(fp+8); if (!in_sched_functions(ip))
arch/x86/kernel/rtc.c +18 -4
@@ -223,11 +223,25 @@ static struct platform_device rtc_device = {static __init int add_rtc_cmos (void ) {#ifdef CONFIG_PNP -if (!pnp_platform_devices) -platform_device_register (&rtc_device); -#else +static const char *ids[]__initconst = + {"PNP0b00" ,"PNP0b01" ,"PNP0b02" , }; +struct pnp_dev *dev; +struct pnp_id *id; +int i; + +pnp_for_each_dev (dev) { +for (id = dev->id; id; id = id->next) { +for (i =0 ; i <ARRAY_SIZE (ids); i++) { +if (compare_pnp_id (id, ids[i]) !=0 ) +return 0 ; + } + } + } +#endif +platform_device_register (&rtc_device); -#endif /* CONFIG_PNP */ +dev_info (&rtc_device.dev, +"registered platform RTC device (no PNP device found)\n" );return 0 ; }device_initcall (add_rtc_cmos);
arch/x86/mm/pat.c +4 -0
@@ -403,12 +403,16 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)return 1 ; }#else +/* This check is needed to avoid cache aliasing when PAT is enabled */ static inline int range_is_allowed (unsigned long pfn,unsigned long size) {u64 from = ((u64 )pfn) <<PAGE_SHIFT ;u64 to = from + size;u64 cursor = from; +if (!pat_enabled) +return 1 ; +while (cursor < to) {if (!devmem_is_allowed (pfn)) { printk(KERN_INFO
drivers/acpi/button.c +2 -1
@@ -262,6 +262,7 @@ static int acpi_lid_send_state(struct acpi_button *button)return -ENODEV ;/* input layer checks if event is redundant */ input_report_switch (button->input,SW_LID , !state); +input_sync (button->input);return 0 ; }
@@ -285,8 +286,8 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)input_report_key (input, keycode,1 );input_sync (input);input_report_key (input, keycode,0 ); +input_sync (input); } -input_sync (input);acpi_bus_generate_proc_event (button->device, event, ++button->pushed);
drivers/acpi/ec.c +191 -183
582 lines not on this page · raw message
drivers/acpi/hardware/hwsleep.c +7 -0
@@ -612,6 +612,13 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) }/* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */ +/* +* Some BIOSes assume that WAK_STS will be cleared on resume and use +* it to determine whether the system is rebooting or resuming. Clear +* it for compatibility. +*/ +acpi_set_register (ACPI_BITREG_WAKE_STATUS ,1 ); + acpi_gbl_system_awake_and_running = TRUE;/* Enable power button */
drivers/acpi/reboot.c +22 -3
@@ -15,9 +15,28 @@ void acpi_reboot(void) rr = &acpi_gbl_FADT.reset_register; -/* Is the reset register supported? */ -if (!(acpi_gbl_FADT.flags &ACPI_FADT_RESET_REGISTER ) || - rr->bit_width !=8 || rr->bit_offset !=0 ) +/* +* Is the ACPI reset register supported? +* +* According to ACPI 3.0, FADT.flags.RESET_REG_SUP indicates +* whether the ACPI reset mechanism is supported. +* +* However, some boxes have this bit clear, yet a valid +* ACPI_RESET_REG & RESET_VALUE, and ACPI reboot is the only +* mechanism that works for them after S3. +* +* This suggests that other operating systems may not be checking +* the RESET_REG_SUP bit, and are using other means to decide +* whether to use the ACPI reboot mechanism or not. +* +* So when acpi reboot is requested, +* only the reset_register is checked. If the following +* conditions are met, it indicates that the reset register is supported. +* a. reset_register is not zero +* b. the access width is eight +* c. the bit_offset is zero +*/ +if (!(rr->address) || rr->bit_width !=8 || rr->bit_offset !=0 )return ; reset_value = acpi_gbl_FADT.reset_value;
drivers/ata/libata-core.c +2 -0
@@ -5259,6 +5259,8 @@ struct ata_port *ata_port_alloc(struct ata_host *host)#ifdef CONFIG_ATA_SFF INIT_DELAYED_WORK (&ap->port_task, ata_pio_task); +#else +INIT_DELAYED_WORK (&ap->port_task,NULL );#endif INIT_DELAYED_WORK (&ap->hotplug_task, ata_scsi_hotplug);INIT_WORK (&ap->scsi_rescan_task, ata_scsi_dev_rescan);
drivers/ata/pata_it821x.c +1 -2
@@ -557,9 +557,8 @@ static unsigned int it821x_read_id(struct ata_device *adev,if (strstr (model_num,"Integrated Technology Express" )) {/* Set feature bits the firmware neglects */ id[49 ] |=0x0300 ;/* LBA, DMA */ - id[82 ] |=0x0400 ;/* LBA48 */ id[83 ] &=0x7FFF ; - id[83 ] |=0x4000 ;/* Word 83 is valid */ + id[83 ] |=0x4400 ;/* Word 83 is valid and LBA48 */ id[86 ] |=0x0400 ;/* LBA48 on */ id[ATA_ID_MAJOR_VER ] |=0x1F ; }
drivers/ata/sata_nv.c +25 -28
105 lines not on this page · raw message
drivers/ata/sata_promise.c +20 -0
@@ -153,6 +153,10 @@ static void pdc_freeze(struct ata_port *ap);static void pdc_sata_freeze (struct ata_port *ap);static void pdc_thaw (struct ata_port *ap);static void pdc_sata_thaw (struct ata_port *ap); +static int pdc_pata_softreset (struct ata_link *link,unsigned int *class, +unsigned long deadline); +static int pdc_sata_hardreset (struct ata_link *link,unsigned int *class, +unsigned long deadline);static void pdc_error_handler (struct ata_port *ap);static void pdc_post_internal_cmd (struct ata_queued_cmd *qc);static int pdc_pata_cable_detect (struct ata_port *ap);
@@ -186,6 +190,7 @@ static struct ata_port_operations pdc_sata_ops = { .scr_read = pdc_sata_scr_read, .scr_write = pdc_sata_scr_write, .port_start = pdc_sata_port_start, + .hardreset = pdc_sata_hardreset, };/* First-generation chips need a more restrictive ->check_atapi_dma op */
@@ -200,6 +205,7 @@ static struct ata_port_operations pdc_pata_ops = { .freeze = pdc_freeze, .thaw = pdc_thaw, .port_start = pdc_common_port_start, + .softreset = pdc_pata_softreset, };static const struct ata_port_info pdc_port_info[] = {
@@ -691,6 +697,20 @@ static void pdc_sata_thaw(struct ata_port *ap)readl (host_mmio + hotplug_offset);/* flush */ } +static int pdc_pata_softreset (struct ata_link *link,unsigned int *class, +unsigned long deadline) +{ +pdc_reset_port (link->ap); +return ata_sff_softreset (link, class, deadline); +} + +static int pdc_sata_hardreset (struct ata_link *link,unsigned int *class, +unsigned long deadline) +{ +pdc_reset_port (link->ap); +return sata_sff_hardreset (link, class, deadline); +} +static void pdc_error_handler (struct ata_port *ap) {if (!(ap->pflags &ATA_PFLAG_FROZEN ))
drivers/base/sys.c +4 -2
@@ -488,7 +488,8 @@ ssize_t sysdev_store_ulong(struct sys_device *sysdev,if (end == buf)return -EINVAL ; *(unsigned long *)(ea->var) = new; -return end - buf; +/* Always return full write size even if we didn't consume all */ +return size; }EXPORT_SYMBOL_GPL (sysdev_store_ulong);
@@ -511,7 +512,8 @@ ssize_t sysdev_store_int(struct sys_device *sysdev,if (end == buf || new >INT_MAX || new <INT_MIN )return -EINVAL ; *(int *)(ea->var) = new; -return end - buf; +/* Always return full write size even if we didn't consume all */ +return size; }EXPORT_SYMBOL_GPL (sysdev_store_int);
drivers/char/agp/intel-agp.c +7 -5
@@ -54,8 +54,7 @@ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \ - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB || \ - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB) + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB)#define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \
@@ -63,7 +62,8 @@#define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_E_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \ - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB) + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \ + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB)extern int agp_memory_reserved;
@@ -525,8 +525,10 @@ static void intel_i830_init_gtt_entries(void) size +=4 ; }else if (IS_G4X ) {/* On 4 series hardware, GTT stolen is separate from graphics -* stolen, ignore it in stolen gtt entries counting */ - size =0 ; +* stolen, ignore it in stolen gtt entries counting. However, +* 4KB of the stolen memory doesn't get mapped to the GTT. +*/ + size =4 ; }else {/* On previous hardware, the GTT size was just what was * required to map the aperture.
drivers/char/ipmi/ipmi_devintf.c +1 -0
@@ -957,3 +957,4 @@ module_exit(cleanup_ipmi);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Corey Minyard <[email protected]>" );MODULE_DESCRIPTION ("Linux device interface for the IPMI message handler." ); +MODULE_ALIAS ("platform:ipmi_si" );
drivers/firewire/fw-cdev.c +3 -3
@@ -720,8 +720,8 @@ static int ioctl_create_iso_context(struct client *client, void *buffer)#define GET_PAYLOAD_LENGTH (v) ((v) & 0xffff)#define GET_INTERRUPT (v) (((v) >> 16) & 0x01)#define GET_SKIP (v) (((v) >> 17) & 0x01) -#define GET_TAG (v) (((v) >> 18) & 0x02) -#define GET_SY (v) (((v) >> 20) & 0x04) +#define GET_TAG (v) (((v) >> 18) & 0x03) +#define GET_SY (v) (((v) >> 20) & 0x0f)#define GET_HEADER_LENGTH (v) (((v) >> 24) & 0xff)static int ioctl_queue_iso (struct client *client,void *buffer)
@@ -913,7 +913,7 @@ dispatch_ioctl(struct client *client, unsigned int cmd, void __user *arg)return -EFAULT ; } -return 0 ; +return retval; } static long
drivers/firewire/fw-sbp2.c +27 -11
@@ -172,6 +172,9 @@ struct sbp2_target {int blocked;/* ditto */ }; +/* Impossible login_id, to detect logout attempt before successful login */ +#define INVALID_LOGIN_ID 0x10000 +/* * Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be * provided in the config rom. Most devices do provide a value, which
@@ -791,9 +794,20 @@ static void sbp2_release_target(struct kref *kref)scsi_remove_device (sdev);scsi_device_put (sdev); } -sbp2_send_management_orb (lu, tgt->node_id, lu->generation, -SBP2_LOGOUT_REQUEST , lu->login_id,NULL ); - +if (lu->login_id !=INVALID_LOGIN_ID ) { +int generation, node_id; +/* +* tgt->node_id may be obsolete here if we failed +* during initial login or after a bus reset where +* the topology changed. +*/ + generation = device->generation; +smp_rmb ();/* node_id vs. generation */ + node_id = device->node_id; +sbp2_send_management_orb (lu, node_id, generation, +SBP2_LOGOUT_REQUEST , + lu->login_id,NULL ); + }fw_core_remove_address_handler (&lu->address_handler);list_del (&lu->link);kfree (lu);
@@ -808,19 +822,20 @@ static void sbp2_release_target(struct kref *kref)static struct workqueue_struct *sbp2_wq; +static void sbp2_target_put (struct sbp2_target *tgt) +{ +kref_put (&tgt->kref, sbp2_release_target); +} +/* * Always get the target's kref when scheduling work on one its units. * Each workqueue job is responsible to call sbp2_target_put() upon return. */ static void sbp2_queue_work (struct sbp2_logical_unit *lu,unsigned long delay) { -if (queue_delayed_work (sbp2_wq, &lu->work, delay)) -kref_get (&lu->tgt->kref); -} - -static void sbp2_target_put (struct sbp2_target *tgt) -{ -kref_put (&tgt->kref, sbp2_release_target); +kref_get (&lu->tgt->kref); +if (!queue_delayed_work (sbp2_wq, &lu->work, delay)) +sbp2_target_put (lu->tgt); } static void
@@ -993,6 +1008,7 @@ static int sbp2_add_logical_unit(struct sbp2_target *tgt, int lun_entry) lu->tgt = tgt; lu->lun = lun_entry &0xffff ; + lu->login_id =INVALID_LOGIN_ID ; lu->retries =0 ; lu->has_sdev = false; lu->blocked = false;
@@ -1158,7 +1174,7 @@ static int sbp2_probe(struct device *dev)/* Do the login in a workqueue so we can easily reschedule retries. */ list_for_each_entry (lu, &tgt->lu_list, link) -sbp2_queue_work (lu,0 ); +sbp2_queue_work (lu,DIV_ROUND_UP (HZ ,5 ));return 0 ; fail_tgt_put:
drivers/firewire/fw-topology.c +4 -2
@@ -413,7 +413,7 @@ static void update_tree(struct fw_card *card, struct fw_node *root) { struct list_head list0, list1; -struct fw_node *node0, *node1; +struct fw_node *node0, *node1, *next1;int i, event;INIT_LIST_HEAD (&list0);
@@ -485,7 +485,9 @@ update_tree(struct fw_card *card, struct fw_node *root) } node0 =fw_node (node0->link.next); - node1 =fw_node (node1->link.next); + next1 =fw_node (node1->link.next); +fw_node_put (node1); + node1 = next1; } }
drivers/firewire/fw-transaction.h +1 -1
@@ -248,7 +248,7 @@ struct fw_card {struct fw_node *local_node;struct fw_node *root_node;struct fw_node *irm_node; -int color; +u8 color;/* must be u8 to match the definition in struct fw_node */ int gap_count;bool beta_repeaters_present;
drivers/hid/usbhid/hid-quirks.c +0 -4
@@ -247,8 +247,6 @@#define USB_DEVICE_ID_LD_MACHINETEST 0x2040#define USB_VENDOR_ID_LOGITECH 0x046d -#define USB_DEVICE_ID_LOGITECH_LX3 0xc044 -#define USB_DEVICE_ID_LOGITECH_V150 0xc047#define USB_DEVICE_ID_LOGITECH_RECEIVER 0xc101#define USB_DEVICE_ID_LOGITECH_HARMONY 0xc110#define USB_DEVICE_ID_LOGITECH_HARMONY_2 0xc111
@@ -603,8 +601,6 @@ static const struct hid_blacklist { { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_ELITE_KBD, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP }, - { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_LX3, HID_QUIRK_INVERT_HWHEEL }, - { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_V150, HID_QUIRK_INVERT_HWHEEL }, { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K, HID_QUIRK_MICROSOFT_KEYS }, { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_LK6K, HID_QUIRK_MICROSOFT_KEYS },
drivers/i2c/busses/scx200_i2c.c +1 -0
@@ -81,6 +81,7 @@ static struct i2c_algo_bit_data scx200_i2c_data = {static struct i2c_adapter scx200_i2c_ops = { .owner =THIS_MODULE , + .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , .id =I2C_HW_B_SCX200 , .algo_data = &scx200_i2c_data, .name ="NatSemi SCx200 I2C" ,
drivers/input/keyboard/atkbd.c +5 -5
@@ -834,10 +834,10 @@ static void atkbd_disconnect(struct serio *serio) }/* -* Most special keys (Fn+F?) on Dell Latitudes do not generate release +* Most special keys (Fn+F?) on Dell laptops do not generate release * events so we have to do it ourselves. */ -static void atkbd_latitude_keymap_fixup (struct atkbd *atkbd) +static void atkbd_dell_laptop_keymap_fixup (struct atkbd *atkbd) {const unsigned int forced_release_keys[] = {0x85 ,0x86 ,0x87 ,0x88 ,0x89 ,0x8a ,0x8b ,0x8f ,0x93 ,
@@ -1461,13 +1461,13 @@ static int __init atkbd_setup_fixup(const struct dmi_system_id *id)static struct dmi_system_id atkbd_dmi_quirk_table[]__initdata = { { - .ident ="Dell Latitude series" , + .ident ="Dell Laptop" , .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"Latitude" ), +DMI_MATCH (DMI_CHASSIS_TYPE ,"8" ),/* Portable */ }, .callback = atkbd_setup_fixup, - .driver_data = atkbd_latitude_keymap_fixup, + .driver_data = atkbd_dell_laptop_keymap_fixup, }, { .ident ="HP 2133" ,
drivers/media/dvb/frontends/s5h1411.c +28 -7
@@ -471,6 +471,20 @@ static int s5h1411_set_spectralinversion(struct dvb_frontend *fe, int inversion)return s5h1411_writereg (state,S5H1411_I2C_TOP_ADDR ,0x24 , val); } +static int s5h1411_set_serialmode (struct dvb_frontend *fe,int serial) +{ +struct s5h1411_state *state = fe->demodulator_priv; +u16 val; + +dprintk ("%s(%d)\n" , __func__, serial); + val =s5h1411_readreg (state,S5H1411_I2C_TOP_ADDR ,0xbd ) & ~0x100 ; + +if (serial ==1 ) + val |=0x100 ; + +return s5h1411_writereg (state,S5H1411_I2C_TOP_ADDR ,0xbd , val); +} +static int s5h1411_enable_modulation (struct dvb_frontend *fe,fe_modulation_t m) {
@@ -535,7 +549,7 @@ static int s5h1411_set_gpio(struct dvb_frontend *fe, int enable)return s5h1411_writereg (state,S5H1411_I2C_TOP_ADDR ,0xe0 , val); } -static int s5h1411_sleep (struct dvb_frontend *fe,int enable) +static int s5h1411_set_powerstate (struct dvb_frontend *fe,int enable) {struct s5h1411_state *state = fe->demodulator_priv;
@@ -551,6 +565,11 @@ static int s5h1411_sleep(struct dvb_frontend *fe, int enable)return 0 ; } +static int s5h1411_sleep (struct dvb_frontend *fe) +{ +return s5h1411_set_powerstate (fe,1 ); +} +static int s5h1411_register_reset (struct dvb_frontend *fe) {struct s5h1411_state *state = fe->demodulator_priv;
@@ -574,9 +593,6 @@ static int s5h1411_set_frontend(struct dvb_frontend *fe,s5h1411_enable_modulation (fe, p->u.vsb.modulation); -/* Allow the demod to settle */ -msleep (100 ); -if (fe->ops.tuner_ops.set_params) {if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl (fe,1 );
@@ -587,6 +603,10 @@ static int s5h1411_set_frontend(struct dvb_frontend *fe, fe->ops.i2c_gate_ctrl (fe,0 ); } +/* Issue a reset to the demod so it knows to resync against the +newly tuned frequency */ +s5h1411_softreset (fe); +return 0 ; }
@@ -599,7 +619,7 @@ static int s5h1411_init(struct dvb_frontend *fe)dprintk ("%s()\n" , __func__); -s5h1411_sleep (fe,0 ); +s5h1411_set_powerstate (fe,0 );s5h1411_register_reset (fe);for (i =0 ; i <ARRAY_SIZE (init_tab); i++)
@@ -612,10 +632,10 @@ static int s5h1411_init(struct dvb_frontend *fe)if (state->config->output_mode ==S5H1411_SERIAL_OUTPUT )/* Serial */ -s5h1411_writereg (state,S5H1411_I2C_TOP_ADDR ,0xbd ,0x1101 ); +s5h1411_set_serialmode (fe,1 );else /* Parallel */ -s5h1411_writereg (state,S5H1411_I2C_TOP_ADDR ,0xbd ,0x1001 ); +s5h1411_set_serialmode (fe,0 );s5h1411_set_spectralinversion (fe, state->config->inversion);s5h1411_set_if_freq (fe, state->config->vsb_if);
@@ -863,6 +883,7 @@ static struct dvb_frontend_ops s5h1411_ops = { }, .init = s5h1411_init, + .sleep = s5h1411_sleep, .i2c_gate_ctrl = s5h1411_i2c_gate_ctrl, .set_frontend = s5h1411_set_frontend, .get_frontend = s5h1411_get_frontend,
drivers/media/video/pvrusb2/pvrusb2-encoder.c +4 -0
@@ -402,6 +402,10 @@ static int pvr2_encoder_prep_config(struct pvr2_hdw *hdw) ret |=pvr2_encoder_vcmd (hdw,CX2341X_ENC_MISC ,4 ,0 ,3 ,0 ,0 ); ret |=pvr2_encoder_vcmd (hdw,CX2341X_ENC_MISC ,4 ,15 ,0 ,0 ,0 ); +/* prevent the PTSs from slowly drifting away in the generated +MPEG stream */ + ret |=pvr2_encoder_vcmd (hdw,CX2341X_ENC_MISC ,2 ,4 ,1 ); +return ret; }
drivers/net/atlx/atl1.c +4 -3
@@ -2317,7 +2317,8 @@ static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count,if (tpd != ptpd)memcpy (tpd, ptpd,sizeof (struct tx_packet_desc )); tpd->buffer_addr =cpu_to_le64 (buffer_info->dma); - tpd->word2 = (cpu_to_le16 (buffer_info->length) & + tpd->word2 &= ~(TPD_BUFLEN_MASK <<TPD_BUFLEN_SHIFT ); + tpd->word2 |= (cpu_to_le16 (buffer_info->length) &TPD_BUFLEN_MASK ) <<TPD_BUFLEN_SHIFT ;/*
@@ -2426,8 +2427,8 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) vlan_tag = (vlan_tag <<4 ) | (vlan_tag >>13 ) | ((vlan_tag >>9 ) &0x8 ); ptpd->word3 |=1 <<TPD_INS_VL_TAG_SHIFT ; - ptpd->word3 |= (vlan_tag &TPD_VL_TAGGED_MASK ) << -TPD_VL_TAGGED_SHIFT ; + ptpd->word2 |= (vlan_tag &TPD_VLANTAG_MASK ) << +TPD_VLANTAG_SHIFT ; } tso =atl1_tso (adapter, skb, ptpd);
drivers/net/atlx/atl1.h +1 -1
@@ -504,7 +504,7 @@ struct rx_free_desc {#define TPD_PKTNT_MASK 0x0001#define TPD_PKTINT_SHIFT 15#define TPD_VLANTAG_MASK 0xFFFF -#define TPD_VLAN_SHIFT 16 +#define TPD_VLANTAG_SHIFT 16/* tpd word 3 bits 0:13 */ #define TPD_EOP_MASK 0x0001
drivers/net/bonding/bond_alb.c +8 -5
@@ -167,11 +167,14 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_/* clear slave from tx_hashtbl */ tx_hash_table =BOND_ALB_INFO (bond).tx_hashtbl; - index =SLAVE_TLB_INFO (slave).head; -while (index !=TLB_NULL_INDEX ) { -u32 next_index = tx_hash_table[index].next; -tlb_init_table_entry (&tx_hash_table[index], save_load); - index = next_index; +/* skip this if we've already freed the tx hash table */ +if (tx_hash_table) { + index =SLAVE_TLB_INFO (slave).head; +while (index !=TLB_NULL_INDEX ) { +u32 next_index = tx_hash_table[index].next; +tlb_init_table_entry (&tx_hash_table[index], save_load); + index = next_index; + } }tlb_init_slave (slave);
drivers/net/wireless/libertas/scan.c +2 -2
@@ -598,8 +598,8 @@ static int lbs_process_bss(struct bss_descriptor *bss,switch (elem->id) {case MFIE_TYPE_SSID : - bss->ssid_len = elem->len; -memcpy (bss->ssid, elem->data, elem->len); + bss->ssid_len =min_t (int,32 , elem->len); +memcpy (bss->ssid, elem->data, bss->ssid_len);lbs_deb_scan ("got SSID IE: '%s', len %u\n" ,escape_essid (bss->ssid, bss->ssid_len), bss->ssid_len);
drivers/pci/probe.c +1 -1
@@ -219,7 +219,7 @@ static inline enum pci_bar_type decode_bar(struct resource *res, u32 bar) res->flags = bar & ~PCI_BASE_ADDRESS_MEM_MASK ; -if (res->flags ==PCI_BASE_ADDRESS_MEM_TYPE_64 ) +if (res->flags &PCI_BASE_ADDRESS_MEM_TYPE_64 )return pci_bar_mem64;return pci_bar_mem32; }
drivers/rtc/rtc-cmos.c +18 -15
@@ -1030,29 +1030,32 @@ static struct platform_driver cmos_platform_driver = {static int __init cmos_init (void ) { +int retval =0 ; +#ifdef CONFIG_PNP -if (pnp_platform_devices) -return pnp_register_driver (&cmos_pnp_driver); -else -return platform_driver_probe (&cmos_platform_driver, - cmos_platform_probe); -#else -return platform_driver_probe (&cmos_platform_driver, - cmos_platform_probe); -#endif /* CONFIG_PNP */ +pnp_register_driver (&cmos_pnp_driver); +#endif + +if (!cmos_rtc.dev) + retval =platform_driver_probe (&cmos_platform_driver, + cmos_platform_probe); + +if (retval ==0 ) +return 0 ; + +#ifdef CONFIG_PNP +pnp_unregister_driver (&cmos_pnp_driver); +#endif +return retval; }module_init (cmos_init); static void __exit cmos_exit(void) {#ifdef CONFIG_PNP -if (pnp_platform_devices) -pnp_unregister_driver (&cmos_pnp_driver); -else -platform_driver_unregister (&cmos_platform_driver); -#else +pnp_unregister_driver (&cmos_pnp_driver); +#endif platform_driver_unregister (&cmos_platform_driver); -#endif /* CONFIG_PNP */ }module_exit (cmos_exit);
drivers/scsi/sd.c +9 -1
@@ -1047,7 +1047,6 @@ static int sd_done(struct scsi_cmnd *SCpnt) good_bytes =sd_completed_bytes (SCpnt);break ;case RECOVERED_ERROR : -case NO_SENSE :/* Inform the user, but make sure that it's not treated * as a hard error. */
@@ -1056,6 +1055,15 @@ static int sd_done(struct scsi_cmnd *SCpnt)memset (SCpnt->sense_buffer,0 ,SCSI_SENSE_BUFFERSIZE ); good_bytes =scsi_bufflen (SCpnt);break ; +case NO_SENSE : +/* This indicates a false check condition, so ignore it. An +* unknown amount of data was transferred so treat it as an +* error. +*/ +scsi_print_sense ("sd" , SCpnt); + SCpnt->result =0 ; +memset (SCpnt->sense_buffer,0 ,SCSI_SENSE_BUFFERSIZE ); +break ;case ABORTED_COMMAND :if (sshdr.asc ==0x10 ) {/* DIF: Disk detected corruption */ scsi_print_result (SCpnt);
drivers/usb/core/hcd.c +32 -3
@@ -106,6 +106,9 @@ static DEFINE_SPINLOCK(hcd_root_hub_lock);/* used when updating an endpoint's URB list */ static DEFINE_SPINLOCK (hcd_urb_list_lock); +/* used to protect against unlinking URBs after the device is gone */ +static DEFINE_SPINLOCK (hcd_urb_unlink_lock); +/* wait queue for synchronous unlinks */ DECLARE_WAIT_QUEUE_HEAD (usb_kill_urb_queue);
@@ -1377,10 +1380,25 @@ static int unlink1(struct usb_hcd *hcd, struct urb *urb, int status)int usb_hcd_unlink_urb (struct urb *urb,int status) {struct usb_hcd *hcd; -int retval; +int retval = -EIDRM ; +unsigned long flags; - hcd =bus_to_hcd (urb->dev->bus); - retval =unlink1 (hcd, urb, status); +/* Prevent the device and bus from going away while +* the unlink is carried out. If they are already gone +* then urb->use_count must be 0, since disconnected +* devices can't have any active URBs. +*/ +spin_lock_irqsave (&hcd_urb_unlink_lock, flags); +if (atomic_read (&urb->use_count) >0 ) { + retval =0 ; +usb_get_dev (urb->dev); + } +spin_unlock_irqrestore (&hcd_urb_unlink_lock, flags); +if (retval ==0 ) { + hcd =bus_to_hcd (urb->dev->bus); + retval =unlink1 (hcd, urb, status); +usb_put_dev (urb->dev); + }if (retval ==0 ) retval = -EINPROGRESS ;
@@ -1529,6 +1547,17 @@ void usb_hcd_disable_endpoint(struct usb_device *udev, hcd->driver->endpoint_disable (hcd, ep); } +/* Protect against drivers that try to unlink URBs after the device +* is gone, by waiting until all unlinks for @udev are finished. +* Since we don't currently track URBs by device, simply wait until +* nothing is running in the locked region of usb_hcd_unlink_urb(). +*/ +void usb_hcd_synchronize_unlinks (struct usb_device *udev) +{ +spin_lock_irq (&hcd_urb_unlink_lock); +spin_unlock_irq (&hcd_urb_unlink_lock); +} +/*-------------------------------------------------------------------------*/ /* called in any context */
drivers/usb/core/hcd.h +1 -0
@@ -232,6 +232,7 @@ extern void usb_hcd_flush_endpoint(struct usb_device *udev, struct usb_host_endpoint *ep);extern void usb_hcd_disable_endpoint (struct usb_device *udev,struct usb_host_endpoint *ep); +extern void usb_hcd_synchronize_unlinks (struct usb_device *udev);extern int usb_hcd_get_frame_number (struct usb_device *udev); extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver,
drivers/usb/core/hub.c +1 -0
@@ -1349,6 +1349,7 @@ void usb_disconnect(struct usb_device **pdev)*/ dev_dbg (&udev->dev,"unregistering device\n" );usb_disable_device (udev,0 ); +usb_hcd_synchronize_unlinks (udev);usb_unlock_device (udev);
drivers/usb/core/urb.c +15 -0
@@ -465,6 +465,12 @@ EXPORT_SYMBOL_GPL(usb_submit_urb);* indicating that the request has been canceled (rather than any other * code). * +* Drivers should not call this routine or related routines, such as +* usb_kill_urb() or usb_unlink_anchored_urbs(), after their disconnect +* method has returned. The disconnect function should synchronize with +* a driver's I/O routines to insure that all URB-related activity has +* completed before it returns. +* * This request is always asynchronous. Success is indicated by * returning -EINPROGRESS, at which time the URB will probably not yet * have been given back to the device driver. When it is eventually
@@ -541,6 +547,9 @@ EXPORT_SYMBOL_GPL(usb_unlink_urb);* This routine may not be used in an interrupt context (such as a bottom * half or a completion handler), or when holding a spinlock, or in other * situations where the caller can't schedule(). +* +* This routine should not be called by a driver after its disconnect +* method has returned. */ void usb_kill_urb (struct urb *urb) {
@@ -568,6 +577,9 @@ EXPORT_SYMBOL_GPL(usb_kill_urb);* * this allows all outstanding URBs to be killed starting * from the back of the queue +* +* This routine should not be called by a driver after its disconnect +* method has returned. */ void usb_kill_anchored_urbs (struct usb_anchor *anchor) {
@@ -597,6 +609,9 @@ EXPORT_SYMBOL_GPL(usb_kill_anchored_urbs);* from the back of the queue. This function is asynchronous. * The unlinking is just tiggered. It may happen after this * function has returned. +* +* This routine should not be called by a driver after its disconnect +* method has returned. */ void usb_unlink_anchored_urbs (struct usb_anchor *anchor) {
drivers/usb/storage/unusual_devs.h +9 -0
@@ -1745,6 +1745,15 @@ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x0201, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), +/* Reported by Alexandre Oliva <[email protected]> +* JMicron responds to USN and several other SCSI ioctls with a +* residue that causes subsequent I/O requests to fail. */ +UNUSUAL_DEV (0x152d ,0x2329 ,0x0100 ,0x0100 , +"JMicron" , +"USB to ATA/ATAPI Bridge" , +US_SC_DEVICE ,US_PR_DEVICE ,NULL , +US_FL_IGNORE_RESIDUE ), +/* Reported by Robert Schedel <[email protected]> * Note: this is a 'super top' device like the above 14cd/6600 device */ UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201,
fs/hfsplus/bitmap.c +12 -0
@@ -32,6 +32,10 @@ int hfsplus_block_allocate(struct super_block *sb, u32 size, u32 offset, u32 *mamutex_lock (&HFSPLUS_SB (sb).alloc_file->i_mutex); mapping =HFSPLUS_SB (sb).alloc_file->i_mapping; page =read_mapping_page (mapping, offset /PAGE_CACHE_BITS ,NULL ); +if (IS_ERR (page)) { + start = size; + goto out; + } pptr =kmap (page); curr = pptr + (offset & (PAGE_CACHE_BITS -1 )) /32 ; i = offset %32 ;
@@ -73,6 +77,10 @@ int hfsplus_block_allocate(struct super_block *sb, u32 size, u32 offset, u32 *mabreak ; page =read_mapping_page (mapping, offset /PAGE_CACHE_BITS ,NULL ); +if (IS_ERR (page)) { + start = size; + goto out; + } curr = pptr =kmap (page);if ((size ^ offset) /PAGE_CACHE_BITS ) end = pptr +PAGE_CACHE_BITS /32 ;
@@ -120,6 +128,10 @@ found: offset +=PAGE_CACHE_BITS ; page =read_mapping_page (mapping, offset /PAGE_CACHE_BITS ,NULL ); +if (IS_ERR (page)) { + start = size; + goto out; + } pptr =kmap (page); curr = pptr; end = pptr +PAGE_CACHE_BITS /32 ;
fs/hfsplus/catalog.c +5 -0
@@ -168,6 +168,11 @@ int hfsplus_find_cat(struct super_block *sb, u32 cnid,return -EIO ; } +if (be16_to_cpu (tmp.thread.nodeName.length) >255 ) { +printk (KERN_ERR "hfs: catalog name length corrupted\n" ); +return -EIO ; + } +hfsplus_cat_build_key_uni (fd->search_key,be32_to_cpu (tmp.thread.parentID), &tmp.thread.nodeName);return hfs_brec_find (fd);
include/linux/sched.h +3 -1
@@ -1286,7 +1286,9 @@ struct task_struct {atomic_t fs_excl;/* holding fs exclusive resources */ struct rcu_head rcu; -/* +struct list_head *scm_work_list; + +/* * cache last used pipe for splice */ struct pipe_inode_info *splice_pipe;
include/math-emu/op-common.h +13 -4
@@ -139,18 +139,27 @@ do { \ if (X##_e <= _FP_WFRACBITS_##fs) \ { \ _FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs); \ - _FP_ROUND(wc, X); \ if (_FP_FRAC_HIGH_##fs(X) \ & (_FP_OVERFLOW_##fs >> 1)) \ { \ X##_e = 1; \ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ - FP_SET_EXCEPTION(FP_EX_INEXACT); \ } \ else \ { \ - X##_e = 0; \ - _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ + _FP_ROUND(wc, X); \ + if (_FP_FRAC_HIGH_##fs(X) \ + & (_FP_OVERFLOW_##fs >> 1)) \ + { \ + X##_e = 1; \ + _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ + FP_SET_EXCEPTION(FP_EX_INEXACT); \ + } \ + else \ + { \ + X##_e = 0; \ + _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ + } \ } \ if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) || \ (FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \
include/net/scm.h +3 -2
@@ -14,8 +14,9 @@struct scm_fp_list { -int count; -struct file *fp[SCM_MAX_FD ]; +struct list_head list; +int count; +struct file *fp[SCM_MAX_FD ]; };struct scm_cookie
kernel/sched_clock.c +3 -3
@@ -118,13 +118,13 @@ static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now)/* * scd->clock = clamp(scd->tick_gtod + delta, -* max(scd->tick_gtod, scd->clock), -* scd->tick_gtod + TICK_NSEC); +* max(scd->tick_gtod, scd->clock), +* max(scd->clock, scd->tick_gtod + TICK_NSEC)); */ clock = scd->tick_gtod + delta; min_clock =wrap_max (scd->tick_gtod, scd->clock); - max_clock = scd->tick_gtod +TICK_NSEC ; + max_clock =wrap_max (scd->clock, scd->tick_gtod +TICK_NSEC ); clock =wrap_max (clock, min_clock); clock =wrap_min (clock, max_clock);
kernel/sched_features.h +1 -1
@@ -5,7 +5,7 @@ SCHED_FEAT(START_DEBIT, 1) SCHED_FEAT(AFFINE_WAKEUPS, 1) SCHED_FEAT(CACHE_HOT_BUDDY, 1) SCHED_FEAT(SYNC_WAKEUPS, 1) -SCHED_FEAT(HRTICK, 1) +SCHED_FEAT(HRTICK, 0) SCHED_FEAT(DOUBLE_TICK, 0) SCHED_FEAT(ASYM_GRAN, 1)SCHED_FEAT (LB_BIAS ,1 )
net/core/scm.c +21 -3
@@ -75,6 +75,7 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)if (!fpl)return -ENOMEM ; *fplp = fpl; +INIT_LIST_HEAD (&fpl->list); fpl->count =0 ; } fpp = &fpl->fp[fpl->count];
@@ -106,9 +107,25 @@ void __scm_destroy(struct scm_cookie *scm)if (fpl) { scm->fp =NULL ; -for (i=fpl->count-1 ; i>=0 ; i--) -fput (fpl->fp[i]); -kfree (fpl); +if (current->scm_work_list) { +list_add_tail (&fpl->list, current->scm_work_list); + }else { +LIST_HEAD (work_list); + + current->scm_work_list = &work_list; + +list_add (&fpl->list, &work_list); +while (!list_empty (&work_list)) { + fpl = list_first_entry(&work_list, struct scm_fp_list, list); + +list_del (&fpl->list); +for (i=fpl->count-1 ; i>=0 ; i--) +fput (fpl->fp[i]); +kfree (fpl); + } + + current->scm_work_list =NULL ; + } } }
@@ -284,6 +301,7 @@ struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl) new_fpl =kmalloc (sizeof (*fpl),GFP_KERNEL );if (new_fpl) { +INIT_LIST_HEAD (&new_fpl->list);for (i=fpl->count-1 ; i>=0 ; i--)get_file (fpl->fp[i]);memcpy (new_fpl, fpl,sizeof (*fpl));
net/ipv4/tcp_output.c +22 -11
@@ -357,6 +357,17 @@ struct tcp_out_options {__u32 tsval, tsecr;/* need to include OPTION_TS */ }; +/* Beware: Something in the Internet is very sensitive to the ordering of +* TCP options, we learned this through the hard way, so be careful here. +* Luckily we can at least blame others for their non-compliance but from +* inter-operatibility perspective it seems that we're somewhat stuck with +* the ordering which we have been using if we want to keep working with +* those broken things (not that it currently hurts anybody as there isn't +* particular reason why the ordering would need to be changed). +* +* At least SACK_PERM as the first option is known to lead to a disaster +* (but it may well be that other scenarios fail similarly). +*/ static void tcp_options_write (__be32 *ptr,struct tcp_sock *tp,const struct tcp_out_options *opts,__u8 **md5_hash) {
@@ -371,6 +382,12 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, *md5_hash =NULL ; } +if (unlikely (opts->mss)) { + *ptr++ =htonl ((TCPOPT_MSS <<24 ) | + (TCPOLEN_MSS <<16 ) | + opts->mss); + } +if (likely (OPTION_TS & opts->options)) {if (unlikely (OPTION_SACK_ADVERTISE & opts->options)) { *ptr++ = htonl((TCPOPT_SACK_PERM << 24) |
@@ -387,12 +404,6 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, *ptr++ =htonl (opts->tsecr); } -if (unlikely (opts->mss)) { - *ptr++ =htonl ((TCPOPT_MSS <<24 ) | - (TCPOLEN_MSS <<16 ) | - opts->mss); - } -if (unlikely (OPTION_SACK_ADVERTISE & opts->options && !(OPTION_TS & opts->options))) { *ptr++ = htonl((TCPOPT_NOP << 24) |
@@ -2266,6 +2277,11 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, }memset (&opts,0 ,sizeof (opts)); +#ifdef CONFIG_SYN_COOKIES +if (unlikely (req->cookie_ts)) +TCP_SKB_CB (skb)->when =cookie_init_timestamp (req); + else +#endif TCP_SKB_CB (skb)->when = tcp_time_stamp; tcp_header_size = tcp_synack_options(sk, req, dst_metric(dst, RTAX_ADVMSS),
@@ -2292,11 +2308,6 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,/* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */ th->window =htons (min (req->rcv_wnd,65535U )); -#ifdef CONFIG_SYN_COOKIES -if (unlikely (req->cookie_ts)) -TCP_SKB_CB (skb)->when =cookie_init_timestamp (req); - else -#endif tcp_options_write ((__be32 *)(th +1 ), tp, &opts, &md5_hash_location); th->doff = (tcp_header_size >>2 );TCP_INC_STATS (sock_net (sk),TCP_MIB_OUTSEGS );
net/ipv6/tcp_ipv6.c +1 -1
@@ -1087,7 +1087,7 @@ static void tcp_v6_send_ack(struct sk_buff *skb, u32 seq, u32 ack, u32 win, u32 *topt++ =htonl ((TCPOPT_NOP <<24 ) | (TCPOPT_NOP <<16 ) | (TCPOPT_TIMESTAMP <<8 ) |TCPOLEN_TIMESTAMP ); *topt++ =htonl (tcp_time_stamp); - *topt =htonl (ts); + *topt++ =htonl (ts); }#ifdef CONFIG_TCP_MD5SIG
net/sched/sch_generic.c +2 -0
@@ -319,6 +319,7 @@ struct Qdisc_ops noop_qdisc_ops __read_mostly = {static struct netdev_queue noop_netdev_queue = { .qdisc = &noop_qdisc, + .qdisc_sleeping = &noop_qdisc, };struct Qdisc noop_qdisc = {
@@ -344,6 +345,7 @@ static struct Qdisc_ops noqueue_qdisc_ops __read_mostly = {static struct Qdisc noqueue_qdisc;static struct netdev_queue noqueue_netdev_queue = { .qdisc = &noqueue_qdisc, + .qdisc_sleeping = &noqueue_qdisc, };static struct Qdisc noqueue_qdisc = {
scripts/package/mkspec +3 -0
@@ -64,8 +64,10 @@ fi echo "%install" echo "%ifarch ia64" echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules' +echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware' echo "%else" echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules' +echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware' echo "%endif" echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install'
@@ -92,5 +94,6 @@ echo "%files" echo '%defattr (-, root, root)' echo "%dir /lib/modules" echo "/lib/modules/$KERNELRELEASE" +echo "/lib/firmware" echo "/boot/*" echo ""
security/commoncap.c +3 -3
@@ -279,10 +279,10 @@ static int get_file_caps(struct linux_binprm *bprm)struct vfs_cap_data vcaps;struct inode *inode; -if (bprm->file->f_vfsmnt->mnt_flags &MNT_NOSUID ) { -bprm_clear_caps (bprm); +bprm_clear_caps (bprm); + +if (bprm->file->f_vfsmnt->mnt_flags &MNT_NOSUID )return 0 ; - } dentry =dget (bprm->file->f_dentry); inode = dentry->d_inode;
sound/core/control.c +2 -2
@@ -1427,12 +1427,12 @@ static int snd_ctl_dev_disconnect(struct snd_device *device) cardnum = card->number;snd_assert (cardnum >=0 && cardnum <SNDRV_CARDS , return -ENXIO ); -down_read (&card->controls_rwsem); +read_lock (&card->ctl_files_rwlock);list_for_each_entry (ctl, &card->ctl_files, list) {wake_up (&ctl->change_sleep);kill_fasync (&ctl->fasync,SIGIO ,POLL_ERR ); } -up_read (&card->controls_rwsem); +read_unlock (&card->ctl_files_rwlock);if ((err =snd_unregister_device (SNDRV_DEVICE_TYPE_CONTROL , card,-1 )) <0 )
sound/pci/hda/hda_intel.c +29 -0
@@ -45,6 +45,7 @@#include <linux/slab.h> #include <linux/pci.h> #include <linux/mutex.h> +#include <linux/reboot.h> #include <sound/core.h> #include <sound/initval.h> #include "hda_codec.h"
@@ -385,6 +386,9 @@ struct azx {/* for pending irqs */ struct work_struct irq_pending_work; + +/* reboot notifier (for mysterious hangup problem at power-down) */ +struct notifier_block reboot_notifier; };/* driver types */
@@ -1890,12 +1894,36 @@ static int azx_resume(struct pci_dev *pci)/* +* reboot notifier for hang-up problem at power-down +*/ +static int azx_halt (struct notifier_block *nb,unsigned long event,void *buf) +{ + struct azx *chip = container_of(nb, struct azx, reboot_notifier); +azx_stop_chip (chip); +return NOTIFY_OK ; +} + +static void azx_notifier_register (struct azx *chip) +{ + chip->reboot_notifier.notifier_call = azx_halt; +register_reboot_notifier (&chip->reboot_notifier); +} + +static void azx_notifier_unregister (struct azx *chip) +{ +if (chip->reboot_notifier.notifier_call) +unregister_reboot_notifier (&chip->reboot_notifier); +} + +/* * destructor */ static int azx_free (struct azx *chip) {int i; +azx_notifier_unregister (chip); +if (chip->initialized) {azx_clear_irq_pending (chip);for (i =0 ; i < chip->num_streams; i++)
@@ -2250,6 +2278,7 @@ static int __devinit azx_probe(struct pci_dev *pci,pci_set_drvdata (pci, card); chip->running =1 ;power_down_all_codecs (chip); +azx_notifier_register (chip); dev++;return err;
Quoted 6 lines · Greg KH
include/linux/sched.h +0
-0
include/linux/sched.h struct task_struct { · line 1294
Quoted 10 lines
include/linux/sched.h +3
-1@@ -1286,7 +1286,9 @@ struct task_struct {atomic_t fs_excl;/* holding fs exclusive resources */ struct rcu_head rcu; -/* +struct list_head *scm_work_list; + +/* * cache last used pipe for splice */ struct pipe_inode_info *splice_pipe;
You did somethign wrong here when merging that scm_destroy() fix. See the badly indented comment start.
Linus
Quoted 12 lines · Linus Torvalds
Quoted 9 lines · Greg KH
include/linux/sched.h +0
-0@@ -1286,7 +1286,9 @@ struct task_struct {atomic_t fs_excl;/* holding fs exclusive resources */ struct rcu_head rcu;
Quoted 10 lines
include/linux/sched.h struct task_struct { · line 1294
Quoted 7 lines
include/linux/sched.h +3
-1-/* +struct list_head *scm_work_list; + +/* * cache last used pipe for splice */ struct pipe_inode_info *splice_pipe;You did somethign wrong here when merging that
scm_destroy()fix. See the badly indented comment start.
Ugh, you are right, it should be indented. Cut and paste caused that :(
I'll fix it up in the next version, there shouldn't be any problem as it's just a formatting issue. I had to do it by hand compared to the upstream version as the field structures were different between the kernel versions. I moved it higher up in the structure so there wouldn't be merge issues on .25 and .26 as well.
I'll go fix up the patch in those 2 review series too, as it's also formatted wrong there.
thanks,
greg k-h