Lines Matching refs:fis
70 satafis_rhd_construct_cmd(struct ata_command *ata_c, uint8_t *fis)
73 memset(fis, 0, RHD_FISLEN);
75 fis[fis_type] = RHD_FISTYPE;
76 fis[rhd_c] = RHD_C;
77 fis[rhd_command] = ata_c->r_command;
78 fis[rhd_features0] = (ata_c->r_features >> 0) & 0xff;
80 fis[rhd_lba0] = (ata_c->r_lba >> 0) & 0xff;
81 fis[rhd_lba1] = (ata_c->r_lba >> 8) & 0xff;
82 fis[rhd_lba2] = (ata_c->r_lba >> 16) & 0xff;
84 fis[rhd_dh] = ata_c->r_device;
85 fis[rhd_lba3] = (ata_c->r_lba >> 24) & 0xff;
86 fis[rhd_lba4] = (ata_c->r_lba >> 32) & 0xff;
87 fis[rhd_lba5] = (ata_c->r_lba >> 40) & 0xff;
88 fis[rhd_features1] = (ata_c->r_features >> 8) & 0xff;
90 fis[rhd_dh] = (ata_c->r_device & 0xf0) |
94 fis[rhd_count0] = (ata_c->r_count >> 0) & 0xff;
96 fis[rhd_count1] = (ata_c->r_count >> 8) & 0xff;
101 satafis_rhd_construct_bio(struct ata_xfer *xfer, uint8_t *fis)
112 memset(fis, 0, RHD_FISLEN);
114 fis[fis_type] = RHD_FISTYPE;
115 fis[rhd_c] = RHD_C;
117 fis[rhd_command] = (ata_bio->flags & ATA_READ) ?
120 atacmd_toncq(xfer, &fis[rhd_command], &count, &features,
123 fis[rhd_command] =
126 fis[rhd_features0] = (features >> 0) & 0xff;
128 fis[rhd_lba0] = (ata_bio->blkno >> 0) & 0xff;
129 fis[rhd_lba1] = (ata_bio->blkno >> 8) & 0xff;
130 fis[rhd_lba2] = (ata_bio->blkno >> 16) & 0xff;
132 fis[rhd_dh] = device;
133 fis[rhd_lba3] = (ata_bio->blkno >> 24) & 0xff;
134 fis[rhd_lba4] = (ata_bio->blkno >> 32) & 0xff;
135 fis[rhd_lba5] = (ata_bio->blkno >> 40) & 0xff;
136 fis[rhd_features1] = (features >> 8) & 0xff;
138 fis[rhd_dh] = ((ata_bio->blkno >> 24) & 0x0f) |
142 fis[rhd_count0] = count & 0xff;
144 fis[rhd_count1] = (count >> 8) & 0xff;
150 satafis_rhd_construct_atapi(struct ata_xfer *xfer, uint8_t *fis)
154 memset(fis, 0, RHD_FISLEN);
156 fis[fis_type] = RHD_FISTYPE;
157 fis[rhd_c] = RHD_C;
158 fis[rhd_command] = ATAPI_PKT_CMD;
160 fis[rhd_lba1] = (bcount16 >> 0) & 0xff;
161 fis[rhd_lba2] = (bcount16 >> 8) & 0xff;
162 fis[rhd_features0] = (xfer->c_flags & C_DMA) ?
168 satafis_rdh_parse(struct ata_channel *chp, const uint8_t *fis)
171 return ATACH_ERR_ST(fis[rdh_error], fis[rdh_status]);
175 satafis_rdh_cmd_readreg(struct ata_command *ata_c, const uint8_t *fis)
178 ata_c->r_lba = (uint64_t)fis[rdh_lba0] << 0;
179 ata_c->r_lba |= (uint64_t)fis[rdh_lba1] << 8;
180 ata_c->r_lba |= (uint64_t)fis[rdh_lba2] << 16;
182 ata_c->r_lba |= (uint64_t)fis[rdh_lba3] << 24;
183 ata_c->r_lba |= (uint64_t)fis[rdh_lba4] << 32;
184 ata_c->r_lba |= (uint64_t)fis[rdh_lba5] << 40;
185 ata_c->r_device = fis[rdh_dh];
187 ata_c->r_lba |= (uint64_t)(fis[rdh_dh] & 0x0f) << 24;
188 ata_c->r_device = fis[rdh_dh] & 0xf0;
191 ata_c->r_count = fis[rdh_count0] << 0;
193 ata_c->r_count |= fis[rdh_count1] << 8;
196 ata_c->r_error = fis[rdh_error];
197 ata_c->r_status = fis[rdh_status];