Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49ff7d5

Browse files
committed
append ss to data item names, to distinguish from the generic hub classes versions.
use slightly higher priority to always init before hub.class.
1 parent776e3f2 commit49ff7d5

File tree

3 files changed

+96
-96
lines changed

3 files changed

+96
-96
lines changed

‎rom/usb/classes/hubss/hubss.conf‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
##begin config
22
version 4.3
3-
libbasenh
4-
libbasetype structNepHubBase
3+
libbasenhss
4+
libbasetype structNepHubSSBase
55
libbasetypeextern struct Library
6-
residentpri47
7-
basenamehub
6+
residentpri48
7+
basenamehubss
88
##end config
99

1010
##begin cdef

‎rom/usb/classes/hubss/hubss_class.c‎

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (C) 2014, The AROS Development Team. All rights reserved.
2+
Copyright (C) 2014-2025, The AROS Development Team. All rights reserved.
33
44
Desc: SuperSpeed USB3.0 hub for Poseidon (based upon hub.class.c by Chris Hodges <chrisly@platon42.de>)
55
*/
@@ -23,17 +23,17 @@
2323

2424
#includeLC_LIBDEFS_FILE
2525

26-
structNepClassHub*GM_UNIQUENAME(usbAttemptDeviceBinding)(structNepHubBase*nh,structPsdDevice*pd);
27-
structNepClassHub*GM_UNIQUENAME(usbForceDeviceBinding)(structNepHubBase*nh,structPsdDevice*pd);
28-
voidGM_UNIQUENAME(usbReleaseDeviceBinding)(structNepHubBase*nh,structNepClassHub*nch);
29-
30-
structNepClassHub*GM_UNIQUENAME(nAllocHub)(void);
31-
voidGM_UNIQUENAME(nFreeHub)(structNepClassHub*nch);
32-
structPsdDevice*GM_UNIQUENAME(nConfigurePort)(structNepClassHub*nch,UWORDport);
33-
LONGGM_UNIQUENAME(nClearPortStatus)(structNepClassHub*nch,UWORDport);
34-
BOOLGM_UNIQUENAME(nHubSuspendDevice)(structNepClassHub*nch,structPsdDevice*pd);
35-
BOOLGM_UNIQUENAME(nHubResumeDevice)(structNepClassHub*nch,structPsdDevice*pd);
36-
voidGM_UNIQUENAME(nHandleHubMethod)(structNepClassHub*nch,structNepHubMsg*nhm);
26+
structNepClassHubSS*GM_UNIQUENAME(usbAttemptDeviceBinding)(structNepHubSSBase*nh,structPsdDevice*pd);
27+
structNepClassHubSS*GM_UNIQUENAME(usbForceDeviceBinding)(structNepHubSSBase*nh,structPsdDevice*pd);
28+
voidGM_UNIQUENAME(usbReleaseDeviceBinding)(structNepHubSSBase*nh,structNepClassHubSS*nch);
29+
30+
structNepClassHubSS*GM_UNIQUENAME(nAllocHub)(void);
31+
voidGM_UNIQUENAME(nFreeHub)(structNepClassHubSS*nch);
32+
structPsdDevice*GM_UNIQUENAME(nConfigurePort)(structNepClassHubSS*nch,UWORDport);
33+
LONGGM_UNIQUENAME(nClearPortStatus)(structNepClassHubSS*nch,UWORDport);
34+
BOOLGM_UNIQUENAME(nHubSuspendDevice)(structNepClassHubSS*nch,structPsdDevice*pd);
35+
BOOLGM_UNIQUENAME(nHubResumeDevice)(structNepClassHubSS*nch,structPsdDevice*pd);
36+
voidGM_UNIQUENAME(nHandleHubMethod)(structNepClassHubSS*nch,structNepHubSSMsg*nhm);
3737
AROS_UFP0(void,GM_UNIQUENAME(nHubssTask));
3838

3939
/* /// "Lib Stuff" */
@@ -58,12 +58,12 @@ ADD2INITLIB(GM_UNIQUENAME(libInit), 0)
5858
*/
5959

6060
/* /// "usbAttemptDeviceBinding()" */
61-
structNepClassHub*GM_UNIQUENAME(usbAttemptDeviceBinding)(structNepHubBase*nh,structPsdDevice*pd) {
61+
structNepClassHubSS*GM_UNIQUENAME(usbAttemptDeviceBinding)(structNepHubSSBase*nh,structPsdDevice*pd) {
6262
structLibrary*ps;
6363
IPTRdevclass;
6464
IPTRissuperspeed=0;
6565

66-
//KPRINTF(0, ("usbAttemptDeviceBinding(%p)\n", pd));
66+
//KPRINTF(0, ("hubss::usbAttemptDeviceBinding(%p)\n", pd));
6767

6868
if((ps=OpenLibrary("poseidon.library",4))) {
6969
psdGetAttrs(PGA_DEVICE,pd,DA_Class,&devclass,DA_IsSuperspeed,&issuperspeed,TAG_DONE);
@@ -77,22 +77,23 @@ struct NepClassHub * GM_UNIQUENAME(usbAttemptDeviceBinding)(struct NepHubBase *n
7777
}
7878

7979
/* /// "usbForceDeviceBinding()" */
80-
structNepClassHub*GM_UNIQUENAME(usbForceDeviceBinding)(structNepHubBase*nh,structPsdDevice*pd) {
80+
structNepClassHubSS*GM_UNIQUENAME(usbForceDeviceBinding)(structNepHubSSBase*nh,structPsdDevice*pd) {
8181
structLibrary*ps;
82-
structNepClassHub*nch;
82+
structNepClassHubSS*nch;
8383
STRPTRdevname;
8484
charbuf[64];
8585
structTask*tmptask;
8686

87-
//KPRINTF(0, ("usbForceDeviceBinding(%p)\n", pd));
87+
//KPRINTF(0, ("hubss::usbForceDeviceBinding(%p)\n", pd));
8888

8989
if((ps=OpenLibrary("poseidon.library",4))) {
9090
psdGetAttrs(PGA_DEVICE,pd,DA_ProductName,&devname,TAG_DONE);
9191

92-
if((nch=psdAllocVec(sizeof(structNepClassHub)))) {
92+
if((nch=psdAllocVec(sizeof(structNepClassHubSS)))) {
9393
nch->nch_HubBase=nh;
9494
nch->nch_Device=pd;
9595
psdSafeRawDoFmt(buf,64,"hubss.class<%p>",nch);
96+
9697
nch->nch_ReadySignal=SIGB_SINGLE;
9798
nch->nch_ReadySigTask=FindTask(NULL);
9899
SetSignal(0,SIGF_SINGLE);
@@ -125,7 +126,7 @@ struct NepClassHub * GM_UNIQUENAME(usbForceDeviceBinding)(struct NepHubBase * nh
125126
}
126127

127128
/* /// "usbReleaseDeviceBinding()" */
128-
voidGM_UNIQUENAME(usbReleaseDeviceBinding)(structNepHubBase*nh,structNepClassHub*nch) {
129+
voidGM_UNIQUENAME(usbReleaseDeviceBinding)(structNepHubSSBase*nh,structNepClassHubSS*nch) {
129130
structLibrary*ps;
130131
STRPTRdevname;
131132

@@ -161,7 +162,7 @@ void GM_UNIQUENAME(usbReleaseDeviceBinding)(struct NepHubBase *nh, struct NepCla
161162
}
162163

163164
/* /// "usbGetAttrsA()" */
164-
AROS_LH3(LONG,usbGetAttrsA,AROS_LHA(ULONG,type,D0),AROS_LHA(APTR,usbstruct,A0),AROS_LHA(structTagItem*,taglist,A1),LIBBASETYPEPTR,nh,5,hub) {
165+
AROS_LH3(LONG,usbGetAttrsA,AROS_LHA(ULONG,type,D0),AROS_LHA(APTR,usbstruct,A0),AROS_LHA(structTagItem*,taglist,A1),LIBBASETYPEPTR,nh,5,hubss) {
165166
AROS_LIBFUNC_INIT
166167

167168
structTagItem*ti;
@@ -218,18 +219,18 @@ AROS_LH3(LONG, usbGetAttrsA, AROS_LHA(ULONG, type, D0), AROS_LHA(APTR, usbstruct
218219
}
219220

220221
/* /// "usbSetAttrsA()" */
221-
AROS_LH3(LONG,usbSetAttrsA,AROS_LHA(ULONG,type,D0),AROS_LHA(APTR,usbstruct,A0),AROS_LHA(structTagItem*,tags,A1),LIBBASETYPEPTR,nh,6,hub) {
222+
AROS_LH3(LONG,usbSetAttrsA,AROS_LHA(ULONG,type,D0),AROS_LHA(APTR,usbstruct,A0),AROS_LHA(structTagItem*,tags,A1),LIBBASETYPEPTR,nh,6,hubss) {
222223
AROS_LIBFUNC_INIT
223224

224225
return(0);
225226
AROS_LIBFUNC_EXIT
226227
}
227228

228229
/* /// "usbDoMethodA()" */
229-
AROS_LH2(IPTR,usbDoMethodA,AROS_LHA(ULONG,methodid,D0),AROS_LHA(IPTR*,methoddata,A1),LIBBASETYPEPTR,nh,7,hub) {
230+
AROS_LH2(IPTR,usbDoMethodA,AROS_LHA(ULONG,methodid,D0),AROS_LHA(IPTR*,methoddata,A1),LIBBASETYPEPTR,nh,7,hubss) {
230231
AROS_LIBFUNC_INIT
231232

232-
structNepClassHub*nch;
233+
structNepClassHubSS*nch;
233234

234235
KPRINTF(1, ("Do Method %ld\n",methodid));
235236
switch(methodid) {
@@ -240,7 +241,7 @@ AROS_LH2(IPTR, usbDoMethodA, AROS_LHA(ULONG, methodid, D0), AROS_LHA(IPTR *, met
240241
return((IPTR)GM_UNIQUENAME(usbForceDeviceBinding)(nh, (structPsdDevice*)methoddata[0]));
241242

242243
caseUCM_ReleaseDeviceBinding:
243-
GM_UNIQUENAME(usbReleaseDeviceBinding)(nh, (structNepClassHub*)methoddata[0]);
244+
GM_UNIQUENAME(usbReleaseDeviceBinding)(nh, (structNepClassHubSS*)methoddata[0]);
244245
return(TRUE);
245246

246247
caseUCM_HubPowerCyclePort:
@@ -254,7 +255,7 @@ AROS_LH2(IPTR, usbDoMethodA, AROS_LHA(ULONG, methodid, D0), AROS_LHA(IPTR *, met
254255
}
255256

256257
Forbid();
257-
nch= (structNepClassHub*)nh->nh_Bindings.lh_Head;
258+
nch= (structNepClassHubSS*)nh->nh_Bindings.lh_Head;
258259
while(nch->nch_Node.ln_Succ) {
259260
if(nch->nch_Device==pd) {
260261
KPRINTF(20, ("HubPowerCycle/DisablePort Dev found (port %ld)!\n",port));
@@ -271,15 +272,15 @@ AROS_LH2(IPTR, usbDoMethodA, AROS_LHA(ULONG, methodid, D0), AROS_LHA(IPTR *, met
271272
}
272273
break;
273274
}
274-
nch= (structNepClassHub*)nch->nch_Node.ln_Succ;
275+
nch= (structNepClassHubSS*)nch->nch_Node.ln_Succ;
275276
}
276277
Permit();
277278

278279
return(FALSE);
279280
}/* case UCM_HubDisablePort */
280281

281282
caseUCM_HubClassScan: {
282-
nch= (structNepClassHub*)methoddata[0];
283+
nch= (structNepClassHubSS*)methoddata[0];
283284

284285
Forbid();
285286
nch->nch_ClassScan= TRUE;
@@ -298,9 +299,9 @@ AROS_LH2(IPTR, usbDoMethodA, AROS_LHA(ULONG, methodid, D0), AROS_LHA(IPTR *, met
298299
caseUCM_HubReleaseDevBinding:
299300
caseUCM_HubSuspendDevice:
300301
caseUCM_HubResumeDevice: {
301-
structNepHubMsgnhm;
302+
structNepHubSSMsgnhm;
302303
structLibrary*ps;
303-
nch= (structNepClassHub*)methoddata[0];
304+
nch= (structNepClassHubSS*)methoddata[0];
304305
nhm.nhm_Result= (IPTR)NULL;
305306
nhm.nhm_MethodID=methodid;
306307
nhm.nhm_Params=methoddata;
@@ -311,7 +312,7 @@ AROS_LH2(IPTR, usbDoMethodA, AROS_LHA(ULONG, methodid, D0), AROS_LHA(IPTR *, met
311312
GM_UNIQUENAME(nHandleHubMethod)(nch,&nhm);
312313
}else {
313314
nhm.nhm_Msg.mn_ReplyPort=CreateMsgPort();
314-
nhm.nhm_Msg.mn_Length=sizeof(structNepHubMsg);
315+
nhm.nhm_Msg.mn_Length=sizeof(structNepHubSSMsg);
315316

316317
Forbid();
317318
if(nch->nch_Task&&nhm.nhm_Msg.mn_ReplyPort) {
@@ -347,7 +348,7 @@ AROS_LH2(IPTR, usbDoMethodA, AROS_LHA(ULONG, methodid, D0), AROS_LHA(IPTR *, met
347348
AROS_UFH0(void,GM_UNIQUENAME(nHubssTask)) {
348349
AROS_USERFUNC_INIT
349350

350-
structNepClassHub*nch;
351+
structNepClassHubSS*nch;
351352
structPsdPipe*pp;
352353
ULONGsigmask;
353354
ULONGsigs;
@@ -358,7 +359,7 @@ AROS_UFH0(void, GM_UNIQUENAME(nHubssTask)) {
358359
ULONGcount;
359360
structPsdDevice*pd;
360361
STRPTRdevname;
361-
structNepHubMsg*nhm;
362+
structNepHubSSMsg*nhm;
362363

363364
if((nch=GM_UNIQUENAME(nAllocHub)())) {
364365
Forbid();
@@ -397,7 +398,7 @@ AROS_UFH0(void, GM_UNIQUENAME(nHubssTask)) {
397398
}
398399
sigs=Wait(sigmask);
399400

400-
while((nhm= (structNepHubMsg*)GetMsg(nch->nch_CtrlMsgPort))) {
401+
while((nhm= (structNepHubSSMsg*)GetMsg(nch->nch_CtrlMsgPort))) {
401402
GM_UNIQUENAME(nHandleHubMethod)(nch,nhm);
402403
ReplyMsg((structMessage*)nhm);
403404
}
@@ -686,11 +687,11 @@ AROS_UFH0(void, GM_UNIQUENAME(nHubssTask)) {
686687
}
687688

688689
/* /// "nAllocHub()" */
689-
structNepClassHub*GM_UNIQUENAME(nAllocHub)(void) {
690+
structNepClassHubSS*GM_UNIQUENAME(nAllocHub)(void) {
690691
structUsbSSHubDesc*usshd;
691692
//struct UsbStdBOSDesc *usbosd;
692693
structTask*thistask;
693-
structNepClassHub*nch;
694+
structNepClassHubSS*nch;
694695
structUsbHubStatusuhhs;
695696
APTRparenthub;
696697
LONGioerr;
@@ -925,7 +926,7 @@ struct NepClassHub * GM_UNIQUENAME(nAllocHub)(void) {
925926
}
926927

927928
/* /// "nFreeHub()" */
928-
voidGM_UNIQUENAME(nFreeHub)(structNepClassHub*nch) {
929+
voidGM_UNIQUENAME(nFreeHub)(structNepClassHubSS*nch) {
929930
UWORDnum;
930931
LONGioerr;
931932
structPsdDevice*pd;
@@ -990,7 +991,7 @@ void GM_UNIQUENAME(nFreeHub)(struct NepClassHub *nch) {
990991
/* *** HUBSS Class *** */
991992

992993
/* /// "nClearPortStatus()" */
993-
LONGGM_UNIQUENAME(nClearPortStatus)(structNepClassHub*nch,UWORDport) {
994+
LONGGM_UNIQUENAME(nClearPortStatus)(structNepClassHubSS*nch,UWORDport) {
994995
LONGioerr;
995996

996997
psdPipeSetup(nch->nch_EP0Pipe,URTF_CLASS|URTF_OTHER,USR_CLEAR_FEATURE,UFS_C_PORT_CONNECTION, (ULONG)port);
@@ -1030,7 +1031,7 @@ LONG GM_UNIQUENAME(nClearPortStatus)(struct NepClassHub *nch, UWORD port) {
10301031
}
10311032

10321033
/* /// "nConfigurePort()" */
1033-
structPsdDevice*GM_UNIQUENAME(nConfigurePort)(structNepClassHub*nch,UWORDport) {
1034+
structPsdDevice*GM_UNIQUENAME(nConfigurePort)(structNepClassHubSS*nch,UWORDport) {
10341035
LONGioerr;
10351036
LONGdelayretries;
10361037
LONGresetretries;
@@ -1236,7 +1237,7 @@ struct PsdDevice * GM_UNIQUENAME(nConfigurePort)(struct NepClassHub *nch, UWORD
12361237
}
12371238

12381239
/* /// "nHandleHubMethod()" */
1239-
voidGM_UNIQUENAME(nHandleHubMethod)(structNepClassHub*nch,structNepHubMsg*nhm) {
1240+
voidGM_UNIQUENAME(nHandleHubMethod)(structNepClassHubSS*nch,structNepHubSSMsg*nhm) {
12401241
ULONGnum;
12411242
structPsdDevice*pd;
12421243
nhm->nhm_Result=0;
@@ -1305,7 +1306,7 @@ void GM_UNIQUENAME(nHandleHubMethod)(struct NepClassHub *nch, struct NepHubMsg *
13051306
}
13061307

13071308
/* /// "nHubSuspendDevice()" */
1308-
BOOLGM_UNIQUENAME(nHubSuspendDevice)(structNepClassHub*nch,structPsdDevice*pd) {
1309+
BOOLGM_UNIQUENAME(nHubSuspendDevice)(structNepClassHubSS*nch,structPsdDevice*pd) {
13091310
APTRbinding=NULL;
13101311
APTRpuc=NULL;
13111312
ULONGnum;
@@ -1334,7 +1335,7 @@ BOOL GM_UNIQUENAME(nHubSuspendDevice)(struct NepClassHub *nch, struct PsdDevice
13341335
}
13351336

13361337
/* /// "nHubResumeDevice()" */
1337-
BOOLGM_UNIQUENAME(nHubResumeDevice)(structNepClassHub*nch,structPsdDevice*pd) {
1338+
BOOLGM_UNIQUENAME(nHubResumeDevice)(structNepClassHubSS*nch,structPsdDevice*pd) {
13381339
ULONGnum;
13391340
BOOLresult= FALSE;
13401341
LONGioerr;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp