|
#18楼 问题一 确实每个都是这样的,以前没注意到 CreateFile返回的句柄 跟DeviceIOControl里的参数Handle确实是不同的数值,中间好像经过了某种映射了,但是可以确定这个现象是正确的
问题二 我感觉像是某个其他的驱动把我OpenStore的DSK1给关掉了,因为我这里出现了SD分区出现又消失的过程,从下面的调试信息也可以看到这个现象,似乎又回到了dismount/mount被频繁触发的问题上来了,走进了死胡同
SC2440UsbFn!HandleUSBEvent: UFN_ATTACH
SC2440UsbFn!HandleUSBEvent: Reset
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 1;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: EP0_INT_INTR
SC2440UsbFn!HandleUSBEvent: Status, 1
SC2440UsbFn!HandleUSBEvent: EP0_OUT_PACKET_RDY
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 0;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 1;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: EP0_INT_INTR
SC2440UsbFn!HandleUSBEvent: Status, 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 0;bUSBBusIrqStat = 0
SDMemory: +-SMC_Close
SDMemory: +-SMC_Open
SDMemory: +SMC_IOControl Handle 7822816
DISK_IOCTL_GETINFO
SDMemory: -SMC_IOControl returning 1
SDMemory: +SMC_IOControl Handle 7822816
IOCTL_DISK_DEVICE_INFO
SDMemory: -SMC_IOControl returning 1
SDMemory: +SMC_IOControl Handle 7822816
IOCTL_DISK_GET_STORAGEID
SDMemory: -SMC_IOControl returning 0
SDMemory: +SMC_IOControl Handle 7822816
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 1;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: EP0_INT_INTR
SC2440UsbFn!HandleUSBEvent: Status, 1
SC2440UsbFn!HandleUSBEvent: EP0_OUT_PACKET_RDY
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 0;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 1;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: EP0_INT_INTR
SC2440UsbFn!HandleUSBEvent: Status, 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 0;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 1;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: EP0_INT_INTR
SC2440UsbFn!HandleUSBEvent: Status, 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 0;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 1;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: EP0_INT_INTR
SC2440UsbFn!HandleUSBEvent: Status, 1
SC2440UsbFn!HandleUSBEvent: EP0_OUT_PACKET_RDY
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 0;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 1;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: EP0_INT_INTR
SC2440UsbFn!HandleUSBEvent: Status, 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 0;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 1;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: EP0_INT_INTR
SC2440UsbFn!HandleUSBEvent: Status, 1
SC2440UsbFn!HandleUSBEvent: EP0_OUT_PACKET_RDY
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 0;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 11;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: EP0_INT_INTR
SC2440UsbFn!HandleUSBEvent: Status, 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 0;bUSBBusIrqStat = 0
UsbMsFn!BOT_HandleCBW: Length: 0x0008 Flags: 0x80 CBWLen: 0xa
UsbMsFn!STORE_IsCommandSupported: command 0x25
UsbMsFn!STORE_IsCommandSupported: READ CAPACITY
UsbMsFn!STORE_ExecuteCommand: command 0x25
UsbMsFn!STORE_ExecuteCommand: READ CAPACITY
UsbMsFn!BOT_ExecuteCB: Command : passed
UsbMsFn!BOT_HandleCBW: request length = 8
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 2;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 0;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 2;bUSBBusIrqStat = 0
SC2440UsbFn!HandleUSBEvent: bEpIrqStat = 10;bUSBBusIrqStat = 0
UsbMsFn!BOT_HandleCBW: Length: 0x0200 Flags: 0x80 CBWLen: 0xa
UsbMsFn!STORE_IsCommandSupported: command 0x28
UsbMsFn!STORE_IsCommandSupported: READ (10)
UsbMsFn!STORE_ExecuteCommand: command 0x28
UsbMsFn!STORE_ExecuteCommand: READ (10)
UsbMsFn!ProcessScsiRead10: starting LBA/sector = 0, transfer length = 1 (sectors)
UsbMsFn!ProcessScsiRead10: ===g_hStore = 3485743006
g_fLegacyBlockDriver = 0 DISK_IOCTL_READ = 2 IOCTL_DISK_READ = 482312 dwIoControlCode = 482312
UsbMsFn!ProcessScsiRead10: IOCTL_DISK_READ failed; error = 160
UsbMsFn!STORE_ExecuteCommand: failed to execute command 0x28
UsbMsFn!BOT_ExecuteCB: Command : failed
调试信息显示,红色字体部分好像并非usb mass storage client驱动调用的SDMemory接口函数
这就奇怪了,怎么还会有其他驱动再usb dismount之后自动重新mount SD卡分区呢 |
|