Linux 2.6.27.16
Subsystems (34)
We (the -stable team) are announcing the release of the 2.6.27.16 kernel.
It contains a wide range of bugfixes, and all users of the 2.6.27 kernel series are strongly encouraged to upgrade.
I'll also be replying to this message with a copy of the patch between 2.6.27.15 and 2.6.27.16
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/filesystems/sysfs-pci.txt | 13 +++ Makefile | 2 arch/ia64/sn/kernel/io_acpi_init.c | 2 arch/ia64/sn/kernel/io_init.c | 2 arch/x86/kernel/apic_32.c | 2 arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 3 arch/x86/mm/fault.c | 8 +- drivers/acpi/dock.c | 8 +- drivers/acpi/executer/exconfig.c | 113 ++++++++++++++++++++-------- drivers/acpi/namespace/nsxfeval.c | 79 +++++++++++++++++++ drivers/acpi/tables.c | 7 + drivers/acpi/tables/tbutils.c | 7 - drivers/acpi/video.c | 29 ++++++- drivers/char/agp/intel-agp.c | 17 +++- drivers/char/vt.c | 5 - drivers/firewire/fw-ohci.c | 2 drivers/firewire/fw-sbp2.c | 43 ++++++---- drivers/ieee1394/ohci1394.h | 2 drivers/ieee1394/sbp2.c | 10 ++ drivers/md/dm-mpath.c | 4 - drivers/md/md.c | 36 +++++---- drivers/misc/eeepc-laptop.c | 3 drivers/misc/sgi-xp/xpc.h | 5 - drivers/misc/sgi-xp/xpc_uv.c | 11 +- drivers/net/e1000/e1000_main.c | 6 - drivers/net/usb/hso.c | 2 drivers/net/wireless/ipw2200.c | 28 +++++-- drivers/net/wireless/ipw2200.h | 1 drivers/pci/pci-sysfs.c | 4 - drivers/pci/pcie/aspm.c | 4 - drivers/pci/rom.c | 8 +- drivers/serial/8250_pci.c | 17 ++++ drivers/usb/serial/option.c | 93 ++++++++++++++--------- drivers/usb/serial/ti_usb_3410_5052.c | 13 ++- drivers/usb/serial/ti_usb_3410_5052.h | 4 + drivers/usb/storage/scsiglue.c | 2 drivers/usb/storage/unusual_devs.h | 15 --- drivers/video/console/fbcon.c | 39 ++------- drivers/video/console/mdacon.c | 2 drivers/video/console/sticon.c | 4 - drivers/video/console/vgacon.c | 4 - fs/binfmt_elf.c | 14 +++ fs/seq_file.c | 115 ++++++++++++++--------------- fs/xfs/linux-2.6/xfs_buf.c | 3 include/acpi/pdc_intel.h | 2 include/linux/console_struct.h | 1 include/linux/module.h | 1 include/linux/pci.h | 2 include/linux/pci_ids.h | 1 include/linux/wait.h | 11 ++ ipc/shm.c | 4 + kernel/irq/chip.c | 1 kernel/sched.c | 4 - kernel/wait.c | 59 +++++++++++++- mm/swap.c | 13 --- net/sctp/input.c | 13 +++ net/sunrpc/svcsock.c | 9 +- sound/pci/hda/patch_realtek.c | 4 + sound/usb/usbaudio.c | 1 59 files changed, 622 insertions(+), 295 deletions(-)
Alan Stern (1):
USB: usb-storage: add Pentax to the bad-vendor list
Alex Chiang (1):
PCI: properly clean up ASPM link state on device remove
Alexey Dobriyan (1):
seq_file: fix big-enough lseek() + read()
Borislav Petkov (1):
x86: APIC: enable workaround on AMD Fam10h CPUs
Chandra Seetharaman (1):
dm mpath: avoid attempting to activate null path
Clemens Ladisch (1):
sound: usb-audio: handle wMaxPacketSize for FIXED_ENDPOINT devices
Darren Salt (1):
eeepc-laptop: fix oops when changing backlight brightness during eeepc-laptop init
Dean Nelson (2):
sgi-xp: fix writing past the end of kzalloc()'d space
genirq: NULL struct irq_desc's member 'name' in dynamic_irq_cleanup()
Dennis Noordsij (1):
ACPICA: Copy dynamically loaded tables to local buffer
Dirk De Schepper (1):
USB: option: New mobile broadband modems to be supported
Eric Anholt (1):
agp/intel: Fix broken ® symbol in device name.
Eric Biederman (1):
seq_file: move traverse so it can be used from seq_read
Greg Kroah-Hartman (2):
Revert USB: option: add Pantech cards
Linux 2.6.27.16
Helmut Schaa (1):
ipw2200: fix scanning while associated
Holger Macht (1):
ACPI: dock: Don't eval _STA on every show_docked sysfs read
Jesse Brandeburg (1):
e1000: fix bug with shared interrupt during reset
Jiri Slaby (1):
8250_pci: add support for netmos 9835 IBM devices
Johannes Weiner (1):
wait: prevent exclusive waiter starvation
KOSAKI Motohiro (1):
mm: remove UP version of lru_add_drain_all()
Karsten Keil (1):
e1000: Fix PCI enable to honor the need_ioport flag
Keith Packard (1):
agp/intel: Reduce extraneous PCI posting reads during init
Lachlan McIlroy (1):
XFS: set b_error from bio error in xfs_buf_bio_end_io
Len Brown (1):
ACPI: disable ACPI cleanly when bad RSDP found
Lin Ming (1):
ACPICA: Add function to dereference returned reference objects
Linus Torvalds (1):
Revert "vt: fix background color on line feed"
Masami Hiramatsu (1):
prevent kprobes from catching spurious page faults
Michael Bramer (1):
Add support for '8-port RS-232 MIC-3620 from advantech'
Myron Stowe (1):
ACPICA: Fix table entry truncation calculation
NeilBrown (3):
md: Ensure an md array never has too many devices.
md: Don't try to set an array to 'read-auto' if it is already in that state.
md: Allow metadata_version to be updated for externally managed metadata.
Niels de Vos (1):
serial: set correct baud_base for Oxford Semiconductor Ltd EXSYS EX-41092 Dual 16950 Serial adapter
Oliver Neukum (2):
USB: new id for ti_usb_3410_5052 driver
USB: two more usb ids for ti_usb_3410_5052Pallipadi, Venkatesh (1):
ACPI: Enable bit 11 in _PDC to advertise hw coord
Paulius Zaleckas (1):
hso: rfkill type should be WWAN
Roland McGrath (1):
elf core dump: fix get_user use
Rusty Russell (1):
module: remove over-zealous check in __module_get()
Stefan Richter (5):
ieee1394: ohci1394: increase AT req. retries, fix ack_busy_X from Panasonic camcorders and others
firewire: ohci: increase AT req. retries, fix ack_busy_X from Panasonic camcorders and others
firewire: sbp2: fix DMA mapping leak on the failure path
firewire: sbp2: add workarounds for 2nd and 3rd generation iPods
ieee1394: sbp2: add workarounds for 2nd and 3rd generation iPods
Takashi Iwai (3):
ALSA: hda - Add missing COEF initialization for ALC887
ALSA: hda - Add missing initialization for ALC272
ALSA: hda - Add quirk for FSC Amilo Xi2550
Timothy S. Nelson (1):
PCI: return error on failure to read PCI ROMs
Tom Tucker (1):
Add a reference to sunrpc in svc_addsock
Tony Battersby (1):
shm: fix shmctl(SHM_INFO) lockup with !CONFIG_SHMEM
Vlad Yasevich (1):
sctp: Fix another socket race during accept/peeloff
Yinghai Lu (1):
ACPI: don't load acpi_cpufreq if acpi=off
Zhang Rui (1):
ACPI: video: Fix reversed brightness behavior on ThinkPad SL series
Zhao Yakui (2):
ACPI: proc_dir_entry 'video/VGA' already registered
ACPI: Skip the first two elements in the _BCL package
Zhenyu Wang (1):
agp/intel: add support for G41 chipset
Documentation/filesystems/sysfs-pci.txt +12 -1
@@ -9,6 +9,7 @@ that support it. For example, a given bus might look like this: | |-- class | |-- config | |-- device + | |-- enable | |-- irq | |-- local_cpus | |-- resource
@@ -32,6 +33,7 @@ files, each with their own function. class PCI class (ascii, ro) config PCI config space (binary, rw) device PCI device (ascii, ro) + enable Whether the device is enabled (ascii, rw) irq IRQ number (ascii, ro) local_cpus nearby CPU mask (cpumask, ro) resource PCI resource host addresses (ascii, ro)
@@ -57,10 +59,19 @@ used to do actual device programming from userspace. Note that some platforms don't support mmapping of certain resources, so be sure to check the return value from any attempted mmap. +The 'enable' file provides a counter that indicates how many times the device +has been enabled. If the 'enable' file currently returns '4', and a '1' is +echoed into it, it will then return '5'. Echoing a '0' into it will decrease +the count. Even when it returns to 0, though, some of the initialisation +may not be reversed. + The 'rom' file is special in that it provides read-only access to the device's ROM file, if available. It's disabled by default, however, so applications should write the string "1" to the file to enable it before attempting a read -call, and disable it following the access by writing "0" to the file. +call, and disable it following the access by writing "0" to the file. Note +that the device must be enabled for a rom read to return data succesfully. +In the event a driver is not bound to the device, it can be enabled using the +'enable' file, documented above. Accessing legacy resources through sysfs ----------------------------------------
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 27 -EXTRAVERSION = .15 +EXTRAVERSION = .16 NAME = Trembling Tortoise # *DOCUMENTATION*
arch/ia64/sn/kernel/io_acpi_init.c +1 -1
@@ -434,7 +434,7 @@ sn_acpi_slot_fixup(struct pci_dev *dev) size =pci_resource_len (dev,PCI_ROM_RESOURCE ); addr =ioremap (pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE ], size); - image_size =pci_get_rom_size (addr, size); + image_size =pci_get_rom_size (dev, addr, size); dev->resource[PCI_ROM_RESOURCE ].start = (unsigned long ) addr; dev->resource[PCI_ROM_RESOURCE ].end = (unsigned long ) addr + image_size -1 ;
arch/ia64/sn/kernel/io_init.c +1 -1
@@ -269,7 +269,7 @@ sn_io_slot_fixup(struct pci_dev *dev) rom =ioremap (pci_resource_start (dev,PCI_ROM_RESOURCE ), size +1 ); - image_size =pci_get_rom_size (rom, size +1 ); + image_size =pci_get_rom_size (dev, rom, size +1 ); dev->resource[PCI_ROM_RESOURCE ].end = dev->resource[PCI_ROM_RESOURCE ].start + image_size -1 ;
arch/x86/kernel/apic_32.c +1 -1
@@ -1115,7 +1115,7 @@ static int __init detect_init_APIC(void)switch (boot_cpu_data.x86_vendor) {case X86_VENDOR_AMD :if ((boot_cpu_data.x86 ==6 && boot_cpu_data.x86_model >1 ) || - (boot_cpu_data.x86 ==15 )) + (boot_cpu_data.x86 >=15 ))break ; goto no_apic;case X86_VENDOR_INTEL :
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +3 -0
@@ -779,6 +779,9 @@ static int __init acpi_cpufreq_init(void) {int ret; +if (acpi_disabled) +return 0 ; +dprintk ("acpi_cpufreq_init\n" ); ret =acpi_cpufreq_early_init ();
arch/x86/mm/fault.c +6 -2
@@ -607,8 +607,6 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) si_code =SEGV_MAPERR ; -if (notify_page_fault (regs)) -return ;if (unlikely (kmmio_fault (regs, address)))return ;
@@ -638,6 +636,9 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)if (spurious_fault (address, error_code))return ; +/* kprobes don't want to hook the spurious faults. */ +if (notify_page_fault (regs)) +return ;/* * Don't take the mm semaphore here. If we fixup a prefetch * fault we could otherwise deadlock.
@@ -645,6 +646,9 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) goto bad_area_nosemaphore; } +/* kprobes don't want to hook the spurious faults. */ +if (notify_page_fault (regs)) +return ;#ifdef CONFIG_X86_32 /* It's safe to allow irq's after cr2 has been saved and the vmalloc
drivers/acpi/dock.c +7 -1
@@ -691,8 +691,14 @@ fdd_out:static ssize_t show_docked (struct device *dev,struct device_attribute *attr,char *buf) { -return snprintf (buf,PAGE_SIZE ,"%d\n" ,dock_present (dock_station)); +struct acpi_device *tmp; + +struct dock_station *dock_station = *((struct dock_station **) + dev->platform_data); +if (ACPI_SUCCESS (acpi_bus_get_device (dock_station->handle, &tmp))) +return snprintf (buf,PAGE_SIZE ,"1\n" ); +return snprintf (buf,PAGE_SIZE ,"0\n" ); } static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL);
drivers/acpi/executer/exconfig.c +82 -31
172 lines not on this page · raw message
drivers/acpi/namespace/nsxfeval.c +79 -0
112 lines not on this page · raw message
drivers/acpi/tables.c +6 -1
@@ -293,7 +293,12 @@ static void __init check_multiple_madt(void)int __init acpi_table_init (void ) { -acpi_initialize_tables (initial_tables,ACPI_MAX_TABLES ,0 ); +acpi_status status; + + status =acpi_initialize_tables (initial_tables,ACPI_MAX_TABLES ,0 ); +if (ACPI_FAILURE (status)) +return 1 ; +check_multiple_madt ();return 0 ; }
drivers/acpi/tables/tbutils.c +3 -4
@@ -512,10 +512,9 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags)if (ACPI_FAILURE (status)) {ACPI_WARNING ((AE_INFO ,"Truncating %u table entries!" , - (unsigned ) - (acpi_gbl_root_table_list.size - - acpi_gbl_root_table_list. - count))); + (unsigned ) (table_count - + (acpi_gbl_root_table_list. + count -2 ))));break ; } }
drivers/acpi/video.c +25 -4
@@ -36,6 +36,7 @@#include <linux/backlight.h> #include <linux/thermal.h> #include <linux/video_output.h> +#include <linux/sort.h> #include <asm/uaccess.h> #include <acpi/acpi_bus.h>
@@ -632,6 +633,16 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag) }/* +* Simple comparison function used to sort backlight levels. +*/ + +static int +acpi_video_cmp_level (const void *a,const void *b) +{ +return *(int *)a - *(int *)b; +} + +/* * Arg: * device : video output device (LCD, CRT, ..) *
@@ -682,6 +693,10 @@ acpi_video_init_brightness(struct acpi_video_device *device) count++; } +/* don't sort the first two brightness levels */ +sort (&br->levels[2 ], count -2 ,sizeof (br->levels[2 ]), + acpi_video_cmp_level,NULL ); +if (count <2 ) goto out_free_levels;
@@ -997,7 +1012,7 @@ acpi_video_device_brightness_seq_show(struct seq_file *seq, void *offset) }seq_printf (seq,"levels: " ); -for (i =0 ; i < dev->brightness->count; i++) +for (i =2 ; i < dev->brightness->count; i++)seq_printf (seq," %d" , dev->brightness->levels[i]);seq_printf (seq,"\ncurrent: %d\n" , dev->brightness->curr);
@@ -1036,7 +1051,7 @@ acpi_video_device_write_brightness(struct file *file,return -EFAULT ;/* validate through the list of available levels */ -for (i =0 ; i < dev->brightness->count; i++) +for (i =2 ; i < dev->brightness->count; i++)if (level == dev->brightness->levels[i]) {if (ACPI_SUCCESS (acpi_video_device_lcd_set_level (dev, level)))
@@ -1689,7 +1704,7 @@ acpi_video_get_next_level(struct acpi_video_device *device, max = max_below =0 ; min = min_above =255 ;/* Find closest level to level_current */ -for (i =0 ; i < device->brightness->count; i++) { +for (i =2 ; i < device->brightness->count; i++) { l = device->brightness->levels[i];if (abs (l - level_current) <abs (delta)) { delta = l - level_current;
@@ -1699,7 +1714,7 @@ acpi_video_get_next_level(struct acpi_video_device *device, }/* Ajust level_current to closest available level */ level_current += delta; -for (i =0 ; i < device->brightness->count; i++) { +for (i =2 ; i < device->brightness->count; i++) { l = device->brightness->levels[i];if (l < min) min = l;
@@ -1983,6 +1998,12 @@ static int acpi_video_bus_add(struct acpi_device *device) device->pnp.bus_id[3 ] ='0' + instance; instance ++; } +/* a hack to fix the duplicate name "VGA" problem on Pa 3553 */ +if (!strcmp (device->pnp.bus_id,"VGA" )) { +if (instance) + device->pnp.bus_id[3 ] ='0' + instance; + instance++; + } video->device = device;strcpy (acpi_device_name (device),ACPI_VIDEO_BUS_NAME );
drivers/char/agp/intel-agp.c +12 -5
@@ -40,6 +40,8 @@#define PCI_DEVICE_ID_INTEL_Q45_IG 0x2E12#define PCI_DEVICE_ID_INTEL_G45_HB 0x2E20#define PCI_DEVICE_ID_INTEL_G45_IG 0x2E22 +#define PCI_DEVICE_ID_INTEL_G41_HB 0x2E30 +#define PCI_DEVICE_ID_INTEL_G41_IG 0x2E32/* cover 915 and 945 variants */ #define IS_I915 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB || \
@@ -63,7 +65,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_GM45_HB) + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB || \ + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G41_HB)extern int agp_memory_reserved;
@@ -214,8 +217,8 @@ static int intel_i810_configure(void)if (agp_bridge->driver->needs_scratch_page) {for (i =0 ; i < current_size->num_entries; i++) {writel (agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE +(i*4 )); -readl (intel_private.registers+I810_PTE_BASE +(i*4 ));/* PCI posting. */ } +readl (intel_private.registers+I810_PTE_BASE +((i-1 )*4 ));/* PCI posting. */ }global_cache_flush ();return 0 ;
@@ -775,8 +778,8 @@ static int intel_i830_configure(void)if (agp_bridge->driver->needs_scratch_page) {for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) {writel (agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE +(i*4 )); -readl (intel_private.registers+I810_PTE_BASE +(i*4 ));/* PCI Posting. */ } +readl (intel_private.registers+I810_PTE_BASE +((i-1 )*4 ));/* PCI Posting. */ }global_cache_flush ();
@@ -991,8 +994,8 @@ static int intel_i915_configure(void)if (agp_bridge->driver->needs_scratch_page) {for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) {writel (agp_bridge->scratch_page, intel_private.gtt+i); -readl (intel_private.gtt+i);/* PCI Posting. */ } +readl (intel_private.gtt+i-1 );/* PCI Posting. */ }global_cache_flush ();
@@ -1196,6 +1199,7 @@ static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size)case PCI_DEVICE_ID_INTEL_IGD_E_HB :case PCI_DEVICE_ID_INTEL_Q45_HB :case PCI_DEVICE_ID_INTEL_G45_HB : +case PCI_DEVICE_ID_INTEL_G41_HB : *gtt_offset = *gtt_size =MB (2 );break ;default :
@@ -2128,13 +2132,15 @@ static const struct intel_driver_description { {PCI_DEVICE_ID_INTEL_Q33_HB ,PCI_DEVICE_ID_INTEL_Q33_IG ,0 ,"Q33" , NULL, &intel_g33_driver }, { PCI_DEVICE_ID_INTEL_GM45_HB, PCI_DEVICE_ID_INTEL_GM45_IG, 0, - "Mobile Intel? GM45 Express", NULL, &intel_i965_driver }, + "Mobile Intel® GM45 Express", NULL, &intel_i965_driver }, { PCI_DEVICE_ID_INTEL_IGD_E_HB, PCI_DEVICE_ID_INTEL_IGD_E_IG, 0, "Intel Integrated Graphics Device", NULL, &intel_i965_driver }, { PCI_DEVICE_ID_INTEL_Q45_HB, PCI_DEVICE_ID_INTEL_Q45_IG, 0, "Q45/Q43", NULL, &intel_i965_driver }, { PCI_DEVICE_ID_INTEL_G45_HB, PCI_DEVICE_ID_INTEL_G45_IG, 0, "G45/G43", NULL, &intel_i965_driver }, + { PCI_DEVICE_ID_INTEL_G41_HB, PCI_DEVICE_ID_INTEL_G41_IG, 0, + "G41", NULL, &intel_i965_driver }, { 0, 0, 0, NULL, NULL, NULL } };
@@ -2332,6 +2338,7 @@ static struct pci_device_id agp_intel_pci_table[] = {ID (PCI_DEVICE_ID_INTEL_IGD_E_HB ),ID (PCI_DEVICE_ID_INTEL_Q45_HB ),ID (PCI_DEVICE_ID_INTEL_G45_HB ), + ID(PCI_DEVICE_ID_INTEL_G41_HB), { } };
drivers/char/vt.c +2 -3
@@ -301,7 +301,7 @@ static void scrup(struct vc_data *vc, unsigned int t, unsigned int b, int nr) d = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t); s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * (t + nr));scr_memmovew (d, s, (b - t - nr) * vc->vc_size_row); -scr_memsetw (d + (b - t - nr) * vc->vc_cols, vc->vc_scrl_erase_char, +scr_memsetw (d + (b - t - nr) * vc->vc_cols, vc->vc_video_erase_char, vc->vc_size_row * nr); }
@@ -319,7 +319,7 @@ static void scrdown(struct vc_data *vc, unsigned int t, unsigned int b, int nr) s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t); step = vc->vc_cols * nr;scr_memmovew (s + step, s, (b - t - nr) * vc->vc_size_row); -scr_memsetw (s, vc->vc_scrl_erase_char,2 * step); +scr_memsetw (s, vc->vc_video_erase_char,2 * step); }static void do_update_region (struct vc_data *vc,unsigned long start,int count)
@@ -434,7 +434,6 @@ static void update_attr(struct vc_data *vc) vc->vc_blink, vc->vc_underline, vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic); vc->vc_video_erase_char = (build_attr (vc, vc->vc_color,1 , vc->vc_blink,0 , vc->vc_decscnm,0 ) <<8 ) |' ' ; - vc->vc_scrl_erase_char = (build_attr (vc, vc->vc_def_color,1 , false, false, vc->vc_decscnm, false) <<8 ) |' ' ; }/* Note: inverting the screen twice should revert to the original state */
drivers/firewire/fw-ohci.c +1 -1
@@ -226,7 +226,7 @@ static inline struct fw_ohci *fw_ohci(struct fw_card *card)#define CONTEXT_DEAD 0x0800#define CONTEXT_ACTIVE 0x0400 -#define OHCI1394_MAX_AT_REQ_RETRIES 0x2 +#define OHCI1394_MAX_AT_REQ_RETRIES 0xf#define OHCI1394_MAX_AT_RESP_RETRIES 0x2#define OHCI1394_MAX_PHYS_RESP_RETRIES 0x8
drivers/firewire/fw-sbp2.c +26 -17
70 lines not on this page · raw message
drivers/ieee1394/ohci1394.h +1 -1
@@ -26,7 +26,7 @@#define OHCI1394_DRIVER_NAME "ohci1394" -#define OHCI1394_MAX_AT_REQ_RETRIES 0x2 +#define OHCI1394_MAX_AT_REQ_RETRIES 0xf#define OHCI1394_MAX_AT_RESP_RETRIES 0x2#define OHCI1394_MAX_PHYS_RESP_RETRIES 0x8#define OHCI1394_MAX_SELF_ID_ERRORS 16
drivers/ieee1394/sbp2.c +10 -0
@@ -395,6 +395,16 @@ static const struct { .model_id = SBP2_ROM_VALUE_WILDCARD, .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, }, +/* +* iPod 2nd generation: needs 128k max transfer size workaround +* iPod 3rd generation: needs fix capacity workaround +*/ + { + .firmware_revision = 0x0a2700, + .model_id = 0x000000, + .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS | + SBP2_WORKAROUND_FIX_CAPACITY, + },/* iPod 4th generation */ { .firmware_revision = 0x0a2700, .model_id = 0x000021,
drivers/md/dm-mpath.c +2 -2
@@ -427,13 +427,13 @@ static void process_queued_ios(struct work_struct *work)__choose_pgpath (m); pgpath = m->current_pgpath; - m->pgpath_to_activate = m->current_pgpath;if ((pgpath && !m->queue_io) || (!pgpath && !m->queue_if_no_path)) must_queue =0 ; -if (m->pg_init_required && !m->pg_init_in_progress) { +if (m->pg_init_required && !m->pg_init_in_progress && pgpath) { + m->pgpath_to_activate = pgpath; m->pg_init_count++; m->pg_init_required =0 ; m->pg_init_in_progress =1 ;
drivers/md/md.c +23 -13
@@ -1454,6 +1454,11 @@ static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev)if (find_rdev_nr (mddev, rdev->desc_nr))return -EBUSY ; } +if (mddev->max_disks && rdev->desc_nr >= mddev->max_disks) { +printk (KERN_WARNING "md: %s: array is limited to %d devices\n" , +mdname (mddev), mddev->max_disks); +return -EBUSY ; + }bdevname (rdev->bdev,b);while ( (s=strchr (b,'/' )) !=NULL ) *s ='!' ;
@@ -2362,6 +2367,15 @@ static void analyze_sbs(mddev_t * mddev) i =0 ;rdev_for_each (rdev, tmp, mddev) { +if (rdev->desc_nr >= mddev->max_disks || + i > mddev->max_disks) { +printk (KERN_WARNING +"md: %s: %s: only %d devices permitted\n" , +mdname (mddev),bdevname (rdev->bdev, b), + mddev->max_disks); +kick_rdev_from_array (rdev); +continue ; + }if (rdev != freshest)if (super_types[mddev->major_version].validate_super (mddev, rdev)) {
@@ -2728,9 +2742,9 @@ array_state_store(mddev_t *mddev, const char *buf, size_t len)break ;case read_auto:if (mddev->pers) { -if (mddev->ro !=1 ) +if (mddev->ro ==0 ) err =do_md_stop (mddev,1 ,0 ); -else +else if (mddev->ro ==1 ) err =restart_array (mddev);if (err ==0 ) { mddev->ro =2 ;
@@ -2946,7 +2960,13 @@ metadata_store(mddev_t *mddev, const char *buf, size_t len) {int major, minor;char *e; -if (!list_empty (&mddev->disks)) +/* Changing the details of 'external' metadata is +* always permitted. Otherwise there must be +* no devices attached to the array. +*/ +if (mddev->external &&strncmp (buf,"external:" ,9 ) ==0 ) + ; +else if (!list_empty (&mddev->disks))return -EBUSY ;if (cmd_match (buf,"none" )) {
@@ -4450,13 +4470,6 @@ static int hot_add_disk(mddev_t * mddev, dev_t dev)* noticed in interrupt contexts ... */ -if (rdev->desc_nr == mddev->max_disks) { -printk (KERN_WARNING "%s: can not hot-add to full array!\n" , -mdname (mddev)); - err = -EBUSY ; - goto abort_unbind_export; - } - rdev->raid_disk =-1 ;md_update_sb (mddev,1 );
@@ -4470,9 +4483,6 @@ static int hot_add_disk(mddev_t * mddev, dev_t dev)md_new_event (mddev);return 0 ; -abort_unbind_export: -unbind_rdev_from_array (rdev); - abort_export:export_rdev (rdev);return err;
drivers/misc/eeepc-laptop.c +2 -1
@@ -381,7 +381,8 @@ static void notify_wlan(u32 *event)static void notify_brn (void ) {struct backlight_device *bd = eeepc_backlight_device; - bd->props.brightness =read_brightness (bd); +if (bd) + bd->props.brightness =read_brightness (bd); }static void eeepc_hotk_notify (acpi_handle handle,u32 event,void *data)
drivers/misc/sgi-xp/xpc.h +3 -2
@@ -3,7 +3,7 @@* License. See the file "COPYING" in the main directory of this archive * for more details. * -* Copyright (c) 2004-2008 Silicon Graphics, Inc. All Rights Reserved. +* Copyright (c) 2004-2009 Silicon Graphics, Inc. All Rights Reserved. */ /*
@@ -502,7 +502,8 @@ struct xpc_channel_uv {/* partition's notify mq */ struct xpc_send_msg_slot_uv *send_msg_slots; -struct xpc_notify_mq_msg_uv *recv_msg_slots; +void *recv_msg_slots;/* each slot will hold a xpc_notify_mq_msg_uv */ +/* structure plus the user's payload */ struct xpc_fifo_head_uv msg_slot_free_list;struct xpc_fifo_head_uv recv_msg_list;/* deliverable payloads */
drivers/misc/sgi-xp/xpc_uv.c +5 -6
@@ -3,7 +3,7 @@* License. See the file "COPYING" in the main directory of this archive * for more details. * -* Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved. +* Copyright (c) 2008-2009 Silicon Graphics, Inc. All Rights Reserved. */ /*
@@ -825,8 +825,8 @@ xpc_allocate_recv_msg_slot_uv(struct xpc_channel *ch)continue ;for (entry =0 ; entry < nentries; entry++) { - msg_slot = ch_uv->recv_msg_slots + entry * - ch->entry_size; + msg_slot = ch_uv->recv_msg_slots + + entry * ch->entry_size; msg_slot->hdr.msg_slot_number = entry; }
@@ -1123,9 +1123,8 @@ xpc_handle_notify_mq_msg_uv(struct xpc_partition *part,/* we're dealing with a normal message sent via the notify_mq */ ch_uv = &ch->sn.uv; - msg_slot = (struct xpc_notify_mq_msg_uv *)((u64 )ch_uv->recv_msg_slots + - (msg->hdr.msg_slot_number % ch->remote_nentries) * - ch->entry_size); + msg_slot = ch_uv->recv_msg_slots + + (msg->hdr.msg_slot_number % ch->remote_nentries) * ch->entry_size;BUG_ON (msg->hdr.msg_slot_number != msg_slot->hdr.msg_slot_number);BUG_ON (msg_slot->hdr.size !=0 );
drivers/net/e1000/e1000_main.c +3 -3
@@ -31,7 +31,7 @@char e1000_driver_name[] ="e1000" ;static char e1000_driver_string[] ="Intel(R) PRO/1000 Network Driver" ; -#define DRV_VERSION "7.3.20-k3-NAPI" +#define DRV_VERSION "7.3.21-k3-NAPI"const char e1000_driver_version[] =DRV_VERSION ;static const char e1000_copyright[] ="Copyright (c) 1999-2006 Intel Corporation." ;
@@ -927,7 +927,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, err =pci_enable_device (pdev); }else { bars =pci_select_bars (pdev,IORESOURCE_MEM ); - err =pci_enable_device (pdev); + err =pci_enable_device_mem (pdev); }if (err)return err;
@@ -3835,7 +3835,7 @@ static irqreturn_t e1000_intr(int irq, void *data)struct e1000_hw *hw = &adapter->hw;u32 rctl, icr =er32 (ICR ); -if (unlikely (!icr)) +if (unlikely ((!icr) ||test_bit (__E1000_RESETTING, &adapter->flags)))return IRQ_NONE ;/* Not our interrupt */ /* IMS will not auto-mask if INT_ASSERTED is not set, and if it is
drivers/net/usb/hso.c +1 -1
@@ -2047,7 +2047,7 @@ static void hso_create_rfkill(struct hso_device *hso_dev,char *rfkn; hso_net->rfkill =rfkill_allocate (&interface_to_usbdev (interface)->dev, -RFKILL_TYPE_WLAN ); +RFKILL_TYPE_WWAN );if (!hso_net->rfkill) {dev_err (dev,"%s - Out of memory" , __func__);return ;
drivers/net/wireless/ipw2200.c +22 -6
@@ -4346,7 +4346,8 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv,return ; } -if (priv->status &STATUS_SCANNING ) { +if (priv->status &STATUS_SCANNING && + missed_count >IPW_MB_SCAN_CANCEL_THRESHOLD ) {/* Stop scan to keep fw from getting * stuck (only if we aren't roaming -- * otherwise we'll never scan more than 2 or 3
@@ -6276,6 +6277,20 @@ static void ipw_add_scan_channels(struct ipw_priv *priv, } } +static int ipw_passive_dwell_time (struct ipw_priv *priv) +{ +/* staying on passive channels longer than the DTIM interval during a +* scan, while associated, causes the firmware to cancel the scan +* without notification. Hence, don't stay on passive channels longer +* than the beacon interval. +*/ +if (priv->status &STATUS_ASSOCIATED + && priv->assoc_network->beacon_interval >10 ) +return priv->assoc_network->beacon_interval -10 ; +else +return 120 ; +} +static int ipw_request_scan_helper (struct ipw_priv *priv,int type,int direct) {struct ipw_scan_request_ext scan;
@@ -6319,16 +6334,16 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct) scan.full_scan_index =cpu_to_le32 (ieee80211_get_scans (priv->ieee));if (type ==IW_SCAN_TYPE_PASSIVE ) { -IPW_DEBUG_WX ("use passive scanning\n" ); - scan_type =IPW_SCAN_PASSIVE_FULL_DWELL_SCAN ; +IPW_DEBUG_WX ("use passive scanning\n" ); + scan_type =IPW_SCAN_PASSIVE_FULL_DWELL_SCAN ; scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN ] = -cpu_to_le16 (120 ); +cpu_to_le16 (ipw_passive_dwell_time (priv));ipw_add_scan_channels (priv, &scan, scan_type); goto send_request; }/* Use active scan by default. */ -if (priv->config &CFG_SPEED_SCAN ) +if (priv->config &CFG_SPEED_SCAN ) scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN ] =cpu_to_le16 (30 );else
@@ -6338,7 +6353,8 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct) scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN ] =cpu_to_le16 (20 ); - scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN ] =cpu_to_le16 (120 ); + scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN ] = +cpu_to_le16 (ipw_passive_dwell_time (priv)); scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN ] =cpu_to_le16 (20 );#ifdef CONFIG_IPW2200_MONITOR
drivers/net/wireless/ipw2200.h +1 -0
@@ -244,6 +244,7 @@ enum connection_manager_assoc_states {#define HOST_NOTIFICATION_S36_MEASUREMENT_REFUSED 31#define HOST_NOTIFICATION_STATUS_BEACON_MISSING 1 +#define IPW_MB_SCAN_CANCEL_THRESHOLD 3#define IPW_MB_ROAMING_THRESHOLD_MIN 1#define IPW_MB_ROAMING_THRESHOLD_DEFAULT 8#define IPW_MB_ROAMING_THRESHOLD_MAX 30
drivers/pci/pci-sysfs.c +2 -2
@@ -694,8 +694,8 @@ pci_read_rom(struct kobject *kobj, struct bin_attribute *bin_attr,return -EINVAL ; rom =pci_map_rom (pdev, &size);/* size starts out as PCI window size */ -if (!rom) -return 0 ; +if (!rom || !size) +return -EIO ;if (off >= size) count =0 ;
drivers/pci/pcie/aspm.c +2 -2
@@ -713,9 +713,9 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev)/* * All PCIe functions are in one slot, remove one function will remove -* the the whole slot, so just wait +* the whole slot, so just wait until we are the last function left. */ -if (!list_empty (&parent->subordinate->devices)) +if (!list_is_last (&pdev->bus_list, &parent->subordinate->devices)) goto out;/* All functions are removed, so just disable ASPM for the link */
drivers/pci/rom.c +5 -3
@@ -63,7 +63,7 @@ static void pci_disable_rom(struct pci_dev *pdev)* The PCI window size could be much larger than the * actual image size. */ -size_t pci_get_rom_size (void __iomem *rom,size_t size) +size_t pci_get_rom_size (struct pci_dev *pdev,void __iomem *rom,size_t size) {void __iomem *image;int last_image;
@@ -72,8 +72,10 @@ size_t pci_get_rom_size(void __iomem *rom, size_t size) do { void __iomem *pds; /* Standard PCI ROMs start out with these bytes 55 AA */ - if (readb(image) != 0x55) + if (readb(image) != 0x55) { + dev_err(&pdev->dev, "Invalid ROM contents\n"); break; + } if (readb(image + 1) != 0xAA) break; /* get the PCI data structure and check its signature */
@@ -158,7 +160,7 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size)* size is much larger than the actual size of the ROM. * True size is important if the ROM is going to be copied. */ - *size =pci_get_rom_size (rom, *size); + *size =pci_get_rom_size (pdev, rom, *size);return rom; }
drivers/serial/8250_pci.c +17 -0
@@ -599,6 +599,10 @@ static int pci_netmos_init(struct pci_dev *dev)/* subdevice 0x00PS means <P> parallel, <S> serial */ unsigned int num_serial = dev->subsystem_device &0xf ; +if (dev->subsystem_vendor ==PCI_VENDOR_ID_IBM && + dev->subsystem_device ==0x0299 ) +return 0 ; +if (num_serial ==0 )return -ENODEV ;return num_serial;
@@ -766,6 +770,8 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board,#define PCI_SUBDEVICE_ID_OCTPRO422 0x0208#define PCI_SUBDEVICE_ID_POCTAL232 0x0308#define PCI_SUBDEVICE_ID_POCTAL422 0x0408 +#define PCI_VENDOR_ID_ADVANTECH 0x13fe +#define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620/* Unknown vendors/cards - this should not be in linux/pci_ids.h */ #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
@@ -2051,6 +2057,10 @@ static int pciserial_resume_one(struct pci_dev *dev)#endif static struct pci_device_id serial_pci_tbl[] = { +/* Advantech use PCI_DEVICE_ID_ADVANTECH_PCI3620 (0x3620) as 'PCI_SUBVENDOR_ID' */ + {PCI_VENDOR_ID_ADVANTECH ,PCI_DEVICE_ID_ADVANTECH_PCI3620 , +PCI_DEVICE_ID_ADVANTECH_PCI3620 ,0x0001 ,0 ,0 , + pbn_b2_8_921600 }, {PCI_VENDOR_ID_V3 ,PCI_DEVICE_ID_V3_V960 ,PCI_SUBVENDOR_ID_CONNECT_TECH ,PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 ,0 ,0 ,
@@ -2294,6 +2304,9 @@ static struct pci_device_id serial_pci_tbl[] = {* For now just used the hex ID 0x950a. */ {PCI_VENDOR_ID_OXSEMI ,0x950a , +PCI_SUBVENDOR_ID_SIIG ,PCI_SUBDEVICE_ID_SIIG_DUAL_SERIAL ,0 ,0 , + pbn_b0_2_115200 }, + { PCI_VENDOR_ID_OXSEMI, 0x950a,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , pbn_b0_2_1130000 }, { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
@@ -2846,6 +2859,10 @@ static struct pci_device_id serial_pci_tbl[] = {0 , pbn_b0_8_115200 }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, +PCI_VENDOR_ID_IBM ,0x0299 , + 0, 0, pbn_b0_bt_2_115200 }, +/* * These entries match devices with class COMMUNICATION_SERIAL, * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
drivers/usb/serial/option.c +56 -37
128 lines not on this page · raw message
drivers/usb/serial/ti_usb_3410_5052.c +10 -3
@@ -227,25 +227,32 @@ static unsigned int product_5052_count;/* the array dimension is the number of default entries plus */ /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */ /* null entry */ -static struct usb_device_id ti_id_table_3410[1 +TI_EXTRA_VID_PID_COUNT +1 ] = { +static struct usb_device_id ti_id_table_3410[10 +TI_EXTRA_VID_PID_COUNT +1 ] = { {USB_DEVICE (TI_VENDOR_ID ,TI_3410_PRODUCT_ID ) }, {USB_DEVICE (TI_VENDOR_ID ,TI_3410_EZ430_ID ) }, + {USB_DEVICE (IBM_VENDOR_ID ,IBM_4543_PRODUCT_ID ) }, + {USB_DEVICE (IBM_VENDOR_ID ,IBM_454B_PRODUCT_ID ) }, + {USB_DEVICE (IBM_VENDOR_ID ,IBM_454C_PRODUCT_ID ) }, }; -static struct usb_device_id ti_id_table_5052[4 +TI_EXTRA_VID_PID_COUNT +1 ] = { +static struct usb_device_id ti_id_table_5052[5 +TI_EXTRA_VID_PID_COUNT +1 ] = { {USB_DEVICE (TI_VENDOR_ID ,TI_5052_BOOT_PRODUCT_ID ) }, {USB_DEVICE (TI_VENDOR_ID ,TI_5152_BOOT_PRODUCT_ID ) }, {USB_DEVICE (TI_VENDOR_ID ,TI_5052_EEPROM_PRODUCT_ID ) }, {USB_DEVICE (TI_VENDOR_ID ,TI_5052_FIRMWARE_PRODUCT_ID ) }, + {USB_DEVICE (IBM_VENDOR_ID ,IBM_4543_PRODUCT_ID ) }, }; -static struct usb_device_id ti_id_table_combined[] = { +static struct usb_device_id ti_id_table_combined[14 +2 *TI_EXTRA_VID_PID_COUNT +1 ] = { {USB_DEVICE (TI_VENDOR_ID ,TI_3410_PRODUCT_ID ) }, {USB_DEVICE (TI_VENDOR_ID ,TI_3410_EZ430_ID ) }, {USB_DEVICE (TI_VENDOR_ID ,TI_5052_BOOT_PRODUCT_ID ) }, {USB_DEVICE (TI_VENDOR_ID ,TI_5152_BOOT_PRODUCT_ID ) }, {USB_DEVICE (TI_VENDOR_ID ,TI_5052_EEPROM_PRODUCT_ID ) }, {USB_DEVICE (TI_VENDOR_ID ,TI_5052_FIRMWARE_PRODUCT_ID ) }, + {USB_DEVICE (IBM_VENDOR_ID ,IBM_4543_PRODUCT_ID ) }, + {USB_DEVICE (IBM_VENDOR_ID ,IBM_454B_PRODUCT_ID ) }, + {USB_DEVICE (IBM_VENDOR_ID ,IBM_454C_PRODUCT_ID ) }, { } };
drivers/usb/serial/ti_usb_3410_5052.h +4 -0
@@ -27,7 +27,11 @@/* Vendor and product ids */ #define TI_VENDOR_ID 0x0451 +#define IBM_VENDOR_ID 0x04b3#define TI_3410_PRODUCT_ID 0x3410 +#define IBM_4543_PRODUCT_ID 0x4543 +#define IBM_454B_PRODUCT_ID 0x454b +#define IBM_454C_PRODUCT_ID 0x454c#define TI_3410_EZ430_ID 0xF430/* TI ez430 development tool */ #define TI_5052_BOOT_PRODUCT_ID 0x5052/* no EEPROM, no firmware */ #define TI_5152_BOOT_PRODUCT_ID 0x5152/* no EEPROM, no firmware */
drivers/usb/storage/scsiglue.c +2 -0
@@ -64,6 +64,7 @@*/ #define VENDOR_ID_NOKIA 0x0421#define VENDOR_ID_NIKON 0x04b0 +#define VENDOR_ID_PENTAX 0x0a17#define VENDOR_ID_MOTOROLA 0x22b8/***********************************************************************
@@ -150,6 +151,7 @@ static int slave_configure(struct scsi_device *sdev)switch (le16_to_cpu (us->pusb_dev->descriptor.idVendor)) {case VENDOR_ID_NOKIA :case VENDOR_ID_NIKON : +case VENDOR_ID_PENTAX :case VENDOR_ID_MOTOROLA :if (!(us->fflags & (US_FL_FIX_CAPACITY |US_FL_CAPACITY_OK )))
drivers/usb/storage/unusual_devs.h +0 -15
@@ -1381,21 +1381,6 @@ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), - -/* Submitted by Per Winkvist <[email protected]> */ -UNUSUAL_DEV (0x0a17 ,0x006 ,0x0000 ,0xffff , -"Pentax" , -"Optio S/S4" , -US_SC_DEVICE ,US_PR_DEVICE ,NULL , -US_FL_FIX_INQUIRY ), - -/* Reported by Jaak Ristioja <[email protected]> */ -UNUSUAL_DEV (0x0a17 ,0x006e ,0x0100 ,0x0100 , -"Pentax" , -"K10D" , -US_SC_DEVICE ,US_PR_DEVICE ,NULL , -US_FL_FIX_CAPACITY ), -/* These are virtual windows driver CDs, which the zd1211rw driver * automatically converts into WLAN devices. */ UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101,
drivers/video/console/fbcon.c +10 -29
@@ -1855,8 +1855,6 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];struct display *p = &fb_display[vc->vc_num];int scroll_partial = info->flags &FBINFO_PARTIAL_PAN_OK ; -unsigned short saved_ec; -int ret;if (fbcon_is_inactive (vc, info))return -EINVAL ;
@@ -1869,11 +1867,6 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,* whole screen (prevents flicker). */ - saved_ec = vc->vc_video_erase_char; - vc->vc_video_erase_char = vc->vc_scrl_erase_char; - - ret =0 ; -switch (dir) {case SM_UP :if (count > vc->vc_rows)/* Maximum realistic size */
@@ -1890,9 +1883,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,scr_memsetw ((unsigned short *) (vc->vc_origin + vc->vc_size_row * (b - count)), - vc->vc_scrl_erase_char, + vc->vc_video_erase_char, vc->vc_size_row * count); - ret =1 ; +return 1 ;break ;case SCROLL_WRAP_MOVE :
@@ -1962,10 +1955,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,scr_memsetw ((unsigned short *) (vc->vc_origin + vc->vc_size_row * (b - count)), - vc->vc_scrl_erase_char, + vc->vc_video_erase_char, vc->vc_size_row * count); - ret =1 ; -break ; +return 1 ; }break ;
@@ -1982,9 +1974,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,scr_memsetw ((unsigned short *) (vc->vc_origin + vc->vc_size_row * t), - vc->vc_scrl_erase_char, + vc->vc_video_erase_char, vc->vc_size_row * count); - ret =1 ; +return 1 ;break ;case SCROLL_WRAP_MOVE :
@@ -2052,15 +2044,12 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,scr_memsetw ((unsigned short *) (vc->vc_origin + vc->vc_size_row * t), - vc->vc_scrl_erase_char, + vc->vc_video_erase_char, vc->vc_size_row * count); - ret =1 ; -break ; +return 1 ; } -break ; } - vc->vc_video_erase_char = saved_ec; -return ret; +return 0 ; }
@@ -2522,9 +2511,6 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, c = vc->vc_video_erase_char; vc->vc_video_erase_char = ((c &0xfe00 ) >>1 ) | (c &0xff ); - c = vc->vc_scrl_erase_char; - vc->vc_scrl_erase_char = - ((c &0xFE00 ) >>1 ) | (c &0xFF ); vc->vc_attr >>=1 ; } }else if (!vc->vc_hi_font_mask && cnt ==512 ) {
@@ -2555,14 +2541,9 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,if (vc->vc_can_do_color) { vc->vc_video_erase_char = ((c &0xff00 ) <<1 ) | (c &0xff ); - c = vc->vc_scrl_erase_char; - vc->vc_scrl_erase_char = - ((c &0xFF00 ) <<1 ) | (c &0xFF ); vc->vc_attr <<=1 ; - }else { + }else vc->vc_video_erase_char = c & ~0x100 ; - vc->vc_scrl_erase_char = c & ~0x100 ; - } } }
drivers/video/console/mdacon.c +1 -1
@@ -533,7 +533,7 @@ static void mdacon_cursor(struct vc_data *c, int mode)static int mdacon_scroll (struct vc_data *c,int t,int b,int dir,int lines) { -u16 eattr =mda_convert_attr (c->vc_scrl_erase_char); +u16 eattr =mda_convert_attr (c->vc_video_erase_char);if (!lines)return 0 ;
drivers/video/console/sticon.c +2 -2
@@ -170,12 +170,12 @@ static int sticon_scroll(struct vc_data *conp, int t, int b, int dir, int count)switch (dir) {case SM_UP :sti_bmove (sti, t + count,0 , t,0 , b - t - count, conp->vc_cols); -sti_clear (sti, b - count,0 , count, conp->vc_cols, conp->vc_scrl_erase_char); +sti_clear (sti, b - count,0 , count, conp->vc_cols, conp->vc_video_erase_char);break ;case SM_DOWN :sti_bmove (sti, t,0 , t + count,0 , b - t - count, conp->vc_cols); -sti_clear (sti, t,0 , count, conp->vc_cols, conp->vc_scrl_erase_char); +sti_clear (sti, t,0 , count, conp->vc_cols, conp->vc_video_erase_char);break ; }
drivers/video/console/vgacon.c +2 -2
@@ -1350,7 +1350,7 @@ static int vgacon_scroll(struct vc_data *c, int t, int b, int dir, }else c->vc_origin += delta;scr_memsetw ((u16 *) (c->vc_origin + c->vc_screenbuf_size - - delta), c->vc_scrl_erase_char, + delta), c->vc_video_erase_char, delta); }else {if (oldo - delta < vga_vram_base) {
@@ -1363,7 +1363,7 @@ static int vgacon_scroll(struct vc_data *c, int t, int b, int dir, }else c->vc_origin -= delta; c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size; -scr_memsetw ((u16 *) (c->vc_origin), c->vc_scrl_erase_char, +scr_memsetw ((u16 *) (c->vc_origin), c->vc_video_erase_char, delta); } c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size;
fs/binfmt_elf.c +12 -2
@@ -1188,9 +1188,11 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,* check for an ELF header. If we find one, dump the first page to * aid in determining what was mapped here. */ -if (FILTER (ELF_HEADERS ) && vma->vm_file !=NULL && vma->vm_pgoff ==0 ) { +if (FILTER (ELF_HEADERS ) && + vma->vm_pgoff ==0 && (vma->vm_flags &VM_READ )) {u32 __user *header = (u32 __user *) vma->vm_start;u32 word; +mm_segment_t fs =get_fs ();/* * Doing it this way gets the constant folded by GCC. */
@@ -1203,7 +1205,15 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma, magic.elfmag[EI_MAG1 ] =ELFMAG1 ; magic.elfmag[EI_MAG2 ] =ELFMAG2 ; magic.elfmag[EI_MAG3 ] =ELFMAG3 ; -if (get_user (word, header) ==0 && word == magic.cmp) +/* +* Switch to the user "segment" for get_user(), +* then put back what elf_core_dump() had in place. +*/ +set_fs (USER_DS ); +if (unlikely (get_user (word, header))) + word =0 ; +set_fs (fs); +if (word == magic.cmp)return PAGE_SIZE ; }
fs/seq_file.c +58 -57
127 lines not on this page · raw message
fs/xfs/linux-2.6/xfs_buf.c +1 -2
@@ -1114,8 +1114,7 @@ xfs_buf_bio_end_io(unsigned int blocksize = bp->b_target->bt_bsize;struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt -1 ; -if (!test_bit (BIO_UPTODATE , &bio->bi_flags)) - bp->b_error =EIO ; +xfs_buf_ioerror (bp, -error); do { struct page *page = bvec->bv_page;
include/acpi/pdc_intel.h +2 -0
@@ -14,6 +14,7 @@#define ACPI_PDC_SMP_T_SWCOORD (0x0080)#define ACPI_PDC_C_C1_FFH (0x0100)#define ACPI_PDC_C_C2C3_FFH (0x0200) +#define ACPI_PDC_SMP_P_HWCOORD (0x0800)#define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \ ACPI_PDC_C_C1_HALT | \
@@ -22,6 +23,7 @@#define ACPI_PDC_EST_CAPABILITY_SWSMP (ACPI_PDC_SMP_C1PT | \ ACPI_PDC_C_C1_HALT | \ ACPI_PDC_SMP_P_SWCOORD | \ + ACPI_PDC_SMP_P_HWCOORD | \ ACPI_PDC_P_FFH)#define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \
include/linux/console_struct.h +0 -1
@@ -53,7 +53,6 @@ struct vc_data {unsigned short vc_hi_font_mask;/* [#] Attribute set for upper 256 chars of font or 0 if not supported */ struct console_font vc_font;/* Current VC font set */ unsigned short vc_video_erase_char;/* Background erase character */ -unsigned short vc_scrl_erase_char;/* Erase character for scroll */ /* VT terminal data */ unsigned int vc_state;/* Escape sequence parser state */ unsigned int vc_npar,vc_par[NPAR ];/* Parameters of current escape sequence */
include/linux/module.h +0 -1
@@ -387,7 +387,6 @@ void symbol_put_addr(void *addr);static inline void __module_get (struct module *module) {if (module) { -BUG_ON (module_refcount (module) ==0 );local_inc (&module->ref[get_cpu ()].count);put_cpu (); }
include/linux/pci.h +1 -1
@@ -639,7 +639,7 @@ int pci_select_bars(struct pci_dev *dev, unsigned long flags);/* ROM control related routines */ void __iomem __must_check *pci_map_rom (struct pci_dev *pdev,size_t *size);void pci_unmap_rom (struct pci_dev *pdev,void __iomem *rom); -size_t pci_get_rom_size (void __iomem *rom,size_t size); +size_t pci_get_rom_size (struct pci_dev *pdev,void __iomem *rom,size_t size);/* Power management related routines */ int pci_save_state (struct pci_dev *dev);
include/linux/pci_ids.h +1 -0
@@ -1755,6 +1755,7 @@#define PCI_DEVICE_ID_SIIG_8S_20x_650 0x2081#define PCI_DEVICE_ID_SIIG_8S_20x_850 0x2082#define PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL 0x2050 +#define PCI_SUBDEVICE_ID_SIIG_DUAL_SERIAL 0x2530#define PCI_VENDOR_ID_RADISYS 0x1331
include/linux/wait.h +9 -2
@@ -141,6 +141,8 @@ static inline void __remove_wait_queue(wait_queue_head_t *head,list_del (&old->task_list); } +void __wake_up_common (wait_queue_head_t *q,unsigned int mode, +int nr_exclusive,int sync,void *key);void __wake_up (wait_queue_head_t *q,unsigned int mode,int nr,void *key);extern void __wake_up_locked (wait_queue_head_t *q,unsigned int mode);extern void __wake_up_sync (wait_queue_head_t *q,unsigned int mode,int nr);
@@ -342,16 +344,19 @@ do { \for (;;) { \prepare_to_wait_exclusive (&wq, &__wait, \TASK_INTERRUPTIBLE ); \ -if (condition) \ +if (condition) { \ +finish_wait (&wq, &__wait); \break ; \ + } \if (!signal_pending (current)) { \schedule (); \continue ; \ } \ ret = -ERESTARTSYS ; \ +abort_exclusive_wait (&wq, &__wait, \ +TASK_INTERRUPTIBLE ,NULL ); \break ; \ } \ -finish_wait (&wq, &__wait); \ }while (0 ) #define wait_event_interruptible_exclusive(wq, condition) \
@@ -440,6 +445,8 @@ extern long interruptible_sleep_on_timeout(wait_queue_head_t *q,void prepare_to_wait (wait_queue_head_t *q,wait_queue_t *wait,int state);void prepare_to_wait_exclusive (wait_queue_head_t *q,wait_queue_t *wait,int state);void finish_wait (wait_queue_head_t *q,wait_queue_t *wait); +void abort_exclusive_wait (wait_queue_head_t *q,wait_queue_t *wait, +unsigned int mode,void *key);int autoremove_wake_function (wait_queue_t *wait,unsigned mode,int sync,void *key);int wake_bit_function (wait_queue_t *wait,unsigned mode,int sync,void *key);
ipc/shm.c +4 -0
@@ -565,11 +565,15 @@ static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss,struct hstate *h =hstate_file (shp->shm_file); *rss +=pages_per_huge_page (h) * mapping->nrpages; }else { +#ifdef CONFIG_SHMEM struct shmem_inode_info *info =SHMEM_I (inode);spin_lock (&info->lock); *rss += inode->i_mapping->nrpages; *swp += info->swapped;spin_unlock (&info->lock); +#else + *rss += inode->i_mapping->nrpages; +#endif } total++;
kernel/irq/chip.c +1 -0
@@ -78,6 +78,7 @@ void dynamic_irq_cleanup(unsigned int irq) desc->chip_data =NULL ; desc->handle_irq = handle_bad_irq; desc->chip = &no_irq_chip; + desc->name =NULL ;spin_unlock_irqrestore (&desc->lock, flags); }
kernel/sched.c +2 -2
@@ -4556,8 +4556,8 @@ EXPORT_SYMBOL(default_wake_function);* started to run but is not in state TASK_RUNNING. try_to_wake_up() returns * zero in this (rare) case, and we handle it by continuing to scan the queue. */ -static void __wake_up_common (wait_queue_head_t *q,unsigned int mode, -int nr_exclusive,int sync,void *key) +void __wake_up_common (wait_queue_head_t *q,unsigned int mode, +int nr_exclusive,int sync,void *key) {wait_queue_t *curr, *next;
kernel/wait.c +52 -7
81 lines not on this page · raw message
mm/swap.c +0 -13
@@ -244,7 +244,6 @@ void lru_add_drain(void)put_cpu (); } -#ifdef CONFIG_NUMA static void lru_add_drain_per_cpu (struct work_struct *dummy) {lru_add_drain ();
@@ -258,18 +257,6 @@ int lru_add_drain_all(void)return schedule_on_each_cpu (lru_add_drain_per_cpu); } -#else - -/* -* Returns 0 for success -*/ -int lru_add_drain_all (void ) -{ -lru_add_drain (); -return 0 ; -} -#endif -/* * Batched page_cache_release(). Decrement the reference count on all the * passed pages. If it fell to zero then remove the page from the LRU and
net/sctp/input.c +13 -0
@@ -249,6 +249,19 @@ int sctp_rcv(struct sk_buff *skb)*/ sctp_bh_lock_sock (sk); +if (sk != rcvr->sk) { +/* Our cached sk is different from the rcvr->sk. This is +* because migrate()/accept() may have moved the association +* to a new socket and released all the sockets. So now we +* are holding a lock on the old socket while the user may +* be doing something with the new socket. Switch our veiw +* of the current sk. +*/ +sctp_bh_unlock_sock (sk); + sk = rcvr->sk; +sctp_bh_lock_sock (sk); + } +if (sock_owned_by_user (sk)) {SCTP_INC_STATS_BH (SCTP_MIB_IN_PKT_BACKLOG );sctp_add_backlog (sk, skb);
net/sunrpc/svcsock.c +7 -2
@@ -1171,7 +1171,11 @@ int svc_addsock(struct svc_serv *serv,else if (so->state >SS_UNCONNECTED ) err = -EISCONN ;else { - svsk =svc_setup_socket (serv, so, &err,SVC_SOCK_DEFAULTS ); +if (!try_module_get (THIS_MODULE )) + err = -ENOENT ; +else + svsk =svc_setup_socket (serv, so, &err, +SVC_SOCK_DEFAULTS );if (svsk) {struct sockaddr_storage addr;struct sockaddr *sin = (struct sockaddr *)&addr;
@@ -1184,7 +1188,8 @@ int svc_addsock(struct svc_serv *serv,spin_unlock_bh (&serv->sv_lock);svc_xprt_received (&svsk->sk_xprt); err =0 ; - } + }else +module_put (THIS_MODULE ); }if (err) {sockfd_put (so);
sound/pci/hda/patch_realtek.c +4 -0
@@ -920,6 +920,7 @@ do_sku:case 0x10ec0267 :case 0x10ec0268 :case 0x10ec0269 : +case 0x10ec0272 :case 0x10ec0660 :case 0x10ec0662 :case 0x10ec0663 :
@@ -948,6 +949,7 @@ do_sku:case 0x10ec0882 :case 0x10ec0883 :case 0x10ec0885 : +case 0x10ec0887 :case 0x10ec0889 :snd_hda_codec_write (codec,0x20 ,0 ,AC_VERB_SET_COEF_INDEX ,7 );
@@ -8059,6 +8061,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {SND_PCI_QUIRK (0x1558 ,0 ,"Clevo laptop" ,ALC883_LAPTOP_EAPD ),SND_PCI_QUIRK (0x15d9 ,0x8780 ,"Supermicro PDSBA" , ALC883_3ST_6ch),SND_PCI_QUIRK (0x161f ,0x2054 ,"Medion laptop" ,ALC883_MEDION ), +SND_PCI_QUIRK (0x1734 ,0x1107 ,"FSC AMILO Xi2550" , +ALC883_FUJITSU_PI2515 ),SND_PCI_QUIRK (0x1734 ,0x1108 ,"Fujitsu AMILO Pi2515" ,ALC883_FUJITSU_PI2515 ),SND_PCI_QUIRK (0x17aa ,0x101e ,"Lenovo 101e" , ALC883_LENOVO_101E_2ch), SND_PCI_QUIRK(0x17aa, 0x2085, "Lenovo NB0763", ALC883_LENOVO_NB0763),
sound/usb/usbaudio.c +1 -0
@@ -2958,6 +2958,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip,return -EINVAL ; } alts = &iface->altsetting[fp->altset_idx]; + fp->maxpacksize =le16_to_cpu (get_endpoint (alts,0 )->wMaxPacketSize);usb_set_interface (chip->dev, fp->iface,0 );init_usb_pitch (chip->dev, fp->iface, alts, fp);init_usb_sample_rate (chip->dev, fp->iface, alts, fp, fp->rate_max);
Quoted 5 lines · Greg KH
We (the -stable team) are announcing the release of the 2.6.27.16 kernel.
It contains a wide range of bugfixes, and all users of the 2.6.27 kernel series are strongly encouraged to upgrade.
I get the following oops when starting hald on my Sony VAIO SZ360.
Starting Hardware abstraction layer: haldBUG: unable to handle kernel NULL pointer dereference at 00000000
IP: [<c0220048>] show_docked+0xe/0x37
*pde = 00000000
Oops: 0000 [#2] SMP Modules linked in: autofs4 acpi_cpufreq cpufreq_conservative cpufreq_userspace cpufreq_powersave cpufreq_ondemand cpufreq_stats freq_table btusb bluetooth usbhid pcmcia arc4 ecb crypto_blkcipher cryptomgr crypto_algapi snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device joydev i2c_i801 iwl3945 pcspkr rtc_cmos tifm_7xx1 mac80211 thermal yenta_socket snd sky2 ide_cd_mod rsrc_nonstatic i2c_core rtc_core ehci_hcd pcmcia_core tifm_core bitrev soundcore uhci_hcd
sony_laptop cdrom psmouse ohci1394 rng_core rtc_lib snd_page_alloc crc32 ieee1394 usbcore evdev cfg80211 backlight battery ac processor button intel_agp agpgart unix
Pid: 2404, comm: hald Tainted: G D (2.6.27.16 #1)
EIP: 0060:[<c0220048>] EFLAGS: 00010282 CPU: 0
EIP is at show_docked+0xe/0x37
EAX: 00000000 EBX: f6d93000 ECX: f6d93000 EDX: f6d99f38
ESI: c03af2fc EDI: c022003a EBP: f6cdb254 ESP: f6d99f38
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process hald (pid: 2404, ti=f6d98000 task=f72c78d0 task.ti=f6d98000)
Stack: fffffff4 fffffffb c0246cc1 c03b5600 f6cdb240 f781e7c8 c01b6507 40038000
00000003 00001000 40038000 c03b5600 f7854480 f7016940 40038000 c01b6480
00001000 c017836d f6d99fa0 f7bf2774 f7016940 fffffff7 00000000 f6d98000
Call Trace:
[<c0246cc1>] dev_attr_show+0x21/0x50
[<c01b6507>] sysfs_read_file+0x87/0x120
[<c01b6480>] sysfs_read_file+0x0/0x120
[<c017836d>] vfs_read+0x9d/0x140
[<c01784e1>] sys_read+0x41/0x80
[<c01032ca>] syscall_call+0x7/0xb
=======================
Code: fd ff 58 5a ba 02 00 00 00 8d 83 80 00 00 00 8d 4c 24 10 e8 bb f7 fc ff 83 c4 18 5b c3 53 89 cb 83 ec 04 8b 80 d8 00 00 00 89 e2 <8b> 00 8b 00 e8 77 d2 ff ff 85 c0 75 07 68 60 b1 37 c0 eb 05 68
EIP: [<c0220048>] show_docked+0xe/0x37 SS:ESP 0068:f6d99f38
---[ end trace abcf04f7c3ef131b ]---The following change is the part which causes it.
Quoted 9 lines
drivers/acpi/dock.c +0
-1@@ -691,8 +691,14 @@ fdd_out:static ssize_t show_docked (struct device *dev,struct device_attribute *attr,char *buf) { -return snprintf (buf,PAGE_SIZE ,"%d\n" ,dock_present (dock_station));
drivers/acpi/dock.c fdd_out: · line 703
Quoted 10 lines
drivers/acpi/dock.c +7
-0+struct acpi_device *tmp; + +struct dock_station *dock_station = *((struct dock_station **) + dev->platform_data); +if (ACPI_SUCCESS (acpi_bus_get_device (dock_station->handle, &tmp))) +return snprintf (buf,PAGE_SIZE ,"1\n" ); +return snprintf (buf,PAGE_SIZE ,"0\n" ); } static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL);
It seems that dev->platform_data is NULL on my system.
David
Signature · 2 lines
David Engel [email protected]
Quoted 9 lines · David Engel
Quoted 5 lines · Greg KH
We (the -stable team) are announcing the release of the 2.6.27.16 kernel.
It contains a wide range of bugfixes, and all users of the 2.6.27 kernel series are strongly encouraged to upgrade.
I get the following oops when starting hald on my Sony VAIO SZ360.
Quoted 8 lines
Starting Hardware abstraction layer: haldBUG: unable to handle kernel NULL pointer dereference at 00000000
IP: [<c0220048>]show_docked+0xe/0x37
*pde = 00000000Oops: 0000 [#2] SMP Modules linked in: autofs4 acpi_cpufreq cpufreq_conservative cpufreq_userspace cpufreq_powersave cpufreq_ondemand cpufreq_stats freq_table btusb bluetooth usbhid pcmcia arc4 ecb crypto_blkcipher cryptomgr crypto_algapi snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device joydev i2c_i801 iwl3945 pcspkr rtc_cmos tifm_7xx1 mac80211 thermal yenta_socket snd sky2 ide_cd_mod rsrc_nonstatic i2c_core rtc_core ehci_hcd pcmcia_core tifm_core bitrev soundcore uhci_hcd
sony_laptopcdrom psmouse ohci1394rng_corertc_libsnd_page_alloccrc32 ieee1394 usbcore evdev cfg80211 backlight battery ac processor buttonintel_agpagpgart unixPid: 2404, comm: hald Tainted: G D (2.6.27.16 #1)
"D"? TAINT_DIE? Odd...
Quoted 37 lines
EIP: 0060:[<c0220048>] EFLAGS: 00010282 CPU: 0
EIP is atshow_docked+0xe/0x37
EAX: 00000000 EBX:f6d93000ECX:f6d93000EDX:f6d99f38
ESI:c03af2fcEDI:c022003aEBP:f6cdb254ESP:f6d99f38
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process hald (pid: 2404, ti=f6d98000 task=f72c78d0 task.ti=f6d98000)Stack: fffffff4 fffffffb c0246cc1 c03b5600 f6cdb240 f781e7c8 c01b6507 40038000 00000003 00001000 40038000 c03b5600 f7854480 f7016940 40038000 c01b6480 00001000 c017836d f6d99fa0 f7bf2774 f7016940 fffffff7 00000000 f6d98000 Call Trace: [<c0246cc1>] dev_attr_show+0x21/0x50 [<c01b6507>] sysfs_read_file+0x87/0x120 [<c01b6480>] sysfs_read_file+0x0/0x120 [<c017836d>] vfs_read+0x9d/0x140 [<c01784e1>] sys_read+0x41/0x80 [<c01032ca>] syscall_call+0x7/0xb ======================= Code: fd ff 58 5a ba 02 00 00 00 8d 83 80 00 00 00 8d 4c 24 10 e8 bb f7 fc ff 83 c4 18 5b c3 53 89 cb 83 ec 04 8b 80 d8 00 00 00 89 e2 <8b> 00 8b 00 e8 77 d2 ff ff 85 c0 75 07 68 60 b1 37 c0 eb 05 68 EIP: [<c0220048>] show_docked+0xe/0x37 SS:ESP 0068:f6d99f38 ---[ end trace abcf04f7c3ef131b ]---The following change is the part which causes it.
Quoted 14 lines
drivers/acpi/dock.c +4
-1@@ -691,8 +691,14 @@ fdd_out:static ssize_t show_docked (struct device *dev,struct device_attribute *attr,char *buf) { -return snprintf (buf,PAGE_SIZE ,"%d\n" ,dock_present (dock_station)); +struct acpi_device *tmp; + +struct dock_station *dock_station = *((struct dock_station **) + dev->platform_data);
Quoted 7 lines
drivers/acpi/dock.c fdd_out: · line 703
Quoted 5 lines
drivers/acpi/dock.c +3
-0+if (ACPI_SUCCESS (acpi_bus_get_device (dock_station->handle, &tmp))) +return snprintf (buf,PAGE_SIZE ,"1\n" ); +return snprintf (buf,PAGE_SIZE ,"0\n" ); } static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL);It seems that
dev->platform_datais NULL on my system.
Not good, let me dig to see if I missed a patch...
thanks,
greg k-h
Quoted 3 lines · Greg KH
Quoted 1 line
It seems that
dev->platform_datais NULL on my system.Not good, let me dig to see if I missed a patch...
Ok, I did.
If you apply the patch below, does the oops go away?
But that's not really a "stable" fix, so I guess I'll just go revert the problem patch. Let me go make that fix...
thanks,
greg k-h
----------
From: Shaohua Li <[email protected]>
Date: Thu, 28 Aug 2008 10:03:58 +0800
Subject: dock: add bay and battery hotplug support
From: Shaohua Li <[email protected]>
Make the dock driver support bay and battery hotplug. They are all regarded as dock, so handling can be unified.
drivers/acpi/dock.c +175 -48
@@ -48,7 +48,6 @@ MODULE_PARM_DESC(immediate_undock, "1 (default) will cause the driver to " " before undocking");static struct atomic_notifier_head dock_notifier_list; -static struct platform_device *dock_device;static char dock_device_name[] ="dock" ;static const struct acpi_device_id dock_device_ids[] = {
@@ -65,7 +64,12 @@ struct dock_station {struct mutex hp_lock;struct list_head dependent_devices;struct list_head hotplug_devices; + +struct list_head sibiling; +struct platform_device *dock_device; }; +static LIST_HEAD (dock_stations); +static int dock_station_count;struct dock_dependent_device {struct list_head list;
@@ -77,11 +81,12 @@ struct dock_dependent_device {#define DOCK_DOCKING 0x00000001#define DOCK_UNDOCKING 0x00000002 +#define DOCK_IS_DOCK 0x00000010 +#define DOCK_IS_ATA 0x00000020 +#define DOCK_IS_BAT 0x00000040#define DOCK_EVENT 3#define UNDOCK_EVENT 2 -static struct dock_station *dock_station; -/***************************************************************************** * Dock Dependent device functions * *****************************************************************************/
@@ -199,6 +204,60 @@ static int is_dock(acpi_handle handle)return 1 ; } +static int is_ejectable (acpi_handle handle) +{ +acpi_status status; +acpi_handle tmp; + + status =acpi_get_handle (handle,"_EJ0" , &tmp); +if (ACPI_FAILURE (status)) +return 0 ; +return 1 ; +} + +static int is_ata (acpi_handle handle) +{ +acpi_handle tmp; + +if ((ACPI_SUCCESS (acpi_get_handle (handle,"_GTF" , &tmp))) || + (ACPI_SUCCESS (acpi_get_handle (handle,"_GTM" , &tmp))) || + (ACPI_SUCCESS (acpi_get_handle (handle,"_STM" , &tmp))) || + (ACPI_SUCCESS (acpi_get_handle (handle,"_SDD" , &tmp)))) +return 1 ; + +return 0 ; +} + +static int is_battery (acpi_handle handle) +{ +struct acpi_device_info *info; +struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER ,NULL }; +int ret =1 ; + +if (!ACPI_SUCCESS (acpi_get_object_info (handle, &buffer))) +return 0 ; + info = buffer.pointer; +if (!(info->valid &ACPI_VALID_HID )) + ret =0 ; +else + ret = !strcmp ("PNP0C0A" , info->hardware_id.value); + +kfree (buffer.pointer); +return ret; +} + +static int is_ejectable_bay (acpi_handle handle) +{ +acpi_handle phandle; +if (!is_ejectable (handle)) +return 0 ; +if (is_battery (handle) ||is_ata (handle)) +return 1 ; +if (!acpi_get_parent (handle, &phandle) &&is_ata (phandle)) +return 1 ; +return 0 ; +} +/** * is_dock_device - see if a device is on a dock station * @handle: acpi handle of the device
@@ -209,11 +268,17 @@ static int is_dock(acpi_handle handle)*/ int is_dock_device (acpi_handle handle) { -if (!dock_station) +struct dock_station *dock_station; + +if (!dock_station_count)return 0 ; -if (is_dock (handle) ||find_dock_dependent_device (dock_station, handle)) +if (is_dock (handle))return 1 ; +list_for_each_entry (dock_station, &dock_stations, sibiling) { +if (find_dock_dependent_device (dock_station, handle)) +return 1 ; + }return 0 ; }
@@ -341,7 +406,7 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event)static void dock_event (struct dock_station *ds,u32 event,int num) { -struct device *dev = &dock_device->dev; +struct device *dev = &ds->dock_device->dev;char event_string[13 ];char *envp[] = { event_string,NULL };
@@ -414,7 +479,7 @@ static void handle_dock(struct dock_station *ds, int dock) arg.type =ACPI_TYPE_INTEGER ; arg.integer.value = dock; status =acpi_evaluate_object (ds->handle,"_DCK" , &arg_list, &buffer); -if (ACPI_FAILURE (status)) +if (ACPI_FAILURE (status) && status !=AE_NOT_FOUND ) printk(KERN_ERR PREFIX "%s - failed to execute _DCK\n", (char *)name_buffer.pointer);kfree (buffer.pointer);
@@ -498,7 +563,7 @@ static int dock_in_progress(struct dock_station *ds)*/ int register_dock_notifier (struct notifier_block *nb) { -if (!dock_station) +if (!dock_station_count)return -ENODEV ;return atomic_notifier_chain_register (&dock_notifier_list, nb);
@@ -512,7 +577,7 @@ EXPORT_SYMBOL_GPL(register_dock_notifier);*/ void unregister_dock_notifier (struct notifier_block *nb) { -if (!dock_station) +if (!dock_station_count)return ;atomic_notifier_chain_unregister (&dock_notifier_list, nb);
@@ -535,20 +600,23 @@ register_hotplug_dock_device(acpi_handle handle, acpi_notify_handler handler, void *context) {struct dock_dependent_device *dd; +struct dock_station *dock_station; -if (!dock_station) +if (!dock_station_count)return -ENODEV ;/* * make sure this handle is for a device dependent on the dock, * this would include the dock station itself */ - dd =find_dock_dependent_device (dock_station, handle); -if (dd) { - dd->handler = handler; - dd->context = context; -dock_add_hotplug_device (dock_station, dd); -return 0 ; +list_for_each_entry (dock_station, &dock_stations, sibiling) { + dd =find_dock_dependent_device (dock_station, handle); +if (dd) { + dd->handler = handler; + dd->context = context; +dock_add_hotplug_device (dock_station, dd); +return 0 ; + } }return -EINVAL ;
@@ -563,13 +631,16 @@ EXPORT_SYMBOL_GPL(register_hotplug_dock_device);void unregister_hotplug_dock_device (acpi_handle handle) {struct dock_dependent_device *dd; +struct dock_station *dock_station; -if (!dock_station) +if (!dock_station_count)return ; - dd =find_dock_dependent_device (dock_station, handle); -if (dd) -dock_del_hotplug_device (dock_station, dd); +list_for_each_entry (dock_station, &dock_stations, sibiling) { + dd =find_dock_dependent_device (dock_station, handle); +if (dd) +dock_del_hotplug_device (dock_station, dd); + } }EXPORT_SYMBOL_GPL (unregister_hotplug_dock_device);
@@ -620,9 +691,28 @@ static void dock_notify(acpi_handle handle, u32 event, void *data) {struct dock_station *ds = data;struct acpi_device *tmp; +int surprise_removal =0 ; +/* +* According to acpi spec 3.0a, if a DEVICE_CHECK notification +* is sent and _DCK is present, it is assumed to mean an undock +* request. +*/ +if ((ds->flags &DOCK_IS_DOCK ) && event ==ACPI_NOTIFY_DEVICE_CHECK ) + event =ACPI_NOTIFY_EJECT_REQUEST ; + +/* +* dock station: BUS_CHECK - docked or surprise removal +* DEVICE_CHECK - undocked +* other device: BUS_CHECK/DEVICE_CHECK - added or surprise removal +* +* To simplify event handling, dock dependent device handler always +* get ACPI_NOTIFY_BUS_CHECK/ACPI_NOTIFY_DEVICE_CHECK for add and +* ACPI_NOTIFY_EJECT_REQUEST for removal +*/ switch (event) {case ACPI_NOTIFY_BUS_CHECK : +case ACPI_NOTIFY_DEVICE_CHECK :if (!dock_in_progress (ds) &&acpi_bus_get_device (ds->handle, &tmp)) {begin_dock (ds);
@@ -638,20 +728,17 @@ static void dock_notify(acpi_handle handle, u32 event, void *data)complete_dock (ds);dock_event (ds, event,DOCK_EVENT );dock_lock (ds,1 ); +break ; } -break ; -case ACPI_NOTIFY_DEVICE_CHECK : -/* -* According to acpi spec 3.0a, if a DEVICE_CHECK notification -* is sent and _DCK is present, it is assumed to mean an -* undock request. This notify routine will only be called -* for objects defining _DCK, so we will fall through to eject -* request here. However, we will pass an eject request through -* to the driver who wish to hotplug. -*/ +if (dock_present (ds) ||dock_in_progress (ds)) +break ; +/* This is a surprise removal */ + surprise_removal =1 ; + event =ACPI_NOTIFY_EJECT_REQUEST ; +/* Fall back */ case ACPI_NOTIFY_EJECT_REQUEST :begin_undock (ds); -if (immediate_undock) +if (immediate_undock || surprise_removal)handle_eject_request (ds, event);else dock_event (ds, event,UNDOCK_EVENT );
@@ -707,6 +794,8 @@ fdd_out:static ssize_t show_docked (struct device *dev,struct device_attribute *attr,char *buf) { +struct dock_station *dock_station = *((struct dock_station **) + dev->platform_data);return snprintf (buf,PAGE_SIZE ,"%d\n" ,dock_present (dock_station)); }
@@ -718,6 +807,8 @@ static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL);static ssize_t show_flags (struct device *dev,struct device_attribute *attr,char *buf) { +struct dock_station *dock_station = *((struct dock_station **) + dev->platform_data);return snprintf (buf,PAGE_SIZE ,"%d\n" , dock_station->flags); }
@@ -730,6 +821,8 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { int ret; +struct dock_station *dock_station = *((struct dock_station **) + dev->platform_data);if (!count)return -EINVAL ;
@@ -747,6 +840,8 @@ static ssize_t show_dock_uid(struct device *dev, struct device_attribute *attr, char *buf) { unsigned long lbuf; +struct dock_station *dock_station = *((struct dock_station **) + dev->platform_data);acpi_status status =acpi_evaluate_integer (dock_station->handle,"_UID" ,NULL , &lbuf);if (ACPI_FAILURE (status))
@@ -768,6 +863,8 @@ static int dock_add(acpi_handle handle)int ret;acpi_status status;struct dock_dependent_device *dd; +struct dock_station *dock_station; +struct platform_device *dock_device;/* allocate & initialize the dock_station private data */ dock_station =kzalloc (sizeof (*dock_station),GFP_KERNEL );
@@ -777,22 +874,34 @@ static int dock_add(acpi_handle handle) dock_station->last_dock_time = jiffies -HZ ;INIT_LIST_HEAD (&dock_station->dependent_devices);INIT_LIST_HEAD (&dock_station->hotplug_devices); +INIT_LIST_HEAD (&dock_station->sibiling);spin_lock_init (&dock_station->dd_lock);mutex_init (&dock_station->hp_lock);ATOMIC_INIT_NOTIFIER_HEAD (&dock_notifier_list);/* initialize platform device stuff */ - dock_device = -platform_device_register_simple (dock_device_name,0 ,NULL ,0 ); + dock_station->dock_device = +platform_device_register_simple (dock_device_name, + dock_station_count,NULL ,0 ); + dock_device = dock_station->dock_device;if (IS_ERR (dock_device)) {kfree (dock_station); dock_station =NULL ;return PTR_ERR (dock_device); } +platform_device_add_data (dock_device, &dock_station, +sizeof (struct dock_station *));/* we want the dock device to send uevents */ dock_device->dev.uevent_suppress =0 ; +if (is_dock (handle)) + dock_station->flags |=DOCK_IS_DOCK ; +if (is_ata (handle)) + dock_station->flags |=DOCK_IS_ATA ; +if (is_battery (handle)) + dock_station->flags |=DOCK_IS_BAT ; + ret =device_create_file (&dock_device->dev, &dev_attr_docked);if (ret) {printk ("Error %d adding sysfs file\n" , ret);
@@ -858,8 +967,8 @@ static int dock_add(acpi_handle handle) goto dock_add_err; } - printk(KERN_INFO PREFIX "%s\n", ACPI_DOCK_DRIVER_DESCRIPTION); - + dock_station_count++; +list_add (&dock_station->sibiling, &dock_stations);return 0 ; dock_add_err:
@@ -878,12 +987,13 @@ dock_add_err_unregister:/** * dock_remove - free up resources related to the dock station */ -static int dock_remove (void ) +static int dock_remove (struct dock_station *dock_station) {struct dock_dependent_device *dd, *tmp;acpi_status status; +struct platform_device *dock_device = dock_station->dock_device; -if (!dock_station) +if (!dock_station_count)return 0 ;/* remove dependent devices */
@@ -923,41 +1033,58 @@ static int dock_remove(void)static acpi_status find_dock (acpi_handle handle,u32 lvl,void *context,void **rv) { -int *count = context;acpi_status status =AE_OK ;if (is_dock (handle)) {if (dock_add (handle) >=0 ) { - (*count)++; status =AE_CTRL_TERMINATE ; } }return status; } -static int __init dock_init (void ) +static acpi_status +find_bay (acpi_handle handle,u32 lvl,void *context,void **rv) { -int num =0 ; - - dock_station =NULL ; +/* If bay is in a dock, it's already handled */ +if (is_ejectable_bay (handle) && !is_dock_device (handle)) +dock_add (handle); +return AE_OK ; +} +static int __init dock_init (void ) +{if (acpi_disabled)return 0 ;/* look for a dock station */ acpi_walk_namespace (ACPI_TYPE_DEVICE ,ACPI_ROOT_OBJECT , -ACPI_UINT32_MAX , find_dock, &num,NULL ); +ACPI_UINT32_MAX , find_dock,NULL ,NULL ); -if (!num) -printk (KERN_INFO "No dock devices found.\n" ); +/* look for bay */ +acpi_walk_namespace (ACPI_TYPE_DEVICE ,ACPI_ROOT_OBJECT , +ACPI_UINT32_MAX , find_bay,NULL ,NULL ); +if (!dock_station_count) { + printk(KERN_INFO PREFIX "No dock devices found.\n"); +return 0 ; + } + printk(KERN_INFO PREFIX "%s: %d docks/bays found\n", + ACPI_DOCK_DRIVER_DESCRIPTION, dock_station_count);return 0 ; } static void __exit dock_exit(void) { -dock_remove (); +struct dock_station *dock_station; + +list_for_each_entry (dock_station, &dock_stations, sibiling) +dock_remove (dock_station); } -postcore_initcall (dock_init); +/* +* Must be called before drivers of devices in dock, otherwise we can't know +* which devices are in a dock +*/ +subsys_initcall (dock_init);module_exit (dock_exit);
Quoted 11 lines · Greg KH
Quoted 3 lines · Greg KH
Quoted 1 line
It seems that
dev->platform_datais NULL on my system.Not good, let me dig to see if I missed a patch...
Ok, I did.
If you apply the patch below, does the oops go away?
But that's not really a "stable" fix, so I guess I'll just go revert the problem patch. Let me go make that fix...
Ok, I reverted the problem patch and released 2.6.27.17. Please let me know if you still have a problem with that kernel release.
thanks,
greg k-h
Quoted 9 lines · Greg KH
Quoted 8 lines · Greg KH
Quoted 3 lines · Greg KH
Quoted 1 line
It seems that
dev->platform_datais NULL on my system.Not good, let me dig to see if I missed a patch...
Ok, I did.
If you apply the patch below, does the oops go away?
3 or 4 chunks failed to apply and the ones that did apply were offset by several lines. If you'd like, I can try to apply it by hand and test it tomorrow.
Quoted 5 lines
Quoted 2 lines
But that's not really a "stable" fix, so I guess I'll just go revert the problem patch. Let me go make that fix...
Ok, I reverted the problem patch and released 2.6.27.17. Please let me know if you still have a problem with that kernel release.
I'm building 2.6.27.17 now, but I expect it to work since reverting that one patch is all I did to get 2.6.27.16 working for me.
David
Signature · 2 lines
David Engel [email protected]
Quoted 7 lines · David Engel
Quoted 6 lines · Greg KH
Quoted 5 lines · Greg KH
Quoted 3 lines · Greg KH
Quoted 1 line
It seems that
dev->platform_datais NULL on my system.Not good, let me dig to see if I missed a patch...
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Ok, I did.
If you apply the patch below, does the oops go away?
3 or 4 chunks failed to apply and the ones that did apply were offset by several lines. If you'd like, I can try to apply it by hand and test it tomorrow.
No, I thought better of it after looking at the code :)
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
But that's not really a "stable" fix, so I guess I'll just go revert the problem patch. Let me go make that fix...
Ok, I reverted the problem patch and released 2.6.27.17. Please let me know if you still have a problem with that kernel release.
I'm building 2.6.27.17 now, but I expect it to work since reverting that one patch is all I did to get 2.6.27.16 working for me.
Yeah, that's what I'm more concerned about.
thanks,
greg k-h
Quoted 9 lines · Greg KH
Quoted 6 lines · David Engel
Quoted 2 lines · Greg KH
Ok, I reverted the problem patch and released 2.6.27.17. Please let me know if you still have a problem with that kernel release.
I'm building 2.6.27.17 now, but I expect it to work since reverting that one patch is all I did to get 2.6.27.16 working for me.
Yeah, that's what I'm more concerned about.
It worked.
David
Signature · 2 lines
David Engel [email protected]
Quoted 6 lines · David Engel
Quoted 5 lines · Greg KH
Quoted 4 lines · David Engel
Quoted 2 lines · Greg KH
Ok, I reverted the problem patch and released 2.6.27.17. Please let me know if you still have a problem with that kernel release.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
I'm building 2.6.27.17 now, but I expect it to work since reverting that one patch is all I did to get 2.6.27.16 working for me.
Yeah, that's what I'm more concerned about.
It worked.
Great, thanks for telling me about the original problem, and testing it out. Sorry for the oops in the first place.
thanks,
greg k-h