NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/52111: wmX i82574L inoperative in monoprocessor mode (i386)



The following reply was made to PR kern/52111; it has been noted by GNATS.

From: Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
        netbsd-bugs%netbsd.org@localhost, kardel%netbsd.org@localhost
Cc: 
Subject: Re: kern/52111: wmX i82574L inoperative in monoprocessor mode (i386)
Date: Tue, 28 Mar 2017 18:57:16 +0900

 Hi,
 
 Thank you very much for detail report!
 
 On 2017/03/28 17:40, Frank Kardel wrote:
 > From: Frank Kardel <kardel%netbsd.org@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc: 
 > Subject: Re: kern/52111: wmX i82574L inoperative in monoprocessor mode (i386)
 > Date: Tue, 28 Mar 2017 10:34:59 +0200
 >  I just rebooted with GENERIC "boot netbsd.GENERIC-act -1".
 >  Same sad story. So we can avoid going throught the differences.
 
 Hmm, I see.
 
 >  looking with gdb into the live kernel I see
 >  (gdb) print hardclock_ticks
 >  $13 = 68486
 >  (gdb) print hardclock_ticks
 >  $14 = 68766
 >  it is the right one (not the image)
 >  
 >  (gdb) print ncpus
 >  $19 = 0
 
 Is it "ncpu" typo?
 
 >  wm interrupts don't work in GENERIC either. ARP is not resolved.
 
 Oh, that's an important fact. If wm(4) cannot cause interrupts, the
 problem may not be wm(4) specific. When "boot -1", the other devices
 can cause interrupts?
 # "intrctl list" command can help to get the information
 
 If so, below patch can help to use 82574 when "boot -1".
 ====================
 diff --git a/sys/dev/pci/if_wm.c b/sys/dev/pci/if_wm.c
 index f8f10dc3..310ca7f 100644
 --- a/sys/dev/pci/if_wm.c
 +++ b/sys/dev/pci/if_wm.c
 @@ -1828,6 +1828,12 @@ wm_attach(device_t parent, device_t self, void *aux)
  	counts[PCI_INTR_TYPE_MSI] = 1;
  	counts[PCI_INTR_TYPE_INTX] = 1;
  
 +	/* XXX 82574 and "boot -1" workaround */
 +	if (sc->sc_type == WM_T_82574 && ncpu == 1) {
 +		max_type = PCI_INTR_TYPE_INTX;
 +		counts[PCI_INTR_TYPE_INTX] = 1;
 +	}
 +
  alloc_retry:
  	if (pci_intr_alloc(pa, &sc->sc_intrs, counts, max_type) != 0) {
  		aprint_error_dev(sc->sc_dev, "failed to allocate interrupt\n");
 ====================
 # This patch force 82574 use not MSI/MSI-X but INTx like other devices
 
 
 Thanks,
 
 -- 
 //////////////////////////////////////////////////////////////////////
 Internet Initiative Japan Inc.
 
 Device Engineering Section,
 IoT Platform Development Department,
 Network Division,
 Technology Unit
 
 Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>
 


Home | Main Index | Thread Index | Old Index