現象是:
按 power 沒反應。
插入 usb 沒出現 白電池。
長按 power 也沒反應。
所以依照上面的影片:
- 插上usb 充電 一小時 (我充 5min)
- 拔掉usb 再馬上插上
- 按 power button 15 sec
充電真的是 asus 的死穴啊,記得TF101 也是這樣,放電太多就沒辦法充。
ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上
hcd = usb_create_hcd(...)compion_ports 是一個 bit variable, 每一個 bit 代表一個 port.
#define SET_CMF(r, rv, c, v) rv = ((rv & ~r##_##c##_MASK) | (v << r##_##c##_OFFSET))所以上面就變成..
module_init(ehci_hcd_init);所以這個大概是 driver 的本體(?)
rsc = platform_get_resource(pdev, IORESOURCE_MEM, 0); usbcd_db->vaddr = (u8 *)ioremap(rsc->start, (rsc->end - rsc->start + 1));
usb 3-1.3.4: new high speed USB device using ehci_hcd and address 5 usb 3-1.3.4: New USB device found, idVendor=8564, idProduct=1000 usb 3-1.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 3-1.3.4: Product: Mass Storage Device usb 3-1.3.4: Manufacturer: JetFlash usb 3-1.3.4: SerialNumber: usb 3-1.3.4: configuration #1 chosen from 1 choice scsi7 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 5 usb-storage: waiting for device to settle before scanning usb-storage: device scan complete scsi 7:0:0:0: Direct-Access JetFlash Transcend 32GB 1100 PQ: 0 ANSI: 6 sd 7:0:0:0: Attached scsi generic sg5 type 0 61702144 512-byte logical blocks: (31.5 GB/29.4 GiB) Write Protect is off Mode Sense: 43 00 00 00speed:
charles-chang@squeeze:~$ sudo hdparm -tT /dev/sde /dev/sde: Timing cached reads: 14904 MB in 2.00 seconds = 7457.59 MB/sec Timing buffered disk reads: 102 MB in 3.03 seconds = 33.69 MB/sec charles-chang@squeeze:~$ sudo hdparm -tT /dev/sde /dev/sde: Timing cached reads: 9202 MB in 2.00 seconds = 4603.31 MB/sec Timing buffered disk reads: 102 MB in 3.04 seconds = 33.53 MB/sec charles-chang@squeeze:~$ sudo hdparm -tT /dev/sde /dev/sde: Timing cached reads: 14386 MB in 2.00 seconds = 7198.39 MB/sec Timing buffered disk reads: 102 MB in 3.04 seconds = 33.54 MB/secwrite:
charles-chang@squeeze:~/sd$ sudo dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 65.8158 s, 16.3 MB/s
usb 3-1.3.4: USB disconnect, address 5 usb 3-1.3.4: new high speed USB device using ehci_hcd and address 6 usb 3-1.3.4: New USB device found, idVendor=125f, idProduct=312b usb 3-1.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 3-1.3.4: Product: ADATA USB Flash Drive usb 3-1.3.4: Manufacturer: ADATA usb 3-1.3.4: SerialNumber: 000000000000 usb 3-1.3.4: configuration #1 chosen from 1 choice scsi8 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 6 usb-storage: waiting for device to settle before scanning usb-storage: device scan complete scsi 8:0:0:0: Direct-Access ADATA USB Flash Drive 1.00 PQ: 0 ANSI: 6 sd 8:0:0:0: Attached scsi generic sg5 type 0 61739008 512-byte logical blocks: (31.6 GB/29.4 GiB) Write Protect is off Mode Sense: 23 00 00 00speed:
charles-chang@squeeze:~$ sudo hdparm -tT /dev/sde /dev/sde: Timing cached reads: 9560 MB in 2.00 seconds = 4782.52 MB/sec Timing buffered disk reads: 104 MB in 3.02 seconds = 34.49 MB/sec
static void requestRadioPower(void *data, size_t datalen, RIL_Token t)RIL_REQUEST_RADIO_POWER : ril_commands.h
static void processRequest (int request, void *data, size_t datalen, RIL_Token t) { ... case RIL_REQUEST_RADIO_POWER: requestRadioPower(data, datalen, t); break;
{RIL_REQUEST_RADIO_POWER, dispatchInts, responseVoid},ril_commands.h : requestdatahandler.c
typedef struct CommandInfo { int requestId; void *(*dispatchFunction) (void *data, size_t datalen); void (*responseFunction) (void); } CommandInfo; /* RILD made me do it! */ static CommandInfo s_commandInfo[] = { #include "ril_commands.h" };
hardware/ril/include/telephony/ril.h
framework/base/telephony/java/com/android/internal/telephony/RILConstants.java為了怕兩邊定義不一致,這邊有 comment:
/* cat include/telephony/ril.h | \ egrep '^#define' | \ sed -re 's/^#define +([^ ]+)* +([^ ]+)/ int \1 = \2;/' \ >>java/android/com.android.internal.telephony/gsm/RILConstants.java */
opt/telephony/src/java/com/android/internal/telephony/RIL.java setRadioPower(boolean on, Message result) {
AT+CFUN AT command sets the level of functionality in the MT. Level "full functionality" is where the highest level of power is drawn. "Minimum functionality" is where minimum power is drawn. Possible values are, 0 - minimum functionality 1 - full functionality 2 - disable phone transmit RF circuits only 3 - disable phone receive RF circuits only 4 - disable phone both transmit and receive RF circuits所以 ATCommand 在..
AT+CFUN? +CFUN: 1 OK就代表可以開始撥號了。