11#include "accdvd_internal.h"
14 {&acAtaModuleStart, &acAtaModuleStop, &acAtaModuleStatus},
15 {&acd_module_start, &acd_module_stop, &acd_module_status},
16 {&cdfs_module_start, &cdfs_module_stop, &cdfs_module_status}};
19static int cdc_errno_set(
struct cdc_softc *cdcc,
int ret)
66static int cdc_eve_alloc()
74 ret = CreateEventFlag(¶m);
77 printf(
"accdvd:cdc:eve_alloc: error %d\n", ret);
82static int cdc_sem_alloc()
91 ret = CreateSema(¶m);
94 printf(
"accdvd:cdc:sem_alloc: error %d\n", ret);
99static int cdc_unlock(
struct cdc_softc *cdcc,
int ret, acCdvdsifId fno)
104 lockid = cdcc->lockid;
113 cdc_errno_set(cdcc, v6);
114 eveid = cdcc->syncid;
116 cdcc->fno = AC_CDVDSIF_ID_NOP;
118 SetEventFlag(eveid, 3u);
138int cdc_seterrno(
int ret)
154 cdc_errno_set(arg, v3);
163 case AC_CDVDSIF_ID_PAUSE:
166 case AC_CDVDSIF_ID_READ:
169 case AC_CDVDSIF_ID_SEEK:
172 case AC_CDVDSIF_ID_STANDBY:
175 case AC_CDVDSIF_ID_STOP:
186 arg->fno = AC_CDVDSIF_ID_NOP;
188 SetEventFlag(eveid, 3u);
191int cdc_sync(
int nonblocking)
199 if ( nonblocking > 0 )
204 if ( nonblocking < 0 )
206 if ( Cdcc.syncid > 0 )
207 WaitEventFlag(Cdcc.syncid, bits, 1, &bits);
208 return ((bits & 0xFF) ^ 1) & 1;
211int cdc_ready(
int nonblocking)
218 struct acd acd_data_v8;
220 acd = acd_setup(&acd_data, 0, 0, 5000000);
227 ret = acd_ready(
acd);
231 v4 = acd_readcapacity();
237 else if ( ret < -255 )
239 asc = (acUint16) - (ret & 0xFFFF);
240 if ( -ret >> 16 != 6 )
280 acd_getmedium(acd_setup(&acd_data_v8, 0, 0, 5000000));
281 Cdcc.tray = acd_gettray();
294 v0 = acd_setup(&acd_data, 0, 0, 5000000);
295 v1 = acd_getmedium(v0);
300 cdc_errno_set(&Cdcc, v3);
340 ret = acd_getmedium(0);
341 acd_setup(&acd_data, 0, 0, 5000000);
343 ret = acd_getmedium(&acd_data);
352 v2 = acd_getstatus();
355 return (v2 != 0) ? 2 : 0;
358int cdc_readtoc(
unsigned char *
toc, cdc_xfer_t xfer)
367 if ( WaitSema(Cdcc.lockid) )
380 if ( Cdcc.fno == AC_CDVDSIF_ID_NOP )
383 Cdcc.fno = AC_CDVDSIF_ID_READTOC;
385 if ( Cdcc.syncid > 0 )
386 ClearEventFlag(Cdcc.syncid, 0);
391 ret_v3 = acd_readtoc(acd_setup(&Cdcc.acd, 0, 0, 5000000), Cdcc.buf, 1024);
395 memset(&Cdcc.buf[ret_v3], 0, 1024 - ret_v3);
396 ret_v3 = xfer(
toc, Cdcc.buf, 1024, CDC_XFER_OUT);
399 return cdc_unlock(&Cdcc, ret_v3, AC_CDVDSIF_ID_READTOC);
402int cdc_lookup(
sceCdlFILE *fp,
const char *name,
int namlen, cdc_xfer_t xfer)
412 if ( WaitSema(Cdcc.lockid) )
433 Cdcc.fno = AC_CDVDSIF_ID_LOOKUP;
435 if ( Cdcc.syncid > 0 )
437 ClearEventFlag(Cdcc.syncid, 0);
448 (
void *)((uiptr)name - ((uiptr)name & 0xF)),
449 (((uiptr)name & 0xF) + namlen + 0xF) & 0xFFFFFFF0,
451 name = (
char *)&Cdcc.buf[(uiptr)name & 0xF];
457 ret_v4 = cdfs_lookup(&dirent, name, namlen);
462 *(acUint32 *)fp->date = *(acUint32 *)&dirent.d_time.t_padding;
463 *(acUint32 *)&fp->date[4] = *(acUint32 *)&dirent.d_time.t_day;
464 d_namlen = dirent.d_namlen;
465 fp->lsn = dirent.d_lsn;
466 fp->size = dirent.d_size;
467 fp->name[d_namlen] = 59;
468 fp->name[d_namlen + 1] = (dirent.d_vol & 0xFF) + 48;
469 fp->name[d_namlen + 2] = 0;
470 memcpy(fp->name, dirent.d_name, d_namlen);
475 ret_v3 = cdfs_recover(ret_v4);
479 return cdc_unlock(&Cdcc, ret_v3, AC_CDVDSIF_ID_LOOKUP);
482int cdc_seek(
unsigned int lsn, cdc_done_t done)
489 fno = AC_CDVDSIF_ID_SEEK;
493 if ( WaitSema(Cdcc.lockid) )
506 if ( Cdcc.fno == AC_CDVDSIF_ID_NOP )
509 Cdcc.fno = AC_CDVDSIF_ID_SEEK;
511 if ( Cdcc.syncid > 0 )
512 ClearEventFlag(Cdcc.syncid, 0);
517 fno = AC_CDVDSIF_ID_NOP;
519 else if ( lsn < Cdcc.cdsize )
522 ret_v4 = acd_seek(acd_setup(&Cdcc.acd, (acd_done_t)cdc_done, &Cdcc, -5000000), lsn);
524 fno = AC_CDVDSIF_ID_NOP;
530 return cdc_unlock(&Cdcc, ret_v4, fno);
533static int cdc_ioctl(acCdvdsifId fno,
int state,
int tmout, cdc_done_t done)
543 if ( WaitSema(Cdcc.lockid) )
559 else if ( state >= 5 )
581 if ( Cdcc.fno == AC_CDVDSIF_ID_NOP )
586 if ( Cdcc.syncid > 0 )
587 ClearEventFlag(Cdcc.syncid, 0);
593 Cdcc.fno = AC_CDVDSIF_ID_NOP;
594 if ( Cdcc.syncid > 0 )
595 SetEventFlag(Cdcc.syncid, 3u);
596 v12 = AC_CDVDSIF_ID_NOP;
599 if ( v12 < AC_CDVDSIF_ID_NOP )
601 fno = AC_CDVDSIF_ID_NOP;
606 ret_v4 = acd_ioctl(acd_setup(&Cdcc.acd, (acd_done_t)cdc_done, &Cdcc, tmout), state);
609 fno = AC_CDVDSIF_ID_NOP;
612 return cdc_unlock(&Cdcc, ret_v4, fno);
615int cdc_pause(cdc_done_t done)
617 return cdc_ioctl(AC_CDVDSIF_ID_PAUSE, 1, -5000000, done);
620int cdc_standby(cdc_done_t done)
622 return cdc_ioctl(AC_CDVDSIF_ID_STANDBY, 17, -5000000, done);
625int cdc_stop(cdc_done_t done)
627 return cdc_ioctl(AC_CDVDSIF_ID_STOP, 4, -5000000, done);
630int cdc_tray(
int mode, u32 *traycnt)
641 acd_getmedium(acd_setup(&v10, 0, 0, 5000000));
650 v5 = cdc_ioctl(AC_CDVDSIF_ID_TRAY, ret, 5000000, 0);
654 *traycnt = tray != v8;
667 if ( WaitSema(Cdcc.lockid) )
677 if ( Cdcc.fno == AC_CDVDSIF_ID_READ )
679 ret = Cdcc.rd.pos << 11;
691 if ( Cdcc.lockid > 0 )
693 SignalSema(Cdcc.lockid);
708 spindlctrl = mode->spindlctrl;
709 v5 = acd_setup(&cdcc->acd, 0, 0, 5000000);
710 speed = cdcc->rd.maxspeed;
713 if ( !cdcc->rd.maxspeed )
715 v8 = acd_getspeed(v5, 1);
720 cdcc->rd.maxspeed = v8;
721 if ( spindlctrl == 1 )
725 v9 = 3 * (speed - 1);
728 speed = (v9 + 3) >> 2;
730 if ( acd_setspeed(
acd, speed) >= 0 )
731 cdcc->rd.spindle = spindlctrl;
733 trycount = mode->trycount - 1;
734 acd_v7 = acd_setup(&cdcc->acd, 0, 0, 5000000);
737 while ( acd_setretry(acd_v7, trycount) == -61 && acd_getretry(acd_v7) >= 0 )
742static void cdc_read_done(
struct acd *
acd,
struct cdc_softc *arg,
int ret)
748 unsigned char *buf_v9;
763 buf = &arg->rd.buf[2048 * cpos];
764 bsize = arg->rd.bsize;
765 rlen = size - (cpos + ret);
766 if ( size < cpos + ret )
769 rlen = arg->rd.bsize;
771 xlen = arg->rd.bsize;
775 unsigned char *size_v10;
780 cpos_v11 = bsize << 11;
782 bsize_v13 = arg->rd.bank;
783 buf_v9 = &src[cpos_v11];
789 arg->rd.bank = bsize_v13 ^ 1;
790 ret = xfer(size_v10, src, xlen << 11, CDC_XFER_OUT);
794 buf_v9 = &buf[2048 * ret];
804 size_v14 = arg->syncid;
806 SetEventFlag(size_v14, 2u);
807 ret = acd_read(
acd, arg->rd.lsn + npos, buf_v9, rlen);
816 size_v15 = arg->syncid;
818 ClearEventFlag(size_v15, 0xFFFFFFFD);
822 cdc_done(
acd, arg, ret);
825int cdc_read(
unsigned int lsn,
void *buf,
int sectors,
const sceCdRMode *mode, cdc_xfer_t xfer, cdc_done_t done)
833 fno = AC_CDVDSIF_ID_READ;
837 if ( WaitSema(Cdcc.lockid) )
850 if ( Cdcc.fno == AC_CDVDSIF_ID_NOP )
853 Cdcc.fno = AC_CDVDSIF_ID_READ;
855 if ( Cdcc.syncid > 0 )
856 ClearEventFlag(Cdcc.syncid, 0);
861 fno = AC_CDVDSIF_ID_NOP;
862 return cdc_unlock(&Cdcc, ret_v4, fno);
865 if ( lsn >= Cdcc.cdsize )
871 if ( lsn + sectors >= Cdcc.cdsize )
872 sectors = Cdcc.cdsize - lsn;
873 Cdcc.rd.buf = (acUint8 *)buf;
875 Cdcc.rd.size = sectors;
883 if ( (
unsigned int)sectors < 0x10 )
885 ret_v4 = cdc_rmode(&Cdcc, mode);
888 return cdc_unlock(&Cdcc, ret_v4, fno);
889 ret_v4 = acd_read(acd_setup(&Cdcc.acd, (acd_done_t)cdc_read_done, &Cdcc, -5000000), lsn, buf, n);
892 fno = AC_CDVDSIF_ID_NOP;
895 return cdc_unlock(&Cdcc, ret_v4, fno);
898int cdc_xfer(
void *dst,
void *src,
int len,
enum cdc_xfer_dir dir)
901 memcpy(dst, src, len);
905static int cdc_unlocks(
struct cdc_softc *cdcc,
int ret, acCdvdsifId fno)
909 lockid = cdcc->lockid;
911 cdc_errno_set(cdcc, -ret);
912 if ( cdcc->fno == fno )
916 eveid = cdcc->syncid;
917 cdcc->fno = AC_CDVDSIF_ID_NOP;
919 SetEventFlag(eveid, 3u);
928static void cdc_stream_done(
struct acd *
acd,
struct cdc_softc *arg,
int ret)
940 arg->fno = AC_CDVDSIF_ID_NOP;
956 unsigned int size_v12;
962 bsize = arg->st.bsize;
963 cdsize = arg->cdsize;
964 head = arg->st.head + v4;
967 lsn = arg->st.lsn + v4;
968 if ( (flag & 0x10) != 0 )
972 lsn = arg->st.reqlsn;
973 flag = (flag | 0x14) ^ 0x14;
980 flag = (flag | 6) ^ 2;
994 buf = &arg->st.buf[2048 * head];
995 size_v12 = flag & 0x28;
996 if ( size_v12 == 32 )
998 arg->st.flag = flag & 0xFFFFFFFD;
1002 if ( ((flag & 0x28) >= 0x21) ? (size_v12 != 40) : (size_v12 != 8) )
1004 arg->st.flag = flag;
1008 arg->st.flag = flag & 4;
1011 arg->st.head = head;
1014 if ( (flag & 8) != 0 )
1016 arg->fno = AC_CDVDSIF_ID_NOP;
1024 if ( (flag & 0x20) != 0 )
1040 eveid = arg->syncid;
1042 SetEventFlag(arg->syncid, 3u);
1043 if ( (flag & 4) == 0 )
1046 ClearEventFlag(eveid, 0);
1047 v4 = acd_read(
acd, lsn, buf, xlen);
1064 cdc_errno_set(arg, v21);
1065 eveid_v17 = arg->syncid;
1066 if ( eveid_v17 > 0 )
1067 SetEventFlag(eveid_v17, 3u);
1071static int cdc_stream(
struct cdc_softc *cdcc)
1081 struct acd *ret_v10;
1084 if ( cdcc->fno != AC_CDVDSIF_ID_STREAM )
1089 head = cdcc->st.head;
1090 tail = cdcc->st.tail;
1093 xlen = cdcc->st.size - head;
1094 flag = cdcc->st.flag;
1095 if ( cdcc->st.bsize < xlen )
1096 xlen = cdcc->st.bsize;
1097 buf = &cdcc->st.buf[2048 * head];
1098 if ( (flag & 6) != 0 || (flag & 0x28) != 0 || (flag & 1) == 0 )
1103 unsigned int head_v7;
1106 head_v7 = cdcc->cdsize;
1107 if ( (flag & 0x10) != 0 )
1109 lsn = cdcc->st.reqlsn;
1119 if ( lsn + xlen >= head_v7 )
1121 xlen = head_v7 - lsn;
1122 if ( head_v7 == lsn )
1126 cdcc->st.flag = flag;
1132 tail_v9 = cdcc->syncid;
1134 ClearEventFlag(tail_v9, 0);
1135 ret_v10 = acd_setup(&cdcc->acd, (acd_done_t)cdc_stream_done, cdcc, -5000000);
1136 ret = acd_read(ret_v10, lsn, buf, xlen);
1142int cdc_reads(
void *buf,
int sectors,
int mode,
int *errp, cdc_xfer_t xfer)
1169 dst = (
unsigned char *)buf;
1170 resbits = (u32 *)&v33;
1180 v7 = WaitSema(Cdcc.lockid);
1191 if ( Cdcc.fno != AC_CDVDSIF_ID_STREAM )
1194 if ( Cdcc.fno == AC_CDVDSIF_ID_NOP )
1197 Cdcc.fno = AC_CDVDSIF_ID_READS;
1198 if ( Cdcc.syncid > 0 )
1199 ClearEventFlag(Cdcc.syncid, 0);
1206 printf(
"accdvd:cdc:reads: ACTIVE\n");
1212 rlen = Cdcc.st.tail;
1213 ret_v8 = Cdcc.st.flag;
1214 head = Cdcc.st.head;
1215 rlen_v10 = Cdcc.st.lsn >= Cdcc.cdsize;
1217 if ( (ret_v8 & 0x10) != 0 )
1221 if ( ((ret_v8 & 4) == 0) && (head == rlen) )
1236 xlen = Cdcc.st.size - rlen;
1238 if ( v5 < Cdcc.st.size - rlen )
1246 v21 = xfer(tmp, &Cdcc.st.buf[2048 * rlen], xlen * 2048, CDC_XFER_OUT);
1250 ret_v17 = rlen + rlen_v13;
1251 if ( rlen + rlen_v13 >= Cdcc.st.size )
1253 Cdcc.st.tail = ret_v17;
1254 Cdcc.st.flag &= ~4u;
1268 xlen_v20 = head - rlen;
1270 if ( len < head - rlen )
1275 rlen_v13 += xlen_v20;
1279 ret_v21 = xfer(v11, &Cdcc.st.buf[2048 * rlen], ret << 11, CDC_XFER_OUT);
1284 if ( ret >= Cdcc.st.size )
1287 Cdcc.st.flag &= ~4u;
1303 if ( rlen_v13 > 0 && xfer )
1305 xfer(0, 0, 0, CDC_XFER_SYNC);
1313 printf(
"accdvd:cdc:reads: READ\n");
1319 ret = cdc_stream(&Cdcc);
1322 cdc_unlocks(&Cdcc, ret, AC_CDVDSIF_ID_READS);
1325 if ( rlen_v23 <= 0 )
1330 if ( Cdcc.syncid > 0 )
1331 WaitEventFlag(Cdcc.syncid, 1u, 1, resbits);
1335 return sectors - v5;
1338int cdc_starts(
unsigned int lsn,
const sceCdRMode *mode)
1348 if ( WaitSema(Cdcc.lockid) )
1361 if ( Cdcc.fno != AC_CDVDSIF_ID_STREAM )
1364 if ( Cdcc.fno == AC_CDVDSIF_ID_NOP )
1367 Cdcc.fno = AC_CDVDSIF_ID_STARTS;
1368 if ( Cdcc.syncid > 0 )
1369 ClearEventFlag(Cdcc.syncid, 0);
1378 flag = Cdcc.st.flag;
1379 if ( (Cdcc.st.flag & 2) != 0 )
1381 Cdcc.st.reqlsn = lsn;
1382 Cdcc.st.flag |= 0x10u;
1393 acCdvdsifId flag_v5;
1396 Cdcc.fno = AC_CDVDSIF_ID_STREAM;
1397 ret = cdc_rmode(&Cdcc, mode);
1399 if ( ret < 0 || (ret = cdc_stream(&Cdcc), ret < 0) )
1403 return cdc_unlocks(&Cdcc, ret, AC_CDVDSIF_ID_STARTS);
1420 if ( WaitSema(Cdcc.lockid) )
1429 if ( Cdcc.fno != AC_CDVDSIF_ID_STREAM )
1432 if ( Cdcc.fno == AC_CDVDSIF_ID_NOP )
1435 Cdcc.fno = AC_CDVDSIF_ID_STOPS;
1436 if ( Cdcc.syncid > 0 )
1437 ClearEventFlag(Cdcc.syncid, 0);
1445 sync_v5 = Cdcc.st.flag | 8;
1446 if ( (Cdcc.st.flag & 2) == 0 )
1448 Cdcc.fno = AC_CDVDSIF_ID_STOPS;
1451 Cdcc.st.flag = sync_v5;
1454 ret_v6 = cdc_unlocks(&Cdcc, ret, AC_CDVDSIF_ID_STOPS);
1458 if ( Cdcc.syncid > 0 )
1459 WaitEventFlag(Cdcc.syncid, 1u, 1, &pattern);
1478 if ( WaitSema(Cdcc.lockid) )
1487 if ( Cdcc.fno != AC_CDVDSIF_ID_STREAM )
1490 if ( Cdcc.fno == AC_CDVDSIF_ID_NOP )
1493 Cdcc.fno = AC_CDVDSIF_ID_PAUSES;
1494 if ( Cdcc.syncid > 0 )
1495 ClearEventFlag(Cdcc.syncid, 0);
1505 sync_v6 = Cdcc.st.flag;
1506 if ( (Cdcc.st.flag & 2) != 0 )
1508 sync_v6 = Cdcc.st.flag | 0x20;
1509 Cdcc.st.flag |= 0x20u;
1511 sync_v5 = sync_v6 & 2;
1514 ret_v7 = cdc_unlocks(&Cdcc, ret, AC_CDVDSIF_ID_PAUSES);
1518 if ( Cdcc.syncid > 0 )
1519 WaitEventFlag(Cdcc.syncid, 1u, 1, &pattern);
1535 if ( WaitSema(Cdcc.lockid) )
1544 if ( Cdcc.fno == AC_CDVDSIF_ID_STREAM )
1559 Cdcc.fno = AC_CDVDSIF_ID_RESUMES;
1560 if ( Cdcc.syncid > 0 )
1562 ClearEventFlag(Cdcc.syncid, 0);
1572 flag = Cdcc.st.flag;
1573 if ( (Cdcc.st.flag & 2) == 0 && (Cdcc.st.flag & 0x20) != 0 )
1574 Cdcc.st.flag ^= 0x20u;
1577 if ( (flag & 0x20) != 0 )
1578 ret_v3 = cdc_stream(&Cdcc);
1580 return cdc_unlocks(&Cdcc, ret_v3, AC_CDVDSIF_ID_RESUMES);
1583int cdc_inits(
void *buf,
unsigned int size,
unsigned int bsize)
1592 if ( WaitSema(Cdcc.lockid) )
1605 if ( Cdcc.fno == AC_CDVDSIF_ID_NOP )
1608 Cdcc.fno = AC_CDVDSIF_ID_INITS;
1610 if ( Cdcc.syncid > 0 )
1611 ClearEventFlag(Cdcc.syncid, 0);
1617 Cdcc.st.buf = (acUint8 *)buf;
1618 Cdcc.st.size = size;
1619 Cdcc.st.bsize = bsize;
1626 return cdc_unlock(&Cdcc, ret_v3, AC_CDVDSIF_ID_INITS);
1629int cdc_seeks(
unsigned int lsn)
1640 if ( WaitSema(Cdcc.lockid) )
1649 if ( Cdcc.fno != AC_CDVDSIF_ID_STREAM )
1652 if ( Cdcc.fno == AC_CDVDSIF_ID_NOP )
1655 Cdcc.fno = AC_CDVDSIF_ID_SEEKS;
1656 if ( Cdcc.syncid > 0 )
1657 ClearEventFlag(Cdcc.syncid, 0);
1664 Cdcc.st.reqlsn = lsn;
1665 Cdcc.st.flag |= 0x10u;
1669 return cdc_unlocks(&Cdcc, ret, AC_CDVDSIF_ID_SEEKS);
1682 if ( WaitSema(Cdcc.lockid) )
1691 if ( Cdcc.fno != AC_CDVDSIF_ID_STREAM )
1694 if ( Cdcc.fno == AC_CDVDSIF_ID_NOP )
1697 Cdcc.fno = AC_CDVDSIF_ID_STATS;
1698 if ( Cdcc.syncid > 0 )
1699 ClearEventFlag(Cdcc.syncid, 0);
1706 if ( Cdcc.st.head == Cdcc.st.tail )
1708 if ( (Cdcc.st.flag & 4) == 0 )
1711 else if ( Cdcc.st.head < Cdcc.st.tail )
1713 ret = Cdcc.st.size + Cdcc.st.head - Cdcc.st.tail;
1717 ret = Cdcc.st.head - Cdcc.st.tail;
1721 if ( Cdcc.fno == AC_CDVDSIF_ID_STATS )
1723 Cdcc.fno = AC_CDVDSIF_ID_NOP;
1724 if ( Cdcc.syncid > 0 )
1725 SetEventFlag(Cdcc.syncid, 3u);
1727 if ( Cdcc.lockid > 0 )
1729 SignalSema(Cdcc.lockid);
1736int cdc_module_status()
1745 ret = Cdcc.lockid > 0;
1750int cdc_module_start(
int argc,
char **argv)
1764 ret = cdc_module_status();
1772 while ( (
unsigned int)index < 3 )
1776 ret_v3 = mods_120[v6].status();
1781 ret_v4 = mods_120[v6].start(argc, argv);
1789 printf(
"cdc:init_modules:S:%d: error %d\n", index, ret_v4);
1800 lockid = cdc_sem_alloc();
1801 syncid = cdc_eve_alloc();
1802 buf_v7 = (acUint8 *)AllocSysMemory(0, 0x10000, 0);
1808 memset(&Cdcc, 0,
sizeof(Cdcc));
1809 Cdcc.syncid = syncid;
1810 Cdcc.lockid = lockid;
1813 Cdcc.rd.spindle = -1;
1814 Cdcc.rd.maxspeed = 0;
1816 SetEventFlag(syncid, 3u);
1822 DeleteEventFlag(syncid);
1830int cdc_module_stop()
1838 ret = cdc_module_status();
1843 lockid = Cdcc.lockid;
1844 if ( Cdcc.lockid <= 0 )
1849 if ( Cdcc.syncid > 0 )
1850 WaitEventFlag(Cdcc.syncid, 1u, 1, &pattern);
1851 if ( Cdcc.syncid > 0 )
1852 DeleteEventFlag(Cdcc.syncid);
1854 FreeSysMemory(Cdcc.buf);
1855 memset(&Cdcc, 0,
sizeof(Cdcc));
1862 ret_v5 = mods_120[i].status();
1870 lockid_v6 = mods_120[i].stop();
1871 if ( lockid_v6 < 0 )
1873 printf(
"cdc:init_modules:E:%d: error %d\n", i, lockid_v6);
1881int cdc_module_restart(
int argc,
char **argv)
int CpuResumeIntr(int state)
int CpuSuspendIntr(int *state)