Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Mon Nov 20, 2017 1:21 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 32 posts ]  Go to page 1 2 3 Next
Author Message
PostPosted: Fri Oct 05, 2007 1:12 pm 
Offline
Newbie

Joined: Wed Apr 19, 2006 6:48 am
Posts: 54
Since I flashed u-boot and upgraded to kernel 2.6 with debian lenny, avr_evtd does no longer recognize button presses properly.

Regardsless if I keep the power button pressed for more than 3 secs or if I just press it for a moment, the result is always the same:
- the LS is no longer accessible via network
- it does not reboot (I have to pull the plug to get it restarted)
- no logs regarding a shutdown action show up in syslog
- even with DEBUG=ON, /var/log/avr_evtd.log is not even created

What works flawlessly is the sending of the keep alive signal to the watchdog. If I stop avr_evtd, then the box gets rebooted after about 5 minutes and it runs completely stable as long as avr_evtd is running.

I´d love to get the button monitoring back! Any ideas on this?


Top
   
PostPosted: Wed Oct 10, 2007 10:01 am 
Offline
Site Admin
User avatar

Joined: Tue Jul 12, 2005 11:26 am
Posts: 3701
Location: JAPAN
This seems to be common now with kernel updates. Can you please post your dmesg output. Sounds like it is talking to the AVR as the keep alives are working. Sounds odd that the power button does not work? Did you upgrade the avr_evtd at the same time?

_________________
LS used as PVR and streaming source


Top
   
PostPosted: Wed Oct 10, 2007 12:56 pm 
Offline
Newbie

Joined: Wed Apr 19, 2006 6:48 am
Posts: 54
Ok, sure! I didn´t make any changes to avr_evtd. I use the most recent version as I already did before the kernel upgrade.

No matter if I press the power button or the reset button: After the first press, the box is no longer pingable. But there is still HDD access. After pulling the plug (waited for more than 10 minutes) and waiting for the reboot, there is no log entry after the moment when I did the button push.

Do you consider it to be worth a try, if I´d compile the daemon myself on the LS2? I saw from other posts, that people think it has something to do with the newer glibc version that comes with Debian Lenny.

Here is the complete dmesg output:
_________________________________________________________________________________________________________
Linux version 2.6.22.ls2 (mihai@meme.inline.com) (gcc version 4.0.0 (DENX ELDK 4.0 4.0.0)) #1 Thu Aug 16 23:30:01 BST 2007
CPU revision is: 0001800a
Determined physical RAM map:
memory: 04000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
On node 0 totalpages: 16384
Normal zone: 128 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 16256 pages, LIFO batch:3
Built 1 zonelists. Total pages: 16256
Kernel command line: root=/dev/hda1 console=ttyS0,57600
Primary instruction cache 8kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 8kB, 4-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
Initializing IRQ's: 168 out of 168
PID hash table entries: 256 (order: 8, 1024 bytes)
Rx5C348: driver initialized
calculating r4koff... 000c34c6(799942)
CPU frequency 399.97 MHz
Using 199.986 MHz high precision timer.
start_kernel(): bug: interrupts were enabled early
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 60384k/65536k available (2774k kernel code, 5096k reserved, 445k data, 160k init, 0k highmem)
Calibrating delay loop... 398.33 BogoMIPS (lpj=796672)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: Initializing PCI
registering PCI controller with io_map_base unset
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0xb8058000 (irq = 104) is a 16550A
RAMDISK driver initialized: 2 RAM disks of 8192K size 1024 blocksize
loop: module loaded
rc32434 Ethernet driver. (mar2904)
eth0: Rx IRQ 40, Tx IRQ 41, 00:0d:0b:74:4a:01
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
IT8212: IDE controller at PCI slot 0000:00:02.0
IT8212: chipset revision 19
it821x: controller in pass through mode.
IT8212: 100% native mode on irq 146
ide0: BM-DMA at 0x18800000-0x18800007, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0x18800008-0x1880000f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: WDC WD2500BB-22GUC0, ATA DISK drive
hda: selected mode 0x45
ide0 at 0x18800010-0x18800017,0x18800022 on irq 146
Probing IDE interface ide1...
hda: max request size: 512KiB
hda: 488397168 sectors (250059 MB) w/2048KiB Cache, CHS=30401/255/63, UDMA(100)
hda: cache flushes supported
hda: hda1 hda2 hda3 hda4 < hda5 >
LinkStation v2 flash device: 400000 at 1fc00000
LinkStation v2 Flash: Found 1 x16 devices at 0x0 in 8-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Creating 4 MTD partitions on "LinkStation v2 Flash":
0x00000000-0x00040000 : "mtd0: bootloader"
0x00040000-0x00390000 : "mtd1: kernel+ramdisk"
0x003c0000-0x00400000 : "mtd2: configuration"
0x00000000-0x00400000 : "mtd3: all flash"
LinkStation v2 flash device initialized
ehci_hcd 0000:00:04.2: EHCI Host Controller
ehci_hcd 0000:00:04.2: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:04.2: irq 148, io mem 0x50022000
ehci_hcd 0000:00:04.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 5 ports detected
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
ohci_hcd 0000:00:04.0: OHCI Host Controller
ohci_hcd 0000:00:04.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:04.0: irq 148, io mem 0x50020000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
ohci_hcd 0000:00:04.1: OHCI Host Controller
ohci_hcd 0000:00:04.1: new USB bus registered, assigned bus number 3
ohci_hcd 0000:00:04.1: irq 148, io mem 0x50021000
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 5
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: hda1: orphan cleanup on readonly fs
ext3_orphan_cleanup: deleting unreferenced inode 33510
EXT3-fs: hda1: 1 orphan inode deleted
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 160k freed
Warning: unable to open an initial console.
Algorithmics/MIPS FPU Emulator v1.5
Adding 265064k swap on /dev/hda2. Priority:-1 extents:1 across:265064k
EXT3 FS on hda1, internal journal
kjournald starting. Commit interval 5 seconds
EXT3-fs warning: mounting fs with errors, running e2fsck is recommended
EXT3 FS on hda3, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3-fs warning: mounting fs with errors, running e2fsck is recommended
EXT3 FS on hda5, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
Mobile IPv6
eth0: no IPv6 routers present
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period


Top
   
PostPosted: Thu Oct 11, 2007 5:00 pm 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
I got the same using 2.6 and u-boot, when I switch to 2.4 it works fine - have tried:

original Freelink avr_evtd 1.61
latest avr_evtd 1.72 (avr_evtd -v showed 1.62?)
beta avr_evtd (avr_evtd -v showed 1.5??)

On Etch


Top
   
PostPosted: Thu Oct 18, 2007 11:52 pm 
Offline
Newbie

Joined: Wed Apr 19, 2006 6:48 am
Posts: 54
Bad news!

Sames problems happen if I compile 1.7.2 from the scratch on a LS2 with Debian Lenny and most recent gcc and libc.

I´d kindly try to support in debugging if anybody gives me further instructions or provides a debugging executable.


:( I think of foonas-em being available shortly for LS2 and me not being able to use it because there is no way to go to em-mode with kernel 2.6 currently...


Top
   
PostPosted: Fri Oct 19, 2007 1:48 am 
Offline
Developer

Joined: Sat Aug 19, 2006 4:53 pm
Posts: 187
Location: United Kingdom (Great Britain)
I didn't test avr_evtd but, with the original Buffalo daemon, when the power button is pressed and held, the LS2 appears to go into run level 0. Unfortunately the shutdown string doesn't appear to be sent to the microcontroller. If you leave the LS2 alone for the famous 5 min, the watchdog will time out and the microcontroller will reboot it. This is strange because issuing the shutdown command "shutdown -h now" does shutdown the LS2 correctly. The reboot command "shutdown -r now" also works correctly.


Top
   
PostPosted: Mon Oct 22, 2007 2:23 am 
Offline
Site Admin
User avatar

Joined: Tue Jul 12, 2005 11:26 am
Posts: 3701
Location: JAPAN
looks like the shutdown message is not being executed within the kernel. By pressing the power button a shutdown -h now is executed so this looks very odd. Has the new kernel got the microcontroller shutdown routine added to the halt/power off point in the kernel?

_________________
LS used as PVR and streaming source


Top
   
PostPosted: Wed Oct 24, 2007 7:17 pm 
Offline
Newbie

Joined: Wed Apr 19, 2006 6:48 am
Posts: 54
Personally, I don´t think that the problem is related to some shutdown or poweroff code.
As LNI states "shutdown -h now" works perfectly well with kernel 2.6.

More interesting: Even if I do a short single press of the power button that should fire the EventScript, the LS2 is inaccessible afterwards. This button press should *not* issue any shutdown activities (I use the default configuration).

So I see two potential sources for the error
- the button handling code in avr_evtd
- the button handling code in the kernel

Since I do not see any single log message in syslog from the moment I press the button and I don´t get a kernel dump file, my guess is that it is something very central in the kernel.

I someone would suggest me to do any further tests, I´d by happy to assist in resolving this!


Top
   
PostPosted: Thu Oct 25, 2007 2:07 am 
Offline
Developer

Joined: Sat Aug 19, 2006 4:53 pm
Posts: 187
Location: United Kingdom (Great Britain)
weini wrote:
the button handling code in the kernel
Avr_evtd communicates with the microcontroller using the serial port /dev/ttyS0. The microcontroller sends a one-character code to the serial port for each event: power button pressed, power button released, reset button pressed, etc. The serial driver is fine as it works perfectly when the serial port is used as the system console and the port is programmed correctly, otherwise the watchdog wouldn't be reset. Moreover, the U-Boot minimal console works fine which means that the codes sent by the microcontroller are the same as those used by the PPC LinkStation.

I haven't looked at the avr_evtd code in a very long time but the solution is to modify it (if the functionality doesn't exist already) to log the codes received from the microcontroller and the actions it takes in response to these codes.


Top
   
PostPosted: Fri Oct 26, 2007 6:45 am 
Offline
Newbie

Joined: Wed Apr 19, 2006 6:48 am
Posts: 54
Here the result from some additional tests I made:

If I stop the avr_evtd daemon, then a button press does no longer kill the box.
So I´ll try to build a modified version of avr_evtd to scan the device codes and provide more logging output.


Top
   
PostPosted: Thu Nov 08, 2007 10:08 pm 
Offline
Newbie

Joined: Wed Apr 19, 2006 6:48 am
Posts: 54
After a few more tests I´m quite certain to blame it on the kernel (sorry :oops: ).

If I shutdown avr_evtd I can press the power button without killing the box.
But if I connect with minicom to /dev/ttyS0 and do the same, the the box is dead immediately again.

So as soon as the watchdog microcontroller sends data via /dev/ttyS0 and there is a receiver, the box hangs.
I´ve heard that kernel 2.6.23 has some changes in the serial driver code (hopefully I do not mix up things here). So maybe this would be a potential cure?


Top
   
PostPosted: Sun Nov 25, 2007 5:01 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 10:54 pm
Posts: 240
Location: UK
Started integrating avr_evtd into foonas-em for ls2 this weekend an I'm experiencing similar issues, IE when I press the button for the reboot/shutdown functionality the box becomes uncontactable, however as suggested here it eventually times out.

Also in foonas-em since sysvinit shutdown is not there (its purely busybox based) halt isn't doing the job, ive hacked in a nasty little script that turns various things off then kills init which works, although if I try and call this from the EventScript (IE modifying the script to use halt for shutdown and then holding down the power button for shutdown) it does not work either.

_________________
Help the foonas fundraiser!

Click here for more information and donations


Top
   
PostPosted: Fri Dec 14, 2007 1:26 pm 
Offline
Newbie

Joined: Thu Dec 13, 2007 2:31 pm
Posts: 21
Hi,

I met the same problem here that any press of the botton will cause a freeze of the system under LNI's kernel2.6.22. Does anyone has a cure to this?

Thanks!


Top
   
PostPosted: Sun Dec 16, 2007 5:47 am 
Offline
Newbie

Joined: Thu Dec 13, 2007 2:31 pm
Posts: 21
This issue has been solved by reconfig and recompile the kernel. Now all the buttons are working as it should be:-) I can upload my kernel if anybody need it.


Top
   
PostPosted: Sun Dec 16, 2007 7:50 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 10:54 pm
Posts: 240
Location: UK
Exactly what did you change to make it work? Thanks

_________________
Help the foonas fundraiser!

Click here for more information and donations


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 32 posts ]  Go to page 1 2 3 Next

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited