Linux 2.6.25.15
Subsystems (22)
We (the -stable team) are announcing the release of the 2.6.25.15 kernel.
It contains lots of bugfixes, all over the map. Any users of the 2.6.25 kernel series should upgrade to this version. For details on the fixes, see the changelog entries and the diffstat below.
I'll also be replying to this message with a copy of the patch between 2.6.25.14 and 2.6.25.15
The updated 2.6.25.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.25.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.25.y.git;a=summarythanks,
greg k-h
-------------
Makefile | 2 arch/powerpc/kernel/ppc32.h | 2 arch/powerpc/kernel/ptrace32.c | 27 ++++++++++ arch/x86/mm/ioremap.c | 5 + drivers/acpi/bay.c | 16 +++-- drivers/acpi/thermal.c | 16 +++++ drivers/input/mouse/appletouch.c | 49 +++++++++++++++--- drivers/input/serio/i8042-x86ia64io.h | 57 +++++++++++++++++---- drivers/input/serio/i8042.c | 8 ++ drivers/net/wireless/ath5k/base.c | 4 + drivers/pci/quirks.c | 1 drivers/ps3/ps3-lpm.c | 1 drivers/scsi/megaraid/megaraid_mbox.c | 17 ++++++ drivers/scsi/megaraid/megaraid_mbox.h | 1 drivers/usb/core/quirks.c | 3 + drivers/usb/host/ehci-hub.c | 6 +- drivers/usb/host/ehci.h | 2 fs/fat/inode.c | 2 fs/jbd/commit.c | 19 +------ fs/jbd/transaction.c | 91 ++++++++++++++++++++++++++++++++-- fs/namei.c | 31 +++++++++-- fs/nfs/inode.c | 4 - fs/nfs/internal.h | 1 fs/nfs/nfs3acl.c | 9 ++- fs/nfs/nfs4proc.c | 6 +- fs/partitions/msdos.c | 20 ++++++- fs/romfs/inode.c | 37 ++++++++----- include/linux/msdos_fs.h | 6 +- include/sound/ac97_codec.h | 1 include/sound/emu10k1.h | 1 mm/filemap.c | 3 - net/bluetooth/bnep/core.c | 5 + net/bluetooth/hidp/core.c | 10 +++ sound/core/init.c | 36 +++++-------- sound/core/oss/mixer_oss.c | 2 sound/core/seq/oss/seq_oss_synth.c | 3 + sound/pci/ac97/ac97_patch.c | 48 ++++++++++++----- sound/pci/emu10k1/emu10k1_main.c | 1 sound/pci/emu10k1/emumixer.c | 13 +++- sound/pci/hda/patch_analog.c | 33 ++++++++---- sound/usb/usbaudio.c | 35 +++++++++---- sound/usb/usbquirks.h | 75 ++++++++++++++-------------- 42 files changed, 524 insertions(+), 185 deletions(-)
Al Viro (1):
return to old errno choice in mkdir() et.al.
Alan Stern (1):
USB: EHCI: fix remote-wakeup regression
Andreas Schwab (1):
Add compat handler for PTRACE_GETSIGINFO
Andrew Morton (1):
FAT_VALID_MEDIA(): remove pointless test
Arjan van de Ven (1):
ACPI: Reject below-freezing temperatures as invalid critical temperatures
FUJITA Tomonori (1):
POWERPC: PS3: Add time include to lpm
Frank Seidel (1):
fat: detect media without partition table correctly
Greg Kroah-Hartman (1):
Linux 2.6.25.15
Hannes Reinecke (1):
SCSI: megaraid_mbox: fix Dell CERC firmware problem
Holger Macht (1):
bay: exit if notify handler cannot be installed
Ingo Molnar (1):
x86: ioremap of 64-bit resource on 32-bit kernel fix
Jiri Kosina (6):
Input: i8042 - retry failed CTR writes when resuming
Input: i8042 - add Intel D845PESV to nopnp list
Input: i8042 - add Gericom Bellagio to nomux blacklist
Input: i8042 - add Fujitsu-Siemens Amilo Pro V2030 to nomux table
Input: i8042 - add Fujitsu-Siemens Amilo Pro 2010 to nomux list
Input: i8042 - add Acer Aspire 1360 to nomux blacklist
Josef Bacik (2):
jbd: fix the way the b_modified flag is cleared
jbd: fix possible journal overflow issues
Linus Torvalds (1):
romfs_readpage: don't report errors for pages beyond i_size
Luis R. Rodriguez (1):
ath5k: Use software encryption for now
Marcel Holtmann (1):
Bluetooth: Signal user-space for HIDP and BNEP socket errors
Miklos Szeredi (1):
vfs: fix lookup on deleted directory
Mingming Cao (1):
jbd: fix race between free buffer and commit transaction
Oliver Neukum (1):
Input: appletouch - implement reset-resume logic
Takashi Iwai (6):
ALSA: ac97 - Fix ASUS A9T laptop output
ALSA: Add more fallbacks to OSS PHONEOUT mixer map
ALSA: emu10k1 - Fix inverted Analog/Digital mixer switch on Audigy2
ALSA: Fix Oops with usb-audio reconnection
ALSA: hda - Add missing Thinkpad Z60m support
ALSA: hda - Fix wrong volumes in AD1988 auto-probe mode
Tejun Heo (1):
pci: VT3336 can't do MSI either
Trond Myklebust (1):
NFS: Ensure we zap only the access and acl caches when setting new acls
Willy Tarreau (1):
sound: ensure device number is valid in snd_seq_oss_synth_make_info
Zhang, Rui (1):
ACPI: update thermal temperature
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 25 -EXTRAVERSION = .14 +EXTRAVERSION = .15 NAME = Funky Weasel is Jiggy wit it # *DOCUMENTATION*
arch/powerpc/kernel/ppc32.h +2 -0
@@ -135,4 +135,6 @@ struct ucontext32 { struct mcontext32 uc_mcontext; }; +extern int copy_siginfo_to_user32 (struct compat_siginfo __user *d,siginfo_t *s); +#endif /* _PPC64_PPC32_H */
arch/powerpc/kernel/ptrace32.c +27 -0
@@ -29,12 +29,15 @@#include <linux/security.h> #include <linux/signal.h> #include <linux/compat.h> +#include <linux/elf.h> #include <asm/uaccess.h> #include <asm/page.h> #include <asm/pgtable.h> #include <asm/system.h> +#include "ppc32.h" +/* * does not yet catch signals sent when the child dies. * in exit.c or in signal.c.
@@ -64,6 +67,27 @@ static long compat_ptrace_old(struct task_struct *child, long request,return -EPERM ; } +static int compat_ptrace_getsiginfo (struct task_struct *child,compat_siginfo_t __user *data) +{ +siginfo_t lastinfo; +int error = -ESRCH ; + +read_lock (&tasklist_lock); +if (likely (child->sighand !=NULL )) { + error = -EINVAL ; +spin_lock_irq (&child->sighand->siglock); +if (likely (child->last_siginfo !=NULL )) { + lastinfo = *child->last_siginfo; + error =0 ; + } +spin_unlock_irq (&child->sighand->siglock); + } +read_unlock (&tasklist_lock); +if (!error) +return copy_siginfo_to_user32 (data, &lastinfo); +return error; +} +long compat_arch_ptrace (struct task_struct *child,compat_long_t request,compat_ulong_t caddr,compat_ulong_t cdata) {
@@ -282,6 +306,9 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,0 ,PT_REGS_COUNT *sizeof (compat_long_t), compat_ptr(data)); +case PTRACE_GETSIGINFO : +return compat_ptrace_getsiginfo (child,compat_ptr (data)); +case PTRACE_GETFPREGS :case PTRACE_SETFPREGS :case PTRACE_GETVRREGS :
arch/x86/mm/ioremap.c +3 -2
@@ -39,7 +39,7 @@ EXPORT_SYMBOL(__phys_addr);int page_is_ram (unsigned long pagenr) { -unsigned long addr, end; +resource_size_t addr, end;int i;/*
@@ -109,7 +109,8 @@ static int ioremap_change_attr(unsigned long vaddr, unsigned long size,static void __iomem *__ioremap (resource_size_t phys_addr,unsigned long size,enum ioremap_mode mode) { -unsigned long pfn, offset, last_addr, vaddr; +unsigned long pfn, offset, vaddr; +resource_size_t last_addr;struct vm_struct *area;pgprot_t prot;
drivers/acpi/bay.c +10 -6
@@ -299,16 +299,20 @@ static int bay_add(acpi_handle handle, int id)*/ pdev->dev.uevent_suppress =0 ; -if (acpi_bay_add_fs (new_bay)) { -platform_device_unregister (new_bay->pdev); - goto bay_add_err; - } -/* register for events on this device */ status =acpi_install_notify_handler (handle,ACPI_SYSTEM_NOTIFY , bay_notify, new_bay);if (ACPI_FAILURE (status)) { - printk(KERN_ERR PREFIX "Error installing bay notify handler\n"); + printk(KERN_INFO PREFIX "Error installing bay notify handler\n"); +platform_device_unregister (new_bay->pdev); + goto bay_add_err; + } + +if (acpi_bay_add_fs (new_bay)) { +acpi_remove_notify_handler (handle,ACPI_SYSTEM_NOTIFY , + bay_notify); +platform_device_unregister (new_bay->pdev); + goto bay_add_err; }/* if we are on a dock station, we should register for dock
drivers/acpi/thermal.c +14 -2
@@ -359,10 +359,17 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)if (flag &ACPI_TRIPS_CRITICAL ) { status =acpi_evaluate_integer (tz->device->handle,"_CRT" ,NULL , &tz->trips.critical.temperature); -if (ACPI_FAILURE (status)) { +/* +* Treat freezing temperatures as invalid as well; some +* BIOSes return really low values and cause reboots at startup. +* Below zero (Celcius) values clearly aren't right for sure.. +* ... so lets discard those as invalid. +*/ +if (ACPI_FAILURE (status) || + tz->trips.critical.temperature <=2732 ) { tz->trips.critical.flags.valid =0 ;ACPI_EXCEPTION ((AE_INFO , status, -"No critical threshold" )); +"No or invalid critical threshold" ));return -ENODEV ; }else { tz->trips.critical.flags.valid =1 ;
@@ -884,10 +891,15 @@ static void acpi_thermal_check(void *data)static int thermal_get_temp (struct thermal_zone_device *thermal,char *buf) {struct acpi_thermal *tz = thermal->devdata; +int result;if (!tz)return -EINVAL ; + result =acpi_thermal_get_temperature (tz); +if (result) +return result; +return sprintf (buf,"%ld\n" ,KELVIN_TO_MILLICELSIUS (tz->temperature)); }
drivers/input/mouse/appletouch.c +41 -8
85 lines not on this page · raw message
drivers/input/serio/i8042-x86ia64io.h +46 -11
104 lines not on this page · raw message
drivers/input/serio/i8042.c +6 -2
@@ -938,8 +938,12 @@ static int i8042_resume(struct platform_device *dev) i8042_ctr |=I8042_CTR_AUXDIS |I8042_CTR_KBDDIS ; i8042_ctr &= ~(I8042_CTR_AUXINT |I8042_CTR_KBDINT );if (i8042_command (&i8042_ctr,I8042_CMD_CTL_WCTR )) { -printk (KERN_ERR "i8042: Can't write CTR to resume\n" ); -return -EIO ; +printk (KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n" ); +msleep (50 ); +if (i8042_command (&i8042_ctr,I8042_CMD_CTL_WCTR )) { +printk (KERN_ERR "i8042: CTR write retry failed\n" ); +return -EIO ; + } }if (i8042_mux_present) {
drivers/net/wireless/ath5k/base.c +3 -1
@@ -2864,7 +2864,9 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,switch (key->alg) {case ALG_WEP : -break ; +/* XXX: fix hardware encryption, its not working. For now +* allow software encryption */ +/* break; */ case ALG_TKIP :case ALG_CCMP :return -EOPNOTSUPP ;
drivers/pci/quirks.c +1 -0
@@ -1675,6 +1675,7 @@ static void __init quirk_disable_all_msi(struct pci_dev *dev)DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_SERVERWORKS ,PCI_DEVICE_ID_SERVERWORKS_GCNB_LE , quirk_disable_all_msi);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,PCI_DEVICE_ID_ATI_RS400_200 , quirk_disable_all_msi);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,PCI_DEVICE_ID_ATI_RS480 , quirk_disable_all_msi); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_VT3336 , quirk_disable_all_msi);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_VT3351 , quirk_disable_all_msi);/* Disable MSI on chipsets that are known to not support it */
drivers/ps3/ps3-lpm.c +1 -0
@@ -22,6 +22,7 @@#include <linux/module.h> #include <linux/interrupt.h> #include <linux/uaccess.h> +#include <asm/time.h> #include <asm/ps3.h> #include <asm/lv1call.h> #include <asm/cell-pmu.h>
drivers/scsi/megaraid/megaraid_mbox.c +17 -0
@@ -3168,6 +3168,23 @@ megaraid_mbox_support_random_del(adapter_t *adapter)uint8_t raw_mbox[sizeof (mbox_t)];int rval; +/* +* Newer firmware on Dell CERC expect a different +* random deletion handling, so disable it. +*/ +if (adapter->pdev->vendor ==PCI_VENDOR_ID_AMI && + adapter->pdev->device ==PCI_DEVICE_ID_AMI_MEGARAID3 && + adapter->pdev->subsystem_vendor ==PCI_VENDOR_ID_DELL && + adapter->pdev->subsystem_device ==PCI_SUBSYS_ID_CERC_ATA100_4CH && + (adapter->fw_version[0 ] >'6' || + (adapter->fw_version[0 ] =='6' && + adapter->fw_version[2 ] >'6' ) || + (adapter->fw_version[0 ] =='6' + && adapter->fw_version[2 ] =='6' + && adapter->fw_version[3 ] >'1' ))) { +con_log (CL_DLEVEL1 , ("megaraid: disable random deletion\n" )); +return 0 ; + } mbox = (mbox_t *)raw_mbox;
drivers/scsi/megaraid/megaraid_mbox.h +1 -0
@@ -88,6 +88,7 @@#define PCI_SUBSYS_ID_PERC3_QC 0x0471#define PCI_SUBSYS_ID_PERC3_DC 0x0493#define PCI_SUBSYS_ID_PERC3_SC 0x0475 +#define PCI_SUBSYS_ID_CERC_ATA100_4CH 0x0511#define MBOX_MAX_SCSI_CMDS 128 // number of cmds reserved for kernel
drivers/usb/core/quirks.c +3 -0
@@ -47,6 +47,9 @@ static const struct usb_device_id usb_quirk_list[] = {/* Edirol SD-20 */ { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, + /* appletouch */ + { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, + /* M-Systems Flash Disk Pioneers */ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
drivers/usb/host/ehci-hub.c +4 -2
@@ -621,7 +621,7 @@ static int ehci_hub_control ( }break ;case USB_PORT_FEAT_C_SUSPEND : -/* we auto-clear this feature */ +clear_bit (wIndex, &ehci->port_c_suspend);break ;case USB_PORT_FEAT_POWER :if (HCS_PPC (ehci->hcs_params))
@@ -700,7 +700,7 @@ static int ehci_hub_control (/* resume completed? */ else if (time_after_eq(jiffies, ehci->reset_done[wIndex])) { - status |=1 <<USB_PORT_FEAT_C_SUSPEND ; +set_bit (wIndex, &ehci->port_c_suspend); ehci->reset_done[wIndex] =0 ;/* stop resume signaling */
@@ -777,6 +777,8 @@ static int ehci_hub_control ( status |=1 <<USB_PORT_FEAT_RESET ;if (temp &PORT_POWER ) status |=1 <<USB_PORT_FEAT_POWER ; +if (test_bit (wIndex, &ehci->port_c_suspend)) + status |=1 <<USB_PORT_FEAT_C_SUSPEND ;#ifndef EHCI_VERBOSE_DEBUG if (status & ~0xffff )/* only if wPortChange is interesting */
drivers/usb/host/ehci.h +2 -0
@@ -97,6 +97,8 @@ struct ehci_hcd { /* one per controller */dedicated to the companion controller */ unsigned long owned_ports;/* which ports are owned by the companion during a bus suspend */ +unsigned long port_c_suspend;/* which ports have +the change-suspend feature turned on */ /* per-HC memory pools (could be per-bus, but ...) */ struct dma_pool *qh_pool;/* qh per active urb */
fs/fat/inode.c +1 -1
@@ -1208,7 +1208,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,*/ media = b->media; -if (!FAT_VALID_MEDIA (media)) { +if (!fat_valid_media (media)) {if (!silent)printk (KERN_ERR "FAT: invalid media value (0x%02x)\n" , media);
fs/jbd/commit.c +3 -16
@@ -407,22 +407,6 @@ void journal_commit_transaction(journal_t *journal)jbd_debug (3 ,"JBD: commit phase 2\n" );/* -* First, drop modified flag: all accesses to the buffers -* will be tracked for a new trasaction only -bzzz -*/ -spin_lock (&journal->j_list_lock); -if (commit_transaction->t_buffers) { - new_jh = jh = commit_transaction->t_buffers->b_tnext; -do { -J_ASSERT_JH (new_jh, new_jh->b_modified ==1 || - new_jh->b_modified ==0 ); - new_jh->b_modified =0 ; - new_jh = new_jh->b_tnext; - }while (new_jh != jh); - } -spin_unlock (&journal->j_list_lock); - -/* * Now start flushing things to disk, in the order they appear * on the transaction lists. Data blocks go first. */
@@ -488,6 +472,9 @@ void journal_commit_transaction(journal_t *journal)*/ commit_transaction->t_state =T_COMMIT ; +J_ASSERT (commit_transaction->t_nr_buffers <= + commit_transaction->t_outstanding_credits); + descriptor =NULL ; bufs =0 ;while (commit_transaction->t_buffers) {
fs/jbd/transaction.c +86 -5
162 lines not on this page · raw message
fs/namei.c +25 -6
@@ -514,7 +514,14 @@ static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, s*/ result =d_lookup (parent, name);if (!result) { -struct dentry * dentry =d_alloc (parent, name); +struct dentry *dentry; + +/* Don't create child dentry for a dead directory. */ + result =ERR_PTR (-ENOENT ); +if (IS_DEADDIR (dir)) + goto out_unlock; + + dentry =d_alloc (parent, name); result =ERR_PTR (-ENOMEM );if (dentry) { result = dir->i_op->lookup (dir, dentry, nd);
@@ -523,6 +530,7 @@ static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, selse result = dentry; } +out_unlock:mutex_unlock (&dir->i_mutex);return result; }
@@ -1313,7 +1321,14 @@ static struct dentry *__lookup_hash(struct qstr *name, dentry =cached_lookup (base, name, nd);if (!dentry) { -struct dentry *new =d_alloc (base, name); +struct dentry *new; + +/* Don't create child dentry for a dead directory. */ + dentry =ERR_PTR (-ENOENT ); +if (IS_DEADDIR (inode)) + goto out; + + new =d_alloc (base, name); dentry =ERR_PTR (-ENOMEM );if (!new) goto out;
@@ -1904,18 +1919,22 @@ struct dentry *lookup_create(struct nameidata *nd, int is_dir)if (IS_ERR (dentry)) goto fail; +if (dentry->d_inode) + goto eexist;/* * Special case - lookup gave negative, but... we had foo/bar/ * From the vfs_mknod() POV we just have a negative dentry - * all is fine. Let's be bastards - you had / on the end, you've * been asking for (non-existent) directory. -ENOENT for you. */ -if (!is_dir && nd->last.name[nd->last.len] && !dentry->d_inode) - goto enoent; +if (unlikely (!is_dir && nd->last.name[nd->last.len])) { +dput (dentry); + dentry =ERR_PTR (-ENOENT ); + }return dentry; -enoent: +eexist:dput (dentry); - dentry =ERR_PTR (-ENOENT ); + dentry =ERR_PTR (-EEXIST ); fail:return dentry; }
fs/nfs/inode.c +1 -3
@@ -57,8 +57,6 @@ static int enable_ino64 = NFS_64_BIT_INODE_NUMBERS_ENABLED;static void nfs_invalidate_inode (struct inode *);static int nfs_update_inode (struct inode *,struct nfs_fattr *); -static void nfs_zap_acl_cache (struct inode *); -static struct kmem_cache * nfs_inode_cachep; static inline unsigned long
@@ -167,7 +165,7 @@ void nfs_zap_mapping(struct inode *inode, struct address_space *mapping) } } -static void nfs_zap_acl_cache (struct inode *inode) +void nfs_zap_acl_cache (struct inode *inode) {void (*clear_acl_cache)(struct inode *);
fs/nfs/internal.h +1 -0
@@ -153,6 +153,7 @@ extern void nfs_clear_inode(struct inode *);#ifdef CONFIG_NFS_V4 extern void nfs4_clear_inode (struct inode *);#endif +void nfs_zap_acl_cache (struct inode *inode);/* super.c */ extern struct file_system_type nfs_xdev_fs_type;
fs/nfs/nfs3acl.c +6 -3
@@ -5,6 +5,8 @@#include <linux/posix_acl_xattr.h> #include <linux/nfsacl.h> +#include "internal.h" +#define NFSDBG_FACILITY NFSDBG_PROCssize_t nfs3_listxattr (struct dentry *dentry,char *buffer,size_t size)
@@ -205,6 +207,8 @@ struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type) status =nfs_revalidate_inode (server, inode);if (status <0 )return ERR_PTR (status); +if (NFS_I (inode)->cache_validity &NFS_INO_INVALID_ACL ) +nfs_zap_acl_cache (inode); acl =nfs3_get_cached_acl (inode, type);if (acl !=ERR_PTR (-EAGAIN ))return acl;
@@ -319,9 +323,8 @@ static int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,dprintk ("NFS call setacl\n" ); msg.rpc_proc = &server->client_acl->cl_procinfo[ACLPROC3_SETACL ]; status =rpc_call_sync (server->client_acl, &msg,0 ); -spin_lock (&inode->i_lock); -NFS_I (inode)->cache_validity |=NFS_INO_INVALID_ACCESS ; -spin_unlock (&inode->i_lock); +nfs_access_zap_cache (inode); +nfs_zap_acl_cache (inode);dprintk ("NFS reply setacl: %d\n" , status);/* pages may have been allocated at the xdr layer. */
fs/nfs/nfs4proc.c +5 -1
@@ -52,6 +52,7 @@#include "nfs4_fs.h" #include "delegation.h" #include "iostat.h" +#include "internal.h" #define NFSDBG_FACILITY NFSDBG_PROC
@@ -2707,6 +2708,8 @@ static ssize_t nfs4_proc_get_acl(struct inode *inode, void *buf, size_t buflen) ret =nfs_revalidate_inode (server, inode);if (ret <0 )return ret; +if (NFS_I (inode)->cache_validity &NFS_INO_INVALID_ACL ) +nfs_zap_acl_cache (inode); ret =nfs4_read_cached_acl (inode, buf, buflen);if (ret != -ENOENT )return ret;
@@ -2734,7 +2737,8 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflnfs_inode_return_delegation (inode);buf_to_pages (buf, buflen, arg.acl_pages, &arg.acl_pgbase); ret =rpc_call_sync (NFS_CLIENT (inode), &msg,0 ); -nfs_zap_caches (inode); +nfs_access_zap_cache (inode); +nfs_zap_acl_cache (inode);return ret; }
fs/partitions/msdos.c +17 -3
@@ -18,7 +18,7 @@* * Re-organised Feb 1998 Russell King */ - +#include <linux/msdos_fs.h> #include "check.h" #include "msdos.h"
@@ -419,6 +419,7 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev)Sector sect;unsigned char *data;struct partition *p; +struct fat_boot_sector *fb;int slot; data =read_dev_sector (bdev,0 , §);
@@ -444,8 +445,21 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) p = (struct partition *) (data +0x1be );for (slot =1 ; slot <=4 ; slot++, p++) {if (p->boot_ind !=0 && p->boot_ind !=0x80 ) { -put_dev_sector (sect); -return 0 ; +/* +* Even without a valid boot inidicator value +* its still possible this is valid FAT filesystem +* without a partition table. +*/ + fb = (struct fat_boot_sector *) data; +if (slot ==1 && fb->reserved && fb->fats + &&fat_valid_media (fb->media)) { +printk ("\n" ); +put_dev_sector (sect); +return 1 ; + }else { +put_dev_sector (sect); +return 0 ; + } } }
fs/romfs/inode.c +23 -14
@@ -418,7 +418,8 @@ static int romfs_readpage(struct file *file, struct page * page) { struct inode *inode = page->mapping->host; -loff_t offset, avail, readlen; +loff_t offset, size; +unsigned long filled;void *buf;int result = -EIO ;
@@ -430,21 +431,29 @@ romfs_readpage(struct file *file, struct page * page)/* 32 bit warning -- but not for us :) */ offset =page_offset (page); -if (offset <i_size_read (inode)) { - avail = inode->i_size-offset; - readlen = min_t(unsigned long, avail, PAGE_SIZE); -if (romfs_copyfrom (inode, buf,ROMFS_I (inode)->i_dataoffset+offset, readlen) == readlen) { -if (readlen <PAGE_SIZE ) { -memset (buf + readlen,0 ,PAGE_SIZE -readlen); - } -SetPageUptodate (page); - result =0 ; + size =i_size_read (inode); + filled =0 ; + result =0 ; +if (offset < size) { +unsigned long readlen; + + size -= offset; + readlen = size >PAGE_SIZE ?PAGE_SIZE : size; + + filled =romfs_copyfrom (inode, buf,ROMFS_I (inode)->i_dataoffset+offset, readlen); + +if (filled != readlen) { +SetPageError (page); + filled =0 ; + result = -EIO ; } } -if (result) { -memset (buf,0 ,PAGE_SIZE ); -SetPageError (page); - } + +if (filled <PAGE_SIZE ) +memset (buf + filled,0 ,PAGE_SIZE -filled); + +if (!result) +SetPageUptodate (page);flush_dcache_page (page);unlock_page (page);
include/linux/msdos_fs.h +5 -1
@@ -58,7 +58,11 @@#define MSDOS_DOTDOT ".. "/* "..", padded to MSDOS_NAME chars */ /* media of boot sector */ -#define FAT_VALID_MEDIA (x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0) +static inline int fat_valid_media (u8 media) +{ +return 0xf8 <= media || media ==0xf0 ; +} +#define FAT_FIRST_ENT (s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
include/sound/ac97_codec.h +1 -0
@@ -504,6 +504,7 @@ struct snd_ac97 {unsigned short pcmreg[3 ];// PCM registers unsigned short codec_cfg[3 ];// CODEC_CFG bits unsigned char swap_mic_linein;// AD1986/AD1986A only +unsigned char lo_as_master;/* LO as master */ } ad18xx;unsigned int dev_flags;/* device specific */ } spec;
include/sound/emu10k1.h +1 -0
@@ -1670,6 +1670,7 @@ struct snd_emu_chip_details {unsigned char spi_dac;/* SPI interface for DAC */ unsigned char i2c_adc;/* I2C interface for ADC */ unsigned char adc_1361t;/* Use Philips 1361T ADC */ +unsigned char invert_shared_spdif;/* analog/digital switch inverted */ const char *driver;const char *name;const char *id;/* for backward compatibility - can be NULL if not needed */
mm/filemap.c +1 -2
@@ -2574,9 +2574,8 @@ out:* Otherwise return zero. * * The @gfp_mask argument specifies whether I/O may be performed to release -* this page (__GFP_IO), and whether the call may block (__GFP_WAIT). +* this page (__GFP_IO), and whether the call may block (__GFP_WAIT & __GFP_FS). * -* NOTE: @gfp_mask may go away, and this function may become non-blocking. */ int try_to_release_page (struct page *page,gfp_t gfp_mask) {
net/bluetooth/bnep/core.c +5 -0
@@ -507,6 +507,11 @@ static int bnep_session(void *arg)/* Delete network device */ unregister_netdev (dev); +/* Wakeup user-space polling for socket errors */ + s->sock->sk->sk_err =EUNATCH ; + +wake_up_interruptible (s->sock->sk->sk_sleep); +/* Release the socket */ fput (s->sock->file);
net/bluetooth/hidp/core.c +10 -0
@@ -581,6 +581,12 @@ static int hidp_session(void *arg)hid_free_device (session->hid); } +/* Wakeup user-space polling for socket errors */ + session->intr_sock->sk->sk_err =EUNATCH ; + session->ctrl_sock->sk->sk_err =EUNATCH ; + +hidp_schedule (session); +fput (session->intr_sock->file); wait_event_timeout(*(ctrl_sk->sk_sleep),
@@ -879,6 +885,10 @@ int hidp_del_connection(struct hidp_conndel_req *req)skb_queue_purge (&session->ctrl_transmit);skb_queue_purge (&session->intr_transmit); +/* Wakeup user-space polling for socket errors */ + session->intr_sock->sk->sk_err =EUNATCH ; + session->ctrl_sock->sk->sk_err =EUNATCH ; +/* Kill session thread */ atomic_inc (&session->terminate);hidp_schedule (session);
sound/core/init.c +15 -21
@@ -311,6 +311,9 @@ int snd_card_disconnect(struct snd_card *card)struct file *file;int err; +if (!card) +return -EINVAL ; +spin_lock (&card->files_lock);if (card->shutdown) {spin_unlock (&card->files_lock);
@@ -322,6 +325,7 @@ int snd_card_disconnect(struct snd_card *card)/* phase 1: disable fops (user space) operations for ALSA API */ mutex_lock (&snd_card_mutex); snd_cards[card->number] =NULL ; + snd_cards_lock &= ~(1 << card->number);mutex_unlock (&snd_card_mutex);/* phase 2: replace file->f_op with special dummy operations */
@@ -360,6 +364,15 @@ int snd_card_disconnect(struct snd_card *card)snd_printk (KERN_ERR "not all devices for card %i can be disconnected\n" , card->number);snd_info_card_disconnect (card); +#ifndef CONFIG_SYSFS_DEPRECATED +if (card->card_dev) { +device_unregister (card->card_dev); + card->card_dev =NULL ; + } +#endif +#ifdef CONFIG_PM +wake_up (&card->power_sleep); +#endif return 0 ; }
@@ -401,33 +414,14 @@ static int snd_card_do_free(struct snd_card *card)snd_printk (KERN_WARNING "unable to free card info\n" );/* Not fatal error */ } -#ifndef CONFIG_SYSFS_DEPRECATED -if (card->card_dev) -device_unregister (card->card_dev); -#endif kfree (card);return 0 ; } -static int snd_card_free_prepare (struct snd_card *card) -{ -if (card ==NULL ) -return -EINVAL ; - (void )snd_card_disconnect (card); -mutex_lock (&snd_card_mutex); - snd_cards[card->number] =NULL ; - snd_cards_lock &= ~(1 << card->number); -mutex_unlock (&snd_card_mutex); -#ifdef CONFIG_PM -wake_up (&card->power_sleep); -#endif -return 0 ; -} -int snd_card_free_when_closed (struct snd_card *card) {int free_now =0 ; -int ret =snd_card_free_prepare (card); +int ret =snd_card_disconnect (card);if (ret)return ret;
@@ -447,7 +441,7 @@ EXPORT_SYMBOL(snd_card_free_when_closed);int snd_card_free (struct snd_card *card) { -int ret =snd_card_free_prepare (card); +int ret =snd_card_disconnect (card);if (ret)return ret;
sound/core/oss/mixer_oss.c +2 -0
@@ -1257,6 +1257,8 @@ static void snd_mixer_oss_build(struct snd_mixer_oss *mixer) { SOUND_MIXER_DIGITAL3, "Digital", 2 }, { SOUND_MIXER_PHONEIN, "Phone", 0 }, { SOUND_MIXER_PHONEOUT, "Master Mono", 0 }, + { SOUND_MIXER_PHONEOUT, "Speaker", 0 }, /*fallback*/ + { SOUND_MIXER_PHONEOUT, "Mono", 0 }, /*fallback*/ { SOUND_MIXER_PHONEOUT, "Phone", 0 }, /* fallback */ { SOUND_MIXER_VIDEO, "Video", 0 }, { SOUND_MIXER_RADIO, "Radio", 0 },
sound/core/seq/oss/seq_oss_synth.c +3 -0
@@ -599,6 +599,9 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in {struct seq_oss_synth *rec; +if (dev <0 || dev >= dp->max_synthdev) +return -ENXIO ; +if (dp->synths[dev].is_midi) {struct midi_info minf;snd_seq_oss_midi_make_info (dp, dp->synths[dev].midi_mapped, &minf);
sound/pci/ac97/ac97_patch.c +34 -14
80 lines not on this page · raw message
sound/pci/emu10k1/emu10k1_main.c +1 -0
@@ -1527,6 +1527,7 @@ static struct snd_emu_chip_details emu_chip_details[] = { .ca0151_chip = 1, .spk71 = 1, .spdif_bug = 1, + .invert_shared_spdif = 1, /* digital/analog switch swapped */ .adc_1361t = 1, /* 24 bit capture instead of 16bit. Fixes ALSA bug#324 */ .ac97_chip = 1} , {.vendor = 0x1102, .device = 0x0004, .revision = 0x04,
sound/pci/emu10k1/emumixer.c +10 -3
@@ -1578,6 +1578,10 @@ static int snd_emu10k1_shared_spdif_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0 ] =inl (emu->port +A_IOCFG ) &A_IOCFG_GPOUT0 ?1 :0 ; else ucontrol->value.integer.value[0] = inl(emu->port + HCFG) & HCFG_GPOUT0 ? 1 : 0; +if (emu->card_capabilities->invert_shared_spdif) + ucontrol->value.integer.value[0 ] = + !ucontrol->value.integer.value[0 ]; +return 0 ; }
@@ -1586,15 +1590,18 @@ static int snd_emu10k1_shared_spdif_put(struct snd_kcontrol *kcontrol, {unsigned long flags;struct snd_emu10k1 *emu =snd_kcontrol_chip (kcontrol); -unsigned int reg, val; +unsigned int reg, val, sw;int change =0 ; + sw = ucontrol->value.integer.value[0 ]; +if (emu->card_capabilities->invert_shared_spdif) + sw = !sw;spin_lock_irqsave (&emu->reg_lock, flags);if ( emu->card_capabilities->i2c_adc) {/* Do nothing for Audigy 2 ZS Notebook */ }else if (emu->audigy) { reg =inl (emu->port +A_IOCFG ); - val = ucontrol->value.integer.value[0 ] ?A_IOCFG_GPOUT0 :0 ; + val = sw ?A_IOCFG_GPOUT0 :0 ; change = (reg &A_IOCFG_GPOUT0 ) != val;if (change) { reg &= ~A_IOCFG_GPOUT0 ;
@@ -1603,7 +1610,7 @@ static int snd_emu10k1_shared_spdif_put(struct snd_kcontrol *kcontrol, } } reg =inl (emu->port +HCFG ); - val = ucontrol->value.integer.value[0 ] ?HCFG_GPOUT0 :0 ; + val = sw ?HCFG_GPOUT0 :0 ; change |= (reg &HCFG_GPOUT0 ) != val;if (change) { reg &= ~HCFG_GPOUT0 ;
sound/pci/hda/patch_analog.c +22 -11
@@ -1563,6 +1563,7 @@ static const char *ad1981_models[AD1981_MODELS] = {static struct snd_pci_quirk ad1981_cfg_tbl[] = {SND_PCI_QUIRK (0x1014 ,0x0597 ,"Lenovo Z60" ,AD1981_THINKPAD ), +SND_PCI_QUIRK (0x1014 ,0x05b7 ,"Lenovo Z60m" ,AD1981_THINKPAD ),/* All HP models */ SND_PCI_QUIRK (0x103c ,0 ,"HP nx" ,AD1981_HP ),SND_PCI_QUIRK (0x1179 ,0x0001 ,"Toshiba U205" ,AD1981_TOSHIBA ),
@@ -2557,7 +2558,7 @@ static int ad1988_auto_create_extra_out(struct hda_codec *codec, hda_nid_t pin, {struct ad198x_spec *spec = codec->spec;hda_nid_t nid; -int idx, err; +int i, idx, err;char name[32 ];if (! pin)
@@ -2565,16 +2566,26 @@ static int ad1988_auto_create_extra_out(struct hda_codec *codec, hda_nid_t pin, idx =ad1988_pin_idx (pin); nid =ad1988_idx_to_dac (codec, idx); -/* specify the DAC as the extra output */ -if (! spec->multiout.hp_nid) - spec->multiout.hp_nid = nid; -else - spec->multiout.extra_out_nid[0 ] = nid; -/* control HP volume/switch on the output mixer amp */ -sprintf (name,"%s Playback Volume" , pfx); -if ((err =add_control (spec,AD_CTL_WIDGET_VOL , name, -HDA_COMPOSE_AMP_VAL (nid,3 ,0 ,HDA_OUTPUT ))) <0 ) -return err; +/* check whether the corresponding DAC was already taken */ +for (i =0 ; i < spec->autocfg.line_outs; i++) { +hda_nid_t pin = spec->autocfg.line_out_pins[i]; +hda_nid_t dac =ad1988_idx_to_dac (codec,ad1988_pin_idx (pin)); +if (dac == nid) +break ; + } +if (i >= spec->autocfg.line_outs) { +/* specify the DAC as the extra output */ +if (!spec->multiout.hp_nid) + spec->multiout.hp_nid = nid; +else + spec->multiout.extra_out_nid[0 ] = nid; +/* control HP volume/switch on the output mixer amp */ +sprintf (name,"%s Playback Volume" , pfx); + err =add_control (spec,AD_CTL_WIDGET_VOL , name, +HDA_COMPOSE_AMP_VAL (nid,3 ,0 ,HDA_OUTPUT )); +if (err <0 ) +return err; + } nid = ad1988_mixer_nids[idx];sprintf (name,"%s Playback Switch" , pfx); if ((err = add_control(spec, AD_CTL_BIND_MUTE, name,
sound/usb/usbaudio.c +26 -9
@@ -1762,8 +1762,10 @@ static int check_hw_params_convention(struct snd_usb_substream *subs) channels =kcalloc (MAX_MASK ,sizeof (u32),GFP_KERNEL ); rates =kcalloc (MAX_MASK ,sizeof (u32),GFP_KERNEL ); -if (!channels || !rates) +if (!channels || !rates) { + err = -ENOMEM ; goto __out; + }list_for_each (p, &subs->fmt_list) {struct audioformat *f;
@@ -1916,7 +1918,10 @@ static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substre 1000 * MIN_PACKS_URB, /*(nrpacks * MAX_URBS) * 1000*/ UINT_MAX); - if (check_hw_params_convention(subs)) { + err =check_hw_params_convention (subs); +if (err <0 ) +return err; + else if (err) { hwc_debug("setting extra hw constraints...\n"); if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, hw_rule_rate, subs,
@@ -2463,11 +2468,12 @@ static int parse_audio_format_i_type(struct snd_usb_audio *chip, struct audiofor }break ;case USB_AUDIO_FORMAT_PCM8 : -/* Dallas DS4201 workaround */ + pcm_format =SNDRV_PCM_FORMAT_U8 ; + +/* Dallas DS4201 workaround: it advertises U8 format, but really +supports S8. */ if (chip->usb_id ==USB_ID (0x04fa ,0x4201 )) pcm_format =SNDRV_PCM_FORMAT_S8 ; -else - pcm_format =SNDRV_PCM_FORMAT_U8 ;break ;case USB_AUDIO_FORMAT_IEEE_FLOAT : pcm_format =SNDRV_PCM_FORMAT_FLOAT_LE ;
@@ -2671,12 +2677,23 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)int format;struct audioformat *fp;unsigned char *fmt, *csep; +int num; dev = chip->dev;/* parse the interface's altsettings */ iface =usb_ifnum_to_if (dev, iface_no); -for (i =0 ; i < iface->num_altsetting; i++) { + + num = iface->num_altsetting; + +/* +* Dallas DS4201 workaround: It presents 5 altsettings, but the last +* one misses syncpipe, and does not produce any sound. +*/ +if (chip->usb_id ==USB_ID (0x04fa ,0x4201 )) + num =4 ; + +for (i =0 ; i < num; i++) { alts = &iface->altsetting[i]; altsd =get_iface_desc (alts);/* skip invalid one */
@@ -3406,7 +3423,6 @@ static void snd_usb_audio_create_proc(struct snd_usb_audio *chip)static int snd_usb_audio_free (struct snd_usb_audio *chip) { - usb_chip[chip->index] =NULL ;kfree (chip);return 0 ; }
@@ -3600,8 +3616,8 @@ static void *snd_usb_audio_probe(struct usb_device *dev,snd_card_set_dev (chip->card, &intf->dev);break ; } -if (! chip) { -snd_printk (KERN_ERR "no available usb audio device\n" ); +if (!chip) { +printk (KERN_ERR "no available usb audio device\n" ); goto __error; } }
@@ -3671,6 +3687,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)list_for_each (p, &chip->mixer_list) {snd_usb_mixer_disconnect (p); } + usb_chip[chip->index] =NULL ;mutex_unlock (®ister_mutex);snd_card_free_when_closed (card); }else {
sound/usb/usbquirks.h +38 -37
105 lines not on this page · raw message