Lines Matching defs:device_id

53  * both).  We prefer pinfo if given, otherwise try to look it up by device_id.
56 mfi_drive_name(struct mfi_pd_info *pinfo, uint16_t device_id, uint32_t def)
70 if (device_id == 0xffff)
73 snprintf(buf, sizeof(buf), "%2u", device_id);
82 if (mfi_pd_get_info(fd, device_id, &info, NULL) < 0) {
83 warn("Failed to fetch info for drive %2u", device_id);
95 if (device_id == 0xffff)
98 error = snprintf(p, len, "%2u", device_id);
115 else if (pinfo->encl_device_id == pinfo->ref.v.device_id)
161 mfi_lookup_drive(int fd, char *drive, uint16_t *device_id)
175 *device_id = val;
217 *device_id = list->addr[i].device_id;
233 mbox_store_device_id(uint8_t *mbox, uint16_t device_id)
236 mbox[0] = device_id & 0xff;
237 mbox[1] = device_id >> 8;
244 mbox[0] = ref->v.device_id & 0xff;
245 mbox[1] = ref->v.device_id >> 8;
282 mfi_pd_get_info(int fd, uint16_t device_id, struct mfi_pd_info *info,
287 mbox_store_device_id(&mbox[0], device_id);
385 uint16_t device_id;
396 error = mfi_lookup_drive(fd, drive, &device_id);
403 if (mfi_pd_get_info(fd, device_id, &info, NULL) < 0) {
405 warn("Failed to fetch info for drive %u", device_id);
412 warnx("Drive %u is already in the desired state", device_id);
423 warn("Failed to set drive %u to %s", device_id,
494 uint16_t device_id;
511 error = mfi_lookup_drive(fd, av[1], &device_id);
518 if (mfi_pd_get_info(fd, device_id, &info, NULL) < 0) {
520 warn("Failed to fetch info for drive %u", device_id);
527 warnx("Drive %d is not in the REBUILD state", device_id);
537 warn("Failed to start rebuild on drive %u", device_id);
551 uint16_t device_id;
568 error = mfi_lookup_drive(fd, av[1], &device_id);
575 if (mfi_pd_get_info(fd, device_id, &info, NULL) < 0) {
577 warn("Failed to fetch info for drive %u", device_id);
584 warn("Drive %d is not in the REBUILD state", device_id);
594 warn("Failed to abort rebuild on drive %u", device_id);
608 uint16_t device_id;
624 error = mfi_lookup_drive(fd, av[1], &device_id);
631 if (mfi_pd_get_info(fd, device_id, &info, NULL) < 0) {
633 warn("Failed to fetch info for drive %u", device_id);
649 mfi_drive_name(NULL, device_id,
661 uint16_t device_id;
690 error = mfi_lookup_drive(fd, av[1], &device_id);
697 if (mfi_pd_get_info(fd, device_id, &info, NULL) < 0) {
699 warn("Failed to fetch info for drive %u", device_id);
709 device_id);
722 uint16_t device_id;
750 error = mfi_lookup_drive(fd, av[1], &device_id);
757 mbox_store_device_id(&mbox[0], device_id);
764 device_id);