Date: Thu, 2 Dec 1999 17:12:25 +0900 (JST) From: sanpei@sanpei.org (MIHIRA Yoshiro) To: imp@village.org Cc: msmith@FreeBSD.ORG, mobile@FreeBSD.ORG, sanpei@sanpei.org Subject: Re: cvs commit: src/sys/pccard pccard.c src/sys/isa sio.c src/sys/dev/ed if_ed_pccard.c src/sys/dev/ep if_ep_pccard.c Message-ID: <199912020812.RAA00580@lavender.sanpei.org> In-Reply-To: Your message of "Thu, 2 Dec 1999 14:55:06 JST". <199912020555.WAA00484@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
imp@village.org wrote: >> BTW, I just committed MIHIRA-san's port of the PAO power code, since >> it looks like it would be good for testing purposes. Thanks for commiting my code, but I only ported PAO power code to -current. I don't know whather it solve our problem.... ----- By the way, I think pccard-beep code has problem. We can't stop beep via ``pccardc beep 0'', always BEEP ON. I created below patch. I change default beep state was OFF, and set ON/OFF by /etc/rc.pccard with ${pccard_beep} variable. MIHIRA Yoshiro Yokohama, Japan --- etc/defaults/rc.conf.org Sat Oct 9 23:24:34 1999 +++ etc/defaults/rc.conf Sat Oct 9 23:26:08 1999 @@ -21,6 +21,7 @@ apmd_flags="" # Flags to apmd (if enabled). pccard_enable="NO" # Set to YES if you want to configure PCCARD devices. pccard_mem="DEFAULT" # If pccard_enable=YES, this is card memory address. +pccard_beep="1" # pccard beep type. pccard_ifconfig="NO" # Specialized pccard ethernet configuration (or NO). pccardd_flags="" # Additional flags for pccardd. pccard_conf="/etc/pccard.conf.sample" # pccardd(8) config file --- etc/rc.pccard.org Sat Oct 9 23:26:22 1999 +++ etc/rc.pccard Sat Oct 9 23:30:18 1999 @@ -13,9 +13,14 @@ ;; esac + if [ -n "${pccard_beep}" ] ; then + pccardc beep ${pccard_beep} + fi + if [ -n "${pccard_conf}" ]; then pccardd_flags="${pccardd_flags} -f ${pccard_conf}" fi + echo -n "Enable PC-card." pccardd ${pccardd_flags} 2>&1 > /var/log/pccardd.debug --- sys/pccard/driver.h.org Wed Oct 6 22:57:12 1999 +++ sys/pccard/driver.h Wed Oct 6 23:14:24 1999 @@ -19,7 +19,7 @@ void pccard_remove_driver __P((struct pccard_device *)); int pcic_probe __P((void)); /* XXX should be linker set */ -enum beepstate { BEEP_ON, BEEP_OFF }; +enum beepstate { BEEP_OFF, BEEP_ON }; void pccard_insert_beep __P((void)); void pccard_remove_beep __P((void)); --- sys/pccard/pccard.c.org Wed Oct 6 22:58:38 1999 +++ sys/pccard/pccard.c Wed Oct 6 23:14:24 1999 @@ -966,9 +966,6 @@ int s, err; int pwval; - /* beep is disabled until the 1st call of crdioctl() */ - pccard_beep_select(BEEP_ON); - if (slt == 0 && cmd != PIOCRWMEM) return(ENXIO); switch(cmd) { --- sys/pccard/pccard_beep.c.org Wed Oct 6 22:57:57 1999 +++ sys/pccard/pccard_beep.c Thu Oct 7 19:15:23 1999 @@ -33,14 +33,14 @@ /* Should never be needed */ untimeout(enable_beep, (void *)NULL, beeptimeout_ch); - allow_beep = 1; + allow_beep = BEEP_ON; } void pccard_insert_beep(void) { if (allow_beep == BEEP_ON) { sysbeep(PCCARD_BEEP_PITCH0, PCCARD_BEEP_DURATION0); - allow_beep = 0; + allow_beep = BEEP_OFF; beeptimeout_ch = timeout(enable_beep, (void *)NULL, hz / 5); } } @@ -49,19 +49,23 @@ { if (allow_beep == BEEP_ON) { sysbeep(PCCARD_BEEP_PITCH0, PCCARD_BEEP_DURATION0); - allow_beep = 0; + allow_beep = BEEP_OFF; beeptimeout_ch = timeout(enable_beep, (void *)NULL, hz / 5); } } void pccard_success_beep(void) { - sysbeep(PCCARD_BEEP_PITCH1, PCCARD_BEEP_DURATION1); + if (allow_beep == BEEP_ON) { + sysbeep(PCCARD_BEEP_PITCH1, PCCARD_BEEP_DURATION1); + } } void pccard_failure_beep(void) { - sysbeep(PCCARD_BEEP_PITCH2, PCCARD_BEEP_DURATION2); + if (allow_beep == BEEP_ON) { + sysbeep(PCCARD_BEEP_PITCH2, PCCARD_BEEP_DURATION2); + } } int pccard_beep_select(enum beepstate state) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912020812.RAA00580>