Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
506fb710
Commit
506fb710
authored
25 years ago
by
Andreas Mohr
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implemented InsertInASPIChain and fixed minor things.
parent
41d38ee8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/winaspi/winaspi16.c
+51
-16
51 additions, 16 deletions
dlls/winaspi/winaspi16.c
if1632/winaspi.spec
+1
-1
1 addition, 1 deletion
if1632/winaspi.spec
include/aspi.h
+2
-2
2 additions, 2 deletions
include/aspi.h
with
54 additions
and
19 deletions
dlls/winaspi/winaspi16.c
+
51
−
16
View file @
506fb710
...
...
@@ -27,6 +27,10 @@ DEFAULT_DEBUG_CHANNEL(aspi)
*/
#ifdef linux
static
FARPROC16
ASPIChainFunc
=
NULL
;
static
WORD
HA_Count
=
1
;
/* host adapter count; FIXME: detect it */
static
int
ASPI_OpenDevice16
(
SRB_ExecSCSICmd16
*
prb
)
{
...
...
@@ -383,13 +387,10 @@ WORD WINAPI GetASPISupportInfo16()
{
#ifdef linux
TRACE
(
aspi
,
"GETASPISupportInfo16
\n
"
);
/* high byte SS_COMP - low byte number of host adapters.
* FIXME!!! The number of host adapters is incorrect.
* I'm not sure how to determine this under linux etc.
*/
return
((
SS_COMP
<<
8
)
|
1
);
/* high byte SS_COMP - low byte number of host adapters */
return
((
SS_COMP
<<
8
)
|
HA_Count
);
#else
return
((
SS_
COMP
<<
8
)
|
0
);
return
((
SS_
NO_ASPI
<<
8
)
|
0
);
#endif
}
...
...
@@ -407,6 +408,16 @@ DWORD ASPI_SendASPICommand(DWORD ptrSRB, UINT16 mode)
break
;
case
ASPI_WIN16
:
lpSRB
=
PTR_SEG_TO_LIN
(
ptrSRB
);
if
(
ASPIChainFunc
)
{
/* This is not the post proc, it's the chain proc this time */
DWORD
ret
=
Callbacks
->
CallASPIPostProc
(
ASPIChainFunc
,
ptrSRB
);
if
(
ret
)
{
lpSRB
->
inquiry
.
SRB_Status
=
SS_INVALID_SRB
;
return
ret
;
}
}
break
;
}
...
...
@@ -417,7 +428,7 @@ DWORD ASPI_SendASPICommand(DWORD ptrSRB, UINT16 mode)
TRACE
(
aspi
,
"Extended request detected (Adaptec's ASPIxDOS).
\n
We don't support it at the moment.
\n
"
);
}
lpSRB
->
inquiry
.
SRB_ExtBufferSize
=
0x2000
;
/* bogus value */
lpSRB
->
inquiry
.
HA_Count
=
1
;
/* not always */
lpSRB
->
inquiry
.
HA_Count
=
HA_Count
;
lpSRB
->
inquiry
.
HA_SCSI_ID
=
7
;
/* not always ID 7 */
strcat
(
lpSRB
->
inquiry
.
HA_ManagerId
,
"Wine ASPI16"
);
/* max 15 chars */
strcat
(
lpSRB
->
inquiry
.
HA_Identifier
,
"Wine host"
);
/* FIXME: return host
...
...
@@ -436,12 +447,10 @@ adapter name */
FIXME
(
aspi
,
"Not implemented SC_RESET_DEV
\n
"
);
break
;
default:
WARN
(
aspi
,
"Unknown command %d
\n
"
,
lpSRB
->
common
.
SRB_Cmd
);
FIXME
(
aspi
,
"Unknown command %d
\n
"
,
lpSRB
->
common
.
SRB_Cmd
);
}
return
SS_INVALID_SRB
;
#else
return
SS_INVALID_SRB
;
#endif
return
SS_INVALID_SRB
;
}
...
...
@@ -458,6 +467,34 @@ WORD WINAPI SendASPICommand16(SEGPTR segptr_srb)
}
/***********************************************************************
* InsertInASPIChain16 (WINASPI.3)
*/
WORD
WINAPI
InsertInASPIChain16
(
BOOL16
remove
,
FARPROC16
pASPIChainFunc
)
{
#ifdef linux
if
(
remove
==
TRUE
)
/* Remove */
{
if
(
ASPIChainFunc
==
pASPIChainFunc
)
{
ASPIChainFunc
=
NULL
;
return
SS_COMP
;
}
}
else
if
(
remove
==
FALSE
)
/* Insert */
{
if
(
ASPIChainFunc
==
NULL
)
{
ASPIChainFunc
=
pASPIChainFunc
;
return
SS_COMP
;
}
}
#endif
return
SS_ERR
;
}
/***********************************************************************
* GetASPIDLLVersion16 (WINASPI.4)
*/
...
...
@@ -465,9 +502,9 @@ WORD WINAPI SendASPICommand16(SEGPTR segptr_srb)
DWORD
WINAPI
GetASPIDLLVersion16
()
{
#ifdef linux
return
(
DWORD
)
2
;
return
2
;
#else
return
(
DWORD
)
0
;
return
0
;
#endif
}
...
...
@@ -498,8 +535,6 @@ void ASPI_DOS_HandleInt(CONTEXT *context)
AX_reg
(
context
)
=
CX_reg
(
context
);
}
else
SET_CFLAG
(
context
);
#else
SET_CFLAG
(
context
);
#endif
SET_CFLAG
(
context
);
}
This diff is collapsed.
Click to expand it.
if1632/winaspi.spec
+
1
−
1
View file @
506fb710
...
...
@@ -3,6 +3,6 @@ type win16
1 pascal16 GetASPISupportInfo() GetASPISupportInfo16
2 pascal16 SendASPICommand(segptr) SendASPICommand16
3
stub INSERTINASPICHAIN
3
pascal16 InsertInASPIChain(word segptr) InsertInASPIChain16
4 pascal GETASPIDLLVERSION() GetASPIDLLVersion16
5 stub ___EXPORTEDSTUB
This diff is collapsed.
Click to expand it.
include/aspi.h
+
2
−
2
View file @
506fb710
...
...
@@ -9,12 +9,12 @@
#define SS_COMP 0x01
#define SS_ABORTED 0x02
#define SS_ERR 0x04
#define SS_INVALID_HA 0x81
#define SS_INVALID_SRB 0xe0
#define SS_OLD_MANAGE 0xe1
#define SS_ILLEGAL_MODE 0xe2
#define SS_NO_ASPI 0xe3
#define SS_FAILED_INIT 0xe4
#define SS_INVALID_HA 0x81
#define SS_INVALID_SRB 0xe0
#define SS_ASPI_IS_BUSY 0xe5
#define SS_BUFFER_TO_BIG 0xe6
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment