## Input/Output Device Driver Reference

[prev][next][parent][TOC]

### Deviations from Card Services Release 2.00

There are some deviations from the PCMCIA Card Services Release 2.00 Interface Specification in the PCMCIA support. These deviations are as follows:

General

The following return codes are available on all Card Services functions supported by the OS/2 operating system.

Return Codes:

BUSY Unable to process request at this time; retry later.

The calling client is expected to retry the failed operation at a later time.

OUT_OF_RESOURCE Out of internal or system resources necessary to process the request.

The calling client is expected to either retry the operation later or cancel the current operation.

(See Implementation Limitations and Restrictions for more details.)

AddSocketServices (32h)

The Attributes field defines details for the new Socket Services entry point. Card Services accepts only bit 1 (16:16 protect mode) requests.

The DataPointer field is used to establish data addressability for Socket Services when called by Card Services. Card Services accepts only 16-bit, protect-mode, GDT Level 0, data selector values.

Return Codes:

OS/2 Card Services returns the following error codes in addition to the error codes defined in the PCMCIA specification:

BAD_ARG_LENGTH ArgLength value is not equal to 4.

UNSUPPORTED_MODE Requested processor mode is not 16:16 protect mode.

AdjustResourceInfo (35h)

Return Codes:

OS/2 Card Services returns the following error code in addition to the error codes defined in the PCMCIA specification:

BAD_ARGS The IOAddrLines field is 0 or greater than 16.

DeregisterClient (02h)

To use the DeregisterClient function, the client must release all the resources allocated using the following functions:

-RequestConfiguration
-RequestIO
-RequestIRQ
-RequestWindow
-RegisterEraseQueue
-OpenMemory

Return Codes:

OS/2 Card Services returns the following error code in addition to the error codes defined in the PCMCIA specification:

IN_USE A resource has not been released by the requesting client.

GetCardServicesInfo (0Bh)

The following OS/2 Card Services returns the following:

0100 for the Revision value.

0200h for the CSLevel value.

Text for the VendorStrings value:

    -------------------------------------------------------------------

             IBM OS/2 PCMCIA Card Services Device Driver.
             [c]  Copyright IBM Corporation 1992, 1993, 1994.
             All Rights Reserved.

    -------------------------------------------------------------------

RegisterClient (10h)

Card Services does not support the power management change bit in the EventMask field. Set bit 8 to 0 for future compatibility. Card Services currently disregards the bit 8 value.

Card Services does not support the write-protect change bit in the EventMask field. Bit 0 should be set to 0 for future compatibility. Card Services currently disregards the bit 0 value.

Card Services does not support the Version field. It is recommended that the value be set to 0200h for future compatibility. Card Services currently disregards the Version field.

Return Codes:

OS/2 Card Services returns the following error code in addition to the error codes defined in the PCMCIA specification.

BAD_ATTRIBUTE No client type or more than one client type specified.

ReplaceSocketServices (33h)

One Socket Services device driver can replace another only if it takes ownership of the exact adapter resources previously claimed by the existing Socket Services device driver. If this does not occur, the request is rejected with a BAD_SOCKET error return code.

RequestIRQ (20h)

Card Services supports the following Attributes field bit definitions.

    -------------------------------------------------------------------

             Bit 0 - 1   IRQ type
                         0 - Exclusive
                         1 - Time-Multiplexed Sharing
                         2 - Dynamic Sharing
                         3   -   Reserved
              Bit   2         Force   Pulse   ( Not   supported ,   must   =   0 )
              Bit   3         First   Shared
              Bit   4   -   7     Reserved   ( Must   =   0 )
              Bit   8         Pulse   IRQ   Allocated
                            ( not   supported ,   always   returned   as   0 )
              Bit   9   -   15    Reserved   ( Must   =   0 )

    -------------------------------------------------------------------

If any of the unsupported Attributes field bits are set, the request fails with a BAD_ATTRIBUTE return code.

RequestSocketMask (22h)

Card Services does not support the power management change or the write- protect change bits in the EventMask field. Set these bits to 0 for future compatibility. Card Services currently disregards these bit values.

RequestWindow (21h)

Card Services supports the following Attributes field bit definitions.

    -------------------------------------------------------------------

             Bit 0      Reset to 0.
             Bit 1      Memory type (Set = attribute)
             Bit 2      Enabled (Set = true, reset = disabled)
             Bit 3      Data path width (Reset = 8-bit, set = 16-bit)

             Bit 4      Paged (Set = true)
                        (not supported, must be 0)
             Bit 5      Shared (Set = true)
             Bit 6      First Shared (Set = true)
             Bit 7 - 15 RESERVED (reset to 0)

    -------------------------------------------------------------------

If any of the unsupported Attributes field bits are set, the request fails with a BAD_ATTRIBUTE return code.

Card Services sets the PCMCIA card memory offset for the window to 0. A client can change a PCMCIA card memory offset for the window by using the MapMemPage function.

SetEventMask (31h)

Card Services does not support the power-management change or the write- protect change bits in the EventMask field. Set these bits to 0 for future compatibility. Card Services currently disregards these bit values.