The error happens here in OS2DASD.DMD, in routine "VOID _loadds FAR NotifyDoneIORB (fpIORB)":
...
if ( ((PRPH)pDMWork->pRequest)->Cmd == PB_REQ_LIST)
NotifyDoneIORB_RLE(pIORB, (PPB_Read_Write) pDMWork->pRequest, pUnitCB);
else
{
NotifyDoneIORB_RP (pIORB, (PBYTE) pDMWork->pRequest, pUnitCB);
}
...
It happens because "pDMWork->pRequest" is NULL. This is an error within OS2DASD.DMD because it should itself save a request packet pointer to "pRequest" (it is not the ADD [USBMSD.ADD in this case] calling into OS2DASD.DMD, invoking this routine, that sets this pointer, but rather OS2DASD.DMD itself).
The only fix I see is to update OS2DASD.DMD to check if that pointer has a valid value:
if ((PRPH)pDMWork->pRequest)
{
if ( ((PRPH)pDMWork->pRequest)->Cmd == PB_REQ_LIST)
NotifyDoneIORB_RLE(pIORB, (PPB_Read_Write) pDMWork->pRequest, pUnitCB);
else
{
NotifyDoneIORB_RP (pIORB, (PBYTE) pDMWork->pRequest, pUnitCB);
}
}
One of the gazillion bugs that still linger in OS/2 code ...
Cheers,
Lars