MS_Lib 228 drivers/usb/storage/ene_ub6250.c #define ms_libconv_to_logical(pdx, PhyBlock) (((PhyBlock) >= (pdx)->MS_Lib.NumberOfPhyBlock) ? MS_STATUS_ERROR : (pdx)->MS_Lib.Phy2LogMap[PhyBlock]) MS_Lib 229 drivers/usb/storage/ene_ub6250.c #define ms_libconv_to_physical(pdx, LogBlock) (((LogBlock) >= (pdx)->MS_Lib.NumberOfLogBlock) ? MS_STATUS_ERROR : (pdx)->MS_Lib.Log2PhyMap[LogBlock]) MS_Lib 231 drivers/usb/storage/ene_ub6250.c #define ms_lib_ctrl_set(pdx, Flag) ((pdx)->MS_Lib.flags |= (1 << (Flag))) MS_Lib 232 drivers/usb/storage/ene_ub6250.c #define ms_lib_ctrl_reset(pdx, Flag) ((pdx)->MS_Lib.flags &= ~(1 << (Flag))) MS_Lib 233 drivers/usb/storage/ene_ub6250.c #define ms_lib_ctrl_check(pdx, Flag) ((pdx)->MS_Lib.flags & (1 << (Flag))) MS_Lib 236 drivers/usb/storage/ene_ub6250.c #define ms_lib_clear_pagemap(pdx) memset((pdx)->MS_Lib.pagemap, 0, sizeof((pdx)->MS_Lib.pagemap)) MS_Lib 463 drivers/usb/storage/ene_ub6250.c struct ms_lib_ctrl MS_Lib; MS_Lib 762 drivers/usb/storage/ene_ub6250.c if ((logblk >= info->MS_Lib.NumberOfLogBlock) || (phyblk >= info->MS_Lib.NumberOfPhyBlock)) MS_Lib 765 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[phyblk] = logblk; MS_Lib 766 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Log2PhyMap[logblk] = phyblk; MS_Lib 775 drivers/usb/storage/ene_ub6250.c if (phyblk >= info->MS_Lib.NumberOfPhyBlock) MS_Lib 778 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[phyblk] = mark; MS_Lib 797 drivers/usb/storage/ene_ub6250.c kfree(info->MS_Lib.Phy2LogMap); MS_Lib 798 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap = NULL; MS_Lib 800 drivers/usb/storage/ene_ub6250.c kfree(info->MS_Lib.Log2PhyMap); MS_Lib 801 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Log2PhyMap = NULL; MS_Lib 811 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap = kmalloc_array(info->MS_Lib.NumberOfPhyBlock, MS_Lib 814 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Log2PhyMap = kmalloc_array(info->MS_Lib.NumberOfLogBlock, MS_Lib 818 drivers/usb/storage/ene_ub6250.c if ((info->MS_Lib.Phy2LogMap == NULL) || (info->MS_Lib.Log2PhyMap == NULL)) { MS_Lib 823 drivers/usb/storage/ene_ub6250.c for (i = 0; i < info->MS_Lib.NumberOfPhyBlock; i++) MS_Lib 824 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[i] = MS_LB_NOT_USED; MS_Lib 826 drivers/usb/storage/ene_ub6250.c for (i = 0; i < info->MS_Lib.NumberOfLogBlock; i++) MS_Lib 827 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Log2PhyMap[i] = MS_LB_NOT_USED; MS_Lib 837 drivers/usb/storage/ene_ub6250.c info->MS_Lib.wrtblk = (u16)-1; MS_Lib 840 drivers/usb/storage/ene_ub6250.c if (info->MS_Lib.blkpag) MS_Lib 841 drivers/usb/storage/ene_ub6250.c memset(info->MS_Lib.blkpag, 0xff, info->MS_Lib.PagesPerBlock * info->MS_Lib.BytesPerSector); MS_Lib 843 drivers/usb/storage/ene_ub6250.c if (info->MS_Lib.blkext) { MS_Lib 844 drivers/usb/storage/ene_ub6250.c for (i = 0; i < info->MS_Lib.PagesPerBlock; i++) { MS_Lib 845 drivers/usb/storage/ene_ub6250.c info->MS_Lib.blkext[i].status1 = MS_REG_ST1_DEFAULT; MS_Lib 846 drivers/usb/storage/ene_ub6250.c info->MS_Lib.blkext[i].ovrflg = MS_REG_OVR_DEFAULT; MS_Lib 847 drivers/usb/storage/ene_ub6250.c info->MS_Lib.blkext[i].mngflg = MS_REG_MNG_DEFAULT; MS_Lib 848 drivers/usb/storage/ene_ub6250.c info->MS_Lib.blkext[i].logadr = MS_LB_NOT_USED; MS_Lib 860 drivers/usb/storage/ene_ub6250.c switch (info->MS_Lib.Phy2LogMap[PhyBlock]) { MS_Lib 961 drivers/usb/storage/ene_ub6250.c switch (info->MS_Lib.cardType = SysInfo->bCardType) { MS_Lib 973 drivers/usb/storage/ene_ub6250.c info->MS_Lib.blockSize = be16_to_cpu(SysInfo->wBlockSize); MS_Lib 974 drivers/usb/storage/ene_ub6250.c info->MS_Lib.NumberOfPhyBlock = be16_to_cpu(SysInfo->wBlockNumber); MS_Lib 975 drivers/usb/storage/ene_ub6250.c info->MS_Lib.NumberOfLogBlock = be16_to_cpu(SysInfo->wTotalBlockNumber)-2; MS_Lib 976 drivers/usb/storage/ene_ub6250.c info->MS_Lib.PagesPerBlock = info->MS_Lib.blockSize * SIZE_OF_KIRO / MS_BYTES_PER_PAGE; MS_Lib 977 drivers/usb/storage/ene_ub6250.c info->MS_Lib.NumberOfSegment = info->MS_Lib.NumberOfPhyBlock / MS_PHYSICAL_BLOCKS_PER_SEGMENT; MS_Lib 1001 drivers/usb/storage/ene_ub6250.c if (EntryOffset + MS_BYTES_PER_PAGE + EntrySize > info->MS_Lib.blockSize * (u32)SIZE_OF_KIRO) MS_Lib 1055 drivers/usb/storage/ene_ub6250.c info->MS_Lib.BytesPerSector = le16_to_cpu(idi->wIDIbytesPerSector); MS_Lib 1056 drivers/usb/storage/ene_ub6250.c if (info->MS_Lib.BytesPerSector != MS_BYTES_PER_PAGE) MS_Lib 1076 drivers/usb/storage/ene_ub6250.c info->MS_Lib.wrtblk = (u16)-1; /* set to -1 */ MS_Lib 1082 drivers/usb/storage/ene_ub6250.c if (info->MS_Lib.blkpag) { MS_Lib 1083 drivers/usb/storage/ene_ub6250.c kfree(info->MS_Lib.blkpag); /* Arnold test ... */ MS_Lib 1084 drivers/usb/storage/ene_ub6250.c info->MS_Lib.blkpag = NULL; MS_Lib 1087 drivers/usb/storage/ene_ub6250.c if (info->MS_Lib.blkext) { MS_Lib 1088 drivers/usb/storage/ene_ub6250.c kfree(info->MS_Lib.blkext); /* Arnold test ... */ MS_Lib 1089 drivers/usb/storage/ene_ub6250.c info->MS_Lib.blkext = NULL; MS_Lib 1102 drivers/usb/storage/ene_ub6250.c info->MS_Lib.flags = 0; MS_Lib 1103 drivers/usb/storage/ene_ub6250.c info->MS_Lib.BytesPerSector = 0; MS_Lib 1104 drivers/usb/storage/ene_ub6250.c info->MS_Lib.SectorsPerCylinder = 0; MS_Lib 1106 drivers/usb/storage/ene_ub6250.c info->MS_Lib.cardType = 0; MS_Lib 1107 drivers/usb/storage/ene_ub6250.c info->MS_Lib.blockSize = 0; MS_Lib 1108 drivers/usb/storage/ene_ub6250.c info->MS_Lib.PagesPerBlock = 0; MS_Lib 1110 drivers/usb/storage/ene_ub6250.c info->MS_Lib.NumberOfPhyBlock = 0; MS_Lib 1111 drivers/usb/storage/ene_ub6250.c info->MS_Lib.NumberOfLogBlock = 0; MS_Lib 1119 drivers/usb/storage/ene_ub6250.c info->MS_Lib.wrtblk = (u16)-1; MS_Lib 1121 drivers/usb/storage/ene_ub6250.c info->MS_Lib.blkpag = kmalloc_array(info->MS_Lib.PagesPerBlock, MS_Lib 1122 drivers/usb/storage/ene_ub6250.c info->MS_Lib.BytesPerSector, MS_Lib 1124 drivers/usb/storage/ene_ub6250.c info->MS_Lib.blkext = kmalloc_array(info->MS_Lib.PagesPerBlock, MS_Lib 1128 drivers/usb/storage/ene_ub6250.c if ((info->MS_Lib.blkpag == NULL) || (info->MS_Lib.blkext == NULL)) { MS_Lib 1145 drivers/usb/storage/ene_ub6250.c if ((logblk >= info->MS_Lib.NumberOfLogBlock) || MS_Lib 1146 drivers/usb/storage/ene_ub6250.c (phyblk >= info->MS_Lib.NumberOfPhyBlock)) MS_Lib 1149 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[phyblk] = logblk; MS_Lib 1150 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Log2PhyMap[logblk] = phyblk; MS_Lib 1234 drivers/usb/storage/ene_ub6250.c if (blk == info->MS_Lib.Log2PhyMap[0]) { MS_Lib 1251 drivers/usb/storage/ene_ub6250.c if (phyblk >= info->MS_Lib.NumberOfPhyBlock) MS_Lib 1254 drivers/usb/storage/ene_ub6250.c log = info->MS_Lib.Phy2LogMap[phyblk]; MS_Lib 1256 drivers/usb/storage/ene_ub6250.c if (log < info->MS_Lib.NumberOfLogBlock) MS_Lib 1257 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Log2PhyMap[log] = MS_LB_NOT_USED; MS_Lib 1259 drivers/usb/storage/ene_ub6250.c if (info->MS_Lib.Phy2LogMap[phyblk] != MS_LB_INITIAL_ERROR) MS_Lib 1260 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[phyblk] = MS_LB_ACQUIRED_ERROR; MS_Lib 1301 drivers/usb/storage/ene_ub6250.c if (phyblk >= info->MS_Lib.NumberOfPhyBlock) MS_Lib 1317 drivers/usb/storage/ene_ub6250.c if (phyblk >= info->MS_Lib.NumberOfPhyBlock) MS_Lib 1320 drivers/usb/storage/ene_ub6250.c log = info->MS_Lib.Phy2LogMap[phyblk]; MS_Lib 1322 drivers/usb/storage/ene_ub6250.c if (log < info->MS_Lib.NumberOfLogBlock) MS_Lib 1323 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Log2PhyMap[log] = MS_LB_NOT_USED; MS_Lib 1325 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[phyblk] = MS_LB_NOT_USED; MS_Lib 1330 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[phyblk] = MS_LB_NOT_USED_ERASED; MS_Lib 1391 drivers/usb/storage/ene_ub6250.c if (phyblk >= info->MS_Lib.NumberOfPhyBlock) MS_Lib 1398 drivers/usb/storage/ene_ub6250.c if (info->MS_Lib.Phy2LogMap[blk] == MS_LB_NOT_USED_ERASED) { MS_Lib 1400 drivers/usb/storage/ene_ub6250.c } else if (info->MS_Lib.Phy2LogMap[blk] == MS_LB_NOT_USED) { MS_Lib 1442 drivers/usb/storage/ene_ub6250.c if (logblk >= info->MS_Lib.NumberOfLogBlock) MS_Lib 1500 drivers/usb/storage/ene_ub6250.c bl_num = info->MS_Lib.NumberOfLogBlock * info->MS_Lib.blockSize * 2 - 1; MS_Lib 1569 drivers/usb/storage/ene_ub6250.c for (PhyBlock = 0; PhyBlock < info->MS_Lib.NumberOfPhyBlock;) { MS_Lib 1691 drivers/usb/storage/ene_ub6250.c logblk = (u16)(bn / info->MS_Lib.PagesPerBlock); MS_Lib 1692 drivers/usb/storage/ene_ub6250.c PageNum = (u8)(bn % info->MS_Lib.PagesPerBlock); MS_Lib 1695 drivers/usb/storage/ene_ub6250.c if (blen > (info->MS_Lib.PagesPerBlock-PageNum)) MS_Lib 1696 drivers/usb/storage/ene_ub6250.c len = info->MS_Lib.PagesPerBlock-PageNum; MS_Lib 1792 drivers/usb/storage/ene_ub6250.c PhyBlockAddr = (u16)(bn / info->MS_Lib.PagesPerBlock); MS_Lib 1793 drivers/usb/storage/ene_ub6250.c PageNum = (u8)(bn % info->MS_Lib.PagesPerBlock); MS_Lib 1796 drivers/usb/storage/ene_ub6250.c if (blen > (info->MS_Lib.PagesPerBlock-PageNum)) MS_Lib 1797 drivers/usb/storage/ene_ub6250.c len = info->MS_Lib.PagesPerBlock-PageNum; MS_Lib 1812 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[oldphy] = MS_LB_NOT_USED_ERASED; MS_Lib 2031 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[TmpBlock] = MS_LB_INITIAL_ERROR; MS_Lib 2033 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[btBlk1st] = MS_LB_BOOT_BLOCK; MS_Lib 2037 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[TmpBlock] = MS_LB_INITIAL_ERROR; MS_Lib 2039 drivers/usb/storage/ene_ub6250.c info->MS_Lib.Phy2LogMap[btBlk2nd] = MS_LB_BOOT_BLOCK; MS_Lib 2047 drivers/usb/storage/ene_ub6250.c TmpBlock < info->MS_Lib.NumberOfPhyBlock;