Lines Matching refs:m_dev
73 struct mca_device * m_dev = device_get_ivars(dev);
92 m_dev->pos[reg] = data;
170 struct mca_device * m_dev = device_get_ivars(dev);
175 return (m_dev->pos[reg]);
183 struct mca_device * m_dev = device_get_ivars(dev);
186 while (resource_list_find(&(m_dev->rl), SYS_RES_IRQ, rid)) rid++;
187 resource_list_add(&(m_dev->rl), SYS_RES_IRQ, rid, irq, irq, 1);
197 struct mca_device * m_dev = device_get_ivars(dev);
200 while (resource_list_find(&(m_dev->rl), SYS_RES_DRQ, rid)) rid++;
201 resource_list_add(&(m_dev->rl), SYS_RES_DRQ, rid, drq, drq, 1);
212 struct mca_device * m_dev = device_get_ivars(dev);
215 while (resource_list_find(&(m_dev->rl), SYS_RES_MEMORY, rid)) rid++;
216 resource_list_add(&(m_dev->rl), SYS_RES_MEMORY, rid,
228 struct mca_device * m_dev = device_get_ivars(dev);
231 while (resource_list_find(&(m_dev->rl), SYS_RES_IOPORT, rid)) rid++;
232 resource_list_add(&(m_dev->rl), SYS_RES_IOPORT, rid,
242 struct mca_device * m_dev = NULL;
261 if (!m_dev) {
262 m_dev = (struct mca_device *)malloc(sizeof(*m_dev),
264 if (!m_dev) {
269 bzero(m_dev, sizeof(*m_dev));
276 m_dev->pos[reg] = inb(MCA_POS_REG(reg));
285 printf(" %02x", m_dev->pos[reg]);
290 m_dev->id = (u_int16_t)m_dev->pos[MCA_POS0] |
291 ((u_int16_t)m_dev->pos[MCA_POS1] << 8);
293 if (m_dev->id == 0xffff) {
299 m_dev->enabled = (m_dev->pos[MCA_POS2] & MCA_POS2_ENABLE);
300 m_dev->slot = slot;
302 resource_list_init(&(m_dev->rl));
305 device_set_ivars(child, m_dev);
307 m_dev = NULL;
310 if (m_dev) {
311 free(m_dev, M_DEVBUF);
353 struct mca_device * m_dev = device_get_ivars(child);
366 while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_IOPORT, rid++))) {
382 while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_MEMORY, rid++))) {
398 while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_IRQ, rid++))) {
405 while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_DRQ, rid++))) {
437 struct mca_device * m_dev = device_get_ivars(child);
441 *result = m_dev->slot;
444 *result = m_dev->id;
447 *result = m_dev->enabled;
461 struct mca_device * m_dev = device_get_ivars(child);
470 rle = resource_list_find(&(m_dev->rl), type, *rid);
472 resource_list_add(&(m_dev->rl), type, *rid,
481 return (resource_list_alloc(&(m_dev->rl), dev, child, type, rid,
488 struct mca_device * m_dev = device_get_ivars(child);
489 struct resource_list * rl = &m_dev->rl;