Re: Someone broke USB

2019-07-08 Thread Takanori Watanabe
On Mon, Jul 08, 2019 at 10:54:24PM +0200, Hans Petter Selasky wrote:
> On 2019-07-08 22:08, Steve Kargl wrote:
> > On Mon, Jul 08, 2019 at 09:08:17PM +0200, Hans Petter Selasky wrote:
> >> Hi Steve,
> >>
> >> Can you revert all prior patches and try this one instead.
> >>
> > 
> > With the new patch, none of the USB devices are found.
> > I'll be away from the laptop for a few hours.
> > 
> 
> I've put the USB ACPI code into an own module, which is not enabled by 
> default. So USB should be back to normal for now.
> 
> https://svnweb.freebsd.org/changeset/base/349851

The tunable(kernel environment variable)
debug.acpi.disabled="usb" will disable the usb
acpi module probe.




___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: CURRENT >r349150: boot failure in rc.conf.local

2019-06-18 Thread Takanori Watanabe
On Tue, Jun 18, 2019 at 11:49:58AM -0700, Conrad Meyer wrote:
> Hi everyone,
> 
> Please find a proposed fix in https://reviews.freebsd.org/D20686 .
> 
> I didn't notice this thread because I'm already subscribed to current
> and CC's don't display any differently in my mail reader.  (I don't
> read every thread on current.)
> 

I confirmed the fix has been committed and now works again, thanks!
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: CURRENT >r349150: boot failure in rc.conf.local

2019-06-18 Thread Takanori Watanabe
On Tue, Jun 18, 2019 at 09:03:17AM -0400, Jung-uk Kim wrote:
> On 19. 6. 18., O. Hartmann wrote:
> > On all CURRENT boxes running CURRENT > r349150 we face the very same boot
> > failure, if /etc/rc.conf.local is present (i.e. on CURRENT, 13.0-CURRENT #7
> > r349169: Tue Jun 18 10:34:13 CEST 2019 amd64):
> > 
> > The box boots and thentries to start services denominated
> > in /etc/rc.conf.local, like net/openldap-server (slapd). The box is then 
> > stuck
> > at "startingt slapd", hitting Ctrl-T shows state "running", but Ctrl-C does 
> > not
> > show any effect, except Ctrl-Alt-Del (if enabled) is effectively rebooting 
> > the
> > box. First I thought it might by a out-of-sync binary, but this phenomenon
> > spreads even over recently via make installed systems. Disabling OpenLDAP's
> > slapd at boot time gives my like rolling a dice the next service, named
> > (dns/bind914) or net/samba48 (samba_server) - you name it. The box gets 
> > stuck
> > forever and doesn't even start sshd to provide access. All boxes have IPv6
> > enabled as well as IPFW.
> > 
> > Another server running CURRENT (r349169, also amd64) without
> > utilizing /etc/rc.conf.local but with a bunch of jails is booting as usual!
> > 
> > What happened here? Does anyone do have a hint or might know the cause?
> 
> I had the same problem and reverting r349154 fixed the problem for me.
> 
> https://svnweb.freebsd.org/changeset/base/349154
> 
> FYI...
> 
> Jung-uk Kim

In my machine, some executable, such as chromium, perl will hang like you.
It is also fixed by reverting r349154. Thanks.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: FreeBSD12-RC2 and bluetooth?

2016-09-15 Thread Takanori Watanabe
On Thu, Sep 15, 2016 at 07:20:39PM -0700, Steven G. Kargl wrote:
> On Thu, Sep 15, 2016 at 06:20:06PM -0700, Adrian Chadd wrote:
> > hi,
> > 
> > bluetooth uses netgraph.
> > 
> 
> Yeah, I figured that much out.  I do not
> need bluetooth nor netgraph.  How does
> one explicitly disable this (other than
> through the BIOS)?
> 
devd(8) automatically load them.
Remove /etc/devd/usb.conf . 
(I really hate the behavior .:-P)
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Event based scheduling and USB.

2010-10-26 Thread Takanori Watanabe
I updated my FreeBSD tree on laptop, to the current
as of 18 Oct.2010, it works fine with CPU C3 state enabled,

I think this is your achievement of event time scheduler,
thanks!

But when USB driver is enabled, the load average is considerablly 
high (0.6 to 1.0) if sysctl oid kern.eventtimer.periodic is set to 0.
 Then kern.eventtimer.periodic is set to 1, the load average goes
to 0 quickly as before, but almost never transit to C3.

Is this behavior expected, or something wrong?
I noticed one of usb host controller device shares HPET irq.
When I implement interrupt filter in uhci driver, the load average
goes to 0 as before.



% vmstat -i
interrupt  total   rate
irq1: atkbd0 398  2
irq9: acpi0  408  2
irq12: psm03  0
irq19: ehci1  37  0
irq20: hpet0 uhci0 35970230
irq22: ehci0   2  0
irq256: em04  0
irq257: ahci0   1692 10
Total  38514246
===


BTW, when USB port is enabled C3 transition rate gets lower.
I think it is likely to occur. But how can I supress power 
consumption? 

It's time to implement powertop for freebsd, isn't it?
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


UFS related panic at night.

2010-09-28 Thread Takanori Watanabe
I happend to encountered panic related to UFS.
It is occured by find(1) from daily script by 
NULL pointing sx(9) lock from UFS dirhash.


Mounted filesystem is like this.

%mount 
/dev/ada0s2a on / (ufs, local, soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/ada0s2e on /usr (ufs, NFS exported, local, soft-updates)
/dev/ada0s2d on /var (ufs, local, soft-updates)
procfs on /proc (procfs, local)

And stack backtrace is at
http://www.init-main.com/DVC00052.JPG
(screen shot.)

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Driver tpm(4) and third party packages for trusted platform modules

2010-08-12 Thread Takanori Watanabe
In message 20100811203042.ga26...@modermoor.genua.de, Hans-Joerg Hoexer wrote:
Hi,

On Wed, Aug 04, 2010 at 07:39:41PM +0900, Takanori Watanabe wrote:
 Update my patch. Split bus attachment from main driver file
 (need to update sys/conf/files), add detach method for convinience, 
 and attach softc to cdev.si_drv1 .

I've updated our diff for 9-current, including your patch.


Ok, I've commit them to the head.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Driver tpm(4) and third party packages for trusted platform modules

2010-08-04 Thread Takanori Watanabe
In message 201008040347.o743leer046...@sana.init-main.com, wrote:
Quick review and hack:

1.How about attaching it as acpi child driver?

In some case, TPM may appear in ACPI namespace (with _HID) and
TPM spec defines ACPI method to handle TPM specific request.

2. Is identify method needed? 

Writing device hint will attach isa child driver, I think.

3.Module build

I don't know it is proper in TPM nature.

Update my patch. Split bus attachment from main driver file
(need to update sys/conf/files), add detach method for convinience, 
and attach softc to cdev.si_drv1 .




diff -ruN src/sys/dev/tpm/tpm.c src.new/sys/dev/tpm/tpm.c
--- src/sys/dev/tpm/tpm.c   2010-08-04 12:39:05.0 +0900
+++ src.new/sys/dev/tpm/tpm.c   2010-08-04 19:32:44.0 +0900
@@ -49,6 +49,7 @@
 #include dev/isa/isareg.h
 #include dev/isa/isavar.h
 #endif
+#include tpmvar.h
 
 #ifndef __FreeBSD__
 /* XXX horrible hack for tcsd (-lpthread) workaround on OpenBSD */
@@ -142,43 +143,10 @@
 /* Set when enabling legacy interface in host bridge. */
 int tpm_enabled;
 
-struct tpm_softc {
-#ifndef __FreeBSD__
-   struct device sc_dev;
-#endif
-   void *sc_ih;
-
-   int (*sc_init)(struct tpm_softc *, int, const char *);
-   int (*sc_start)(struct tpm_softc *, int);
-   int (*sc_read)(struct tpm_softc *, void *, int, size_t *, int);
-   int (*sc_write)(struct tpm_softc *, void *, int);
-   int (*sc_end)(struct tpm_softc *, int, int);
-
-   bus_space_tag_t sc_bt, sc_batm;
-   bus_space_handle_t sc_bh, sc_bahm;
-
-   u_int32_t sc_devid;
-   u_int32_t sc_rev;
-   u_int32_t sc_stat;
-   u_int32_t sc_capabilities;
-
-   int sc_flags;
-#defineTPM_OPEN0x0001
-
-   int  sc_vector;
-#ifdef __FreeBSD__
-   void*intr_cookie;
-#endif
-
-#ifndef __FreeBSD__
-   void*sc_powerhook;
-#endif
-   int  sc_suspend;
-};
 
 #ifdef __FreeBSD__
 #defineTPMSOFTC(dev) \
-((struct tpm_softc *)devclass_get_softc(tpm_devclass, dev2unit(dev)))
+   ((struct tpm_softc *)dev-si_drv1)
 
 d_open_t   tpmopen;
 d_close_t  tpmclose;
@@ -229,7 +197,6 @@
{ 0, , TPM_DEV_NOINTS },
 };
 
-int tpm_tis12_probe(bus_space_tag_t, bus_space_handle_t);
 int tpm_tis12_irqinit(struct tpm_softc *, int, int);
 int tpm_tis12_init(struct tpm_softc *, int, const char *);
 int tpm_tis12_start(struct tpm_softc *, int);
@@ -239,8 +206,6 @@
 
 #ifdef __FreeBSD__
 void tpm_intr(void *);
-int tpm_suspend(device_t);
-int tpm_resume(device_t);
 #else
 int tpm_intr(void *);
 void tpm_powerhook(int, void *);
@@ -264,67 +229,45 @@
 int tpm_legacy_end(struct tpm_softc *, int, int);
 
 #ifdef __FreeBSD__
+
 /*
  * FreeBSD specific code for probing and attaching TPM to device tree.
  */
+#if 0
 static void
 tpm_identify(driver_t *driver, device_t parent)
 {
BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, tpm, 0);
 }
+#endif
 
-static int
-tpm_probe(device_t dev)
-{
-   struct tpm_softc *sc = device_get_softc(dev);
-   bus_space_tag_t iot;
-   bus_space_handle_t ioh;
-   struct resource *mem_res;
-   int rv, mem_rid;
-
-   bzero(sc, sizeof(struct tpm_softc));
-
-   mem_rid = 0;
-   mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, mem_rid,
-   RF_ACTIVE);
-   if (mem_res == NULL)
-   return (ENXIO);
-   iot = rman_get_bustag(mem_res);
-   ioh = rman_get_bushandle(mem_res);
-
-   if ((rv = tpm_tis12_probe(iot, ioh)))
-   device_set_desc(dev, Trusted Platform Module);
-
-   bus_release_resource(dev, SYS_RES_MEMORY, mem_rid, mem_res);
-   return rv ? 0 : ENXIO;
-}
 
-static int
+int
 tpm_attach(device_t dev)
 {
struct tpm_softc *sc = device_get_softc(dev);
-   struct resource *mem_res;
-   int mem_rid;
-   int irq_rid, irq;
-   struct resource *irq_res;
+   int irq;
 
-   mem_rid = 0;
-   mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, mem_rid,
+   sc-mem_rid = 0;
+   sc-mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, sc-mem_rid,
RF_ACTIVE);
-   if (mem_res == NULL)
+   if (sc-mem_res == NULL)
return ENXIO;
 
-   sc-sc_bt = rman_get_bustag(mem_res);
-   sc-sc_bh = rman_get_bushandle(mem_res);
+   sc-sc_bt = rman_get_bustag(sc-mem_res);
+   sc-sc_bh = rman_get_bushandle(sc-mem_res);
 
-   irq_rid = 0;
-   irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, irq_rid,
+   sc-irq_rid = 0;
+   sc-irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, sc-irq_rid,
RF_ACTIVE | RF_SHAREABLE);
-   if (irq_res != NULL)
-   irq = rman_get_start(irq_res);
+   if (sc-irq_res != NULL)
+   irq = rman_get_start(sc-irq_res);
else
irq = IRQUNK;
 
+   /*In case PnP probe this may contain some initialization.*/
+   tpm_tis12_probe(sc-sc_bt, sc-sc_bh);
+   
if 

Re: Driver tpm(4) and third party packages for trusted platform modules

2010-08-03 Thread Takanori Watanabe
In message 20100802120236.gb29...@modermoor.genua.de, Hans-Joerg Hoexer wrote:
Hi,

we have developed a driver tpm(4) for various TPMs for OpenBSD 4.7 and
FreeBSD 8.0 and have ported and updated several third party packages to
enable use of TPMs on Open- and FreeBSD.  This enables applications like
OpenSSH to generate and store private keys inside a TPM.

The supported TPMs are:

- Atmel 97SC3203
- Broadcom BCM0102
- Infineon SLB 9635 TT 1.2
- Intel INTC0102
- Sinosun SNS SSX35
- STM ST19WP18
- Winbond WEC WPCT200

The supported third party packages are:

- openCryptoki 2.3.1:  An PKCS#11 implementation, including support
  for TPMs.  OpenSSH can use this library to generate and store private
  RSA keys inside a TPM.
- openssl_tpm_engine 0.4.1:  An openssl engine supporting TPMs.
- tpm-emulator 0.7.0:  An emulator providing the functionality of a TPM.
  Used for development purposes.
- tpm-tools 1.3.5:  Various tools for managing a TPM, including key
  generation.
- trousers 0.3.5:  An implementation of the Trusted Software Stack.
  This is the backend libary for the afore mentioned packages.
- trousers testsuite 0.2:  A testsuite for trousers.
- TrustedGRUB 1.1.4:  An TPM enabled version of grub, including support
  for natively booting OpenBSD.

A patch including the driver tpm(4) is attached, more information,
full source code and patches for third party packages can be found at
http://bsssd.sourceforge.net.

Nice!
Quick review and hack:

1.How about attaching it as acpi child driver?

In some case, TPM may appear in ACPI namespace (with _HID) and
TPM spec defines ACPI method to handle TPM specific request.

2. Is identify method needed? 

Writing device hint will attach isa child driver, I think.

3.Module build

I don't know it is proper in TPM nature.

===
diff -ruN src/sys/dev/tpm/tpm.c src.new/sys/dev/tpm/tpm.c
--- src/sys/dev/tpm/tpm.c   2010-08-04 12:39:05.0 +0900
+++ src.new/sys/dev/tpm/tpm.c   2010-08-04 12:27:41.0 +0900
@@ -264,15 +264,22 @@
 int tpm_legacy_end(struct tpm_softc *, int, int);
 
 #ifdef __FreeBSD__
+static struct isa_pnp_id tpm_ids[] = {
+   {0x32021114, Trusted Platform Module},
+
+   {0}
+};
+
 /*
  * FreeBSD specific code for probing and attaching TPM to device tree.
  */
+#if 0
 static void
 tpm_identify(driver_t *driver, device_t parent)
 {
BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, tpm, 0);
 }
-
+#endif
 static int
 tpm_probe(device_t dev)
 {
@@ -281,8 +288,14 @@
bus_space_handle_t ioh;
struct resource *mem_res;
int rv, mem_rid;
+   int ret;
 
bzero(sc, sizeof(struct tpm_softc));
+   
+   if((ret = ISA_PNP_PROBE(device_get_parent(dev), dev, tpm_ids))
+  = 0){
+   return ret;
+   }
 
mem_rid = 0;
mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, mem_rid,
@@ -362,7 +375,9 @@
 }
 
 static device_method_t tpm_methods[] = {
+#if 0
DEVMETHOD(device_identify,  tpm_identify),
+#endif
DEVMETHOD(device_probe, tpm_probe),
DEVMETHOD(device_attach,tpm_attach),
DEVMETHOD(device_suspend,   tpm_suspend),
@@ -377,6 +392,7 @@
 static devclass_t tpm_devclass;
 
 DRIVER_MODULE(tpm, isa, tpm_driver, tpm_devclass, 0, 0);
+DRIVER_MODULE(tpm, acpi, tpm_driver, tpm_devclass, 0, 0);
 #else
 /*
  * OpenBSD specific code for probing and attaching TPM to device tree.
diff -ruN src/sys/modules/tpm/Makefile src.new/sys/modules/tpm/Makefile
--- src/sys/modules/tpm/Makefile1970-01-01 09:00:00.0 +0900
+++ src.new/sys/modules/tpm/Makefile2010-08-04 12:43:59.0 +0900
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../dev/tpm
+
+KMOD=  tpm
+SRCS=  tpm.c isa_if.h opt_acpi.h acpi_if.h bus_if.h device_if.h
+
+.include bsd.kmod.mk



___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


emacs21 TCP connection failed after update.

2003-08-11 Thread Takanori Watanabe
Hi, after I updated the system, I try to use navi2ch, a client
for WWW based BBS system written in emacs-lisp, and found
It often failes to connect to the server with EALREADY.

Then I investigate the problem, I found 
the code(open-network-stream function @emacs21.3/src/process.c)
assumes that connection attempt is aborted when  a program 
got any signal during connect(2) is issued and the 
next attempt to connect(2) fails with EALREADY after a
connect(2) is interrupted. 
What shall we do?



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [acpi-jp 2106] RE: ACPI-CA import/new diff?

2003-03-20 Thread Takanori Watanabe
In message [EMAIL PROTECTED], Gr
over, Andrew wrote:
 From: Nate Lawson [mailto:[EMAIL PROTECTED] 
 http://developer.intel.com/technology/iapc/acp
i/downloads/CHANGES.txt
 
 I'll try to generate a diff soon at post it since I haven't heard from
 iwasaki@

Iwasaki seems to be busy now.

This is against the Linuxized version but you should be able to get the
gist of it:

--- 2421-pre4-acpi/drivers/acpi/events/evgpeblk.c.orig Wed Mar  5
17:00:15 2003
+++ 2421-pre4-acpi/drivers/acpi/events/evgpeblk.c  Wed Mar  5
17:01:30 2003
@@ -131,7 +131,7 @@
   /* Ensure that we have a valid GPE number for this GPE block */
 
   if ((gpe_number  gpe_block-block_base_number) ||
-  (gpe_number = (gpe_block-register_count * 8))) {
+  (gpe_number - gpe_block-block_base_number =
(gpe_block-register_count * 8))) {


Thanks. I'll apply it.


BTW. I noticed that some definition for structure is added and
its naming collide to our OS-dependent module.
We has been avoided it by using non-linuxlized ACPI-CA that
has the naming rule of beggining with 'Acpi' not 'acpi_'.
Would you care about it next time?



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


Re: [acpi-jp 2106] RE: ACPI-CA import/new diff?

2003-03-20 Thread Takanori Watanabe
Would you try it?

http://people.freebsd.org/~takawata/acpi-20030321.diff
http://people.freebsd.org/~takawata/acpica-freebsd-20030321.tar.gz

The OSD interface of
void
AcpiOsDerivePciId(ACPI_HANDLE Rhandle, ACPI_HANDLE Lhandle,
ACPI_PCI_ID **Id)

is not impremented yet. (Only Do-Nothing function)
If this is impremented, PCI-PCI bridge handling on ACPI-CA
is will be better.


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


Re: [acpi-jp 1925] Re: acpid implementation?

2002-11-09 Thread Takanori Watanabe
In message [EMAIL PROTECTED], Terry Lambert wrote:
Hiten Pandya wrote:
  I have been searching mailing lists and my friend Google for information
  about a acpid (like apmd) implementation for FreeBSD, but I have found
  nothing.
 
  Does one exist anywhere, or has anyone started out on something without
  telling anyone? :)
 
 Why do you need an acpid?

Power profiles, for one.

It is obious there will be good if we have a way to catch power 
event from userland.

I have some ideas to implement it.
One way is implement with kqueue(2) and /dev/acpi to
get power events. This way does not require daemons
to wait the event exclusively. Each process that requires
to get power event can handle it by the interface.
I wrote the experimental code a years ago.


Next way is that make /dev/acpictl node that can open
exclusively and catch the power event by it, like apmd.

The last way is that extend /dev/devctl interface and
devd(8) that can handle power event.

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



Re: [acpi-jp 1933] Re: acpid implementation?

2002-11-09 Thread Takanori Watanabe
In message [EMAIL PROTECTED], Ian Dowse wrote:
I've been using the following far-from-ideal patch for a while now -
it just supplies binary integers to /dev/acpi whenever the sleep
state changes. The choice of encoding of data is stupid, and the
acpiread() doesn't do blocking - I just use it in a script like

I mean just like it by the following sentence.

==
Next way is that make /dev/acpictl node that can open
exclusively and catch the power event by it, like apmd.
==

This way requires that the event reading proceess should 
be only one, so we need another device node to read event.



   while :; do
   sleep 5
   acpidat=`wc -c  /dev/acpi`
   if [ $acpidat -gt 0 ]; then
   killall -HUP moused
   fi
   done

The options

options PSM_HOOKRESUME  #hook the system resume event, useful
#for some laptops
options PSM_RESETAFTERSUSPEND   #reset the device at the resume event

will resolve your problem without the patch.
It is the problem that there are no way to pass device flags
when an ISA-like devices are probed through PnP way.
If it exist, you will not required to rebuild kernel, but
insert two lines to /boot/device.hints .

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



Re: getting rid of devfs...

2002-11-09 Thread Takanori Watanabe
In message [EMAIL PROTECTED], Poul-Henning Kamp wrote:

DEVFS:

   3. major/minors will be dynamically assigned.

So we will  need file to list node id list in printf(9) format,
instead of /sys/conf/majors.

And more better if we generate device name #define or array of 
string from the file. This will help us implementing loading 
module when an user process attempt to open some nodes that
owned by unloaded modules.


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



Re: pcic state

2002-10-14 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Bernd Walter $B$5$s$$$o$/(B:
Yesterday I updated my notebook from 31th Aug -current to 3rd Oct.
Now pccardd complains there is no /dev/card0.
The probing looks fine.

That's no expected. 
Newcard currently has no way to access PCCARD CIS and catch inseartion event
from userland, 


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



Re: PCI bus lost on Supermicro P3TDE6. ACPI?

2002-10-12 Thread Takanori Watanabe
In message [EMAIL PROTECTED], Martin Nilsson wrote:
http://www.gneto.com/current-20021012/P3TDE6.dsdt

Following is a diff between dmesg form my latest working kernel and one=20
made today.
It seems that todays acpi.ko works as it should with the kernel from Sep =

21 but not with todays kernel, strange!

Would you override your DSDT with the file at following URL?

http://   takawata.st.wakwak.ne.jp/P3TDE6.aml

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



Re: [acpi-jp 1770] Re: EC handler doing bad things..

2002-08-29 Thread Takanori Watanabe

In message [EMAIL PROTECTED], John Baldwin ¤µ¤ó¤¤¤ï¤¯:

On 29-Aug-2002 Mitsuru IWASAKI wrote:
 A while back I used to get warnings about temperature events a lot.
 I don't get those anymore but now I get a lot of errors when
 embedded controller events trigger like so:
 
 ACPI-0433: *** Error: Handler for [EmbeddedControl] returned AE_ERROR
 
 Does anyone have any ideas on why and/or where the best place to look?
 For example, which Ec handler is ACPICA calling that is failing?
 
 I don't know why, but it seems that evregion.c:AcpiEvAddressSpaceDispatch(),
 acpi_ec.c:EcSpaceHandler() and acpi_ec.c:EcTransaction() are good
 cadidate to check out.

Ok, I've found it, reverting this commit makes it work again:

takawata2002/07/01 20:38:07 PDT

  Modified files:
sys/dev/acpica   acpi_ec.c 
  Log:
  Make interrupt driven EC transaction optional.
  
  Revision  ChangesPath
  1.26  +2 -0  src/sys/dev/acpica/acpi_ec.c

This commit seems a bit incomplete (it uses an option that isn't setup in
conf/options or defined anywhere).  Watanabe-san, can you explain why
you made this change a bit better?  It seems to break on at least my
laptop (Dell Inspiron 5000e).

The reason of changing itself is just the same reason as you complain.
(It did not work for at least 2 people including me.)
And I tested a patch so that first the EC try to use interrrupt driven mode
then use polling mode if it failed.
But my keyboard controller (in many cases, it shares ACPI embedded controller)
get wrong by using the patch.

OK. If there are any people that is happy with the interrupt driven mode,
I'll turn it from the #ifdef to TUNABLE_INT option.


The patch are as follows.
Index: /src/sys/dev/acpica/acpi_ec.c
diff -u /src/sys/dev/acpica/acpi_ec.c:1.1.1.1 /src/sys/dev/acpica/acpi_ec.c:1.2
--- /src/sys/dev/acpica/acpi_ec.c:1.1.1.1   Sat Jul 27 14:00:22 2002
+++ /src/sys/dev/acpica/acpi_ec.c   Sat Jul 27 14:37:43 2002
@@ -143,7 +143,7 @@
 #include machine/bus.h
 #include machine/resource.h
 #include sys/rman.h
-
+#include sys/sysctl.h
 #include acpi.h
 
 #include dev/acpica/acpivar.h
@@ -242,10 +242,14 @@
 intec_lockhandle;
 intec_pendquery;
 intec_csrvalue;
+  int   ec_burst;
 };
 
 #define EC_LOCK_TIMEOUT1000/* 1ms */
-
+static int ec_readfail = 0;
+static int ec_writefail = 0;
+SYSCTL_INT(_debug,  OID_AUTO,  acpi_ec_readfail, CTLFLAG_RD, ec_readfail, 0, );
+SYSCTL_INT(_debug,  OID_AUTO,  acpi_ec_writefail, CTLFLAG_RD, ec_writefail, 0, );
 static __inline ACPI_STATUS
 EcLock(struct acpi_ec_softc *sc)
 {
@@ -289,7 +293,8 @@
 static ACPI_STATUS EcTransaction(struct acpi_ec_softc *sc, EC_REQUEST *EcRequest);
 static ACPI_STATUS EcRead(struct acpi_ec_softc *sc, UINT8 Address, UINT8 *Data);
 static ACPI_STATUS EcWrite(struct acpi_ec_softc *sc, UINT8 Address, UINT8 *Data);
-
+static ACPI_STATUS EcBurstEnable(struct acpi_ec_softc *sc);
+static ACPI_STATUS EcBurstDisable(struct acpi_ec_softc *sc);
 static voidacpi_ec_identify(driver_t driver, device_t bus);
 static int acpi_ec_probe(device_t dev);
 static int acpi_ec_attach(device_t dev);
@@ -371,6 +376,7 @@
 /* 
  * Attach bus resources
  */
+sc-ec_burst = 0;
 sc-ec_data_rid = 0;
 if ((sc-ec_data_res = bus_alloc_resource(sc-ec_dev, SYS_RES_IOPORT, 
sc-ec_data_rid,
  0, ~0, 1, RF_ACTIVE)) == NULL) {
@@ -571,7 +577,6 @@
 
 if ((Address  0xFF) || (width % 8 != 0) || (Value == NULL) || (Context == NULL))
 return_ACPI_STATUS(AE_BAD_PARAMETER);
-
 switch (Function) {
 case ACPI_READ:
 EcRequest.Command = EC_COMMAND_READ;
@@ -592,6 +597,8 @@
 /*
  * Perform the transaction.
  */
+if(width  16)
+   EcBurstEnable(sc);
 for (i = 0; i  width; i += 8) {
if (Function == ACPI_READ)
EcRequest.Data = 0;
@@ -603,6 +610,10 @@
if (++EcRequest.Address == 0)
 return_ACPI_STATUS(AE_BAD_PARAMETER);
 }
+if(sc-ec_burst)
+   EcBurstDisable(sc);
+if(Status != AE_OK)
+   printf(%x %d\n, (UINT32) Address, width);
 return_ACPI_STATUS(Status);
 }
 
@@ -610,7 +621,7 @@
  * Wait for an event interrupt for a specific condition.
  */
 static ACPI_STATUS
-EcWaitEventIntr(struct acpi_ec_softc *sc, EC_EVENT Event)
+EcWaitEventIntr(struct acpi_ec_softc *sc, EC_EVENT Event, int poll)
 {
 EC_STATUS  EcStatus;
 inti;
@@ -618,9 +629,7 @@
 ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)Event);
 
 /* XXX this should test whether interrupts are available some other way */
-#ifdef ACPI_EC_EVENT_DRIVEN
-if(cold)
-#endif
+if(cold||sc-ec_burst|| poll)
return_ACPI_STATUS(EcWaitEvent(sc, Event));
 
 if (!EcIsLocked(sc))
@@ -776,72 +785,121 @@
 return(Status);
 }
 
-
 static ACPI_STATUS

Re: ACPI woes again..

2002-07-05 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Alex Zepeda wrote:
On Fri, Jul 05, 2002 at 04:01:08PM +0900, Takanori Watanabe wrote:

  We already have a way to use your own bytecode without recompiling.
 Simply put your AML file to /boot/acpi_dsdt.aml and add 'acpi_dsdt_load=YES

 to your /boot/loader.conf (Other necessary setting exist in /boot/default/lo
ader.conf)

Cool!  I can boot now!!

When will this make it into the man page?

Would you review this description?

--- acpi.4  Fri Jul  5 17:41:29 2002
+++ acpi.4.new  Fri Jul  5 18:37:27 2002
@@ -258,10 +258,33 @@
 bus/children scan of the namespace.
 The ACPI CA code will still
 know about the avoided region.
+.Sh OVERRIDING YOUR BIOS BYTECODE
+ACPI interprets bytecode named AML, ACPI Machine Language, provided by BIOS
+vendor as memory image at boot time. Sometimes, the AML code contains
+problem that is not appeared in Microsoft implement. So we provide a way 
+to override it with your own AML code.
+.Pp
+In order to load your AML code, 
+you must edit 
+.Pa /boot/loader.conf
+and 
+include the follwing lines.
+.Bd -literal -offset indent
+acpi_dsdt_load=YES
+acpi_dsdt_name=/boot/acpi_dsdt.aml #You may change the name.
+.Ed
+.Pp
+In order to prepare your AML code, you will require
+.Xr acpidump 8 ,
+.Xr iasl 1
+in devel/acpicatools port, and some ACPI knowledge.
+
 .Sh COMPATIBILITY
 ACPI is only found/supported on Intel platforms (i386/IA32 and IA64).
 .Sh SEE ALSO
 .Xr config 8 ,
+.Xr loader.conf 5 ,
+.Xr acpidump 8 ,
 .Xr acpi 9
 .Sh AUTHORS
 .An -nosplit

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



Re: smbalert# hook for smbus childs

2002-06-26 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Willem van Engen wrote:

Hello,

there already is some code for smbalert# handling on intpm
(ENABLE_ALART), but there is no support for handling it in a driver. O2
AudioDJ (OZ162) chips use this signal to indicate that a button was
pressed. So I need a way for a driver to be notified when smbalert#
occurs.

I have never tested the code, though. 

Of course I thought immediately about bus_(setup|teardown)_intr. I wrote
something like that for smbus: bus_(setup|teardown)_alart (see patch),
that works now. But is this The Right Way to do it? I do have some
thoughts on it, but maybe someone more knowledgeable than me could comment
on it.

I thought about ACPI embedded controller SMBus device driver and 
this mechanism will be needed for implement event notification mechanism. 

It might be better to use bus_*_intr instead of bus_*_alart, but one
would need to bus_alloc_resource a slave address and pass that to
bus_setup_intr. But then it makes sense to use those slave address
resources to send smbus commands, right? But how would that fit into the
bus_space_* functions?

*I* think it is fit to smbus specific function.

p.s. I hope I'm clear, english isn't my native language.
So am I (T_T).


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



Re: [OT] ACPI based support for suspend to disk?

2002-06-20 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Michael Nottebrock wrote:
Fischer, Oliver wrote:
 You are right. My PC supports this via BIOS too. The
 disadvantage is, that the bios handle it. I like W2K's
 feature to do it ACPI based (?). This gives my the freedom
 to suspend my W2K to disk and to reboot with FBSD. Later I
 reboot again and choose W2K and it restores it previous
 state. If the bios does it, it restores always the last
 suspended OS.

AFAIR, the Win2k-Suspend2Disk is not ACPI-based.

I put my FreeNIX2002 paper at freefall.
My comment about this topic is at 
http://people.freebsd.org/~takawata/acpipaper/acpi_freenix/node22.html


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



Re: no /dev/apmctl ?

2002-06-11 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Taavi Talvik wrote:

I have included apm in kernel (cvsupped yesterday) config file. However,
it does not create /dev/apmctl

l /dev/apm*
crw-rw-r--  1 root  operator   39,   0 Jun 11 19:31 /dev/apm

This can be fake apm device node made by ACPI driver.

How is this possible? Driver code /usr/src/sys/i386/apm/apm.c calls
creation of both device nodes around line 1106 without any conditionals

make_dev(apm_cdevsw, 0, 0, 5, 0664, apm);
make_dev(apm_cdevsw, 8, 0, 5, 0660, apmctl);

Are you surely using apm driver? You may have to disable acpi loading
by typing 'unset acpi_load' in boot loader.
ACPI makes apm node only, not apmctl node.

Takanori Watanabe



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



Making newcard and oldcard moduler.

2002-05-29 Thread Takanori Watanabe

Hi, 
I managed to make pccard device driver into loadable module.

http://people.freebsd.org/~takawata/cardmodule.diff

To use this, 
1. Apply following patch.(diff from HEAD)
2. Remove 'pccard','pcic','pccbb','cardbus', 'card' 
   line from configuration file. 
3. Add following line to configuration file. (Should it be standard?)
==
device cardcom
==
4. Rebuild your kernel.
5. Move /sys/modules/ and build oldcard, pccbb, pccard, cardbus, pcic
module and install them.
6 Reboot.
7 If you want to use oldcard, type as follows in loader(8).
==
load oldcard
boot
==
 Or if you want to use newcard with CardBus controller, type as follows.
==
load pccbb
boot
==

CAVEATS
 Unloading newcard may cause page fault.
 Loading both of them cause something bad.
 I don't check whether all pccard driver works well.

Have fun.


Takanori Watanabe

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



Re: ACPI issues and questions (Dell Inspiron 3700)

2002-03-03 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Michael Smith wrote:

No.  This would mean that sio(4) will attach to any IrDa port and 
preclude an IrDa-specific driver from doing so.

I think so too. But 

If any variation of this patch is committed, at the very least sio(4) 
should return a lower preference than 0 for it's match.

Sorry, I've been committed the code, because some IrDA controller(generic one)
already there, there are no such driver *NOW* and some people may 
become happy with /usr/ports/comm/birda port.

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 

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



Re: ACPI issues and questions (Dell Inspiron 3700)

2002-02-25 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Jose M. Alcaide wrote:
1. The sio1 port (IrDA) is not detected. I had to add

   hint.sio.1.at=isa
   hint.sio.1.port=0x2F8
   hint.sio.1.irq=3

   to /boot/device.hints in order to get it probed at boot. I think that
   this is a fault of the ACPI BIOS.
From acpidump.

Device(IRDA) {
Name(_HID, 0x10f0a34d)

So try adding 
{0x10f0a34d, NULL}
to sio_ids in /sys/dev/sio/sio_isa.c

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 

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



Re: ThinkPad X22 PC-Card slot problem

2002-02-06 Thread Takanori Watanabe

In message [EMAIL PROTECTED], [EMAIL PROTECTED] wrote

I recently installed -current to ThinkPad X22. Though it seems that
X22's PC-Card slots work fine with -stable, in -current when probing
PCICs I got following message,

pcic0: Ricoh RL5C476 PCI-CardBus Bridge mem 0x5000-0x5fff irq 11 at 
device 3.0 on pci2
pcib2: device pcic0 requested unsupported memory range 0x5000-0x5fff (
decoding 0xc020-0xcfff, 0xe800-0xf00f)
pcib2: device pcic0 requested decoded memory range 0x5000-0x5fff

after this, pcic returns error but some how it is attached and when I
install a PC-Card, the machine freezes. The address range above
(0x5000-0x5fff) is same one that I see with -stable.

When PCI_ALLOW_UNSUPPORTED_IO_RANGE is defined in
sys/dev/pci/pci_pci.c, pcic does not return error, the machine does
not freeze, but when a PC-Card is inserted I get the message,

pccard: card inserted, slot 0
pcic0: reset 1 int is 10 stat is 5f
pcic0: reset 2 int is 70 stat is 5f
pcic0: reset 3 int is 70 stat is 7f
pcic0: Event mask 0x9
pcib2: device pccard0 requested decoded I/O range 0x4000-0x25f
pcib2: device pccard0 requested decoded I/O range 0x4000-0x25f
pcib2: device pccard0 requested decoded I/O range 0x4000-0x25f
pcib2: device pccard0 requested decoded I/O range 0x4000-0x25f
pcib2: device pccard0 requested decoded I/O range 0x4000-0x25f
   :

and the card does not attached. The complete dmesg with boot -v is
attached. Any ideas ?

How about disabling ACPI? If this works, it is because ACPI PCI interrupt 
routing problem.

pcib2: PCI-PCI bridge at device 30.0 on pci0
pci2: PCI bus on pcib2
pcic0: Ricoh RL5C476 PCI-CardBus Bridge mem 0x5000-0x5fff irq 11 at device 
3.0 on pci2

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 


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



Re: ACPI messages.

2002-01-14 Thread Takanori Watanabe

In message [EMAIL PROTECTED], M
agnus B{ckstr|m wrote:
I put CURRENT on a new Dell Inspiron 4100 laptop this weekend.  Works fine,
but I keep getting these messages:

ACPI-0294: *** Error: Method execution failed, AE_AML_OPERAND_TYPE

The messages are logged once every few seconds, and every time I e g remove
or insert a battery.

I'm not sure what the message means, but then I haven't delved into it
beyond searching the mailing list archives (nothing much turned up).

Is it
A) something to worry about?
B) something related to some part of the laptop hardware being unknown,
   and thus
C) something that I ought to endeavour to fix, having the hardware?

This may be AML(bytecode) bug made by vendor, which is not appeared 
in Microsoft implementation. Possible fix you can do now is AML overriding.

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 




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



Re: ACPI causes immediate reboot [Omnibook 6100] ?

2001-12-17 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Georg-W Koltermann $B$5$s$$$o(B
$B$/(B:
Hi,

I finally got around to hook up a serial console and capture the error
message.  This is with ACPI_DEBUG enabled in the kernel config, but
ACPI is still loaded as a module, not configured statically.

acpi0: PTLTD  EBRSDT   on motherboard
   ACPI-0294: *** Error: Method execution failed, AE_NOT_EXIST

What surprises me is that the debug.acpi.* settings don't seem to take
effect.  Would I need to configure ACPI statically for them to work,
or is this problem just too early in the boot sequence?

And what can I try next?

--
Regards,
Georg.

snipserial console captured during bootsnip

OK show
LINES=24
acpi_load=YES

HERE!
unset acpi_load

Then send me ASL dump.

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 

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



Re: link_elf: symbol card_compat_do_probe_desc undefined

2001-12-05 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Warner Losh $B$5$s$$(B
$B$o$/(B:
In message [EMAIL PROTECTED] Alexander Leiding
er writes:
: ---snip---
: Preloaded elf module /boot/kernel/joy.ko at 0xc048fe28.
: link_elf: symbol card_compat_do_probe_desc undefined
: KLD file joy.ko - could not finalize loading

Hmmm.  Looks like this is my fault.  The joy driver now assumes that
pccard is in the base kernel, it seems.  I will investigate.  I hadn't
anticipated this problem.

 How about putting card_if.c and some support function stub into base system?

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 


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



Re: For your amusement..

2001-10-08 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Peter Wemm wrote:
Just a FYI to people not on the ia64 list...

All bow before Doug Rabson, the mighty! :-)

Great!

acpi0: Intel  W460GXBS on motherboard
acpi0: power button is handled as a fixed feature programming model.
Timecounter ACPI  frequency 3579545 Hz
acpi_cpu0: CPU on acpi0
acpi_cpu1: CPU on acpi0
acpi_pcib0: Host-PCI bridge port 0xcf8-0xcff on acpi0

If there are no problem, would you give me DSDT block?

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 

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



Re: ACPI on Sony VAIO z505s on fresh -CURRENT

2001-08-22 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Vladimir B. Grebensch
ikov $B$5$s$$$o$/(B:

acpidump - dumps a lot of information

But there are some problems with using acpi:

1st: it seems that acpi not emulates apm interface (/dev/{apm,apmctl}) so
 apm-based utilites don't work (apmd, zzz, monitors and so)

 Is it planned to have apm interface through acpi or not ?
 If I compile both in kernel - apm code not works.

At least I don't have plan to imprement apmctl.There is more appropreate 
way: kqueue. That is undergoing project. Imprementing ome apm-compatible 
interface may be good thing.



2nd: Where I can get more info about acpimodes, from man acpiconf(8):
  -s type
 Enters the specified sleep mode.  Recognized types are 1, 2, 3,
 4, and 5.
 in man acpiconf(8) there are no mention about mode 4b 
 I have tried some:
1,2 - do nothing
   5   - turn off machine without proper shutdown

3rd: I have tried couple utilites from http://people.freebsd.org/~jhb/acpi/
  batt.c- works after patching, but if no battary present on laptop
  shows 1 battary with unrealistic numbers
  health.c  - I can't make it work - it seems it lacks of defines in kerne
l

health.c will not work because Thermal zone driver has no ioctl 
interface for now.
But there is sysctl interface instead.

  May be there are some other utilites for acpi ?

User interface of ACPI itself is not so fixed.

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 

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



[HEADS UP]:ACPI S2-S4BIOS code was commited.

2001-07-19 Thread Takanori Watanabe

I now commited ACPI S2-S4BIOS code.
In some machine, there are problem after resume.
For example, keyboard will not work.
(Keyboard reset required in DEVICE_RESUME method.)
But it worked.
Please try it.

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 


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



Re: acpi and invisible pnpbios?

2001-02-27 Thread Takanori Watanabe

In message [EMAIL PROTECTED], "Daniel C. Sobral" $B$5$s$$$o$/(B:
When using acpica some of my pnpbios entries do not get probed. In

Please send me DSDT block.

particular, I never see reports on non-identified PNP IDs (even boot
verbose), nor does my ess 1869 gets identified or shown.

It is because,PnPBIOS probe message etc. is shown by isa/pnpparse.c
and ACPI enumulator do not use it.  To be get verbose infomation,
use debug option.(But it makes heavy performance loss.)

Takanori Watanabe
a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html"
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 



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



Call for review:PECOFF(Win32 Execution format) module.

2000-12-19 Thread Takanori Watanabe

Hi, I want to commit pecoff module under sys/compat/.
The code is at

http://people.freebsd.org/~takawata/pecoff.tar.gz

This is kernel part of PEACE(http://chiharu.haun.org/peace/),that is 
announced as NewFeature of NetBSD1.5.
Currently one more kernel module is needed to use PEACE in FreeBSD.

If there is no objection, I will commit it. 
Thanks.

Takanori Watanabe
a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html"
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 



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



Re: cvs commit: src/sys/dev/acpica acpi.c acpi_button.c acpi_ec.c acpi_isa.c acpi_lid.c acpi_pcib.c acpi_processor.c acpi_resource.c acpi_thermal.c acpi_timer.c acpiio.h acpivar.h

2000-12-08 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Mike Smith $B$5$s$$(B
$B$o$/(B:
msmith  2000/12/08 01:16:21 PST

  Modified files:
sys/dev/acpica   acpi.c acpi_button.c acpi_ec.c acpi_isa.c 
 acpi_lid.c acpi_pcib.c acpi_processor.c 
 acpi_resource.c acpi_thermal.c 
 acpi_timer.c acpiio.h acpivar.h 
  Log:
   - Convert a lot of homebrew debugging output to use the ACPI CA debugging
 infrastructure.  It's not perfect, but it's a lot better than what
 we've been using so far.  The following rules apply to this:
  o BSD component names should be capitalised
  o Layer names should be taken from the non-CA set for now.  We
may elect to add some new BSD-specific layers later.

I don't think this "infrastructure" is useful. As far as I experienced,
the message is too noisy or too few infomation.

$BEOJUB:5*(B
$B?@8MBg3XBg3X1!+A32J3X85f2J(BD3$BpJs%a%G%#%"2J3X@l96(B
a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html"
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 




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



Re: Driver Floppy implementation (Re: make release breakage - dokern.sh patch 2)

2000-10-30 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Tatsumi Hosokawa $B$5$s$$$o$/(B:

I moved PCI/PCCARD/USB if_xx.ko driver to mfsroot.flp, and I've got
100KB of free blocks in the first floppy.  If we move more drivers to
mfsroot.flp or coming drivers.flp, we can get not only free blocks in
the first floppy, but also more installation devices.

Just FYI: If usb itself is module-ifed,
USB ether modules cannot be  load until MODULE_DEPEND,MODULE_VERSION
is defined.

Takanori Watanabe
a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html"
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 


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



Re: My system hang with ACPI kernel thread

2000-09-27 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Munehiro Matsuda wrote:

With the addition of ACPI kernel thread, my system hangs in about 
10 miniutes use after boot up. By disabling kernel thread, system
runs just fine.

Do you have any idea where to look at?
I'll try and see what I can do myself.

Please set debug.aml_debug and debug.acpi_debug to 1 and 
see what will happen.

Takanori Watanabe
a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html"
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 






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



Re: Abit's BP6 and 'lmmon' or 'chm'

1999-10-13 Thread Takanori Watanabe

In message [EMAIL PROTECTED], [EMAIL PROTECTED] wrote:
In [EMAIL PROTECTED] Chris D. 
Faulhaber [EMAIL PROTECTED] wrote:

When I remove one of the CPUs and boot UP kernel on the same
motherboard both 'chm' and 'lmmon' starts to work (also showed
values for -5V and -12V looks strange).
Probably the Hardware sensor is not LM78/79 but W83781.

   So the problems is in driver not working in SMP
system. Are there any (general) hints where to look for
such UP/SMP problems ?

I know the problem,but I cannot find out how it could be solved.
The reason is the driver does not catch intrrupt.
Wait a few days. I'll make a patch so that you can use polling 
mode for 'intpm'.

Takanori Watanabe
a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html"
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 



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



intpm(4) polling patch

1999-10-13 Thread Takanori Watanabe

If you get "Device not configured" message, apply following patch and
do 'sysctl -w hw.intpm_poll=1'.If your system is SMP, 'hw.intpm_poll' value
is 1 as a default.(Not tested.)
This is not *the right* solution,but it will work I think.

Takanori Watanabe
a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html"
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 


--- /home/ctm/src/sys/pci/intpm.c   Fri Sep  3 03:16:24 1999
+++ intpm.c Thu Oct 14 12:25:28 1999
@@ -43,9 +43,9 @@
 #include sys/rman.h
 #include machine/resource.h
 #include dev/smbus/smbconf.h
-
+#include sys/sysctl.h
 #include "smbus_if.h"
-
+#include "smp.h"
 /*This should be removed if force_pci_map_int supported*/
 #include sys/interrupt.h
 
@@ -90,6 +90,9 @@
 static int intpm_attach (device_t dev);
 static devclass_t intsmb_devclass;
 
+static int intpm_poll=0;
+SYSCTL_INT(_hw, OID_AUTO, intpm_poll, CTLFLAG_RW, intpm_poll, 1, "");
+
 static device_method_t intpm_methods[]={
 DEVMETHOD(device_probe,intsmb_probe),
 DEVMETHOD(device_attach,intsmb_attach),
@@ -379,7 +382,7 @@
 int error;
intrmask_t s;
 struct intsmb_softc *sc = (struct intsmb_softc *)device_get_softc(dev);
-   if(cold){
+   if(cold||intpm_poll!=0){
/*So that it can use device during probing device on SMBus.*/
error=intsmb_stop_poll(dev);
return error;
@@ -656,7 +659,10 @@
 device_t smbinterface;
int rid;
struct resource *res;
-
+#if NSMP0
+   device_printf(dev,"SMP system so polling mode is default\n");
+   intpm_poll=1;
+#endif
 sciic=device_get_softc(dev);
 if(sciic==NULL){
 return ENOMEM;







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



Re: Experimental ACPI driver.

1999-09-26 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Mike Smith wrote:
Both Doug Rabson and myself have been tinkering with this, and there's 
someone that's been looking at an AML parser/interpreter in the last 
couple of weeks.  At this point in time, the parser and object manager 
are the most vital components.

Yes.I think so too.

Takanori Watanabe
a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html"
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 


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



My ATAPI CDROM will not work after update, both in ata driver and wd driver

1999-06-07 Thread Takanori Watanabe
Hi, I updated my kernel code from src-cur.3894 to CTM src-cur.3906 
and My CDROM drive is not recognized by kernel .
Before update,cdrom is not recognized by 'ata' driver but by 'wd' driver,
it is recognzied ,though it complains 

Jun  8 10:55:05 sana /kernel: atapi1.1: unknown phase

.
After the update, wdc1 is not recognized by the newly configured kernel.
Then I try  ATA driver.
In ATA Driver ,it  seems that the driver fails in MODE SENSE.
Following messages is produced with kernel with ACD_DEBUG option.

Jun  8 12:10:06 sana /kernel.test: ata1: unwanted interrupt 1 status = 7f
Jun  8 12:10:06 sana /kernel.test: ata0: master: setting up UDMA2 mode on PIIX4 
chip OK
Jun  8 12:10:06 sana /kernel.test: ad0: QUANTUM FIREBALL EX3.2A/A0A.0D00 
ATA-4 disk at ata0 as master
Jun  8 12:10:06 sana /kernel.test: ad0: 3079MB (6306048 sectors), 6256 cyls, 16 
heads, 63 S/T, 512 B/S
Jun  8 12:10:06 sana /kernel.test: ad0: piomode=4, dmamode=2, udmamode=2
Jun  8 12:10:06 sana /kernel.test: ad0: 16 secs/int, 0 depth queue, DMA mode
Jun  8 12:10:06 sana /kernel.test: ata0: slave: setting up UDMA2 mode on PIIX4 
chip OK
Jun  8 12:10:06 sana /kernel.test: ad1: IBM-DTTA-351010/T56OA73A ATA-4 disk 
at ata0 as slave 
Jun  8 12:10:06 sana /kernel.test: ad1: 9671MB (19807200 sectors), 19650 cyls, 
16 heads, 63 S/T, 512 B/S
Jun  8 12:10:06 sana /kernel.test: ad1: piomode=4, dmamode=2, udmamode=2
Jun  8 12:10:06 sana /kernel.test: ad1: 16 secs/int, 31 depth queue, DMA mode
Jun  8 12:10:06 sana /kernel.test: atapi: acd: mode sense  
0-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
Jun  8 12:10:06 sana /kernel.test: atapi: acd: mode sense  
0-1a-70-00-00-00-00-00-2a-12-03-00-71-00-29-00-10-8a-00-02-00-78-10-8a-00-00-00-00
Jun  8 12:10:06 sana /kernel.test: atapi: acd: mode sense  
0-1a-70-00-00-00-00-00-2a-12-03-00-71-00-29-00-10-8a-00-02-00-78-10-8a-00-00-00-00
Jun  8 12:10:06 sana /kernel.test: atapi: acd: mode sense  
0-1a-70-00-00-00-00-00-2a-12-03-00-71-00-29-00-10-8a-00-02-00-78-10-8a-00-00-00-00
Jun  8 12:10:06 sana /kernel.test: atapi: acd: mode sense  
0-1a-70-00-00-00-00-00-2a-12-03-00-71-00-29-00-10-8a-00-02-00-78-10-8a-00-00-00-00
Jun  8 12:10:06 sana /kernel.test: atapi: ICD-3600AT/ A01 CDROM device at 
ata1 as slave - NO DRIVER!

And by modifying the code, the mode_sense error seems to be 96(decimal).

Any suggestions?

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message



Re: Newconfig has silenced smb support

1999-05-05 Thread Takanori Watanabe
In message 05b301be975c$806d8880$6cb61...@scitec.com.au, John Saunders 
wrote:
However since this update the kernel isn't recognising the SMB device.
I have tried things like adding at pci? to the end of the controller
config lines to no available. I've got an Intel chipset MB so I'm
using the Intel SMB controller.

Sorry, I'm not familiar with newconfig bus rewriting,though I subscribe
newconfig list.(;_;)

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 




To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message



Re: suspend mode broken since one week ago

1999-04-27 Thread Takanori Watanabe
In message pine.bsf.4.05.9904270858150.36113-100...@herring.nlsystems.com, Do
ug Rabson wrote:
I have the ACPI spec and I'm starting to get to grips with it. Initially,
I will be trying to use the static device configuration tables but power
management, docking and all that other good stuff should come eventually.

Don't you try my code?
I put it at
http://www.planet.sci.kobe-u.ac.jp/~takawata/acpi/acpi-19990427.tar.gz
.
Currentry what it can do is  not so different from my previous code,
but I'll write a code to show ACPI name space tree in a few days.

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message



Re: suspend mode broken since one week ago

1999-04-27 Thread Takanori Watanabe
In message 199904271352.haa17...@harmony.village.org, Warner Losh 
$B$5$s$$$o$/(B:
In message pine.bsf.4.05.9904270858150.36113-100...@herring.nlsystems.com Do
ug Rabson writes:
: I have the ACPI spec and I'm starting to get to grips with it. Initially,
: I will be trying to use the static device configuration tables but power
: management, docking and all that other good stuff should come eventually.

One problem that I've had in trying to use the acpi spec to implement
something is that the acpi tables on my laptop get overwritten early
in the boot process on my Vaio.  The driver would have to copy the
tables.
Use 
options VM86
.

vm86.c:initial_bioscalls() imprements ACPI Spec section 15.

Mr. Jonathan, your code works in my machine now.
 Now it use Int15h:E820H call.

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message



Re: newbus and modem(s)

1999-04-19 Thread Takanori Watanabe
In message pine.bsf.4.05.9904190929070.85882-100...@herring.nlsystems.com, Do
ug Rabson wrote:
On Mon, 19 Apr 1999 takaw...@shidahara1.planet.sci.kobe-u.ac.jp wrote:
 Simple Question.
 If there were 'Closed'-Host-Controller-Interface with object-only driver,
 Can the vendor make the Host controller  recognized without changing 
 usb.c code?
 
 #That's what frustrated me while writing driver for smbus controller.

It really depends on the nature of the bus. For plug-and-play style busses
such as USB and PCI, the controller can decide what devices exist without
the help of drivers and can then uniquely match them with the right
driver.  This trivially allows drivers to be added after the system is
running.

I don't mention on upstream driver such as 'ukbd' 
(I think such device can be add truly dynamic),but I mention on 
'host-controller' like [ou]hci. 

What I ask is what shall I do if there is a downstream driver without 
declared DRIVER_MODULE on upstream bus.Are there any way without changing 
upstream bus code?

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 




To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message



Re: newbus and modem(s)

1999-04-19 Thread Takanori Watanabe
In message 19990419124505.62d951...@spinner.netplex.com.au, Peter Wemm wrote:
Never mind, I understand now. :-)

Ok, I think I also understand.
The DRIVER_MODULE() macro is consist for static configuration to kick 
module initialization routine for every driver.Is it correct?

But are ther more better way?

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 






To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message



Re: How do I query system temperature probes ?

1999-02-04 Thread Takanori Watanabe
In message 36b8ea32.d5105...@dsto.defence.gov.au, Matthew Thyer wrote:
Thanks,

Takanori, are you going to commit your example code in
say /usr/src/share/examples/smbus ?

If not can you send me a copy please ?

I'll announce about it in current list also.
I'm sorry if you see this twice.

Message-Id: 199901251651.baa27...@shidahara1.planet.sci.kobe-u.ac.jp
To: hack...@freebsd.org
Subject: Some SMBus Stuffs.
Date: Tue, 26 Jan 1999 01:51:13 +0900
From: Takanori Watanabe takaw...@shidahara1.planet.sci.kobe-u.ac.jp

The driver for SMBus on Intel PIIX4 Power Management Controller 
has been commited.
Now, I have some examples for SMBus application.
It is available at 
http://www.planet.sci.kobe-u.ac.jp/~takawata/smbus/examples/
.
(snip)

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message


Re: How do I query system temperature probes ?

1999-02-02 Thread Takanori Watanabe
In message 36b7ced1.96d4b...@dsto.defence.gov.au, Matthew Thyer wrote:

Extract from dmesg:

chip0: Host to PCI bridge (vendor=8086 device=7180) rev 0x03 on
pci0.0.0
chip1: PCI to PCI bridge (vendor=8086 device=7181) rev 0x03 on
pci0.1.0
chip2: Intel 82371AB PCI to ISA bridge rev 0x01 on pci0.7.0
ide_pci0: Intel PIIX4 Bus-master IDE controller rev 0x01 on pci0.7.1
chip3: Intel 82371AB Power management controller rev 0x01 on pci0.7.3

Commited code on pcisupport.c from 1.88 to 1.89 will break it.
If intpm.h is not included,chipset probe code is used instead of 
the driver probe code.

Takanori Watanabe
a href=http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html;
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 

P.S
I have forgotten to enclose unused variable in #undef ENABLE_ALART
with #ifdef ENABLE_ALART - #endif ,so the variable may deleted when it
was commited. And currently ENABLE_ALART code will not work properly.


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message