Lines Matching defs:path
128 CAM_DEBUG((softc)->periph->path, CAM_DEBUG_PROBE, \
174 struct cam_path *path, cam_flags flags,
180 static void ata_device_transport(struct cam_path *path);
183 struct cam_path *path,
249 CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n"));
250 ata_device_transport(periph->path);
264 if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) ||
265 periph->path->device->protocol == PROTO_SATAPM ||
266 periph->path->device->protocol == PROTO_SEMB)
286 struct cam_path *path;
289 CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("probestart\n"));
292 path = start_ccb->ccb_h.path;
295 ident_buf = &periph->path->device->ident_data;
299 if ((path->device->flags & CAM_DEV_UNCONFIGURED) ||
300 path->device->protocol == PROTO_SATAPM ||
301 path->device->protocol == PROTO_SEMB)
327 if (periph->path->device->protocol == PROTO_ATA)
334 xpt_print(path, "Spinning up device\n");
352 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
356 if (path->device->transport == XPORT_ATA) {
363 if (periph->path->device->protocol == PROTO_ATA) {
375 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
378 if (path->device->transport == XPORT_ATA) {
388 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
392 if (path->device->transport == XPORT_ATA) {
404 path->device->inq_flags &= ~SID_DMA;
406 path->device->inq_flags |= SID_DMA;
407 xpt_async(AC_GETDEV_CHANGED, path, NULL);
461 path->device->inq_flags |= SID_AEN;
463 path->device->inq_flags &= ~SID_AEN;
464 xpt_async(AC_GETDEV_CHANGED, path, NULL);
484 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
488 if (path->device->transport == XPORT_ATA) {
500 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
503 if (path->device->transport == XPORT_ATA) {
515 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
519 if (path->device->transport == XPORT_ATA) {
546 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
550 if (path->device->transport == XPORT_ATA) {
566 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
569 if (path->device->transport == XPORT_ATA) {
583 &periph->path->device->inq_data;
666 xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE);
685 struct cam_path *path;
694 CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("probedone\n"));
697 path = done_ccb->ccb_h.path;
699 ident_buf = &path->device->ident_data;
700 inq_buf = &path->device->inq_data;
708 cam_release_devq(path, 0, 0, 0, FALSE);
713 xpt_release_devq(path, /*count*/1, /*run_queue*/TRUE);
773 device_fail: if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0)
774 xpt_async(AC_LOST_DEVICE, path, NULL);
787 CAM_DEBUG(path, CAM_DEBUG_PROBE,
791 path->device->protocol = PROTO_ATA;
797 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
803 path->device->protocol = PROTO_SATAPM;
807 path->device->protocol = PROTO_SEMB;
811 path->device->protocol = PROTO_SCSI;
815 xpt_print(path,
841 EVENTHANDLER_INVOKE(ada_probe_veto, path, ident_buf, &veto);
870 ident_buf = &path->device->ident_data;
871 if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) {
880 xpt_async(AC_LOST_DEVICE, path, NULL);
889 if (path->device->serial_num != NULL) {
890 free(path->device->serial_num, M_CAMXPT);
891 path->device->serial_num = NULL;
892 path->device->serial_num_len = 0;
894 if (path->device->device_id != NULL) {
895 free(path->device->device_id, M_CAMXPT);
896 path->device->device_id = NULL;
897 path->device->device_id_len = 0;
899 path->device->serial_num =
902 if (path->device->serial_num != NULL) {
904 path->device->serial_num,
906 path->device->serial_num[sizeof(ident_buf->serial)]
908 path->device->serial_num_len =
909 strlen(path->device->serial_num);
913 path->device->device_id =
915 if (path->device->device_id != NULL) {
916 path->device->device_id_len = 16;
918 path->device->device_id, 8);
920 path->device->device_id + 8, 8);
921 ata_bswap(path->device->device_id + 8, 8);
925 path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID;
926 xpt_async(AC_GETDEV_CHANGED, path, NULL);
929 path->device->mintags = 2;
930 path->device->maxtags =
933 ata_find_quirk(path->device);
934 if (path->device->mintags != 0 &&
935 path->bus->sim->max_tagged_dev_openings != 0) {
938 xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE);
945 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
948 cts.xport_specific.sata.tags = path->device->maxtags;
953 ata_device_transport(path);
963 xpt_print(path, "Spin-up done\n");
972 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
976 if (path->device->transport == XPORT_SATA &&
979 else if (path->device->transport == XPORT_ATA &&
984 if (path->device->transport == XPORT_SATA &&
993 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
997 if (path->device->transport == XPORT_SATA &&
1000 else if (path->device->transport == XPORT_ATA &&
1010 if (!(path->device->inq_flags & SID_DMA) ||
1011 (path->device->transport == XPORT_ATA &&
1014 path->device->inq_flags &= ~SID_DMA48;
1016 path->device->inq_flags |= SID_DMA48;
1019 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
1022 if (path->device->transport == XPORT_SATA) {
1031 if (path->device->transport != XPORT_SATA)
1064 if (path->device->protocol != PROTO_ATA &&
1076 if (path->device->protocol == PROTO_ATA) {
1085 if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) {
1086 path->device->flags &= ~CAM_DEV_UNCONFIGURED;
1087 xpt_acquire_device(path->device);
1090 xpt_async(AC_FOUND_DEVICE, path, done_ccb);
1099 path->device->flags |= CAM_DEV_INQUIRY_DATA_VALID;
1127 ata_device_transport(path);
1128 if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) {
1129 path->device->flags &= ~CAM_DEV_UNCONFIGURED;
1130 xpt_acquire_device(path->device);
1133 xpt_async(AC_FOUND_DEVICE, path, done_ccb);
1139 if ((path->device->flags & CAM_DEV_IDENTIFY_DATA_VALID) == 0)
1160 path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID;
1161 ata_device_transport(path);
1162 if (periph->path->device->flags & CAM_DEV_UNCONFIGURED)
1166 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
1178 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
1187 if ((caps & CTS_SATA_CAPS_H_AN) && path->device->protocol != PROTO_ATA)
1188 path->device->inq_flags |= SID_AEN;
1190 path->device->inq_flags &= ~SID_AEN;
1193 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
1200 xpt_async(AC_GETDEV_CHANGED, path, NULL);
1201 if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) {
1202 path->device->flags &= ~CAM_DEV_UNCONFIGURED;
1203 xpt_acquire_device(path->device);
1206 xpt_async(AC_FOUND_DEVICE, path, done_ccb);
1210 xpt_async(AC_SCSI_AEN, path, done_ccb);
1216 if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) {
1220 xpt_async(AC_LOST_DEVICE, path, NULL);
1229 if (path->device->device_id != NULL) {
1230 free(path->device->device_id, M_CAMXPT);
1231 path->device->device_id = NULL;
1232 path->device->device_id_len = 0;
1234 path->device->device_id =
1236 if (path->device->device_id != NULL) {
1237 path->device->device_id_len = 16;
1239 path->device->device_id, 8);
1241 path->device->device_id + 8, 8);
1244 path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID;
1246 ata_device_transport(path);
1250 if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) {
1251 path->device->flags &= ~CAM_DEV_UNCONFIGURED;
1252 xpt_acquire_device(path->device);
1255 xpt_async(AC_FOUND_DEVICE, path, done_ccb);
1270 CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe completed\n"));
1278 cam_release_devq(path, 0, 0, 0, FALSE);
1325 struct cam_path *path;
1331 CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE,
1343 xpt_setup_ccb(&work_ccb->ccb_h, request_ccb->ccb_h.path,
1358 !timevalisset(&request_ccb->ccb_h.path->bus->last_reset)) {
1366 xpt_setup_ccb(&reset_ccb->ccb_h, request_ccb->ccb_h.path,
1404 mtx = xpt_path_mtx(scan_info->request_ccb->ccb_h.path);
1410 mtx = xpt_path_mtx(scan_info->request_ccb->ccb_h.path);
1417 /* Free the current request path- we're done with it. */
1418 xpt_free_path(work_ccb->ccb_h.path);
1426 work_ccb->ccb_h.path, CAM_PRIORITY_NONE);
1434 /* Free the current request path- we're done with it. */
1435 xpt_free_path(work_ccb->ccb_h.path);
1453 status = xpt_create_path(&path, NULL,
1470 xpt_setup_ccb(&work_ccb->ccb_h, path,
1490 ata_scan_lun(struct cam_periph *periph, struct cam_path *path,
1499 CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_scan_lun\n"));
1501 xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE);
1516 xpt_print(path, "xpt_scan_lun: can't allocate CCB, "
1521 path->bus->path_id,
1522 path->target->target_id,
1523 path->device->lun_id);
1525 xpt_print(path, "xpt_scan_lun: can't create path, "
1537 lock = (xpt_path_owned(path) == 0);
1539 xpt_path_lock(path);
1540 if ((old_periph = cam_periph_find(path, "aprobe")) != NULL) {
1556 request_ccb->ccb_h.path, NULL, 0,
1560 xpt_print(path, "xpt_scan_lun: cam_alloc_periph "
1567 xpt_path_unlock(path);
1574 xpt_free_path(done_ccb->ccb_h.path);
1605 ata_device_transport(struct cam_path *path)
1613 xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE);
1617 path->device->transport = cpi.transport;
1618 if ((path->device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0)
1619 inq_buf = &path->device->inq_data;
1620 if ((path->device->flags & CAM_DEV_IDENTIFY_DATA_VALID) != 0)
1621 ident_buf = &path->device->ident_data;
1622 if (path->device->protocol == PROTO_ATA) {
1623 path->device->protocol_version = ident_buf ?
1625 } else if (path->device->protocol == PROTO_SCSI) {
1626 path->device->protocol_version = inq_buf ?
1629 path->device->transport_version = ident_buf ?
1633 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
1636 cts.transport = path->device->transport;
1637 cts.transport_version = path->device->transport_version;
1638 cts.protocol = path->device->protocol;
1639 cts.protocol_version = path->device->protocol_version;
1642 if (path->device->transport == XPORT_ATA) {
1668 device = start_ccb->ccb_h.path->device;
1723 xpt_async(AC_ADVINFO_CHANGED, start_ccb->ccb_h.path,
1736 start_ccb->ccb_h.path,
1742 ata_scan_bus(start_ccb->ccb_h.path->periph, start_ccb);
1745 ata_scan_lun(start_ccb->ccb_h.path->periph,
1746 start_ccb->ccb_h.path, start_ccb->crcn.flags,
1759 device = start_ccb->ccb_h.path->device;
1796 device = cts->ccb_h.path->device;
1834 ata_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_path *path,
1844 if (path == NULL || (device = path->device) == NULL) {
1861 xpt_print(path, "Uninitialized Protocol %x:%x?\n",
1868 xpt_print(path, "Down reving Protocol "
1886 xpt_print(path, "Uninitialized Transport %x:%x?\n",
1893 xpt_print(path, "Down reving Transport "
1910 xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE);
1954 xpt_stop_tags(path);
1979 * We need our own path with wildcards expanded to
2015 struct cam_path path;
2018 xpt_compile_path(&path, NULL, bus->path_id, target->target_id,
2020 ata_set_transfer_settings(settings, &path,
2022 xpt_release_path(&path);
2031 struct cam_path *path = periph->path;
2037 xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
2044 xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);