Re: PANIC on latest source

2008-12-02 Thread Insan Praja SW

On Tue, 02 Dec 2008 11:17:42 +0700, David Gwynne [EMAIL PROTECTED] wrote:
Hi,
Here the dmesg attach after compiling the source. It works just fine but I
can't change em(4) MTU over 1600.
$ sudo ifconfig em0 mtu 1514
ifconfig: SIOCSIFMTU: Invalid argument
$ sudo ifconfig re0 mtu 1600

Thanks,

Insan

OpenBSD 4.4-current (GENERIC) #0: Wed Dec  3 01:22:28 WIT 2008
  [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
RTC BIOS diagnostic error 9fixed_disk
cpu0: Intel(R) Pentium(R) D CPU 3.00GHz (GenuineIntel 686-class) 3.01 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,S
SE3,MWAIT,DS-CPL,EST,CNXT-ID,CX16,xTPR
real mem  = 2142744576 (2043MB)
avail mem = 2063687680 (1968MB)
RTC BIOS diagnostic error 9fixed_disk
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 09/13/07, SMBIOS rev. 2.4 @
0x7fbe4000 (43 entries)
bios0: vendor Intel Corporation version
S3000.86B.02.00.0051.091720081311 date 09/17/2008
bios0: Intel S3000AH
acpi0 at bios0: rev 0
acpi0: tables DSDT SLIC FACP APIC WDDT HPET MCFG ASF! SSDT SSDT SSDT SSDT
SSDT HEST BERT ERST EINJ
acpi0: wakeup devices SLPB(S4) P32_(S4) UAR1(S1) PEX4(S4) PEX5(S4)
UHC1(S1) UHC2(S1) UHC3(S1) UHC4(S1) EHCI(S1) AC9M(S4) AZAL(
S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 4 (P32_)
acpiprt2 at acpi0: bus 1 (PEX0)
acpiprt3 at acpi0: bus -1 (PEX1)
acpiprt4 at acpi0: bus -1 (PEX2)
acpiprt5 at acpi0: bus -1 (PEX3)
acpiprt6 at acpi0: bus 2 (PEX4)
acpiprt7 at acpi0: bus 3 (PEX5)
acpicpu0 at acpi0: FVS, 3000, 2400 MHz
acpibtn0 at acpi0: SLPB
bios0: ROM list: 0xc/0x9000 0xc9000/0x1800
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 Intel E7230 Host rev 0x00
ppb0 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x01: irq 9
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 4 Intel 82801G PCIE rev 0x01: irq 9
pci2 at ppb1 bus 2
ppb2 at pci0 dev 28 function 5 Intel 82801G PCIE rev 0x01: irq 11
pci3 at ppb2 bus 3
em0 at pci3 dev 0 function 0 Intel PRO/1000MT (82573E) rev 0x03: irq 9,
address 00:15:17:39:1c:bc
Intel 82573E Serial rev 0x03 at pci3 dev 0 function 3 not configured
Intel 82573E KCS rev 0x03 at pci3 dev 0 function 4 not configured
uhci0 at pci0 dev 29 function 0 Intel 82801GB USB rev 0x01: irq 11
uhci1 at pci0 dev 29 function 1 Intel 82801GB USB rev 0x01: irq 10
uhci2 at pci0 dev 29 function 2 Intel 82801GB USB rev 0x01: irq 11
uhci3 at pci0 dev 29 function 3 Intel 82801GB USB rev 0x01: irq 11
ehci0 at pci0 dev 29 function 7 Intel 82801GB USB rev 0x01: irq 11
ehci0: timed out waiting for BIOS
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 Intel 82801BA Hub-to-PCI rev 0xe1
pci4 at ppb3 bus 4
re0 at pci4 dev 0 function 0 Realtek 8169 rev 0x10: RTL8169S (0x0400),
irq 11, address 00:13:f7:55:00:b7
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 0
fxp0 at pci4 dev 1 function 0 Intel 8255x rev 0x08, i82559: irq 11,
address 00:02:55:64:99:a8
inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 4
vga1 at pci4 dev 4 function 0 ATI ES1000 rev 0x02
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1
drm0 at radeondrm0
em1 at pci4 dev 5 function 0 Intel PRO/1000MT (82541GI) rev 0x05: irq 9,
address 00:15:17:39:1c:bd
ichpcib0 at pci0 dev 31 function 0 Intel 82801GB LPC rev 0x01: PM
disabled
pciide0 at pci0 dev 31 function 1 Intel 82801GB IDE rev 0x01: DMA,
channel 0 configured to compatibility, channel 1 configur
ed to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
pciide1 at pci0 dev 31 function 2 Intel 82801GB SATA rev 0x01: DMA,
channel 0 configured to native-PCI, channel 1 configured
   to native-PCI
pciide1: using irq 10 for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: ST380215AS
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 Intel 82801GB SMBus rev 0x01: irq 10
iic0 at ichiic0
adt0 at iic0 addr 0x2e: sch5027 rev 0x69
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5
spdmem1 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 Intel UHCI root hub rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 Intel UHCI root hub rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at 

Re: PANIC on latest source

2008-12-02 Thread David Gwynne

On 02/12/2008, at 11:11 PM, Insan Praja SW wrote:

On Tue, 02 Dec 2008 11:17:42 +0700, David Gwynne [EMAIL PROTECTED]  
wrote:

Hi,
Here the dmesg attach after compiling the source. It works just fine  
but I

can't change em(4) MTU over 1600.


thanks for testing the diff.

not all em(4) adapters support large MTUs. try changing it on all  
three of yours, if one works then i suggest you rewire to take  
advantage of it.


dlg



$ sudo ifconfig em0 mtu 1514
ifconfig: SIOCSIFMTU: Invalid argument
$ sudo ifconfig re0 mtu 1600

Thanks,

Insan

OpenBSD 4.4-current (GENERIC) #0: Wed Dec  3 01:22:28 WIT 2008
 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
RTC BIOS diagnostic error 9fixed_disk
cpu0: Intel(R) Pentium(R) D CPU 3.00GHz (GenuineIntel 686-class)  
3.01 GHz

cpu0:
FPU 
,V86 
,DE 
,PSE 
,TSC 
,MSR 
,PAE 
,MCE 
,CX8 
,APIC 
,SEP 
,MTRR 
,PGE 
,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,S

SE3,MWAIT,DS-CPL,EST,CNXT-ID,CX16,xTPR
real mem  = 2142744576 (2043MB)
avail mem = 2063687680 (1968MB)
RTC BIOS diagnostic error 9fixed_disk
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 09/13/07, SMBIOS rev. 2.4 @
0x7fbe4000 (43 entries)
bios0: vendor Intel Corporation version
S3000.86B.02.00.0051.091720081311 date 09/17/2008
bios0: Intel S3000AH
acpi0 at bios0: rev 0
acpi0: tables DSDT SLIC FACP APIC WDDT HPET MCFG ASF! SSDT SSDT SSDT  
SSDT

SSDT HEST BERT ERST EINJ
acpi0: wakeup devices SLPB(S4) P32_(S4) UAR1(S1) PEX4(S4) PEX5(S4)
UHC1(S1) UHC2(S1) UHC3(S1) UHC4(S1) EHCI(S1) AC9M(S4) AZAL(
S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 4 (P32_)
acpiprt2 at acpi0: bus 1 (PEX0)
acpiprt3 at acpi0: bus -1 (PEX1)
acpiprt4 at acpi0: bus -1 (PEX2)
acpiprt5 at acpi0: bus -1 (PEX3)
acpiprt6 at acpi0: bus 2 (PEX4)
acpiprt7 at acpi0: bus 3 (PEX5)
acpicpu0 at acpi0: FVS, 3000, 2400 MHz
acpibtn0 at acpi0: SLPB
bios0: ROM list: 0xc/0x9000 0xc9000/0x1800
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 Intel E7230 Host rev 0x00
ppb0 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x01: irq 9
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 4 Intel 82801G PCIE rev 0x01: irq 9
pci2 at ppb1 bus 2
ppb2 at pci0 dev 28 function 5 Intel 82801G PCIE rev 0x01: irq 11
pci3 at ppb2 bus 3
em0 at pci3 dev 0 function 0 Intel PRO/1000MT (82573E) rev 0x03:  
irq 9,

address 00:15:17:39:1c:bc
Intel 82573E Serial rev 0x03 at pci3 dev 0 function 3 not configured
Intel 82573E KCS rev 0x03 at pci3 dev 0 function 4 not configured
uhci0 at pci0 dev 29 function 0 Intel 82801GB USB rev 0x01: irq 11
uhci1 at pci0 dev 29 function 1 Intel 82801GB USB rev 0x01: irq 10
uhci2 at pci0 dev 29 function 2 Intel 82801GB USB rev 0x01: irq 11
uhci3 at pci0 dev 29 function 3 Intel 82801GB USB rev 0x01: irq 11
ehci0 at pci0 dev 29 function 7 Intel 82801GB USB rev 0x01: irq 11
ehci0: timed out waiting for BIOS
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 Intel 82801BA Hub-to-PCI rev 0xe1
pci4 at ppb3 bus 4
re0 at pci4 dev 0 function 0 Realtek 8169 rev 0x10: RTL8169S  
(0x0400),

irq 11, address 00:13:f7:55:00:b7
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 0
fxp0 at pci4 dev 1 function 0 Intel 8255x rev 0x08, i82559: irq 11,
address 00:02:55:64:99:a8
inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 4
vga1 at pci4 dev 4 function 0 ATI ES1000 rev 0x02
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1
drm0 at radeondrm0
em1 at pci4 dev 5 function 0 Intel PRO/1000MT (82541GI) rev 0x05:  
irq 9,

address 00:15:17:39:1c:bd
ichpcib0 at pci0 dev 31 function 0 Intel 82801GB LPC rev 0x01: PM
disabled
pciide0 at pci0 dev 31 function 1 Intel 82801GB IDE rev 0x01: DMA,
channel 0 configured to compatibility, channel 1 configur
ed to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
pciide1 at pci0 dev 31 function 2 Intel 82801GB SATA rev 0x01: DMA,
channel 0 configured to native-PCI, channel 1 configured
  to native-PCI
pciide1: using irq 10 for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: ST380215AS
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 Intel 82801GB SMBus rev 0x01:  
irq 10

iic0 at ichiic0
adt0 at iic0 addr 0x2e: sch5027 rev 0x69
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5
spdmem1 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 Intel UHCI root hub rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 Intel UHCI root 

Re: PANIC on latest source

2008-12-01 Thread David Gwynne
hi,

can you please try this diff and see if it solves your panics?

Index: if_em.c
===
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.199
diff -u -p -r1.199 if_em.c
--- if_em.c 29 Nov 2008 10:23:29 -  1.199
+++ if_em.c 2 Dec 2008 02:36:08 -
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 ***/
 
-/* $OpenBSD: if_em.c,v 1.199 2008/11/29 10:23:29 sthen Exp $ */
+/* $OpenBSD: if_em.c,v 1.197 2008/11/26 00:14:48 dlg Exp $ */
 /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
 
 #include dev/pci/if_em.h
@@ -164,6 +164,12 @@ void em_update_stats_counters(struct em_
 void em_txeof(struct em_softc *);
 int  em_allocate_receive_structures(struct em_softc *);
 int  em_allocate_transmit_structures(struct em_softc *);
+#ifdef __STRICT_ALIGNMENT
+void em_realign(struct em_softc *, struct mbuf *, u_int16_t *);
+#else
+#define em_realign(a, b, c) /* a, b, c */
+#endif
+int  em_rxfill(struct em_softc *);
 void em_rxeof(struct em_softc *, int);
 void em_receive_checksum(struct em_softc *, struct em_rx_desc *,
 struct mbuf *);
@@ -798,6 +804,11 @@ em_intr(void *arg)
 
if (ifp-if_flags  IFF_RUNNING) {
em_rxeof(sc, -1);
+   if (em_rxfill(sc)) {
+   /* Advance the Rx Queue #0 Tail Pointer. */
+   E1000_WRITE_REG(sc-hw, RDT,
+   sc-last_rx_desc_filled);
+   }
em_txeof(sc);
}
 
@@ -1448,15 +1459,15 @@ em_stop(void *arg)
struct em_softc *sc = arg;
ifp = sc-interface_data.ac_if;
 
+   /* Tell the stack that the interface is no longer active */
+   ifp-if_flags = ~(IFF_RUNNING | IFF_OACTIVE);
+
INIT_DEBUGOUT(em_stop: begin);
em_disable_intr(sc);
em_reset_hw(sc-hw);
timeout_del(sc-timer_handle);
timeout_del(sc-tx_fifo_timer_handle);
 
-   /* Tell the stack that the interface is no longer active */
-   ifp-if_flags = ~(IFF_RUNNING | IFF_OACTIVE);
-
em_free_transmit_structures(sc);
em_free_receive_structures(sc);
 }
@@ -2287,51 +2298,54 @@ int
 em_get_buf(struct em_softc *sc, int i)
 {
struct mbuf*m;
-   bus_dmamap_tmap;
-   struct em_buffer *rx_buffer;
+   struct em_buffer *pkt;
+   struct em_rx_desc *desc;
int error;
 
+   pkt = sc-rx_buffer_area[i];
+   desc = sc-rx_desc_base[i];
+
+   if (pkt-m_head != NULL) {
+   printf(%s: em_get_buf: slot %d already has an mbuf\n,
+   sc-sc_dv.dv_xname, i);
+   return (ENOBUFS);
+   }
+
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
sc-mbuf_alloc_failed++;
return (ENOBUFS);
}
-   MCLGET(m, M_DONTWAIT);
+   MCLGETI(m, M_DONTWAIT, sc-interface_data.ac_if, MCLBYTES);
if ((m-m_flags  M_EXT) == 0) {
m_freem(m);
sc-mbuf_cluster_failed++;
return (ENOBUFS);
}
m-m_len = m-m_pkthdr.len = MCLBYTES;
-
if (sc-hw.max_frame_size = (MCLBYTES - ETHER_ALIGN))
m_adj(m, ETHER_ALIGN);
 
-   /*
-* Using memory from the mbuf cluster pool, invoke the
-* bus_dma machinery to arrange the memory mapping.
-*/
-   error = bus_dmamap_load_mbuf(sc-rxtag, sc-rx_sparemap,
-   m, BUS_DMA_NOWAIT);
+   error = bus_dmamap_load_mbuf(sc-rxtag, pkt-map, m, BUS_DMA_NOWAIT);
if (error) {
m_freem(m);
return (error);
}
 
-   rx_buffer = sc-rx_buffer_area[i];
-   if (rx_buffer-m_head != NULL)
-   bus_dmamap_unload(sc-rxtag, rx_buffer-map);
+   bus_dmamap_sync(sc-rxtag, pkt-map, 0, pkt-map-dm_mapsize,
+   BUS_DMASYNC_PREREAD);
+   pkt-m_head = m;
 
-   map = rx_buffer-map;
-   rx_buffer-map = sc-rx_sparemap;
-   sc-rx_sparemap = map;
+   bus_dmamap_sync(sc-rxdma.dma_tag, sc-rxdma.dma_map,
+   sizeof(*desc) * i, sizeof(*desc), BUS_DMASYNC_POSTWRITE);
 
-   bus_dmamap_sync(sc-rxtag, rx_buffer-map, 0,
-   rx_buffer-map-dm_mapsize, BUS_DMASYNC_PREREAD);
+   bzero(desc, sizeof(*desc));
+   desc-buffer_addr = htole64(pkt-map-dm_segs[0].ds_addr);
 
-   rx_buffer-m_head = m;
+   bus_dmamap_sync(sc-rxdma.dma_tag, sc-rxdma.dma_map,
+   sizeof(*desc) * i, sizeof(*desc), BUS_DMASYNC_PREWRITE);
 
-   sc-rx_desc_base[i].buffer_addr = 
htole64(rx_buffer-map-dm_segs[0].ds_addr);
+   sc-rx_ndescs++;
 
return (0);
 }
@@ -2359,33 +2373,18 @@ em_allocate_receive_structures(struct em
 
sc-rxtag = sc-osdep.em_pa.pa_dmat;
 
-   error = bus_dmamap_create(sc-rxtag, MCLBYTES, 1, MCLBYTES,
-

Re: PANIC on latest source

2008-12-01 Thread Insan Praja SW

On Tue, 02 Dec 2008 11:17:42 +0700, David Gwynne [EMAIL PROTECTED] wrote:


hi,

can you please try this diff and see if it solves your panics?



Hi David and Misc@,
I already use the rev1.199 source code which back out the 1.197 source  
code. But I'm going to give it a try on a non-production machine with  
identical h/w.

Thanks,


Index: if_em.c
===
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.199
diff -u -p -r1.199 if_em.c
--- if_em.c 29 Nov 2008 10:23:29 -  1.199
+++ if_em.c 2 Dec 2008 02:36:08 -
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***/
-/* $OpenBSD: if_em.c,v 1.199 2008/11/29 10:23:29 sthen Exp $ */
+/* $OpenBSD: if_em.c,v 1.197 2008/11/26 00:14:48 dlg Exp $ */
 /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include dev/pci/if_em.h
@@ -164,6 +164,12 @@ void em_update_stats_counters(struct em_
 void em_txeof(struct em_softc *);
 int  em_allocate_receive_structures(struct em_softc *);
 int  em_allocate_transmit_structures(struct em_softc *);
+#ifdef __STRICT_ALIGNMENT
+void em_realign(struct em_softc *, struct mbuf *, u_int16_t *);
+#else
+#define em_realign(a, b, c) /* a, b, c */
+#endif
+int  em_rxfill(struct em_softc *);
 void em_rxeof(struct em_softc *, int);
 void em_receive_checksum(struct em_softc *, struct em_rx_desc *,
 struct mbuf *);
@@ -798,6 +804,11 @@ em_intr(void *arg)
if (ifp-if_flags  IFF_RUNNING) {
em_rxeof(sc, -1);
+   if (em_rxfill(sc)) {
+   /* Advance the Rx Queue #0 Tail Pointer. */
+   E1000_WRITE_REG(sc-hw, RDT,
+   sc-last_rx_desc_filled);
+   }
em_txeof(sc);
}
@@ -1448,15 +1459,15 @@ em_stop(void *arg)
struct em_softc *sc = arg;
ifp = sc-interface_data.ac_if;
+   /* Tell the stack that the interface is no longer active */
+   ifp-if_flags = ~(IFF_RUNNING | IFF_OACTIVE);
+
INIT_DEBUGOUT(em_stop: begin);
em_disable_intr(sc);
em_reset_hw(sc-hw);
timeout_del(sc-timer_handle);
timeout_del(sc-tx_fifo_timer_handle);
-   /* Tell the stack that the interface is no longer active */
-   ifp-if_flags = ~(IFF_RUNNING | IFF_OACTIVE);
-
em_free_transmit_structures(sc);
em_free_receive_structures(sc);
 }
@@ -2287,51 +2298,54 @@ int
 em_get_buf(struct em_softc *sc, int i)
 {
struct mbuf*m;
-   bus_dmamap_tmap;
-   struct em_buffer *rx_buffer;
+   struct em_buffer *pkt;
+   struct em_rx_desc *desc;
int error;
+   pkt = sc-rx_buffer_area[i];
+   desc = sc-rx_desc_base[i];
+
+   if (pkt-m_head != NULL) {
+   printf(%s: em_get_buf: slot %d already has an mbuf\n,
+   sc-sc_dv.dv_xname, i);
+   return (ENOBUFS);
+   }
+
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
sc-mbuf_alloc_failed++;
return (ENOBUFS);
}
-   MCLGET(m, M_DONTWAIT);
+   MCLGETI(m, M_DONTWAIT, sc-interface_data.ac_if, MCLBYTES);
if ((m-m_flags  M_EXT) == 0) {
m_freem(m);
sc-mbuf_cluster_failed++;
return (ENOBUFS);
}
m-m_len = m-m_pkthdr.len = MCLBYTES;
-
if (sc-hw.max_frame_size = (MCLBYTES - ETHER_ALIGN))
m_adj(m, ETHER_ALIGN);
-   /*
-* Using memory from the mbuf cluster pool, invoke the
-* bus_dma machinery to arrange the memory mapping.
-*/
-   error = bus_dmamap_load_mbuf(sc-rxtag, sc-rx_sparemap,
-   m, BUS_DMA_NOWAIT);
+   error = bus_dmamap_load_mbuf(sc-rxtag, pkt-map, m, BUS_DMA_NOWAIT);
if (error) {
m_freem(m);
return (error);
}
-   rx_buffer = sc-rx_buffer_area[i];
-   if (rx_buffer-m_head != NULL)
-   bus_dmamap_unload(sc-rxtag, rx_buffer-map);
+   bus_dmamap_sync(sc-rxtag, pkt-map, 0, pkt-map-dm_mapsize,
+   BUS_DMASYNC_PREREAD);
+   pkt-m_head = m;
-   map = rx_buffer-map;
-   rx_buffer-map = sc-rx_sparemap;
-   sc-rx_sparemap = map;
+   bus_dmamap_sync(sc-rxdma.dma_tag, sc-rxdma.dma_map,
+   sizeof(*desc) * i, sizeof(*desc), BUS_DMASYNC_POSTWRITE);
-   bus_dmamap_sync(sc-rxtag, rx_buffer-map, 0,
-   rx_buffer-map-dm_mapsize, BUS_DMASYNC_PREREAD);
+   bzero(desc, sizeof(*desc));
+   desc-buffer_addr = htole64(pkt-map-dm_segs[0].ds_addr);
-   rx_buffer-m_head = m;
+   bus_dmamap_sync(sc-rxdma.dma_tag, sc-rxdma.dma_map,
+   sizeof(*desc) * i, sizeof(*desc), BUS_DMASYNC_PREWRITE);
-	sc-rx_desc_base[i].buffer_addr =  
htole64(rx_buffer-map-dm_segs[0].ds_addr);

+

Re: PANIC on latest source

2008-12-01 Thread David Gwynne

On 02/12/2008, at 15:51, Insan Praja SW [EMAIL PROTECTED] wrote:

On Tue, 02 Dec 2008 11:17:42 +0700, David Gwynne [EMAIL PROTECTED]  
wrote:



hi,

can you please try this diff and see if it solves your panics?



Hi David and Misc@,
I already use the rev1.199 source code which back out the 1.197  
source code. But I'm going to give it a try on a non-production  
machine with identical h/w.


That would be much appreciated, thank you.



Thanks,


Index: if_em.c
===
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.199
diff -u -p -r1.199 if_em.c
--- if_em.c29 Nov 2008 10:23:29 -1.199
+++ if_em.c2 Dec 2008 02:36:08 -
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
*** 
*** 
*** 
**/

-/* $OpenBSD: if_em.c,v 1.199 2008/11/29 10:23:29 sthen Exp $ */
+/* $OpenBSD: if_em.c,v 1.197 2008/11/26 00:14:48 dlg Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include dev/pci/if_em.h
@@ -164,6 +164,12 @@ void em_update_stats_counters(struct em_
void em_txeof(struct em_softc *);
int  em_allocate_receive_structures(struct em_softc *);
int  em_allocate_transmit_structures(struct em_softc *);
+#ifdef __STRICT_ALIGNMENT
+void em_realign(struct em_softc *, struct mbuf *, u_int16_t *);
+#else
+#define em_realign(a, b, c) /* a, b, c */
+#endif
+int  em_rxfill(struct em_softc *);
void em_rxeof(struct em_softc *, int);
void em_receive_checksum(struct em_softc *, struct em_rx_desc *,
struct mbuf *);
@@ -798,6 +804,11 @@ em_intr(void *arg)
   if (ifp-if_flags  IFF_RUNNING) {
   em_rxeof(sc, -1);
+if (em_rxfill(sc)) {
+/* Advance the Rx Queue #0 Tail Pointer. */
+E1000_WRITE_REG(sc-hw, RDT,
+sc-last_rx_desc_filled);
+}
   em_txeof(sc);
   }
@@ -1448,15 +1459,15 @@ em_stop(void *arg)
   struct em_softc *sc = arg;
   ifp = sc-interface_data.ac_if;
+/* Tell the stack that the interface is no longer active */
+ifp-if_flags = ~(IFF_RUNNING | IFF_OACTIVE);
+
   INIT_DEBUGOUT(em_stop: begin);
   em_disable_intr(sc);
   em_reset_hw(sc-hw);
   timeout_del(sc-timer_handle);
   timeout_del(sc-tx_fifo_timer_handle);
-/* Tell the stack that the interface is no longer active */
-ifp-if_flags = ~(IFF_RUNNING | IFF_OACTIVE);
-
   em_free_transmit_structures(sc);
   em_free_receive_structures(sc);
}
@@ -2287,51 +2298,54 @@ int
em_get_buf(struct em_softc *sc, int i)
{
   struct mbuf*m;
-bus_dmamap_tmap;
-struct em_buffer *rx_buffer;
+struct em_buffer *pkt;
+struct em_rx_desc *desc;
   int error;
+pkt = sc-rx_buffer_area[i];
+desc = sc-rx_desc_base[i];
+
+if (pkt-m_head != NULL) {
+printf(%s: em_get_buf: slot %d already has an mbuf\n,
+sc-sc_dv.dv_xname, i);
+return (ENOBUFS);
+}
+
   MGETHDR(m, M_DONTWAIT, MT_DATA);
   if (m == NULL) {
   sc-mbuf_alloc_failed++;
   return (ENOBUFS);
   }
-MCLGET(m, M_DONTWAIT);
+MCLGETI(m, M_DONTWAIT, sc-interface_data.ac_if, MCLBYTES);
   if ((m-m_flags  M_EXT) == 0) {
   m_freem(m);
   sc-mbuf_cluster_failed++;
   return (ENOBUFS);
   }
   m-m_len = m-m_pkthdr.len = MCLBYTES;
-
   if (sc-hw.max_frame_size = (MCLBYTES - ETHER_ALIGN))
   m_adj(m, ETHER_ALIGN);
-/*
- * Using memory from the mbuf cluster pool, invoke the
- * bus_dma machinery to arrange the memory mapping.
- */
-error = bus_dmamap_load_mbuf(sc-rxtag, sc-rx_sparemap,
-m, BUS_DMA_NOWAIT);
+error = bus_dmamap_load_mbuf(sc-rxtag, pkt-map, m,  
BUS_DMA_NOWAIT);

   if (error) {
   m_freem(m);
   return (error);
   }
-rx_buffer = sc-rx_buffer_area[i];
-if (rx_buffer-m_head != NULL)
-bus_dmamap_unload(sc-rxtag, rx_buffer-map);
+bus_dmamap_sync(sc-rxtag, pkt-map, 0, pkt-map-dm_mapsize,
+BUS_DMASYNC_PREREAD);
+pkt-m_head = m;
-map = rx_buffer-map;
-rx_buffer-map = sc-rx_sparemap;
-sc-rx_sparemap = map;
+bus_dmamap_sync(sc-rxdma.dma_tag, sc-rxdma.dma_map,
+sizeof(*desc) * i, sizeof(*desc), BUS_DMASYNC_POSTWRITE);
-bus_dmamap_sync(sc-rxtag, rx_buffer-map, 0,
-rx_buffer-map-dm_mapsize, BUS_DMASYNC_PREREAD);
+bzero(desc, sizeof(*desc));
+desc-buffer_addr = htole64(pkt-map-dm_segs[0].ds_addr);
-rx_buffer-m_head = m;
+bus_dmamap_sync(sc-rxdma.dma_tag, sc-rxdma.dma_map,
+sizeof(*desc) * i, sizeof(*desc), BUS_DMASYNC_PREWRITE);
-sc-rx_desc_base[i].buffer_addr = htole64(rx_buffer-map- 
dm_segs[0].ds_addr);

+sc-rx_ndescs++;
   return (0);
}
@@ -2359,33 +2373,18 @@ em_allocate_receive_structures(struct em
   sc-rxtag = sc-osdep.em_pa.pa_dmat;
-error = bus_dmamap_create(sc-rxtag, MCLBYTES, 1, MCLBYTES,
-0, BUS_DMA_NOWAIT, sc-rx_sparemap);
-if (error != 0) {
-printf(%s: 

Re: PANIC on latest source

2008-11-29 Thread Insan Praja SW

Hi Misc@ and Stuart,
On Sat, 29 Nov 2008 17:06:59 +0700, Stuart Henderson [EMAIL PROTECTED]  
wrote:



In gmane.os.openbsd.misc, you wrote:

If there's any diffs for the driver?


this backs out the commit which will have caused the problems
you saw and should restore it to working behaviour.

please can you give us details about what the machine was doing
when it crashed please? just booted, or running for a while?
if you can test, does it still happen if the network cable is
disconnected?


The machine was rebooting, after intiatiating /etc/hostname.em* scripts,  
which contains,


/etc/hostname.em0 -- onboard NIC
up
/etc/hostname.em1 -- PCI card NIC
up
media 100baseTX mediaopt full-duplex
/etc/hostname.em2 -- onboard NIC
mtu 1600
up

and it hangs. Happens even when I disconnected the cables. I had to  
disabled it from bios then it stop complaining.


Hope this helps,
Best Regards,
Insan




Index: if_em.c
===
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.198
diff -u -p -r1.198 if_em.c
--- if_em.c 28 Nov 2008 02:44:17 -  1.198
+++ if_em.c 29 Nov 2008 10:01:18 -
@@ -164,12 +164,6 @@ void em_update_stats_counters(struct em_
 void em_txeof(struct em_softc *);
 int  em_allocate_receive_structures(struct em_softc *);
 int  em_allocate_transmit_structures(struct em_softc *);
-#ifdef __STRICT_ALIGNMENT
-void em_realign(struct em_softc *, struct mbuf *, u_int16_t *);
-#else
-#define em_realign(a, b, c) /* a, b, c */
-#endif
-void em_rxfill(struct em_softc *);
 void em_rxeof(struct em_softc *, int);
 void em_receive_checksum(struct em_softc *, struct em_rx_desc *,
 struct mbuf *);
@@ -804,7 +798,6 @@ em_intr(void *arg)
if (ifp-if_flags  IFF_RUNNING) {
em_rxeof(sc, -1);
-   em_rxfill(sc);
em_txeof(sc);
}
@@ -1455,15 +1448,15 @@ em_stop(void *arg)
struct em_softc *sc = arg;
ifp = sc-interface_data.ac_if;
-   /* Tell the stack that the interface is no longer active */
-   ifp-if_flags = ~(IFF_RUNNING | IFF_OACTIVE);
-
INIT_DEBUGOUT(em_stop: begin);
em_disable_intr(sc);
em_reset_hw(sc-hw);
timeout_del(sc-timer_handle);
timeout_del(sc-tx_fifo_timer_handle);
+   /* Tell the stack that the interface is no longer active */
+   ifp-if_flags = ~(IFF_RUNNING | IFF_OACTIVE);
+
em_free_transmit_structures(sc);
em_free_receive_structures(sc);
 }
@@ -2294,54 +2287,51 @@ int
 em_get_buf(struct em_softc *sc, int i)
 {
struct mbuf*m;
-   struct em_buffer *pkt;
-   struct em_rx_desc *desc;
+   bus_dmamap_tmap;
+   struct em_buffer *rx_buffer;
int error;
-   pkt = sc-rx_buffer_area[i];
-   desc = sc-rx_desc_base[i];
-
-   if (pkt-m_head != NULL) {
-   printf(%s: em_get_buf: slot %d already has an mbuf\n,
-   sc-sc_dv.dv_xname, i);
-   return (ENOBUFS);
-   }
-
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
sc-mbuf_alloc_failed++;
return (ENOBUFS);
}
-   MCLGETI(m, M_DONTWAIT, sc-interface_data.ac_if, MCLBYTES);
+   MCLGET(m, M_DONTWAIT);
if ((m-m_flags  M_EXT) == 0) {
m_freem(m);
sc-mbuf_cluster_failed++;
return (ENOBUFS);
}
m-m_len = m-m_pkthdr.len = MCLBYTES;
+
if (sc-hw.max_frame_size = (MCLBYTES - ETHER_ALIGN))
m_adj(m, ETHER_ALIGN);
-   error = bus_dmamap_load_mbuf(sc-rxtag, pkt-map, m, BUS_DMA_NOWAIT);
+   /*
+* Using memory from the mbuf cluster pool, invoke the
+* bus_dma machinery to arrange the memory mapping.
+*/
+   error = bus_dmamap_load_mbuf(sc-rxtag, sc-rx_sparemap,
+   m, BUS_DMA_NOWAIT);
if (error) {
m_freem(m);
return (error);
}
-   bus_dmamap_sync(sc-rxtag, pkt-map, 0, pkt-map-dm_mapsize,
-   BUS_DMASYNC_PREREAD);
-   pkt-m_head = m;
+   rx_buffer = sc-rx_buffer_area[i];
+   if (rx_buffer-m_head != NULL)
+   bus_dmamap_unload(sc-rxtag, rx_buffer-map);
-   bus_dmamap_sync(sc-rxdma.dma_tag, sc-rxdma.dma_map,
-   sizeof(*desc) * i, sizeof(*desc), BUS_DMASYNC_POSTWRITE);
+   map = rx_buffer-map;
+   rx_buffer-map = sc-rx_sparemap;
+   sc-rx_sparemap = map;
-   bzero(desc, sizeof(*desc));
-   desc-buffer_addr = htole64(pkt-map-dm_segs[0].ds_addr);
+   bus_dmamap_sync(sc-rxtag, rx_buffer-map, 0,
+   rx_buffer-map-dm_mapsize, BUS_DMASYNC_PREREAD);
-   bus_dmamap_sync(sc-rxdma.dma_tag, sc-rxdma.dma_map,
-   sizeof(*desc) * i, sizeof(*desc), BUS_DMASYNC_PREWRITE);
+   rx_buffer-m_head = m;
-   sc-rx_ndescs++;
+	sc-rx_desc_base[i].buffer_addr =  

Re: PANIC on latest source

2008-11-28 Thread Stuart Henderson
On 2008-11-27, Insan Praja SW [EMAIL PROTECTED] wrote:
 em0 at pci3 dev 0 function 0 Intel PRO/1000MT (82573E) rev 0x03: irq 9, 
 address 00:15:17:49:03:b3
 em1 at pci4 dev 1 function 0 Intel PRO/1000MT (82540EM) rev 0x02: irq 11, 
 address 00:07:e9:0f:44:ac
 em2 at pci4 dev 5 function 0 Intel PRO/1000MT (82541GI) rev 0x05: irq 9, 
 address 00:15:17:49:03:b4

It may be a complete red herring, but can you try disconnecting these
to see if it only affects one of them? I would start with the 82573E
(I would guess it may be onboard, if so there's probably somewhere
in BIOS you can disable it).



Re: PANIC on latest source

2008-11-28 Thread Insan Praja SW
On Sat, 29 Nov 2008 02:38:33 +0700, Stuart Henderson [EMAIL PROTECTED]  
wrote:



On 2008-11-27, Insan Praja SW [EMAIL PROTECTED] wrote:
em0 at pci3 dev 0 function 0 Intel PRO/1000MT (82573E) rev 0x03: irq  
9, address 00:15:17:49:03:b3
em1 at pci4 dev 1 function 0 Intel PRO/1000MT (82540EM) rev 0x02: irq  
11, address 00:07:e9:0f:44:ac
em2 at pci4 dev 5 function 0 Intel PRO/1000MT (82541GI) rev 0x05: irq  
9, address 00:15:17:49:03:b4


It may be a complete red herring, but can you try disconnecting these
to see if it only affects one of them? I would start with the 82573E
(I would guess it may be onboard, if so there's probably somewhere
in BIOS you can disable it).



I see what I can do.. but disable one of these nics, I dont think I can't  
afford that. It's a router and I need that interface.


thanks,

--
insandotpraja(at)gmaildotcom



Re: PANIC on latest source

2008-11-28 Thread Insan Praja SW

Hi,
On Sat, 29 Nov 2008 02:38:33 +0700, Stuart Henderson [EMAIL PROTECTED]
wrote:


On 2008-11-27, Insan Praja SW [EMAIL PROTECTED] wrote:
em0 at pci3 dev 0 function 0 Intel PRO/1000MT (82573E) rev 0x03: irq  
9, address 00:15:17:49:03:b3
em1 at pci4 dev 1 function 0 Intel PRO/1000MT (82540EM) rev 0x02: irq  
11, address 00:07:e9:0f:44:ac
em2 at pci4 dev 5 function 0 Intel PRO/1000MT (82541GI) rev 0x05: irq  
9, address 00:15:17:49:03:b4


It may be a complete red herring, but can you try disconnecting these
to see if it only affects one of them? I would start with the 82573E
(I would guess it may be onboard, if so there's probably somewhere
in BIOS you can disable it).



I see what I can do.. but disable one of these nics, I dont think I can't
afford that. It's a router and I need that interface.

So I disabled those onboard NICs and, it stop panicking. so I guess this  
bug only happening when you got onboard em (82573E chips)? If there's any  
diffs for the driver? :D

thanks,

--
insandotpraja(at)gmaildotcom



Re: PANIC on latest source

2008-11-28 Thread Stuart Henderson
On 2008-11-28, Insan Praja SW [EMAIL PROTECTED] wrote:
 On Sat, 29 Nov 2008 02:38:33 +0700, Stuart Henderson [EMAIL PROTECTED]  
 wrote:

 On 2008-11-27, Insan Praja SW [EMAIL PROTECTED] wrote:
 em0 at pci3 dev 0 function 0 Intel PRO/1000MT (82573E) rev 0x03: irq  
 9, address 00:15:17:49:03:b3
 em1 at pci4 dev 1 function 0 Intel PRO/1000MT (82540EM) rev 0x02: irq  
 11, address 00:07:e9:0f:44:ac
 em2 at pci4 dev 5 function 0 Intel PRO/1000MT (82541GI) rev 0x05: irq  
 9, address 00:15:17:49:03:b4

 It may be a complete red herring, but can you try disconnecting these
 to see if it only affects one of them? I would start with the 82573E
 (I would guess it may be onboard, if so there's probably somewhere
 in BIOS you can disable it).


 I see what I can do.. but disable one of these nics, I dont think I can't  
 afford that. It's a router and I need that interface.

The 82573E is fairly uncommon, I don't think there are too many people
who can test this. I've been trying to find systems it fails on (because
I have a few routers with em(4) in them and I need to check they'll be
ok before I upgrade them - always wise, but doubly so around the time
of a hackathon especially when it has specifically involved work on
this driver) and haven't yet seen a problem.



PANIC on latest source

2008-11-27 Thread Insan Praja SW

Hi Misc@,
I'm compiling a 27 November source tree, kernel and userland. Just as it  
finished booting, it went panic. I got 25 November kernel and userland  
which works just fine. Thanks.


Here it comes,

OpenBSD 4.4-current (GENERIC) #48: Thu Nov 27 16:20:26 WIT 2008
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
RTC BIOS diagnostic error ffixed_disk,invalid_time
cpu0: Intel(R) Pentium(R) D CPU 3.00GHz (GenuineIntel 686-class) 3.01 GHz
cpu0:  
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,CNXT-ID,CX16,xTPR

real mem  = 1069002752 (1019MB)
avail mem = 1025359872 (977MB)
RTC BIOS diagnostic error ffixed_disk,invalid_time
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 09/13/07, SMBIOS rev. 2.4 @  
0x3fbe4000 (42 entries)
bios0: vendor Intel Corporation version  
S3000.86B.02.00.0048.042920081306 date 04/29/2008

bios0: Intel S3000AH
acpi0 at bios0: rev 0
acpi0: tables DSDT SLIC FACP APIC WDDT MCFG ASF! SSDT SSDT SSDT SSDT SSDT  
HEST BERT ERST EINJ
acpi0: wakeup devices SLPB(S4) P32_(S4) UAR1(S1) PEX4(S4) PEX5(S4)  
UHC1(S1) UHC2(S1) UHC3(S1) UHC4(S1) EHCI(S1) AC9M(S4) AZAL(S4)

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 4 (P32_)
acpiprt2 at acpi0: bus 1 (PEX0)
acpiprt3 at acpi0: bus -1 (PEX1)
acpiprt4 at acpi0: bus -1 (PEX2)
acpiprt5 at acpi0: bus -1 (PEX3)
acpiprt6 at acpi0: bus 2 (PEX4)
acpiprt7 at acpi0: bus 3 (PEX5)
acpicpu0 at acpi0: FVS, 3000, 2400 MHz
acpibtn0 at acpi0: SLPB
bios0: ROM list: 0xc/0x9000 0xc9000/0x1800
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Intel E7230 Host rev 0x00
ppb0 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x01: irq 9
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 4 Intel 82801G PCIE rev 0x01: irq 9
pci2 at ppb1 bus 2
ppb2 at pci0 dev 28 function 5 Intel 82801G PCIE rev 0x01: irq 11
pci3 at ppb2 bus 3
em0 at pci3 dev 0 function 0 Intel PRO/1000MT (82573E) rev 0x03: irq 9,  
address 00:15:17:49:03:b3

Intel 82573E Serial rev 0x03 at pci3 dev 0 function 3 not configured
Intel 82573E KCS rev 0x03 at pci3 dev 0 function 4 not configured
uhci0 at pci0 dev 29 function 0 Intel 82801GB USB rev 0x01: irq 11
uhci1 at pci0 dev 29 function 1 Intel 82801GB USB rev 0x01: irq 10
uhci2 at pci0 dev 29 function 2 Intel 82801GB USB rev 0x01: irq 11
uhci3 at pci0 dev 29 function 3 Intel 82801GB USB rev 0x01: irq 11
ehci0 at pci0 dev 29 function 7 Intel 82801GB USB rev 0x01: irq 11
ehci0: timed out waiting for BIOS
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 Intel 82801BA Hub-to-PCI rev 0xe1
pci4 at ppb3 bus 4
skc0 at pci4 dev 0 function 0 D-Link Systems DGE-530T B1 rev 0x11, Yukon  
Lite (0x9): irq 11

sk0 at skc0 port A: address 00:1b:11:10:07:f5
eephy0 at sk0 phy 0: 88E1011 Gigabit PHY, rev. 5
em1 at pci4 dev 1 function 0 Intel PRO/1000MT (82540EM) rev 0x02: irq  
11, address 00:07:e9:0f:44:ac

vga1 at pci4 dev 4 function 0 ATI ES1000 rev 0x02
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1
drm0 at radeondrm0
em2 at pci4 dev 5 function 0 Intel PRO/1000MT (82541GI) rev 0x05: irq 9,  
address 00:15:17:49:03:b4
ichpcib0 at pci0 dev 31 function 0 Intel 82801GB LPC rev 0x01: PM  
disabled
pciide0 at pci0 dev 31 function 1 Intel 82801GB IDE rev 0x01: DMA,  
channel 0 configured to compatibility, channel 1 configured to  
compatibility

pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
pciide1 at pci0 dev 31 function 2 Intel 82801GB SATA rev 0x01: DMA,  
channel 0 configured to native-PCI, channel 1 configured to native-PCI

pciide1: using irq 10 for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: ST380215AS
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 Intel 82801GB SMBus rev 0x01: irq 10
iic0 at ichiic0
adt0 at iic0 addr 0x2e: sch5027 rev 0x69
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 Intel UHCI root hub rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 Intel UHCI root hub rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
biomask fded