Lines Matching refs:slot

87 	struct MCA_adapter slot[MCA_NUMADAPTERS];  member
123 static void mca_configure_adapter_status(int slot) { in mca_configure_adapter_status() argument
124 mca_info->slot[slot].status = MCA_ADAPTER_NONE; in mca_configure_adapter_status()
126 mca_info->slot[slot].id = mca_info->slot[slot].pos[0] in mca_configure_adapter_status()
127 + (mca_info->slot[slot].pos[1] << 8); in mca_configure_adapter_status()
129 if(!mca_info->slot[slot].id && slot < MCA_MAX_SLOT_NR) { in mca_configure_adapter_status()
139 mca_info->slot[slot].status = MCA_ADAPTER_ERROR; in mca_configure_adapter_status()
142 } else if(mca_info->slot[slot].id != 0xffff) { in mca_configure_adapter_status()
151 mca_info->slot[slot].status = MCA_ADAPTER_NORMAL; in mca_configure_adapter_status()
154 if((mca_info->slot[slot].id == 0xffff || in mca_configure_adapter_status()
155 mca_info->slot[slot].id == 0x0000) && slot >= MCA_MAX_SLOT_NR) { in mca_configure_adapter_status()
159 if(mca_info->slot[slot].pos[j] != 0xff) { in mca_configure_adapter_status()
160 mca_info->slot[slot].status = MCA_ADAPTER_NORMAL; in mca_configure_adapter_status()
166 if(!(mca_info->slot[slot].pos[2] & MCA_ENABLED)) { in mca_configure_adapter_status()
170 mca_info->slot[slot].status = MCA_ADAPTER_DISABLED; in mca_configure_adapter_status()
226 mca_info->slot[MCA_MOTHERBOARD].name[0] = 0; in mca_init()
228 mca_info->slot[MCA_MOTHERBOARD].pos[j] = inb_p(MCA_POS_REG(j)); in mca_init()
237 mca_info->slot[MCA_INTEGVIDEO].name[0] = 0; in mca_init()
239 mca_info->slot[MCA_INTEGVIDEO].pos[j] = inb_p(MCA_POS_REG(j)); in mca_init()
256 mca_info->slot[MCA_INTEGSCSI].name[0] = 0; in mca_init()
258 if((mca_info->slot[MCA_INTEGSCSI].pos[j] = inb_p(MCA_POS_REG(j))) != 0xff) in mca_init()
279 mca_info->slot[MCA_INTEGSCSI].pos[j] = inb_p(MCA_POS_REG(j)); in mca_init()
294 mca_info->slot[i].pos[j]=inb_p(MCA_POS_REG(j)); in mca_init()
296 mca_info->slot[i].name[0] = 0; in mca_init()
297 mca_info->slot[i].driver_loaded = 0; in mca_init()
316 static void mca_handle_nmi_slot(int slot, int check_flag) in mca_handle_nmi_slot() argument
318 if(slot < MCA_MAX_SLOT_NR) { in mca_handle_nmi_slot()
319 printk("NMI: caused by MCA adapter in slot %d (%s)\n", slot+1, in mca_handle_nmi_slot()
320 mca_info->slot[slot].name); in mca_handle_nmi_slot()
321 } else if(slot == MCA_INTEGSCSI) { in mca_handle_nmi_slot()
323 mca_info->slot[slot].name); in mca_handle_nmi_slot()
324 } else if(slot == MCA_INTEGVIDEO) { in mca_handle_nmi_slot()
326 mca_info->slot[slot].name); in mca_handle_nmi_slot()
327 } else if(slot == MCA_MOTHERBOARD) { in mca_handle_nmi_slot()
329 mca_info->slot[slot].name); in mca_handle_nmi_slot()
337 pos6 = mca_read_pos(slot, 6); in mca_handle_nmi_slot()
338 pos7 = mca_read_pos(slot, 7); in mca_handle_nmi_slot()
411 if(mca_info->slot[start].status == MCA_ADAPTER_DISABLED) { in mca_find_adapter()
415 if(id == mca_info->slot[start].id) { in mca_find_adapter()
458 if(mca_info->slot[start].status == MCA_ADAPTER_DISABLED || in mca_find_unused_adapter()
459 mca_info->slot[start].driver_loaded) { in mca_find_unused_adapter()
463 if(id == mca_info->slot[start].id) { in mca_find_unused_adapter()
485 unsigned char mca_read_stored_pos(int slot, int reg) in mca_read_stored_pos() argument
487 if(slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == NULL) return 0; in mca_read_stored_pos()
489 return mca_info->slot[slot].pos[reg]; in mca_read_stored_pos()
507 unsigned char mca_read_pos(int slot, int reg) in mca_read_pos() argument
512 if(slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == NULL) return 0; in mca_read_pos()
524 if(slot == MCA_INTEGSCSI && mca_info->which_scsi) { in mca_read_pos()
533 } else if(slot == MCA_INTEGVIDEO) { in mca_read_pos()
542 } else if(slot == MCA_MOTHERBOARD) { in mca_read_pos()
550 } else if(slot < MCA_MAX_SLOT_NR) { in mca_read_pos()
558 outb_p(0x8|(slot&0xf), MCA_ADAPTER_SETUP_REG); in mca_read_pos()
565 mca_info->slot[slot].pos[reg] = byte; in mca_read_pos()
600 void mca_write_pos(int slot, int reg, unsigned char byte) in mca_write_pos() argument
604 if(slot < 0 || slot >= MCA_MAX_SLOT_NR) in mca_write_pos()
620 outb_p(0x8|(slot&0xf), MCA_ADAPTER_SETUP_REG); in mca_write_pos()
628 mca_info->slot[slot].pos[reg] = byte; in mca_write_pos()
645 void mca_set_adapter_name(int slot, char* name) in mca_set_adapter_name() argument
649 if(slot >= 0 && slot < MCA_NUMADAPTERS) { in mca_set_adapter_name()
651 strncpy(mca_info->slot[slot].name, name, in mca_set_adapter_name()
652 sizeof(mca_info->slot[slot].name)-1); in mca_set_adapter_name()
653 mca_info->slot[slot].name[ in mca_set_adapter_name()
654 sizeof(mca_info->slot[slot].name)-1] = 0; in mca_set_adapter_name()
656 mca_info->slot[slot].name[0] = 0; in mca_set_adapter_name()
681 void mca_set_adapter_procfn(int slot, MCA_ProcFn procfn, void* dev) in mca_set_adapter_procfn() argument
685 if(slot >= 0 && slot < MCA_NUMADAPTERS) { in mca_set_adapter_procfn()
686 mca_info->slot[slot].procfn = procfn; in mca_set_adapter_procfn()
687 mca_info->slot[slot].dev = dev; in mca_set_adapter_procfn()
700 int mca_is_adapter_used(int slot) in mca_is_adapter_used() argument
702 return mca_info->slot[slot].driver_loaded; in mca_is_adapter_used()
718 int mca_mark_as_used(int slot) in mca_mark_as_used() argument
720 if(mca_info->slot[slot].driver_loaded) return 1; in mca_mark_as_used()
721 mca_info->slot[slot].driver_loaded = 1; in mca_mark_as_used()
734 void mca_mark_as_unused(int slot) in mca_mark_as_unused() argument
736 mca_info->slot[slot].driver_loaded = 0; in mca_mark_as_unused()
749 char *mca_get_adapter_name(int slot) in mca_get_adapter_name() argument
753 if(slot >= 0 && slot < MCA_NUMADAPTERS) { in mca_get_adapter_name()
754 return mca_info->slot[slot].name; in mca_get_adapter_name()
770 int mca_isadapter(int slot) in mca_isadapter() argument
774 if(slot >= 0 && slot < MCA_NUMADAPTERS) { in mca_isadapter()
775 return ((mca_info->slot[slot].status == MCA_ADAPTER_NORMAL) in mca_isadapter()
776 || (mca_info->slot[slot].status == MCA_ADAPTER_DISABLED)); in mca_isadapter()
793 int mca_isenabled(int slot) in mca_isenabled() argument
797 if(slot >= 0 && slot < MCA_NUMADAPTERS) { in mca_isenabled()
798 return (mca_info->slot[slot].status == MCA_ADAPTER_NORMAL); in mca_isenabled()
821 len += sprintf(page+len, "%02x ", mca_info->slot[i].pos[j]); in get_mca_info()
822 len += sprintf(page+len, " %s\n", mca_info->slot[i].name); in get_mca_info()
829 len += sprintf(page+len, "%02x ", mca_info->slot[MCA_INTEGVIDEO].pos[j]); in get_mca_info()
830 len += sprintf(page+len, " %s\n", mca_info->slot[MCA_INTEGVIDEO].name); in get_mca_info()
836 len += sprintf(page+len, "%02x ", mca_info->slot[MCA_INTEGSCSI].pos[j]); in get_mca_info()
837 len += sprintf(page+len, " %s\n", mca_info->slot[MCA_INTEGSCSI].name); in get_mca_info()
843 len += sprintf(page+len, "%02x ", mca_info->slot[MCA_MOTHERBOARD].pos[j]); in get_mca_info()
844 len += sprintf(page+len, " %s\n", mca_info->slot[MCA_MOTHERBOARD].name); in get_mca_info()
864 int slot = p - mca_info->slot; in mca_default_procfn() local
868 if(slot < MCA_MAX_SLOT_NR) { in mca_default_procfn()
869 len += sprintf(buf+len, "Slot: %d\n", slot+1); in mca_default_procfn()
870 } else if(slot == MCA_INTEGSCSI) { in mca_default_procfn()
872 } else if(slot == MCA_INTEGVIDEO) { in mca_default_procfn()
874 } else if(slot == MCA_MOTHERBOARD) { in mca_default_procfn()
889 mca_isenabled(slot) ? "Yes" : "No"); in mca_default_procfn()
894 mca_is_adapter_used(slot) ? "Yes" : "No"); in mca_default_procfn()
931 len += p->procfn(page+len, p-mca_info->slot, p->dev); in mca_read_proc()
959 p = &mca_info->slot[i]; in mca_do_proc_init()