Skip to content

Instantly share code, notes, and snippets.

@psyke83
psyke83 / gist:7e37356426f820df727e
Created March 9, 2015 01:44
LegacyXperia mmc wifi drop patch
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index f8b1d99..f7356b5 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -2268,7 +2268,11 @@ msmsdcc_request(struct mmc_host *mmc, struct mmc_request *mrq)
if (mrq->data && (mrq->data->flags & MMC_DATA_WRITE)) {
if (msmsdcc_is_wait_for_auto_prog_done(host, mrq)) {
host->curr.wait_for_auto_prog_done = true;
+#ifdef CONFIG_BOARD_SEMC_MOGAMI
+ } else if (mmc->card && !mmc_card_sdio(mmc->card)) {
@psyke83
psyke83 / cat strace-totoro.log | tail -c 1M
Created January 3, 2015 16:34
adb shell strace /system/bin/dex2oat --image=/data/dalvik-cache/arm/system@framework@boot.art --dex-file=/system/framework/core-libart.jar --dex-file=/system/framework/conscrypt.jar --dex-file=/system/framework/okhttp.jar --dex-file=/system/framework/core-junit.jar --dex-file=/system/framework/bouncycastle.jar --dex-file=/system/framework/ext.ja…
This file has been truncated, but you can view the full file.
K_MONOTONIC, {897, 265411379}) = 0
clock_gettime(CLOCK_MONOTONIC, {897, 266418460}) = 0
clock_gettime(CLOCK_MONOTONIC, {897, 266662600}) = 0
clock_gettime(CLOCK_MONOTONIC, {897, 269592288}) = 0
clock_gettime(CLOCK_MONOTONIC, {897, 269866946}) = 0
clock_gettime(CLOCK_MONOTONIC, {897, 271881106}) = 0
clock_gettime(CLOCK_MONOTONIC, {897, 272155764}) = 0
clock_gettime(CLOCK_MONOTONIC, {897, 273406984}) = 0
clock_gettime(CLOCK_MONOTONIC, {897, 273803714}) = 0
clock_gettime(CLOCK_MONOTONIC, {897, 276489260}) = 0
--------- beginning of main
I/lowmemorykiller( 1381): Using in-kernel low memory killer interface
W/auditd ( 1378): type=2000 audit(0.0:1): initialized
I/auditd ( 1378): type=1403 audit(0.0:2): policy loaded auid=4294967295 ses=4294967295
W/init ( 1): type=1400 audit(0.0:3): avc: denied { unlink } for name="recovery.fstab" dev=rootfs ino=844 scontext=u:r:init:s0 tcontext=u:object_r:rootfs:s0 tclass=file
W/ueventd ( 921): type=1400 audit(0.0:4): avc: denied { create } for scontext=u:r:ueventd:s0 tcontext=u:r:ueventd:s0 tclass=netlink_selinux_socket
W/ueventd ( 921): type=1400 audit(0.0:5): avc: denied { bind } for scontext=u:r:ueventd:s0 tcontext=u:r:ueventd:s0 tclass=netlink_selinux_socket
W/init ( 1): type=1400 audit(0.0:6): avc: denied { sys_module } for capability=16 scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=capability
W/sh ( 1401): type=1400 audit(0.0:7): avc: denied { read write } for name="ttyS0" dev=tmpfs ino=2660 scontext=u:r:shell:s0 tcontext=u:object_r:serial_device:s0 tc
--------- beginning of main
I/lowmemorykiller( 1380): Using in-kernel low memory killer interface
W/auditd ( 1377): type=2000 audit(0.0:1): initialized
--------- beginning of system
I/auditd ( 1403): Starting up
I/audit_log( 1403): Previous audit logfile detected, rotating
E/audit_rules( 1403): Could not read audit rules /data/misc/audit/audit.rules: No such file or directory
I/ ( 1405): debuggerd: Dec 20 2014 15:49:10
I/Vold ( 1382): Vold 2.1 (the revenge) firing up
I/installd( 1413): installd firing up
--------- beginning of main
I/lowmemorykiller( 1374): Using in-kernel low memory killer interface
W/auditd ( 1371): type=2000 audit(0.0:1): initialized
--------- beginning of system
I/auditd ( 1397): Starting up
I/audit_log( 1397): Previous audit logfile detected, rotating
E/audit_rules( 1397): Could not read audit rules /data/misc/audit/audit.rules: No such file or directory
I/ ( 1399): debuggerd: Dec 20 2014 15:49:10
I/installd( 1403): installd firing up
I/Netd ( 1398): Netd 1.0 starting
Latencies across all processes:
Maximum Average Count Reason
276.74 ms 276.74 ms 1 backlight_store_brightness
78.67 ms 0.94 ms 10151 binder_thread_read
57.36 ms 8.31 ms 7 sys_mmap_pgoff
30.60 ms 6.23 ms 8 cgroup_lock_live_group
26.70 ms 1.59 ms 432 binder_ioctl
16.83 ms 13.37 ms 12 down_timeout
13.88 ms 2.08 ms 13 do_page_fault
11.44 ms 1.15 ms 12 sys_mprotect
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index b3d96cd..5eafef0 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -5280,7 +5280,8 @@ static int msmsdcc_runtime_idle(struct device *dev)
return 0;
/* Idle timeout is not configurable for now */
- pm_schedule_suspend(dev, host->idle_tout_ms);
+ pr_info("host->idle_tout_ms: %d", host->idle_tout_ms);
static int baseband_lock_counter = 0;
static int request_ebi2_lock(struct msm_nand_chip *chip, bool lock)
{
int result;
unsigned long timeout = jiffies + msecs_to_jiffies(10); // 10 msecs should be enough
int temp = *chip->baseband_lock;
if (lock)
baseband_lock_counter++;
diff --git a/drivers/mtd/onenand/msm.c b/drivers/mtd/onenand/msm.c
index 7dee32d..f60ae3e 100644
--- a/drivers/mtd/onenand/msm.c
+++ b/drivers/mtd/onenand/msm.c
@@ -55,18 +55,26 @@ static const char *part_probes[] = { "cmdlinepart", NULL, };
extern void FSR_PAM_InitNANDController(void);
extern void FSR_PAM_WriteToOneNANDRegister(uint32_t addr, uint16_t value);
+extern void FSR_PAM_Write2BToDataRAM(uint32_t addr, uint16_t value);
extern uint16_t FSR_PAM_ReadOneNANDRegister(uint32_t addr);
diff --git a/drivers/fsr/LLD/OND/FSR_LLD_4K_OneNAND.c b/drivers/fsr/LLD/OND/FSR_LLD_4K_OneNAND.c
index 4037a24..ef0c39f 100644
--- a/drivers/fsr/LLD/OND/FSR_LLD_4K_OneNAND.c
+++ b/drivers/fsr/LLD/OND/FSR_LLD_4K_OneNAND.c
@@ -657,7 +657,7 @@ PRIVATE INT32 _ReadOptWithSLoad ( UINT32 nDev,
FSRSpareBuf *pSBuf,
UINT32 nFlag);
-PRIVATE VOID _ReadMain ( UINT8 *pDest,
+VOID _ReadMain ( UINT8 *pDest,