Lines Matching refs:tfd
163 uint32_t tfd; member
374 ahci_write_fis_sdb(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t tfd) in ahci_write_fis_sdb() argument
379 error = (tfd >> 8) & 0xff; in ahci_write_fis_sdb()
380 tfd &= 0x77; in ahci_write_fis_sdb()
384 fis[2] = tfd; in ahci_write_fis_sdb()
388 p->err_cfis[2] = tfd; in ahci_write_fis_sdb()
395 p->tfd &= ~0x77; in ahci_write_fis_sdb()
396 p->tfd |= tfd; in ahci_write_fis_sdb()
401 ahci_write_fis_d2h(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t tfd) in ahci_write_fis_d2h() argument
406 error = (tfd >> 8) & 0xff; in ahci_write_fis_d2h()
410 fis[2] = tfd & 0xff; in ahci_write_fis_d2h()
424 p->err_cfis[2] = tfd & 0xff; in ahci_write_fis_d2h()
429 p->tfd = tfd; in ahci_write_fis_d2h()
438 p->tfd = ATA_S_READY | ATA_S_DSC; in ahci_write_fis_d2h_ncq()
442 fis[2] = p->tfd; /* Status */ in ahci_write_fis_d2h_ncq()
541 pr->tfd = 0x7F; in ahci_port_reset()
549 pr->tfd = (1 << 8) | ATA_S_DSC | ATA_S_DMA; in ahci_port_reset()
552 pr->tfd |= ATA_S_READY; in ahci_port_reset()
1201 uint32_t tfd; in atapi_inquiry() local
1216 tfd = (p->sense_key << 12) | ATA_S_READY | ATA_S_ERROR; in atapi_inquiry()
1218 ahci_write_fis_d2h(p, slot, cfis, tfd); in atapi_inquiry()
1279 uint32_t tfd; in atapi_read_toc() local
1282 tfd = (p->sense_key << 12) | ATA_S_READY | ATA_S_ERROR; in atapi_read_toc()
1284 ahci_write_fis_d2h(p, slot, cfis, tfd); in atapi_read_toc()
1427 uint32_t tfd; in atapi_read_toc() local
1431 tfd = (p->sense_key << 12) | ATA_S_READY | ATA_S_ERROR; in atapi_read_toc()
1433 ahci_write_fis_d2h(p, slot, cfis, tfd); in atapi_read_toc()
1529 uint32_t tfd; in atapi_start_stop_unit() local
1536 tfd = ATA_S_READY | ATA_S_DSC; in atapi_start_stop_unit()
1543 tfd = (p->sense_key << 12) | ATA_S_READY | ATA_S_ERROR; in atapi_start_stop_unit()
1546 ahci_write_fis_d2h(p, slot, cfis, tfd); in atapi_start_stop_unit()
1553 uint32_t tfd = 0; in atapi_mode_sense() local
1579 tfd = ATA_S_READY | ATA_S_DSC; in atapi_mode_sense()
1599 tfd = ATA_S_READY | ATA_S_DSC; in atapi_mode_sense()
1610 tfd = (p->sense_key << 12) | ATA_S_READY | ATA_S_ERROR; in atapi_mode_sense()
1617 tfd = (p->sense_key << 12) | ATA_S_READY | ATA_S_ERROR; in atapi_mode_sense()
1621 ahci_write_fis_d2h(p, slot, cfis, tfd); in atapi_mode_sense()
1629 uint32_t tfd; in atapi_get_event_status_notification() local
1637 tfd = (p->sense_key << 12) | ATA_S_READY | ATA_S_ERROR; in atapi_get_event_status_notification()
1652 tfd = ATA_S_READY | ATA_S_DSC; in atapi_get_event_status_notification()
1655 ahci_write_fis_d2h(p, slot, cfis, tfd); in atapi_get_event_status_notification()
1727 p->tfd |= ATA_S_BUSY; in ahci_handle_cmd()
1738 p->tfd = ATA_S_DSC | ATA_S_READY; in ahci_handle_cmd()
1741 p->tfd = ATA_S_ERROR | ATA_S_READY; in ahci_handle_cmd()
1742 p->tfd |= (ATA_ERROR_ABORT << 8); in ahci_handle_cmd()
1750 p->tfd = ATA_S_DSC | ATA_S_READY; in ahci_handle_cmd()
1763 p->tfd = ATA_S_DSC | ATA_S_READY; in ahci_handle_cmd()
1767 p->tfd = ATA_S_ERROR | ATA_S_READY; in ahci_handle_cmd()
1768 p->tfd |= (ATA_ERROR_ABORT << 8); in ahci_handle_cmd()
1771 ahci_write_fis_d2h(p, slot, cfis, p->tfd); in ahci_handle_cmd()
1777 p->tfd = ATA_S_ERROR | ATA_S_READY; in ahci_handle_cmd()
1778 p->tfd |= (ATA_ERROR_ABORT << 8); in ahci_handle_cmd()
1781 p->tfd = ATA_S_DSC | ATA_S_READY; in ahci_handle_cmd()
1783 ahci_write_fis_d2h(p, slot, cfis, p->tfd); in ahci_handle_cmd()
1932 if ((p->tfd & (ATA_S_BUSY | ATA_S_DRQ)) != 0) in ahci_handle_port()
1955 uint32_t tfd; in ata_ioreq_cb() local
2001 tfd = ATA_S_READY | ATA_S_DSC; in ata_ioreq_cb()
2003 tfd = (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR; in ata_ioreq_cb()
2005 ahci_write_fis_sdb(p, slot, cfis, tfd); in ata_ioreq_cb()
2007 ahci_write_fis_d2h(p, slot, cfis, tfd); in ata_ioreq_cb()
2030 uint32_t tfd; in atapi_ioreq_cb() local
2063 tfd = ATA_S_READY | ATA_S_DSC; in atapi_ioreq_cb()
2067 tfd = (p->sense_key << 12) | ATA_S_READY | ATA_S_ERROR; in atapi_ioreq_cb()
2070 ahci_write_fis_d2h(p, slot, cfis, tfd); in atapi_ioreq_cb()
2176 p->tfd &= ~(ATA_S_BUSY | ATA_S_DRQ); in pci_ahci_port_write()