Print this page
NEX-15925 pseudonex, rootnex, and friends don't need to log useless device announcements
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>


 391  *      DDI_CTLOPS_INITCHILD
 392  *      DDI_CTLOPS_UNINITCHILD
 393  * All others are passed to the parent.
 394  */
 395 static int
 396 acpinex_ctlops(dev_info_t *dip, dev_info_t *rdip, ddi_ctl_enum_t op, void *arg,
 397     void *result)
 398 {
 399         int rval = DDI_SUCCESS;
 400 
 401         switch (op) {
 402         case DDI_CTLOPS_INITCHILD:
 403                 rval = init_child((dev_info_t *)arg);
 404                 break;
 405 
 406         case DDI_CTLOPS_UNINITCHILD:
 407                 impl_ddi_sunbus_removechild((dev_info_t *)arg);
 408                 break;
 409 
 410         case DDI_CTLOPS_REPORTDEV: {
 411                 if (rdip == (dev_info_t *)0)
 412                         return (DDI_FAILURE);
 413                 cmn_err(CE_CONT, "?acpinex: %s@%s, %s%d\n",
 414                     ddi_node_name(rdip), ddi_get_name_addr(rdip),
 415                     ddi_driver_name(rdip), ddi_get_instance(rdip));
 416                 break;
 417         }
 418 
 419         default:
 420                 rval = ddi_ctlops(dip, rdip, op, arg, result);
 421                 break;
 422         }
 423 
 424         return (rval);
 425 }
 426 
 427 /* ARGSUSED */
 428 static int
 429 acpinex_bus_map(dev_info_t *dip, dev_info_t *rdip, ddi_map_req_t *mp,
 430     off_t offset, off_t len, caddr_t *vaddrp)
 431 {
 432         ACPINEX_DEBUG(CE_WARN,
 433             "!acpinex: acpinex_bus_map called and it's unimplemented.");
 434         return (DDI_ME_UNIMPLEMENTED);
 435 }




 391  *      DDI_CTLOPS_INITCHILD
 392  *      DDI_CTLOPS_UNINITCHILD
 393  * All others are passed to the parent.
 394  */
 395 static int
 396 acpinex_ctlops(dev_info_t *dip, dev_info_t *rdip, ddi_ctl_enum_t op, void *arg,
 397     void *result)
 398 {
 399         int rval = DDI_SUCCESS;
 400 
 401         switch (op) {
 402         case DDI_CTLOPS_INITCHILD:
 403                 rval = init_child((dev_info_t *)arg);
 404                 break;
 405 
 406         case DDI_CTLOPS_UNINITCHILD:
 407                 impl_ddi_sunbus_removechild((dev_info_t *)arg);
 408                 break;
 409 
 410         case DDI_CTLOPS_REPORTDEV: {
 411                 if (rdip == NULL)
 412                         return (DDI_FAILURE);



 413                 break;
 414         }
 415 
 416         default:
 417                 rval = ddi_ctlops(dip, rdip, op, arg, result);
 418                 break;
 419         }
 420 
 421         return (rval);
 422 }
 423 
 424 /* ARGSUSED */
 425 static int
 426 acpinex_bus_map(dev_info_t *dip, dev_info_t *rdip, ddi_map_req_t *mp,
 427     off_t offset, off_t len, caddr_t *vaddrp)
 428 {
 429         ACPINEX_DEBUG(CE_WARN,
 430             "!acpinex: acpinex_bus_map called and it's unimplemented.");
 431         return (DDI_ME_UNIMPLEMENTED);
 432 }