pci.c revision d6c01e8c77db27063de6c97d78a1818ad9030343
919N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
void *result);
_init(void)
_fini(void)
if (pci_ecc_queue)
if (pci_target_queue)
switch (infocmd) {
case DDI_INFO_DEVT2INSTANCE:
return (DDI_SUCCESS);
case DDI_INFO_DEVT2DEVINFO:
return (DDI_FAILURE);
return (DDI_SUCCESS);
return (DDI_FAILURE);
switch (cmd) {
case DDI_ATTACH:
goto err_bad_pci_softstate;
goto err_bad_pci_prop;
goto err_bad_reg_prop;
goto err_bad_objs;
goto err_bad_devctl_node;
goto err_bad_pcitool_nodes;
return (DDI_FAILURE);
case DDI_RESUME:
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
return (DDI_FAILURE);
switch (cmd) {
case DDI_DETACH:
return (DDI_FAILURE);
int len;
return (DDI_SUCCESS);
case DDI_SUSPEND:
return (DDI_SUCCESS);
return (DDI_FAILURE);
return (DDI_ME_UNIMPLEMENTED);
case DDI_MT_REGSPEC:
case DDI_MT_RNUMBER:
return (DDI_ME_RNUMBER_RANGE);
return (DDI_ME_RNUMBER_RANGE);
return (DDI_ME_INVAL);
goto done;
goto done;
done:
return (rval);
int ret;
return (DDI_DMA_NORESOURCES);
return (DDI_DMA_NOMAPPING);
goto freehandle;
goto freehandle;
goto freehandle;
goto freehandle;
goto freehandle;
case DMAI_FLAGS_BYPASS:
return (ret);
int rval;
return (DDI_DMA_BADATTR);
return (DDI_DMA_NORESOURCES);
return (rval);
return (DDI_SUCCESS);
if (pci_kmem_clid) {
return (DDI_SUCCESS);
int ret;
return (DDI_DMA_INUSE);
goto err;
goto err;
case DMAI_FLAGS_DVMA:
goto map_err;
goto map_err;
case DMAI_FLAGS_BYPASS:
case DMAI_FLAGS_PEER_TO_PEER:
goto map_err;
err:
return (ret);
return (DDI_FAILURE);
case DMAI_FLAGS_DVMA:
case DMAI_FLAGS_BYPASS:
case DMAI_FLAGS_PEER_TO_PEER:
if (pci_kmem_clid) {
return (DDI_SUCCESS);
return (DDI_FAILURE);
case DMAI_FLAGS_DVMA:
/* map_window sets dmai_mapping/size/offset */
if (cookiep)
if (ccountp)
case DMAI_FLAGS_PEER_TO_PEER:
case DMAI_FLAGS_BYPASS: {
if (ccountp)
return (DDI_FAILURE);
if (cookiep)
if (offp)
if (lenp)
return (DDI_SUCCESS);
#ifdef DEBUG
static char *pci_dmactl_str[] = {
switch (cmd) {
case DDI_DMA_FREE:
return (DDI_SUCCESS);
case DDI_DMA_RESERVE: {
case DDI_DMA_RELEASE: {
case DMAI_FLAGS_DVMA:
cache_flags));
case DMAI_FLAGS_PEER_TO_PEER:
case DMAI_FLAGS_BYPASS:
cache_flags));
#ifdef DEBUG
int pci_peekfault_cnt = 0;
int pci_pokefault_cnt = 0;
no_trap();
#ifdef DEBUG
return (err);
switch (size) {
case sizeof (uint8_t):
case sizeof (uint16_t):
case sizeof (uint32_t):
case sizeof (uint64_t):
return (DDI_FAILURE);
return (DDI_SUCCESS);
no_trap();
#ifdef DEBUG
return (err);
(void *)host_addr);
for (i = 0; i < size; i++)
return (err);
static off_t
if (rnumber < 0)
return (size);
switch (op) {
case DDI_CTLOPS_INITCHILD:
case DDI_CTLOPS_UNINITCHILD:
case DDI_CTLOPS_REPORTDEV:
case DDI_CTLOPS_IOMIN:
return (DDI_SUCCESS);
case DDI_CTLOPS_REGSIZE:
case DDI_CTLOPS_NREGS:
return (DDI_SUCCESS);
case DDI_CTLOPS_DVMAPAGESIZE:
return (DDI_SUCCESS);
case DDI_CTLOPS_POKE:
case DDI_CTLOPS_PEEK:
result));
case DDI_CTLOPS_AFFINITY:
case DDI_CTLOPS_QUIESCE:
case DDI_CTLOPS_UNQUIESCE:
switch (intr_op) {
case DDI_INTROP_GETCAP:
case DDI_INTROP_SETCAP:
case DDI_INTROP_ALLOC:
case DDI_INTROP_FREE:
case DDI_INTROP_GETPRI:
case DDI_INTROP_SETPRI:
case DDI_INTROP_ADDISR:
case DDI_INTROP_REMISR:
case DDI_INTROP_GETTARGET:
case DDI_INTROP_SETTARGET:
case DDI_INTROP_ENABLE:
case DDI_INTROP_DISABLE:
case DDI_INTROP_SETMASK:
case DDI_INTROP_CLRMASK:
case DDI_INTROP_GETPENDING:
case DDI_INTROP_NINTRS:
case DDI_INTROP_NAVAIL:
DDI_INTR_TYPE_FIXED : 0;
return (ret);
(int *)&bus_range,