Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jul 2004 23:32:19 -0700
From:      Jake Hamby <jhamby@anobject.com>
To:        freebsd-current@freebsd.org, freebsd-mobile@freebsd.org
Subject:   Using -current on a Fujitsu Lifebook N5010 (no Atheros 802.11, no Ethernet, + hard freezes)
Message-ID:  <40FE0DF3.4030008@anobject.com>

next in thread | raw e-mail | index | archive | help
I recently purchased a new notebook (a Fujitsu Lifebook N5010, a model
which I can highly recommend as a desktop replacement) and decided to
try installing FreeBSD-CURRENT on it instead of Gentoo Linux, which is
the UNIX that I would normally install.  Here are some of the issues I
faced in terms of missing kernel support for this laptop.

1) Ethernet chipset not recognized.

This laptop uses the SiS 648 chipset and includes a 10/100 Ethernet port
with a Realtek 8139-compatible interface.  More specifically, it is
vendor id 0x10EC (Realtek), device id 0x8139 on PCI device 00:07.0,
recognized as type 'RTL-8100B/8139D' by the Linux 8139too driver.

What is even stranger is that this card shows up in a DOS-based hardware
scan (using AIDA from the Ultimate Boot CD), but not in the output of
pciconf.  Nor does it show up in the dmesg output, even as an unknown
device.

2) Version of Atheron 802.11a/b/g driver is too old.

With the version of the ath driver in CURRENT, I get this output:

ath0: [GIANT-LOCKED]
ath0: mac 5.6 phy 4.1 5ghz radio 3.6
ath0: unable to collect channel list from hal
device_attach: ath0 attach returned 22
ath0: <Atheros 5212> mem 0xec010000-0xec01ffff irq 11 at device 10.0 on pci0

The problem is inside of the portion of the code which is delivered only
in binary form.  Fortunately for you all, I spent the last five or six
days hacking on it and was able to integrate the latest version of the
Linux Atheros hal code from http://madwifi.sourceforge.net/, as well as
the necessary changes to the driver code provided as source.  You can
download my merged version from here:

http://www.anobject.com/jehamby/atheros_driver.tar.bz2

If anyone else has a WiFi adapter with an Atheros AR5210, AR5211, or
AR5212 chip, please download it and check it out (the replacement files
will go in the right places if extracted into /usr/src).  In addition to
offering support for the newer cards, the updated version of the driver
has these changes compared to the version in -current.

* New tunables:
   hw.ath.xchanmode (enable extended channels, default enabled)
   hw.ath.rateinterval (rate ctl interval in ms, default 1 second)
   hw.ath.ctlpkt_type (control pkt type to filter, which only has an
effect in terms of handling control packets which would otherwise be
rejected as too short, and which I've never seen but added the code from
the Linux version anyway)

* Added automatic rate control adjustment.  For 802.11b, starts at the
highest negotiated rate, otherwise, for 11g and 11a, starts "in the
middle" at 24Mb or 36Mb, then steps up or down over time using the
error/retry count for feedback.

* Now uses four transmission queues of varying priority instead of one:
  WME_AC_BE (highest), WME_AC_BK, WME_AC_VI, and WME_AC_VO (lowest).
There is code in the Linux version to support QOS and insert outgoing
packets into queue by priority, but I couldn't find the equivalent of
the priority field from Linux's sk_buff struct in FreeBSD's equivalent
ieee80211_frame struct.  Currently all outgoing packets go to WME_AC_BE,
except packets of type IEEE80211_FC0_TYPE_MGT, which go to WME_AC_VO.

* Enabled multi-rate retry if the MAC supports it.

* Added a mutex lock around several ath_*() functions that did not have
one before.  The Linux version only uses locks around the xmit buffer
and the xmit queues, while the current FreeBSD version also uses a
global mutex around several functions.  I am getting random hard freezes
(see bug #3) and I don't know if there are any additional locking issues
that might be causing this.  This driver is relatively complex,
consisting of several callouts that run at various intervals (normally,
calibration every 30 seconds and rate control every second) as well as
interrupt handling and other entry points, so I couldn't find any other
driver to use as an example.

* changed the format of the structures returned by the SIOCGATHSTATS and
SIOCGATHDIAG ioctls.  You will have to recompile "athstats" from
/usr/src/tools/tools/ath if you use that utility for debugging.

3) Random freezes

After an average of 30-40 minutes of heavy usage, I get random system
freezes.  I am typically running XFree86 and downloading something or
reading web pages at the time it happens.  More disturbingly, I am
occasionally seeing files get renamed, for example
/usr/src/UPDATING.64BIT became /usr/src/UPDATING.64BTT.  This happens
with or without WITNESS, with INVARIANTS enabled, with or without ACPI,
and with or without SMP.  I am using SCHED_ULE and no PREEMPTION.

I had been hoping that I could dump the memory to a partition and get
some debugging information from the core using gdb, but it doesn't work.
   I have a dumpdev setting in my /etc/rc.conf but when the system
hangs, it hangs.  I recently read about FireWire remote debugging, which
sounds pretty cool.  I have a desktop PC with FireWire currently running
Gentoo Linux.  Can someone point me to information about how to do this?
  I assume that I would need to set up a FreeBSD installation on that
machine first?  How likely is it that this will provide any useful
information for a random system hard lockup?

4) ACPI is not working correctly.

ACPI support is incomplete.  I can suspend the system with "zzz", but
then there is no way to wake it back up.  The power button turns the
machine on but then it hangs in a CPU loop (I can tell b/c the cooling
fan goes on) with a blank screen.  Sometimes the output of "apm" gives
correct results (good enough for the GNOME battery status applet,
although suspending through APM gives a hard freeze), while other times
I get this output (giving an empty battery icon for GNOME):

APM version: 1.2
APM Management: Disabled
AC Line status: on-line
Battery Status: charging
Remaining battery life: invalid value (0xffffffff)
Remaining battery time: unknown
Number of batteries: 1
Battery 0:
not present

5) DRI is not working.

This laptop has a Radeon Mobility 9600 (M10) NP chip (ChipID = 0x4e50),
which runs XFree86 using the vesa driver, or with the radeon driver in
the XFree86 4.3.99.15 snapshot, which gives me this error:

(WW) RADEON(0): Direct rendering not yet supported on Radeon 9500/9700
and newer cards

I get no error when loading the radeon kernel module, but no output
either, and no drm0 message in dmesg.  Is there any possibility that the
9600 will be supported by a future version of XFree86?  I have already
written ATI suggesting they release a FreeBSD version of their
proprietary Linux driver, but they probably won't.

Attached output:
---------------

Here is the output from /usr/sbin/pciconf -lv:

agp0@pci0:0:0:  class=0x060000 card=0x122710cf chip=0x06481039 rev=0x51
hdr=0x00    vendor   = 'Silicon Integrated Systems (SiS)'
     device   = 'SiS648 Host-to-PCI Bridge'
     class    = bridge
     subclass = HOST-PCI
pcib1@pci0:1:0: class=0x060400 card=0x00000000 chip=0x00031039 rev=0x00
hdr=0x01    vendor   = 'Silicon Integrated Systems (SiS)'
     device   = 'SiS648FX Virtual PCI to PCI Bridge (AGP)'
     class    = bridge
     subclass = PCI-PCI
isab0@pci0:2:0: class=0x060100 card=0x00000000 chip=0x00081039 rev=0x25
hdr=0x00    vendor   = 'Silicon Integrated Systems (SiS)'
     device   = 'SiS PCI to ISA Bridge (LPC Bridge)'
     class    = bridge
     subclass = PCI-ISA
atapci0@pci0:2:5:       class=0x01018a card=0x122b10cf chip=0x55131039
rev=0x00 hdr=0x00
     vendor   = 'Silicon Integrated Systems (SiS)'
     device   = 'SiS5513 EIDE Controller (A,B step)'
     class    = mass storage
     subclass = ATA
none0@pci0:2:6: class=0x070300 card=0x122910cf chip=0x70131039 rev=0xa0
hdr=0x00    vendor   = 'Silicon Integrated Systems (SiS)'
     device   = 'SiS7013 HSP56 MR, PCtel Serial Wave Device (Modem Riser)'
     class    = simple comms
pcm0@pci0:2:7:  class=0x040100 card=0x122a10cf chip=0x70121039 rev=0xa0
hdr=0x00    vendor   = 'Silicon Integrated Systems (SiS)'
     device   = 'SiS7012 PCI Audio Accelerator'
     class    = multimedia
     subclass = audio
ohci0@pci0:3:0: class=0x0c0310 card=0x122b10cf chip=0x70011039 rev=0x0f
hdr=0x00    vendor   = 'Silicon Integrated Systems (SiS)'
     device   = 'SiS5597/8 Universal Serial Bus Controller'
     class    = serial bus
     subclass = USB
ohci1@pci0:3:1: class=0x0c0310 card=0x122b10cf chip=0x70011039 rev=0x0f
hdr=0x00    vendor   = 'Silicon Integrated Systems (SiS)'
     device   = 'SiS5597/8 Universal Serial Bus Controller'
     class    = serial bus
     subclass = USB
none1@pci0:3:2: class=0x0c0320 card=0x122b10cf chip=0x70021039 rev=0x00
hdr=0x00    vendor   = 'Silicon Integrated Systems (SiS)'
     device   = 'SiS7002 USB 2.0 Enhanced Host Controller'
     class    = serial bus
     subclass = USB
cbb0@pci0:9:0:  class=0x060700 card=0x122c10cf chip=0xac8e104c rev=0x00
hdr=0x02    vendor   = 'Texas Instruments (TI)'
     class    = bridge
     subclass = PCI-CardBus
cbb1@pci0:9:1:  class=0x060700 card=0x122c10cf chip=0xac8e104c rev=0x00
hdr=0x02    vendor   = 'Texas Instruments (TI)'
     class    = bridge
     subclass = PCI-CardBus
fwohci0@pci0:9:2:       class=0x0c0010 card=0x122d10cf chip=0x802e104c
rev=0x00 hdr=0x00
     vendor   = 'Texas Instruments (TI)'
     class    = serial bus
     subclass = FireWire
none2@pci0:9:3: class=0x018000 card=0x122e10cf chip=0xac8f104c rev=0x00
hdr=0x00    vendor   = 'Texas Instruments (TI)'
     class    = mass storage
ath0@pci0:10:0: class=0x020000 card=0x123410cf chip=0x0013168c rev=0x01
hdr=0x00    vendor   = 'Atheros Communications Inc.'
     device   = 'AR5213 802.11a/b/g Wireless Adapter'
     class    = network
     subclass = ethernet
none3@pci1:0:0: class=0x030000 card=0x122810cf chip=0x4e501002 rev=0x00
hdr=0x00    vendor   = 'ATI Technologies Inc.'
     device   = 'Radeon Mobility M10 NP (RV350)'
     class    = display
     subclass = VGA


And here is the boot output from dmesg:

Copyright (c) 1992-2004 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
         The Regents of the University of California. All rights reserved.
FreeBSD 5.2-CURRENT #2: Tue Jul 20 22:51:21 PDT 2004
     root@atheros:/usr/obj/ATHEROS
WARNING: WITNESS option enabled, expect reduced performance.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (3000.12-MHz 686-class CPU)
   Origin = "GenuineIntel"  Id = 0xf29  Stepping = 9

Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
   Hyperthreading: 2 logical CPUs
real memory  = 534708224 (509 MB)
avail memory = 517746688 (493 MB)
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <PTLTD   RSDT> on motherboard
acpi0: [GIANT-LOCKED]
acpi0: Power Button (fixed)
unknown: I/O range not supported
unknown: I/O range not supported
acpi_ec0: <Embedded Controller: GPE 0x1e> port 0x66,0x62 on acpi0
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_tz1: <Thermal Zone> on acpi0
acpi_button0: <Power Button> on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_acad0: <AC Adapter> on acpi0
acpi_cmbat0: <Control Method Battery> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <SiS 648 host to AGP bridge> mem 0xe8000000-0xebffffff at device
0.0 on pci0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pcib1: could not get PCI interrupt routing table for \\_SB_.PCI0.AGP_ -
AE_NOT_FOUND
pci1: <ACPI PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 2.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <SiS 962/963 UDMA133 controller> port
0x1000-0x100f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 2.5 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
pci0: <simple comms> at device 2.6 (no driver attached)
pcm0: <SiS 7012> port 0x1800-0x187f,0x1c00-0x1cff irq 11 at device 2.7
on pci0
pcm0: [GIANT-LOCKED]
pcm0: <Unknown AC97 Codec (id = 0x83847666)>
ohci0: <SiS 5571 USB controller> mem 0xec000000-0xec000fff irq 11 at
device 3.0
on pci0
ohci0: [GIANT-LOCKED]
usb0: OHCI version 1.0, legacy support
usb0: SMM does not respond, resetting
usb0: <SiS 5571 USB controller> on ohci0
usb0: USB revision 1.0
uhub0: SiS OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
ohci1: <SiS 5571 USB controller> mem 0xec001000-0xec001fff irq 11 at
device 3.1
on pci0
ohci1: [GIANT-LOCKED]
usb1: OHCI version 1.0, legacy support
usb1: SMM does not respond, resetting
usb1: <SiS 5571 USB controller> on ohci1
usb1: USB revision 1.0
uhub1: SiS OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 3 ports with 3 removable, self powered
pci0: <serial bus, USB> at device 3.2 (no driver attached)
cbb0: <PCI-CardBus Bridge> irq 11 at device 9.0 on pci0
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
cbb1: <PCI-CardBus Bridge> irq 11 at device 9.1 on pci0
cardbus1: <CardBus bus> on cbb1
pccard1: <16-bit PCCard bus> on cbb1
fwohci0: <1394 Open Host Controller Interface> mem
0xec004000-0xec007fff,0xec003800-0xec003fff irq 11 at device 9.2 on pci0
fwohci0: [GIANT-LOCKED]
fwohci0: OHCI version 1.10 (ROM=0)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:00:0e:10:00:08:cb:47
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
firewire0: <IEEE1394(FireWire) bus> on fwohci0
fwohci0: Initiate bus reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
firewire0: 1 nodes, maxhop <= 0, Not found IRM capable node
pci0: <mass storage> at device 9.3 (no driver attached)
pci0: <network, ethernet> at device 10.0 (no driver attached)
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model GlidePoint, device ID 0
fdc0: <floppy drive controller> port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xdc000-0xdffff on isa0
sc0: <System console> on isa0
sc0: VGA <16 virtual consoles, flags=0x200>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 8250 or not responding
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
Timecounter "TSC" frequency 3000117916 Hz quality 800
Timecounters tick every 10.000 msec
ad0: 57231MB <FUJITSU MHT2060AT> [116280/16/63] at ata0-master UDMA100
ata1-master: FAILURE - ATAPI_RESET no interrupt
acd0: DVDR <TOSHIBA DVD-ROM SDR6112F> at ata1-master UDMA33
Mounting root from ufs:/dev/ad0s3a

--
Jake Hamby



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40FE0DF3.4030008>