[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NEWS5000 SCSI
>scsibus1: waiting 2 seconds for devices to settle...
>scsibus2: waiting 2 seconds for devices to settle... ←NWB-2501に対応。
>
> の後、反応がなくなくなってしまいます。むむむ...
あ、そういえば拡張スロットの場合、
割り込み enable をしそこなってたよーな記憶が... ^^;
以下のpatch試してみていただけます?
Index: apbus.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/newsmips/apbus/apbus.c,v
retrieving revision 1.2
diff -a -u -r1.2 apbus.c
--- apbus.c 1999/12/23 06:52:30 1.2
+++ apbus.c 2000/05/18 17:26:58
@@ -210,25 +210,47 @@
{
int i;
int nbit = -1;
+ unsigned short mymask;
struct ap_intrhand *aip;
+ volatile unsigned int *inten0 = (volatile unsigned int *)NEWS5000_INTEN0;
+ volatile unsigned int *inten1 = (volatile unsigned int *)NEWS5000_INTEN1;
- for (i = 0; i < NBIT; i++) {
- if (mask & (1 << i)) {
- nbit = i;
- break;
+
+#ifdef DIAGNOSTIC
+ if (level>=NLEVEL)
+ panic("apbus_intr_establish: invalid level: %d",level);
+
+ if ((mask==0)||(mask>=0x10000))
+ panic("apbus_intr_establish: invalid mask: 0x%04x",mask);
+#endif
+
+ while (mask != 0) {
+ for (i = 0; i < NBIT; i++) {
+ if (mask & (1 << i)) {
+ nbit = i;
+ break;
+ }
}
- }
+ mymask = 1 << nbit;
+ mask &= ~mymask;
- if (nbit == -1)
- panic("apbus_intr_establish");
+ aip = &apintr[LEVELxBIT(level,nbit)];
+ aip->ai_mask = mymask;
+ aip->ai_priority = priority;
+ aip->ai_func = func;
+ aip->ai_aux = aux;
+ strncpy(aip->ai_name, name, APBUS_DEVNAMELEN-1);
+ aip->ai_ctlno = ctlno;
- aip = &apintr[LEVELxBIT(level,nbit)];
- aip->ai_mask = 1 << nbit;
- aip->ai_priority = priority;
- aip->ai_func = func;
- aip->ai_aux = aux;
- strncpy(aip->ai_name, name, APBUS_DEVNAMELEN-1);
- aip->ai_ctlno = ctlno;
+ switch (level) {
+ case 0:
+ *inten0 |= aip->ai_mask;
+ break;
+ case 1:
+ *inten1 |= aip->ai_mask;
+ break;
+ }
+ }
return (void *)aip;
}
--
ryo shimizu