[tlinux-users:08145] Re: New release of omnibook module soon: testing welcome

Holger Nelson <[email protected]>
Newsgroups gmane.linux.hardware.toshiba
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 12 Sep 2006, Holger Nelson wrote:

> As little proof I modified
> 	u32 retval=0;
> to
> 	u32 retval=255;
> in nbsmi_smi_command and got the expected errors in dmesg:
> [4350356.495000] omnibook: smi_command failed with error 255.

On second thougt this was not fair so I also modified assembly to reset it 
to 0 on success and did another test:
__asm__ __volatile__("pushf;    \
		      pusha;    \
		      outw %w1,%2;    \
                      orw %%ax, %%ax;    \
                      jnz 1f;        \
                      movl $0, %0;    \
                      1:;    \
                      popa;    \
                      popf"
                      : "=m" (retval)
                      : "a"(function), "N"(INTEL_SMI_PORT), "i"(-EIO)
                      );

BTW. orw %%ax,%%ax also sets the z-flag and is shorter in machine-code. 
The result is the same, though.

Holger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Made with pgp4pine 1.76

iD8DBQFFBpv1V71P2fDJM84RAn8iAKCo+pXRTc1RpB9WWEsRyvO5m4UtWQCgietz
CWEmBnvzQgVBk/tS4CBcBvs=
=gkuG
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.