• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/dev/ahci/

Lines Matching defs:ccb

59 static void ahciemaction(struct cam_sim *sim, union ccb *ccb);
349 ahci_check_ids(union ccb *ccb)
352 if (ccb->ccb_h.target_id != 0) {
353 ccb->ccb_h.status = CAM_TID_INVALID;
354 xpt_done(ccb);
357 if (ccb->ccb_h.target_lun != 0) {
358 ccb->ccb_h.status = CAM_LUN_INVALID;
359 xpt_done(ccb);
366 ahci_em_emulate_ses_on_led(device_t dev, union ccb *ccb)
379 buf = ccb->ataio.data_ptr;
382 if (ccb->ataio.cmd.command != ATA_SEP_ATTN ||
383 ccb->ataio.dxfer_len < ccb->ataio.cmd.sector_count * 4) {
384 ccb->ccb_h.status = CAM_REQ_INVALID;
389 if (ccb->ataio.cmd.features == 0xEC &&
390 ccb->ataio.cmd.sector_count >= 16) {
391 bzero(buf, ccb->ataio.dxfer_len);
401 ccb->ccb_h.status = CAM_REQ_CMP;
407 if (ccb->ataio.cmd.lba_low == 0x02 &&
408 ccb->ataio.cmd.features == 0x00 &&
409 ccb->ataio.cmd.sector_count >= 3) {
410 bzero(buf, ccb->ataio.dxfer_len);
418 ccb->ccb_h.status = CAM_REQ_CMP;
423 if (ccb->ataio.cmd.lba_low == 0x02 &&
424 ccb->ataio.cmd.features == 0x01 &&
425 ccb->ataio.cmd.sector_count >= 16) {
429 bzero(buf, ccb->ataio.dxfer_len);
449 ccb->ccb_h.status = CAM_REQ_CMP;
454 if (ccb->ataio.cmd.lba_low == 0x02 &&
455 ccb->ataio.cmd.features == 0x02 &&
456 ccb->ataio.cmd.sector_count >= (3 + enc->channels)) {
457 bzero(buf, ccb->ataio.dxfer_len);
481 ccb->ccb_h.status = CAM_REQ_CMP;
486 if (ccb->ataio.cmd.lba_low == 0x82 &&
487 ccb->ataio.cmd.features == 0x02 &&
488 ccb->ataio.cmd.sector_count >= (3 + enc->channels)) {
512 ccb->ccb_h.status = CAM_REQ_CMP;
517 if (ccb->ataio.cmd.lba_low == 0x02 &&
518 ccb->ataio.cmd.features == 0x07 &&
519 ccb->ataio.cmd.sector_count >= (6 + 3 * enc->channels)) {
520 bzero(buf, ccb->ataio.dxfer_len);
531 ccb->ccb_h.status = CAM_REQ_CMP;
536 if (ccb->ataio.cmd.lba_low == 0x02 &&
537 ccb->ataio.cmd.features == 0x0a &&
538 ccb->ataio.cmd.sector_count >= (2 + 3 * enc->channels)) {
539 bzero(buf, ccb->ataio.dxfer_len);
562 ccb->ccb_h.status = CAM_REQ_CMP;
566 ccb->ccb_h.status = CAM_REQ_INVALID;
568 xpt_done(ccb);
572 ahci_em_begin_transaction(device_t dev, union ccb *ccb)
578 res = &ccb->ataio.res;
580 if ((ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) &&
581 (ccb->ataio.cmd.control & ATA_A_RESET)) {
584 ccb->ccb_h.status = CAM_REQ_CMP;
585 xpt_done(ccb);
590 ahci_em_emulate_ses_on_led(dev, ccb);
595 ccb->ccb_h.status = CAM_REQ_INVALID;
596 xpt_done(ccb);
600 ahciemaction(struct cam_sim *sim, union ccb *ccb)
605 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
606 ("ahciemaction func_code=%x\n", ccb->ccb_h.func_code));
610 switch (ccb->ccb_h.func_code) {
612 if (ahci_check_ids(ccb))
614 ahci_em_begin_transaction(dev, ccb);
619 ccb->ccb_h.status = CAM_REQ_CMP;
623 struct ccb_pathinq *cpi = &ccb->cpi;
653 ccb->ccb_h.status = CAM_REQ_INVALID;
656 xpt_done(ccb);