 |
Index for Section 9 |
|
 |
Alphabetical listing for V |
|
 |
Bottom of page |
|
vba_badaddr(9r)
NAME
vba_badaddr - VMEbus: Determines whether a VMEbus device is present
SYNOPSIS
int vba_badaddr(
struct controller *ctlr,
io_handle_t ioh,
vme_atype_t flags,
int len );
ARGUMENTS
ctlr
Specifies a pointer to the VMEbus device's controller data structure.
ioh Specifies the I/O handle for the device being probed. The I/O handle
must have a valid byte alignment that corresponds to the size specified
in the len parameter.
atype
A bit-encoded argument that specifies the address space, transfer size,
access mode, and swap mode for the address to be probed. This argument
should match the atype argument previously specified for the I/O handle
in a vba_map_csr() call or driver structure.
len Specifies the size (in bytes) of the data transfer to be performed to
the VMEbus address. Values of 1, 2, 4, and 8 result in byte, word,
longword, and quadword transfers, respectively. If the I/O handle was
mapped with the VME_DENSE flag set, you may only specify 4 or 8.
DESCRIPTION
The vba_badaddr() routine probes a VMEbus address to determine whether the
associated VMEbus device is present.
This routine is called from a VMEbus device driver's probe() routine. If
the vba_badaddr() return indicates that the device is not present, the
driver probe() routine returns a failure status to the bus configuration
interface.
RETURN VALUES
The vba_badaddr() routine returns 0 (zero) if the VMEbus device is present
or a nonzero value if the device is not present.
EXAMPLE
The following code fragment shows a call to the vba_badaddr() routine from
the probe() routine of VMEbus example device driver:
.
.
.
if (vba_badaddr(ctlr,
sc->csr_handle + DMAEX_CSR_OFF,
ctlr->driver->addr1_atype,
DMAEX_CSR_SIZE))
return(0);
.
.
.
The driver example chapter of Writing VMEbus Device Drivers shows how the
dmaex example driver calls vba_badaddr() to probe the VMEbus device. See
the section in the driver example chapter that explains the dmaex_probe()
routine.
SEE ALSO
Kernel Routines: probe(9r), vba_map_csr(9r)
Data Structures: driver(9s)
 |
Index for Section 9 |
|
 |
Alphabetical listing for V |
|
 |
Top of page |
|