Re: Panic when trying to mount cd9660 as udf

2003-11-23 Thread Mikko S. Hyvarinen
On Sun, Nov 23, 2003 at 03:02:34AM +0100, Christian Laursen wrote:
 By accident, I tried to mount a CD as UDF, and got the follwoing panic:
 
 Fatal trap 12: page fault while in kernel mode
 cpuid = 0; apic id = 00
 fault virtual address   = 0x0
 fault code  = supervisor read, page not present
 instruction pointer = 0x8:0xc06c2f6c
 stack pointer   = 0x10:0xcda4bac0
 frame pointer   = 0x10:0xcda4bacc
 code segment= base 0x0, limit 0xf, type 0x1b
 = DPL 0, pres 1, def32 1, gran 1
 processor eflags= interrupt enabled, resume, IOPL = 0
 current process = 530 (mount_udf)
 
 This seems to be easily reproducable. First I got it on my workstation
 running 5.2-BETA, and I then reproduced it on my test machine which runs
 -CURRENT from 4 days ago:
 
 FreeBSD cardassian.borderworlds.dk 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Wed Nov 19 
 04:22:32 CET 2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386
 
 The output in this mail is from the test machine.
 
 This is the backtrace I got from the resulting crashdump:
 
 #0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240
 #1  0xc066d6fb in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:372
 #2  0xc066dafd in panic () at /usr/src/sys/kern/kern_shutdown.c:550
 #3  0xc048ac32 in db_panic () at /usr/src/sys/ddb/db_command.c:450
 #4  0xc048ab92 in db_command (last_cmdp=0xc0938360, cmd_table=0xc08c3c00, 
 aux_cmd_tablep=0xc08baa04, aux_cmd_tablep_end=0xc08baa1c)
 at /usr/src/sys/ddb/db_command.c:346
 #5  0xc048acd5 in db_command_loop () at /usr/src/sys/ddb/db_command.c:472
 #6  0xc048dcd5 in db_trap (type=12, code=0) at /usr/src/sys/ddb/db_trap.c:73
 #7  0xc0812dcc in kdb_trap (type=12, code=0, regs=0xcda4ba80)
 at /usr/src/sys/i386/i386/db_interface.c:171
 #8  0xc08294d6 in trap_fatal (frame=0xcda4ba80, eva=0)
 at /usr/src/sys/i386/i386/trap.c:816
 #9  0xc0829182 in trap_pfault (frame=0xcda4ba80, usermode=0, eva=0)
 at /usr/src/sys/i386/i386/trap.c:735
 #10 0xc0828d23 in trap (frame=
   {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = -1040053552, tf_esi = 1, tf_ebp 
 = -844842292, tf_isp = -844842324, tf_ebx = 0, tf_edx = 4, tf_ecx = 1, tf_eax = 0, 
 tf_trapno = 12, tf_err = 0, tf_eip = -1066651796, tf_cs = 8, tf_eflags = 66182, 
 tf_esp = 6, tf_ss = 0}) at /usr/src/sys/i386/i386/trap.c:420
 #11 0xc0814818 in calltrap () at {standard input}:94
 #12 0xc06c3913 in vfs_mount_destroy (mp=0x0, td=0x0)
 at /usr/src/sys/kern/vfs_mount.c:537
 #13 0xc06c472f in vfs_domount (td=0xc20c7dc0, fstype=0xc2020ad0 udf, 
 fspath=0xc2020ab0 /mnt, fsflags=1, fsdata=0xc2020c00, compat=0)
 at /usr/src/sys/kern/vfs_mount.c:938
 #14 0xc06c3a39 in vfs_nmount (td=0x0, fsflags=0, fsoptions=0x0)
 at /usr/src/sys/kern/vfs_mount.c:581
 #15 0xc06c353d in nmount (td=0x0, uap=0xcda4bd10)
 at /usr/src/sys/kern/vfs_mount.c:407
 #16 0xc0829870 in syscall (frame=
   {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = -1077940702, tf_esi = 8, tf_ebp 
 = -1077940972, tf_isp = -844841612, tf_ebx = 5, tf_edx = -1077940736, tf_ecx = 10, 
 tf_eax = 378, tf_trapno = 12, tf_err = 2, tf_eip = 671876783, tf_cs = 31, tf_eflags 
 = 582, tf_esp = -1077942196, tf_ss = 47})
 at /usr/src/sys/i386/i386/trap.c:1010
 #17 0xc081486d in Xint0x80_syscall () at {standard input}:136

Hi,

I get a similar backtrace when trying to mount a genuine UDF filesystem (DVD-ROM)
as UDF - and it happens every time with all the DVD-ROMs I have. Seems to be the
same offender as in your case
This is -current from sources dated november 15th.

Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x0
fault code  = supervisor read, page not present
instruction pointer = 0x8:0xc05ab4bc
stack pointer   = 0x10:0xe8153a8c
frame pointer   = 0x10:0xe8153a98
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 843 (mount_udf)
trap number = 12
panic: page fault

#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240
#1  0xc05524f9 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:372
#2  0xc05528d8 in panic () at /usr/src/sys/kern/kern_shutdown.c:550
#3  0xc071c3d6 in trap_fatal (frame=0xe8153a4c, eva=0) at 
/usr/src/sys/i386/i386/trap.c:821
#4  0xc071c072 in trap_pfault (frame=0xe8153a4c, usermode=0, eva=0) at 
/usr/src/sys/i386/i386/trap.c:735
#5  0xc071bbcd in trap (frame=
  {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = -963579664, tf_esi = 1, tf_ebp = 
-401261928, tf_isp = -401261960, tf_ebx = 0, tf_edx = -963570612, tf_ecx = -960873344, 
tf_eax = 0, tf_trapno = 12, tf_err = 0, tf_eip = -1067797316, tf_cs = 8, tf_eflags = 
66194, tf_esp = 6, tf_ss = 0})
at /usr/src/sys/i386/i386/trap.c:420
#6  0xc070ce58 in calltrap () at {standard input}:94
#7  0xc05abe63 in vfs_mount_destroy 

Re: [PATCH] Asus A7N8X Deluxe, nForce2 and 3com MAC, Broadcom/Altima PHY

2003-01-25 Thread Mikko S. Hyvarinen
On Sat, Jan 18, 2003 at 02:46:38PM -0800, David O'Brien wrote:
 On Sat, Jan 18, 2003 at 06:46:40PM +0200, Mikko Hyvarinen wrote:
  Hi again,O
  
  I find it outright odd that the partial patch that didn't help much got
  committed quickly but the final fix that makes things work didn't.
  
  Is there something wrong with the patch or did it just slip through the
  cracks somewhere?
 
 I got busy last week.  I just happen to have a few free minutes when the
 1st patch came in, and I have a big interest in AMD platforms.  I've got
 too many things on my plate for today to probably get to the 2nd patch.
 Other committers, please don't think I feel ownership of this patch.

Thank you for the commit. Now the support for this board is on a good basic
level.

I suppose there is not much hope of getting support for the nVidia MAC
integrated to the MCP (southbridge) since even the Linux drivers are
binary-only with a thin glue layer, and no specs seem to be available
on nVidia website, not even in the developer sections.

Regards,
 MSH

-- 
All opinions expressed above are mine alone and do not express the views
of my employer or any other organizations that I am affiliated with.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asus A7N8X Deluxe, nForce2 chipset, 3com MAC, Broadcom/Altima PHY

2003-01-13 Thread Mikko S. Hyvarinen
On Sun, Jan 12, 2003 at 01:04:30PM -0800, David O'Brien wrote:
 On Sun, Jan 12, 2003 at 09:07:31PM +0200, Mikko S. Hyvarinen wrote:
  The on-board 3com MAC and Broadcom/Altima PHY are not being detected by the
  xl(4) driver in -current (cvsup done yesterday evening).
  In the Award BIOS there is only one setting for the 3com device, a supposed
  on/off switch with only values Disabled and Auto; I have used Auto.
 ...
  FWIW, the diff for the files mentioned is attached, in case someone wants
  to continue from here.
 
 Thanks!  I committed this patch so it didn't get lost and maybe someone
 else with one of these boards can take it all the way.

As usual, it had to be something simple. With the attached change on top
of the previous set the Altima AC101L PHY is detected correctly.
I'm not so sure whether that xl_choose_xcvr() modification is actually
necessary, but one can never be too sure.

Tested with 10baseT/UTP and it works normally.

Regards,
 MSH

-- 
All opinions expressed above are mine alone and do not express the views
of my employer or any other organizations that I am affiliated with.

Index: sys/pci/if_xl.c
===
RCS file: /data/cvs/freebsd/src/sys/pci/if_xl.c,v
retrieving revision 1.121
diff -u -r1.121 if_xl.c
--- sys/pci/if_xl.c 12 Jan 2003 21:03:38 -  1.121
+++ sys/pci/if_xl.c 13 Jan 2003 16:24:50 -
@@ -1245,6 +1245,7 @@
case TC_DEVICEID_HURRICANE_656: /* 3c656 */
case TC_DEVICEID_HURRICANE_656B:/* 3c656B */
case TC_DEVICEID_TORNADO_656C:  /* 3c656C */
+   case TC_DEVICEID_TORNADO_10_100BT_NVIDIA: /* nVidia nForce2 integrated */
sc-xl_media = XL_MEDIAOPT_MII;
sc-xl_xcvr = XL_XCVR_MII;
if (verbose)
@@ -1340,6 +1341,8 @@
pci_get_device(dev) == TC_DEVICEID_HURRICANE_656B)
sc-xl_flags |= XL_FLAG_INVERT_MII_PWR |
XL_FLAG_INVERT_LED_PWR;
+   if (pci_get_device(dev) == TC_DEVICEID_TORNADO_10_100BT_NVIDIA)
+   sc-xl_flags |= XL_FLAG_PHYOK;
 
/*
 * If this is a 3c905B, we have to check one extra thing.



Asus A7N8X Deluxe, nForce2 chipset, 3com MAC, Broadcom/Altima PHY

2003-01-12 Thread Mikko S. Hyvarinen
Hi,

I recently acquired one of these motherboards and suitable CPU + memory for it.
The on-board 3com MAC and Broadcom/Altima PHY are not being detected by the
xl(4) driver in -current (cvsup done yesterday evening).
In the Award BIOS there is only one setting for the 3com device, a supposed
on/off switch with only values Disabled and Auto; I have used Auto.

Output with stock drivers:
pcib2: ACPI PCI-PCI bridge at device 12.0 on pci0
pci2: ACPI PCI bus on pcib2
pci2: network, ethernet at device 1.0 (no driver attached)

pciconf -lv output:
none9@pci2:1:0: class=0x02 card=0x80ab1043 chip=0x920110b7 rev=0x40 hdr=0x00
vendor   = '3COM Corp, Networking Division'
class= network
subclass = ethernet

Output after adding the chip in question to if_xlreg.h and if_xl.c probe table:
pcib2: ACPI PCI-PCI bridge at device 12.0 on pci0
pci2: ACPI PCI bus on pcib2
xl1: 3Com 3c905C-TX on nVidia nForce2 chipset port 0xb000-0xb07f mem 
0xd300-0xd37f irq 11 at device 1.0 on pci2
xl1: Ethernet address: 00:26:54:07:e5:95
xl1: no PHY found!
device_probe_and_attach: xl1 attach returned 6

So far, so good. The on-board PHY is a Broadcom/Altime AC101L, which is
not listed in miidevs. I added it there and to acphy_probe() just
to see if it would work. I also added a printf() to acphy_probe() to
output the mii_id1 and mii_id2 values before checking for the supported
models so that I could see if the probe was even getting that far.
Probe doesn't get that far since the printf() is never executed;
I believe probe halts in mii_phy_probe() since acphy_probe() would be
called by bus_generic_attach() if a PHY was found on the miibus and
that in turn would show up in the kernel boot messages because of the
printf() I added.

FWIW, the diff for the files mentioned is attached, in case someone wants
to continue from here.

Specifications for the Altima PHY are available at:
   http://www.altimacom.com/products/ac101L.html
I could not find any specifications on nVidia site for the integration
of the 3com MAC into the nForce2 chipset; neither could I find any documents
on Asus site about the power control for the Broadcom/Altima MAC in case
it is somehow powered off by default.

Regards,
 MSH

-- 
All opinions expressed above are mine alone and do not express the views
of my employer or any other organizations that I am affiliated with.

Index: sys/dev/mii/miidevs
===
RCS file: /data/cvs/freebsd/src/sys/dev/mii/miidevs,v
retrieving revision 1.21
diff -u -r1.21 miidevs
--- sys/dev/mii/miidevs 8 Sep 2002 19:12:02 -   1.21
+++ sys/dev/mii/miidevs 4 Jan 2003 23:00:40 -
@@ -98,6 +98,7 @@
 
 /* Altima Communications PHYs */
 model xxALTIMA AC101   0x0021 AC101 10/100 media interface
+model xxALTIMA AC101L  0x0012 AC101L 10/100 media interface
 
 /* Advanced Micro Devices PHYs */
 model xxAMD 79C873 0x Am79C873 10/100 media interface
Index: sys/dev/mii/acphy.c
===
RCS file: /data/cvs/freebsd/src/sys/dev/mii/acphy.c,v
retrieving revision 1.10
diff -u -r1.10 acphy.c
--- sys/dev/mii/acphy.c 14 Oct 2002 22:31:52 -  1.10
+++ sys/dev/mii/acphy.c 12 Jan 2003 18:51:40 -
@@ -129,6 +129,9 @@
if (MII_OUI(ma-mii_id1, ma-mii_id2) == MII_OUI_xxALTIMA 
MII_MODEL(ma-mii_id2) == MII_MODEL_xxALTIMA_AC101) {
device_set_desc(dev, MII_STR_xxALTIMA_AC101);
+   } else if(MII_OUI(ma-mii_id1, ma-mii_id2) == MII_OUI_xxALTIMA 
+ MII_MODEL(ma-mii_id2) == MII_MODEL_xxALTIMA_AC101L) {
+   device_set_desc(dev, MII_STR_xxALTIMA_AC101L);
} else 
return (ENXIO);
 
Index: sys/pci/if_xl.c
===
RCS file: /data/cvs/freebsd/src/sys/pci/if_xl.c,v
retrieving revision 1.120
diff -u -r1.120 if_xl.c
--- sys/pci/if_xl.c 10 Jan 2003 08:09:58 -  1.120
+++ sys/pci/if_xl.c 12 Jan 2003 11:47:13 -
@@ -183,6 +183,8 @@
3Com 3c905B-COMBO Fast Etherlink XL },
{ TC_VENDORID, TC_DEVICEID_TORNADO_10_100BT,
3Com 3c905C-TX Fast Etherlink XL },
+   { TC_VENDORID, TC_DEVICEID_TORNADO_10_100BT_NVIDIA,
+   3Com 3c905C-TX on nVidia nForce2 chipset },
{ TC_VENDORID, TC_DEVICEID_HURRICANE_10_100BT_SERV,
3Com 3c980 Fast Etherlink XL },
{ TC_VENDORID, TC_DEVICEID_TORNADO_10_100BT_SERV,
Index: sys/pci/if_xlreg.h
===
RCS file: /data/cvs/freebsd/src/sys/pci/if_xlreg.h,v
retrieving revision 1.40
diff -u -r1.40 if_xlreg.h
--- sys/pci/if_xlreg.h  6 Jan 2003 00:46:03 -   1.40
+++ sys/pci/if_xlreg.h  8 Jan 2003 19:55:18 -
@@ -676,6 +676,7 @@
 #define TC_DEVICEID_CYCLONE_10_100_COMBO   0x9058
 #define TC_DEVICEID_CYCLONE_10_100FX   0x905A
 #define 

[PATCH] Asus A7N8X Deluxe, nForce2 chipset, integrated AC97 audio

2003-01-12 Thread Mikko S. Hyvarinen
Hi,

This one was easier than getting the on-board LAN to work.
Judging from the Asus online product specifications the same audio hardware
seems to be present also on the non-Deluxe version; the other unknown PCI
device id in audio class seems not to work with the AC97 drivers so I assume
that it is the much-touted APU.

With this patch the on-board AC97 audio controller and Realtek Semiconductor
ALC650 CODEC work as far as I can test; tested with headphones in line-out
and playing two albums of MP3 audio with mpg123.

dmesg extracts, boot -v:
pcm0: Nvidia nForce2 AC97 controller port 0xd400-0xd47f,0xd000-0xd0ff mem 
0xc908-0xc9080fff irq 11 at device 6.0 on pci0
pcm0: ac97 codec id 0x414c4720 (Realtek Semiconductor ALC650)
pcm0: ac97 codec features 20 bit DAC, 18 bit ADC, 5 bit master volume, Realtek 3D 
Stereo Enhancement
pcm0: ac97 primary codec extended features variable rate PCM, double rate PCM, 
reserved 1, center DAC, surround DAC, LFE DAC, reserved 4
pcm0: sndbuf_setmap 7b5000, 4000; 0xe0b97000 - 7b5000
pcm0: sndbuf_setmap 7b9000, 4000; 0xe0b9b000 - 7b9000
...
pcm0: measured ac97 link rate at 47999 Hz, will use 48000 Hz

The only noticeable error I heard while playing the MP3s was a slight
but audible pop after mpg123 starts playing; this might be something in
the mixer control code. Anyway, it's just cosmetic, didn't bother me
with headphones at normal playing volume.

Regards,
 MSH

-- 
All opinions expressed above are mine alone and do not express the views
of my employer or any other organizations that I am affiliated with.

Index: sys/dev/sound/pcm/ac97.c
===
RCS file: /data/cvs/freebsd/src/sys/dev/sound/pcm/ac97.c,v
retrieving revision 1.28
diff -u -r1.28 ac97.c
--- sys/dev/sound/pcm/ac97.c26 Nov 2002 18:16:26 -  1.28
+++ sys/dev/sound/pcm/ac97.c12 Jan 2003 23:43:23 -
@@ -89,6 +89,7 @@
{ 0x414b4d01, 1, Asahi Kasei AK4542 },
{ 0x414b4d02, 1, Asahi Kasei AK4543 },
{ 0x414c4710, 0, Avance Logic ALC200/200P },
+   { 0x414c4720, 0, Realtek Semiconductor ALC650 },
{ 0x43525900, 0, Cirrus Logic CS4297 },
{ 0x43525903, 0, Cirrus Logic CS4297 },
{ 0x43525913, 0, Cirrus Logic CS4297A },
Index: sys/dev/sound/pci/ich.c
===
RCS file: /data/cvs/freebsd/src/sys/dev/sound/pci/ich.c,v
retrieving revision 1.24
diff -u -r1.24 ich.c
--- sys/dev/sound/pci/ich.c 19 Aug 2002 16:03:56 -  1.24
+++ sys/dev/sound/pci/ich.c 12 Jan 2003 23:43:04 -
@@ -628,6 +628,10 @@
device_set_desc(dev, Nvidia nForce AC97 controller);
return 0;
 
+   case 0x006a10de:
+   device_set_desc(dev, Nvidia nForce2 AC97 controller);
+   return 0;
+
default:
return ENXIO;
}