rem: printf("card->mounted = %d,%08x,attach failed\n",card->attached,EXI_GetState(chn));
add: printf("card->attached = %d,%08x,attach failed\n",card->attached,EXI_GetState(chn));
context: s32 CARD_MountAsync(u32 chn,void *workarea,cardcallback detach_cb,cardcallback attach_cb){	s32 ret = CARD_ERROR_READY;	u32 level;	cardcallback attachcb = NULL;	card_block *card = NULL;#ifdef _CARD_DEBUG	printf("CARD_MountAsync(%d,%p,%p,%p)\n",chn,workarea,detach_cb,attach_cb);#endif	if(!workarea) return CARD_ERROR_NOCARD;	if(chn<EXI_CHANNEL_0 || chn>=EXI_CHANNEL_2) return CARD_ERROR_FATAL_ERROR;	card = &cardmap[chn];	_CPU_ISR_Disable(level);#ifdef _CARD_DEBUG	printf("card->mounted = %d,%08x\n",card->attached,EXI_GetState(chn));#endif	if(card->result==CARD_ERROR_BUSY) {		_CPU_ISR_Restore(level);		return CARD_ERROR_BUSY;	}	if(card->attached || !(EXI_GetState(chn)&EXI_FLAG_ATTACH)) {		card->result = CARD_ERROR_BUSY;		card->workarea = workarea;		card->card_ext_cb = detach_cb;		attachcb = attach_cb;		if(!attachcb) attachcb = __card_defaultapicallback;		card->card_api_cb = attachcb;		card->card_exi_cb = NULL;				if(!card->attached) {			if(EXI_Attach(chn,__card_exthandler)==0) {				card->result = CARD_ERROR_NOCARD;#ifdef _CARD_DEBUG				printf("card->mounted = %d,%08x,attach failed\n",card->attached,EXI_GetState(chn));#endif				_CPU_ISR_Restore(level);				return CARD_ERROR_NOCARD;			}		}		card->mount_step = 0;		card->attached = 1;#ifdef _CARD_DEBUG		printf("card->mount_step = %d,%08x\n",card->attached,EXI_GetState(chn));#endif		EXI_RegisterEXICallback(chn,NULL);		SYS_CancelAlarm(&card->timeout_svc);		card->curr_dir = NULL;		card->curr_fat = NULL;		_CPU_ISR_Restore(level);		card->card_unlock_cb = __card_mountcallback;		if(EXI_Lock(chn,EXI_DEVICE_0,__card_unlockedhandler)==0) return 0;		card->card_unlock_cb = NULL;		__card_domount(chn);		return 1;	}		ret = CARD_ERROR_WRONGDEVICE;	_CPU_ISR_Restore(level);	return ret;}