Lines Matching defs:mly
239 mly_inb(struct mly_softc *mly, int off)
242 bus_space_barrier(mly->mly_iot, mly->mly_ioh, off, 1,
244 return (bus_space_read_1(mly->mly_iot, mly->mly_ioh, off));
248 mly_inw(struct mly_softc *mly, int off)
251 bus_space_barrier(mly->mly_iot, mly->mly_ioh, off, 2,
253 return (bus_space_read_2(mly->mly_iot, mly->mly_ioh, off));
257 mly_inl(struct mly_softc *mly, int off)
260 bus_space_barrier(mly->mly_iot, mly->mly_ioh, off, 4,
262 return (bus_space_read_4(mly->mly_iot, mly->mly_ioh, off));
266 mly_outb(struct mly_softc *mly, int off, u_int8_t val)
269 bus_space_write_1(mly->mly_iot, mly->mly_ioh, off, val);
270 bus_space_barrier(mly->mly_iot, mly->mly_ioh, off, 1,
275 mly_outw(struct mly_softc *mly, int off, u_int16_t val)
278 bus_space_write_2(mly->mly_iot, mly->mly_ioh, off, val);
279 bus_space_barrier(mly->mly_iot, mly->mly_ioh, off, 2,
284 mly_outl(struct mly_softc *mly, int off, u_int32_t val)
287 bus_space_write_4(mly->mly_iot, mly->mly_ioh, off, val);
288 bus_space_barrier(mly->mly_iot, mly->mly_ioh, off, 4,
293 mly_idbr_true(struct mly_softc *mly, u_int8_t mask)
297 val = mly_inb(mly, mly->mly_idbr) ^ mly->mly_doorbell_true;
302 mly_odbr_true(struct mly_softc *mly, u_int8_t mask)
305 return ((mly_inb(mly, mly->mly_odbr) & mask) == mask);
309 mly_error_valid(struct mly_softc *mly)
313 val = mly_inb(mly, mly->mly_error_status) ^ mly->mly_doorbell_true;
321 #define MLY_LOGDEV_ID(mly, bus, target) \
322 (((bus) - (mly)->mly_controllerinfo->physical_channels_present) * \
325 #define MLY_LOGDEV_BUS(mly, logdev) \
327 (mly)->mly_controllerinfo->physical_channels_present)
329 #define MLY_LOGDEV_TARGET(mly, logdev) \
332 #define MLY_BUS_IS_VIRTUAL(mly, bus) \
333 ((bus) >= (mly)->mly_controllerinfo->physical_channels_present)
335 #define MLY_BUS_IS_VALID(mly, bus) \
336 (((bus) < (mly)->mly_nchans))