3.2.36-stable review
Subsystems (104)
PATCH 165/173 thp, memcg: split hugepage for memcg oom on cow
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Rientjes <[email protected]>
commit 1f1d06c34f7675026326cd9f39ff91e4555cf355 upstream.
On COW, a new hugepage is allocated and charged to the memcg. If the system is oom or the charge to the memcg fails, however, the fault handler will return VM_FAULT_OOM which results in an oom kill.
Instead, it's possible to fallback to splitting the hugepage so that the COW results only in an order-0 page being allocated and charged to the memcg which has a higher liklihood to succeed. This is expensive because the hugepage must be split in the page fault handler, but it is much better than unnecessarily oom killing a process.
--- mm/huge_memory.c | 3 +++ mm/memory.c | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-)
mm/huge_memory.c +3 -0
@@ -952,6 +952,8 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,count_vm_event (THP_FAULT_FALLBACK ); ret =do_huge_pmd_wp_page_fallback (mm, vma, address, pmd, orig_pmd, page, haddr); +if (ret &VM_FAULT_OOM ) +split_huge_page (page);put_page (page); goto out; }
@@ -959,6 +961,7 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,if (unlikely (mem_cgroup_newpage_charge (new_page, mm,GFP_KERNEL ))) {put_page (new_page); +split_huge_page (page);put_page (page); ret |=VM_FAULT_OOM ; goto out;
mm/memory.c +15 -3
@@ -3486,6 +3486,7 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,if (unlikely (is_vm_hugetlb_page (vma)))return hugetlb_fault (mm, vma, address, flags); +retry: pgd =pgd_offset (mm, address); pud =pud_alloc (mm, pgd, address);if (!pud)
@@ -3499,13 +3500,24 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, pmd, flags); }else {pmd_t orig_pmd = *pmd; +int ret; +barrier ();if (pmd_trans_huge (orig_pmd)) {if (flags &FAULT_FLAG_WRITE && !pmd_write (orig_pmd) && - !pmd_trans_splitting (orig_pmd)) -return do_huge_pmd_wp_page (mm, vma, address, - pmd, orig_pmd); + !pmd_trans_splitting (orig_pmd)) { + ret =do_huge_pmd_wp_page (mm, vma, address, pmd, + orig_pmd); +/* +* If COW results in an oom, the huge pmd will +* have been split, so retry the fault on the +* pte for a smaller charge. +*/ +if (unlikely (ret &VM_FAULT_OOM )) + goto retry; +return ret; + }return 0 ; } }
PATCH 166/173 udf: fix memory leak while allocating blocks during write
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <[email protected]>
commit 2fb7d99d0de3fd8ae869f35ab682581d8455887a upstream.
Need to brelse the buffer_head stored in cur_epos and next_epos.
--- fs/udf/inode.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/udf/inode.c +4 -0
@@ -744,6 +744,8 @@ static struct buffer_head *inode_getblk( goal, err);if (!newblocknum) {brelse (prev_epos.bh); +brelse (cur_epos.bh); +brelse (next_epos.bh); *err = -ENOSPC ;return NULL ; }
@@ -774,6 +776,8 @@ static struct buffer_head *inode_getblk(udf_update_extents (inode, laarr, startnum, endnum, &prev_epos);brelse (prev_epos.bh); +brelse (cur_epos.bh); +brelse (next_epos.bh); newblock =udf_get_pblock (inode->i_sb, newblocknum, iinfo->i_location.partitionReferenceNum,0 );
PATCH 167/173 staging: vt6656: [BUG] out of bound array reference in RFbSetPower.
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malcolm Priestley <[email protected]>
commit ab1dd9963137a1e122004d5378a581bf16ae9bc8 upstream.
Calling RFbSetPower with uCH zero value will cause out of bound array reference.
This causes 64 bit kernels to oops on boot.
Note: Driver does not function on 64 bit kernels and should be blacklisted on them.
--- drivers/staging/vt6656/rf.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/staging/vt6656/rf.c +3 -0
@@ -769,6 +769,9 @@ BYTE byPwr = pDevice->byCCKPwr;return TRUE; } +if (uCH ==0 ) +return -EINVAL ; +switch (uRATE) {case RATE_1M :case RATE_2M :
PATCH 168/173 staging: vt6656: 64 bit fixes: use u32 for QWORD definition.
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malcolm Priestley <[email protected]>
commit a552397d5e4ef0cc0bd3e9595d6acc9a3b381171 upstream.
Size of long issues replace with u32.
--- drivers/staging/vt6656/ttype.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/vt6656/ttype.h +4 -2
@@ -29,6 +29,8 @@#ifndef __TTYPE_H__#define __TTYPE_H__ +#include <linux/types.h> +/******* Common definitions and typedefs ***********************************/ typedef int BOOL ;
@@ -51,8 +53,8 @@ typedef unsigned long DWORD; // 32-bit// which is NOT really a floating point number. typedef union tagUQuadWord {struct { -DWORD dwLowDword; -DWORD dwHighDword; +u32 dwLowDword; +u32 dwHighDword; } u;double DoNotUseThisField; }UQuadWord ;
PATCH 169/173 staging: vt6656: 64 bit fixes : correct all type sizes
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malcolm Priestley <[email protected]>
commit 7730492855a2f9c828599bcd8d62760f96d319e4 upstream.
After this patch all BYTE/WORD/DWORD types can be replaced with the appropriate u sizes.
--- drivers/staging/vt6656/ttype.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/vt6656/ttype.h +5 -5
@@ -44,9 +44,9 @@ typedef int BOOL;/****** Simple typedefs ***************************************************/ -typedef unsigned char BYTE ;// 8-bit -typedef unsigned short WORD ;// 16-bit -typedef unsigned long DWORD ;// 32-bit +typedef u8 BYTE ; +typedef u16 WORD ; +typedef u32 DWORD ;// QWORD is for those situation that we want // an 8-byte-aligned 8 byte long structure
@@ -62,8 +62,8 @@ typedef UQuadWord QWORD; // 64-bit/****** Common pointer types ***********************************************/ -typedef unsigned long ULONG_PTR ;// 32-bit -typedef unsigned long DWORD_PTR ;// 32-bit +typedef u32 ULONG_PTR ; +typedef u32 DWORD_PTR ;// boolean pointer
PATCH 170/173 staging: vt6656: 64 bit fixes: fix long warning messages.
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malcolm Priestley <[email protected]>
commit b4dc03af5513774277c9c36b12a25cd3f25f4404 upstream.
Fixes long warning messages from patch
[PATCH 08/14] staging: vt6656: 64 bit fixes : correct all type sizes
--- drivers/staging/vt6656/dpc.c | 4 ++-- drivers/staging/vt6656/key.c | 47 +++++++++++++++++++++++++++++------------ drivers/staging/vt6656/mac.c | 6 ++++-- drivers/staging/vt6656/rxtx.c | 18 ++++++++++------ 4 files changed, 51 insertions(+), 24 deletions(-)
drivers/staging/vt6656/dpc.c +2 -2
@@ -1238,7 +1238,7 @@ static BOOL s_bHandleRxEncryption ( PayloadLen -= (WLAN_HDR_ADDR3_LEN +8 +4 );// 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc *pdwRxTSC47_16 =cpu_to_le32 (*(PDWORD )(pbyIV +4 )); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %lx\n" ,*pdwRxTSC47_16); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %x\n" , *pdwRxTSC47_16);if (byDecMode ==KEY_CTL_TKIP ) { *pwRxTSC15_0 =cpu_to_le16 (MAKEWORD (*(pbyIV+2 ), *pbyIV)); }else {
@@ -1349,7 +1349,7 @@ static BOOL s_bHostWepRxEncryption ( PayloadLen -= (WLAN_HDR_ADDR3_LEN +8 +4 );// 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc *pdwRxTSC47_16 =cpu_to_le32 (*(PDWORD )(pbyIV +4 )); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %lx\n" ,*pdwRxTSC47_16); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %x\n" , *pdwRxTSC47_16);if (byDecMode ==KEY_CTL_TKIP ) { *pwRxTSC15_0 =cpu_to_le16 (MAKEWORD (*(pbyIV+2 ), *pbyIV));
drivers/staging/vt6656/key.c +33 -14
109 lines not on this page · raw message
drivers/staging/vt6656/mac.c +4 -2
@@ -260,7 +260,8 @@ BYTE pbyData[24]; dwData1 <<=16 ; dwData1 |=MAKEWORD (*(pbyAddr+4 ), *(pbyAddr+5 )); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "1. wOffset: %d, Data: %lX, KeyCtl:%X\n" , wOffset, dwData1, wKeyCtl); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "1. wOffset: %d, Data: %X," \ +" KeyCtl:%X\n" , wOffset, dwData1, wKeyCtl);//VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset); //VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData);
@@ -277,7 +278,8 @@ BYTE pbyData[24]; dwData2 <<=8 ; dwData2 |= *(pbyAddr+0 ); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "2. wOffset: %d, Data: %lX\n" , wOffset, dwData2); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "2. wOffset: %d, Data: %X\n" , + wOffset, dwData2);//VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset); //VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData);
drivers/staging/vt6656/rxtx.c +12 -6
@@ -375,7 +375,8 @@ s_vFillTxKey ( *(pbyIVHead+3 ) = (BYTE )(((pDevice->byKeyIndex <<6 ) &0xc0 ) |0x20 );// 0x20 is ExtIV // Append IV&ExtIV after Mac Header *pdwExtIV =cpu_to_le32 (pTransmitKey->dwTSC47_16); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "vFillTxKey()---- pdwExtIV: %lx\n" , *pdwExtIV); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "vFillTxKey()---- pdwExtIV: %x\n" , + *pdwExtIV); }else if (pTransmitKey->byCipherSuite ==KEY_CTL_CCMP ) { pTransmitKey->wTSC15_0++;
@@ -1749,7 +1750,8 @@ s_bPacketToWirelessUsb(MIC_vAppend ((PBYTE )&(psEthHeader->abyDstAddr[0 ]),12 ); dwMIC_Priority =0 ;MIC_vAppend ((PBYTE )&dwMIC_Priority,4 ); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "MIC KEY: %lX, %lX\n" , dwMICKey0, dwMICKey1); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "MIC KEY: %X, %X\n" , + dwMICKey0, dwMICKey1);///////////////////////////////////////////////////////////////////
@@ -2631,7 +2633,8 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) {MIC_vAppend ((PBYTE )&(sEthHeader.abyDstAddr[0 ]),12 ); dwMIC_Priority =0 ;MIC_vAppend ((PBYTE )&dwMIC_Priority,4 ); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "DMA0_tx_8021:MIC KEY: %lX, %lX\n" , dwMICKey0, dwMICKey1); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "DMA0_tx_8021:MIC KEY:" \ +" %X, %X\n" , dwMICKey0, dwMICKey1); uLength = cbHeaderSize + cbMacHdLen + uPadding + cbIVlen;
@@ -2651,7 +2654,8 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) {DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "uLength: %d, %d\n" , uLength, cbFrameBodySize);DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "cbReqCount:%d, %d, %d, %d\n" , cbReqCount, cbHeaderSize, uPadding, cbIVlen); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "MIC:%lx, %lx\n" , *pdwMIC_L, *pdwMIC_R); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "MIC:%x, %x\n" , + *pdwMIC_L, *pdwMIC_R); }
@@ -3025,7 +3029,8 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "error: KEY is GTK!!~~\n" ); }else { -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "Find PTK [%lX]\n" , pTransmitKey->dwKeyIndex); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "Find PTK [%X]\n" , + pTransmitKey->dwKeyIndex); bNeedEncryption = TRUE; } }
@@ -3034,7 +3039,8 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)if (pDevice->bEnableHostWEP) {if ((uNodeIndex !=0 ) && (pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex &PAIRWISE_KEY )) { -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "Find PTK [%lX]\n" , pTransmitKey->dwKeyIndex); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "Find PTK [%X]\n" , + pTransmitKey->dwKeyIndex); bNeedEncryption = TRUE; } }
PATCH 171/173 staging: vt6656: 64bit fixes: key.c/h change unsigned long to u32
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malcolm Priestley <[email protected]>
commit c0d05b305b00c698b0a8c1b3d46c9380bce9db45 upstream.
Fixes long issues.
--- drivers/staging/vt6656/key.c | 6 +++--- drivers/staging/vt6656/key.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/vt6656/key.c +3 -3
@@ -223,7 +223,7 @@ BOOL KeybSetKey(PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
@@ -675,7 +675,7 @@ BOOL KeybSetDefaultKey(void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
@@ -791,7 +791,7 @@ BOOL KeybSetAllGroupKey(void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
drivers/staging/vt6656/key.h +4 -4
@@ -58,7 +58,7 @@ typedef struct tagSKeyItem { BOOL bKeyValid; - unsigned long uKeyLength; + u32 uKeyLength; BYTE abyKey[MAX_KEY_LEN]; QWORD KeyRSC; DWORD dwTSC47_16;
@@ -107,7 +107,7 @@ BOOL KeybSetKey(PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
@@ -146,7 +146,7 @@ BOOL KeybSetDefaultKey(void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
@@ -156,7 +156,7 @@ BOOL KeybSetAllGroupKey(void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
PATCH 172/173 staging: vt6656: 64bit fixes: vCommandTimerWait change calculation of timer.
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malcolm Priestley <[email protected]>
commit 70e227790d4ee4590023d8041a3485f8053593fc upstream.
The timer appears to run too fast/race on 64 bit systems.
Using msecs_to_jiffies seems to cause a deadlock on 64 bit.
A calculation of (MSecond * HZ) / 1000 appears to run satisfactory.
Change BSSIDInfoCount to u32.
After this patch the driver can be successfully connect on little endian 64/32 bit systems.
--- drivers/staging/vt6656/wcmd.c | 20 +++++++++++--------- drivers/staging/vt6656/wpa2.h | 4 ++-- 2 files changed, 13 insertions(+), 11 deletions(-)
drivers/staging/vt6656/wcmd.c +11 -9
@@ -316,17 +316,19 @@ s_MgrMakeProbeRequest(return pTxPacket; } -void vCommandTimerWait (void *hDeviceContext,unsigned int MSecond) +void vCommandTimerWait (void *hDeviceContext,unsigned long MSecond) { -PSDevice pDevice = (PSDevice )hDeviceContext; +PSDevice pDevice = (PSDevice )hDeviceContext; -init_timer (&pDevice->sTimerCommand); - pDevice->sTimerCommand.data = (unsigned long )pDevice; - pDevice->sTimerCommand.function = (TimerFunction )vRunCommand; -// RUN_AT :1 msec ~= (HZ/1024) - pDevice->sTimerCommand.expires = (unsigned int )RUN_AT ((MSecond *HZ ) >>10 ); -add_timer (&pDevice->sTimerCommand); -return ; +init_timer (&pDevice->sTimerCommand); + + pDevice->sTimerCommand.data = (unsigned long )pDevice; + pDevice->sTimerCommand.function = (TimerFunction )vRunCommand; + pDevice->sTimerCommand.expires =RUN_AT ((MSecond *HZ ) /1000 ); + +add_timer (&pDevice->sTimerCommand); + +return ; }void vRunCommand (void *hDeviceContext)
drivers/staging/vt6656/wpa2.h +2 -2
@@ -45,8 +45,8 @@ typedef struct tagsPMKIDInfo { } PMKIDInfo, *PPMKIDInfo;typedef struct tagSPMKIDCache { -unsigned long BSSIDInfoCount; -PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE ]; +u32 BSSIDInfoCount; +PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE ]; }SPMKIDCache , *PSPMKIDCache ;
PATCH 173/173 ramoops: fix use of rounddown_pow_of_two()
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marco Stornelli <[email protected]>
commit fdb5950754eb3dedb9fea7c8828d3e51d9dbc3f7 upstream.
The return value of rounddown_pow_of_two wasn't evaluated, so the operation was a no-op.
--- drivers/char/ramoops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/char/ramoops.c +2 -2
@@ -125,8 +125,8 @@ static int __init ramoops_probe(struct platform_device *pdev) goto fail3; } -rounddown_pow_of_two (pdata->mem_size); -rounddown_pow_of_two (pdata->record_size); + pdata->mem_size =rounddown_pow_of_two (pdata->mem_size); + pdata->record_size =rounddown_pow_of_two (pdata->record_size);/* Check for the minimum memory size */ if (pdata->mem_size < MIN_MEM_SIZE &&
This is the combined patch for 3.2.36-rc1 relative to 3.2.35.
Ben.
Signature · 2 lines
Ben Hutchings The world is coming to an end. Please log off.
Documentation/hwmon/coretemp +11 -1
@@ -6,7 +6,9 @@ Supported chips: Prefix: 'coretemp' CPUID: family 0x6, models 0xe (Pentium M DC), 0xf (Core 2 DC 65nm), 0x16 (Core 2 SC 65nm), 0x17 (Penryn 45nm), - 0x1a (Nehalem), 0x1c (Atom), 0x1e (Lynnfield) + 0x1a (Nehalem), 0x1c (Atom), 0x1e (Lynnfield), + 0x26 (Tunnel Creek Atom), 0x27 (Medfield Atom), + 0x36 (Cedar Trail Atom) Datasheet: Intel 64 and IA-32 Architectures Software Developer's Manual Volume 3A: System Programming Guide http://softwarecommunity.intel.com/Wiki/Mobility/720.htm
@@ -65,6 +67,11 @@ Process Processor TjMax(C) U3400 105 P4505/P4500 90 +32nm Atom Processors + Z2460 90 + D2700/2550/2500 100 + N2850/2800/2650/2600 100 + 45nm Xeon Processors 5400 Quad-Core X5492, X5482, X5472, X5470, X5460, X5450 85 E5472, E5462, E5450/40/30/20/10/05 85
@@ -85,6 +92,9 @@ Process Processor TjMax(C) N475/470/455/450 100 N280/270 90 330/230 125 + E680/660/640/620 90 + E680T/660T/640T/620T 110 + CE4170/4150/4110 110 45nm Core2 Processors Solo ULV SU3500/3300 100
Makefile +2 -2
@@ -1,7 +1,7 @@ VERSION = 3 PATCHLEVEL = 2 -SUBLEVEL = 35 -EXTRAVERSION = +SUBLEVEL = 36 +EXTRAVERSION = -rc1 NAME = Saber-toothed Squirrel # *DOCUMENTATION*
arch/arm/include/asm/hwcap.h +2 -1
@@ -18,11 +18,12 @@#define HWCAP_THUMBEE (1 << 11)#define HWCAP_NEON (1 << 12)#define HWCAP_VFPv3 (1 << 13) -#define HWCAP_VFPv3D16 (1 << 14) +#define HWCAP_VFPv3D16 (1 << 14)/* also set for VFPv4-D16 */ #define HWCAP_TLS (1 << 15)#define HWCAP_VFPv4 (1 << 16)#define HWCAP_IDIVA (1 << 17)#define HWCAP_IDIVT (1 << 18) +#define HWCAP_VFPD32 (1 << 19)/* set if VFP has 32 regs (not 16) */ #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
arch/arm/include/asm/vfpmacros.h +6 -6
@@ -27,9 +27,9 @@#if __LINUX_ARM_ARCH__ <=6 ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] - tst \tmp, #HWCAP_VFPv3D16 - ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} - addne \base, \base, #32*4 @ step over unused register space + tst \tmp, #HWCAP_VFPD32 + ldcnel p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} + addeq \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field
@@ -51,9 +51,9 @@#if __LINUX_ARM_ARCH__ <=6 ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] - tst \tmp, #HWCAP_VFPv3D16 - stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} - addne \base, \base, #32*4 @ step over unused register space + tst \tmp, #HWCAP_VFPD32 + stcnel p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} + addeq \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field
arch/arm/kernel/swp_emulate.c +2 -0
@@ -108,10 +108,12 @@ static void set_segfault(struct pt_regs *regs, unsigned long addr) {siginfo_t info; +down_read (¤t->mm->mmap_sem);if (find_vma (current->mm, addr) ==NULL ) info.si_code =SEGV_MAPERR ;else info.si_code =SEGV_ACCERR ; +up_read (¤t->mm->mmap_sem); info.si_signo =SIGSEGV ; info.si_errno =0 ;
arch/arm/mm/mmu.c +1 -1
@@ -475,7 +475,7 @@ static void __init build_mem_type_table(void) }for (i =0 ; i <16 ; i++) { -unsigned long v =pgprot_val (protection_map[i]); +pteval_t v =pgprot_val (protection_map[i]); protection_map[i] =__pgprot (v | user_pgprot); }
arch/arm/vfp/vfpmodule.c +6 -3
@@ -610,11 +610,14 @@ static int __init vfp_init(void) elf_hwcap |= HWCAP_VFPv3;/* -* Check for VFPv3 D16. CPUs in this configuration -* only have 16 x 64bit registers. +* Check for VFPv3 D16 and VFPv4 D16. CPUs in +* this configuration only have 16 x 64bit +* registers. */ if (((fmrx (MVFR0 ) &MVFR0_A_SIMD_MASK )) ==1 ) - elf_hwcap |= HWCAP_VFPv3D16; + elf_hwcap |= HWCAP_VFPv3D16;/* also v4-D16 */ +else + elf_hwcap |= HWCAP_VFPD32; }#endif /*
arch/cris/include/asm/io.h +33 -6
@@ -133,12 +133,39 @@ static inline void writel(unsigned int b, volatile void __iomem *addr)#define insb (port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0)#define insw (port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,2,count) : 0)#define insl (port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,4,count) : 0) -#define outb (data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,1,1) -#define outw (data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,2,1) -#define outl (data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,4,1) -#define outsb (port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,1,count) -#define outsw (port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,2,count) -#define outsl (port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,3,count) +static inline void outb (unsigned char data,unsigned int port) +{ +if (cris_iops) + cris_iops->write_io (port, (void *) &data,1 ,1 ); +} +static inline void outw (unsigned short data,unsigned int port) +{ +if (cris_iops) + cris_iops->write_io (port, (void *) &data,2 ,1 ); +} +static inline void outl (unsigned int data,unsigned int port) +{ +if (cris_iops) + cris_iops->write_io (port, (void *) &data,4 ,1 ); +} +static inline void outsb (unsigned int port,const void *addr, +unsigned long count) +{ +if (cris_iops) + cris_iops->write_io (port, (void *)addr,1 , count); +} +static inline void outsw (unsigned int port,const void *addr, +unsigned long count) +{ +if (cris_iops) + cris_iops->write_io (port, (void *)addr,2 , count); +} +static inline void outsl (unsigned int port,const void *addr, +unsigned long count) +{ +if (cris_iops) + cris_iops->write_io (port, (void *)addr,4 , count); +}/* * Convert a physical pointer to a virtual kernel pointer for /dev/mem
arch/mips/kernel/process.c +1 -3
@@ -72,9 +72,7 @@ void __noreturn cpu_idle(void) } }#ifdef CONFIG_HOTPLUG_CPU -if (!cpu_online (cpu) && !cpu_isset (cpu, cpu_callin_map) && - (system_state ==SYSTEM_RUNNING || - system_state ==SYSTEM_BOOTING )) +if (!cpu_online (cpu) && !cpu_isset (cpu, cpu_callin_map))play_dead ();#endif tick_nohz_restart_sched_tick ();
arch/powerpc/kernel/head_64.S +1 -1
@@ -435,7 +435,7 @@ _STATIC(__after_prom_start) tovirt(r6,r6) /* on booke, we already run at PAGE_OFFSET */ #endif -#ifdef CONFIG_CRASH_DUMP +#ifdef CONFIG_RELOCATABLE /* * Check if the kernel has to be running as relocatable kernel based on the * variable __run_at_load, if it is set the kernel is treated as relocatable
arch/powerpc/kvm/44x_emulate.c +2 -0
@@ -79,6 +79,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu, run->dcr.dcrn = dcrn; run->dcr.data =0 ; run->dcr.is_write =0 ; + vcpu->arch.dcr_is_write =0 ; vcpu->arch.io_gpr = rt; vcpu->arch.dcr_needed =1 ;kvmppc_account_exit (vcpu,DCR_EXITS );
@@ -100,6 +101,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu, run->dcr.dcrn = dcrn; run->dcr.data =kvmppc_get_gpr (vcpu, rs); run->dcr.is_write =1 ; + vcpu->arch.dcr_is_write =1 ; vcpu->arch.dcr_needed =1 ;kvmppc_account_exit (vcpu,DCR_EXITS ); emulated =EMULATE_DO_DCR ;
arch/powerpc/platforms/embedded6xx/wii.c +4 -2
@@ -85,9 +85,11 @@ void __init wii_memory_fixups(void) wii_hole_start = p[0 ].base + p[0 ].size; wii_hole_size = p[1 ].base - wii_hole_start; -pr_info ("MEM1: <%08llx %08llx>\n" , p[0 ].base, p[0 ].size); +pr_info ("MEM1: <%08llx %08llx>\n" , + (unsigned long long ) p[0 ].base, (unsigned long long ) p[0 ].size);pr_info ("HOLE: <%08lx %08lx>\n" , wii_hole_start, wii_hole_size); -pr_info ("MEM2: <%08llx %08llx>\n" , p[1 ].base, p[1 ].size); +pr_info ("MEM2: <%08llx %08llx>\n" , + (unsigned long long ) p[1 ].base, (unsigned long long ) p[1 ].size); p[0 ].size += wii_hole_size + p[1 ].size;
arch/s390/kvm/kvm-s390.c +1 -1
@@ -749,7 +749,7 @@ static int __init kvm_s390_init(void) }memcpy (facilities, S390_lowcore.stfle_fac_list,16 ); facilities[0 ] &=0xff00fff3f47c0000ULL ; - facilities[1 ] &=0x201c000000000000ULL ; + facilities[1 ] &=0x001c000000000000ULL ;return 0 ; }
arch/x86/kernel/hpet.c +2 -2
@@ -429,7 +429,7 @@ void hpet_msi_unmask(struct irq_data *data)/* unmask it */ cfg =hpet_readl (HPET_Tn_CFG (hdev->num)); - cfg |=HPET_TN_FSB ; + cfg |=HPET_TN_ENABLE |HPET_TN_FSB ;hpet_writel (cfg,HPET_Tn_CFG (hdev->num)); }
@@ -440,7 +440,7 @@ void hpet_msi_mask(struct irq_data *data)/* mask it */ cfg =hpet_readl (HPET_Tn_CFG (hdev->num)); - cfg &= ~HPET_TN_FSB ; + cfg &= ~(HPET_TN_ENABLE |HPET_TN_FSB );hpet_writel (cfg,HPET_Tn_CFG (hdev->num)); }
arch/x86/kvm/x86.c +6 -0
@@ -578,6 +578,9 @@ static bool guest_cpuid_has_xsave(struct kvm_vcpu *vcpu) {struct kvm_cpuid_entry2 *best; +if (!static_cpu_has (X86_FEATURE_XSAVE )) +return 0 ; + best =kvm_find_cpuid_entry (vcpu,1 ,0 );return best && (best->ecx &bit (X86_FEATURE_XSAVE )); }
@@ -6149,6 +6152,9 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,int pending_vec, max_bits, idx;struct desc_ptr dt; +if (!guest_cpuid_has_xsave (vcpu) && (sregs->cr4 &X86_CR4_OSXSAVE )) +return -EINVAL ; + dt.size = sregs->idt.limit; dt.address = sregs->idt.base; kvm_x86_ops->set_idt (vcpu, &dt);
drivers/acpi/battery.c +77 -0
113 lines not on this page · raw message
drivers/acpi/processor_driver.c +1 -0
@@ -409,6 +409,7 @@ static void acpi_processor_notify(struct acpi_device *device, u32 event)acpi_bus_generate_proc_event (device, event,0 );acpi_bus_generate_netlink_event (device->pnp.device_class,dev_name (&device->dev), event,0 ); +break ;default :ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Unsupported event [0x%x]\n" , event));
drivers/acpi/sleep.c +177 -163
369 lines not on this page · raw message
drivers/acpi/video.c +14 -0
@@ -389,6 +389,12 @@ static int __init video_set_bqc_offset(const struct dmi_system_id *d)return 0 ; } +static int video_ignore_initial_backlight (const struct dmi_system_id *d) +{ + use_bios_initial_backlight =0 ; +return 0 ; +} +static struct dmi_system_id video_dmi_table[]__initdata = {/* * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
@@ -433,6 +439,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720"), }, }, + { + .callback = video_ignore_initial_backlight, + .ident = "HP Folio 13-2000", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13 - 2000 Notebook PC"), + }, + }, {} };
drivers/acpi/video_detect.c +37 -0
@@ -132,6 +132,41 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv)return AE_OK ; } +/* Force to use vendor driver when the ACPI device is known to be +* buggy */ +static int video_detect_force_vendor (const struct dmi_system_id *d) +{ + acpi_video_support |=ACPI_VIDEO_BACKLIGHT_DMI_VENDOR ; +return 0 ; +} + +static struct dmi_system_id video_detect_dmi_table[] = { +/* On Samsung X360, the BIOS will set a flag (VDRV) if generic +* ACPI backlight device is used. This flag will definitively break +* the backlight interface (even the vendor interface) untill next +* reboot. It's why we should prevent video.ko from being used here +* and we can't rely on a later call to acpi_video_unregister(). +*/ + { + .callback = video_detect_force_vendor, + .ident ="X360" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"SAMSUNG ELECTRONICS CO., LTD." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"X360" ), +DMI_MATCH (DMI_BOARD_NAME ,"X360" ), + }, + }, + { + .callback = video_detect_force_vendor, + .ident ="Asus UL30VT" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK Computer Inc." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"UL30VT" ), + }, + }, + { }, +}; +/* * Returns the video capabilities of a specific ACPI graphics device *
@@ -164,6 +199,8 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)* ACPI_VIDEO_BACKLIGHT_DMI_VENDOR; *} */ + +dmi_check_system (video_detect_dmi_table); }else { status =acpi_bus_get_device (graphics_handle, &tmp_dev);if (ACPI_FAILURE (status)) {
drivers/ata/libata-core.c +1 -0
@@ -2529,6 +2529,7 @@ int ata_bus_probe(struct ata_port *ap)* bus as we may be talking too fast. */ dev->pio_mode =XFER_PIO_0 ; + dev->dma_mode =0xff ;/* If the controller has a pio mode setup function * then use it to set the chipset to rights. Don't
drivers/ata/libata-eh.c +1 -0
@@ -2599,6 +2599,7 @@ int ata_eh_reset(struct ata_link *link, int classify,* bus as we may be talking too fast. */ dev->pio_mode =XFER_PIO_0 ; + dev->dma_mode =0xff ;/* If the controller has a pio mode setup function * then use it to set the chipset to rights. Don't
drivers/ata/libata-scsi.c +4 -2
@@ -309,7 +309,8 @@ ata_scsi_activity_show(struct device *dev, struct device_attribute *attr,struct ata_port *ap =ata_shost_to_port (sdev->host);struct ata_device *atadev =ata_scsi_find_dev (ap, sdev); -if (ap->ops->sw_activity_show && (ap->flags &ATA_FLAG_SW_ACTIVITY )) +if (atadev && ap->ops->sw_activity_show && + (ap->flags &ATA_FLAG_SW_ACTIVITY ))return ap->ops->sw_activity_show (atadev, buf);return -EINVAL ; }
@@ -324,7 +325,8 @@ ata_scsi_activity_store(struct device *dev, struct device_attribute *attr,enum sw_activity val;int rc; -if (ap->ops->sw_activity_store && (ap->flags &ATA_FLAG_SW_ACTIVITY )) { +if (atadev && ap->ops->sw_activity_store && + (ap->flags &ATA_FLAG_SW_ACTIVITY )) { val =simple_strtoul (buf,NULL ,0 );switch (val) {case OFF :case BLINK_ON :case BLINK_OFF :
drivers/ata/sata_promise.c +13 -2
@@ -147,6 +147,10 @@ struct pdc_port_priv {dma_addr_t pkt_dma; }; +struct pdc_host_priv { +spinlock_t hard_reset_lock; +}; +static int pdc_sata_scr_read (struct ata_link *link,unsigned int sc_reg,u32 *val);static int pdc_sata_scr_write (struct ata_link *link,unsigned int sc_reg,u32 val);static int pdc_ata_init_one (struct pci_dev *pdev,const struct pci_device_id *ent);
@@ -801,9 +805,10 @@ static void pdc_hard_reset_port(struct ata_port *ap)void __iomem *host_mmio = ap->host->iomap[PDC_MMIO_BAR ];void __iomem *pcictl_b1_mmio = host_mmio +PDC_PCI_CTL +1 ;unsigned int ata_no =pdc_ata_port_to_ata_no (ap); +struct pdc_host_priv *hpriv = ap->host->private_data;u8 tmp; -spin_lock (&ap->host->lock); +spin_lock (&hpriv->hard_reset_lock); tmp =readb (pcictl_b1_mmio); tmp &= ~(0x10 << ata_no);
@@ -814,7 +819,7 @@ static void pdc_hard_reset_port(struct ata_port *ap)writeb (tmp, pcictl_b1_mmio);readb (pcictl_b1_mmio);/* flush */ -spin_unlock (&ap->host->lock); +spin_unlock (&hpriv->hard_reset_lock); } static int pdc_sata_hardreset(struct ata_link *link, unsigned int *class,
@@ -1182,6 +1187,7 @@ static int pdc_ata_init_one(struct pci_dev *pdev,const struct ata_port_info *pi = &pdc_port_info[ent->driver_data];const struct ata_port_info *ppi[PDC_MAX_PORTS ];struct ata_host *host; +struct pdc_host_priv *hpriv;void __iomem *host_mmio;int n_ports, i, rc;int is_sataii_tx4;
@@ -1218,6 +1224,11 @@ static int pdc_ata_init_one(struct pci_dev *pdev,dev_err (&pdev->dev,"failed to allocate host\n" );return -ENOMEM ; } + hpriv =devm_kzalloc (&pdev->dev,sizeof *hpriv,GFP_KERNEL ); +if (!hpriv) +return -ENOMEM ; +spin_lock_init (&hpriv->hard_reset_lock); + host->private_data = hpriv; host->iomap =pcim_iomap_table (pdev); is_sataii_tx4 =pdc_is_sataii_tx4 (pi->flags);
drivers/ata/sata_svw.c +35 -0
@@ -142,6 +142,39 @@ static int k2_sata_scr_write(struct ata_link *link,return 0 ; } +static int k2_sata_softreset (struct ata_link *link, +unsigned int *class,unsigned long deadline) +{ +u8 dmactl; +void __iomem *mmio = link->ap->ioaddr.bmdma_addr; + + dmactl =readb (mmio +ATA_DMA_CMD ); + +/* Clear the start bit */ +if (dmactl &ATA_DMA_START ) { + dmactl &= ~ATA_DMA_START ; +writeb (dmactl, mmio +ATA_DMA_CMD ); + } + +return ata_sff_softreset (link, class, deadline); +} + +static int k2_sata_hardreset (struct ata_link *link, +unsigned int *class,unsigned long deadline) +{ +u8 dmactl; +void __iomem *mmio = link->ap->ioaddr.bmdma_addr; + + dmactl =readb (mmio +ATA_DMA_CMD ); + +/* Clear the start bit */ +if (dmactl &ATA_DMA_START ) { + dmactl &= ~ATA_DMA_START ; +writeb (dmactl, mmio +ATA_DMA_CMD ); + } + +return sata_sff_hardreset (link, class, deadline); +}static void k2_sata_tf_load (struct ata_port *ap,const struct ata_taskfile *tf) {
@@ -346,6 +379,8 @@ static struct scsi_host_template k2_sata_sht = {static struct ata_port_operations k2_sata_ops = { .inherits = &ata_bmdma_port_ops, + .softreset = k2_sata_softreset, + .hardreset = k2_sata_hardreset, .sff_tf_load = k2_sata_tf_load, .sff_tf_read = k2_sata_tf_read, .sff_check_status = k2_stat_check_status,
drivers/atm/solos-pci.c +3 -2
@@ -967,10 +967,11 @@ static uint32_t fpga_tx(struct solos_card *card)for (port =0 ; tx_pending; tx_pending >>=1 , port++) {if (tx_pending &1 ) {struct sk_buff *oldskb = card->tx_skb[port]; -if (oldskb) +if (oldskb) {pci_unmap_single (card->dev,SKB_CB (oldskb)->dma_addr, oldskb->len,PCI_DMA_TODEVICE ); - + card->tx_skb[port] =NULL ; + }spin_lock (&card->tx_queue_lock); skb =skb_dequeue (&card->tx_queue[port]);if (!skb)
drivers/base/regmap/regmap-debugfs.c +1 -1
@@ -67,7 +67,7 @@ static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf,/* If we're in the region the user is trying to read */ if (p >= *ppos) {/* ...but not beyond it */ -if (buf_pos >= count -1 - tot_len) +if (buf_pos +1 + tot_len >= count)break ;/* Format the register */
drivers/bcma/driver_mips.c +1 -1
@@ -115,7 +115,7 @@ static void bcma_core_mips_set_irq(struct bcma_device *dev, unsigned int irq)bcma_read32 (mdev,BCMA_MIPS_MIPS74K_INTMASK (0 )) & ~(1 << irqflag)); else - bcma_write32(mdev, BCMA_MIPS_MIPS74K_INTMASK(irq), 0); + bcma_write32(mdev, BCMA_MIPS_MIPS74K_INTMASK(oldirq), 0);/* assign the new one */ if (irq ==0 ) {
drivers/bluetooth/ath3k.c +1 -0
@@ -66,6 +66,7 @@ static struct usb_device_id ath3k_table[] = { { USB_DEVICE(0x13d3, 0x3304) }, { USB_DEVICE(0x0930, 0x0215) }, { USB_DEVICE(0x0489, 0xE03D) }, + { USB_DEVICE(0x0489, 0xE027) },/* Atheros AR9285 Malbec with sflash firmware */ { USB_DEVICE(0x03F0, 0x311D) },
drivers/bluetooth/btusb.c +3 -0
@@ -104,6 +104,8 @@ static struct usb_device_id btusb_table[] = { { USB_DEVICE(0x0c10, 0x0000) },/* Broadcom BCM20702A0 */ + { USB_DEVICE(0x0b05, 0x17b5) }, + { USB_DEVICE(0x04ca, 0x2003) }, { USB_DEVICE(0x0489, 0xe042) }, { USB_DEVICE(0x413c, 0x8197) },
@@ -131,6 +133,7 @@ static struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, + { USB_DEVICE(0x0489, 0xe027), .driver_info = BTUSB_IGNORE }, /* Atheros AR9285 Malbec with sflash firmware */ { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
drivers/char/agp/intel-agp.h +1 -0
@@ -235,6 +235,7 @@#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_M_GT2_IG 0x0166#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_HB 0x0158/* Server */ #define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT1_IG 0x015A +#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT2_IG 0x016Aint intel_gmch_probe (struct pci_dev *pdev,struct agp_bridge_data *bridge);
drivers/char/agp/intel-gtt.c +2 -0
@@ -1459,6 +1459,8 @@ static const struct intel_gtt_driver_description { "Ivybridge", &sandybridge_gtt_driver }, {PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT1_IG , "Ivybridge", &sandybridge_gtt_driver }, + { PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT2_IG, + "Ivybridge", &sandybridge_gtt_driver }, { 0, NULL, NULL } };
drivers/char/ramoops.c +2 -2
@@ -126,8 +126,8 @@ static int __init ramoops_probe(struct platform_device *pdev) goto fail3; } -rounddown_pow_of_two (pdata->mem_size); -rounddown_pow_of_two (pdata->record_size); + pdata->mem_size =rounddown_pow_of_two (pdata->mem_size); + pdata->record_size =rounddown_pow_of_two (pdata->record_size);/* Check for the minimum memory size */ if (pdata->mem_size < MIN_MEM_SIZE &&
drivers/edac/i7300_edac.c +4 -4
@@ -215,8 +215,8 @@ static const char *ferr_fat_fbd_name[] = { [0 ] ="Memory Write error on non-redundant retry or " "FBD configuration Write error on retry", }; -#define GET_FBD_FAT_IDX (fbderr) (fbderr & (3 << 28)) -#define FERR_FAT_FBD_ERR_MASK ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3)) +#define GET_FBD_FAT_IDX (fbderr) (((fbderr) >> 28) & 3) +#define FERR_FAT_FBD_ERR_MASK ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 22))#define FERR_NF_FBD 0xa0static const char *ferr_nf_fbd_name[] = {
@@ -243,7 +243,7 @@ static const char *ferr_nf_fbd_name[] = { [1] = "Aliased Uncorrectable Non-Mirrored Demand Data ECC", [0] = "Uncorrectable Data ECC on Replay", }; -#define GET_FBD_NF_IDX (fbderr) (fbderr & (3 << 28)) +#define GET_FBD_NF_IDX (fbderr) (((fbderr) >> 28) & 3)#define FERR_NF_FBD_ERR_MASK ((1 << 24) | (1 << 23) | (1 << 22) | (1 << 21) |\ (1 << 18) | (1 << 17) | (1 << 16) | (1 << 15) |\ (1 << 14) | (1 << 13) | (1 << 11) | (1 << 10) |\
@@ -485,7 +485,7 @@ static void i7300_process_fbd_error(struct mem_ctl_info *mci) errnum =find_first_bit (&errors,ARRAY_SIZE (ferr_nf_fbd_name)); specific =GET_ERR_FROM_TABLE (ferr_nf_fbd_name, errnum); - branch = (GET_FBD_FAT_IDX (error_reg) ==2 ) ?1 :0 ; + branch = (GET_FBD_NF_IDX (error_reg) ==2 ) ?1 :0 ;pci_read_config_dword (pvt->pci_dev_16_1_fsb_addr_map,REDMEMA , &syndrome);
drivers/edac/i82975x_edac.c +4 -7
@@ -355,10 +355,6 @@ static enum dev_type i82975x_dram_type(void __iomem *mch_window, int rank)static void i82975x_init_csrows (struct mem_ctl_info *mci,struct pci_dev *pdev,void __iomem *mch_window) { -static const char *labels[4 ] = { -"DIMM A1" ,"DIMM A2" , -"DIMM B1" ,"DIMM B2" - };struct csrow_info *csrow;unsigned long last_cumul_size;u8 value;
@@ -399,9 +395,10 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci,* [0-3] for dual-channel; i.e. csrow->nr_channels = 2 */ for (chan =0 ; chan < csrow->nr_channels; chan++) -strncpy (csrow->channels[chan].label, - labels[(index >>1 ) + (chan *2 )], -EDAC_MC_LABEL_LEN ); + +snprintf (csrow->channels[chan].label,EDAC_MC_LABEL_LEN ,"DIMM %c%d" , + (chan ==0 ) ?'A' :'B' , + index);if (cumul_size == last_cumul_size)continue ;/* not populated */
drivers/firewire/net.c +9 -4
@@ -860,8 +860,8 @@ static void fwnet_receive_broadcast(struct fw_iso_context *context,if (specifier_id ==IANA_SPECIFIER_ID && ver ==RFC2734_SW_VERSION ) { buf_ptr +=2 ; length -=IEEE1394_GASP_HDR_SIZE ; -fwnet_incoming_packet (dev, buf_ptr, length, - source_node_id,-1 , true); +fwnet_incoming_packet (dev, buf_ptr, length, source_node_id, + context->card->generation, true); } packet.payload_length = dev->rcv_buffer_size;
@@ -956,7 +956,12 @@ static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask)break ; } -skb_pull (skb, ptask->max_payload); +if (ptask->dest_node ==IEEE1394_ALL_NODES ) { +skb_pull (skb, + ptask->max_payload +IEEE1394_GASP_HDR_SIZE ); + }else { +skb_pull (skb, ptask->max_payload); + }if (ptask->outstanding_pkts >1 ) {fwnet_make_sf_hdr (&ptask->hdr,RFC2374_HDR_INTFRAG , dg_size, fg_off, datagram_label);
@@ -1059,7 +1064,7 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask)smp_rmb (); node_id = dev->card->node_id; - p =skb_push (ptask->skb,8 ); + p =skb_push (ptask->skb,IEEE1394_GASP_HDR_SIZE );put_unaligned_be32 (node_id <<16 |IANA_SPECIFIER_ID >>8 , p);put_unaligned_be32 ((IANA_SPECIFIER_ID &0xff ) <<24 |RFC2734_SW_VERSION , &p[4 ]);
drivers/gpu/drm/drm_crtc_helper.c +2 -2
@@ -321,8 +321,8 @@ drm_crtc_prepare_encoders(struct drm_device *dev)* drm_crtc_set_mode - set a mode * @crtc: CRTC to program * @mode: mode to use -* @x: width of mode -* @y: height of mode +* @x: horizontal offset into the surface +* @y: vertical offset into the surface * * LOCKING: * Caller must hold mode config lock.
drivers/gpu/drm/drm_edid.c +5 -0
@@ -274,6 +274,11 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf, } }; ret =i2c_transfer (adapter, msgs,2 ); +if (ret == -ENXIO ) { +DRM_DEBUG_KMS ("drm: skipping non-existent adapter %s\n" , + adapter->name); +break ; + } }while (ret !=2 && --retries);return ret ==2 ?0 :-1 ;
drivers/gpu/drm/i915/i915_debugfs.c +2 -2
@@ -339,7 +339,7 @@ static int i915_gem_pageflip_info(struct seq_file *m, void *data)seq_printf (m,"No flip due on pipe %c (plane %c)\n" , pipe, plane); }else { -if (!work->pending) { +if (atomic_read (&work->pending) <INTEL_FLIP_COMPLETE ) {seq_printf (m,"Flip queued on pipe %c (plane %c)\n" , pipe, plane); }else {
@@ -350,7 +350,7 @@ static int i915_gem_pageflip_info(struct seq_file *m, void *data)seq_printf (m,"Stall check enabled, " ); else seq_printf(m, "Stall check waiting for page flip ioctl, "); -seq_printf (m,"%d prepares\n" , work->pending); +seq_printf (m,"%d prepares\n" ,atomic_read (&work->pending));if (work->old_fb_obj) {struct drm_i915_gem_object *obj = work->old_fb_obj;
drivers/gpu/drm/i915/i915_drv.c +1 -0
@@ -287,6 +287,7 @@ static const struct pci_device_id pciidlist[] = { /* aka */INTEL_VGA_DEVICE (0x0152 , &intel_ivybridge_d_info),/* GT1 desktop */ INTEL_VGA_DEVICE (0x0162 , &intel_ivybridge_d_info),/* GT2 desktop */ INTEL_VGA_DEVICE (0x015a , &intel_ivybridge_d_info),/* GT1 server */ +INTEL_VGA_DEVICE (0x016a , &intel_ivybridge_d_info),/* GT2 server */ {0, 0, 0} };
drivers/gpu/drm/i915/i915_gem.c +5 -0
@@ -1259,6 +1259,11 @@ out:case 0 :case -ERESTARTSYS :case -EINTR : +case -EBUSY : +/* +* EBUSY is ok: this just means that another thread +* already did the job. +*/ return VM_FAULT_NOPAGE ;case -ENOMEM :return VM_FAULT_OOM ;
drivers/gpu/drm/i915/i915_irq.c +3 -1
@@ -1187,7 +1187,9 @@ static void i915_pageflip_stall_check(struct drm_device *dev, int pipe)spin_lock_irqsave (&dev->event_lock, flags); work = intel_crtc->unpin_work; -if (work ==NULL || work->pending || !work->enable_stall_check) { +if (work ==NULL || +atomic_read (&work->pending) >=INTEL_FLIP_COMPLETE || + !work->enable_stall_check) {/* Either the pending flip IRQ arrived, or we're too early. Don't check */ spin_unlock_irqrestore (&dev->event_lock, flags);return ;
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -2816,6 +2816,8 @@#define _PFA_CTL_1 0x68080#define _PFB_CTL_1 0x68880#define PF_ENABLE (1<<31) +#define PF_PIPE_SEL_MASK_IVB (3<<29) +#define PF_PIPE_SEL_IVB (pipe) ((pipe)<<29)#define PF_FILTER_MASK (3<<23)#define PF_FILTER_PROGRAMMED (0<<23)#define PF_FILTER_MED_3x3 (1<<23)
drivers/gpu/drm/i915/intel_bios.c +2 -9
@@ -495,12 +495,8 @@ parse_edp(struct drm_i915_private *dev_priv, struct bdb_header *bdb) edp =find_section (bdb,BDB_EDP );if (!edp) { -if (SUPPORTS_EDP (dev_priv->dev) && dev_priv->edp.support) { -DRM_DEBUG_KMS ("No eDP BDB found but eDP panel " -"supported, assume %dbpp panel color " -"depth.\n" , - dev_priv->edp.bpp); - } +if (SUPPORTS_EDP (dev_priv->dev) && dev_priv->edp.support) +DRM_DEBUG_KMS ("No eDP BDB found but eDP panel supported.\n" );return ; }
@@ -653,9 +649,6 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) dev_priv->lvds_use_ssc =1 ; dev_priv->lvds_ssc_freq =intel_bios_ssc_frequency (dev,1 );DRM_DEBUG_KMS ("Set default to SSC at %dMHz\n" , dev_priv->lvds_ssc_freq); - -/* eDP data */ - dev_priv->edp.bpp =18 ; }static int __init intel_no_opregion_vbt_callback (const struct dmi_system_id *id)
drivers/gpu/drm/i915/intel_display.c +51 -44
187 lines not on this page · raw message
drivers/gpu/drm/i915/intel_drv.h +4 -1
@@ -257,7 +257,10 @@ struct intel_unpin_work {struct drm_i915_gem_object *old_fb_obj;struct drm_i915_gem_object *pending_flip_obj;struct drm_pending_vblank_event *event; -int pending; +atomic_t pending; +#define INTEL_FLIP_INACTIVE 0 +#define INTEL_FLIP_PENDING 1 +#define INTEL_FLIP_COMPLETE 2bool enable_stall_check; };
drivers/gpu/drm/i915/intel_lvds.c +16 -0
@@ -779,6 +779,22 @@ static const struct dmi_system_id intel_no_lvds[] = { DMI_MATCH(DMI_BOARD_NAME, "ZBOXSD-ID12/ID13"), }, }, + { + .callback = intel_no_lvds_dmi_callback, + .ident = "Gigabyte GA-D525TUD", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co., Ltd."), + DMI_MATCH(DMI_BOARD_NAME, "D525TUD"), + }, + }, + { + .callback = intel_no_lvds_dmi_callback, + .ident = "Supermicro X7SPA-H", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Supermicro"), + DMI_MATCH(DMI_PRODUCT_NAME, "X7SPA-H"), + }, + }, { }/* terminating entry */ };
drivers/gpu/drm/radeon/atombios_crtc.c +5 -0
@@ -541,6 +541,11 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,if (rdev->family <CHIP_RV770 ) pll->flags |=RADEON_PLL_PREFER_MINM_OVER_MAXP ; +/* use frac fb div on APUs */ +if (ASIC_IS_DCE41 (rdev)) + pll->flags |=RADEON_PLL_USE_FRAC_FB_DIV ; +if (ASIC_IS_DCE32 (rdev) && mode->clock >165000 ) + pll->flags |=RADEON_PLL_USE_FRAC_FB_DIV ; }else { pll->flags |=RADEON_PLL_LEGACY ;
drivers/gpu/drm/radeon/atombios_encoders.c +1 -1
@@ -111,7 +111,7 @@ static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, ((radeon_encoder->active_device & (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT)) || (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE))) {struct drm_connector *connector =radeon_get_connector_for_encoder (encoder); -radeon_dp_set_link_config (connector, mode); +radeon_dp_set_link_config (connector, adjusted_mode); }return true;
drivers/gpu/drm/radeon/evergreen.c +2 -2
@@ -1730,7 +1730,7 @@ static void evergreen_gpu_init(struct radeon_device *rdev)case CHIP_SUMO : rdev->config.evergreen.num_ses =1 ; rdev->config.evergreen.max_pipes =4 ; - rdev->config.evergreen.max_tile_pipes =2 ; + rdev->config.evergreen.max_tile_pipes =4 ;if (rdev->pdev->device ==0x9648 ) rdev->config.evergreen.max_simds =3 ; else if ((rdev->pdev->device == 0x9647) ||
@@ -1819,7 +1819,7 @@ static void evergreen_gpu_init(struct radeon_device *rdev)break ;case CHIP_CAICOS : rdev->config.evergreen.num_ses =1 ; - rdev->config.evergreen.max_pipes =4 ; + rdev->config.evergreen.max_pipes =2 ; rdev->config.evergreen.max_tile_pipes =2 ; rdev->config.evergreen.max_simds =2 ; rdev->config.evergreen.max_backends =1 * rdev->config.evergreen.num_ses;
drivers/hid/hid-apple.c +3 -0
@@ -458,6 +458,9 @@ static const struct hid_device_id apple_devices[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO), .driver_data =APPLE_NUMLOCK_EMULATION |APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, + USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI), + .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS), .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
drivers/hid/hid-core.c +1 -0
@@ -1386,6 +1386,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
drivers/hid/hid-ids.h +1 -0
@@ -131,6 +131,7 @@#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b +#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI 0x0255#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO 0x0256#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b
drivers/hid/hid-magicmouse.c +2 -0
@@ -418,6 +418,8 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h__set_bit (BTN_TOOL_TRIPLETAP , input->keybit);__set_bit (BTN_TOOL_QUADTAP , input->keybit);__set_bit (BTN_TOUCH , input->keybit); +__set_bit (INPUT_PROP_POINTER , input->propbit); +__set_bit (INPUT_PROP_BUTTONPAD , input->propbit); }if (report_touches) {
drivers/hwmon/coretemp.c +33 -1
@@ -190,6 +190,27 @@ static ssize_t show_temp(struct device *dev,return tdata->valid ?sprintf (buf,"%d\n" , tdata->temp) : -EAGAIN ; } +struct tjmax { +char const *id; +int tjmax; +}; + +static struct tjmax __cpuinitconst tjmax_table[] = { + {"CPU D410" ,100000 }, + {"CPU D425" ,100000 }, + {"CPU D510" ,100000 }, + {"CPU D525" ,100000 }, + {"CPU N450" ,100000 }, + {"CPU N455" ,100000 }, + {"CPU N470" ,100000 }, + {"CPU N475" ,100000 }, + {"CPU 230" ,100000 },/* Model 0x1c, stepping 2 */ + {"CPU 330" ,125000 },/* Model 0x1c, stepping 2 */ + {"CPU CE4110" ,110000 },/* Model 0x1c, stepping 10 */ + {"CPU CE4150" ,110000 },/* Model 0x1c, stepping 10 */ + {"CPU CE4170" ,110000 },/* Model 0x1c, stepping 10 */ +}; +static int adjust_tjmax (struct cpuinfo_x86 *c,u32 id,struct device *dev) {/* The 100C is default for both mobile and non mobile CPUs */
@@ -200,6 +221,13 @@ static int adjust_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev)int err;u32 eax, edx;struct pci_dev *host_bridge; +int i; + +/* explicit tjmax table entries override heuristics */ +for (i =0 ; i <ARRAY_SIZE (tjmax_table); i++) { +if (strstr (c->x86_model_id, tjmax_table[i].id)) +return tjmax_table[i].tjmax; + }/* Early chips have no MSR for TjMax */
@@ -208,7 +236,8 @@ static int adjust_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev)/* Atom CPUs */ -if (c->x86_model ==0x1c ) { +if (c->x86_model ==0x1c || c->x86_model ==0x26 + || c->x86_model ==0x27 ) { usemsr_ee =0 ; host_bridge =pci_get_bus_and_slot (0 ,PCI_DEVFN (0 ,0 ));
@@ -221,6 +250,9 @@ static int adjust_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev) tjmax =90000 ;pci_dev_put (host_bridge); + }else if (c->x86_model ==0x36 ) { + usemsr_ee =0 ; + tjmax =100000 ; }if (c->x86_model >0xe && usemsr_ee) {
drivers/hwmon/fam15h_power.c +4 -0
@@ -31,6 +31,9 @@ MODULE_DESCRIPTION("AMD Family 15h CPU processor power monitor");MODULE_AUTHOR ("Andreas Herrmann <[email protected]>" );MODULE_LICENSE ("GPL" ); +/* Family 16h Northbridge's function 4 PCI ID */ +#define PCI_DEVICE_ID_AMD_16H_NB_F4 0x1534 +/* D18F3 */ #define REG_NORTHBRIDGE_CAP 0xe8
@@ -256,6 +259,7 @@ static void __devexit fam15h_power_remove(struct pci_dev *pdev)static DEFINE_PCI_DEVICE_TABLE (fam15h_power_id_table) = { {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_NB_F4 ) }, + {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_16H_NB_F4 ) }, {} };MODULE_DEVICE_TABLE (pci, fam15h_power_id_table);
drivers/input/joystick/walkera0701.c +4 -3
@@ -196,6 +196,7 @@ static void walkera0701_close(struct input_dev *dev)struct walkera_dev *w =input_get_drvdata (dev);parport_disable_irq (w->parport); +hrtimer_cancel (&w->timer); }static int walkera0701_connect (struct walkera_dev *w,int parport)
@@ -224,6 +225,9 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)if (parport_claim (w->pardevice)) goto init_err1; +hrtimer_init (&w->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); + w->timer.function = timer_handler; + w->input_dev =input_allocate_device ();if (!w->input_dev) goto init_err2;
@@ -254,8 +258,6 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)if (err) goto init_err3; -hrtimer_init (&w->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); - w->timer.function = timer_handler;return 0 ; init_err3:
@@ -271,7 +273,6 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)static void walkera0701_disconnect (struct walkera_dev *w) { -hrtimer_cancel (&w->timer);input_unregister_device (w->input_dev);parport_release (w->pardevice);parport_unregister_device (w->pardevice);
drivers/input/serio/i8042-x86ia64io.h +9 -0
@@ -914,6 +914,7 @@ static int __init i8042_platform_init(void)int retval;#ifdef CONFIG_X86 +u8 a20_on =0xdf ;/* Just return if pre-detection shows no i8042 controller exist */ if (!x86_platform.i8042_detect ())return -ENODEV ;
@@ -953,6 +954,14 @@ static int __init i8042_platform_init(void)if (dmi_check_system (i8042_dmi_dritek_table)) i8042_dritek = true; + +/* +* A20 was already enabled during early kernel init. But some buggy +* BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to +* resume from S3. So we do it here and hope that nothing breaks. +*/ +i8042_command (&a20_on,0x10d1 ); +i8042_command (NULL ,0x00ff );/* Null command for SMM firmware */ #endif /* CONFIG_X86 */ return retval;
drivers/iommu/intel-iommu.c +9 -2
@@ -1801,10 +1801,17 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,if (!pte)return -ENOMEM ;/* It is large page*/ -if (largepage_lvl >1 ) +if (largepage_lvl >1 ) { pteval |=DMA_PTE_LARGE_PAGE ; -else +/* Ensure that old small page tables are removed to make room +for superpage, if they exist. */ +dma_pte_clear_range (domain, iov_pfn, + iov_pfn +lvl_to_nr_pages (largepage_lvl) -1 ); +dma_pte_free_pagetable (domain, iov_pfn, + iov_pfn +lvl_to_nr_pages (largepage_lvl) -1 ); + }else { pteval &= ~(uint64_t )DMA_PTE_LARGE_PAGE ; + } }/* We don't need lock here, nobody else
drivers/leds/leds-lp5521.c +10 -6
@@ -198,9 +198,14 @@ static int lp5521_load_program(struct lp5521_engine *eng, const u8 *pattern)/* move current engine to direct mode and remember the state */ ret =lp5521_set_engine_mode (eng,LP5521_CMD_DIRECT ); +if (ret) +return ret; +/* Mode change requires min 500 us delay. 1 - 2 ms with margin */ usleep_range (1000 ,2000 ); - ret |=lp5521_read (client,LP5521_REG_OP_MODE , &mode); + ret =lp5521_read (client,LP5521_REG_OP_MODE , &mode); +if (ret) +return ret;/* For loading, all the engines to load mode */ lp5521_write (client,LP5521_REG_OP_MODE ,LP5521_CMD_DIRECT );
@@ -216,8 +221,7 @@ static int lp5521_load_program(struct lp5521_engine *eng, const u8 *pattern)LP5521_PROG_MEM_SIZE , pattern); - ret |=lp5521_write (client,LP5521_REG_OP_MODE , mode); -return ret; +return lp5521_write (client,LP5521_REG_OP_MODE , mode); }static int lp5521_set_led_current (struct lp5521_chip *chip,int led,u8 curr)
@@ -692,9 +696,9 @@ static int __devinit lp5521_probe(struct i2c_client *client,* otherwise further access to the R G B channels in the * LP5521_REG_ENABLE register will not have any effect - strange! */ -lp5521_read (client,LP5521_REG_R_CURRENT , &buf); -if (buf !=LP5521_REG_R_CURR_DEFAULT ) { -dev_err (&client->dev,"error in reseting chip\n" ); + ret =lp5521_read (client,LP5521_REG_R_CURRENT , &buf); +if (ret || buf !=LP5521_REG_R_CURR_DEFAULT ) { +dev_err (&client->dev,"error in resetting chip\n" ); goto fail2; }usleep_range (10000 ,20000 );
drivers/md/dm-ioctl.c +8 -0
@@ -1562,6 +1562,14 @@ static int copy_params(struct dm_ioctl __user *user, struct dm_ioctl **param)if (copy_from_user (dmi, user, tmp.data_size)) goto bad; +/* +* Abort if something changed the ioctl data while it was being copied. +*/ +if (dmi->data_size != tmp.data_size) { +DMERR ("rejecting ioctl: data size modified while processing parameters" ); + goto bad; + } +/* Wipe the user buffer so we do not return it to userspace */ if (secure_data &&clear_user (user, tmp.data_size)) goto bad;
drivers/md/persistent-data/dm-btree-internal.h +8 -8
@@ -36,13 +36,13 @@ struct node_header {__le32 padding; } __packed; -struct node { +struct btree_node {struct node_header header;__le64 keys[0 ]; } __packed; -void inc_children (struct dm_transaction_manager *tm,struct node *n, +void inc_children (struct dm_transaction_manager *tm,struct btree_node *n,struct dm_btree_value_type *vt);int new_block (struct dm_btree_info *info,struct dm_block **result);
@@ -64,7 +64,7 @@ struct ro_spine {void init_ro_spine (struct ro_spine *s,struct dm_btree_info *info);int exit_ro_spine (struct ro_spine *s);int ro_step (struct ro_spine *s,dm_block_t new_child); -struct node *ro_node (struct ro_spine *s); +struct btree_node *ro_node (struct ro_spine *s);struct shadow_spine {struct dm_btree_info *info;
@@ -98,12 +98,12 @@ int shadow_root(struct shadow_spine *s);/* * Some inlines. */ -static inline __le64 *key_ptr (struct node *n,uint32_t index) +static inline __le64 *key_ptr (struct btree_node *n,uint32_t index) {return n->keys + index; } -static inline void *value_base (struct node *n) +static inline void *value_base (struct btree_node *n) {return &n->keys[le32_to_cpu (n->header.max_entries)]; }
@@ -111,7 +111,7 @@ static inline void *value_base(struct node *n)/* * FIXME: Now that value size is stored in node we don't need the third parm. */ -static inline void *value_ptr (struct node *n,uint32_t index,size_t value_size) +static inline void *value_ptr (struct btree_node *n,uint32_t index,size_t value_size) {BUG_ON (value_size !=le32_to_cpu (n->header.value_size));return value_base (n) + (value_size * index);
@@ -120,7 +120,7 @@ static inline void *value_ptr(struct node *n, uint32_t index, size_t value_size)/* * Assumes the values are suitably-aligned and converts to core format. */ -static inline uint64_t value64 (struct node *n,uint32_t index) +static inline uint64_t value64 (struct btree_node *n,uint32_t index) {__le64 *values_le =value_base (n);
@@ -130,7 +130,7 @@ static inline uint64_t value64(struct node *n, uint32_t index)/* * Searching for a key within a single node. */ -int lower_bound (struct node *n,uint64_t key); +int lower_bound (struct btree_node *n,uint64_t key);extern struct dm_block_validator btree_node_validator;
drivers/md/persistent-data/dm-btree-remove.c +25 -25
164 lines not on this page · raw message
drivers/md/persistent-data/dm-btree-spine.c +3 -3
@@ -23,7 +23,7 @@ static void node_prepare_for_write(struct dm_block_validator *v, struct dm_block *b, size_t block_size) { -struct node *n =dm_block_data (b); +struct btree_node *n =dm_block_data (b);struct node_header *h = &n->header; h->blocknr =cpu_to_le64 (dm_block_location (b));
@@ -38,7 +38,7 @@ static int node_check(struct dm_block_validator *v, struct dm_block *b, size_t block_size) { -struct node *n =dm_block_data (b); +struct btree_node *n =dm_block_data (b);struct node_header *h = &n->header;size_t value_size;__le32 csum_disk;
@@ -164,7 +164,7 @@ int ro_step(struct ro_spine *s, dm_block_t new_child)return r; } -struct node *ro_node (struct ro_spine *s) +struct btree_node *ro_node (struct ro_spine *s) {struct dm_block *block;
drivers/md/persistent-data/dm-btree.c +11 -11
@@ -38,7 +38,7 @@ static void array_insert(void *base, size_t elt_size, unsigned nr_elts,/*----------------------------------------------------------------*/ /* makes the assumption that no two keys are the same. */ -static int bsearch (struct node *n,uint64_t key,int want_hi) +static int bsearch (struct btree_node *n,uint64_t key,int want_hi) {int lo =-1 , hi =le32_to_cpu (n->header.nr_entries);
@@ -58,12 +58,12 @@ static int bsearch(struct node *n, uint64_t key, int want_hi)return want_hi ? hi : lo; } -int lower_bound (struct node *n,uint64_t key) +int lower_bound (struct btree_node *n,uint64_t key) {return bsearch (n, key,0 ); } -void inc_children (struct dm_transaction_manager *tm,struct node *n, +void inc_children (struct dm_transaction_manager *tm,struct btree_node *n,struct dm_btree_value_type *vt) {unsigned i;
@@ -78,7 +78,7 @@ void inc_children(struct dm_transaction_manager *tm, struct node *n, value_ptr(n, i, vt->size)); } -static int insert_at (size_t value_size,struct node *node,unsigned index, +static int insert_at (size_t value_size,struct btree_node *node,unsigned index,uint64_t key,void *value)__dm_written_to_disk (value) {
@@ -123,7 +123,7 @@ int dm_btree_empty(struct dm_btree_info *info, dm_block_t *root) {int r;struct dm_block *b; -struct node *n; +struct btree_node *n;size_t block_size;uint32_t max_entries;
@@ -155,7 +155,7 @@ EXPORT_SYMBOL_GPL(dm_btree_empty);#define MAX_SPINE_DEPTH 64struct frame {struct dm_block *b; -struct node *n; +struct btree_node *n;unsigned level;unsigned nr_children;unsigned current_child;
@@ -296,7 +296,7 @@ EXPORT_SYMBOL_GPL(dm_btree_del);/*----------------------------------------------------------------*/ static int btree_lookup_raw (struct ro_spine *s,dm_block_t block,uint64_t key, -int (*search_fn)(struct node *,uint64_t ), +int (*search_fn)(struct btree_node *,uint64_t ),uint64_t *result_key,void *v,size_t value_size) {int i, r;
@@ -407,7 +407,7 @@ static int btree_split_sibling(struct shadow_spine *s, dm_block_t root,size_t size;unsigned nr_left, nr_right;struct dm_block *left, *right, *parent; -struct node *ln, *rn, *pn; +struct btree_node *ln, *rn, *pn;__le64 location; left =shadow_current (s);
@@ -492,7 +492,7 @@ static int btree_split_beneath(struct shadow_spine *s, uint64_t key)size_t size;unsigned nr_left, nr_right;struct dm_block *left, *right, *new_parent; -struct node *pn, *ln, *rn; +struct btree_node *pn, *ln, *rn;__le64 val; new_parent =shadow_current (s);
@@ -577,7 +577,7 @@ static int btree_insert_raw(struct shadow_spine *s, dm_block_t root, uint64_t key, unsigned *index) { int r, i = *index, top = 1; -struct node *node; +struct btree_node *node;for (;;) { r =shadow_step (s, root, vt);
@@ -644,7 +644,7 @@ static int insert(struct dm_btree_info *info, dm_block_t root,unsigned level, index =-1 , last_level = info->levels -1 ;dm_block_t block = root;struct shadow_spine spine; -struct node *n; +struct btree_node *n;struct dm_btree_value_type le64_type; le64_type.context =NULL ;
drivers/mfd/mfd-core.c +13 -2
@@ -19,6 +19,10 @@#include <linux/slab.h> #include <linux/module.h> +static struct device_type mfd_dev_type = { + .name ="mfd_device" , +}; +int mfd_cell_enable (struct platform_device *pdev) {const struct mfd_cell *cell =mfd_get_cell (pdev);
@@ -88,6 +92,7 @@ static int mfd_add_device(struct device *parent, int id, goto fail_device; pdev->dev.parent = parent; + pdev->dev.type = &mfd_dev_type;if (cell->pdata_size) { ret = platform_device_add_data(pdev,
@@ -183,10 +188,16 @@ EXPORT_SYMBOL(mfd_add_devices);static int mfd_remove_devices_fn (struct device *dev,void *c) { -struct platform_device *pdev =to_platform_device (dev); -const struct mfd_cell *cell =mfd_get_cell (pdev); +struct platform_device *pdev; +const struct mfd_cell *cell;atomic_t **usage_count = c; +if (dev->type != &mfd_dev_type) +return 0 ; + + pdev =to_platform_device (dev); + cell =mfd_get_cell (pdev); +/* find the base address of usage_count pointers (for freeing) */ if (!*usage_count || (cell->usage_count < *usage_count)) *usage_count = cell->usage_count;
drivers/misc/hpilo.c +9 -2
@@ -735,7 +735,14 @@ static void ilo_remove(struct pci_dev *pdev)free_irq (pdev->irq, ilo_hw);ilo_unmap_device (pdev, ilo_hw);pci_release_regions (pdev); -pci_disable_device (pdev); +/* +* pci_disable_device(pdev) used to be here. But this PCI device has +* two functions with interrupt lines connected to a single pin. The +* other one is a USB host controller. So when we disable the PIN here +* e.g. by rmmod hpilo, the controller stops working. It is because +* the interrupt link is disabled in ACPI since it is not refcounted +* yet. See acpi_pci_link_free_irq called from acpi_pci_irq_disable. +*/ kfree (ilo_hw); ilo_hwdev[(minor /MAX_CCB )] =0 ; }
@@ -820,7 +827,7 @@ unmap: free_regions:pci_release_regions (pdev); disable: -pci_disable_device (pdev); +/* pci_disable_device(pdev); see comment in ilo_remove */ free:kfree (ilo_hw); out:
drivers/misc/sgi-xp/xpc_main.c +32 -2
@@ -53,6 +53,10 @@#include <linux/kthread.h> #include "xpc.h" +#ifdef CONFIG_X86_64 +#include <asm/traps.h> +#endif +/* define two XPC debug device structures to be used with dev_dbg() et al */ struct device_driver xpc_dbg_name = {
@@ -1079,6 +1083,9 @@ xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)return NOTIFY_DONE ; } +/* Used to only allow one cpu to complete disconnect */ +static unsigned int xpc_die_disconnecting; +/* * Notify other partitions to deactivate from us by first disengaging from all * references to our memory.
@@ -1092,6 +1099,9 @@ xpc_die_deactivate(void)long keep_waiting;long wait_to_print; +if (cmpxchg (&xpc_die_disconnecting,0 ,1 )) +return ; +/* keep xpc_hb_checker thread from doing anything (just in case) */ xpc_exiting =1 ;
@@ -1159,7 +1169,7 @@ xpc_die_deactivate(void)* about the lack of a heartbeat. */ static int -xpc_system_die (struct notifier_block *nb,unsigned long event,void *unused) +xpc_system_die (struct notifier_block *nb,unsigned long event,void *_die_args) {#ifdef CONFIG_IA64 /* !!! temporary kludge */ switch (event) {
@@ -1191,7 +1201,27 @@ xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused) break; }#else -xpc_die_deactivate (); +struct die_args *die_args = _die_args; + +switch (event) { +case DIE_TRAP : +if (die_args->trapnr ==X86_TRAP_DF ) +xpc_die_deactivate (); + +if (((die_args->trapnr ==X86_TRAP_MF ) || + (die_args->trapnr ==X86_TRAP_XF )) && + !user_mode_vm (die_args->regs)) +xpc_die_deactivate (); + +break ; +case DIE_INT3 : +case DIE_DEBUG : +break ; +case DIE_OOPS : +case DIE_GPF : +default : +xpc_die_deactivate (); + }#endif return NOTIFY_DONE ;
drivers/mmc/host/sh_mmcif.c +0 -4
@@ -1003,10 +1003,6 @@ static irqreturn_t sh_mmcif_intr(int irq, void *dev_id) host->sd_error = true;dev_dbg (&host->pd->dev,"int err state = %08x\n" , state); } -if (host->state ==STATE_IDLE ) { -dev_info (&host->pd->dev,"Spurious IRQ status 0x%x" , state); -return IRQ_HANDLED ; - }if (state & ~(INT_CMD12RBE |INT_CMD12CRE ))complete (&host->intr_wait);else
drivers/mtd/nand/gpmi-nand/gpmi-lib.c +9 -0
@@ -135,6 +135,15 @@ int gpmi_init(struct gpmi_nand_data *this)if (ret) goto err_out; +/* +* Reset BCH here, too. We got failures otherwise :( +* See later BCH reset for explanation of MX23 handling +*/ + ret =gpmi_reset_block (r->bch_regs,GPMI_IS_MX23 (this)); +if (ret) + goto err_out; + +/* Choose NAND mode. */ writel (BM_GPMI_CTRL1_GPMI_MODE , r->gpmi_regs +HW_GPMI_CTRL1_CLR );
drivers/net/bonding/bond_main.c +7 -0
@@ -1366,6 +1366,8 @@ static void bond_compute_features(struct bonding *bond)struct net_device *bond_dev = bond->dev;u32 vlan_features =BOND_VLAN_FEATURES ;unsigned short max_hard_header_len =ETH_HLEN ; +unsigned int gso_max_size =GSO_MAX_SIZE ; +u16 gso_max_segs =GSO_MAX_SEGS ;int i;read_lock (&bond->lock);
@@ -1379,11 +1381,16 @@ static void bond_compute_features(struct bonding *bond)if (slave->dev->hard_header_len > max_hard_header_len) max_hard_header_len = slave->dev->hard_header_len; + + gso_max_size =min (gso_max_size, slave->dev->gso_max_size); + gso_max_segs =min (gso_max_segs, slave->dev->gso_max_segs); } done: bond_dev->vlan_features = vlan_features; bond_dev->hard_header_len = max_hard_header_len; + bond_dev->gso_max_segs = gso_max_segs; +netif_set_gso_max_size (bond_dev, gso_max_size);read_unlock (&bond->lock);
drivers/net/bonding/bond_sysfs.c +2 -0
@@ -1579,6 +1579,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, goto out; } +read_lock (&bond->lock);bond_for_each_slave (bond, slave, i) {if (!bond_is_active_slave (slave)) {if (new_value)
@@ -1587,6 +1588,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, slave->inactive =1 ; } } +read_unlock (&bond->lock); out:return ret; }
drivers/net/can/dev.c +1 -2
@@ -569,8 +569,7 @@ void close_candev(struct net_device *dev) {struct can_priv *priv =netdev_priv (dev); -if (del_timer_sync (&priv->restart_timer)) -dev_put (dev); +del_timer_sync (&priv->restart_timer);can_flush_echo_skb (dev); }EXPORT_SYMBOL_GPL (close_candev);
drivers/net/ethernet/8390/ne.c +1 -0
@@ -814,6 +814,7 @@ static int __init ne_drv_probe(struct platform_device *pdev) dev->irq = irq[this_dev]; dev->mem_end = bad[this_dev]; } +SET_NETDEV_DEV (dev, &pdev->dev); err =do_ne_probe (dev);if (err) {free_netdev (dev);
drivers/net/irda/sir_dev.c +1 -1
@@ -222,7 +222,7 @@ static void sirdev_config_fsm(struct work_struct *work)break ;case SIRDEV_STATE_DONGLE_SPEED : -if (dev->dongle_drv->reset) { +if (dev->dongle_drv->set_speed) { ret = dev->dongle_drv->set_speed (dev, fsm->param);if (ret <0 ) { fsm->result = ret;
drivers/net/usb/ipheth.c +5 -0
@@ -62,6 +62,7 @@#define USB_PRODUCT_IPAD 0x129a#define USB_PRODUCT_IPHONE_4_VZW 0x129c#define USB_PRODUCT_IPHONE_4S 0x12a0 +#define USB_PRODUCT_IPHONE_5 0x12a8#define IPHETH_USBINTF_CLASS 255#define IPHETH_USBINTF_SUBCLASS 253
@@ -113,6 +114,10 @@ static struct usb_device_id ipheth_table[] = { USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4S,IPHETH_USBINTF_CLASS ,IPHETH_USBINTF_SUBCLASS , IPHETH_USBINTF_PROTO) }, + { USB_DEVICE_AND_INTERFACE_INFO( +USB_VENDOR_APPLE ,USB_PRODUCT_IPHONE_5 , +IPHETH_USBINTF_CLASS ,IPHETH_USBINTF_SUBCLASS , + IPHETH_USBINTF_PROTO) }, { } };MODULE_DEVICE_TABLE (usb, ipheth_table);
drivers/net/wimax/i2400m/i2400m-usb.h +3 -0
@@ -152,6 +152,9 @@ enum {/* Device IDs */ USB_DEVICE_ID_I6050 =0x0186 ,USB_DEVICE_ID_I6050_2 =0x0188 , +USB_DEVICE_ID_I6150 =0x07d6 , +USB_DEVICE_ID_I6150_2 =0x07d7 , +USB_DEVICE_ID_I6150_3 =0x07d9 , USB_DEVICE_ID_I6250 = 0x0187, };
drivers/net/wimax/i2400m/usb.c +6 -0
@@ -492,6 +492,9 @@ int i2400mu_probe(struct usb_interface *iface,switch (id->idProduct) {case USB_DEVICE_ID_I6050 :case USB_DEVICE_ID_I6050_2 : +case USB_DEVICE_ID_I6150 : +case USB_DEVICE_ID_I6150_2 : +case USB_DEVICE_ID_I6150_3 :case USB_DEVICE_ID_I6250 : i2400mu->i6050 =1 ;break ;
@@ -741,6 +744,9 @@ staticstruct usb_device_id i2400mu_id_table[] = { {USB_DEVICE (0x8086 ,USB_DEVICE_ID_I6050 ) }, {USB_DEVICE (0x8086 ,USB_DEVICE_ID_I6050_2 ) }, + {USB_DEVICE (0x8087 ,USB_DEVICE_ID_I6150 ) }, + {USB_DEVICE (0x8087 ,USB_DEVICE_ID_I6150_2 ) }, + {USB_DEVICE (0x8087 ,USB_DEVICE_ID_I6150_3 ) }, {USB_DEVICE (0x8086 ,USB_DEVICE_ID_I6250 ) }, {USB_DEVICE (0x8086 ,0x0181 ) }, {USB_DEVICE (0x8086 ,0x1403 ) },
drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h +86 -86
184 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar9003_eeprom.h +3 -3
@@ -69,13 +69,13 @@#define AR9300_BASE_ADDR 0x3ff#define AR9300_BASE_ADDR_512 0x1ff -#define AR9300_OTP_BASE 0x14000 -#define AR9300_OTP_STATUS 0x15f18 +#define AR9300_OTP_BASE (AR_SREV_9340(ah) ? 0x30000 : 0x14000) +#define AR9300_OTP_STATUS (AR_SREV_9340(ah) ? 0x30018 : 0x15f18)#define AR9300_OTP_STATUS_TYPE 0x7#define AR9300_OTP_STATUS_VALID 0x4#define AR9300_OTP_STATUS_ACCESS_BUSY 0x2#define AR9300_OTP_STATUS_SM_BUSY 0x1 -#define AR9300_OTP_READ_DATA 0x15f1c +#define AR9300_OTP_READ_DATA (AR_SREV_9340(ah) ? 0x3001c : 0x15f1c)enum targetPowerHTRates {HT_TARGET_RATE_0_8_16 ,
drivers/net/wireless/ath/ath9k/ar9003_hw.c +4 -7
@@ -34,9 +34,6 @@*/ static void ar9003_hw_init_mode_regs (struct ath_hw *ah) { -#define PCIE_PLL_ON_CREQ_DIS_L1_2P0 \ - ar9462_pciephy_pll_on_clkreq_disable_L1_2p0 -#define AR9462_BB_CTX_COEFJ (x) \ ar9462_##x##_baseband_core_txfir_coeff_japan_2484
@@ -369,13 +366,13 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)/* Awake -> Sleep Setting */ INIT_INI_ARRAY (&ah->iniPcieSerdes, -PCIE_PLL_ON_CREQ_DIS_L1_2P0 , -ARRAY_SIZE (PCIE_PLL_ON_CREQ_DIS_L1_2P0 ), + ar9462_pciephy_clkreq_disable_L1_2p0, +ARRAY_SIZE (ar9462_pciephy_clkreq_disable_L1_2p0),2 );/* Sleep -> Awake Setting */ INIT_INI_ARRAY (&ah->iniPcieSerdesLowPower, -PCIE_PLL_ON_CREQ_DIS_L1_2P0 , -ARRAY_SIZE (PCIE_PLL_ON_CREQ_DIS_L1_2P0 ), + ar9462_pciephy_clkreq_disable_L1_2p0, +ARRAY_SIZE (ar9462_pciephy_clkreq_disable_L1_2p0),2 );/* Fast clock modal settings */
drivers/net/wireless/ath/ath9k/calib.c +1 -0
@@ -69,6 +69,7 @@ s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan)if (chan && chan->noisefloor) {s8 delta = chan->noisefloor - +ATH9K_NF_CAL_NOISE_THRESH -ath9k_hw_get_default_nf (ah, chan);if (delta >0 ) noise += delta;
drivers/net/wireless/ath/ath9k/calib.h +3 -0
@@ -22,6 +22,9 @@#define AR_PHY_CCA_FILTERWINDOW_LENGTH_INIT 3#define AR_PHY_CCA_FILTERWINDOW_LENGTH 5 +/* Internal noise floor can vary by about 6db depending on the frequency */ +#define ATH9K_NF_CAL_NOISE_THRESH 6 +#define NUM_NF_READINGS 6#define ATH9K_NF_CAL_HIST_MAX 5
drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c +31 -4
@@ -311,6 +311,14 @@ static void iwlagn_rx_allocate(struct iwl_trans *trans, gfp_t priority) rxb->page_dma =dma_map_page (bus (trans)->dev, page,0 ,PAGE_SIZE <<hw_params (trans).rx_page_order,DMA_FROM_DEVICE ); +if (dma_mapping_error (bus (trans)->dev, rxb->page_dma)) { + rxb->page =NULL ; +spin_lock_irqsave (&rxq->lock, flags); +list_add (&rxb->list, &rxq->rx_used); +spin_unlock_irqrestore (&rxq->lock, flags); +__free_pages (page,hw_params (trans).rx_page_order); +return ; + }/* dma address must be no more than 36 bits */ BUG_ON (rxb->page_dma & ~DMA_BIT_MASK (36 ));/* and also 256 byte aligned! */
@@ -489,8 +497,19 @@ static void iwl_rx_handle(struct iwl_trans *trans)0 ,PAGE_SIZE <<hw_params (trans).rx_page_order, DMA_FROM_DEVICE); -list_add_tail (&rxb->list, &rxq->rx_free); - rxq->free_count++; +if (dma_mapping_error (bus (trans)->dev, rxb->page_dma)) { +/* +* free the page(s) as well to not break +* the invariant that the items on the used +* list have no page(s) +*/ +__free_pages (rxb->page,hw_params (trans).rx_page_order); + rxb->page =NULL ; +list_add_tail (&rxb->list, &rxq->rx_used); + }else { +list_add_tail (&rxb->list, &rxq->rx_free); + rxq->free_count++; + } }else list_add_tail (&rxb->list, &rxq->rx_used);
@@ -1263,12 +1282,20 @@ static irqreturn_t iwl_isr(int irq, void *data)* back-to-back ISRs and sporadic interrupts from our NIC. * If we have something to service, the tasklet will re-enable ints. * If we *don't* have something, we'll re-enable before leaving here. */ - inta_mask =iwl_read32 (bus (trans),CSR_INT_MASK );/* just for debug */ + inta_mask =iwl_read32 (bus (trans),CSR_INT_MASK );iwl_write32 (bus (trans),CSR_INT_MASK ,0x00000000 );/* Discover which interrupts are active/pending */ inta =iwl_read32 (bus (trans),CSR_INT ); +if (inta & (~inta_mask)) { +IWL_DEBUG_ISR (trans, +"We got a masked interrupt (0x%08x)...Ack and ignore\n" , + inta & (~inta_mask)); +iwl_write32 (bus (trans),CSR_INT , inta & (~inta_mask)); + inta &= inta_mask; + } +/* Ignore interrupt if there's nothing in NIC to service. * This may be due to IRQ shared with another device, * or due to sporadic interrupts thrown from our NIC. */
@@ -1349,7 +1376,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data)* If we have something to service, the tasklet will re-enable ints. * If we *don't* have something, we'll re-enable before leaving here. */ - inta_mask =iwl_read32 (bus (trans),CSR_INT_MASK );/* just for debug */ + inta_mask =iwl_read32 (bus (trans),CSR_INT_MASK );iwl_write32 (bus (trans),CSR_INT_MASK ,0x00000000 );
drivers/net/wireless/rt2x00/rt2800lib.c +2 -1
@@ -4208,7 +4208,8 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)IEEE80211_HW_SIGNAL_DBM |IEEE80211_HW_SUPPORTS_PS |IEEE80211_HW_PS_NULLFUNC_STACK | -IEEE80211_HW_AMPDU_AGGREGATION ; +IEEE80211_HW_AMPDU_AGGREGATION | +IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL ;/* * Don't set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING for USB devices * unless we are capable of sending the buffered frames out after the
drivers/pnp/pnpacpi/core.c +4 -1
@@ -58,7 +58,7 @@ static inline int __init is_exclusive_device(struct acpi_device *dev)if (!(('0' <= (c ) && (c) <='9' ) || ('A' <= (c ) && (c) <='F' ))) \ return 0#define TEST_ALPHA (c) \ - if (!('@' <= (c) || (c) <= 'Z')) \ + if (!('A' <= (c) && (c) <= 'Z')) \ return 0static int __init ispnpidacpi (const char *id) {
@@ -95,6 +95,9 @@ static int pnpacpi_set_resources(struct pnp_dev *dev)return -ENODEV ; } +if (WARN_ON_ONCE (acpi_dev != dev->data)) + dev->data = acpi_dev; + ret =pnpacpi_build_resource_template (dev, &buffer);if (ret)return ret;
drivers/regulator/wm831x-dcdc.c +1 -1
@@ -330,7 +330,7 @@ static int wm831x_buckv_set_voltage(struct regulator_dev *rdev,if (vsel > dcdc->dvs_vsel) { ret =wm831x_set_bits (wm831x, dvs_reg,WM831X_DC1_DVS_VSEL_MASK , - dcdc->dvs_vsel); + vsel);if (ret ==0 ) dcdc->dvs_vsel = vsel;else
drivers/s390/cio/device_pgid.c +5 -5
@@ -234,7 +234,7 @@ static int pgid_cmp(struct pgid *p1, struct pgid *p2)* Determine pathgroup state from PGID data. */ static void pgid_analyze (struct ccw_device *cdev,struct pgid **p, -int *mismatch,int *reserved,u8 *reset) +int *mismatch,u8 *reserved,u8 *reset) {struct pgid *pgid = &cdev->private->pgid[0 ];struct pgid *first =NULL ;
@@ -248,7 +248,7 @@ static void pgid_analyze(struct ccw_device *cdev, struct pgid **p,if ((cdev->private->pgid_valid_mask & lpm) ==0 )continue ;if (pgid->inf.ps.state2 ==SNID_STATE2_RESVD_ELSE ) - *reserved =1 ; + *reserved |= lpm;if (pgid_is_reset (pgid)) { *reset |= lpm;continue ;
@@ -316,14 +316,14 @@ static void snid_done(struct ccw_device *cdev, int rc)struct subchannel *sch =to_subchannel (cdev->dev.parent);struct pgid *pgid;int mismatch =0 ; -int reserved =0 ; +u8 reserved =0 ;u8 reset =0 ;u8 donepm;if (rc) goto out;pgid_analyze (cdev, &pgid, &mismatch, &reserved, &reset); -if (reserved) +if (reserved == cdev->private->pgid_valid_mask) rc = -EUSERS ;else if (mismatch) rc = -EOPNOTSUPP ;
@@ -336,7 +336,7 @@ static void snid_done(struct ccw_device *cdev, int rc) } out:CIO_MSG_EVENT (2 ,"snid: device 0.%x.%04x: rc=%d pvm=%02x vpm=%02x " -"todo=%02x mism=%d rsvd=%d reset=%02x\n" , id->ssid, +"todo=%02x mism=%d rsvd=%02x reset=%02x\n" , id->ssid, id->devno, rc, cdev->private->pgid_valid_mask, sch->vpm, cdev->private->pgid_todo_mask, mismatch, reserved, reset);switch (rc) {
drivers/scsi/aha152x.c +2 -2
@@ -2985,8 +2985,8 @@ static int get_command(char *pos, Scsi_Cmnd * ptr)char *start = pos;int i; -SPRINTF ("0x%08x: target=%d; lun=%d; cmnd=( " , - (unsigned int ) ptr, ptr->device->id, ptr->device->lun); +SPRINTF ("%p: target=%d; lun=%d; cmnd=( " , + ptr, ptr->device->id, ptr->device->lun);for (i =0 ; i <COMMAND_SIZE (ptr->cmnd[0 ]); i++)SPRINTF ("0x%02x " , ptr->cmnd[i]);
drivers/scsi/hpsa.c +25 -7
@@ -98,6 +98,15 @@ static const struct pci_device_id hpsa_pci_device_id[] = { {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3354}, {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3355}, {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3356}, + {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSH, 0x103C, 0x1920}, + {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSH, 0x103C, 0x1921}, + {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSH, 0x103C, 0x1922}, + {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSH, 0x103C, 0x1923}, + {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSH, 0x103C, 0x1924}, + {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSH, 0x103C, 0x1925}, + {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSH, 0x103C, 0x1926}, + {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSH, 0x103C, 0x1928}, + {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x334d}, {PCI_VENDOR_ID_HP, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0}, {0,}
@@ -117,13 +126,22 @@ static struct board_type products[] = { {0x3249103C, "Smart Array P812", &SA5_access}, {0x324a103C, "Smart Array P712m", &SA5_access}, {0x324b103C, "Smart Array P711m", &SA5_access}, - {0x3350103C, "Smart Array", &SA5_access}, - {0x3351103C, "Smart Array", &SA5_access}, - {0x3352103C, "Smart Array", &SA5_access}, - {0x3353103C, "Smart Array", &SA5_access}, - {0x3354103C, "Smart Array", &SA5_access}, - {0x3355103C, "Smart Array", &SA5_access}, - {0x3356103C, "Smart Array", &SA5_access}, + {0x3350103C, "Smart Array P222", &SA5_access}, + {0x3351103C, "Smart Array P420", &SA5_access}, + {0x3352103C, "Smart Array P421", &SA5_access}, + {0x3353103C, "Smart Array P822", &SA5_access}, + {0x3354103C, "Smart Array P420i", &SA5_access}, + {0x3355103C, "Smart Array P220i", &SA5_access}, + {0x3356103C, "Smart Array P721m", &SA5_access}, + {0x1920103C, "Smart Array", &SA5_access}, + {0x1921103C, "Smart Array", &SA5_access}, + {0x1922103C, "Smart Array", &SA5_access}, + {0x1923103C, "Smart Array", &SA5_access}, + {0x1924103C, "Smart Array", &SA5_access}, + {0x1925103C, "Smart Array", &SA5_access}, + {0x1926103C, "Smart Array", &SA5_access}, + {0x1928103C, "Smart Array", &SA5_access}, + {0x334d103C, "Smart Array P822se", &SA5_access}, {0xFFFF103C, "Unknown Smart Array", &SA5_access}, };
drivers/scsi/mvsas/mv_94xx.h +2 -12
@@ -258,21 +258,11 @@ enum sas_sata_phy_regs {#define SPI_ADDR_VLD_94XX (1U << 1)#define SPI_CTRL_SpiStart_94XX (1U << 0) -#define mv_ffc (x) ffz(x) -static inline int mv_ffc64 (u64 v) { -int i; - i =mv_ffc ((u32 )v); -if (i >=0 ) -return i; - i =mv_ffc ((u32)(v>>32 )); - -if (i !=0 ) -return 32 + i; - -return -1 ; +u64 x = ~v; +return x ?__ffs64 (x) :-1 ; }#define r_reg_set_enable (i) \
drivers/scsi/mvsas/mv_sas.h +1 -1
@@ -69,7 +69,7 @@ extern struct kmem_cache *mvs_task_list_cache;#define DEV_IS_EXPANDER (type) \ ((type == EDGE_DEV) || (type == FANOUT_DEV)) -#define bit (n) ((u32)1 << n) +#define bit (n) ((u64)1 << n)#define for_each_phy (__lseq_mask, __mc, __lseq) \ for ((__mc) = (__lseq_mask), (__lseq) = 0; \
drivers/scsi/qla2xxx/qla_os.c +2 -2
@@ -3541,9 +3541,9 @@ qla2x00_do_dpc(void *data) "ISP abort end.\n"); } -if (test_bit (FCPORT_UPDATE_NEEDED , &base_vha->dpc_flags)) { +if (test_and_clear_bit (FCPORT_UPDATE_NEEDED , + &base_vha->dpc_flags)) {qla2x00_update_fcports (base_vha); -clear_bit (FCPORT_UPDATE_NEEDED , &base_vha->dpc_flags); }if (test_bit (ISP_QUIESCE_NEEDED , &base_vha->dpc_flags)) {
drivers/scsi/scsi_sysfs.c +4 -7
@@ -246,11 +246,11 @@ show_shost_active_mode(struct device *dev, static DEVICE_ATTR(active_mode, S_IRUGO | S_IWUSR, show_shost_active_mode, NULL); -static int check_reset_type (char *str) +static int check_reset_type (const char *str) { -if (strncmp (str,"adapter" ,10 ) ==0 ) +if (sysfs_streq (str,"adapter" ))return SCSI_ADAPTER_RESET ; -else if (strncmp (str,"firmware" ,10 ) ==0 ) +else if (sysfs_streq (str,"firmware" ))return SCSI_FIRMWARE_RESET ;else return 0 ;
@@ -263,12 +263,9 @@ store_host_reset(struct device *dev, struct device_attribute *attr,struct Scsi_Host *shost =class_to_shost (dev);struct scsi_host_template *sht = shost->hostt;int ret = -EINVAL ; -char str[10 ];int type; -sscanf (buf,"%s" , str); - type =check_reset_type (str); - + type =check_reset_type (buf);if (!type) goto exit_store_host_reset;
drivers/staging/bcm/InterfaceInit.c +3 -1
@@ -4,10 +4,12 @@ static struct usb_device_id InterfaceUsbtable[] = { { USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3) }, { USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3B) }, { USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3L) }, - { USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_SM250) }, + { USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_SYM) }, { USB_DEVICE(BCM_USB_VENDOR_ID_ZTE, BCM_USB_PRODUCT_ID_226) }, { USB_DEVICE(BCM_USB_VENDOR_ID_FOXCONN, BCM_USB_PRODUCT_ID_1901) }, { USB_DEVICE(BCM_USB_VENDOR_ID_ZTE, BCM_USB_PRODUCT_ID_ZTE_TU25) }, + { USB_DEVICE(BCM_USB_VENDOR_ID_ZTE, BCM_USB_PRODUCT_ID_ZTE_226) }, + { USB_DEVICE(BCM_USB_VENDOR_ID_ZTE, BCM_USB_PRODUCT_ID_ZTE_326) }, { } };MODULE_DEVICE_TABLE (usb, InterfaceUsbtable);
drivers/staging/bcm/InterfaceInit.h +3 -2
@@ -8,10 +8,11 @@#define BCM_USB_PRODUCT_ID_T3 0x0300#define BCM_USB_PRODUCT_ID_T3B 0x0210#define BCM_USB_PRODUCT_ID_T3L 0x0220 -#define BCM_USB_PRODUCT_ID_SM250 0xbccd#define BCM_USB_PRODUCT_ID_SYM 0x15E#define BCM_USB_PRODUCT_ID_1901 0xe017 -#define BCM_USB_PRODUCT_ID_226 0x0132 +#define BCM_USB_PRODUCT_ID_226 0x0132/* not sure if this is valid */ +#define BCM_USB_PRODUCT_ID_ZTE_226 0x172 +#define BCM_USB_PRODUCT_ID_ZTE_326 0x173/* ZTE AX326 */ #define BCM_USB_PRODUCT_ID_ZTE_TU25 0x0007#define BCM_USB_MINOR_BASE 192
drivers/staging/vt6656/dpc.c +2 -2
@@ -1238,7 +1238,7 @@ static BOOL s_bHandleRxEncryption ( PayloadLen -= (WLAN_HDR_ADDR3_LEN +8 +4 );// 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc *pdwRxTSC47_16 =cpu_to_le32 (*(PDWORD )(pbyIV +4 )); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %lx\n" ,*pdwRxTSC47_16); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %x\n" , *pdwRxTSC47_16);if (byDecMode ==KEY_CTL_TKIP ) { *pwRxTSC15_0 =cpu_to_le16 (MAKEWORD (*(pbyIV+2 ), *pbyIV)); }else {
@@ -1349,7 +1349,7 @@ static BOOL s_bHostWepRxEncryption ( PayloadLen -= (WLAN_HDR_ADDR3_LEN +8 +4 );// 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc *pdwRxTSC47_16 =cpu_to_le32 (*(PDWORD )(pbyIV +4 )); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %lx\n" ,*pdwRxTSC47_16); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %x\n" , *pdwRxTSC47_16);if (byDecMode ==KEY_CTL_TKIP ) { *pwRxTSC15_0 =cpu_to_le16 (MAKEWORD (*(pbyIV+2 ), *pbyIV));
drivers/staging/vt6656/key.c +36 -17
133 lines not on this page · raw message
drivers/staging/vt6656/key.h +4 -4
@@ -58,7 +58,7 @@ typedef struct tagSKeyItem { BOOL bKeyValid; - unsigned long uKeyLength; + u32 uKeyLength; BYTE abyKey[MAX_KEY_LEN]; QWORD KeyRSC; DWORD dwTSC47_16;
@@ -107,7 +107,7 @@ BOOL KeybSetKey(PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
@@ -146,7 +146,7 @@ BOOL KeybSetDefaultKey(void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
@@ -156,7 +156,7 @@ BOOL KeybSetAllGroupKey(void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
drivers/staging/vt6656/mac.c +4 -2
@@ -262,7 +262,8 @@ BYTE pbyData[24]; dwData1 <<=16 ; dwData1 |=MAKEWORD (*(pbyAddr+4 ), *(pbyAddr+5 )); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "1. wOffset: %d, Data: %lX, KeyCtl:%X\n" , wOffset, dwData1, wKeyCtl); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "1. wOffset: %d, Data: %X," \ +" KeyCtl:%X\n" , wOffset, dwData1, wKeyCtl);//VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset); //VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData);
@@ -279,7 +280,8 @@ BYTE pbyData[24]; dwData2 <<=8 ; dwData2 |= *(pbyAddr+0 ); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "2. wOffset: %d, Data: %lX\n" , wOffset, dwData2); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "2. wOffset: %d, Data: %X\n" , + wOffset, dwData2);//VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset); //VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData);
drivers/staging/vt6656/rf.c +3 -0
@@ -769,6 +769,9 @@ BYTE byPwr = pDevice->byCCKPwr;return TRUE; } +if (uCH ==0 ) +return -EINVAL ; +switch (uRATE) {case RATE_1M :case RATE_2M :
drivers/staging/vt6656/rxtx.c +12 -6
@@ -377,7 +377,8 @@ s_vFillTxKey ( *(pbyIVHead+3 ) = (BYTE )(((pDevice->byKeyIndex <<6 ) &0xc0 ) |0x20 );// 0x20 is ExtIV // Append IV&ExtIV after Mac Header *pdwExtIV =cpu_to_le32 (pTransmitKey->dwTSC47_16); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "vFillTxKey()---- pdwExtIV: %lx\n" , *pdwExtIV); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "vFillTxKey()---- pdwExtIV: %x\n" , + *pdwExtIV);
Lines of this file are not shown. View the raw message.
drivers/target/iscsi/iscsi_target_login.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/target/iscsi/iscsi_target_nego.c +8 -2
Lines of this file are not shown. View the raw message.
drivers/usb/core/message.c +31 -22
53 lines not on this page · raw message
include/linux/freezer.h +41 -10
51 lines not on this page · raw message
kernel/cgroup.c +21 -31
52 lines not on this page · raw message
sound/usb/midi.c +58 -33
91 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
In reply to Ben HutchingsQuoted 7 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andreas Hartmann <[email protected]>
commit
be03d4a45c09ee5100d3aaaedd087f19bc20d01fupstream.
[...]
This patch is a workaround for
mac80211: retry sending failed BAR frames later instead of tearing down aggr (http://www.spinics.net/lists/linux-wireless/msg76379.html - f0425beda4d404a6e751439b562100b902ba9c98)
See:
http://thread.gmane.org/gmane.linux.kernel.wireless.general/83297/focus=83304
Meanwhile there was a bug report complaining about problems with be03d4a45 when used as STA:
http://thread.gmane.org/gmane.linux.drivers.rt2x00.user/1257
You can find there a few other workaround proposals.
Stanislaw Gruszka proposed here a final(?) workaround, which refines workaround be03d4a45c by shrinking it to AP function:
http://thread.gmane.org/gmane.linux.kernel.wireless.general/100793
carl9170 had the same problem with f0425beda. There it was fixed like this:
http://thread.gmane.org/gmane.linux.kernel.wireless.general/100793/focus=1405
This approach fixes the real problem (no aggregation handling by the firmware / hardware) by implementing it into the driver.
Unfortunately, I didn't see any implementation of c9122c0d63a50 for rt2x00 until now.
Kind regards,
Andreas Hartmann
Re: [ 016/173] use clamp_t in UNAME26 fix
In reply to Ben HutchingsQuoted 7 lines · Ben Hutchings
The min/max call needed to have explicit types on some architectures (e.g. mn10300). Use
clamp_tinstead to avoid the warning:
kernel/sys.c: In function 'override_release':
kernel/sys.c:1287:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]Reported-by Fengguang Wu <[email protected]>
[...]
kernel/sys.c static int override_release(char __user *release, size_t len) · line 1287
Quoted 1 line
kernel/sys.c +0
-1- copy =min (sizeof (buf),max_t (size_t,1 , len));
I don't understand how this happens given that v2.6.36-rc1~68 (MN10300: Fix size_t and ssize_t, 2010-08-12) was supposed to fix this kind of thing. Doesn't sizeof(buf) have type size_t already (C99 §6.5.3.4 "the sizeof operator" ¶4)?
What version of gcc produces this warning?
Puzzled,
Jonathan
Re: [ 024/173] drm/i915: add Ivy Bridge GT2 Server entries
In reply to Ben HutchingsQuoted 1 line · Ben Hutchings
This adds PCI ID for IVB GT2 server variant which we were missing.
As discussed at [1], this triggers a small regression with Debian wheezy userspace (X freezing instead of erroring out). libdrm hasn't been updated in wheezy since then, and I wouldn't be surprised if other distros were affected, too. Has there been a kernel patch since then to avoid that?
Though I wouldn't mind seeing this applied anyway, FWIW, as long as the announcement mentions the userspace bugfix needed.
Thanks,
Jonathan
[1] http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/978320/focus=74843
Re: [ 016/173] use clamp_t in UNAME26 fix
In reply to Jonathan NiederQuoted 8 lines · Jonathan Nieder
Quoted 6 lines · Ben Hutchings
The min/max call needed to have explicit types on some architectures (e.g. mn10300). Use
clamp_tinstead to avoid the warning:
kernel/sys.c: In function 'override_release':
kernel/sys.c:1287:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]
Quoted 7 lines
Quoted 1 line
Reported-by Fengguang Wu <[email protected]>[...]
kernel/sys.c static int override_release(char __user *release, size_t len) · line 1287
Quoted 1 line
kernel/sys.c +0
-1- copy =min (sizeof (buf),max_t (size_t,1 , len));I don't understand how this happens given that v2.6.36-rc1~68 (MN10300: Fix
size_tandssize_t, 2010-08-12) was supposed to fix this kind of thing.
[...]
Neither do I, but I'm including it now just to be consistent with other stable series.
Ben.
Signature · 2 lines
Ben Hutchings It is easier to change the specification to fit the program than vice versa.
Re: [ 016/173] use clamp_t in UNAME26 fix
Quoted 16 lines · Ben Hutchings
Quoted 8 lines · Jonathan Nieder
Quoted 6 lines · Ben Hutchings
The min/max call needed to have explicit types on some architectures (e.g. mn10300). Use
clamp_tinstead to avoid the warning:
kernel/sys.c: In function 'override_release':
kernel/sys.c:1287:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]Quoted 7 lines
Quoted 1 line
Reported-by Fengguang Wu <[email protected]>[...]
kernel/sys.c static int override_release(char __user *release, size_t len) · line 1287
Quoted 1 line
kernel/sys.c +0
-1- copy =min (sizeof (buf),max_t (size_t,1 , len));I don't understand how this happens given that v2.6.36-rc1~68 (MN10300: Fix
size_tandssize_t, 2010-08-12) was supposed to fix this kind of thing.
Quoted 4 lines
[...]
Neither do I, but I'm including it now just to be consistent with other stable series.
Thanks for explaining. That makes sense and the patch is harmless, so why not.
The patch still leaves me worried that there might be more problems lurking on mn10300, but that's more of a question for upstream.
Re: [ 024/173] drm/i915: add Ivy Bridge GT2 Server entries
In reply to Jonathan NiederQuoted 10 lines · Jonathan Nieder
Quoted 1 line · Ben Hutchings
This adds PCI ID for IVB GT2 server variant which we were missing.
As discussed at [1], this triggers a small regression with Debian wheezy userspace (X freezing instead of erroring out). libdrm hasn't been updated in wheezy since then, and I wouldn't be surprised if other distros were affected, too. Has there been a kernel patch since then to avoid that?
Quoted 4 lines
Though I wouldn't mind seeing this applied anyway, FWIW, as long as the announcement mentions the userspace bugfix needed.
[1] http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/978320/focus=74843
Sorry, forgot we'd discussed this before. Thinking over this again, I'm not convinced that X freezing at startup is a significant regression from X failing to start. Either way, it's unusable unless you explicitly configure it to use vesa.
Ben.
Signature · 2 lines
Ben Hutchings It is easier to change the specification to fit the program than vice versa.
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
In reply to Andreas HartmannQuoted 20 lines · Andreas Hartmann
Quoted 7 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andreas Hartmann <[email protected]>
commit
be03d4a45c09ee5100d3aaaedd087f19bc20d01fupstream.[...]
This patch is a workaround for
mac80211: retry sending failed BAR frames later instead of tearing down aggr (http://www.spinics.net/lists/linux-wireless/msg76379.html -
f0425beda4d404a6e751439b562100b902ba9c98)
See:
http://thread.gmane.org/gmane.linux.kernel.wireless.general/83297/focus=83304
Quoted 4 lines
Meanwhile there was a bug report complaining about problems with
be03d4a45when used as STA:
http://thread.gmane.org/gmane.linux.drivers.rt2x00.user/1257
You can find there a few other workaround proposals.
[...]
OK, I'll drop this for now. Once this is sorted out, please send to stable a complete list of fixes that are needed.
Ben.
Signature · 2 lines
Ben Hutchings It is easier to change the specification to fit the program than vice versa.
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
Quoted 21 lines · Ben Hutchings
Quoted 20 lines · Andreas Hartmann
Quoted 7 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andreas Hartmann <[email protected]>
commit
be03d4a45c09ee5100d3aaaedd087f19bc20d01fupstream.[...]
This patch is a workaround for
mac80211: retry sending failed BAR frames later instead of tearing down aggr (http://www.spinics.net/lists/linux-wireless/msg76379.html -
f0425beda4d404a6e751439b562100b902ba9c98)
See:
http://thread.gmane.org/gmane.linux.kernel.wireless.general/83297/focus=83304
Quoted 8 lines
Quoted 4 lines
Meanwhile there was a bug report complaining about problems with
be03d4a45when used as STA:
http://thread.gmane.org/gmane.linux.drivers.rt2x00.user/1257
You can find there a few other workaround proposals.[...]
OK, I'll drop this for now. Once this is sorted out, please send to stable a complete list of fixes that are needed.
To be clear, I have all of these in the queue:
be03d4a45c09 rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails 5b632fe85ec8 mac80211: introduce IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL ab9d6e4ffe19 Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"
and I'm intending to drop/defer them all.
Ben.
Signature · 2 lines
Ben Hutchings It is easier to change the specification to fit the program than vice versa.
Re: [ 032/173] cgroup: cgroup_subsys->fork() should be called after the task is added to css_set
In reply to Ben HutchingsHi Ben,
At Fri, 28 Dec 2012 20:04:02 +0100,
Quoted 32 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <[email protected]>
commit
5edee61edeaaebafe584f8fb7074c1ef4658596bupstream.cgroup core has a bug which violates a basic rule about event notifications - when a new entity needs to be added, you add that to the notification list first and then make the new entity conform to the current state. If done in the reverse order, an event happening inbetween will be lost.
cgroup_subsys->fork()is invoked way before the new task is added to thecss_set. Currently,cgroup_freezeris the only user of ->fork() and uses it to make new tasks conform to the current state of the freezer. If FROZEN state is requested while fork is in progress betweencgroup_fork_callbacks()andcgroup_post_fork(), the child could escape freezing - the cgroup isn't frozen when ->fork() is called and the freezer couldn't see the new task on thecss_set.This patch moves
cgroup_subsys->fork()invocation tocgroup_post_fork()after the new task is added to thecss_set.cgroup_fork_callbacks()is removed.Because now a task may be migrated during
cgroup_subsys->fork(),freezer_fork()is updated so that it adheres to the usual RCU locking and the rather pointless comment on why locking can be different there is removed (if it doesn't make anything simpler, why even bother?).
Quoted 8 lines
Signed-off-by Tejun Heo <[email protected]>Cc Oleg Nesterov <[email protected]>Cc Rafael J. Wysocki <[email protected]>[bwh: Backported to 3.2:
- Adjust context
- Iterate over firstCGROUP_BUILTIN_SUBSYS_COUNTelements of subsys
-cgroup_subsys::forktakescgroup_subsyspointer as first parameter]Signed-off-by Ben Hutchings <[email protected]>
I failed to compile 3.2.36-rc1 with my x86_64 box with enabling cgroup.
build log:
===============================================================================
...
CC kernel/cgroup.okernel/cgroup.c: In function ‘cgroup_post_fork’:kernel/cgroup.c:4540:5: warning: passing argument 1 of ‘ss->fork’ from incompatible pointer type [enabled by default] kernel/cgroup.c:4540:5: note: expected ‘struct cgroup_subsys *’ but argument is of type ‘struct task_struct *’ kernel/cgroup.c:4540:5: error: too few arguments to function ‘ss->fork’
make[2]: *** [kernel/cgroup.o] Error 1
make[1]: *** [kernel] Error 2
make[1]: Leaving directory `/home/sat/src/linux-stable'
make: *** [debian/stamp/build/kernel] Error 2
===============================================================================
It comes from the ss->fork()'s API change introduced by commit 761b3ef50e1c2.
Quoted 5 lines
(quoted diff) +1
-0@@ -4551,7 +4529,21 @@ void cgroup_post_fork(struct task_struct task_unlock(child); write_unlock(&css_set_lock); } +
Review void cgroup_post_fork(struct task_struct · line 4542
Quoted 10 lines
(quoted diff) +10
-0+ /* + * Call ss->fork(). This must happen after @child is linked on + * css_set; otherwise, @child might change state between ->fork() + * and addition to css_set. + */ + if (need_forkexit_callback) { + for (i = 0; i < CGROUP_BUILTIN_SUBSYS_COUNT; i++) { + struct cgroup_subsys *ss = subsys[i]; + if (ss->fork) + ss->fork(child);
I found you mentioned this difference in the desctiption as follows.
Review void cgroup_post_fork(struct task_struct · line 4543
Quoted 1 line
(quoted diff) +0
-0- cgroup_subsys::fork takes cgroup_subsys pointer as first parameter]
I guess you attached the wrong patch, or you forgot to modify the original patch. Here is the correct patch for the latter case. It just change "ss->fork(child)" to "ss->fork(ss, child)" as your description.
Thanks,
Satoru
---
From: Tejun Heo <[email protected]>
Date: Tue, 16 Oct 2012 15:03:14 -0700
Subject: cgroup: cgroup_subsys->fork() should be called after the task is
added to css_set
commit 5edee61edeaaebafe584f8fb7074c1ef4658596b upstream.
cgroup core has a bug which violates a basic rule about event notifications - when a new entity needs to be added, you add that to the notification list first and then make the new entity conform to the current state. If done in the reverse order, an event happening inbetween will be lost.
cgroup_subsys->fork() is invoked way before the new task is added to the css_set. Currently, cgroup_freezer is the only user of ->fork() and uses it to make new tasks conform to the current state of the freezer. If FROZEN state is requested while fork is in progress between cgroup_fork_callbacks() and cgroup_post_fork(), the child could escape freezing - the cgroup isn't frozen when ->fork() is called and the freezer couldn't see the new task on the css_set.
This patch moves cgroup_subsys->fork() invocation to cgroup_post_fork() after the new task is added to the css_set. cgroup_fork_callbacks() is removed.
Because now a task may be migrated during cgroup_subsys->fork(), freezer_fork() is updated so that it adheres to the usual RCU locking and the rather pointless comment on why locking can be different there is removed (if it doesn't make anything simpler, why even bother?).
[bwh: Backported to 3.2:
- Adjust context
- Iterate over first CGROUP_BUILTIN_SUBSYS_COUNT elements of subsys
- cgroup_subsys::fork takes cgroup_subsys pointer as first parameter]
--- include/linux/cgroup.h | 1 - kernel/cgroup.c | 62 +++++++++++++++++++++++------------------------ kernel/cgroup_freezer.c | 13 +++------- kernel/fork.c | 9 +------ 4 files changed, 35 insertions(+), 50 deletions(-)
include/linux/cgroup.h +0 -1
@@ -32,7 +32,6 @@ extern int cgroup_lock_is_held(void);extern bool cgroup_lock_live_group (struct cgroup *cgrp);extern void cgroup_unlock (void );extern void cgroup_fork (struct task_struct *p); -extern void cgroup_fork_callbacks (struct task_struct *p);extern void cgroup_post_fork (struct task_struct *p);extern void cgroup_exit (struct task_struct *p,int run_callbacks); extern int cgroupstats_build(struct cgroupstats *stats,
kernel/cgroup.c +21 -29
69 lines not on this page · raw message
kernel/cgroup_freezer.c +4 -9
@@ -197,23 +197,15 @@ static void freezer_fork(struct cgroup_s {struct freezer *freezer; -/* -* No lock is needed, since the task isn't on tasklist yet, -* so it can't be moved to another cgroup, which means the -* freezer won't be removed and will be valid during this -* function call. Nevertheless, apply RCU read-side critical -* section to suppress RCU lockdep false positives. -*/ rcu_read_lock (); freezer =task_freezer (task); -rcu_read_unlock ();/* * The root cgroup is non-freezable, so we can skip the * following check. */ if (!freezer->css.cgroup->parent) -return ; + goto out;spin_lock_irq (&freezer->lock);BUG_ON (freezer->state ==CGROUP_FROZEN );
@@ -221,7 +213,10 @@ static void freezer_fork(struct cgroup_s/* Locking avoids race with FREEZING -> THAWED transitions. */ if (freezer->state ==CGROUP_FREEZING )freeze_task (task, true); +spin_unlock_irq (&freezer->lock); +out: +rcu_read_unlock (); }/*
kernel/fork.c +1 -8
@@ -1057,7 +1057,6 @@ static struct task_struct *copy_process( {int retval;struct task_struct *p; -int cgroup_callbacks_done =0 ;if ((clone_flags & (CLONE_NEWNS |CLONE_FS )) == (CLONE_NEWNS |CLONE_FS ))return ERR_PTR (-EINVAL );
@@ -1312,12 +1311,6 @@ static struct task_struct *copy_process( p->group_leader = p;INIT_LIST_HEAD (&p->thread_group); -/* Now that the task is set up, run cgroup callbacks if -* necessary. We need to run them before the task is visible -* on the tasklist. */ -cgroup_fork_callbacks (p); - cgroup_callbacks_done =1 ; -/* Need tasklist lock for parent etc handling! */ write_lock_irq (&tasklist_lock);
@@ -1419,7 +1412,7 @@ bad_fork_cleanup_cgroup:#endif if (clone_flags &CLONE_THREAD )threadgroup_fork_read_unlock (current); -cgroup_exit (p, cgroup_callbacks_done); +cgroup_exit (p,0 );delayacct_tsk_free (p);module_put (task_thread_info (p)->exec_domain->module); bad_fork_cleanup_count:
Re: [ 032/173] cgroup: cgroup_subsys->fork() should be called after the task is added to css_set
Quoted 12 lines · Satoru Takeuchi
Hi Ben,
At Fri, 28 Dec 2012 20:04:02 +0100,
Quoted 8 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <[email protected]>
commit
5edee61edeaaebafe584f8fb7074c1ef4658596bupstream.
[...]
Quoted 17 lines
I failed to compile 3.2.36-rc1 with my
x86_64box with enabling cgroup.build log:
===============================================================================
...
CCkernel/cgroup.okernel/cgroup.c: In function ‘cgroup_post_fork’:kernel/cgroup.c:4540:5: warning: passing argument 1 of ‘ss->fork’ from incompatible pointer type [enabled by default]kernel/cgroup.c:4540:5: note: expected ‘structcgroup_subsys*’ but argument is of type ‘structtask_struct*’kernel/cgroup.c:4540:5: error: too few arguments to function ‘ss->fork’
make[2]: *** [kernel/cgroup.o] Error 1
make[1]: *** [kernel] Error 2
make[1]: Leaving directory `/home/sat/src/linux-stable'
make: *** [debian/stamp/build/kernel] Error 2
===============================================================================It comes from the ss->fork()'s API change introduced by commit
761b3ef50e1c2.
[...]
Quoted 7 lines
I found you mentioned this difference in the desctiption as follows.
Quoted 1 line
-
cgroup_subsys::forktakescgroup_subsyspointer as first parameter]I guess you attached the wrong patch, or you forgot to modify the original patch. Here is the correct patch for the latter case. It just change "
ss->fork(child)" to "ss->fork(ss, child)" as your description.
[...]
The correct version is in the combined patch, but I somehow missed refreshing this individual patch. Thanks for pointing this out.
Ben.
Signature · 2 lines
Ben Hutchings It is easier to change the specification to fit the program than vice versa.
Re: [ 032/173] cgroup: cgroup_subsys->fork() should be called after the task is added to css_set
At Tue, 01 Jan 2013 14:20:56 +0000,
Ben Hutchings wrote:
...
Quoted 33 lines
Quoted 10 lines
At Fri, 28 Dec 2012 20:04:02 +0100,
Quoted 8 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <[email protected]>
commit
5edee61edeaaebafe584f8fb7074c1ef4658596bupstream.[...]
Quoted 17 lines
I failed to compile 3.2.36-rc1 with my
x86_64box with enabling cgroup.build log:
===============================================================================
...
CCkernel/cgroup.okernel/cgroup.c: In function ‘cgroup_post_fork’:kernel/cgroup.c:4540:5: warning: passing argument 1 of ‘ss->fork’ from incompatible pointer type [enabled by default]kernel/cgroup.c:4540:5: note: expected ‘structcgroup_subsys*’ but argument is of type ‘structtask_struct*’kernel/cgroup.c:4540:5: error: too few arguments to function ‘ss->fork’
make[2]: *** [kernel/cgroup.o] Error 1
make[1]: *** [kernel] Error 2
make[1]: Leaving directory `/home/sat/src/linux-stable'
make: *** [debian/stamp/build/kernel] Error 2
===============================================================================It comes from the ss->fork()'s API change introduced by commit
761b3ef50e1c2.[...]
Quoted 4 lines
I found you mentioned this difference in the desctiption as follows.
Quoted 1 line
-
cgroup_subsys::forktakescgroup_subsyspointer as first parameter]
Quoted 7 lines
Quoted 3 lines
I guess you attached the wrong patch, or you forgot to modify the original patch. Here is the correct patch for the latter case. It just change "
ss->fork(child)" to "ss->fork(ss, child)" as your description.[...]
The correct version is in the combined patch, but I somehow missed refreshing this individual patch. Thanks for pointing this out.
Ah, I got your patches from your git tree instead of combined patch since I lost that patch's mail. Anyway, this kernel can be built and boot without any problem. Building a kernel with this kernel also works fine.
- Build Machine: debian wheezy x86_64
CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz x 4
memory: 8GB
- Test machine: debian wheezy x86_64(KVM guest on the Build Machine)
vCPU: x2
memory: 2GB
I reviewed the following patches and it looks good to me.
Quoted 7 lines
Al Viro (1):
ARM: missing ->mmap_sem around find_vma() in swp_emulate.c [7bf9b7bef881aac820bf1f2e9951a17b09bd7e04]Alan Cox (3):
ACPI: missing break
[879dca019dc43a1622edca3e7dde644b14b5acc5]
...
Quoted 5 lines
Artem Bityutskiy (1):
proc: pid/status: show all supplementary groups
[8d238027b87e654be552eabdf492042a34c5c300]Ben Hutchings (4):
...
Quoted 6 lines
Revert "
device_cgroup: fix RCU usage"
[not upstream; change was correct for mainline but not 3.2]
Revert "mm: vmscan: fix endless loop in kswapd balancing"
[not upstream; change was correct for mainline but not 3.2]
mm: addkmap_to_page()
[part of5a178119b0fbe37f7dfb602b37df9cc4b1dc9d71]
...
Quoted 1 line
Dan Carpenter (3):
...
Quoted 2 lines
ftrace: Clear bits properly in
reset_iter_read()
[70f77b3f7ec010ff9624c1f2e39a81babc9e2429]
...
Quoted 9 lines
David Rientjes (1):
thp, memcg: split hugepage for memcg oom on cow
[1f1d06c34f7675026326cd9f39ff91e4555cf355]David Woodhouse (2):
intel-iommu: Free old page tables before creating superpage
[6491d4d02893d9787ba67279595990217177b351]
solos-pci: fix double-free of TX skb in DMA mode
[cae49ede00ec3d0cda290b03fee55b72b49efc11]
...
Quoted 11 lines
Eric Dumazet (1):
rcu: Fix batch-limit size problem
[878d7439d0f45a95869e417576774673d1fa243f]Eric Sandeen (1):
ext4: init pagevec inext4_da_block_invalidatepages
[66bea92c69477a75a5d37b9bfed5773c92a3c4b4]Eugene Shatokhin (1):
ext4: fix memory leak in ext4_xattr_set_acl()'s error path
[24ec19b0ae83a385ad9c55520716da671274b96c]
...
Quoted 2 lines
x86: hpet: Fix masking of MSI interrupts
[6acf5a8c931da9d26c8dd77d784daaf07fa2bff0]
...
Quoted 3 lines
Kees Cook (2):
exec: do not leave bprm->interp on stack [b66c5984017533316fd1951770302649baf1aa33]
...
Quoted 4 lines
Marek Szyprowski (1):
mm: dmapool: use provided gfp flags for alldma_alloc_coherent()calls
[387870f2d6d679746020fa8e25ef786ff338dc98]
...
Quoted 3 lines
Mel Gorman (1):
tmpfs: fix shared mempolicy leak
[18a2f371f5edf41810f6469cb9be39931ef9deb9]
...
Quoted 3 lines
Mike Galbraith (1):
Revert "sched, autogroup: Stop going ahead if autogroup is disabled"
[fd8ef11730f1d03d5d6555aa53126e9e34f52f12]
...
Quoted 3 lines
Steven Rostedt (1):
ring-buffer: Fix NULL pointer ifrb_set_head_page()fails
[54f7be5b831254199522523ccab4c3d954bbf576]
...
Quoted 13 lines
Tejun Heo (4):
cgroup: cgroup_subsys->fork() should be called after the task is added to css_set [5edee61edeaaebafe584f8fb7074c1ef4658596b] cgroup: remove incorrect dget/dput() pair in cgroup_create_dir() [175431635ec09b1d1bba04979b006b99e8305a83] freezer: add missing mb's to freezer_count() and freezer_should_skip() [dd67d32dbc5de299d70cc9e10c6c1e29ffa56b92] workqueue: convert BUG_ON()s in __queue_delayed_work() to WARN_ON_ONCE()s [fc4b514f2727f74a4587c31db87e0e93465518c3]Thomas Gleixner (1):
genirq: Always force thread affinity
[04aa530ec04f61875b99c12721162e2964e3318c]
...
Quoted 1 line
Will Deacon (4):
...
Quoted 6 lines
mm: highmem: export
kmap_to_pagefor modules
[f0263d2d222e9e25f2587e51a9dc58c6fb2a9352]
virtio: 9p: correctly pass physical address to userspace for high pages
[b9cdc88df8e63e81c723b82c286fc97f5d0dc325]
virtio: force vring descriptors to be allocated from lowmem
[b92b1b89a33c172c075edccf6afb0edc41d851fd]
...
Quoted 3 lines
Xiaotian Feng (1):
[libata] fix Null pointer dereference on disk error
[26cd4d65deba587f3cf2329b6869ce02bcbe68ec]
Thanks,
Satoru
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
In reply to Ben HutchingsQuoted 31 lines · Ben Hutchings
Quoted 21 lines · Ben Hutchings
Quoted 20 lines · Andreas Hartmann
Quoted 7 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andreas Hartmann <[email protected]>
commit
be03d4a45c09ee5100d3aaaedd087f19bc20d01fupstream.[...]
This patch is a workaround for
mac80211: retry sending failed BAR frames later instead of tearing down aggr (http://www.spinics.net/lists/linux-wireless/msg76379.html -
f0425beda4d404a6e751439b562100b902ba9c98)
See:
http://thread.gmane.org/gmane.linux.kernel.wireless.general/83297/focus=83304Quoted 8 lines
Quoted 4 lines
Meanwhile there was a bug report complaining about problems with
be03d4a45when used as STA:
http://thread.gmane.org/gmane.linux.drivers.rt2x00.user/1257
You can find there a few other workaround proposals.[...]
OK, I'll drop this for now. Once this is sorted out, please send to stable a complete list of fixes that are needed.
Quoted 7 lines
To be clear, I have all of these in the queue:
be03d4a45c09rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails5b632fe85ec8mac80211: introduceIEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILab9d6e4ffe19Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"and I'm intending to drop/defer them all.
Patch 3 is a revert of patch 1 (questioned patch). Please apply all 3 patches, or only patch 2.
Stanislaw
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
Quoted 10 lines · Stanislaw Gruszka
Quoted 7 lines
To be clear, I have all of these in the queue:
be03d4a45c09rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails5b632fe85ec8mac80211: introduceIEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILab9d6e4ffe19Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"and I'm intending to drop/defer them all.
Patch 3 is a revert of patch 1 (questioned patch). Please apply all 3 patches, or only patch 2.
No, actually all 3 patches have to be applied. Because last one, except revert, include flag IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL setting in rt2x00 driver, which make patch 2 work.
Stanislaw
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
In reply to Stanislaw GruszkaQuoted 4 lines · Stanislaw Gruszka
Quoted 2 lines · Ben Hutchings
To be clear, I have all of these in the queue:
Quoted 8 lines
Quoted 5 lines
be03d4a45c09rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails5b632fe85ec8mac80211: introduceIEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILab9d6e4ffe19Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"and I'm intending to drop/defer them all.
Patch 3 is a revert of patch 1 (questioned patch). Please apply all 3 patches, or only patch 2.
Despite its title, isn't patch 3 not exactly a revert? It includes a change that depends on patch 2. I don't think patch 2 alone would have any effect.
Jonathan
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
Quoted 9 lines · Jonathan Nieder
Quoted 8 lines · Stanislaw Gruszka
Quoted 6 lines · Ben Hutchings
To be clear, I have all of these in the queue:
be03d4a45c09rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails5b632fe85ec8mac80211: introduceIEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILab9d6e4ffe19Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
and I'm intending to drop/defer them all.
Patch 3 is a revert of patch 1 (questioned patch). Please apply all 3 patches, or only patch 2.
Despite its title, isn't patch 3 not exactly a revert? It includes a change that depends on patch 2. I don't think patch 2 alone would have any effect.
Yes, all 3 patches should go in.
Stanislaw
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
In reply to Stanislaw GruszkaQuoted 7 lines · Stanislaw Gruszka
Quoted 6 lines · Stanislaw Gruszka
Quoted 6 lines
To be clear, I have all of these in the queue:
be03d4a45c09rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails5b632fe85ec8mac80211: introduceIEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILab9d6e4ffe19Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
and I'm intending to drop/defer them all.
Patch 3 is a revert of patch 1 (questioned patch). Please apply all 3 patches, or only patch 2.
No, actually all 3 patches have to be applied. Because last one, except revert, include flag
IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILsetting in rt2x00 driver, which make patch 2 work.
Andreas said that that after ab9d6e4ffe19 there was still a regression. But maybe he was confused. I know I'm confused.
Ben.
Signature · 2 lines
Ben Hutchings If you seem to know what you are doing, you'll be given more to do.
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
Quoted 13 lines · Ben Hutchings
Quoted 12 lines · Stanislaw Gruszka
Quoted 10 lines · Stanislaw Gruszka
Quoted 7 lines
To be clear, I have all of these in the queue:
be03d4a45c09rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails5b632fe85ec8mac80211: introduceIEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILab9d6e4ffe19Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"and I'm intending to drop/defer them all.
Patch 3 is a revert of patch 1 (questioned patch). Please apply all 3 patches, or only patch 2.
Quoted 6 lines
Quoted 3 lines
No, actually all 3 patches have to be applied. Because last one, except revert, include flag
IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILsetting in rt2x00 driver, which make patch 2 work.Andreas said that that after
ab9d6e4ffe19there was still a regression. But maybe he was confused. I know I'm confused.
:-))
No, the thing is:
rt2800pci misses an appropriate handling of aggregation (which meets the requirements of mac80211).
Both workarounds, mine and the new workaround from Stanislaw (which is nothing more than a restricted version of my initial workaround), work like this:
Let the peer do the aggregation handling. If it's not done by the peer, the connection will break down.
Therefore:
The solution would be IMHO, to implement an own aggregation handling, maybe the same way as it was done for carl9170, which had the same problem:
http://thread.gmane.org/gmane.linux.kernel.wireless.general/100793/focus=1405
I prefer to have solutions (if one is known) instead of another workaround. If I use my device as STA instead of an AP, it even works fine w/o Stanislaws patch. Do you understand what I'm trying to say?
Thanks,
kind regards,
Andreas
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
Quoted 6 lines · Andreas Hartmann
The solution would be IMHO, to implement an own aggregation handling, maybe the same way as it was done for carl9170, which had the same problem:
http://thread.gmane.org/gmane.linux.kernel.wireless.general/100793/focus=1405
I prefer to have solutions (if one is known) instead of another workaround.
JFI, I'm just working on exactly that (handling BAR TX status in driver to implement
proper RX reorder window flushing at the peer). I'll post it for further testing to the
rt2x00 list once I'm done.
Helmut
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
In reply to Andreas HartmannQuoted 11 lines · Andreas Hartmann
Quoted 10 lines · Ben Hutchings
Quoted 9 lines · Stanislaw Gruszka
Quoted 8 lines · Stanislaw Gruszka
Quoted 7 lines
To be clear, I have all of these in the queue:
be03d4a45c09rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails5b632fe85ec8mac80211: introduceIEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILab9d6e4ffe19Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"and I'm intending to drop/defer them all.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Patch 3 is a revert of patch 1 (questioned patch). Please apply all 3 patches, or only patch 2.
No, actually all 3 patches have to be applied. Because last one, except revert, include flag
IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILsetting in rt2x00 driver, which make patch 2 work.Andreas said that that after
ab9d6e4ffe19there was still a regression.
That's not true. There will be no regression after ab9d6e4ffe20. The only thing is that solution is not perfect. But perfect solution require lot of changes i.e. is not -stable appropriate (and does not exist currently).
Quoted 9 lines
Quoted 1 line
But maybe he was confused. I know I'm confused.
:-))
No, the thing is:
rt2800pci misses an appropriate handling of aggregation (which meets the requirements of mac80211).Both workarounds, mine and the new workaround from Stanislaw (which is nothing more than a restricted version of my initial workaround), work
Your workaround broke STA mode on some environment.
Stanislaw
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
Quoted 28 lines · Stanislaw Gruszka
Quoted 11 lines · Andreas Hartmann
Quoted 10 lines · Ben Hutchings
Quoted 9 lines · Stanislaw Gruszka
Quoted 8 lines · Stanislaw Gruszka
Quoted 7 lines
To be clear, I have all of these in the queue:
be03d4a45c09rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails5b632fe85ec8mac80211: introduceIEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILab9d6e4ffe19Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"and I'm intending to drop/defer them all.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Patch 3 is a revert of patch 1 (questioned patch). Please apply all 3 patches, or only patch 2.
No, actually all 3 patches have to be applied. Because last one, except revert, include flag
IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILsetting in rt2x00 driver, which make patch 2 work.Andreas said that that after
ab9d6e4ffe19there was still a regression.That's not true. There will be no regression after
ab9d6e4ffe20. The only thing is that solution is not perfect. But perfect solution require lot of changes i.e. is not -stable appropriate (and does not exist currently).Quoted 3 lines
Quoted 1 line
But maybe he was confused. I know I'm confused.
:-))
Quoted 8 lines
Quoted 6 lines
No, the thing is:
rt2800pci misses an appropriate handling of aggregation (which meets the requirements of mac80211).Both workarounds, mine and the new workaround from Stanislaw (which is nothing more than a restricted version of my initial workaround), work
Your workaround broke STA mode on some environment.
Why are you sure, that this workaround doesn't break some other devices running in AP mode? We believed at that time too, it wouldn't harm even STA. But this was wrong for some (which?) devices.
Anyway: As Helmut meanwhile mentioned that he thankfully works on a solution now, I'm fine with the second round of workaround.
Kind regards,
Andreas
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
In reply to Helmut SchaaHello Helmut!
Quoted 5 lines · Helmut Schaa
Quoted 3 lines · Andreas Hartmann
The solution would be IMHO, to implement an own aggregation handling, maybe the same way as it was done for carl9170, which had the same problem:
Quoted 7 lines
Quoted 3 lines
http://thread.gmane.org/gmane.linux.kernel.wireless.general/100793/focus=1405
I prefer to have solutions (if one is known) instead of another workaround.
JFI, I'm just working on exactly that (handling BAR TX status in driver to implement proper RX reorder window flushing at the peer). I'll post it for further testing to the rt2x00 list once I'm done.
Thank you for your time spent on this problem! I really appreciate it!
Kind regards!
Andreas
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
In reply to Andreas HartmannQuoted 33 lines · Andreas Hartmann
Quoted 32 lines · Stanislaw Gruszka
Quoted 11 lines · Andreas Hartmann
Quoted 10 lines · Ben Hutchings
Quoted 9 lines · Stanislaw Gruszka
Quoted 8 lines · Stanislaw Gruszka
Quoted 7 lines
To be clear, I have all of these in the queue:
be03d4a45c09rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails5b632fe85ec8mac80211: introduceIEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILab9d6e4ffe19Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"and I'm intending to drop/defer them all.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Patch 3 is a revert of patch 1 (questioned patch). Please apply all 3 patches, or only patch 2.
No, actually all 3 patches have to be applied. Because last one, except revert, include flag
IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILsetting in rt2x00 driver, which make patch 2 work.Andreas said that that after
ab9d6e4ffe19there was still a regression.That's not true. There will be no regression after
ab9d6e4ffe20. The only thing is that solution is not perfect. But perfect solution require lot of changes i.e. is not -stable appropriate (and does not exist currently).Quoted 7 lines
Quoted 1 line
But maybe he was confused. I know I'm confused.
:-))
No, the thing is:
rt2800pci misses an appropriate handling of aggregation (which meets the requirements of mac80211).
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Both workarounds, mine and the new workaround from Stanislaw (which is nothing more than a restricted version of my initial workaround), work
Your workaround broke STA mode on some environment.
Why are you sure, that this workaround doesn't break some other devices running in AP mode? We believed at that time too, it wouldn't harm even STA. But this was wrong for some (which?) devices.
Because it make behaviour the same as it was before 3.2, which introduce those issues.
Stanislaw
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
Hello Stanislaw!
Quoted 37 lines · Stanislaw Gruszka
Quoted 36 lines · Andreas Hartmann
Quoted 35 lines · Stanislaw Gruszka
Quoted 11 lines · Andreas Hartmann
Quoted 10 lines · Ben Hutchings
Quoted 9 lines · Stanislaw Gruszka
Quoted 8 lines · Stanislaw Gruszka
Quoted 7 lines
To be clear, I have all of these in the queue:
be03d4a45c09rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails5b632fe85ec8mac80211: introduceIEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILab9d6e4ffe19Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"and I'm intending to drop/defer them all.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Patch 3 is a revert of patch 1 (questioned patch). Please apply all 3 patches, or only patch 2.
No, actually all 3 patches have to be applied. Because last one, except revert, include flag
IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILsetting in rt2x00 driver, which make patch 2 work.Andreas said that that after
ab9d6e4ffe19there was still a regression.That's not true. There will be no regression after
ab9d6e4ffe20. The only thing is that solution is not perfect. But perfect solution require lot of changes i.e. is not -stable appropriate (and does not exist currently).Quoted 9 lines
Quoted 1 line
But maybe he was confused. I know I'm confused.
:-))
No, the thing is:
rt2800pci misses an appropriate handling of aggregation (which meets the requirements of mac80211).Both workarounds, mine and the new workaround from Stanislaw (which is nothing more than a restricted version of my initial workaround), work
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Your workaround broke STA mode on some environment.
Why are you sure, that this workaround doesn't break some other devices running in AP mode? We believed at that time too, it wouldn't harm even STA. But this was wrong for some (which?) devices.
Because it make behaviour the same as it was before 3.2, which introduce those issues.
You're so right, Stanislaw! I should have better looked again at your patch before writing those stupid lines about differentiation between STA and AP.
Please apologize!
Kind regards,
Andreas
Re: [ 104/173] rt2x00: Dont let mac80211 send a BAR when an AMPDU subframe fails
In reply to Stanislaw GruszkaQuoted 37 lines · Stanislaw Gruszka
Quoted 36 lines · Andreas Hartmann
Quoted 35 lines · Stanislaw Gruszka
Quoted 11 lines · Andreas Hartmann
Quoted 10 lines · Ben Hutchings
Quoted 9 lines · Stanislaw Gruszka
Quoted 8 lines · Stanislaw Gruszka
Quoted 7 lines
To be clear, I have all of these in the queue:
be03d4a45c09rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails5b632fe85ec8mac80211: introduceIEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILab9d6e4ffe19Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"and I'm intending to drop/defer them all.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Patch 3 is a revert of patch 1 (questioned patch). Please apply all 3 patches, or only patch 2.
No, actually all 3 patches have to be applied. Because last one, except revert, include flag
IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAILsetting in rt2x00 driver, which make patch 2 work.Andreas said that that after
ab9d6e4ffe19there was still a regression.That's not true. There will be no regression after
ab9d6e4ffe20. The only thing is that solution is not perfect. But perfect solution require lot of changes i.e. is not -stable appropriate (and does not exist currently).Quoted 9 lines
Quoted 1 line
But maybe he was confused. I know I'm confused.
:-))
No, the thing is:
rt2800pci misses an appropriate handling of aggregation (which meets the requirements of mac80211).Both workarounds, mine and the new workaround from Stanislaw (which is nothing more than a restricted version of my initial workaround), work
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Your workaround broke STA mode on some environment.
Why are you sure, that this workaround doesn't break some other devices running in AP mode? We believed at that time too, it wouldn't harm even STA. But this was wrong for some (which?) devices.
Because it make behaviour the same as it was before 3.2, which introduce those issues.
After reviewing the various changes, I agree that applying the three patches looks like it will restore the old (3.1) behaviour of rt2x00. I have reinstated them in the queue for the next 3.2 update.
Ben.
Signature · 3 lines
Ben Hutchings
Klipstein's 4th Law of Prototyping and Production:
A fail-safe circuit will destroy others.Re: [ 109/173] drm/i915: Close race between processing unpin task and queueing the flip
In reply to Ben HutchingsQuoted 8 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Wilson <[email protected]>
commit
e7d841ca03b7ab668620045cd7b428eda9f41601upstream.
[...]
Review static int intel_gen4_queue_flip(struct · line 7185
Quoted 11 lines
(quoted diff) +4
-0@@ -7157,6 +7176,10 @@ static int intel_gen4_queue_flip(struct pf = 0; pipesrc = I915_READ(PIPESRC(intel_crtc->pipe)) & 0x0fff0fff; OUT_RING(pf | pipesrc); + + intel_mark_page_flip_active(intel_crtc); + + intel_mark_page_flip_active(intel_crtc); ADVANCE_LP_RING(); return 0;
There is a problem with this patch on 3.2. First we have intel_mark_page_flip_active duplicated on intel_gen4_queue_flip here (harmless), but one missing call for it in intel_gen6_queue_flip
Reached to this after reproducing which is probably the same problem people are reporting here: http://bugs.launchpad.net/bugs/1119809
A bisect pointed to this change, and the following diff fixed the issue on the i915 based machine I used to reproduce:
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -7155,8 +7155,6 @@ static int intel_gen4_queue_flip(struct drm_device *dev,OUT_RING (pf | pipesrc);intel_mark_page_flip_active (intel_crtc); - -intel_mark_page_flip_active (intel_crtc);ADVANCE_LP_RING ();return 0 ;
@@ -7192,6 +7190,8 @@ static int intel_gen6_queue_flip(struct drm_device *dev, pf =I915_READ (PF_CTL (intel_crtc->pipe)) &PF_ENABLE ; pipesrc =I915_READ (PIPESRC (intel_crtc->pipe)) &0x0fff0fff ;OUT_RING (pf | pipesrc); + +intel_mark_page_flip_active (intel_crtc);ADVANCE_LP_RING ();return 0 ;
Signature · 2 lines
[]'s Herton
Re: [ 109/173] drm/i915: Close race between processing unpin task and queueing the flip
Quoted 10 lines · Herton Ronaldo Krzesinski
Quoted 8 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Wilson <[email protected]>
commit
e7d841ca03b7ab668620045cd7b428eda9f41601upstream.[...]
Quoted 15 lines
drivers/gpu/drm/i915/intel_display.c static int intel_gen4_queue_flip(struct · line 7185
Quoted 11 lines
drivers/gpu/drm/i915/intel_display.c +4
-0@@ -7157,6 +7176,10 @@ static int intel_gen4_queue_flip(struct pf =0 ; pipesrc =I915_READ (PIPESRC (intel_crtc->pipe)) &0x0fff0fff ;OUT_RING (pf | pipesrc); + +intel_mark_page_flip_active (intel_crtc); + +intel_mark_page_flip_active (intel_crtc);ADVANCE_LP_RING ();return 0 ;There is a problem with this patch on 3.2. First we have
intel_mark_page_flip_activeduplicated onintel_gen4_queue_fliphere (harmless), but one missing call for it inintel_gen6_queue_flip
Yes, Julien Cristau also pointed this out. I'm not sure how this happened.
It does seem that quilt (presumably calling GNU patch?) can sometimes apply two hunks that overlap, and maybe that's part of the explanation for this. In 3.2.38 there was one patch where a blank line was the last line of context in one hunk and also the first line of context for the next hunk. (Upstream, there was an extra statement in between, but this was not present in 3.2.y.) quilt applied the patch without complaint (with --fuzz=0) but git am rejected it.
Quoted 19 lines
Reached to this after reproducing which is probably the same problem people are reporting here: http://bugs.launchpad.net/bugs/1119809
A bisect pointed to this change, and the following diff fixed the issue on the i915 based machine I used to reproduce:drivers/gpu/drm/i915/intel_display.c +0
-2@@ -7155,8 +7155,6 @@ static int intel_gen4_queue_flip(struct drm_device *dev,OUT_RING (pf | pipesrc);intel_mark_page_flip_active (intel_crtc); - -intel_mark_page_flip_active (intel_crtc);ADVANCE_LP_RING ();return 0 ;
drivers/gpu/drm/i915/intel_display.c static int intel_gen6_queue_flip(struct drm_device *dev, · line 7197
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +2
-0@@ -7192,6 +7190,8 @@ static int intel_gen6_queue_flip(struct drm_device *dev, pf =I915_READ (PF_CTL (intel_crtc->pipe)) &PF_ENABLE ; pipesrc =I915_READ (PIPESRC (intel_crtc->pipe)) &0x0fff0fff ;OUT_RING (pf | pipesrc); + +intel_mark_page_flip_active (intel_crtc);ADVANCE_LP_RING ();return 0 ;
Thanks, but I have the same fix in the patch queue already.
Ben.
Signature · 3 lines
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus