Home | History | Annotate | Download | only in ic

Lines Matching defs:ata_c

1405 	struct ata_command *ata_c = &xfer->c_ata_c;
1413 ata_c->flags |= AT_POLL;
1414 if (ata_c->flags & AT_POLL)
1416 if (ata_c->flags & AT_WAIT)
1419 xfer->c_databuf = ata_c->data;
1420 xfer->c_bcount = ata_c->bcount;
1433 struct ata_command *ata_c = &xfer->c_ata_c;
1444 switch(wdcwait(chp, ata_c->r_st_bmask | WDCS_DRQ,
1445 ata_c->r_st_bmask, ata_c->timeout, wait_flags, &tfd)) {
1449 ata_c->flags |= AT_TIMEOU;
1454 if (ata_c->flags & AT_POLL) {
1460 if ((ata_c->flags & AT_LBA48) != 0) {
1461 wdccommandext(chp, drive, ata_c->r_command,
1462 ata_c->r_lba, ata_c->r_count, ata_c->r_features,
1463 ata_c->r_device & ~0x10);
1465 wdccommand(chp, drive, ata_c->r_command,
1466 (ata_c->r_lba >> 8) & 0xffff,
1468 (((ata_c->flags & AT_LBA) != 0) ? WDSD_LBA : 0) |
1469 ((ata_c->r_lba >> 24) & 0x0f),
1470 ata_c->r_lba & 0xff,
1471 ata_c->r_count & 0xff,
1472 ata_c->r_features & 0xff);
1475 if ((ata_c->flags & AT_POLL) == 0) {
1477 callout_reset(&chp->c_timo_callout, ata_c->timeout / 1000 * hz,
1502 struct ata_command *ata_c = &xfer->c_ata_c;
1503 int bcount = ata_c->bcount;
1504 char *data = ata_c->data;
1508 if (ata_c->r_command == WDCC_IDENTIFY ||
1509 ata_c->r_command == ATAPI_IDENTIFY_DEVICE) {
1529 if ((ata_c->flags & (AT_WAIT | AT_POLL)) == (AT_WAIT | AT_POLL)) {
1553 if ((ata_c->flags & AT_XFDONE) != 0) {
1558 if (wdcwait(chp, ata_c->r_st_bmask | WDCS_DRQ,
1559 ata_c->r_st_bmask, (irq == 0) ? ata_c->timeout : 0,
1565 ata_c->flags |= AT_TIMEOU;
1569 if (wdcwait(chp, ata_c->r_st_pmask, ata_c->r_st_pmask,
1570 (irq == 0) ? ata_c->timeout : 0, wflags, &tfd) == WDCWAIT_TOUT) {
1575 ata_c->flags |= AT_TIMEOU;
1580 if (ata_c->flags & AT_READ) {
1582 ata_c->flags |= AT_TIMEOU;
1587 ata_c->flags |= AT_XFDONE;
1592 } else if (ata_c->flags & AT_WRITE) {
1594 ata_c->flags |= AT_TIMEOU;
1598 ata_c->flags |= AT_XFDONE;
1599 if ((ata_c->flags & AT_POLL) == 0) {
1602 mstohz(ata_c->timeout), wdctimeout, chp);
1611 ata_c->flags |= AT_DF;
1613 ata_c->flags |= AT_ERROR;
1614 ata_c->r_error = ATACH_ST(tfd);
1629 struct ata_command *ata_c = &xfer->c_ata_c;
1634 ata_c->flags), DEBUG_FUNCS);
1641 if ((ata_c->flags & AT_READREG) != 0 &&
1643 (ata_c->flags & (AT_ERROR | AT_DF)) == 0) {
1644 ata_c->r_status = bus_space_read_1(wdr->cmd_iot,
1646 ata_c->r_error = bus_space_read_1(wdr->cmd_iot,
1648 ata_c->r_count = bus_space_read_1(wdr->cmd_iot,
1650 ata_c->r_lba = (uint64_t)bus_space_read_1(wdr->cmd_iot,
1652 ata_c->r_lba |= (uint64_t)bus_space_read_1(wdr->cmd_iot,
1654 ata_c->r_lba |= (uint64_t)bus_space_read_1(wdr->cmd_iot,
1656 ata_c->r_device = bus_space_read_1(wdr->cmd_iot,
1659 if ((ata_c->flags & AT_LBA48) != 0) {
1661 if ((ata_c->flags & AT_POLL) != 0)
1670 ata_c->r_count |= bus_space_read_1(wdr->cmd_iot,
1672 ata_c->r_lba |= (uint64_t)bus_space_read_1(wdr->cmd_iot,
1674 ata_c->r_lba |= (uint64_t)bus_space_read_1(wdr->cmd_iot,
1676 ata_c->r_lba |= (uint64_t)bus_space_read_1(wdr->cmd_iot,
1679 if ((ata_c->flags & AT_POLL) != 0)
1689 ata_c->r_lba |=
1690 (uint64_t)(ata_c->r_device & 0x0f) << 24;
1692 ata_c->r_device &= 0xf0;
1700 if (ata_c->flags & AT_POLL) {
1715 struct ata_command *ata_c = &xfer->c_ata_c;
1717 ata_c->flags |= AT_DONE;
1724 struct ata_command *ata_c = &xfer->c_ata_c;
1732 ata_c->flags |= AT_GONE;
1735 ata_c->flags |= AT_RESET;