Lines Matching refs:bd
60 typedef struct bd bd_t;
63 struct bd { struct
237 rv = ddi_soft_state_init(&bd_state, sizeof (struct bd), 2); in _init()
272 bd_t *bd; in bd_getinfo() local
281 bd = ddi_get_soft_state(bd_state, inst); in bd_getinfo()
282 if (bd == NULL) { in bd_getinfo()
285 *resultp = (void *)bd->d_dip; in bd_getinfo()
336 bd_create_errstats(bd_t *bd, int inst, bd_drive_t *drive) in bd_create_errstats() argument
342 if (bd->d_errstats != NULL) in bd_create_errstats()
346 ddi_driver_name(bd->d_dip)); in bd_create_errstats()
348 ddi_driver_name(bd->d_dip), inst); in bd_create_errstats()
350 bd->d_errstats = kstat_create(ks_module, inst, ks_name, "device_error", in bd_create_errstats()
353 if (bd->d_errstats == NULL) { in bd_create_errstats()
360 bd->d_kerr = kmem_zalloc(sizeof (struct bd_errstats), in bd_create_errstats()
362 bd->d_errmutex = kmem_zalloc(sizeof (kmutex_t), KM_SLEEP); in bd_create_errstats()
363 mutex_init(bd->d_errmutex, NULL, MUTEX_DRIVER, NULL); in bd_create_errstats()
365 if (bd->d_errstats->ks_lock == NULL) { in bd_create_errstats()
366 bd->d_errstats->ks_lock = kmem_zalloc(sizeof (kmutex_t), in bd_create_errstats()
368 mutex_init(bd->d_errstats->ks_lock, NULL, MUTEX_DRIVER, in bd_create_errstats()
372 bd->d_errmutex = bd->d_errstats->ks_lock; in bd_create_errstats()
373 bd->d_kerr = (struct bd_errstats *)bd->d_errstats->ks_data; in bd_create_errstats()
376 kstat_named_init(&bd->d_kerr->bd_softerrs, "Soft Errors", in bd_create_errstats()
378 kstat_named_init(&bd->d_kerr->bd_harderrs, "Hard Errors", in bd_create_errstats()
380 kstat_named_init(&bd->d_kerr->bd_transerrs, "Transport Errors", in bd_create_errstats()
384 kstat_named_init(&bd->d_kerr->bd_model, "Model", in bd_create_errstats()
387 kstat_named_init(&bd->d_kerr->bd_vid, "Vendor", in bd_create_errstats()
389 kstat_named_init(&bd->d_kerr->bd_pid, "Product", in bd_create_errstats()
393 kstat_named_init(&bd->d_kerr->bd_revision, "Revision", in bd_create_errstats()
395 kstat_named_init(&bd->d_kerr->bd_serial, "Serial No", in bd_create_errstats()
397 kstat_named_init(&bd->d_kerr->bd_capacity, "Size", in bd_create_errstats()
399 kstat_named_init(&bd->d_kerr->bd_rq_media_err, "Media Error", in bd_create_errstats()
401 kstat_named_init(&bd->d_kerr->bd_rq_ntrdy_err, "Device Not Ready", in bd_create_errstats()
403 kstat_named_init(&bd->d_kerr->bd_rq_nodev_err, "No Device", in bd_create_errstats()
405 kstat_named_init(&bd->d_kerr->bd_rq_recov_err, "Recoverable", in bd_create_errstats()
407 kstat_named_init(&bd->d_kerr->bd_rq_illrq_err, "Illegal Request", in bd_create_errstats()
409 kstat_named_init(&bd->d_kerr->bd_rq_pfa_err, in bd_create_errstats()
412 bd->d_errstats->ks_private = bd; in bd_create_errstats()
414 kstat_install(bd->d_errstats); in bd_create_errstats()
435 bd_init_errstats(bd_t *bd, bd_drive_t *drive) in bd_init_errstats() argument
437 struct bd_errstats *est = bd->d_kerr; in bd_init_errstats()
439 mutex_enter(bd->d_errmutex); in bd_init_errstats()
457 mutex_exit(bd->d_errmutex); in bd_init_errstats()
465 bd_t *bd; in bd_attach() local
497 bd = ddi_get_soft_state(bd_state, inst); in bd_attach()
500 bd->d_dma = *(hdl->h_dma); in bd_attach()
501 bd->d_dma.dma_attr_granular = in bd_attach()
502 max(DEV_BSIZE, bd->d_dma.dma_attr_granular); in bd_attach()
503 bd->d_use_dma = B_TRUE; in bd_attach()
505 if (bd->d_maxxfer && in bd_attach()
506 (bd->d_maxxfer != bd->d_dma.dma_attr_maxxfer)) { in bd_attach()
511 bd->d_maxxfer = bd->d_dma.dma_attr_maxxfer; in bd_attach()
513 bd->d_maxxfer = bd->d_dma.dma_attr_maxxfer; in bd_attach()
516 bd->d_use_dma = B_FALSE; in bd_attach()
517 if (bd->d_maxxfer == 0) { in bd_attach()
518 bd->d_maxxfer = 1024 * 1024; in bd_attach()
521 bd->d_ops = hdl->h_ops; in bd_attach()
522 bd->d_private = hdl->h_private; in bd_attach()
523 bd->d_blkshift = 9; /* 512 bytes, to start */ in bd_attach()
525 if (bd->d_maxxfer % DEV_BSIZE) { in bd_attach()
527 bd->d_maxxfer &= ~(DEV_BSIZE - 1); in bd_attach()
529 if (bd->d_maxxfer < DEV_BSIZE) { in bd_attach()
535 bd->d_dip = dip; in bd_attach()
536 bd->d_handle = hdl; in bd_attach()
537 hdl->h_bd = bd; in bd_attach()
538 ddi_set_driver_private(dip, bd); in bd_attach()
540 mutex_init(&bd->d_iomutex, NULL, MUTEX_DRIVER, NULL); in bd_attach()
541 mutex_init(&bd->d_ocmutex, NULL, MUTEX_DRIVER, NULL); in bd_attach()
542 mutex_init(&bd->d_statemutex, NULL, MUTEX_DRIVER, NULL); in bd_attach()
543 cv_init(&bd->d_statecv, NULL, CV_DRIVER, NULL); in bd_attach()
545 list_create(&bd->d_waitq, sizeof (bd_xfer_impl_t), in bd_attach()
547 list_create(&bd->d_runq, sizeof (bd_xfer_impl_t), in bd_attach()
550 bd->d_cache = kmem_cache_create(kcache, sizeof (bd_xfer_impl_t), 8, in bd_attach()
551 bd_xfer_ctor, bd_xfer_dtor, NULL, bd, NULL, 0); in bd_attach()
553 bd->d_ksp = kstat_create(ddi_driver_name(dip), inst, NULL, "disk", in bd_attach()
555 if (bd->d_ksp != NULL) { in bd_attach()
556 bd->d_ksp->ks_lock = &bd->d_iomutex; in bd_attach()
557 kstat_install(bd->d_ksp); in bd_attach()
558 bd->d_kiop = bd->d_ksp->ks_data; in bd_attach()
566 bd->d_kiop = kmem_zalloc(sizeof (kstat_io_t), KM_SLEEP); in bd_attach()
569 cmlb_alloc_handle(&bd->d_cmlbh); in bd_attach()
571 bd->d_state = DKIO_NONE; in bd_attach()
574 bd->d_ops.o_drive_info(bd->d_private, &drive); in bd_attach()
575 bd->d_qsize = drive.d_qsize; in bd_attach()
576 bd->d_removable = drive.d_removable; in bd_attach()
577 bd->d_hotpluggable = drive.d_hotpluggable; in bd_attach()
579 if (drive.d_maxxfer && drive.d_maxxfer < bd->d_maxxfer) in bd_attach()
580 bd->d_maxxfer = drive.d_maxxfer; in bd_attach()
584 bd_create_errstats(bd, inst, &drive); in bd_attach()
585 bd_init_errstats(bd, &drive); in bd_attach()
586 bd_update_state(bd); in bd_attach()
589 bd->d_removable, bd->d_hotpluggable, in bd_attach()
593 CMLB_FAKE_LABEL_ONE_PARTITION, bd->d_cmlbh, 0); in bd_attach()
595 cmlb_free_handle(&bd->d_cmlbh); in bd_attach()
596 kmem_cache_destroy(bd->d_cache); in bd_attach()
597 mutex_destroy(&bd->d_iomutex); in bd_attach()
598 mutex_destroy(&bd->d_ocmutex); in bd_attach()
599 mutex_destroy(&bd->d_statemutex); in bd_attach()
600 cv_destroy(&bd->d_statecv); in bd_attach()
601 list_destroy(&bd->d_waitq); in bd_attach()
602 list_destroy(&bd->d_runq); in bd_attach()
603 if (bd->d_ksp != NULL) { in bd_attach()
604 kstat_delete(bd->d_ksp); in bd_attach()
605 bd->d_ksp = NULL; in bd_attach()
607 kmem_free(bd->d_kiop, sizeof (kstat_io_t)); in bd_attach()
613 if (bd->d_ops.o_devid_init != NULL) { in bd_attach()
614 rv = bd->d_ops.o_devid_init(bd->d_private, dip, &bd->d_devid); in bd_attach()
616 if (ddi_devid_register(dip, bd->d_devid) != in bd_attach()
631 if (bd->d_removable) { in bd_attach()
635 if (bd->d_hotpluggable) { in bd_attach()
648 bd_t *bd; in bd_detach() local
650 bd = ddi_get_driver_private(dip); in bd_detach()
661 if (bd->d_ksp != NULL) { in bd_detach()
662 kstat_delete(bd->d_ksp); in bd_detach()
663 bd->d_ksp = NULL; in bd_detach()
665 kmem_free(bd->d_kiop, sizeof (kstat_io_t)); in bd_detach()
668 if (bd->d_errstats != NULL) { in bd_detach()
669 kstat_delete(bd->d_errstats); in bd_detach()
670 bd->d_errstats = NULL; in bd_detach()
672 kmem_free(bd->d_kerr, sizeof (struct bd_errstats)); in bd_detach()
673 mutex_destroy(bd->d_errmutex); in bd_detach()
676 cmlb_detach(bd->d_cmlbh, 0); in bd_detach()
677 cmlb_free_handle(&bd->d_cmlbh); in bd_detach()
678 if (bd->d_devid) in bd_detach()
679 ddi_devid_free(bd->d_devid); in bd_detach()
680 kmem_cache_destroy(bd->d_cache); in bd_detach()
681 mutex_destroy(&bd->d_iomutex); in bd_detach()
682 mutex_destroy(&bd->d_ocmutex); in bd_detach()
683 mutex_destroy(&bd->d_statemutex); in bd_detach()
684 cv_destroy(&bd->d_statecv); in bd_detach()
685 list_destroy(&bd->d_waitq); in bd_detach()
686 list_destroy(&bd->d_runq); in bd_detach()
695 bd_t *bd = arg; in bd_xfer_ctor() local
706 xi->i_bd = bd; in bd_xfer_ctor()
708 if (bd->d_use_dma) { in bd_xfer_ctor()
709 if (ddi_dma_alloc_handle(bd->d_dip, &bd->d_dma, dcb, NULL, in bd_xfer_ctor()
731 bd_xfer_alloc(bd_t *bd, struct buf *bp, int (*func)(void *, bd_xfer_t *), in bd_xfer_alloc() argument
748 xi = kmem_cache_alloc(bd->d_cache, kmflag); in bd_xfer_alloc()
758 xi->i_blkno = bp->b_lblkno >> (bd->d_blkshift - DEV_BSHIFT); in bd_xfer_alloc()
771 xi->i_func = bd->d_ops.o_read; in bd_xfer_alloc()
774 xi->i_func = bd->d_ops.o_write; in bd_xfer_alloc()
777 shift = bd->d_blkshift; in bd_xfer_alloc()
780 if (!bd->d_use_dma) { in bd_xfer_alloc()
785 (bp->b_bcount + (bd->d_maxxfer - 1)) / bd->d_maxxfer; in bd_xfer_alloc()
787 xi->i_len = min(bp->b_bcount, bd->d_maxxfer); in bd_xfer_alloc()
849 kmem_cache_free(bd->d_cache, xi); in bd_xfer_alloc()
870 bd_t *bd; in bd_open() local
894 if ((bd = ddi_get_soft_state(bd_state, inst)) == NULL) { in bd_open()
899 mutex_enter(&bd->d_ocmutex); in bd_open()
904 bd_update_state(bd); in bd_open()
906 if (cmlb_validate(bd->d_cmlbh, 0, 0) != 0) { in bd_open()
913 } else if (cmlb_partinfo(bd->d_cmlbh, part, &nblks, &lba, in bd_open()
936 if ((flag & FWRITE) && bd->d_rdonly) { in bd_open()
941 if ((bd->d_open_excl) & (mask)) { in bd_open()
946 if (bd->d_open_lyr[part]) { in bd_open()
951 if (bd->d_open_reg[i] & mask) { in bd_open()
959 bd->d_open_lyr[part]++; in bd_open()
961 bd->d_open_reg[otyp] |= mask; in bd_open()
964 bd->d_open_excl |= mask; in bd_open()
969 mutex_exit(&bd->d_ocmutex); in bd_open()
978 bd_t *bd; in bd_close() local
995 if ((bd = ddi_get_soft_state(bd_state, inst)) == NULL) { in bd_close()
1000 mutex_enter(&bd->d_ocmutex); in bd_close()
1001 if (bd->d_open_excl & mask) { in bd_close()
1002 bd->d_open_excl &= ~mask; in bd_close()
1005 bd->d_open_lyr[part]--; in bd_close()
1007 bd->d_open_reg[otyp] &= ~mask; in bd_close()
1010 if (bd->d_open_lyr[part]) { in bd_close()
1015 if (bd->d_open_reg[i]) { in bd_close()
1019 mutex_exit(&bd->d_ocmutex); in bd_close()
1022 cmlb_invalidate(bd->d_cmlbh, 0); in bd_close()
1036 bd_t *bd; in bd_dump() local
1049 if ((bd = ddi_get_soft_state(bd_state, inst)) == NULL) { in bd_dump()
1053 shift = bd->d_blkshift; in bd_dump()
1060 if (cmlb_partinfo(bd->d_cmlbh, part, &psize, &pstart, NULL, NULL, in bd_dump()
1081 xi = bd_xfer_alloc(bd, bp, bd->d_ops.o_write, KM_NOSLEEP); in bd_dump()
1089 bd_submit(bd, xi); in bd_dump()
1108 bd_t *bd; in bd_minphys() local
1111 bd = ddi_get_soft_state(bd_state, inst); in bd_minphys()
1117 ASSERT(bd); in bd_minphys()
1119 if (bp->b_bcount > bd->d_maxxfer) in bd_minphys()
1120 bp->b_bcount = bd->d_maxxfer; in bd_minphys()
1126 bd_t *bd; in bd_check_uio() local
1129 if ((bd = ddi_get_soft_state(bd_state, BDINST(dev))) == NULL) { in bd_check_uio()
1133 shift = bd->d_blkshift; in bd_check_uio()
1191 bd_t *bd; in bd_strategy() local
1207 if ((bd = ddi_get_soft_state(bd_state, inst)) == NULL) { in bd_strategy()
1213 if (cmlb_partinfo(bd->d_cmlbh, part, &p_nblks, &p_lba, in bd_strategy()
1220 shift = bd->d_blkshift; in bd_strategy()
1241 func = (bp->b_flags & B_READ) ? bd->d_ops.o_read : bd->d_ops.o_write; in bd_strategy()
1243 xi = bd_xfer_alloc(bd, bp, func, KM_NOSLEEP); in bd_strategy()
1245 xi = bd_xfer_alloc(bd, bp, func, KM_PUSHPAGE); in bd_strategy()
1254 bd_submit(bd, xi); in bd_strategy()
1264 bd_t *bd; in bd_ioctl() local
1271 if ((bd = ddi_get_soft_state(bd_state, inst)) == NULL) { in bd_ioctl()
1275 rv = cmlb_ioctl(bd->d_cmlbh, dev, cmd, arg, flag, credp, rvalp, 0); in bd_ioctl()
1289 bd_update_state(bd); in bd_ioctl()
1292 minfo.dki_lbsize = (1U << bd->d_blkshift); in bd_ioctl()
1293 minfo.dki_capacity = bd->d_numblks; in bd_ioctl()
1303 bd_update_state(bd); in bd_ioctl()
1306 miext.dki_lbsize = (1U << bd->d_blkshift); in bd_ioctl()
1307 miext.dki_pbsize = (1U << bd->d_pblkshift); in bd_ioctl()
1308 miext.dki_capacity = bd->d_numblks; in bd_ioctl()
1318 cinfo.dki_cnum = ddi_get_instance(ddi_get_parent(bd->d_dip)); in bd_ioctl()
1320 "%s", ddi_driver_name(ddi_get_parent(bd->d_dip))); in bd_ioctl()
1322 "%s", ddi_driver_name(bd->d_dip)); in bd_ioctl()
1326 cinfo.dki_maxtransfer = bd->d_maxxfer / DEV_BSIZE; in bd_ioctl()
1339 i = bd->d_removable ? 1 : 0; in bd_ioctl()
1347 i = bd->d_hotpluggable ? 1 : 0; in bd_ioctl()
1355 i = bd->d_rdonly ? 1 : 0; in bd_ioctl()
1363 i = bd->d_ssd ? 1 : 0; in bd_ioctl()
1374 if ((rv = bd_check_state(bd, &state)) != 0) { in bd_ioctl()
1388 rv = bd_flush_write_cache(bd, dkc); in bd_ioctl()
1403 bd_t *bd; in bd_prop_op() local
1405 bd = ddi_get_soft_state(bd_state, ddi_get_instance(dip)); in bd_prop_op()
1406 if (bd == NULL) in bd_prop_op()
1410 return (cmlb_prop_op(bd->d_cmlbh, dev, dip, prop_op, mod_flags, name, in bd_prop_op()
1419 bd_t *bd; in bd_tg_rdwr() local
1432 bd = ddi_get_soft_state(bd_state, ddi_get_instance(dip)); in bd_tg_rdwr()
1434 if (P2PHASE(length, (1U << bd->d_blkshift)) != 0) { in bd_tg_rdwr()
1446 func = bd->d_ops.o_read; in bd_tg_rdwr()
1450 func = bd->d_ops.o_write; in bd_tg_rdwr()
1459 xi = bd_xfer_alloc(bd, bp, func, kmflag); in bd_tg_rdwr()
1467 bd_submit(bd, xi); in bd_tg_rdwr()
1478 bd_t *bd; in bd_tg_getinfo() local
1481 bd = ddi_get_soft_state(bd_state, ddi_get_instance(dip)); in bd_tg_getinfo()
1493 bd_update_state(bd); in bd_tg_getinfo()
1494 *(diskaddr_t *)arg = bd->d_numblks; in bd_tg_getinfo()
1498 *(uint32_t *)arg = (1U << bd->d_blkshift); in bd_tg_getinfo()
1509 bd_update_state(bd); in bd_tg_getinfo()
1511 bd->d_rdonly ? B_FALSE : B_TRUE; in bd_tg_getinfo()
1512 ((tg_attribute_t *)arg)->media_is_solid_state = bd->d_ssd; in bd_tg_getinfo()
1523 bd_sched(bd_t *bd) in bd_sched() argument
1529 mutex_enter(&bd->d_iomutex); in bd_sched()
1531 while ((bd->d_qactive < bd->d_qsize) && in bd_sched()
1532 ((xi = list_remove_head(&bd->d_waitq)) != NULL)) { in bd_sched()
1533 bd->d_qactive++; in bd_sched()
1534 kstat_waitq_to_runq(bd->d_kiop); in bd_sched()
1535 list_insert_tail(&bd->d_runq, xi); in bd_sched()
1543 mutex_exit(&bd->d_iomutex); in bd_sched()
1545 rv = xi->i_func(bd->d_private, &xi->i_public); in bd_sched()
1551 atomic_inc_32(&bd->d_kerr->bd_transerrs.value.ui32); in bd_sched()
1553 mutex_enter(&bd->d_iomutex); in bd_sched()
1554 bd->d_qactive--; in bd_sched()
1555 kstat_runq_exit(bd->d_kiop); in bd_sched()
1556 list_remove(&bd->d_runq, xi); in bd_sched()
1559 mutex_enter(&bd->d_iomutex); in bd_sched()
1563 mutex_exit(&bd->d_iomutex); in bd_sched()
1567 bd_submit(bd_t *bd, bd_xfer_impl_t *xi) in bd_submit() argument
1569 mutex_enter(&bd->d_iomutex); in bd_submit()
1570 list_insert_tail(&bd->d_waitq, xi); in bd_submit()
1571 kstat_waitq_enter(bd->d_kiop); in bd_submit()
1572 mutex_exit(&bd->d_iomutex); in bd_submit()
1574 bd_sched(bd); in bd_submit()
1580 bd_t *bd = xi->i_bd; in bd_runq_exit() local
1583 mutex_enter(&bd->d_iomutex); in bd_runq_exit()
1584 bd->d_qactive--; in bd_runq_exit()
1585 kstat_runq_exit(bd->d_kiop); in bd_runq_exit()
1586 list_remove(&bd->d_runq, xi); in bd_runq_exit()
1587 mutex_exit(&bd->d_iomutex); in bd_runq_exit()
1591 bd->d_kiop->reads++; in bd_runq_exit()
1592 bd->d_kiop->nread += (bp->b_bcount - xi->i_resid); in bd_runq_exit()
1594 bd->d_kiop->writes++; in bd_runq_exit()
1595 bd->d_kiop->nwritten += (bp->b_bcount - xi->i_resid); in bd_runq_exit()
1598 bd_sched(bd); in bd_runq_exit()
1602 bd_update_state(bd_t *bd) in bd_update_state() argument
1610 mutex_enter(&bd->d_statemutex); in bd_update_state()
1611 if (bd->d_ops.o_media_info(bd->d_private, &media) != 0) { in bd_update_state()
1612 bd->d_numblks = 0; in bd_update_state()
1619 (P2PHASE(bd->d_maxxfer, media.m_blksize))) { in bd_update_state()
1621 ddi_driver_name(bd->d_dip), ddi_get_instance(bd->d_dip), in bd_update_state()
1627 bd->d_numblks = 0; in bd_update_state()
1631 if (((1U << bd->d_blkshift) != media.m_blksize) || in bd_update_state()
1632 (bd->d_numblks != media.m_nblks)) { in bd_update_state()
1637 bd->d_blkshift = ddi_ffs(media.m_blksize) - 1; in bd_update_state()
1638 bd->d_pblkshift = bd->d_blkshift; in bd_update_state()
1639 bd->d_numblks = media.m_nblks; in bd_update_state()
1640 bd->d_rdonly = media.m_readonly; in bd_update_state()
1641 bd->d_ssd = media.m_solidstate; in bd_update_state()
1651 bd->d_pblkshift = ddi_ffs(media.m_pblksize) - 1; in bd_update_state()
1654 if (state != bd->d_state) { in bd_update_state()
1655 bd->d_state = state; in bd_update_state()
1656 cv_broadcast(&bd->d_statecv); in bd_update_state()
1659 mutex_exit(&bd->d_statemutex); in bd_update_state()
1661 bd->d_kerr->bd_capacity.value.ui64 = bd->d_numblks << bd->d_blkshift; in bd_update_state()
1665 (void) cmlb_validate(bd->d_cmlbh, 0, 0); in bd_update_state()
1667 cmlb_invalidate(bd->d_cmlbh, 0); in bd_update_state()
1673 bd_check_state(bd_t *bd, enum dkio_state *state) in bd_check_state() argument
1679 bd_update_state(bd); in bd_check_state()
1681 mutex_enter(&bd->d_statemutex); in bd_check_state()
1683 if (bd->d_state != *state) { in bd_check_state()
1684 *state = bd->d_state; in bd_check_state()
1685 mutex_exit(&bd->d_statemutex); in bd_check_state()
1690 if (cv_reltimedwait_sig(&bd->d_statecv, &bd->d_statemutex, in bd_check_state()
1692 mutex_exit(&bd->d_statemutex); in bd_check_state()
1696 mutex_exit(&bd->d_statemutex); in bd_check_state()
1714 bd_flush_write_cache(bd_t *bd, struct dk_callback *dkc) in bd_flush_write_cache() argument
1721 if (bd->d_ops.o_sync_cache == NULL) { in bd_flush_write_cache()
1730 xi = bd_xfer_alloc(bd, bp, bd->d_ops.o_sync_cache, KM_SLEEP); in bd_flush_write_cache()
1745 bd_submit(bd, xi); in bd_flush_write_cache()
1750 bd_submit(bd, xi); in bd_flush_write_cache()
1929 bd_t *bd = xi->i_bd; in bd_xfer_done() local
1934 atomic_inc_32(&bd->d_kerr->bd_harderrs.value.ui32); in bd_xfer_done()
1957 if (bd->d_use_dma) { in bd_xfer_done()
1965 len = min(bp->b_bcount - xi->i_offset, bd->d_maxxfer); in bd_xfer_done()
1983 rv = xi->i_func(bd->d_private, &xi->i_public); in bd_xfer_done()
1987 atomic_inc_32(&bd->d_kerr->bd_transerrs.value.ui32); in bd_xfer_done()
2000 bd_t *bd = xi->i_bd; in bd_error() local
2004 atomic_inc_32(&bd->d_kerr->bd_rq_media_err.value.ui32); in bd_error()
2007 atomic_inc_32(&bd->d_kerr->bd_rq_ntrdy_err.value.ui32); in bd_error()
2010 atomic_inc_32(&bd->d_kerr->bd_rq_nodev_err.value.ui32); in bd_error()
2013 atomic_inc_32(&bd->d_kerr->bd_rq_recov_err.value.ui32); in bd_error()
2016 atomic_inc_32(&bd->d_kerr->bd_rq_illrq_err.value.ui32); in bd_error()
2019 atomic_inc_32(&bd->d_kerr->bd_rq_pfa_err.value.ui32); in bd_error()
2030 bd_t *bd; in bd_state_change() local
2032 if ((bd = hdl->h_bd) != NULL) { in bd_state_change()
2033 bd_update_state(bd); in bd_state_change()