RE: MainstoneIII unidentified pccard adapter

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Well, the obvious reason would be that they want to be sure that they are
meeting the PC Card specification for the length of the reset pulse (which I
don't know). The implication is that at least one device did not work unless
that delay was added. If it were me, I'd be likely to leave the delay there,
but add another, after reset is released and before continuing with the code,
and see if that still works for all of your cards. If so, you should be OK
with the device that wanted a longer reset and with the devices that you have.

Paul T.

"Vahagn Hokhikyan" wrote:

Thanks for the feedback Paul.
The issue is solved, I have tested 9 CompactFlashes and all of them work
fine now.

I have kept the ATADISK driver and commented out the following delay
statement in XllpPCCardResetSocket function located in
C:\WINCE600\PLATFORM\COMMON\SRC\SOC\PXA27X_MS_V1\XLLP\SOURCE\xllp_pccardsocket.c

//Assert reset
.......
// Wait long enough for the device to notice.
XllpOstDelayMilliSeconds(pstrSocketHandle->pstrOstRegsHandle,200);
........
//Clear reset

Contrary to the comment the "long enough waiting" was not helping the device
to notice, lol. I have looked at the WinCE 5.0 MainstoneIII code this wait
statement was not there, it has been added to the WinCE 6.0 version of
MainstoneIII. Looking at the code this delay lengthens the reset pulse by
200ms. Does anyone have any idea on why this line has been added? Am I
overlooking something by removing it?

Thanks!

"Paul G. Tobey [eMVP]" wrote:

The first thing that I would try is ATAPI and NOT ATADISK in CE6. That's an
easy change, doesn't involve hardware timing, etc. and should, based on my
reading of the help continue to support any CF card that already worked with
ATADISK alone.

So, what do you do if that doesn't work? Build a DEBUG build of the
operating system and do a single step through any code in your BSP that works
with the PCMCIA controller. If things start working with your previously
non-working cards, yes, you have a timing problem. At that point, you'll
have to read the specs for the card, the processor, the FPGA on the
Mainstone, etc. and make suitable changes. Based on your statement that some
cards work sometimes and not others, timing does seem like a possible
problem...

Paul T.

"Vahagn Hokhikyan" wrote:

Hi Paul,
Thanks a lot for the reply. I already thought nobody is going to respond,
lol. Thanks!

when you ask whether both ATA disk drivers are in the OS design did you mean
that one of them was SYSGEN_ATADISK? I am using the ATADISK driver the ATAPI
is not included in the OS design. I have this setup (ATADISK without ATAPI)
in WinCE 5.0 and it recognizes all CompactFlashes I tried.

As for the CFs that are being recognized, one commonality between them is
that the ones being recognized are more off the shelf CFs probably with MLC
flash which are slower compared to SLC flashes. The industrial grade CFs that
I have tried have SLC flash inside and are not being recognized. Also some
CFs that are recognized when plugged in interestingly enough wont remount
after reset, while others do. A cold boot is necessary to remount the
"nonremounting" CFs.

As I mentioned the CF configuration tuple information is not being read
correctly for the CFs that won't mount and prompt for driver. For instance
the function ID tuple is read as 0x00 (multifunction) whereas it should have
been 0x04 (fixed disk). Now this lead me to change the
MCMEM0, MCATT0, MCIO0 memory timing configuration register values for PC
Card interface, I wrote the slowest possible values and observed the
following. every time I insert a CF that is not being recognized a window
pops up with a message to enter driver name for socket 1. No matter how many
times I remove and insert the card socket number stays 1, whereas before the
change socket number would increment after each insertion (i.e. socket 1,
socket 2, socket 3 etc).

I have read a similar post somewhere where Bruice Eitman said that he
observed this type of behaviour with wrong PCMCIA timing settings. I wonder
if I am on the right track, or those timings were not the timings that
caused the problems.

One thing that haunts me is that the same timings and the same mainstoneiii
PCCard driver work fine with WinCE 5.0 BSP whereas they fail in WinCE 6.0.
What is the connection here? I am surely missing something and owe a favor to
one who will direct me to the right path.

Well thanks for reading my long essay, hopefully it gave you additional
information to help me, lol. Thanks again!


"Paul G. Tobey [eMVP]" wrote:

Check which of the ATA disk drivers you have in your OS.

SYSGEN_ATAPI?
SYSGEN_ATAPI?
both?

Tell us something more about the cards that don't work, too.

Paul T.

"Vahagn Hokhikyan" wrote:

I have a MainstoneIII based board (PXA270) with WinCE 5.0 and WinCE 6.0 BSPs.
When I load the WinCE 5.0 BSP into the board the OS recognizes all
CompactFlashes I have inserted so far. When I change the BSP to WinCE 6.0,
the OS recognizes few CompactFlashes, and pops "Unidentified PCCard Adapter"
window and prompts to enter the name of the driver for the inserted PCCard.
The fact that the same CFs work under CE 5.0 eliminates the hardware
considerations. When I look at the MainstoneIII BSP PCCard driver code for
CE6.0(C:\WINCE600\PLATFORM\MAINSTONEIII\SRC\DRIVERS\PCCARD) it is identical
to that of CE 5.0. I saw some differences in the MDD portion of PCCard driver
(C:\WINCE600\PUBLIC\COMMON\OAK\DRIVERS\PCCARD) and replaced the CE6.0's MDD
code with CE5.0's MDD code. After compilation i still get the same dialog
asking for the driver name.

so in summary even though the MDD and PDD layers are the same CE6.0 does not
recognize some CompactFlashes, or to be more precise recognizes only some
CFs.

I am currently debugging the issue and observed that the CFs that are being
recognized have PCMCIA function ids of 4 (fixed disk) whereas the ones that
are not being recognized have PCMCIA function ids of 0 (Multi-Function). I
don't think that (0) is a valid functin id read from the CF its just the
initial value of the variable before reading the CF tuple info, in fact the
base address of the CF also can't be read from tuples for the CFs that prompt
for a driver name.

CPCPcmciaCard::GetConfigureRegisterBase: Can't get PCMCIA register address.
return FAILS. below are the debug outputs for the CFs that are being
recognized and the ones that are not. any hints on what to pay attention

************************************************
** DEBUG OUTPUT WHEN GOOD COMPACT FLASH IS INSERTED **
************************************************
384070 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x0, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
384571 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
384571 PID:400002 TID:cc000a PCCARD: PCMCIA (dwWinIndex=0) memory window
created
384571 PID:400002 TID:cc000a PCCARD: PCMCIA (dwWinIndex=1) memory window
created
384571 PID:400002 TID:cc000a PCCARD: PCMCIA (dwWinIndex=0) memory window
created
384571 PID:400002 TID:cc000a PCCARD: PCMCIA (dwWinIndex=1) memory window
created
384571 PID:400002 TID:cc000a CPcmciaCardSocket::CardResetSocket() before
changes
384571 PID:400002 TID:cc000a CPcmciaCardSocket::CardResetSocket() after
changes
PB Debugger Loaded symbols for
'C:\WINCE600\OSDESIGNS\MySBC\MySBC\RELDIR\MAINSTONEIII_ARMV4I_DEBUG\PCMCIA.DLL'
PB Debugger Loaded symbols for
'C:\WINCE600\OSDESIGNS\MySBC\MySBC\RELDIR\MAINSTONEIII_ARMV4I_DEBUG\SERIAL.DLL'
PB Debugger Unloaded symbols for
'C:\WINCE600\OSDESIGNS\MySBC\MySBC\RELDIR\MAINSTONEIII_ARMV4I_DEBUG\SERIAL.DLL'
PB Debugger Loaded symbols for
'C:\WINCE600\OSDESIGNS\MySBC\MySBC\RELDIR\MAINSTONEIII_ARMV4I_DEBUG\ATADISK.DLL'
387730 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
PB Debugger Unloaded symbols for
'C:\WINCE600\OSDESIGNS\MySBC\MySBC\RELDIR\MAINSTONEIII_ARMV4I_DEBUG\ATADISK.DLL'
PB Debugger Loaded symbols for
'C:\WINCE600\OSDESIGNS\MySBC\MySBC\RELDIR\MAINSTONEIII_ARMV4I_DEBUG\ATADISK.DLL'
388130 PID:400002 TID:4f70002 GetCardCRC: CardGetNextTuple returned fails
PB Debugger Loaded symbols for
'C:\WINCE600\OSDESIGNS\MySBC\MySBC\RELDIR\MAINSTONEIII_ARMV4I_DEBUG\MSPART.DLL'
PB Debugger Loaded symbols for
'C:\WINCE600\OSDESIGNS\MySBC\MySBC\RELDIR\MAINSTONEIII_ARMV4I_DEBUG\EXFAT.DLL'
PB Debugger Loaded symbols for
'C:\WINCE600\OSDESIGNS\MySBC\MySBC\RELDIR\MAINSTONEIII_ARMV4I_DEBUG\DISKCACHE.DLL'
388130 PID:400002 TID:4f70002 DEVICE!RegReadActivationValues
RegQueryValueEx(Drivers\PCCARD\PCMCIA\INSTANCE\PCMCIA1\Prefix) returned 2
388130 PID:400002 TID:4f70002 DEVICE!RegReadActivationValues
RegQueryValueEx(Drivers\PCCARD\PCMCIA\INSTANCE\PCMCIA1\BusPrefix) returned 2
388231 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
388231 PID:400002 TID:4f70002 OSAXST1: >>> Loading Module 'pcmcia.dll'
(0x85E7AE3C) at address 0xC0F00000-0xC0F17000 in Process 'NK.EXE' (0x82EC5AA0)
388732 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
388820 PID:400002 TID:4f70002 CardBus.DLL DLL_PROCESS_ATTACH
388820 PID:400002 TID:4f70002 GetCardCRC: CardGetNextTuple returned fails
388820 PID:400002 TID:5090002 OSAXST1: >>> Loading Module 'serial.dll'
(0x85C2F0C0) at address 0xC0BE0000-0xC0BFC000 in Process 'NK.EXE' (0x82EC5AA0)
389233 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
389524 PID:400002 TID:5090002 OSAXST1: <<< Unloading Module 'serial.dll'
(0x85C2F0C0) at address 0xC0BE0000-0xC0BFC000 in Process 'NK.EXE' (0x82EC5AA0)
389624 PID:400002 TID:5090002 OSAXST1: >>> Loading Module 'atadisk.dll'
(0x85C2F0C0) at address 0xC05F0000-0xC0601000 in Process 'NK.EXE' (0x82EC5AA0)
389753 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
390254 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
390755 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
391256 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
391256 PID:400002 TID:5090002 ATADISK: DLL_PROCESS_ATTACH
391256 PID:400002 TID:5090002 OSAXST1: <<< Unloading Module 'atadisk.dll'
(0x85C2F0C0) at address 0xC05F0000-0xC0601000 in Process 'NK.EXE' (0x82EC5AA0)
391306 PID:400002 TID:5090002 ATADISK: DLL_PROCESS_DETACH
391306 PID:400002 TID:5090002 DEVICE!RegReadActivationValues
RegQueryValueEx(Drivers\PCMCIA\SunDisk-SDP-1E2E\BusPrefix) returned 2
391306 PID:400002 TID:5090002 OSAXST1: >>> Loading Module 'atadisk.dll'
(0x85C2F0C0) at address 0xC05F0000-0xC0601000 in Process 'NK.EXE' (0x82EC5AA0)
391757 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
391835 PID:400002 TID:5090002 ATADISK: DLL_PROCESS_ATTACH
391835 PID:400002 TID:5090002 ATADISK: DSK_Init
391835 PID:400002 TID:5090002 ATADISK: Attempting to register with PCMCIA.DLL
391935 PID:400002 TID:5090002 CPcmcia::PcmciaCardMapWindow() : ! IO Space
391935 PID:400002 TID:5090002 ATADISK: pATAReg = 0xd16d01f0
391935 PID:400002 TID:5090002 CPcmcia::PcmciaCardMapWindow() : ! IO Space
391935 PID:400002 TID:5090002 ATADISK: pATARegAlt = 0xd16e03f6. v_MemGran = 1
391935 PID:400002 TID:5090002 ATADISK: Using 16 bit I/O
391935 PID:400002 TID:5090002 ATADISK: CardRequestConfiguration 0x2 at 50 dV
391935 PID:400002 TID:5090002 PcmciaC :Voltage 50 Hight than initial
value(33) Ignored !!!
391935 PID:400002 TID:5090002 ATADISK:ATAInitController entered
391935 PID:400002 TID:5090002 ATADISK:ATAInitController writing to
ATA_REG_DRV_CTRL
391935 PID:400002 TID:5090002 ATADISK:ATAInitController done
391935 PID:400002 TID:5090002 ATADISK:UseCHSMode - RegQueryValueEx(CHSMode)
returned 2
391935 PID:19b0002 TID:1180002 [NOTIFY] HandleSystemEvent 7 /ADD DSK1:
391990 PID:400002 TID:9c0002 FSDMGR!MountStore: Attaching new storage
device "DSK1:"
391990 PID:400002 TID:9c0002 ATADISK:GetProfileName - Profile = PCMCIA,
length = 14
391990 PID:400002 TID:9c0002 FSDMGR!StoreDisk_t::OpenDisk(0xD14E4350)
DeviceInfo Class(0x00000001) Flags(0x00000001) Type(0x40000024)
Profile(PCMCIA)
391990 PID:400002 TID:9c0002 FSDMGR!DumpRegKey: Dumping registry for key
System\StorageManager\Profiles
391990 PID:400002 TID:9c0002 AutoMount = 00000001
391990 PID:400002 TID:9c0002 AutoPart = 00000000
391990 PID:400002 TID:9c0002 AutoFormat = 00000000
391990 PID:400002 TID:9c0002 MountFlags = 00000000
391990 PID:400002 TID:9c0002 DefaultFileSystem =
391990 PID:400002 TID:9c0002 PartitionDriverName = MSPART
391990 PID:400002 TID:9c0002 Folder = Mounted Volume
391990 PID:400002 TID:9c0002 ActivityEvent =
PowerManager/ActivityTimer/SystemActivity
391990 PID:400002 TID:9c0002 FSDMGR!DumpRegKey: Dumping registry for key
PCMCIA
391990 PID:400002 TID:9c0002 Name = PCMCIA/Compact Flash Device
391990 PID:400002 TID:9c0002 Folder = Storage Card
391990 PID:400002 TID:9c0002 OSAXST1: >>> Loading Module 'mspart.dll'
(0x85BFE714) at address 0xC0660000-0xC066F000 in Process 'NK.EXE' (0x82EC5AA0)
392258 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
392657 PID:400002 TID:9c0002 FSDMGR!LoadPartitionDriver: Loading partition
driver mspart.dll hModule=85BFE714
392657 PID:400002 TID:9c0002 MSPART!LoadDiskInfo (hDisk=0x052c0003) driver
only supports deprecated ioctl DISK_IOCTL_GETINFO; should support
IOCTL_DISK_GETINFO instead!!!
392657 PID:400002 TID:9c0002 MSPART!ReadSectors (hDisk=0x052c0003) driver
only supports deprecated ioctl DISK_IOCTL_READ; should support
IOCTL_DISK_READ instead!!!
392657 PID:400002 TID:9c0002 MSPART!ReadSectors (hDisk=0x052c0003) driver
only supports deprecated ioctl DISK_IOCTL_READ; should support
IOCTL_DISK_READ instead!!!
392657 PID:400002 TID:9c0002 FSDMGR!StoreDisk_t::MountStore: Opened the
store "DSK1:" hStore=0xD1538370
392657 PID:400002 TID:9c0002 MSPART!ReadSectors (hDisk=0x052c0003) driver
only supports deprecated ioctl DISK_IOCTL_READ; should support
IOCTL_DISK_READ instead!!!
392657 PID:400002 TID:9c0002 FSDMGR!StoreDisk_t::MountStore: Geometry:
NumSec=250880 BytesPerSec=512 FreeSec=256 BiggestCreatable=256
392657 PID:400002 TID:9c0002 Partition Part00 NumSectors=250592
392657 PID:400002 TID:9c0002 MSPART!PD_OpenPartition: dwStoreId=D1538370,
PartName=Part00
392657 PID:400002 TID:9c0002 FSDMGR!StoreDisk_t::LoadPartition: mounting
partition "Part00" on store "DSK1:"
392657 PID:400002 TID:9c0002 FSDMGR!ParitionDisk::LoadPartition: Partition
Type 0x06 --> "FATFS"
392657 PID:400002 TID:9c0002 FSDMGR!ParitionDisk::MountPartition: "FATFS"
--> exfat.dll
392657 PID:400002 TID:9c0002 OSAXST1: >>> Loading Module 'exfat.dll'
(0x85BFE8E8) at address 0xC0520000-0xC055B000 in Process 'NK.EXE' (0x82EC5AA0)
392952 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
393453 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
0x0 , bCardDetectStatus = 0x1, bBvd1Status = 0x1, bBvd2Status = 0x1,
bIRQReadyStatus = 0x0,
393954 PID:400002 TID:cc000a ThreadRunThreadRun case 1 after statusReg =
.



Relevant Pages

  • Re: pci error recovery procedure
    ... I am reviewing the error handlers of e1000 driver and got some ideas. ... for a full electical reset of the card, instead, it wants to perform ... error_resume could take care of multi-function card. ...
    (Linux-Kernel)
  • Re: pci error recovery procedure
    ... I am reviewing the error handlers of e1000 driver and got some ideas. ... for a full electical reset of the card, instead, it wants to perform ... error_resume could take care of multi-function card. ...
    (Linux-Kernel)
  • POSTing of video cards (WAS: Solo Xgl..)
    ... > Secondary cards needs reset. ... So this means that we have to run the VBIOS reset before probe ... responsibility of the driver to do what it needs at probe time or later. ... If a driver detects that it's card ...
    (Linux-Kernel)
  • Re: pci error recovery procedure
    ... I am reviewing the error handlers of e1000 driver and got some ideas. ... for a full electical reset of the card, instead, it wants to perform ... If we enabled both DMA and MMIO at the same time, ...
    (Linux-Kernel)
  • RE: [UPDATED PATCH] EFI support for ia32 kernels
    ... >> reuse a single driver image for multiple architectures assuming there ... As one of the people responsible for the EFI Specification and our ... Perhaps the UNDI network card interface that Intel developed ... BIOS can't shadow that much ROM code. ...
    (Linux-Kernel)