Fix ACPI suspend / device suspend ordering problem
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=52ade9b3b97fd3bea42842a056fe0786c28d0555 Commit: 52ade9b3b97fd3bea42842a056fe0786c28d0555 Parent: 7b104bcb8e460e45a1aebe3da9b86aacdb4cab12 Author: Linus Torvalds <[EMAIL PROTECTED]> AuthorDate: Wed May 16 15:28:14 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed May 16 15:33:19 2007 -0700 Fix ACPI suspend / device suspend ordering problem In commit e3c7db621bed4afb8e231cb005057f2feb5db557 we fixed the resume ordering, so that the ACPI low-level resume code was called before the actual driver resume was called. However, that broke the nesting logic of suspend and resume, and we continued to suspend the devices _after_ we the ACPI device suspend code was called. That resulted in us saving PCI state for devices that had already been changed by ACPI, and in some cases disabled entirely (causing the PCI save_state to be all-ones). Which in turn caused the wrong state to be written back on resume. This moves the ACPI device suspend to after the device model per-device suspend() calls. This fixes the bogus state save. Thanks to Lukáš Hejtmánek for testing. Acked-by: Lukas Hejtmanek <[EMAIL PROTECTED]> Acked-by: Rafael J. Wysocki <[EMAIL PROTECTED]> Cc: Len Brown <[EMAIL PROTECTED]> Cc: Pavel Machek <[EMAIL PROTECTED]> Cc: Andrew Morton <[EMAIL PROTECTED]> Cc: Greg KH <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- kernel/power/main.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/kernel/power/main.c b/kernel/power/main.c index 40d56a3..b98b80c 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -97,25 +97,26 @@ static int suspend_prepare(suspend_state_t state) } } - if (pm_ops->prepare) { - if ((error = pm_ops->prepare(state))) - goto Thaw; - } - suspend_console(); error = device_suspend(PMSG_SUSPEND); if (error) { printk(KERN_ERR "Some devices failed to suspend\n"); - goto Resume_devices; + goto Resume_console; } + if (pm_ops->prepare) { + if ((error = pm_ops->prepare(state))) + goto Resume_devices; + } + error = disable_nonboot_cpus(); if (!error) return 0; enable_nonboot_cpus(); - Resume_devices: pm_finish(state); + Resume_devices: device_resume(); + Resume_console: resume_console(); Thaw: thaw_processes(); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[IA64] spelling fixes: arch/ia64/
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=72fdbdce3d52282f8ea95f512e871791256754e6 Commit: 72fdbdce3d52282f8ea95f512e871791256754e6 Parent: 0a3fd051c7036ef71b58863f8e5da7c3dabd9d3f Author: Simon Arlott <[EMAIL PROTECTED]> AuthorDate: Fri May 11 14:55:43 2007 -0700 Committer: Tony Luck <[EMAIL PROTECTED]> CommitDate: Fri May 11 14:55:43 2007 -0700 [IA64] spelling fixes: arch/ia64/ Spelling and apostrophe fixes in arch/ia64/. Signed-off-by: Simon Arlott <[EMAIL PROTECTED]> Signed-off-by: Tony Luck <[EMAIL PROTECTED]> --- arch/ia64/kernel/acpi.c |2 +- arch/ia64/kernel/crash.c|2 +- arch/ia64/kernel/irq.c |6 +++--- arch/ia64/kernel/irq_lsapic.c |2 +- arch/ia64/kernel/kprobes.c |6 +++--- arch/ia64/kernel/mca_drv.c |4 ++-- arch/ia64/kernel/module.c |2 +- arch/ia64/kernel/perfmon.c | 18 +- arch/ia64/kernel/perfmon_mckinley.h |2 +- arch/ia64/kernel/sal.c |2 +- arch/ia64/kernel/salinfo.c |2 +- arch/ia64/kernel/setup.c|6 +++--- arch/ia64/kernel/smp.c | 12 ++-- arch/ia64/kernel/smpboot.c |6 +++--- arch/ia64/kernel/time.c |2 +- arch/ia64/kernel/traps.c|2 +- arch/ia64/kernel/unwind.c |2 +- arch/ia64/mm/discontig.c|2 +- arch/ia64/sn/kernel/bte.c | 12 ++-- arch/ia64/sn/kernel/bte_error.c |4 ++-- arch/ia64/sn/kernel/io_common.c |2 +- arch/ia64/sn/kernel/setup.c |2 +- arch/ia64/sn/kernel/sn2/sn2_smp.c |2 +- arch/ia64/sn/kernel/xpc_channel.c |8 arch/ia64/sn/kernel/xpnet.c |2 +- arch/ia64/sn/pci/pci_dma.c |8 arch/ia64/sn/pci/pcibr/pcibr_ate.c |6 +++--- arch/ia64/sn/pci/pcibr/pcibr_dma.c |2 +- arch/ia64/sn/pci/tioca_provider.c |6 +++--- arch/ia64/sn/pci/tioce_provider.c | 16 30 files changed, 75 insertions(+), 75 deletions(-) diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 3549c94..c478449 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c @@ -791,7 +791,7 @@ static __init int setup_additional_cpus(char *s) early_param("additional_cpus", setup_additional_cpus); /* - * cpu_possible_map should be static, it cannot change as cpu's + * cpu_possible_map should be static, it cannot change as CPUs * are onlined, or offlined. The reason is per-cpu data-structures * are allocated by some modules at init time, and dont expect to * do this dynamically on cpu arrival/departure. diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c index aeb79fb..e80c82c 100644 --- a/arch/ia64/kernel/crash.c +++ b/arch/ia64/kernel/crash.c @@ -163,7 +163,7 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data) return NOTIFY_DONE; nd = (struct ia64_mca_notify_die *)args->err; - /* Reason code 1 means machine check rendezous*/ + /* Reason code 1 means machine check rendezvous*/ if ((val == DIE_INIT_MONARCH_ENTER || val == DIE_INIT_SLAVE_ENTER) && nd->sos->rv_rc == 1) return NOTIFY_DONE; diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index b4c2396..407b458 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c @@ -4,7 +4,7 @@ * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar * * This file contains the code used by various IRQ handling routines: - * asking for different IRQ's should be done through these routines + * asking for different IRQs should be done through these routines * instead of just grabbing them. Thus setups with different IRQ numbers * shouldn't result in any weird surprises, and installing new handlers * should be easier. @@ -12,7 +12,7 @@ * Copyright (C) Ashok Raj<[EMAIL PROTECTED]>, Intel Corporation 2004 * * 4/14/2004: Added code to handle cpu migration and do safe irq - * migration without lossing interrupts for iosapic + * migration without losing interrupts for iosapic * architecture. */ @@ -190,7 +190,7 @@ void fixup_irqs(void) } /* -* Phase 1: Locate irq's bound to this cpu and +* Phase 1: Locate IRQs bound to this cpu and * relocate them for cpu removal. */ migrate_irqs(); diff --git a/arch/ia64/kernel/irq_lsapic.c b/arch/ia64/kernel/irq_lsapic.c index c2f07be..e56a7a3 100644 --- a/arch/ia64/kernel/irq_lsapic.c +++ b/arch/ia64/kernel/irq_lsapic.c @@ -23,7 +23,7 @@ lsapic_noop_startup (unsigned int irq) static void lsapic_noop (unsigned int irq) { - /* nuthing to do... */ + /* nothing to do... */ } static int lsapic_retrigger(unsigned int irq) diff --git
[IA64] wire up {signal,timer,event}fd syscalls
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ae67e498a54259364f7211e10d9834575b340b21 Commit: ae67e498a54259364f7211e10d9834575b340b21 Parent: 72fdbdce3d52282f8ea95f512e871791256754e6 Author: Tony Luck <[EMAIL PROTECTED]> AuthorDate: Mon May 14 15:55:11 2007 -0700 Committer: Tony Luck <[EMAIL PROTECTED]> CommitDate: Mon May 14 15:55:11 2007 -0700 [IA64] wire up {signal,timer,event}fd syscalls Signed-off-by: Tony Luck <[EMAIL PROTECTED]> --- arch/ia64/kernel/entry.S |3 +++ include/asm-ia64/unistd.h |5 - 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 144b056..95f5175 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S @@ -1585,5 +1585,8 @@ sys_call_table: data8 sys_getcpu data8 sys_epoll_pwait // 1305 data8 sys_utimensat + data8 sys_signalfd + data8 sys_timerfd + data8 sys_eventfd .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index f049bc4..d7781a2 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h @@ -296,11 +296,14 @@ #define __NR_getcpu1304 #define __NR_epoll_pwait 1305 #define __NR_utimensat 1306 +#define __NR_signalfd 1307 +#define __NR_timerfd 1308 +#define __NR_eventfd 1309 #ifdef __KERNEL__ -#define NR_syscalls283 /* length of syscall table */ +#define NR_syscalls286 /* length of syscall table */ #define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGSUSPEND - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[IA64] kdump on INIT needs multi-nodes sync-up (v.2)
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=311f594dec9b0c8693ec7df75b82c251b6b0e7c2 Commit: 311f594dec9b0c8693ec7df75b82c251b6b0e7c2 Parent: ae67e498a54259364f7211e10d9834575b340b21 Author: Jay Lan <[EMAIL PROTECTED]> AuthorDate: Tue Apr 3 17:53:42 2007 -0700 Committer: Tony Luck <[EMAIL PROTECTED]> CommitDate: Mon May 14 15:55:39 2007 -0700 [IA64] kdump on INIT needs multi-nodes sync-up (v.2) The current implementation of kdump on INIT events would enter kdump processing on DIE_INIT_MONARCH_ENTER and DIE_INIT_SLAVE_ENTER events. Thus, the monarch cpu would go ahead and boot up the kdump On SN shub2 systems, this out-of-sync situation causes some slave cpus on different nodes to enter POD. This patch moves kdump entry points to DIE_INIT_MONARCH_LEAVE and DIE_INIT_SLAVE_LEAVE. It also sets kdump_in_progress variable in the DIE_INIT_MONARCH_PROCESS event to not dump all active stack traces to the console in the case of kdump. I have tested this patch on an SN machine and a HP RX2600. Signed-off-by: Jay Lan <[EMAIL PROTECTED]> Acked-by: Zou Nan hai <[EMAIL PROTECTED]> Signed-off-by: Tony Luck <[EMAIL PROTECTED]> --- arch/ia64/kernel/crash.c | 22 +++--- arch/ia64/kernel/mca.c |4 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c index e80c82c..1d64ef4 100644 --- a/arch/ia64/kernel/crash.c +++ b/arch/ia64/kernel/crash.c @@ -156,24 +156,30 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data) if (!kdump_on_init) return NOTIFY_DONE; - if (val != DIE_INIT_MONARCH_ENTER && - val != DIE_INIT_SLAVE_ENTER && + if (val != DIE_INIT_MONARCH_LEAVE && + val != DIE_INIT_SLAVE_LEAVE && + val != DIE_INIT_MONARCH_PROCESS && val != DIE_MCA_RENDZVOUS_LEAVE && val != DIE_MCA_MONARCH_LEAVE) return NOTIFY_DONE; nd = (struct ia64_mca_notify_die *)args->err; /* Reason code 1 means machine check rendezvous*/ - if ((val == DIE_INIT_MONARCH_ENTER || val == DIE_INIT_SLAVE_ENTER) && -nd->sos->rv_rc == 1) + if ((val == DIE_INIT_MONARCH_LEAVE || val == DIE_INIT_SLAVE_LEAVE + || val == DIE_INIT_MONARCH_PROCESS) && nd->sos->rv_rc == 1) return NOTIFY_DONE; switch (val) { - case DIE_INIT_MONARCH_ENTER: + case DIE_INIT_MONARCH_PROCESS: + atomic_set(&kdump_in_progress, 1); + *(nd->monarch_cpu) = -1; + break; + case DIE_INIT_MONARCH_LEAVE: machine_kdump_on_init(); break; - case DIE_INIT_SLAVE_ENTER: - unw_init_running(kdump_cpu_freeze, NULL); + case DIE_INIT_SLAVE_LEAVE: + if (atomic_read(&kdump_in_progress)) + unw_init_running(kdump_cpu_freeze, NULL); break; case DIE_MCA_RENDZVOUS_LEAVE: if (atomic_read(&kdump_in_progress)) @@ -215,8 +221,10 @@ static ctl_table sys_table[] = { static int machine_crash_setup(void) { + /* be notified before default_monarch_init_process */ static struct notifier_block kdump_init_notifier_nb = { .notifier_call = kdump_init_notifier, + .priority = 1, }; int ret; if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0) diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 26814de..93e82e4 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c @@ -1477,6 +1477,10 @@ default_monarch_init_process(struct notifier_block *self, unsigned long val, voi struct task_struct *g, *t; if (val != DIE_INIT_MONARCH_PROCESS) return NOTIFY_DONE; +#ifdef CONFIG_KEXEC + if (atomic_read(&kdump_in_progress)) + return NOTIFY_DONE; +#endif /* * FIXME: mlogbuf will brim over with INIT stack dumps. - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[IA64] s/scalibility/scalability/
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c47953cfc6bad91c46272aad202ee33276671608 Commit: c47953cfc6bad91c46272aad202ee33276671608 Parent: 311f594dec9b0c8693ec7df75b82c251b6b0e7c2 Author: Tony Luck <[EMAIL PROTECTED]> AuthorDate: Fri May 11 15:18:45 2007 -0700 Committer: Tony Luck <[EMAIL PROTECTED]> CommitDate: Mon May 14 15:57:39 2007 -0700 [IA64] s/scalibility/scalability/ Previous spelling patch from Simon Arlott broke one spot that didn't need fixing (reported by Simon within 35 minutes of the patch ... but not until after I'd applied to GIT and pushed :-( Signed-off-by: Tony Luck <[EMAIL PROTECTED]> --- arch/ia64/kernel/time.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index bf7e7b5..a06667c 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c @@ -216,7 +216,7 @@ ia64_init_itm (void) #ifdef CONFIG_SMP /* On IA64 in an SMP configuration ITCs are never accurately synchronized. * Jitter compensation requires a cmpxchg which may limit -* the scalibility of the syscalls for retrieving time. +* the scalability of the syscalls for retrieving time. * The ITC synchronization is usually successful to within a few * ITC ticks but this is not a sure thing. If you need to improve * timer performance in SMP situations then boot the kernel with the - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[IA64] Fix section conflict of ia64_mlogbuf_finish
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=17028c5c91580036eb41da2fad292965fa3b9a7d Commit: 17028c5c91580036eb41da2fad292965fa3b9a7d Parent: c47953cfc6bad91c46272aad202ee33276671608 Author: Martin Michlmayr <[EMAIL PROTECTED]> AuthorDate: Tue May 15 21:03:36 2007 +0200 Committer: Tony Luck <[EMAIL PROTECTED]> CommitDate: Tue May 15 13:38:13 2007 -0700 [IA64] Fix section conflict of ia64_mlogbuf_finish Building with GCC 4.2, I get the following error: CC arch/ia64/kernel/mca.o arch/ia64/kernel/mca.c:275: error: __ksymtab_ia64_mlogbuf_finish causes a section type conflict This is because ia64_mlogbuf_finish is both declared static and exported. Fix by removing the export (which is unneeded now). Signed-off-by: Martin Michlmayr <[EMAIL PROTECTED]> Signed-off-by: Tony Luck <[EMAIL PROTECTED]> --- arch/ia64/kernel/mca.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 93e82e4..1ead5ea 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c @@ -273,7 +273,6 @@ static void ia64_mlogbuf_finish(int wait) mlogbuf_finished = 1; } -EXPORT_SYMBOL(ia64_mlogbuf_finish); /* * Print buffered messages from INIT context. - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[IA64] optimize pagefaults a little
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=576fe0bd7e52dce7afb6b9b2450744555b2eb53a Commit: 576fe0bd7e52dce7afb6b9b2450744555b2eb53a Parent: 17028c5c91580036eb41da2fad292965fa3b9a7d Author: Christoph Hellwig <[EMAIL PROTECTED]> AuthorDate: Wed May 16 14:52:19 2007 +0200 Committer: Tony Luck <[EMAIL PROTECTED]> CommitDate: Wed May 16 09:00:51 2007 -0700 [IA64] optimize pagefaults a little Get rid of the notifier list and call the kprobes code directly if compiled in. This mirrors the changes that recently went into powerpc, s390 and sparc64. Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Tony Luck <[EMAIL PROTECTED]> --- arch/ia64/kernel/kprobes.c |9 + arch/ia64/mm/fault.c | 41 ++--- include/asm-ia64/kdebug.h | 16 +--- include/asm-ia64/kprobes.h |1 + 4 files changed, 29 insertions(+), 38 deletions(-) diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index be81fe4..5bc46f1 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c @@ -820,7 +820,7 @@ out: return 1; } -static int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr) +int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr) { struct kprobe *cur = kprobe_running(); struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); @@ -904,13 +904,6 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self, if (post_kprobes_handler(args->regs)) ret = NOTIFY_STOP; break; - case DIE_PAGE_FAULT: - /* kprobe_running() needs smp_processor_id() */ - preempt_disable(); - if (kprobe_running() && - kprobes_fault_handler(args->regs, args->trapnr)) - ret = NOTIFY_STOP; - preempt_enable(); default: break; } diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c index 21658e0..b87f785 100644 --- a/arch/ia64/mm/fault.c +++ b/arch/ia64/mm/fault.c @@ -19,36 +19,24 @@ extern void die (char *, struct pt_regs *, long); #ifdef CONFIG_KPROBES -ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); - -/* Hook to register for page fault notifications */ -int register_page_fault_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(¬ify_page_fault_chain, nb); -} - -int unregister_page_fault_notifier(struct notifier_block *nb) +static inline int notify_page_fault(struct pt_regs *regs, int trap) { - return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb); -} + int ret = 0; + + if (!user_mode(regs)) { + /* kprobe_running() needs smp_processor_id() */ + preempt_disable(); + if (kprobe_running() && kprobes_fault_handler(regs, trap)) + ret = 1; + preempt_enable(); + } -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) -{ - struct die_args args = { - .regs = regs, - .str = str, - .err = err, - .trapnr = trap, - .signr = sig - }; - return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); + return ret; } #else -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) +static inline int notify_page_fault(struct pt_regs *regs, int trap) { - return NOTIFY_DONE; + return 0; } #endif @@ -117,8 +105,7 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re /* * This is to handle the kprobes on user space access instructions */ - if (notify_page_fault(DIE_PAGE_FAULT, "page fault", regs, code, TRAP_BRKPT, - SIGSEGV) == NOTIFY_STOP) + if (notify_page_fault(regs, TRAP_BRKPT)) return; down_read(&mm->mmap_sem); diff --git a/include/asm-ia64/kdebug.h b/include/asm-ia64/kdebug.h index ba211e0..320cd8e 100644 --- a/include/asm-ia64/kdebug.h +++ b/include/asm-ia64/kdebug.h @@ -28,14 +28,24 @@ */ #include -extern int register_page_fault_notifier(struct notifier_block *); -extern int unregister_page_fault_notifier(struct notifier_block *); +/* + * These are only here because kprobes.c wants them to implement a + * blatant layering violation. Will hopefully go away soon once all + * architectures are updated. + */ +static inline int register_page_fault_notifier(struct notifier_block *nb) +{ + return 0; +} +static inline int unregister_page_fault_notifier(struct notifier_block *nb) +{ + return 0; +} enum die_val {
AFS: write back dirty data on unmount
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=faab83bbcd9e001077e42a7c085f1e871997647f Commit: faab83bbcd9e001077e42a7c085f1e871997647f Parent: 5b58e21a27028a9f0399449d8bc8494fd9d9ff70 Author: David Howells <[EMAIL PROTECTED]> AuthorDate: Tue May 15 23:57:02 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed May 16 21:19:15 2007 -0700 AFS: write back dirty data on unmount Fix AFS to write back dirty on unmounting. This didn't happen because afs_super_ops.drop_inode was pointing to generic_delete_inode. Now this pointer is left set to NULL so that the default behaviour occurs instead. Signed-off-by: David Howells <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- fs/afs/super.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/fs/afs/super.c b/fs/afs/super.c index 579af63..370cecc 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c @@ -47,7 +47,6 @@ struct file_system_type afs_fs_type = { static const struct super_operations afs_super_ops = { .statfs = afs_statfs, .alloc_inode= afs_alloc_inode, - .drop_inode = generic_delete_inode, .write_inode= afs_write_inode, .destroy_inode = afs_destroy_inode, .clear_inode= afs_clear_inode, - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
SLUB: It is legit to allocate a slab of the maximum permitted size
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1abd727ed7abf5c19e7d1760671475cbecbccb0e Commit: 1abd727ed7abf5c19e7d1760671475cbecbccb0e Parent: faab83bbcd9e001077e42a7c085f1e871997647f Author: Christoph Lameter <[EMAIL PROTECTED]> AuthorDate: Tue May 15 23:57:03 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed May 16 21:19:15 2007 -0700 SLUB: It is legit to allocate a slab of the maximum permitted size Sorry I screwed up the comparison. It is only an error if we attempt to allocate a slab larger than the maximum allowed size. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- include/linux/slub_def.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index fd6627e..c6c1f4a 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -88,7 +88,7 @@ static inline int kmalloc_index(int size) */ WARN_ON_ONCE(size == 0); - if (size >= (1 << KMALLOC_SHIFT_HIGH)) + if (size > (1 << KMALLOC_SHIFT_HIGH)) return -1; if (size > 64 && size <= 96) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
slub: don't confuse ctor and dtor
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1800782016fda6fbc9990a0227fec581070f23af Commit: 1800782016fda6fbc9990a0227fec581070f23af Parent: 1abd727ed7abf5c19e7d1760671475cbecbccb0e Author: Hugh Dickins <[EMAIL PROTECTED]> AuthorDate: Tue May 15 23:57:04 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed May 16 21:19:15 2007 -0700 slub: don't confuse ctor and dtor kmem_cache_create() was swapping ctor and dtor in calling find_mergeable(): though it caused no bug, and probably never would, even if destructors are retained; but fix it so as not to generate anxiety ;) Signed-off-by: Hugh Dickins <[EMAIL PROTECTED]> Cc: Christoph Lameter <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- mm/slub.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index b39c8a6..5e3e8bc 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2522,7 +2522,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, struct kmem_cache *s; down_write(&slub_lock); - s = find_mergeable(size, align, flags, dtor, ctor); + s = find_mergeable(size, align, flags, ctor, dtor); if (s) { s->refcount++; /* - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
AFS: Fix afs_prepare_write()
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bb33ed6345d6156484f39089aa8b52f44ce76609 Commit: bb33ed6345d6156484f39089aa8b52f44ce76609 Parent: 1800782016fda6fbc9990a0227fec581070f23af Author: David Howells <[EMAIL PROTECTED]> AuthorDate: Tue May 15 23:57:04 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed May 16 21:19:15 2007 -0700 AFS: Fix afs_prepare_write() afs_prepare_write() should not mark a page up to date if it only partially fills it in, in expectation of the caller filling in the rest prior to calling commit_write(). commit_write(), however, should mark the page up to date. Signed-off-by: David Howells <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- fs/afs/write.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/afs/write.c b/fs/afs/write.c index 28f3751..a03b92a 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -206,7 +206,6 @@ int afs_prepare_write(struct file *file, struct page *page, _leave(" = %d [prep]", ret); return ret; } - SetPageUptodate(page); } try_again: @@ -311,8 +310,8 @@ int afs_commit_write(struct file *file, struct page *page, spin_unlock(&vnode->writeback_lock); } + SetPageUptodate(page); set_page_dirty(page); - if (PageDirty(page)) _debug("dirtied"); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
spi: fix spidev for >sizeof(long)/32 devices
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a4dd7783dfc62176a29cb349404180f24f46975 Commit: 0a4dd7783dfc62176a29cb349404180f24f46975 Parent: bb33ed6345d6156484f39089aa8b52f44ce76609 Author: Domen Puncer <[EMAIL PROTECTED]> AuthorDate: Tue May 15 23:57:05 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed May 16 21:19:15 2007 -0700 spi: fix spidev for >sizeof(long)/32 devices find_first_zero_bit accepts number of bits, not longs. Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> Signed-off-by: David Brownell <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/spi/spidev.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index c0a6dce..225d6b2 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -484,7 +484,7 @@ static int spidev_probe(struct spi_device *spi) * Reusing minors is fine so long as udev or mdev is working. */ mutex_lock(&device_list_lock); - minor = find_first_zero_bit(minors, ARRAY_SIZE(minors)); + minor = find_first_zero_bit(minors, N_SPI_MINORS); if (minor < N_SPI_MINORS) { spidev->dev.parent = &spi->dev; spidev->dev.class = &spidev_class; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
parport_pc needs dma-mapping.h
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8382d2b9a7205fe1fb262f59237715a40c911880 Commit: 8382d2b9a7205fe1fb262f59237715a40c911880 Parent: 0a4dd7783dfc62176a29cb349404180f24f46975 Author: Andrew Morton <[EMAIL PROTECTED]> AuthorDate: Tue May 15 23:57:08 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed May 16 21:19:15 2007 -0700 parport_pc needs dma-mapping.h alpha: drivers/parport/parport_pc.c: In function 'parport_pc_fifo_write_block_dma': drivers/parport/parport_pc.c:636: warning: implicit declaration of function 'dma_map_single' drivers/parport/parport_pc.c:637: error: 'DMA_TO_DEVICE' undeclared (first use in this function) drivers/parport/parport_pc.c:637: error: (Each undeclared identifier is reported only once drivers/parport/parport_pc.c:637: error: for each function it appears in.) Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/parport/parport_pc.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 02c0d52..7bfbad5 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Fix: find_or_create_page skips cpuset memory spreading.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43c0f3d25c602dc96b201ed81ffda0bc600ff969 Commit: 43c0f3d25c602dc96b201ed81ffda0bc600ff969 Parent: 8382d2b9a7205fe1fb262f59237715a40c911880 Author: Christoph Lameter <[EMAIL PROTECTED]> AuthorDate: Tue May 15 23:57:09 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed May 16 21:19:15 2007 -0700 Fix: find_or_create_page skips cpuset memory spreading. We call alloc_page where we should be calling __page_cache_alloc. __page_cache_alloc performs cpuset memory spreading. alloc_page does not. There is no reason that pages allocated via find_or_create should be exempt. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- mm/filemap.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 7b48b2a..edb1b0b 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -670,7 +670,8 @@ repeat: page = find_lock_page(mapping, index); if (!page) { if (!cached_page) { - cached_page = alloc_page(gfp_mask); + cached_page = + __page_cache_alloc(gfp_mask); if (!cached_page) return NULL; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[SPARC64]: Add hypervisor API negotiation and fix console bugs.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c7754d465b1feade85b5f1c4492781a30f6652a2 Commit: c7754d465b1feade85b5f1c4492781a30f6652a2 Parent: 7b104bcb8e460e45a1aebe3da9b86aacdb4cab12 Author: David S. Miller <[EMAIL PROTECTED]> AuthorDate: Tue May 15 17:03:54 2007 -0700 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Tue May 15 20:23:02 2007 -0700 [SPARC64]: Add hypervisor API negotiation and fix console bugs. Hypervisor interfaces need to be negotiated in order to use some API calls reliably. So add a small set of interfaces to request API versions and query current settings. This allows us to fix some bugs in the hypervisor console: 1) If we can negotiate API group CORE of at least major 1 minor 1 we can use con_read and con_write which can improve console performance quite a bit. 2) When we do a console write request, we should hold the spinlock around the whole request, not a byte at a time. What would happen is that it's easy for output from different cpus to get mixed with each other. 3) Use consistent udelay() based polling, udelay(1) each loop with a limit of 1000 polls to handle stuck hypervisor console. Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- arch/sparc64/kernel/Makefile |2 +- arch/sparc64/kernel/entry.S | 94 + arch/sparc64/kernel/hvapi.c | 189 ++ arch/sparc64/kernel/setup.c |3 + drivers/serial/sunhv.c | 276 -- include/asm-sparc64/hypervisor.h | 83 +++- 6 files changed, 574 insertions(+), 73 deletions(-) diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index 6bf6fb6..c749dcc 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile @@ -12,7 +12,7 @@ obj-y := process.o setup.o cpu.o idprom.o \ irq.o ptrace.o time.o sys_sparc.o signal.o \ unaligned.o central.o pci.o starfire.o semaphore.o \ power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \ - visemul.o prom.o of_device.o + visemul.o prom.o of_device.o hvapi.o obj-$(CONFIG_STACKTRACE) += stacktrace.o obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \ diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index c15a3ed..732b77c 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S @@ -1843,3 +1843,97 @@ sun4v_cpu_state: mov %o1, %o0 1: retl nop + + /* %o0: API group number +* %o1: pointer to unsigned long major number storage +* %o2: pointer to unsigned long minor number storage +* +* returns %o0: status +*/ + .globl sun4v_get_version +sun4v_get_version: + mov HV_CORE_GET_VER, %o5 + mov %o1, %o3 + mov %o2, %o4 + ta HV_CORE_TRAP + stx %o1, [%o3] + retl +stx%o2, [%o4] + + /* %o0: API group number +* %o1: desired major number +* %o2: desired minor number +* %o3: pointer to unsigned long actual minor number storage +* +* returns %o0: status +*/ + .globl sun4v_set_version +sun4v_set_version: + mov HV_CORE_SET_VER, %o5 + mov %o3, %o4 + ta HV_CORE_TRAP + retl +stx%o1, [%o4] + + /* %o0: pointer to unsigned long status +* +* returns %o0: signed character +*/ + .globl sun4v_con_getchar +sun4v_con_getchar: + mov %o0, %o4 + mov HV_FAST_CONS_GETCHAR, %o5 + clr %o0 + clr %o1 + ta HV_FAST_TRAP + stx %o0, [%o4] + retl +sra%o1, 0, %o0 + + /* %o0: signed long character +* +* returns %o0: status +*/ + .globl sun4v_con_putchar +sun4v_con_putchar: + mov HV_FAST_CONS_PUTCHAR, %o5 + ta HV_FAST_TRAP + retl +sra%o0, 0, %o0 + + /* %o0: buffer real address +* %o1: buffer size +* %o2: pointer to unsigned long bytes_read +* +* returns %o0: status +*/ + .globl sun4v_con_read +sun4v_con_read: + mov %o2, %o4 + mov HV_FAST_CONS_READ, %o5 + ta HV_FAST_TRAP + brnz%o0, 1f +cmp%o1, -1 /* break */ + be,a,pn %icc, 1f +mov%o1, %o0 + cmp %o1, -2 /* hup */ + be,a,pn %icc, 1f +mov%o1, %o0 + stx %o1, [%o4] +1: retl +nop + + /* %o0: buffer real address +* %o1: buffer size +* %o2: pointer to unsigned long bytes_written +* +* returns %o0: status +*/ + .globl sun4v_con_write +sun4v_con_writ
[AVR32] Remove bogus comment in arch/avr32/kernel/irq.c
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5d1938c83ca826891a02badef7c9ea8ed57e01a2 Commit: 5d1938c83ca826891a02badef7c9ea8ed57e01a2 Parent: 39403865d2e4590802553370a56c9ab93131e4ee Author: Haavard Skinnemoen <[EMAIL PROTECTED]> AuthorDate: Sun May 13 16:05:59 2007 +0200 Committer: Haavard Skinnemoen <[EMAIL PROTECTED]> CommitDate: Sun May 13 16:05:59 2007 +0200 [AVR32] Remove bogus comment in arch/avr32/kernel/irq.c The comment at the top of arch/avr32/kernel/irq.c doesn't really make sense anymore since most of the actual interrupt handling code is elsewhere. Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]> --- arch/avr32/kernel/irq.c |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/arch/avr32/kernel/irq.c b/arch/avr32/kernel/irq.c index fd31124..61f2de2 100644 --- a/arch/avr32/kernel/irq.c +++ b/arch/avr32/kernel/irq.c @@ -7,15 +7,6 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. - * - * This file contains the code used by various IRQ handling routines: - * asking for different IRQ's should be done through these routines - * instead of just grabbing them. Thus setups with different IRQ numbers - * shouldn't result in any weird surprises, and installing new handlers - * should be easier. - * - * IRQ's are in fact implemented a bit like signal handlers for the kernel. - * Naturally it's not a 1:1 relation, but there are similarities. */ #include - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[AVR32] optimize pagefault path
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9caebec7b8093574fca5a334a1939530872d75e3 Commit: 9caebec7b8093574fca5a334a1939530872d75e3 Parent: 5d1938c83ca826891a02badef7c9ea8ed57e01a2 Author: Christoph Hellwig <[EMAIL PROTECTED]> AuthorDate: Sat May 12 17:56:11 2007 +0200 Committer: Haavard Skinnemoen <[EMAIL PROTECTED]> CommitDate: Sun May 13 17:07:46 2007 +0200 [AVR32] optimize pagefault path Avoid the costly notifier list in the pagefault path and call the kprobes code directly. The same change went into the 2.6.22 cycle for powerpc, 2s390 and sparc64 already. Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]> --- arch/avr32/kernel/kprobes.c |7 +-- arch/avr32/mm/fault.c | 36 include/asm-avr32/kdebug.h | 17 + include/asm-avr32/kprobes.h |1 + 4 files changed, 27 insertions(+), 34 deletions(-) diff --git a/arch/avr32/kernel/kprobes.c b/arch/avr32/kernel/kprobes.c index 004c94b..4942ee6 100644 --- a/arch/avr32/kernel/kprobes.c +++ b/arch/avr32/kernel/kprobes.c @@ -179,7 +179,7 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs) return 1; } -static int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) +int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) { struct kprobe *cur = kprobe_running(); @@ -216,11 +216,6 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self, if (post_kprobe_handler(args->regs)) ret = NOTIFY_STOP; break; - case DIE_FAULT: - if (kprobe_running() - && kprobe_fault_handler(args->regs, args->trapnr)) - ret = NOTIFY_STOP; - break; default: break; } diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c index 88b00b1..e011f1c 100644 --- a/arch/avr32/mm/fault.c +++ b/arch/avr32/mm/fault.c @@ -12,41 +12,30 @@ #include #include #include - #include +#include + #include #include #include #include #ifdef CONFIG_KPROBES -ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); - -/* Hook to register for page fault notifications */ -int register_page_fault_notifier(struct notifier_block *nb) +static inline int notify_page_fault(struct pt_regs *regs, int trap) { - return atomic_notifier_chain_register(¬ify_page_fault_chain, nb); -} + int ret = 0; -int unregister_page_fault_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb); -} + if (!user_mode(regs)) { + if (kprobe_running() && kprobe_fault_handler(regs, trap)) + ret = 1; + } -static inline int notify_page_fault(enum die_val val, struct pt_regs *regs, - int trap, int sig) -{ - struct die_args args = { - .regs = regs, - .trapnr = trap, - }; - return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); + return ret; } #else -static inline int notify_page_fault(enum die_val val, struct pt_regs *regs, - int trap, int sig) +static inline int notify_page_fault(struct pt_regs *regs, int trap) { - return NOTIFY_DONE; + return 0; } #endif @@ -76,8 +65,7 @@ asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs) long signr; int code; - if (notify_page_fault(DIE_PAGE_FAULT, regs, - ecr, SIGSEGV) == NOTIFY_STOP) + if (notify_page_fault(regs, ecr)) return; address = sysreg_read(TLBEAR); diff --git a/include/asm-avr32/kdebug.h b/include/asm-avr32/kdebug.h index de41927..7f54e2b 100644 --- a/include/asm-avr32/kdebug.h +++ b/include/asm-avr32/kdebug.h @@ -5,13 +5,22 @@ /* Grossly misnamed. */ enum die_val { - DIE_FAULT, DIE_BREAKPOINT, DIE_SSTEP, - DIE_PAGE_FAULT, }; -int register_page_fault_notifier(struct notifier_block *nb); -int unregister_page_fault_notifier(struct notifier_block *nb); +/* + * These are only here because kprobes.c wants them to implement a + * blatant layering violation. Will hopefully go away soon once all + * architectures are updated. + */ +static inline int register_page_fault_notifier(struct notifier_block *nb) +{ + return 0; +} +static inline int unregister_page_fault_notifier(struct notifier_block *nb) +{ + return 0; +} #endif /* __ASM_AVR32_KDEBUG_H */ diff --git a/include/asm-avr32/kprobes.h b/include/asm-avr32/kprobes.h index 09a5cbe..190a637 100644 --- a/include/asm-avr32/kprobes.h +++ b/include/asm-avr32/kprobes.h @@ -26,6 +26,7 @@ struct arch_specific_insn { kprobe_opcode_t insn[MAX_INSN_SIZE]; }; +extern int kpro
[AVR32] Wire up signalfd, timerfd and eventfd
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=78c129b949bdee21dd996ac5f5cfc655cd5bd42e Commit: 78c129b949bdee21dd996ac5f5cfc655cd5bd42e Parent: 9caebec7b8093574fca5a334a1939530872d75e3 Author: Haavard Skinnemoen <[EMAIL PROTECTED]> AuthorDate: Sun May 13 16:33:33 2007 +0200 Committer: Haavard Skinnemoen <[EMAIL PROTECTED]> CommitDate: Sun May 13 17:07:57 2007 +0200 [AVR32] Wire up signalfd, timerfd and eventfd Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]> --- arch/avr32/kernel/syscall_table.S |3 +++ include/asm-avr32/unistd.h|5 - 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index 07f6a6f..75c81f2 100644 --- a/arch/avr32/kernel/syscall_table.S +++ b/arch/avr32/kernel/syscall_table.S @@ -292,4 +292,7 @@ sys_call_table: .long sys_shmdt .long sys_shmctl .long sys_utimensat + .long sys_signalfd + .long sys_timerfd /* 280 */ + .long sys_eventfd .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ diff --git a/include/asm-avr32/unistd.h b/include/asm-avr32/unistd.h index 2418cce..3b4e35b 100644 --- a/include/asm-avr32/unistd.h +++ b/include/asm-avr32/unistd.h @@ -296,9 +296,12 @@ #define __NR_shmctl277 #define __NR_utimensat 278 +#define __NR_signalfd 279 +#define __NR_timerfd 280 +#define __NR_eventfd 281 #ifdef __KERNEL__ -#define NR_syscalls279 +#define NR_syscalls282 #define __ARCH_WANT_IPC_PARSE_VERSION - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[AVR32] Implement platform hooks for atmel_lcdfb driver
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d0a2b7af27f6d01a443f3af8252fa0b955bf1913 Commit: d0a2b7af27f6d01a443f3af8252fa0b955bf1913 Parent: 78c129b949bdee21dd996ac5f5cfc655cd5bd42e Author: Haavard Skinnemoen <[EMAIL PROTECTED]> AuthorDate: Wed Mar 21 18:08:49 2007 +0100 Committer: Haavard Skinnemoen <[EMAIL PROTECTED]> CommitDate: Tue May 15 14:13:27 2007 +0200 [AVR32] Implement platform hooks for atmel_lcdfb driver This modifies and extends the existing lcdc platform code to support the new atmel_lcdfb driver. The ATSTK1000 board code is set up to use the on-board Samsung LTV350QV LCD panel. Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]> --- arch/avr32/boards/atstk1000/atstk1000.h | 15 ++ arch/avr32/boards/atstk1000/atstk1002.c | 10 ++-- arch/avr32/boards/atstk1000/setup.c | 45 +- arch/avr32/mach-at32ap/at32ap7000.c | 77 --- include/asm-avr32/arch-at32ap/board.h |8 +-- 5 files changed, 127 insertions(+), 28 deletions(-) diff --git a/arch/avr32/boards/atstk1000/atstk1000.h b/arch/avr32/boards/atstk1000/atstk1000.h new file mode 100644 index 000..9a49ed0 --- /dev/null +++ b/arch/avr32/boards/atstk1000/atstk1000.h @@ -0,0 +1,15 @@ +/* + * ATSTK1000 setup code: Daughterboard interface + * + * Copyright (C) 2007 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H +#define __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H + +extern struct atmel_lcdfb_info atstk1000_lcdc_data; + +#endif /* __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H */ diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index abe6ca2..fe1dbe2 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c @@ -16,6 +16,8 @@ #include #include +#include + #include #include #include @@ -23,6 +25,7 @@ #include #include +#include "atstk1000.h" #defineSW2_DEFAULT /* MMCI and UART_A available */ @@ -31,9 +34,7 @@ struct eth_addr { }; static struct eth_addr __initdata hw_addr[2]; - static struct eth_platform_data __initdata eth_data[2]; -static struct lcdc_platform_data atstk1000_fb0_data; static struct spi_board_info spi0_board_info[] __initdata = { { @@ -148,9 +149,8 @@ static int __init atstk1002_init(void) set_hw_addr(at32_add_device_eth(0, ð_data[0])); at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); - atstk1000_fb0_data.fbmem_start = fbmem_start; - atstk1000_fb0_data.fbmem_size = fbmem_size; - at32_add_device_lcdc(0, &atstk1000_fb0_data); + at32_add_device_lcdc(0, &atstk1000_lcdc_data, +fbmem_start, fbmem_size); return 0; } diff --git a/arch/avr32/boards/atstk1000/setup.c b/arch/avr32/boards/atstk1000/setup.c index 2bc4b88..c9af409 100644 --- a/arch/avr32/boards/atstk1000/setup.c +++ b/arch/avr32/boards/atstk1000/setup.c @@ -8,13 +8,56 @@ * published by the Free Software Foundation. */ #include +#include #include #include #include -#include +#include +#include #include +#include "atstk1000.h" + /* Initialized by bootloader-specific startup code. */ struct tag *bootloader_tags __initdata; + +static struct fb_videomode __initdata ltv350qv_modes[] = { + { + .name = "320x240 @ 75", + .refresh= 75, + .xres = 320, .yres = 240, + .pixclock = KHZ2PICOS(6891), + + .left_margin= 17, .right_margin = 33, + .upper_margin = 10, .lower_margin = 10, + .hsync_len = 16, .vsync_len = 1, + + .sync = 0, + .vmode = FB_VMODE_NONINTERLACED, + }, +}; + +static struct fb_monspecs __initdata atstk1000_default_monspecs = { + .manufacturer = "SNG", + .monitor= "LTV350QV", + .modedb = ltv350qv_modes, + .modedb_len = ARRAY_SIZE(ltv350qv_modes), + .hfmin = 14820, + .hfmax = 22230, + .vfmin = 60, + .vfmax = 90, + .dclkmax= 3000, +}; + +struct atmel_lcdfb_info __initdata atstk1000_lcdc_data = { + .default_bpp= 24, + .default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN, + .default_lcdcon2= (ATMEL_LCDC_DISTYPE_TFT + | ATMEL_LCDC_INVCLK + | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE +
[ALSA] usb-audio: another Logitech QuickCam ID
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d417045e7deeb37d97793805fe302da7b4f82eec Commit: d417045e7deeb37d97793805fe302da7b4f82eec Parent: 7b104bcb8e460e45a1aebe3da9b86aacdb4cab12 Author: Daniel Drake <[EMAIL PROTECTED]> AuthorDate: Thu May 10 08:52:19 2007 +0200 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Wed May 16 11:45:28 2007 +0200 [ALSA] usb-audio: another Logitech QuickCam ID This patch adds the ID for another quickcam microphone, reported by freqmod on ALSA ticket #0003040 I'm going to submit a USB patch separately to provide a macro to simplify these entries, as suggested by Alan Stern. We could switch to using that in future. Signed-off-by: Daniel Drake <[EMAIL PROTECTED]> Signed-off-by: Clemens Ladisch <[EMAIL PROTECTED]> Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- sound/usb/usbquirks.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index 8fcbe93..374fbf6 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h @@ -48,6 +48,15 @@ USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS, .idVendor = 0x046d, + .idProduct = 0x0850, + .bInterfaceClass = USB_CLASS_AUDIO, + .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL +}, +{ + .match_flags = USB_DEVICE_ID_MATCH_DEVICE | + USB_DEVICE_ID_MATCH_INT_CLASS | + USB_DEVICE_ID_MATCH_INT_SUBCLASS, + .idVendor = 0x046d, .idProduct = 0x08f0, .bInterfaceClass = USB_CLASS_AUDIO, .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[ALSA] hda-codec - Make the mixer capability check more robust
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b75e53f09212f12369156710e84d1cbf115113cd Commit: b75e53f09212f12369156710e84d1cbf115113cd Parent: d417045e7deeb37d97793805fe302da7b4f82eec Author: Takashi Iwai <[EMAIL PROTECTED]> AuthorDate: Thu May 10 16:56:09 2007 +0200 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Wed May 16 11:45:28 2007 +0200 [ALSA] hda-codec - Make the mixer capability check more robust In some cases, mixer elements return -EINVAL because it couldn't obtain proper amp_cap bits. The patch improves the robustness, trying the amp_cap query again in such a case. Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]> Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- sound/pci/hda/hda_codec.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 14649d5..8e89d56 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -707,7 +707,8 @@ static u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction) direction == HDA_OUTPUT ? AC_PAR_AMP_OUT_CAP : AC_PAR_AMP_IN_CAP); - info->status |= INFO_AMP_CAPS; + if (info->amp_caps) + info->status |= INFO_AMP_CAPS; } return info->amp_caps; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[ALSA] ASoC AC97 static GPL symbol fix
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ae67c7b870f5220a6b30e4f6e83b319bd9be718 Commit: 9ae67c7b870f5220a6b30e4f6e83b319bd9be718 Parent: b75e53f09212f12369156710e84d1cbf115113cd Author: Liam Girdwood <[EMAIL PROTECTED]> AuthorDate: Thu May 10 17:12:31 2007 +0200 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Wed May 16 11:45:28 2007 +0200 [ALSA] ASoC AC97 static GPL symbol fix This patch fixes a bug whereby the GPL'ed symbol ac97_dai was being declared as static. Signed-off-by: Liam Girdwood <[EMAIL PROTECTED]> Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]> Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- sound/soc/codecs/ac97.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index 0cdef97..f3b3b9e 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c @@ -43,7 +43,7 @@ static int ac97_prepare(struct snd_pcm_substream *substream) #define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) -static struct snd_soc_codec_dai ac97_dai = { +struct snd_soc_codec_dai ac97_dai = { .name = "AC97 HiFi", .playback = { .stream_name = "AC97 Playback", - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[ALSA] ASoC AC97 device reg bugfix
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a68660e0c63d8f7ab8725f9e771119c08e9f953b Commit: a68660e0c63d8f7ab8725f9e771119c08e9f953b Parent: 9ae67c7b870f5220a6b30e4f6e83b319bd9be718 Author: Liam Girdwood <[EMAIL PROTECTED]> AuthorDate: Thu May 10 19:27:27 2007 +0200 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Wed May 16 11:45:28 2007 +0200 [ALSA] ASoC AC97 device reg bugfix This patch fixes a bug whereby AC97 bus device data was being clobbered when AC97 codecs using the generic ac97_codec.c driver were being registered. Codecs that didn't use the generic driver were unaffected (e.g. WM9712, WM9713). Changes:- o Add new AC97 codec class for custom (or need bus dev registration) AC97 codecs. o Only register/deregister this custom codec device with the AC97 bus. The generic AC97 driver already does this for generic codec devices. This may be related to bug #3038 :- https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3038 Signed-off-by: Liam Girdwood <[EMAIL PROTECTED]> Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]> Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- include/sound/soc.h |4 +++- sound/soc/codecs/ac97.c |1 + sound/soc/codecs/wm9712.c |1 + sound/soc/soc-core.c | 18 +++--- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index b1dc364..db6edba 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -22,7 +22,7 @@ #include #include -#define SND_SOC_VERSION "0.13.0" +#define SND_SOC_VERSION "0.13.1" /* * Convenience kcontrol builders @@ -83,6 +83,7 @@ #define SND_SOC_DAI_AC97 0x1 #define SND_SOC_DAI_I2S0x2 #define SND_SOC_DAI_PCM0x4 +#define SND_SOC_DAI_AC97_BUS 0x8 /* for custom i.e. non ac97_codec.c */ /* * DAI hardware audio formats @@ -278,6 +279,7 @@ struct snd_soc_cpu_ops { struct snd_soc_codec_dai { char *name; int id; + unsigned char type; /* DAI capabilities */ struct snd_soc_pcm_stream playback; diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index f3b3b9e..0b8a6f8 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c @@ -45,6 +45,7 @@ static int ac97_prepare(struct snd_pcm_substream *substream) struct snd_soc_codec_dai ac97_dai = { .name = "AC97 HiFi", + .type = SND_SOC_DAI_AC97, .playback = { .stream_name = "AC97 Playback", .channels_min = 1, diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 264413a..986b5d5 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c @@ -544,6 +544,7 @@ static int ac97_aux_prepare(struct snd_pcm_substream *substream) struct snd_soc_codec_dai wm9712_dai[] = { { .name = "AC97 HiFi", + .type = SND_SOC_DAI_AC97_BUS, .playback = { .stream_name = "HiFi Playback", .channels_min = 1, diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 36519ae..92d5d91 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -116,6 +116,7 @@ static int soc_ac97_dev_register(struct snd_soc_codec *codec) static inline const char* get_dai_name(int type) { switch(type) { + case SND_SOC_DAI_AC97_BUS: case SND_SOC_DAI_AC97: return "AC97"; case SND_SOC_DAI_I2S: @@ -1099,7 +1100,8 @@ int snd_soc_register_card(struct snd_soc_device *socdev) continue; } } - if (socdev->machine->dai_link[i].cpu_dai->type == SND_SOC_DAI_AC97) + if (socdev->machine->dai_link[i].codec_dai->type == + SND_SOC_DAI_AC97_BUS) ac97 = 1; } snprintf(codec->card->shortname, sizeof(codec->card->shortname), @@ -1148,11 +1150,21 @@ EXPORT_SYMBOL_GPL(snd_soc_register_card); void snd_soc_free_pcms(struct snd_soc_device *socdev) { struct snd_soc_codec *codec = socdev->codec; +#ifdef CONFIG_SND_SOC_AC97_BUS + struct snd_soc_codec_dai *codec_dai; + int i; +#endif mutex_lock(&codec->mutex); #ifdef CONFIG_SND_SOC_AC97_BUS - if (codec->ac97) - soc_ac97_dev_unregister(codec); + for(i = 0; i < codec->num_dai; i++) { + codec_dai = &codec->dai[i]; + if (codec_dai->type == SND_SOC_DAI_AC97_BUS && codec->ac97) { + soc_ac97_dev_unregister(codec); + goto free_card; + } + } +free_card: #endif if (codec->card) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[ALSA] hda-codec - Fix ALC882/861VD codec support on some laptops
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=272a527c04c0c4f548232f1ec7d2d72bfdab4384 Commit: 272a527c04c0c4f548232f1ec7d2d72bfdab4384 Parent: a68660e0c63d8f7ab8725f9e771119c08e9f953b Author: Kailang Yang <[EMAIL PROTECTED]> AuthorDate: Mon May 14 11:00:38 2007 +0200 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Wed May 16 11:45:29 2007 +0200 [ALSA] hda-codec - Fix ALC882/861VD codec support on some laptops Fixed some platform no sound and Add JD Function for below platform list: Sony(0x104d) 0x9015, 0x900e, 0x1f00 Toshiba(0x1179) DALLAS 0xff00, 0xff01 Targa(0x1462) 0x28fb Asus(0x1043) A7J 0x060d Lenovo(0x17aa) 0x3bfd, 0x2085 MEDION(0x17c0) MD2 0x4071 Signed-off-by: Kailang Yang <[EMAIL PROTECTED]> Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]> Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- sound/pci/hda/patch_realtek.c | 532 +++-- 1 files changed, 515 insertions(+), 17 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a4ede27..34ac634 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -93,6 +93,7 @@ enum { ALC262_HP_BPC_D7000_WL, ALC262_HP_BPC_D7000_WF, ALC262_BENQ_ED8, + ALC262_SONY_ASSAMD, ALC262_AUTO, ALC262_MODEL_LAST /* last tag */ }; @@ -118,6 +119,7 @@ enum { ALC861VD_3ST_DIG, ALC861VD_6ST_DIG, ALC861VD_LENOVO, + ALC861VD_DALLAS, ALC861VD_AUTO, ALC861VD_MODEL_LAST, }; @@ -139,8 +141,10 @@ enum { ALC882_6ST_DIG, ALC882_ARIMA, ALC882_W2JC, - ALC882_AUTO, + ALC882_TARGA, + ALC882_ASUS_A7J, ALC885_MACPRO, + ALC882_AUTO, ALC882_MODEL_LAST, }; @@ -152,11 +156,13 @@ enum { ALC883_6ST_DIG, ALC883_TARGA_DIG, ALC883_TARGA_2ch_DIG, - ALC888_DEMO_BOARD, ALC883_ACER, ALC883_MEDION, + ALC883_MEDION_MD2, ALC883_LAPTOP_EAPD, ALC883_LENOVO_101E_2ch, + ALC883_LENOVO_NB0763, + ALC888_LENOVO_MS7195_DIG, ALC883_AUTO, ALC883_MODEL_LAST, }; @@ -4753,6 +4759,35 @@ static int alc882_mux_enum_put(struct snd_kcontrol *kcontrol, } /* + * 2ch mode + */ +static struct hda_verb alc882_3ST_ch2_init[] = { + { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, + { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, + { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, + { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, + { } /* end */ +}; + +/* + * 6ch mode + */ +static struct hda_verb alc882_3ST_ch6_init[] = { + { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, + { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, + { 0x18, AC_VERB_SET_CONNECT_SEL, 0x02 }, + { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, + { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, + { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, + { } /* end */ +}; + +static struct hda_channel_mode alc882_3ST_6ch_modes[2] = { + { 2, alc882_3ST_ch2_init }, + { 6, alc882_3ST_ch6_init }, +}; + +/* * 6ch mode */ static struct hda_verb alc882_sixstack_ch6_init[] = { @@ -4824,6 +4859,40 @@ static struct snd_kcontrol_new alc882_w2jc_mixer[] = { { } /* end */ }; +static struct snd_kcontrol_new alc882_targa_mixer[] = { + HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), + HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), + HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), + HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), + HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), + HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), + HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), + HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), + HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), + { } /* end */ +}; + +/* Pin assignment: Front=0x14, HP = 0x15, Front = 0x16, ??? + * Front Mic=0x18, Line In = 0x1a, Line In = 0x1b, CD = 0x1c + */ +static struct snd_kcontrol_new alc882_asus_a7j_mixer[] = { + HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Mobile Front Playback Switch", 0x16, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), + HDA_CODEC_MUTE("CD Playbac
[ALSA] version 1.0.14rc4
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=60af15f529d22a93805e74dd3c52b6f8134511d2 Commit: 60af15f529d22a93805e74dd3c52b6f8134511d2 Parent: 272a527c04c0c4f548232f1ec7d2d72bfdab4384 Author: Jaroslav Kysela <[EMAIL PROTECTED]> AuthorDate: Wed May 16 11:45:47 2007 +0200 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Wed May 16 11:45:47 2007 +0200 [ALSA] version 1.0.14rc4 Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- include/sound/version.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/sound/version.h b/include/sound/version.h index e820f0e..50ee4fd 100644 --- a/include/sound/version.h +++ b/include/sound/version.h @@ -1,3 +1,3 @@ /* include/version.h. Generated by alsa/ksync script. */ #define CONFIG_SND_VERSION "1.0.14rc4" -#define CONFIG_SND_DATE " (Wed May 09 09:51:39 2007 UTC)" +#define CONFIG_SND_DATE " (Wed May 16 09:45:46 2007 UTC)" - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[ALSA] Fix probe of non-PnP ISA devices
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=609d7694152f85734560ddc83be5e551b34d8c44 Commit: 609d7694152f85734560ddc83be5e551b34d8c44 Parent: 60af15f529d22a93805e74dd3c52b6f8134511d2 Author: Rene Herman <[EMAIL PROTECTED]> AuthorDate: Tue May 15 11:42:56 2007 +0200 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Wed May 16 12:22:44 2007 +0200 [ALSA] Fix probe of non-PnP ISA devices isa_register_driver() returns an error if no device is found and it's no fatal error for the drivers with pnp support. Signed-off-by: Rene Herman <[EMAIL PROTECTED]> Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]> Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- sound/isa/cmi8330.c | 15 +++ sound/isa/cs423x/cs4236.c | 20 ++-- sound/isa/es18xx.c | 19 +-- sound/isa/gus/interwave.c | 15 ++- sound/isa/opl3sa2.c | 15 +++ sound/isa/sb/sb16.c | 15 ++- sound/isa/sscape.c | 28 +++- sound/isa/wavefront/wavefront.c | 14 ++ 8 files changed, 94 insertions(+), 47 deletions(-) diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index 214d65d..f471f8a 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c @@ -109,6 +109,7 @@ module_param_array(wssdma, int, NULL, 0444); MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); #ifdef CONFIG_PNP +static int isa_registered; static int pnp_registered; #endif @@ -686,14 +687,18 @@ static int __init alsa_card_cmi8330_init(void) int err; err = isa_register_driver(&snd_cmi8330_driver, SNDRV_CARDS); - if (err < 0) - return err; #ifdef CONFIG_PNP + if (!err) + isa_registered = 1; + err = pnp_register_card_driver(&cmi8330_pnpc_driver); if (!err) pnp_registered = 1; + + if (isa_registered) + err = 0; #endif - return 0; + return err; } static void __exit alsa_card_cmi8330_exit(void) @@ -701,8 +706,10 @@ static void __exit alsa_card_cmi8330_exit(void) #ifdef CONFIG_PNP if (pnp_registered) pnp_unregister_card_driver(&cmi8330_pnpc_driver); + + if (isa_registered) #endif - isa_unregister_driver(&snd_cmi8330_driver); + isa_unregister_driver(&snd_cmi8330_driver); } module_init(alsa_card_cmi8330_init) diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index 87f1392..1a14f33 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c @@ -127,6 +127,7 @@ module_param_array(dma2, int, NULL, 0444); MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver."); #ifdef CONFIG_PNP +static int isa_registered; static int pnpc_registered; #ifdef CS4232 static int pnp_registered; @@ -770,9 +771,9 @@ static int __init alsa_card_cs423x_init(void) int err; err = isa_register_driver(&cs423x_isa_driver, SNDRV_CARDS); - if (err < 0) - return err; #ifdef CONFIG_PNP + if (!err) + isa_registered = 1; #ifdef CS4232 err = pnp_register_driver(&cs4232_pnp_driver); if (!err) @@ -781,8 +782,14 @@ static int __init alsa_card_cs423x_init(void) err = pnp_register_card_driver(&cs423x_pnpc_driver); if (!err) pnpc_registered = 1; -#endif /* CONFIG_PNP */ - return 0; +#ifdef CS4232 + if (pnp_registered) + err = 0; +#endif + if (isa_registered) + err = 0; +#endif + return err; } static void __exit alsa_card_cs423x_exit(void) @@ -794,8 +801,9 @@ static void __exit alsa_card_cs423x_exit(void) if (pnp_registered) pnp_unregister_driver(&cs4232_pnp_driver); #endif -#endif /* CONFIG_PNP */ - isa_unregister_driver(&cs423x_isa_driver); + if (isa_registered) +#endif + isa_unregister_driver(&cs423x_isa_driver); } module_init(alsa_card_cs423x_init) diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index d2a9c7d..f7732bf 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c @@ -2036,7 +2036,9 @@ module_param_array(dma2, int, NULL, 0444); MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver."); #ifdef CONFIG_PNP -static int pnp_registered, pnpc_registered; +static int isa_registered; +static int pnp_registered; +static int pnpc_registered; static struct pnp_device_id snd_audiodrive_pnpbiosids[] = { { .id = "ESS1869" }, @@ -2466,18 +2468,22 @@ static int __init alsa_card_es18xx_init(void) int err; err = isa_register_driver(&snd_es18xx_isa_driver, SNDRV_CARDS); - if (err < 0) - return err; - #ifdef CONFIG_PNP + if (!err) + isa_registered = 1; + err = pnp_register_driver(&es18xx_pnp_driver); if (!err)
[ALSA] Include quirks from Ubuntu Dapper/Edgy/Feisty
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8286c53e54b8b1b9489b4dd5d2d3a4f94b8c012e Commit: 8286c53e54b8b1b9489b4dd5d2d3a4f94b8c012e Parent: 609d7694152f85734560ddc83be5e551b34d8c44 Author: Daniel T Chen <[EMAIL PROTECTED]> AuthorDate: Tue May 15 11:46:23 2007 +0200 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Wed May 16 12:23:03 2007 +0200 [ALSA] Include quirks from Ubuntu Dapper/Edgy/Feisty Included is a patch against current alsa-kernel hg tip adding quirks that Ubuntu Dapper/Edgy/Feisty contains. Signed-off-by: Daniel T Chen <[EMAIL PROTECTED]> Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]> Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- sound/pci/ac97/ac97_patch.c|5 + sound/pci/hda/patch_sigmatel.c |2 ++ sound/pci/intel8x0.c | 20 +++- 3 files changed, 26 insertions(+), 1 deletions(-) diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 3eac0f8..581ebba 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -1782,6 +1782,11 @@ static unsigned int ad1981_jacks_blacklist[] = { 0x10140534, /* Thinkpad X31 */ 0x10140537, /* Thinkpad T41p */ 0x10140554, /* Thinkpad T42p/R50p */ + 0x10140567, /* Thinkpad T43p 2668-G7U */ + 0x10140581, /* Thinkpad X41-2527 */ + 0x104380b0, /* Asus A7V8X-MX */ + 0x11790241, /* Toshiba Satellite A-15 S127 */ + 0x144dc01a, /* Samsung NP-X20C004/SEG */ 0 /* end */ }; diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 93ae9c2..a6a0a80 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -467,6 +467,8 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = { "Dell XPS M1710", STAC_REF), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cf, "Dell Precision M90", STAC_REF), + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d6, + "unknown Dell", STAC_REF), {} /* terminator */ }; diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 202f720..da97340 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -1799,6 +1799,18 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { }, { .subvendor = 0x1028, + .subdevice = 0x0186, + .name = "Dell Latitude D810", /* cf. Malone #41015 */ + .type = AC97_TUNE_HP_MUTE_LED + }, + { + .subvendor = 0x1028, + .subdevice = 0x0188, + .name = "Dell Inspiron 6000", + .type = AC97_TUNE_HP_MUTE_LED /* cf. Malone #41015 */ + }, + { + .subvendor = 0x1028, .subdevice = 0x0191, .name = "Dell Inspiron 8600", .type = AC97_TUNE_HP_ONLY @@ -1819,7 +1831,7 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { .subvendor = 0x103c, .subdevice = 0x088c, .name = "HP nc8000", - .type = AC97_TUNE_MUTE_LED + .type = AC97_TUNE_HP_MUTE_LED }, { .subvendor = 0x103c, @@ -1913,6 +1925,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { }, { .subvendor = 0x10cf, + .subdevice = 0x127e, + .name = "Fujitsu Lifebook C1211D", + .type = AC97_TUNE_HP_ONLY + }, + { + .subvendor = 0x10cf, .subdevice = 0x12ec, .name = "Fujitsu-Siemens 4010", .type = AC97_TUNE_HP_ONLY - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[ALSA] usbaudio - Coping with short replies in usbmixer
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a04395ead6d17c83da64264b6fe78f852a648202 Commit: a04395ead6d17c83da64264b6fe78f852a648202 Parent: 8286c53e54b8b1b9489b4dd5d2d3a4f94b8c012e Author: Thomas Reitmayr <[EMAIL PROTECTED]> AuthorDate: Tue May 15 11:47:48 2007 +0200 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Wed May 16 12:23:20 2007 +0200 [ALSA] usbaudio - Coping with short replies in usbmixer This patch makes sure that short USB replies are treated as an error when requesting the value of a certain mixer control. Signed-off-by: Thomas Reitmayr <[EMAIL PROTECTED]> Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]> Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- sound/usb/usbmixer.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 7b3bf35..325d4b6 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c @@ -360,7 +360,7 @@ static int get_ctl_value(struct usb_mixer_elem_info *cval, int request, int vali request, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN, validx, cval->mixer->ctrlif | (cval->id << 8), - buf, val_len, 100) >= 0) { + buf, val_len, 100) >= val_len) { *value_ret = convert_signed_value(cval, snd_usb_combine_bytes(buf, val_len)); return 0; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
pata_scc had been missed by ata_std_prereset() switch
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d1c68fa6ce7e56e300d8561bb3b6492c336df863 Commit: d1c68fa6ce7e56e300d8561bb3b6492c336df863 Parent: 7b104bcb8e460e45a1aebe3da9b86aacdb4cab12 Author: Al Viro <[EMAIL PROTECTED]> AuthorDate: Tue May 15 08:21:17 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Wed May 16 01:18:30 2007 -0400 pata_scc had been missed by ata_std_prereset() switch Signed-off-by: Al Viro <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/pata_scc.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index cca3aa2..844e53b 100644 --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c @@ -864,10 +864,10 @@ static void scc_bmdma_freeze (struct ata_port *ap) * @ap: ATA port to be reset */ -static int scc_pata_prereset (struct ata_port *ap) +static int scc_pata_prereset (struct ata_port *ap, unsigned long deadline) { ap->cbl = ATA_CBL_PATA80; - return ata_std_prereset(ap); + return ata_std_prereset(ap, deadline); } /** - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libata: separate out ata_dev_reread_id()
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fe30911b34098db58c21d0f936f6c3f17f32deb8 Commit: fe30911b34098db58c21d0f936f6c3f17f32deb8 Parent: d1c68fa6ce7e56e300d8561bb3b6492c336df863 Author: Tejun Heo <[EMAIL PROTECTED]> AuthorDate: Tue May 15 03:28:15 2007 +0900 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Wed May 16 01:18:30 2007 -0400 libata: separate out ata_dev_reread_id() Separate out ata_dev_reread_id() from ata_dev_revalidate(). ata_dev_reread_id() reads IDENTIFY page and determines whether the same device is still there. ata_dev_revalidate() reconfigures after reread completes. This will be used by ACPI update. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 47 drivers/ata/libata.h |3 +- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 4166407..6f266c8 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3675,8 +3675,8 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, } /** - * ata_dev_revalidate - Revalidate ATA device - * @dev: device to revalidate + * ata_dev_reread_id - Re-read IDENTIFY data + * @adev: target ATA device * @readid_flags: read ID flags * * Re-read IDENTIFY page and make sure @dev is still attached to @@ -3688,29 +3688,50 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, * RETURNS: * 0 on success, negative errno otherwise */ -int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags) +int ata_dev_reread_id(struct ata_device *dev, unsigned int readid_flags) { unsigned int class = dev->class; u16 *id = (void *)dev->ap->sector_buf; int rc; - if (!ata_dev_enabled(dev)) { - rc = -ENODEV; - goto fail; - } - /* read ID data */ rc = ata_dev_read_id(dev, &class, readid_flags, id); if (rc) - goto fail; + return rc; /* is the device still there? */ - if (!ata_dev_same_device(dev, class, id)) { - rc = -ENODEV; - goto fail; - } + if (!ata_dev_same_device(dev, class, id)) + return -ENODEV; memcpy(dev->id, id, sizeof(id[0]) * ATA_ID_WORDS); + return 0; +} + +/** + * ata_dev_revalidate - Revalidate ATA device + * @dev: device to revalidate + * @readid_flags: read ID flags + * + * Re-read IDENTIFY page, make sure @dev is still attached to the + * port and reconfigure it according to the new IDENTIFY page. + * + * LOCKING: + * Kernel thread context (may sleep) + * + * RETURNS: + * 0 on success, negative errno otherwise + */ +int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags) +{ + int rc; + + if (!ata_dev_enabled(dev)) + return -ENODEV; + + /* re-read ID */ + rc = ata_dev_reread_id(dev, readid_flags); + if (rc) + goto fail; /* configure device according to the new ID */ rc = ata_dev_configure(dev); diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 8b71b73..13cb0c9 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h @@ -76,7 +76,8 @@ extern unsigned ata_exec_internal_sg(struct ata_device *dev, extern unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd); extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, unsigned int flags, u16 *id); -extern int ata_dev_revalidate(struct ata_device *dev, unsigned int flags); +extern int ata_dev_reread_id(struct ata_device *dev, unsigned int readid_flags); +extern int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags); extern int ata_dev_configure(struct ata_device *dev); extern int sata_down_spd_limit(struct ata_port *ap); extern int sata_set_spd_needed(struct ata_port *ap); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libata: during revalidation, check n_sectors after device is configured
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6ddcd3b0201a7ad72294347636d2b4028ddbd95d Commit: 6ddcd3b0201a7ad72294347636d2b4028ddbd95d Parent: fe30911b34098db58c21d0f936f6c3f17f32deb8 Author: Tejun Heo <[EMAIL PROTECTED]> AuthorDate: Tue May 15 03:28:15 2007 +0900 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Wed May 16 01:18:30 2007 -0400 libata: during revalidation, check n_sectors after device is configured Device might be resized during ata_dev_configure() due to HPA or (later) ACPI _GTF. Currently it's worked around by caching n_sectors before turning off HPA. The cached original size is overwritten if the device is reconfigured without being hardreset - which always happens after configuring trasnfer mode. If the device gets hardreset for some reason after that, revalidation fails with -ENODEV. This patch makes size checking more robust by moving n_sectors check from ata_dev_reread_id() to ata_dev_revalidate() after the device is fully configured. No matter what happens during configuration, a device must have the same n_sectors after fully configured to be treated as the same device. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 33 +++-- include/linux/libata.h|1 - 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 6f266c8..d5939e6 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -1919,7 +1919,6 @@ int ata_dev_configure(struct ata_device *dev) snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id)); dev->n_sectors = ata_id_n_sectors(id); - dev->n_sectors_boot = dev->n_sectors; /* SCSI only uses 4-char revisions, dump full 8 chars from ATA */ ata_id_c_string(dev->id, fwrevbuf, ATA_ID_FW_REV, @@ -3632,7 +3631,6 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, const u16 *old_id = dev->id; unsigned char model[2][ATA_ID_PROD_LEN + 1]; unsigned char serial[2][ATA_ID_SERNO_LEN + 1]; - u64 new_n_sectors; if (dev->class != new_class) { ata_dev_printk(dev, KERN_INFO, "class mismatch %d != %d\n", @@ -3644,7 +3642,6 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, ata_id_c_string(new_id, model[1], ATA_ID_PROD, sizeof(model[1])); ata_id_c_string(old_id, serial[0], ATA_ID_SERNO, sizeof(serial[0])); ata_id_c_string(new_id, serial[1], ATA_ID_SERNO, sizeof(serial[1])); - new_n_sectors = ata_id_n_sectors(new_id); if (strcmp(model[0], model[1])) { ata_dev_printk(dev, KERN_INFO, "model number mismatch " @@ -3658,19 +3655,6 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, return 0; } - if (dev->class == ATA_DEV_ATA && dev->n_sectors != new_n_sectors) { - ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch " - "%llu != %llu\n", - (unsigned long long)dev->n_sectors, - (unsigned long long)new_n_sectors); - /* Are we the boot time size - if so we appear to be the - same disk at this point and our HPA got reapplied */ - if (ata_ignore_hpa && dev->n_sectors_boot == new_n_sectors - && ata_id_hpa_enabled(new_id)) - return 1; - return 0; - } - return 1; } @@ -3723,6 +3707,7 @@ int ata_dev_reread_id(struct ata_device *dev, unsigned int readid_flags) */ int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags) { + u64 n_sectors = dev->n_sectors; int rc; if (!ata_dev_enabled(dev)) @@ -3735,8 +3720,20 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags) /* configure device according to the new ID */ rc = ata_dev_configure(dev); - if (rc == 0) - return 0; + if (rc) + goto fail; + + /* verify n_sectors hasn't changed */ + if (dev->class == ATA_DEV_ATA && dev->n_sectors != n_sectors) { + ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch " + "%llu != %llu\n", + (unsigned long long)n_sectors, + (unsigned long long)dev->n_sectors); + rc = -ENODEV; + goto fail; + } + + return 0; fail: ata_dev_printk(dev, KERN_ERR, "revalidation failed (errno=%d)\n", rc); diff --git a/include/linux/libata.h b/include/linux/libata.h index 27d9362..b38a0f9 100644 --- a/
libata-acpi: add ATA_FLAG_ACPI_SATA port flag
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3cadbcc09891b8544203f211dac13f9cc4e6832a Commit: 3cadbcc09891b8544203f211dac13f9cc4e6832a Parent: 6ddcd3b0201a7ad72294347636d2b4028ddbd95d Author: Tejun Heo <[EMAIL PROTECTED]> AuthorDate: Tue May 15 03:28:15 2007 +0900 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Wed May 16 01:18:31 2007 -0400 libata-acpi: add ATA_FLAG_ACPI_SATA port flag Whether a controller needs IDE or SATA ACPI hierarchy is determined by the programming interface of the controller not by whether the controller is SATA or PATA, or it supports slave device or not. This patch adds ATA_FLAG_ACPI_SATA port flags which tells libata-acpi that the port needs SATA ACPI nodes, and sets the flag for ahci and sata_sil24. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/ahci.c|3 ++- drivers/ata/libata-acpi.c | 10 +- drivers/ata/sata_sil24.c |3 ++- include/linux/libata.h|1 + 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 1ae443d..e00e1b9 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -173,7 +173,8 @@ enum { AHCI_FLAG_COMMON= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | - ATA_FLAG_SKIP_D2H_BSY, + ATA_FLAG_SKIP_D2H_BSY | + ATA_FLAG_ACPI_SATA, }; struct ahci_cmd_hdr { diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index ed4138e..0223673 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -321,7 +321,7 @@ static int do_drive_get_GTF(struct ata_device *dev, unsigned int *gtf_length, /* Don't continue if device has no _ADR method. * _GTF is intended for known motherboard devices. */ - if (!(ap->cbl == ATA_CBL_SATA)) { + if (!(ap->flags & ATA_FLAG_ACPI_SATA)) { err = pata_get_dev_handle(gdev, &dev_handle, &pcidevfn); if (err < 0) { if (ata_msg_probe(ap)) @@ -343,7 +343,7 @@ static int do_drive_get_GTF(struct ata_device *dev, unsigned int *gtf_length, /* Get this drive's _ADR info. if not already known. */ if (!dev->obj_handle) { - if (!(ap->cbl == ATA_CBL_SATA)) { + if (!(ap->flags & ATA_FLAG_ACPI_SATA)) { /* get child objects of dev_handle == channel objects, * + _their_ children == drive objects */ /* channel is ap->port_no */ @@ -528,7 +528,7 @@ static int do_drive_set_taskfiles(struct ata_device *dev, ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER: port#: %d\n", __FUNCTION__, ap->port_no); - if (libata_noacpi || !(ap->cbl == ATA_CBL_SATA)) + if (libata_noacpi || !(ap->flags & ATA_FLAG_ACPI_SATA)) return 0; if (!ata_dev_enabled(dev) || (ap->flags & ATA_FLAG_DISABLED)) @@ -578,7 +578,7 @@ int ata_acpi_exec_tfs(struct ata_port *ap) * we should not run GTF on PATA devices since some * PATA require execution of GTM/STM before GTF. */ - if (!(ap->cbl == ATA_CBL_SATA)) + if (!(ap->flags & ATA_FLAG_ACPI_SATA)) return 0; for (ix = 0; ix < ATA_MAX_DEVICES; ix++) { @@ -641,7 +641,7 @@ int ata_acpi_push_id(struct ata_device *dev) __FUNCTION__, dev->devno, ap->port_no); /* Don't continue if not a SATA device. */ - if (!(ap->cbl == ATA_CBL_SATA)) { + if (!(ap->flags & ATA_FLAG_ACPI_SATA)) { if (ata_msg_probe(ap)) ata_dev_printk(dev, KERN_DEBUG, "%s: Not a SATA device\n", __FUNCTION__); diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index a69d78c..0cb6618 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c @@ -237,7 +237,8 @@ enum { /* host flags */ SIL24_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | - ATA_FLAG_NCQ | ATA_FLAG_SKIP_D2H_BSY, + ATA_FLAG_NCQ | ATA_FLAG_SKIP_D2H_BSY | + ATA_FLAG_ACPI_SATA, SIL24_FLAG_PCIX_IRQ_WOC = (1 << 24), /* IRQ loss errata on PCI-X */ IRQ_STAT_4PORTS = 0xf, diff --git a/include/linux/libata.h b/include/linux/libata.h index b38a0f9..9b2122d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -173,6 +173,7 @@ enum { ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ ATA_FLAG_IGN_
libata: fix shutdown warning message printing
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=da071b42f73dabbd0daf7ea4c3ff157d53b00648 Commit: da071b42f73dabbd0daf7ea4c3ff157d53b00648 Parent: 3cadbcc09891b8544203f211dac13f9cc4e6832a Author: Tejun Heo <[EMAIL PROTECTED]> AuthorDate: Mon May 14 17:26:18 2007 +0200 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Wed May 16 01:18:31 2007 -0400 libata: fix shutdown warning message printing Unlocking ap->lock and ssleeping don't work because SCSI commands can be issued from completion path without context. Reimplement delayed completion by allowing translation functions to override qc->scsidone(), storing the original completion function to scmd->scsi_done() and overriding qc->scsidone() with a function which schedules delayed invocation of scmd->scsi_done(). This isn't pretty at all but all the ugly parts are thankfully contained in the stop translation path where the compat feature is implemented. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/libata-scsi.c | 35 +++ 1 files changed, 27 insertions(+), 8 deletions(-) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index dd81fa7..07b5a3d 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -893,6 +893,23 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth) return queue_depth; } +/* XXX: for ata_spindown_compat */ +static void ata_delayed_done_timerfn(unsigned long arg) +{ + struct scsi_cmnd *scmd = (void *)arg; + + scmd->scsi_done(scmd); +} + +/* XXX: for ata_spindown_compat */ +static void ata_delayed_done(struct scsi_cmnd *scmd) +{ + static struct timer_list timer; + + setup_timer(&timer, ata_delayed_done_timerfn, (unsigned long)scmd); + mod_timer(&timer, jiffies + 5 * HZ); +} + /** * ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command * @qc: Storage for translated ATA taskfile @@ -952,19 +969,21 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc) if (ata_spindown_compat && (system_state == SYSTEM_HALT || system_state == SYSTEM_POWER_OFF)) { - static int warned = 0; + static unsigned long warned = 0; - if (!warned) { - spin_unlock_irq(qc->ap->lock); + if (!test_and_set_bit(0, &warned)) { ata_dev_printk(qc->dev, KERN_WARNING, "DISK MIGHT NOT BE SPUN DOWN PROPERLY. " "UPDATE SHUTDOWN UTILITY\n"); ata_dev_printk(qc->dev, KERN_WARNING, "For more info, visit " "http://linux-ata.org/shutdown.html\n";); - warned = 1; - ssleep(5); - spin_lock_irq(qc->ap->lock); + + /* ->scsi_done is not used, use it for +* delayed completion. +*/ + scmd->scsi_done = qc->scsidone; + qc->scsidone = ata_delayed_done; } scmd->result = SAM_STAT_GOOD; return 1; @@ -1488,14 +1507,14 @@ static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd, early_finish: ata_qc_free(qc); - done(cmd); + qc->scsidone(cmd); DPRINTK("EXIT - early finish (good or error)\n"); return 0; err_did: ata_qc_free(qc); cmd->result = (DID_ERROR << 16); - done(cmd); + qc->scsidone(cmd); err_mem: DPRINTK("EXIT - internal\n"); return 0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libata: track spindown status and skip spindown_compat if possible
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=13b8d09f5de0aaa3153bbccc98baf247387823dc Commit: 13b8d09f5de0aaa3153bbccc98baf247387823dc Parent: da071b42f73dabbd0daf7ea4c3ff157d53b00648 Author: Tejun Heo <[EMAIL PROTECTED]> AuthorDate: Tue May 15 12:29:22 2007 +0200 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Wed May 16 01:18:31 2007 -0400 libata: track spindown status and skip spindown_compat if possible Our assumption that most distros issue STANDBYNOW seems wrong. The upstream sysvinit and thus many distros including gentoo and opensuse don't take any action for libata disks on spindown. We can skip compat handling for these distros so that they don't need to update anything to take advantage of kernel-side shutdown. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/libata-scsi.c |9 + include/linux/libata.h|1 + 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 07b5a3d..b6a1de8 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -967,6 +967,7 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc) * for more info. */ if (ata_spindown_compat && + (qc->dev->flags & ATA_DFLAG_SPUNDOWN) && (system_state == SYSTEM_HALT || system_state == SYSTEM_POWER_OFF)) { static unsigned long warned = 0; @@ -1394,6 +1395,14 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) } } + /* XXX: track spindown state for spindown_compat */ + if (unlikely(qc->tf.command == ATA_CMD_STANDBY || +qc->tf.command == ATA_CMD_STANDBYNOW1)) + qc->dev->flags |= ATA_DFLAG_SPUNDOWN; + else if (likely(system_state != SYSTEM_HALT && + system_state != SYSTEM_POWER_OFF)) + qc->dev->flags &= ~ATA_DFLAG_SPUNDOWN; + if (need_sense && !ap->ops->error_handler) ata_dump_status(ap->print_id, &qc->result_tf); diff --git a/include/linux/libata.h b/include/linux/libata.h index 9b2122d..666592e 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -140,6 +140,7 @@ enum { ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ ATA_DFLAG_NCQ_OFF = (1 << 9), /* device limited to non-NCQ mode */ + ATA_DFLAG_SPUNDOWN = (1 << 10), /* XXX: for spindown_compat */ ATA_DFLAG_INIT_MASK = (1 << 16) - 1, ATA_DFLAG_DETACH= (1 << 16), - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html