>Synopsis: slow bm(4) network speed
>Category: macppc
>Environment:
System : OpenBSD 5.8
Details : OpenBSD 5.8-current (GENERIC) #657: Fri Aug 21 21:58:32
MDT 2015
[email protected]:/usr/src/sys/arch/macppc/compile/GENERIC
Architecture: OpenBSD.macppc
Machine : macppc
>Description:
Network speed on a local network is really slow when using bm(4).
>How-To-Repeat:
Put some files on another box, running httpd(8) or sthttpd, for
example.
Then, try to ftp(1) these files on a macppc having a bm(4).
Transfer speed will be really slow (around 0.3 KB/s), even
when forcing 100baseTX full-duplex.
>Fix:
Borrowing the following diff from NetBSD PR #33667 fixes the
problem for me (I'm getting 780 KB/s).
https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=33667
Index: sys/arch/macppc/dev/if_bm.c
===================================================================
RCS file: /cvs/src/sys/arch/macppc/dev/if_bm.c,v
retrieving revision 1.34
diff -u -p -r1.34 if_bm.c
--- sys/arch/macppc/dev/if_bm.c 8 Jul 2015 07:21:49 -0000 1.34
+++ sys/arch/macppc/dev/if_bm.c 22 Aug 2015 13:15:31 -0000
@@ -558,6 +558,8 @@ next:
cmd->d_resid = 0;
sc->sc_rxlast = i + 1;
}
+ bmac_mediachange(ifp);
+
dbdma_continue(sc->sc_rxdma);
if_input(ifp, &ml);
dmesg:
[ using 549948 bytes of bsd ELF symbol table ]
console out [ATY,Rage128y] console in [keyboard], using ADB
: memaddr 88000000, size 8000000 : consaddr 88000000 : ioaddr 80920000, size
20000: width 640 linebytes 640 height 480 depth 8
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2015 OpenBSD. All rights reserved. http://www.OpenBSD.org
OpenBSD 5.8-current (GENERIC) #657: Fri Aug 21 21:58:32 MDT 2015
[email protected]:/usr/src/sys/arch/macppc/compile/GENERIC
real mem = 536870912 (512MB)
avail mem = 510652416 (486MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root: model PowerMac1,1
cpu0 at mainbus0: 750 (Revision 0x202): 350 MHz: 1MB backside cache
mem0 at mainbus0
mpcpcibr0 at mainbus0 pci: grackle
pci0 at mpcpcibr0 bus 0
ppb0 at pci0 dev 13 function 0 "DEC 21154" rev 0x02
pci1 at ppb0 bus 1
macobio0 at pci1 dev 5 function 0 "Apple Paddington" rev 0x00
macintr0 at macobio0 offset 0x10
mesh0 at macobio0 offset 0x10000 irq 12: 50MHz
scsibus1 at mesh0: 8 targets, initiator 7
"escc-legacy" at macobio0 offset 0x12000 not configured
zsc0 at macobio0 offset 0x13000: irq 15,16
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
awacs0 at macobio0 offset 0x14000: irq 17,8,9 headphones
audio0 at awacs0
"power-mgt" at macobio0 offset 0x0 not configured
"fdc" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000: irq 18, via-cuda, 0 targets
wdc0 at macobio0 offset 0x20000 irq 13: DMA
atapiscsi0 at wdc0 channel 0 drive 0
scsibus2 at atapiscsi0: 2 targets
cd0 at scsibus2 targ 0 lun 0: <GoldStar, CD-ROM CRD-8322B, 1.02> ATAPI 5/cdrom
removable
cd0(wdc0:0:0): using BIOS timings, DMA mode 2
bm0 at macobio0 offset 0x11000 irq 42,33: address XXX
lxtphy0 at bm0 phy 0: LXT970 10/100 PHY, rev. 1
"nvram" at macobio0 offset 0x60000 not configured
"TI TSB12LV21 FireWire" rev 0x02 at pci1 dev 0 function 0 not configured
pciide0 at pci1 dev 1 function 0 "CMD Technology PCI0646" rev 0x05: DMA,
channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide0: using irq 26 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <ST380011A>
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ahc0 at pci1 dev 2 function 0 "Adaptec AIC-7850" rev 0x03: irq 23
scsibus3 at ahc0: 8 targets, initiator 7
ohci0 at pci1 dev 6 function 0 "Opti 82C861" rev 0x10: irq 28, version 1.0,
legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "Opti OHCI root hub" rev 1.00/1.00 addr 1
vgafb0 at pci0 dev 16 function 0 "ATI Rage 128" rev 0x00, mmio
wsdisplay0 at vgafb0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
vscsi0 at root
scsibus4 at vscsi0: 256 targets
softraid0 at root
scsibus5 at softraid0: 256 targets
bootpath: /pci/@d/pci-ata@1/ata-4@0/disk@0:/bsd
root on wd0a (35d46e5c0ac2fa4f.a) swap on wd0b dump on wd0b
usbdevs:
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000),
Opti(0x1045), rev 1.00
port 1 powered
port 2 powered
pcidump:
Domain /dev/pci0:
0:13:0: DEC 21154
0x0000: Vendor ID: 1011 Product ID: 0026
0x0004: Command: 0107 Status: 02b0
0x0008: Class: 06 Subclass: 04 Interface: 00 Revision: 02
0x000c: BIST: 00 Header Type: 01 Latency Timer: 20 Cache Line Size: 00
0x0010: 00000000
0x0014: 00000000
0x0018: Primary Bus: 0 Secondary Bus: 1 Subordinate Bus: 1
Secondary Latency Timer: 20
0x001c: I/O Base: 11 I/O Limit: 11 Secondary Status: 22a0
0x0020: Memory Base: 8080 Memory Limit: 8080
0x0024: Prefetch Memory Base: 8081 Prefetch Memory Limit: 8071
0x0028: Prefetch Memory Base Upper 32 Bits: 00000000
0x002c: Prefetch Memory Limit Upper 32 Bits: 00000000
0x0030: I/O Base Upper 16 Bits: 0000 I/O Limit Upper 16 Bits: 0000
0x0038: Expansion ROM Base Address: 00000000
0x003c: Interrupt Pin: 00 Line: 00 Bridge Control: 0326
0x00dc: Capability 0x01: Power Management
0x0000: 00261011 02b00107 06040002 00012000
0x0010: 00000000 00000000 20010100 22a01111
0x0020: 80808080 80718081 00000000 00000000
0x0030: 00000000 000000dc 00000000 03260000
0x0040: 02000000 00000000 00000000 00000000
0x0050: 00000000 00000000 00000000 00000000
0x0060: 00000000 000f0002 00001800 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 01010001
0x00e0: 00400000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
0:16:0: ATI Rage 128
0x0000: Vendor ID: 1002 Product ID: 5245
0x0004: Command: 0086 Status: 02b0
0x0008: Class: 03 Subclass: 00 Interface: 00 Revision: 00
0x000c: BIST: 00 Header Type: 00 Latency Timer: 20 Cache Line Size: 08
0x0010: BAR mem prefetchable 32bit addr: 0x88000000/0x04000000
0x0014: BAR io addr: 0x00002000/0x0100
0x0018: BAR mem 32bit addr: 0x80900000/0x00004000
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: b530 Product ID: 0408
0x0030: Expansion ROM Base Address: 80920000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: ff Min Gnt: 08 Max Lat: 00
0x005c: Capability 0x01: Power Management
0x0000: 52451002 02b00086 03000000 00002008
0x0010: 88000008 00002001 80900000 00000000
0x0020: 00000000 00000000 00000000 0408b530
0x0030: 80920000 0000005c 00000000 000801ff
0x0040: 00000000 00000000 00000000 00000000
0x0050: 00205c02 1f000203 00000200 02010001
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
1:0:0: TI TSB12LV21 FireWire
0x0000: Vendor ID: 104c Product ID: 8000
0x0004: Command: 0014 Status: 0200
0x0008: Class: 0c Subclass: 00 Interface: 00 Revision: 02
0x000c: BIST: 00 Header Type: 00 Latency Timer: 20 Cache Line Size: 08
0x0010: BAR mem 32bit addr: 0x80882000/0x00001000
0x0014: BAR mem 32bit addr: 0x808c0000/0x00010000
0x0018: BAR mem 32bit addr: 0x808b0000/0x00010000
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 106b Product ID: 001c
0x0030: Expansion ROM Base Address: 808a0000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 03 Max Lat: 04
0x0000: 8000104c 02000014 0c000002 00002008
0x0010: 80882000 808c0000 808b0000 00000000
0x0020: 00000000 00000000 00000000 001c106b
0x0030: 808a0000 00000000 00000000 04030100
0x0040: 00000000 00000051 00000000 00000000
0x0050: 00002000 00000000 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000002 00000000 00000000 00000000
0x00c0: 0000000d 0000000d 0000000d 0000000d
0x00d0: 0000000d 0000000d 0000000d 0000000d
0x00e0: 0000000d 0000000d 0000000d 0000000d
0x00f0: 0000000d 0000000d 0000000d 0000000d
1:1:0: CMD Technology PCI0646
0x0000: Vendor ID: 1095 Product ID: 0646
0x0004: Command: 0005 Status: 0290
0x0008: Class: 01 Subclass: 01 Interface: 8f Revision: 05
0x000c: BIST: 00 Header Type: 00 Latency Timer: 20 Cache Line Size: 00
0x0010: BAR io addr: 0x00001090/0x0008
0x0014: BAR io addr: 0x00001080/0x0004
0x0018: BAR io addr: 0x00001070/0x0008
0x001c: BAR io addr: 0x00001060/0x0004
0x0020: BAR io addr: 0x00001050/0x0010
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 1095 Product ID: 0646
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 0e Min Gnt: 02 Max Lat: 04
0x0060: Capability 0x01: Power Management
0x0000: 06461095 02900005 01018f05 00002000
0x0010: 00001091 00001081 00001071 00001061
0x0020: 00001051 00000000 00000000 06461095
0x0030: 00000000 00000060 00000000 0402010e
0x0040: 00000000 00000000 00000000 02000000
0x0050: c000e440 cc00c03f 00004000 00000000
0x0060: 06010001 80006000 00000000 00000000
0x0070: d1200000 00b70000 f0000000 b7d33d88
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
1:2:0: Adaptec AIC-7850
0x0000: Vendor ID: 9004 Product ID: 5078
0x0004: Command: 0016 Status: 0290
0x0008: Class: 01 Subclass: 00 Interface: 00 Revision: 03
0x000c: BIST: 00 Header Type: 00 Latency Timer: 20 Cache Line Size: 08
0x0010: BAR io addr: 0x00000000/0x0100
0x0014: BAR mem 32bit addr: 0x80881000/0x00001000
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 9004 Product ID: 7850
0x0030: Expansion ROM Base Address: 80890000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 04 Max Lat: 04
0x00dc: Capability 0x01: Power Management
0x0000: 50789004 02900016 01000003 00002008
0x0010: 00000001 80881000 00000000 00000000
0x0020: 00000000 00000000 00000000 78509004
0x0030: 80890000 000000dc 00000000 04040100
0x0040: 80001180 80001180 00000000 00000000
0x0050: 00000000 00000000 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00210001
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
1:5:0: Apple Paddington
0x0000: Vendor ID: 106b Product ID: 0017
0x0004: Command: 0016 Status: 0200
0x0008: Class: ff Subclass: 00 Interface: 00 Revision: 00
0x000c: BIST: 00 Header Type: 00 Latency Timer: 20 Cache Line Size: 08
0x0010: BAR mem 32bit addr: 0x80800000/0x00080000
0x0014: BAR empty (00000000)
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 0000 Product ID: 0000
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
0x0000: 0017106b 02000016 ff000000 00002008
0x0010: 80800000 00000000 00000000 00000000
0x0020: 00000000 00000000 00000000 00000000
0x0030: 00000000 00000000 00000000 00000000
0x0040: 00000000 00000000 00000000 00000000
0x0050: 00000000 00000000 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
1:6:0: Opti 82C861
0x0000: Vendor ID: 1045 Product ID: c861
0x0004: Command: 0016 Status: 0280
0x0008: Class: 0c Subclass: 03 Interface: 10 Revision: 10
0x000c: BIST: 00 Header Type: 00 Latency Timer: 20 Cache Line Size: 08
0x0010: BAR mem 32bit addr: 0x80880000/0x00001000
0x0014: BAR empty (00000000)
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 1045 Product ID: c861
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 00 Max Lat: 00
0x0000: c8611045 02800016 0c031010 00002008
0x0010: 80880000 00000000 00000000 00000000
0x0020: 00000000 00000000 00000000 c8611045
0x0030: 00000000 00000000 00000000 00000100
0x0040: 000f0000 00000000 00000000 00000000
0x0050: 00270100 33333330 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
acpidump: