From nobody@FreeBSD.org  Tue Oct 30 04:10:58 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 756B416A419
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Oct 2007 04:10:58 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 6552913C447
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Oct 2007 04:10:58 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9U4AuFt025661
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Oct 2007 04:10:56 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l9U4AuAn025660;
	Tue, 30 Oct 2007 04:10:56 GMT
	(envelope-from nobody)
Message-Id: <200710300410.l9U4AuAn025660@www.freebsd.org>
Date: Tue, 30 Oct 2007 04:10:56 GMT
From: bazzoola <bazzoola@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ral%d: device timeout when running as an access point
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         117655
>Category:       kern
>Synopsis:       [ral] ral%d: device timeout when running as an access point [regression]
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    sam
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 30 04:20:01 UTC 2007
>Closed-Date:    Sun Feb 24 23:00:42 UTC 2013
>Last-Modified:  Sun Feb 24 23:00:42 UTC 2013
>Originator:     bazzoola
>Release:        RELENG_7
>Organization:
>Environment:
FreeBSD nixnix.local 7.0-BETA1 FreeBSD 7.0-BETA1 #8: Sun Oct 28 23:52:57 EDT 2007     root@ nixnix.local:/usr/obj/usr/src/sys/GENERIC2  i386


>Description:
The wireless device ral timeouts when is running as an access point using
hostapd.  The access point is not accessible after upgrading from RELENG_6
to RELENG_7. It used to work just fine with RELENG_6

The msg looks like this

#dmesg | tail
ral0: device timeout
ral0: device timeout
ral0: device timeout
ral0: device timeout
ral0: device timeout

#vmstat -i
interrupt                          total       rate
irq0: clk                        5222685        999
irq4: sio0                          1335          0
irq5: ral0                         12878          2
irq6: fdc0                             2          0
irq7: ppc0                             1          0
irq8: rtc                         668385        127
irq10: skc1                        48065          9
irq11: skc0                        48746          9
irq14: ata0                        52436         10
Total                            6054533       1158

The man page states that ral0 might not be functional with PCI 2.1
FreeBSD 7 detects my BIOS PCI as 2.1 (however I have 2.2)
#more dmesg.txt | grep pcibios
pcibios: PCI BIOS entry at 0xf0000+0xb4f0
pcibios: BIOS version 2.10

I checked the mobo's specs and they claim that they support PCI 2.2

http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ClassValue=Motherboard&ProductID=1579&ProductName=GA-5SMM

Btw, I have the latest BIOS installed.


#dmesg
Copyright (c) 1992-2007 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 is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-BETA1 #3: Thu Oct 25 14:20:12 EDT 2007
 r...@nixnixnix.local:/usr/obj/usr/src/sys/GENERIC2
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD-K6(tm) 3D processor (501.14-MHz 586-class CPU)
Origin = "AuthenticAMD"  Id = 0x58c  Stepping = 12
Features=0x8021bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,PGE,MMX>
AMD Features=0x80000800<SYSCALL,3DNow!>
real memory  = 266272768 (253 MB)
avail memory = 251076608 (239 MB)
wlan: mac acl policy registered
kbd1 at kbdmux0
K6-family MTRR support enabled (2 registers)
acpi0: <GBT AWRDACPI> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, fcf0000 (3) failed
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x5008-0x500b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff,0x480-0x48f,
0x5000-0x5041 on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib0: no PRT entry for 0.0.INTA
agp0: <SiS 530 host to AGP bridge> on hostb0
atapci0: <SiS 530 UDMA66 controller> port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x4000-0x400f irq 14 at device
0.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
isab0: <PCI-ISA bridge> at device 1.0 on pci0
isa0: <ISA bus> on isab0
pci0: <unknown> at device 1.1 (no driver attached)
pci0: <serial bus, USB> at device 1.2 (no driver attached)
pcib1: <PCI-PCI bridge> at device 2.0 on pci0
pci1: <PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0xc000-0xc07f mem
0xe2000000-0xe27fffff,0xe2c00000-0xe2c0ffff at device 0.0 on pci1
skc0: <D-Link DGE-530T Gigabit Ethernet> port 0xd000-0xd0ff mem
0xe2d04000-0xe2d07fff irq 11 at device 9.0 on pci0
skc0: DGE-530T Gigabit Ethernet Adapter rev. (0x9)
sk0: <Marvell Semiconductor, Inc. Yukon> on skc0
sk0: Ethernet address: XX:XX:5b:XX:XX:XX
miibus0: <MII bus> on sk0
e1000phy0: <Marvell 88E1011 Gigabit PHY> PHY 0 on miibus0
e1000phy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
1000baseTX-FDX, auto
skc0: [ITHREAD]
skc1: <D-Link DGE-530T Gigabit Ethernet> port 0xd400-0xd4ff mem
0xe2d00000-0xe2d03fff irq 10 at device 11.0 on pci0
skc1: DGE-530T Gigabit Ethernet Adapter rev. (0x9)
sk1: <Marvell Semiconductor, Inc. Yukon> on skc1
sk1: Ethernet address: XX:19:XX:6a:2f:XX
miibus1: <MII bus> on sk1
e1000phy1: <Marvell 88E1011 Gigabit PHY> PHY 0 on miibus1
e1000phy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
1000baseTX-FDX, auto
skc1: [ITHREAD]
ral0: <Ralink Technology RT2560> mem 0xe2d08000-0xe2d09fff irq 12 at
device 13.0 on pci0
ral0: MAC/BBP RT2560 (rev 0x04), RF RT2525
ral0: Ethernet address: XX:12:XX:XX:XX:XX
ral0: [ITHREAD]
pci0: <multimedia, audio> at device 15.0 (no driver attached)
fdc0: <floppy drive controller> port 0x3f2-0x3f5,0x3f7 irq 6 drq 2 on
acpi0
fdc0: [FILTER]
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10
on acpi0
sio0: type 16550A, console
sio0: [FILTER]
sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
sio1: [FILTER]
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xc0000-0xc7fff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x100>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on
isa0
Timecounter "TSC" frequency 501139932 Hz quality 800
Timecounters tick every 1.000 msec
ad0: 29311MB <Maxtor 4W030H2 AAH41310> at ata0-master UDMA66
acd0: CDRW <R/RW 4x4x32/C1.7> at ata1-master PIO4
Trying to mount root from ufs:/dev/ad0s1a
Loading configuration files.
kernel dumps on /dev/ad0s1b
Entropy harvesting:
interrupts
ethernet
point_to_point
kickstart
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
This is easily repeatable w/ 2560 cards but not 2661; the problem appears
to be specific to the 2560-part of the ral driver.

Looks like at some point tx just wedges; typically on a ProbeResponse frame.
After this all tx stops including beacons.  I tried reverting the watchdog
timer changes w/o luck.
Responsible-Changed-From-To: freebsd-bugs->sam 
Responsible-Changed-By: sam 
Responsible-Changed-When: Sun Nov 4 19:08:37 UTC 2007 
Responsible-Changed-Why:  
I'll deal with this until someone else steps up 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117655 

From: "Frank W. Josellis" <frank@dynamical-systems.org>
To: bug-followup@FreeBSD.org, bazzoola@gmail.com
Cc:  
Subject: Re: kern/117655: [ral] ral%d: device timeout when running as an
 access point (regression)
Date: Sun, 3 Feb 2008 12:30:31 +0100 (CET)

 I had the same timeout problem, however, with a RT2561S based card. In my 
 case this could perfectly be fixed by replacing the ATX power supply unit. 
 You may think that sounds like magic, but it's not the only example I've 
 seen where an obstinate PCI device could be tamed by this means. Hence it 
 doesn't look like a driver bug to me. Unless you have a better explanation 
 you should take this aspect into account.
 
 Regards,
 Frank Josellis

From: bazzoola <bazzoola@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/117655: [ral] ral%d: device timeout when running as an access point (regression)
Date: Wed, 6 Feb 2008 20:52:36 -0500

 Frank W. Josellis mentioned that replacing the ATX power supply fixes  
 the problem.
 
 Actually I have investigated this before! I noticed that when I  
 unhooked all devices like CD-ROM, Floppy, modem, etc and only kept the  
 ral PCI card I got better results from the driver. It seems that the  
 card tries to suck up too much current from the power supply while in  
 transmission. As a result, the power supply fails causes the wireless  
 card to behave abnormally.
State-Changed-From-To: open->feedback 
State-Changed-By: sam 
State-Changed-When: Tue Dec 30 17:46:34 UTC 2008 
State-Changed-Why:  
I believe sephe committed fixes to HEAD to correct issues w/ setting 
too high tx power for 2560 cards; would be helpful to get updated 
info but to be honest 2560 cards are so old it's unlikely someone 
will put much effort into fixing this given how little information 
we have about the part 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117655 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Feb 24 22:58:48 UTC 2013 
State-Changed-Why:  
feedback timeout. 


Responsible-Changed-From-To: sam->sam 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Feb 24 22:58:48 UTC 2013 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=117655 
>Unformatted:
