From nobody@FreeBSD.org  Sat Dec 16 03:57:03 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 5087B16A47E
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Dec 2006 03:57:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3804943CBF
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Dec 2006 03:55:06 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id kBG3uplF024038
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Dec 2006 03:56:51 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id kBG3upE3024037;
	Sat, 16 Dec 2006 03:56:51 GMT
	(envelope-from nobody)
Message-Id: <200612160356.kBG3upE3024037@www.freebsd.org>
Date: Sat, 16 Dec 2006 03:56:51 GMT
From: "V. Hari"<thisemailaddress@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Kernel panic when configuring rl(4) device
X-Send-Pr-Version: www-3.0

>Number:         106801
>Category:       kern
>Synopsis:       [rl] Kernel panic when configuring rl(4) device (regression)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 16 04:00:17 GMT 2006
>Closed-Date:    Mon Dec 18 01:42:11 GMT 2006
>Last-Modified:  Mon Dec 18 01:50:12 GMT 2006
>Originator:     V. Hari
>Release:        -CURRENT
>Organization:
N/A
>Environment:
FreeBSD razor.lan.tun0.net 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Wed Dec 13 21:11:15 CST 2006     root@razor.lan.tun0.net:/usr/obj/usr/src/sys/RAZOR  sparc64
>Description:
Using ifconfig or dhclient to configure the rl device on FreeBSD 7.0 current
sparc64 causes the following kernel panic. 

The system had no problems with the FreeBSD 6.1 release. So, the hardware
is stable. Additionally, there are no problems using other network devices
such as ath and gem (both of which are also present). 

I reproduced this problem with the default GENERIC kernel as well as my
custom kernel (which is just a GENERIC + pf* + ALTQ).

I'm not sure if the following debug  information is useful; however, here it is:

# dhclient rl0
panic: trap: memory address not aligned
cpuid = 0
KDB: enter: panic
[thread pid 1322 tid 100077]
Stopped at      kdb_enter+0x68: ta          %xcc,1
db> x
kdb_enter+0x68: 91d03001
db> trace
-- memory address not aligned at sfar=0xfffff800008c5b23 sfsr=0x40029 %o7=0x03f1a3c --
rl_init_locked() at rl_init_locked+0xc0
rl_ioctl() at rl_ioctl+0xb8
ifhwioctl() + ifhwioctl+0x4c0
ifioctl() + ifioctl+0x15c
soo_ioctl() at soo_ioctl+0x3b0
kern_ioctl() at kern_ioctl+0x41c
ioctl() at ioctl+0x18c
syscall() at syscall+0x2f0
-- syscall (54, FreeBSD ELF64, ioctl) %o7=0x03f1a3c --
userland at 0x405584e8
pc 0x405584e8, sp 0x7fdffffdac1
pc 0x103578, sp 0x7fdffffdb81
pc 0x101c58, sp 0x7fdffffe451
pc 0x4021dcb4, sp 0x7fdffffe511
done
db> show registers
g0          0xe008cbb0
g1          0xc066ce90  buf.1
g2          0xc066cc00  pmc_sx+0x28
g3          0xfffff8000040ff8
g4                 0xa
g5              0x16d8  fpu_fault_size+0x1524
g6          0xe008d980
g7          0xc07316f8  pcpu0+0x1a98
i0                0x12
i1          0xc05c2550
i2          0xe008cae0
i3                 0xa
i4          0xe008cbb0
i5                0x20
i6          0xe008c261
i7          0xc028d560  kdb_enter+0x60
tnpc        0xc028d56c  kdb_enter+0x6c
tstate      0xc028d568  kdb_enter+0x68
kdb_enter+0x68: ta              %xcc, 1
db> show buffer 0xc066ce90
buf at 0xc066ce90
b_flags = 0x0
b_error = 0, b_bufsize = 0, b_bcount = 7885647337108890724, b_resid = 0
b_bufobj = (0x747261703a206d65), bdata = 0x20616c69676e6564, b_blkno = 0
db> reboot

If I can be of any assistance let me know. However, for the sake of utilizing the RealTek cards, I may switch back to 6.1 in a few days.
>How-To-Repeat:
Attempt to configure the NIC -- ifconfig or dhclient.
>Fix:
N/A
>Release-Note:
>Audit-Trail:

From: "Vivek Hari" <potatocube@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/106801: [rl] Kernel panic when configuring rl(4) device (regression)
Date: Sun, 17 Dec 2006 02:44:18 -0600

 ------=_Part_0_8347600.1166345058554
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 Pyun YongHyeon <pyunyh@gmail.com> sent me the attached patch which
 resolved the bug.
 
 ------=_Part_0_8347600.1166345058554
 Content-Type: text/x-patch; name="if_rl.diff"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename="if_rl.diff"
 X-Attachment-Id: f_evt7t7zm
 
 LS0tIGlmX3JsLmMub3JpZwlNb24gRGVjICA0IDEzOjI0OjE1IDIwMDYKKysrIGlmX3JsLmMJU2F0
 IERlYyAxNiAxNToxOTowOCAyMDA2CkBAIC0xNDk1LDYgKzE0OTUsNyBAQAogCXN0cnVjdCBpZm5l
 dAkJKmlmcCA9IHNjLT5ybF9pZnA7CiAJc3RydWN0IG1paV9kYXRhCQkqbWlpOwogCXVpbnQzMl90
 CQlyeGNmZyA9IDA7CisJdWludDMyX3QJCWVhZGRyWzJdOwogCiAJUkxfTE9DS19BU1NFUlQoc2Mp
 OwogCkBAIC0xNTExLDEwICsxNTEyLDEwIEBACiAJICogcmVnaXN0ZXIgd3JpdGUgZW5hYmxlIiBt
 b2RlIHRvIG1vZGlmeSB0aGUgSUQgcmVnaXN0ZXJzLgogCSAqLwogCUNTUl9XUklURV8xKHNjLCBS
 TF9FRUNNRCwgUkxfRUVNT0RFX1dSSVRFQ0ZHKTsKLQlDU1JfV1JJVEVfU1RSRUFNXzQoc2MsIFJM
 X0lEUjAsCi0JICAgICoodWludDMyX3QgKikoJklGX0xMQUREUihzYy0+cmxfaWZwKVswXSkpOwot
 CUNTUl9XUklURV9TVFJFQU1fNChzYywgUkxfSURSNCwKLQkgICAgKih1aW50MzJfdCAqKSgmSUZf
 TExBRERSKHNjLT5ybF9pZnApWzRdKSk7CisJYnplcm8oZWFkZHIsIHNpemVvZihlYWRkcikpOwor
 CWJjb3B5KElGX0xMQUREUihzYy0+cmxfaWZwKSwgZWFkZHIsIEVUSEVSX0FERFJfTEVOKTsKKwlD
 U1JfV1JJVEVfU1RSRUFNXzQoc2MsIFJMX0lEUjAsIGVhZGRyWzBdKTsKKwlDU1JfV1JJVEVfU1RS
 RUFNXzQoc2MsIFJMX0lEUjQsIGVhZGRyWzFdKTsKIAlDU1JfV1JJVEVfMShzYywgUkxfRUVDTUQs
 IFJMX0VFTU9ERV9PRkYpOwogCiAJLyogSW5pdCB0aGUgUlggYnVmZmVyIHBvaW50ZXIgcmVnaXN0
 ZXIuICovCgo=
 ------=_Part_0_8347600.1166345058554--
State-Changed-From-To: open->closed 
State-Changed-By: yongari 
State-Changed-When: Mon Dec 18 01:40:20 UTC 2006 
State-Changed-Why:  
Patch committed. Will MFC after 3 days. 
Thanks for reporting. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/106801: commit references a PR
Date: Mon, 18 Dec 2006 01:38:19 +0000 (UTC)

 yongari     2006-12-18 01:38:10 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/pci              if_rl.c 
   Log:
   Don't assume IF_LLADDR returns aligned memory address.
   Because accessing ID registers in rtl81x9 needs 32bit register access
   and RL_IDR4/RL_IDR5 registers are reservered registers bzero() is
   needed before copying ethernet address.
   This fixes unaligned memory accesses panic in sparc64.
   
   PR:     kern/106801
   MFC after:      3 days
   
   Revision  Changes    Path
   1.166     +5 -4      src/sys/pci/if_rl.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
