Lines Matching refs:drive

445 bd_create_inquiry_props(dev_info_t *dip, bd_drive_t *drive)  in bd_create_inquiry_props()  argument
447 if (drive->d_vendor_len > 0) in bd_create_inquiry_props()
449 drive->d_vendor, drive->d_vendor_len); in bd_create_inquiry_props()
451 if (drive->d_product_len > 0) in bd_create_inquiry_props()
453 drive->d_product, drive->d_product_len); in bd_create_inquiry_props()
455 if (drive->d_serial_len > 0) in bd_create_inquiry_props()
457 drive->d_serial, drive->d_serial_len); in bd_create_inquiry_props()
459 if (drive->d_revision_len > 0) in bd_create_inquiry_props()
461 drive->d_revision, drive->d_revision_len); in bd_create_inquiry_props()
465 bd_create_errstats(bd_t *bd, int inst, bd_drive_t *drive) in bd_create_errstats() argument
504 if (drive->d_model_len > 0) { in bd_create_errstats()
536 bd_init_errstats(bd, drive); in bd_create_errstats()
586 bd_init_errstats(bd_t *bd, bd_drive_t *drive) in bd_init_errstats() argument
592 if (drive->d_model_len > 0 && in bd_init_errstats()
594 bd_errstats_setstr(&est->bd_model, drive->d_model, in bd_init_errstats()
595 drive->d_model_len, NULL); in bd_init_errstats()
597 bd_errstats_setstr(&est->bd_vid, drive->d_vendor, in bd_init_errstats()
598 drive->d_vendor_len, "Unknown "); in bd_init_errstats()
599 bd_errstats_setstr(&est->bd_pid, drive->d_product, in bd_init_errstats()
600 drive->d_product_len, "Unknown "); in bd_init_errstats()
603 bd_errstats_setstr(&est->bd_revision, drive->d_revision, in bd_init_errstats()
604 drive->d_revision_len, "0001"); in bd_init_errstats()
605 bd_errstats_setstr(&est->bd_serial, drive->d_serial, in bd_init_errstats()
606 drive->d_serial_len, "0 "); in bd_init_errstats()
649 bd_drive_t drive; in bd_attach() local
754 bzero(&drive, sizeof (drive)); in bd_attach()
759 drive.d_qcount = 1; in bd_attach()
760 drive.d_free_align = 1; in bd_attach()
761 bd->d_ops.o_drive_info(bd->d_private, &drive); in bd_attach()
769 if (drive.d_qcount == 0) in bd_attach()
773 if (drive.d_free_align == 0) in bd_attach()
782 if ((drive.d_max_free_blks > 0 && drive.d_max_free_seg_blks == 0)) in bd_attach()
791 if ((drive.d_max_free_blks > 0 && in bd_attach()
792 drive.d_max_free_seg_blks > drive.d_max_free_blks)) { in bd_attach()
796 bd->d_qcount = drive.d_qcount; in bd_attach()
797 bd->d_removable = drive.d_removable; in bd_attach()
798 bd->d_hotpluggable = drive.d_hotpluggable; in bd_attach()
800 if (drive.d_maxxfer && drive.d_maxxfer < bd->d_maxxfer) in bd_attach()
801 bd->d_maxxfer = drive.d_maxxfer; in bd_attach()
803 bd->d_free_align = drive.d_free_align; in bd_attach()
804 bd->d_max_free_seg = drive.d_max_free_seg; in bd_attach()
805 bd->d_max_free_blks = drive.d_max_free_blks; in bd_attach()
806 bd->d_max_free_seg_blks = drive.d_max_free_seg_blks; in bd_attach()
808 bd_create_inquiry_props(dip, &drive); in bd_attach()
809 bd_create_errstats(bd, inst, &drive); in bd_attach()
817 bq->q_qsize = drive.d_qsize; in bd_attach()
827 if (*(uint64_t *)drive.d_eui64 != 0 || in bd_attach()
828 *(uint64_t *)drive.d_guid != 0 || in bd_attach()
829 *((uint64_t *)drive.d_guid + 1) != 0) in bd_attach()
831 else if (drive.d_lun >= 0) in bd_attach()
2348 bd_drive_t drive = { 0 }; in bd_attach_handle() local
2363 drive.d_lun = -1; in bd_attach_handle()
2364 hdl->h_ops.o_drive_info(hdl->h_private, &drive); in bd_attach_handle()
2372 if (*(uint64_t *)drive.d_guid != 0 || in bd_attach_handle()
2373 *((uint64_t *)drive.d_guid + 1) != 0) { in bd_attach_handle()
2377 drive.d_guid[0], drive.d_guid[1], drive.d_guid[2], in bd_attach_handle()
2378 drive.d_guid[3], drive.d_guid[4], drive.d_guid[5], in bd_attach_handle()
2379 drive.d_guid[6], drive.d_guid[7], drive.d_guid[8], in bd_attach_handle()
2380 drive.d_guid[9], drive.d_guid[10], drive.d_guid[11], in bd_attach_handle()
2381 drive.d_guid[12], drive.d_guid[13], drive.d_guid[14], in bd_attach_handle()
2382 drive.d_guid[15]); in bd_attach_handle()
2383 } else if (*(uint64_t *)drive.d_eui64 != 0) { in bd_attach_handle()
2386 drive.d_eui64[0], drive.d_eui64[1], in bd_attach_handle()
2387 drive.d_eui64[2], drive.d_eui64[3], in bd_attach_handle()
2388 drive.d_eui64[4], drive.d_eui64[5], in bd_attach_handle()
2389 drive.d_eui64[6], drive.d_eui64[7]); in bd_attach_handle()
2392 "%X", drive.d_target); in bd_attach_handle()
2397 if (drive.d_lun >= 0) { in bd_attach_handle()
2399 ",%X", drive.d_lun); in bd_attach_handle()