Linux 3.14.42
Greg KH
maintainerI'm announcing the release of the 3.14.42 kernel.
All users of the 3.14 kernel series must upgrade.
The updated 3.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.14.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - arch/arc/kernel/signal.c | 20 +++++++++--- drivers/block/rbd.c | 5 +++ drivers/gpu/drm/radeon/si_dpm.c | 1 drivers/hv/channel_mgmt.c | 12 ------- drivers/mtd/ubi/misc.c | 2 + drivers/platform/x86/compal-laptop.c | 6 +-- drivers/scsi/3w-9xxx.c | 57 +++++++---------------------------- drivers/scsi/3w-9xxx.h | 5 --- drivers/scsi/3w-sas.c | 50 ++++++------------------------ drivers/scsi/3w-sas.h | 4 -- drivers/scsi/3w-xxxx.c | 42 +++---------------------- drivers/scsi/3w-xxxx.h | 5 --- drivers/staging/panel/panel.c | 13 +++---- drivers/tty/serial/atmel_serial.c | 2 + drivers/tty/serial/of_serial.c | 1 drivers/usb/gadget/printer.c | 9 +++++ drivers/usb/host/ehci-hcd.c | 10 +++--- drivers/usb/host/ehci-hub.c | 9 +++-- drivers/usb/host/oxu210hp-hcd.c | 7 ++-- drivers/usb/musb/musb_core.c | 6 ++- drivers/usb/musb/musb_virthub.c | 2 - fs/ext4/extents_status.c | 8 ++++ fs/ext4/inode.c | 2 + include/sound/emu10k1.h | 14 +++++--- include/sound/soc-dapm.h | 2 - net/ipv4/ping.c | 1 sound/pci/emu10k1/emu10k1.c | 6 ++- sound/pci/emu10k1/emu10k1_callback.c | 4 +- sound/pci/emu10k1/emu10k1_main.c | 21 ++++++++---- sound/pci/emu10k1/emupcm.c | 2 - sound/pci/emu10k1/memory.c | 11 +++--- sound/pci/hda/hda_codec.c | 21 +++++++----- sound/pci/hda/thinkpad_helper.c | 1 sound/synth/emux/emux_oss.c | 11 ------ sound/synth/emux/emux_seq.c | 29 ++++++++++++----- 36 files changed, 178 insertions(+), 225 deletions(-)
Alex Deucher (1):
drm/radeon: add SI DPM quirk for Sapphire R9 270 Dual-X 2G GDDR5
Andrzej Pietrasiewicz (1):
usb: gadget: printer: enqueue printer's response for setup request
Charles Keepax (1):
ASoC: dapm: Enable autodisable on SOC_DAPM_SINGLE_TLV_AUTODISABLE
Christoph Hellwig (3):
3w-xxxx: fix command completion race
3w-9xxx: fix command completion race
3w-sas: fix command completion race
David S. Miller (1):
ipv4: Missing sk_nulls_node_init() in ping_unhash().
Felipe Balbi (3):
usb: musb: use new USB_RESUME_TIMEOUT
usb: host: oxu210hp: use new USB_RESUME_TIMEOUT
usb: host: ehci: use new USB_RESUME_TIMEOUT
Greg Kroah-Hartman (1):
Linux 3.14.42
Ilya Dryomov (1):
rbd: end I/O the entire obj_request on error
K. Y. Srinivasan (1):
Drivers: hv: vmbus: Don't wait after requesting offers
Krzysztof Kozlowski (1):
compal-laptop: Fix leaking hwmon device
Ludovic Desroches (1):
tty/serial: at91: maxburst was missing for dma transfers
Lukas Czerner (1):
ext4: fix data corruption caused by unwritten and delayed extents
Michal Simek (1):
serial: of-serial: Remove device_type = "serial" registration
Peter Zubaj (1):
ALSA: emu10k1: Emu10k2 32 bit DMA mode
Sudip Mukherjee (1):
staging: panel: fix lcd type
Takashi Iwai (5):
ALSA: emux: Fix mutex deadlock at unloading
ALSA: emux: Fix mutex deadlock in OSS emulation
ALSA: emu10k1: Fix card shortname string buffer overflow
ALSA: hda - Fix mute-LED fixed mode
ALSA: hda - Add mute-LED mode control to Thinkpad
Vineet Gupta (1):
ARC: signal handling robustify
hujianyang (1):
UBI: fix soft lockup in ubi_check_volume()
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 14 -SUBLEVEL = 41 +SUBLEVEL = 42 EXTRAVERSION = NAME = Remembering Coco
arch/arc/kernel/signal.c +16 -4
@@ -131,6 +131,15 @@ SYSCALL_DEFINE0(rt_sigreturn)/* Don't restart from sigreturn */ syscall_wont_restart (regs); +/* +* Ensure that sigreturn always returns to user mode (in case the +* regs saved on user stack got fudged between save and sigreturn) +* Otherwise it is easy to panic the kernel with a custom +* signal handler and/or restorer which clobberes the status32/ret +* to return to a bogus location in kernel mode. +*/ + regs->status32 |=STATUS_U_MASK ; +return regs->r0; badframe:
@@ -234,8 +243,11 @@ setup_rt_frame(int signo, struct k_sigaction *ka, siginfo_t *info,/* * handler returns using sigreturn stub provided already by userpsace +* If not, nuke the process right away */ -BUG_ON (!(ka->sa.sa_flags &SA_RESTORER )); +if (!(ka->sa.sa_flags &SA_RESTORER )) +return 1 ; + regs->blink = (unsigned long )ka->sa.sa_restorer;/* User Stack for signal handler will be above the frame just carved */
@@ -302,12 +314,12 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, struct pt_regs *regs) {sigset_t *oldset =sigmask_to_save (); -int ret; +int failed;/* Set up the stack frame */ - ret =setup_rt_frame (sig, ka, info, oldset, regs); + failed =setup_rt_frame (sig, ka, info, oldset, regs); -if (ret) +if (failed)force_sigsegv (sig, current);else signal_delivered (sig, info, ka, regs,0 );
drivers/block/rbd.c +5 -0
@@ -2084,6 +2084,11 @@ static bool rbd_img_obj_end_request(struct rbd_obj_request *obj_request) result, xferred);if (!img_request->result) img_request->result = result; +/* +* Need to end I/O on the entire obj_request worth of +* bytes in case of error. +*/ + xferred = obj_request->length; }/* Image object requests don't own their page array */
drivers/gpu/drm/radeon/si_dpm.c +1 -0
@@ -2913,6 +2913,7 @@ struct si_dpm_quirk {static struct si_dpm_quirk si_dpm_quirk_list[] = {/* PITCAIRN - https://bugs.freedesktop.org/show_bug.cgi?id=76490 */ {PCI_VENDOR_ID_ATI ,0x6810 ,0x1462 ,0x3036 ,0 ,120000 }, + {PCI_VENDOR_ID_ATI ,0x6811 ,0x174b ,0xe271 ,0 ,120000 }, {0 ,0 ,0 ,0 }, };
drivers/hv/channel_mgmt.c +1 -11
@@ -716,7 +716,7 @@ int vmbus_request_offers(void) {struct vmbus_channel_message_header *msg;struct vmbus_channel_msginfo *msginfo; -int ret, t; +int ret; msginfo = kmalloc(sizeof(*msginfo) + sizeof(struct vmbus_channel_message_header),
@@ -724,8 +724,6 @@ int vmbus_request_offers(void)if (!msginfo)return -ENOMEM ; -init_completion (&msginfo->waitevent); - msg = (struct vmbus_channel_message_header *)msginfo->msg; msg->msgtype =CHANNELMSG_REQUESTOFFERS ;
@@ -739,14 +737,6 @@ int vmbus_request_offers(void) goto cleanup; } - t =wait_for_completion_timeout (&msginfo->waitevent,5 *HZ ); -if (t ==0 ) { - ret = -ETIMEDOUT ; - goto cleanup; - } - - - cleanup:kfree (msginfo);
drivers/mtd/ubi/misc.c +2 -0
@@ -74,6 +74,8 @@ int ubi_check_volume(struct ubi_device *ubi, int vol_id)for (i =0 ; i < vol->used_ebs; i++) {int size; +cond_resched (); +if (i == vol->used_ebs -1 ) size = vol->last_eb_bytes;else
drivers/platform/x86/compal-laptop.c +3 -3
@@ -1027,9 +1027,9 @@ static int compal_probe(struct platform_device *pdev)if (err)return err; - hwmon_dev =hwmon_device_register_with_groups (&pdev->dev, -DRIVER_NAME , data, - compal_hwmon_groups); + hwmon_dev =devm_hwmon_device_register_with_groups (&pdev->dev, +DRIVER_NAME , data, + compal_hwmon_groups);if (IS_ERR (hwmon_dev)) { err =PTR_ERR (hwmon_dev); goto remove;
drivers/scsi/3w-9xxx.c +13 -44
110 lines not on this page · raw message
drivers/scsi/3w-9xxx.h +0 -5
@@ -324,11 +324,6 @@ static twa_message_type twa_error_table[] = {#define TW_CURRENT_DRIVER_BUILD 0#define TW_CURRENT_DRIVER_BRANCH 0 -/* Phase defines */ -#define TW_PHASE_INITIAL 0 -#define TW_PHASE_SINGLE 1 -#define TW_PHASE_SGLIST 2 -/* Misc defines */ #define TW_9550SX_DRAIN_COMPLETED 0xFFFF#define TW_SECTOR_SIZE 512
drivers/scsi/3w-sas.c +10 -40
89 lines not on this page · raw message
drivers/scsi/3w-sas.h +0 -4
@@ -103,10 +103,6 @@ static char *twl_aen_severity_table[] =#define TW_CURRENT_DRIVER_BUILD 0#define TW_CURRENT_DRIVER_BRANCH 0 -/* Phase defines */ -#define TW_PHASE_INITIAL 0 -#define TW_PHASE_SGLIST 2 -/* Misc defines */ #define TW_SECTOR_SIZE 512#define TW_MAX_UNITS 32
drivers/scsi/3w-xxxx.c +6 -36
75 lines not on this page · raw message
drivers/scsi/3w-xxxx.h +0 -5
@@ -195,11 +195,6 @@ static unsigned char tw_sense_table[][4] =#define TW_AEN_SMART_FAIL 0x000F#define TW_AEN_SBUF_FAIL 0x0024 -/* Phase defines */ -#define TW_PHASE_INITIAL 0 -#define TW_PHASE_SINGLE 1 -#define TW_PHASE_SGLIST 2 -/* Misc defines */ #define TW_ALIGNMENT_6000 64/* 64 bytes */ #define TW_ALIGNMENT_7000 4/* 4 bytes */
drivers/staging/panel/panel.c +6 -7
@@ -275,11 +275,11 @@ static unsigned char lcd_bits[LCD_PORTS][LCD_BITS][BIT_STATES];* LCD types */ #define LCD_TYPE_NONE 0 -#define LCD_TYPE_OLD 1 -#define LCD_TYPE_KS0074 2 -#define LCD_TYPE_HANTRONIX 3 -#define LCD_TYPE_NEXCOM 4 -#define LCD_TYPE_CUSTOM 5 +#define LCD_TYPE_CUSTOM 1 +#define LCD_TYPE_OLD 2 +#define LCD_TYPE_KS0074 3 +#define LCD_TYPE_HANTRONIX 4 +#define LCD_TYPE_NEXCOM 5/* * keypad types
@@ -457,8 +457,7 @@ MODULE_PARM_DESC(keypad_enabled, "Deprecated option, use keypad_type instead");static int lcd_type =-1 ;module_param (lcd_type, int,0000 );MODULE_PARM_DESC (lcd_type, -"LCD type: 0=none, 1=old //, 2=serial ks0074, " -"3=hantronix //, 4=nexcom //, 5=compiled-in" ); +"LCD type: 0=none, 1=compiled-in, 2=old, 3=serial ks0074, 4=hantronix, 5=nexcom" );static int lcd_proto =-1 ;module_param (lcd_proto, int,0000 );
drivers/tty/serial/atmel_serial.c +2 -0
@@ -757,6 +757,7 @@ static int atmel_prepare_tx_dma(struct uart_port *port) config.direction =DMA_MEM_TO_DEV ; config.dst_addr_width =DMA_SLAVE_BUSWIDTH_1_BYTE ; config.dst_addr = port->mapbase +ATMEL_US_THR ; + config.dst_maxburst =1 ; ret = dmaengine_device_control(atmel_port->chan_tx, DMA_SLAVE_CONFIG,
@@ -921,6 +922,7 @@ static int atmel_prepare_rx_dma(struct uart_port *port) config.direction =DMA_DEV_TO_MEM ; config.src_addr_width =DMA_SLAVE_BUSWIDTH_1_BYTE ; config.src_addr = port->mapbase +ATMEL_US_RHR ; + config.src_maxburst =1 ; ret = dmaengine_device_control(atmel_port->chan_rx, DMA_SLAVE_CONFIG,
drivers/tty/serial/of_serial.c +0 -1
@@ -261,7 +261,6 @@ static struct of_device_id of_platform_serial_table[] = { { .compatible = "ibm,qpace-nwp-serial", .data = (void *)PORT_NWPSERIAL, }, #endif - { .type = "serial", .data = (void *)PORT_UNKNOWN, }, { /* end of list */ }, };
drivers/usb/gadget/printer.c +9 -0
@@ -975,6 +975,15 @@ unknown:break ; }/* host either stalls (value < 0) or reports success */ +if (value >=0 ) { + req->length = value; + req->zero = value < wLength; + value =usb_ep_queue (cdev->gadget->ep0, req,GFP_ATOMIC ); +if (value <0 ) { +ERROR (dev,"%s:%d Error!\n" , __func__, __LINE__); + req->status =0 ; + } + }return value; }
drivers/usb/host/ehci-hcd.c +5 -5
@@ -787,12 +787,12 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) ehci->reset_done[i] == 0))continue ; -/* start 20 msec resume signaling from this port, -* and make khubd collect PORT_STAT_C_SUSPEND to -* stop that signaling. Use 5 ms extra for safety, -* like usb_port_resume() does. +/* start USB_RESUME_TIMEOUT msec resume signaling from +* this port, and make hub_wq collect +* PORT_STAT_C_SUSPEND to stop that signaling. */ - ehci->reset_done[i] = jiffies +msecs_to_jiffies (25 ); + ehci->reset_done[i] = jiffies + +msecs_to_jiffies (USB_RESUME_TIMEOUT );set_bit (i, &ehci->resuming_ports);ehci_dbg (ehci,"port %d remote wakeup\n" , i +1 );usb_hcd_start_port_resume (&hcd->self, i);
drivers/usb/host/ehci-hub.c +6 -3
@@ -482,10 +482,13 @@ static int ehci_bus_resume (struct usb_hcd *hcd)ehci_writel (ehci, temp, &ehci->regs->port_status [i]); } -/* msleep for 20ms only if code is trying to resume port */ +/* +* msleep for USB_RESUME_TIMEOUT ms only if code is trying to resume +* port +*/ if (resume_needed) {spin_unlock_irq (&ehci->lock); -msleep (20 ); +msleep (USB_RESUME_TIMEOUT );spin_lock_irq (&ehci->lock);if (ehci->shutdown) goto shutdown;
@@ -953,7 +956,7 @@ static int ehci_hub_control ( temp &= ~PORT_WAKE_BITS ;ehci_writel (ehci, temp |PORT_RESUME , status_reg); ehci->reset_done[wIndex] = jiffies - +msecs_to_jiffies (20 ); + +msecs_to_jiffies (USB_RESUME_TIMEOUT );set_bit (wIndex, &ehci->resuming_ports);usb_hcd_start_port_resume (&hcd->self, wIndex);break ;
drivers/usb/host/oxu210hp-hcd.c +4 -3
@@ -2500,11 +2500,12 @@ static irqreturn_t oxu210_hcd_irq(struct usb_hcd *hcd) || oxu->reset_done[i] != 0)continue ; -/* start 20 msec resume signaling from this port, -* and make khubd collect PORT_STAT_C_SUSPEND to +/* start USB_RESUME_TIMEOUT resume signaling from this +* port, and make hub_wq collect PORT_STAT_C_SUSPEND to * stop that signaling. */ - oxu->reset_done[i] = jiffies +msecs_to_jiffies (20 ); + oxu->reset_done[i] = jiffies + +msecs_to_jiffies (USB_RESUME_TIMEOUT );oxu_dbg (oxu,"port %d remote wakeup\n" , i +1 );mod_timer (&hcd->rh_timer, oxu->reset_done[i]); }
drivers/usb/musb/musb_core.c +4 -2
@@ -99,6 +99,7 @@#include <linux/platform_device.h> #include <linux/io.h> #include <linux/dma-mapping.h> +#include <linux/usb.h> #include "musb_core.h"
@@ -477,10 +478,11 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, (USB_PORT_STAT_C_SUSPEND <<16 ) |MUSB_PORT_STAT_RESUME ; musb->rh_timer = jiffies - +msecs_to_jiffies (20 ); + +msecs_to_jiffies (USB_RESUME_TIMEOUT ); +schedule_delayed_work ( &musb->finish_resume_work, -msecs_to_jiffies (20 )); +msecs_to_jiffies (USB_RESUME_TIMEOUT )); musb->xceiv->state =OTG_STATE_A_HOST ; musb->is_active =1 ;
drivers/usb/musb/musb_virthub.c +1 -1
@@ -136,7 +136,7 @@ void musb_port_suspend(struct musb *musb, bool do_suspend)/* later, GetPortStatus will stop RESUME signaling */ musb->port1_status |=MUSB_PORT_STAT_RESUME ;schedule_delayed_work (&musb->finish_resume_work, -msecs_to_jiffies (20 )); +msecs_to_jiffies (USB_RESUME_TIMEOUT )); } }
fs/ext4/extents_status.c +8 -0
@@ -656,6 +656,14 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,BUG_ON (end < lblk); +if ((status &EXTENT_STATUS_DELAYED ) && + (status &EXTENT_STATUS_WRITTEN )) { +ext4_warning (inode->i_sb,"Inserting extent [%u/%u] as " +" delayed and written which can potentially " +" cause data loss.\n" , lblk, len); +WARN_ON (1 ); + } + newes.es_lblk = lblk; newes.es_len = len;ext4_es_store_pblock (&newes, pblk);
fs/ext4/inode.c +2 -0
@@ -569,6 +569,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode, status = map->m_flags &EXT4_MAP_UNWRITTEN ?EXTENT_STATUS_UNWRITTEN :EXTENT_STATUS_WRITTEN ;if (!(flags &EXT4_GET_BLOCKS_DELALLOC_RESERVE ) && + !(status &EXTENT_STATUS_WRITTEN ) &&ext4_find_delalloc_range (inode, map->m_lblk, map->m_lblk + map->m_len -1 )) status |=EXTENT_STATUS_DELAYED ;
@@ -678,6 +679,7 @@ found: status = map->m_flags &EXT4_MAP_UNWRITTEN ?EXTENT_STATUS_UNWRITTEN :EXTENT_STATUS_WRITTEN ;if (!(flags &EXT4_GET_BLOCKS_DELALLOC_RESERVE ) && + !(status &EXTENT_STATUS_WRITTEN ) &&ext4_find_delalloc_range (inode, map->m_lblk, map->m_lblk + map->m_len -1 )) status |=EXTENT_STATUS_DELAYED ;
include/sound/emu10k1.h +9 -5
@@ -41,7 +41,8 @@#define EMUPAGESIZE 4096#define MAXREQVOICES 8 -#define MAXPAGES 8192 +#define MAXPAGES0 4096/* 32 bit mode */ +#define MAXPAGES1 8192/* 31 bit mode */ #define RESERVED 0#define NUM_MIDI 16#define NUM_G 64/* use all channels */
@@ -50,8 +51,7 @@/* FIXME? - according to the OSS driver the EMU10K1 needs a 29 bit DMA mask */ #define EMU10K1_DMA_MASK 0x7fffffffUL/* 31bit */ -#define AUDIGY_DMA_MASK 0x7fffffffUL/* 31bit FIXME - 32 should work? */ -/* See ALSA bug #1276 - rlrevell */ +#define AUDIGY_DMA_MASK 0xffffffffUL/* 32bit mode */ #define TMEMSIZE 256*1024#define TMEMSIZEREG 4
@@ -468,8 +468,11 @@#define MAPB 0x0d/* Cache map B */ -#define MAP_PTE_MASK 0xffffe000/* The 19 MSBs of the PTE indexed by the PTI */ -#define MAP_PTI_MASK 0x00001fff/* The 13 bit index to one of the 8192 PTE dwords */ +#define MAP_PTE_MASK0 0xfffff000/* The 20 MSBs of the PTE indexed by the PTI */ +#define MAP_PTI_MASK0 0x00000fff/* The 12 bit index to one of the 4096 PTE dwords */ + +#define MAP_PTE_MASK1 0xffffe000/* The 19 MSBs of the PTE indexed by the PTI */ +#define MAP_PTI_MASK1 0x00001fff/* The 13 bit index to one of the 8192 PTE dwords */ /* 0x0e, 0x0f: Not used */
@@ -1706,6 +1709,7 @@ struct snd_emu10k1 {unsigned short model;/* subsystem id */ unsigned int card_type;/* EMU10K1_CARD_* */ unsigned int ecard_ctrl;/* ecard control bits */ +unsigned int address_mode;/* address mode */ unsigned long dma_mask;/* PCI DMA mask */ unsigned int delay_pcm_irq;/* in samples */ int max_cache_pages;/* max memory size / PAGE_SIZE */
include/sound/soc-dapm.h +1 -1
@@ -302,7 +302,7 @@ struct device; .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_READWRITE,\ .tlv.p = (tlv_array), \ .get = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw, \ - .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 0) } + .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 1) }#define SOC_DAPM_SINGLE_TLV_VIRT (xname, max, tlv_array) \ SOC_DAPM_SINGLE(xname, SND_SOC_NOPM, 0, max, 0, tlv_array)#define SOC_DAPM_ENUM (xname, xenum) \
net/ipv4/ping.c +1 -0
@@ -158,6 +158,7 @@ void ping_unhash(struct sock *sk)if (sk_hashed (sk)) {write_lock_bh (&ping_table.lock);hlist_nulls_del (&sk->sk_nulls_node); +sk_nulls_node_init (&sk->sk_nulls_node);sock_put (sk); isk->inet_num =0 ; isk->inet_sport =0 ;
sound/pci/emu10k1/emu10k1.c +4 -2
@@ -181,8 +181,10 @@ static int snd_card_emu10k1_probe(struct pci_dev *pci, }#endif -strcpy (card->driver, emu->card_capabilities->driver); -strcpy (card->shortname, emu->card_capabilities->name); +strlcpy (card->driver, emu->card_capabilities->driver, +sizeof (card->driver)); +strlcpy (card->shortname, emu->card_capabilities->name, +sizeof (card->shortname));snprintf (card->longname,sizeof (card->longname),"%s (rev.%d, serial:0x%x) at 0x%lx, irq %i" , card->shortname, emu->revision, emu->serial, emu->port, emu->irq);
sound/pci/emu10k1/emu10k1_callback.c +2 -2
@@ -415,7 +415,7 @@ start_voice(struct snd_emux_voice *vp)snd_emu10k1_ptr_write (hw,Z2 , ch,0 );/* invalidate maps */ - temp = (hw->silent_page.addr <<1 ) |MAP_PTI_MASK ; + temp = (hw->silent_page.addr << hw->address_mode) | (hw->address_mode ?MAP_PTI_MASK1 :MAP_PTI_MASK0 );snd_emu10k1_ptr_write (hw,MAPA , ch, temp);snd_emu10k1_ptr_write (hw,MAPB , ch, temp);#if 0
@@ -436,7 +436,7 @@ start_voice(struct snd_emux_voice *vp)snd_emu10k1_ptr_write (hw,CDF , ch, sample);/* invalidate maps */ - temp = ((unsigned int )hw->silent_page.addr <<1 ) |MAP_PTI_MASK ; + temp = ((unsigned int )hw->silent_page.addr << hw_address_mode) | (hw->address_mode ?MAP_PTI_MASK1 :MAP_PTI_MASK0 );snd_emu10k1_ptr_write (hw,MAPA , ch, temp);snd_emu10k1_ptr_write (hw,MAPB , ch, temp);
sound/pci/emu10k1/emu10k1_main.c +14 -7
@@ -282,7 +282,7 @@ static int snd_emu10k1_init(struct snd_emu10k1 *emu, int enable_ir, int resume)snd_emu10k1_ptr_write (emu,TCB ,0 ,0 );/* taken from original driver */ snd_emu10k1_ptr_write (emu,TCBS ,0 ,4 );/* taken from original driver */ - silent_page = (emu->silent_page.addr <<1 ) |MAP_PTI_MASK ; + silent_page = (emu->silent_page.addr << emu->address_mode) | (emu->address_mode ?MAP_PTI_MASK1 :MAP_PTI_MASK0 );for (ch =0 ; ch <NUM_G ; ch++) {snd_emu10k1_ptr_write (emu,MAPA , ch, silent_page);snd_emu10k1_ptr_write (emu,MAPB , ch, silent_page);
@@ -348,6 +348,11 @@ static int snd_emu10k1_init(struct snd_emu10k1 *emu, int enable_ir, int resume)outl (reg |A_IOCFG_GPOUT0 , emu->port +A_IOCFG ); } +if (emu->address_mode ==0 ) { +/* use 16M in 4G */ +outl (inl (emu->port +HCFG ) |HCFG_EXPANDED_MEM , emu->port +HCFG ); + } +return 0 ; }
@@ -1411,7 +1416,7 @@ static struct snd_emu_chip_details emu_chip_details[] = {* */ {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x20011102, - .driver = "Audigy2", .name = "SB Audigy 2 ZS Notebook [SB0530]", + .driver = "Audigy2", .name = "Audigy 2 ZS Notebook [SB0530]", .id = "Audigy2", .emu10k2_chip = 1, .ca0108_chip = 1,
@@ -1561,7 +1566,7 @@ static struct snd_emu_chip_details emu_chip_details[] = { .adc_1361t = 1, /* 24 bit capture instead of 16bit */ .ac97_chip = 1} , {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10051102, - .driver = "Audigy2", .name = "SB Audigy 2 Platinum EX [SB0280]", + .driver = "Audigy2", .name = "Audigy 2 Platinum EX [SB0280]", .id = "Audigy2", .emu10k2_chip = 1, .ca0102_chip = 1,
@@ -1865,8 +1870,10 @@ int snd_emu10k1_create(struct snd_card *card, is_audigy = emu->audigy = c->emu10k2_chip; +/* set addressing mode */ + emu->address_mode = is_audigy ?0 :1 ;/* set the DMA transfer mask */ - emu->dma_mask = is_audigy ?AUDIGY_DMA_MASK :EMU10K1_DMA_MASK ; + emu->dma_mask = emu->address_mode ?EMU10K1_DMA_MASK :AUDIGY_DMA_MASK ;if (pci_set_dma_mask (pci, emu->dma_mask) <0 ||pci_set_consistent_dma_mask (pci, emu->dma_mask) <0 ) {snd_printk (KERN_ERR "architecture does not support PCI busmaster DMA with mask 0x%lx\n" , emu->dma_mask);
@@ -1889,7 +1896,7 @@ int snd_emu10k1_create(struct snd_card *card, emu->max_cache_pages = max_cache_bytes >>PAGE_SHIFT ;if (snd_dma_alloc_pages (SNDRV_DMA_TYPE_DEV ,snd_dma_pci_data (pci), -32 *1024 , &emu->ptb_pages) <0 ) { + (emu->address_mode ?32 :16 ) *1024 , &emu->ptb_pages) <0 ) { err = -ENOMEM ; goto error; }
@@ -1988,8 +1995,8 @@ int snd_emu10k1_create(struct snd_card *card,/* Clear silent pages and set up pointers */ memset (emu->silent_page.area,0 ,PAGE_SIZE ); - silent_page = emu->silent_page.addr <<1 ; -for (idx =0 ; idx <MAXPAGES ; idx++) + silent_page = emu->silent_page.addr << emu->address_mode; +for (idx =0 ; idx < (emu->address_mode ?MAXPAGES1 :MAXPAGES0 ); idx++) ((u32 *)emu->ptb_pages.area)[idx] =cpu_to_le32 (silent_page | idx);/* set up voice indices */
sound/pci/emu10k1/emupcm.c +1 -1
@@ -379,7 +379,7 @@ static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu,snd_emu10k1_ptr_write (emu,Z1 , voice,0 );snd_emu10k1_ptr_write (emu,Z2 , voice,0 );/* invalidate maps */ - silent_page = ((unsigned int )emu->silent_page.addr <<1 ) |MAP_PTI_MASK ; + silent_page = ((unsigned int )emu->silent_page.addr << emu->address_mode) | (emu->address_mode ?MAP_PTI_MASK1 :MAP_PTI_MASK0 );snd_emu10k1_ptr_write (emu,MAPA , voice, silent_page);snd_emu10k1_ptr_write (emu,MAPB , voice, silent_page);/* modulation envelope */
sound/pci/emu10k1/memory.c +6 -5
@@ -34,10 +34,11 @@* aligned pages in others */ #define __set_ptb_entry (emu,page,addr) \ - (((u32 *)(emu)->ptb_pages.area)[page] = cpu_to_le32(((addr) << 1) | (page))) + (((u32 *)(emu)->ptb_pages.area)[page] = cpu_to_le32(((addr) << (emu->address_mode)) | (page)))#define UNIT_PAGES (PAGE_SIZE / EMUPAGESIZE) -#define MAX_ALIGN_PAGES (MAXPAGES / UNIT_PAGES) +#define MAX_ALIGN_PAGES0 (MAXPAGES0 / UNIT_PAGES) +#define MAX_ALIGN_PAGES1 (MAXPAGES1 / UNIT_PAGES)/* get aligned page from offset address */ #define get_aligned_page (offset) ((offset) >> PAGE_SHIFT)/* get offset address from aligned page */
@@ -124,7 +125,7 @@ static int search_empty_map_area(struct snd_emu10k1 *emu, int npages, struct lis } page = blk->mapped_page + blk->pages; } - size =MAX_ALIGN_PAGES - page; + size = (emu->address_mode ?MAX_ALIGN_PAGES1 :MAX_ALIGN_PAGES0 ) - page;if (size >= max_size) { *nextp = pos;return page;
@@ -181,7 +182,7 @@ static int unmap_memblk(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk) q =get_emu10k1_memblk (p, mapped_link); end_page = q->mapped_page; }else - end_page =MAX_ALIGN_PAGES ; + end_page = (emu->address_mode ?MAX_ALIGN_PAGES1 :MAX_ALIGN_PAGES0 );/* remove links */ list_del (&blk->mapped_link);
@@ -305,7 +306,7 @@ snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substif (snd_BUG_ON (!emu))return NULL ;if (snd_BUG_ON (runtime->dma_bytes <=0 || - runtime->dma_bytes >=MAXPAGES *EMUPAGESIZE )) + runtime->dma_bytes >= (emu->address_mode ?MAXPAGES1 :MAXPAGES0 ) *EMUPAGESIZE ))return NULL ; hdr = emu->memhdr;if (snd_BUG_ON (!hdr))
sound/pci/hda/hda_codec.c +12 -9
@@ -2082,6 +2082,16 @@ static void put_vol_mute(struct hda_codec *codec, unsigned int amp_caps,snd_hda_codec_write (codec, nid,0 ,AC_VERB_SET_AMP_GAIN_MUTE , parm); } +/* meta hook to call each driver's vmaster hook */ +static void vmaster_hook (void *private_data,int enabled) +{ +struct hda_vmaster_mute_hook *hook = private_data; + +if (hook->mute_mode !=HDA_VMUTE_FOLLOW_MASTER ) + enabled = hook->mute_mode; + hook->hook (hook->codec, enabled); +} +/** * snd_hda_codec_amp_read - Read AMP value * @codec: HD-audio codec
@@ -2917,9 +2927,9 @@ int snd_hda_add_vmaster_hook(struct hda_codec *codec,if (!hook->hook || !hook->sw_kctl)return 0 ; -snd_ctl_add_vmaster_hook (hook->sw_kctl, hook->hook, codec); hook->codec = codec; hook->mute_mode =HDA_VMUTE_FOLLOW_MASTER ; +snd_ctl_add_vmaster_hook (hook->sw_kctl, vmaster_hook, hook);if (!expose_enum_ctl)return 0 ; kctl =snd_ctl_new1 (&vmaster_mute_mode, hook);
@@ -2942,14 +2952,7 @@ void snd_hda_sync_vmaster_hook(struct hda_vmaster_mute_hook *hook)*/ if (hook->codec->bus->shutdown)return ; -switch (hook->mute_mode) { -case HDA_VMUTE_FOLLOW_MASTER : -snd_ctl_sync_vmaster_hook (hook->sw_kctl); -break ; -default : - hook->hook (hook->codec, hook->mute_mode); -break ; - } +snd_ctl_sync_vmaster_hook (hook->sw_kctl); }EXPORT_SYMBOL_GPL (snd_hda_sync_vmaster_hook);
sound/pci/hda/thinkpad_helper.c +1 -0
@@ -71,6 +71,7 @@ static void hda_fixup_thinkpad_acpi(struct hda_codec *codec,if (led_set_func (TPACPI_LED_MUTE , false) >=0 ) { old_vmaster_hook = spec->vmaster_mute.hook; spec->vmaster_mute.hook = update_tpacpi_mute_led; + spec->vmaster_mute_enum =1 ; removefunc = false; }if (led_set_func (TPACPI_LED_MICMUTE , false) >=0 ) {
sound/synth/emux/emux_oss.c +1 -10
@@ -118,12 +118,8 @@ snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)if (snd_BUG_ON (!arg || !emu))return -ENXIO ; -mutex_lock (&emu->register_mutex); - -if (!snd_emux_inc_count (emu)) { -mutex_unlock (&emu->register_mutex); +if (!snd_emux_inc_count (emu))return -EFAULT ; - }memset (&callback,0 ,sizeof (callback)); callback.owner =THIS_MODULE ;
@@ -135,7 +131,6 @@ snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)if (p ==NULL ) {snd_printk (KERN_ERR "can't create port\n" );snd_emux_dec_count (emu); -mutex_unlock (&emu->register_mutex);return -ENOMEM ; }
@@ -148,8 +143,6 @@ snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)reset_port_mode (p, arg->seq_mode);snd_emux_reset_port (p); - -mutex_unlock (&emu->register_mutex);return 0 ; }
@@ -195,13 +188,11 @@ snd_emux_close_seq_oss(struct snd_seq_oss_arg *arg)if (snd_BUG_ON (!emu))return -ENXIO ; -mutex_lock (&emu->register_mutex);snd_emux_sounds_off_all (p);snd_soundfont_close_check (emu->sflist,SF_CLIENT_NO (p->chset.port));snd_seq_event_port_detach (p->chset.client, p->chset.port);snd_emux_dec_count (emu); -mutex_unlock (&emu->register_mutex);return 0 ; }
sound/synth/emux/emux_seq.c +21 -8
@@ -124,12 +124,10 @@ snd_emux_detach_seq(struct snd_emux *emu)if (emu->voices)snd_emux_terminate_all (emu); -mutex_lock (&emu->register_mutex);if (emu->client >=0 ) {snd_seq_delete_kernel_client (emu->client); emu->client =-1 ; } -mutex_unlock (&emu->register_mutex); }
@@ -269,8 +267,8 @@ snd_emux_event_input(struct snd_seq_event *ev, int direct, void *private_data,/* * increment usage count */ -int -snd_emux_inc_count (struct snd_emux *emu) +static int +__snd_emux_inc_count (struct snd_emux *emu) { emu->used++;if (!try_module_get (emu->ops.owner))
@@ -284,12 +282,21 @@ snd_emux_inc_count(struct snd_emux *emu)return 1 ; } +int snd_emux_inc_count (struct snd_emux *emu) +{ +int ret; + +mutex_lock (&emu->register_mutex); + ret =__snd_emux_inc_count (emu); +mutex_unlock (&emu->register_mutex); +return ret; +}/* * decrease usage count */ -void -snd_emux_dec_count (struct snd_emux *emu) +static void +__snd_emux_dec_count (struct snd_emux *emu) {module_put (emu->card->module); emu->used--;
@@ -298,6 +305,12 @@ snd_emux_dec_count(struct snd_emux *emu)module_put (emu->ops.owner); } +void snd_emux_dec_count (struct snd_emux *emu) +{ +mutex_lock (&emu->register_mutex); +__snd_emux_dec_count (emu); +mutex_unlock (&emu->register_mutex); +}/* * Routine that is called upon a first use of a particular port
@@ -317,7 +330,7 @@ snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info)mutex_lock (&emu->register_mutex);snd_emux_init_port (p); -snd_emux_inc_count (emu); +__snd_emux_inc_count (emu);mutex_unlock (&emu->register_mutex);return 0 ; }
@@ -340,7 +353,7 @@ snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info)mutex_lock (&emu->register_mutex);snd_emux_sounds_off_all (p); -snd_emux_dec_count (emu); +__snd_emux_dec_count (emu);mutex_unlock (&emu->register_mutex);return 0 ; }