-current on ibm tp a20p?

2000-11-24 Thread Christian Carstensen


hi,

has someone of you got -current working on a ibm thinkpad a20p?
at the moment, i can't use pccard and sound card support.
to be honest, this problem is not -current specific, - it also occurs
with 4.x os.

the sound card is a Crystal Semiconductor CS 4624 controller with CS 4297A
AC97 codec, pcic0 is a TI PCI-1450 PCI-CardBus Bridge.

sound output results in "pcm0: play interrupt timeout, channel dead".
when inserting a pccard, the card is not being recognized, pccardd tends
to  call it something like "Null, Null".

Any hints or ideas?


regards,
   christian



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



RE: Mutex, SMBUS, ACPI (Re: how to mutex'ify a device driver)

2000-11-24 Thread John Baldwin


On 23-Nov-00 Nicolas Souchu wrote:
 On Wed, Nov 22, 2000 at 04:58:32PM -0800, Archie Cobbs wrote:
 As a relatively simple exercise in -current kernel programming,
 I'm planning to mutex'ify the ichsmb(4) device driver (this is
 a relatively simple driver that currently uses splhigh()). I'd
 appreciate some feedback if what I'm doing is the right thing.
 
 What are kernel mutex? A new mechanism for spl replacement? Is it
 introduced with the new SMP? I found nothing in the mail archives...

Yes, they are used to replace spl()'s.  You can read the mutex(9) manpage in
-current for details about how the mutexes work.  Hopefully before too long I
will be adding some stuff to the developer's handbook to explain how to use the
mutexes in the kernel.

-- 

John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


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



Re: -current scheduler strangeness

2000-11-24 Thread Rogier R. Mulhuijzen

(Stuff about sound skippage  mouse jerkiness snipped)

I'm getting this too, in fact even pcmplay (about as minimalistic as you
can get) skips a lot and often throws hwptr went backwards.  Oh yeah, I'm
using an AWE64 PnP as well.

Making the sound buffer 32K instead of 4K (like a related thread on this 
list suggested) helped me with the sound, listening to MP3's while I work 
is now bearable, and I don't get the "hwptr moved backwards" crap, but the 
jerkiness is still there.

It's been said it's caused by IRQ latency and that the SMPNG guys are 
working on it, so I guess it's a question of keeping current till this is 
solved.

 DocWilco



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



Re: -current on ibm tp a20p?

2000-11-24 Thread Rogier R. Mulhuijzen



when inserting a pccard, the card is not being recognized, pccardd tends
to  call it something like "Null, Null".

1) is this a CardBus card maybe?
2) What does 'pccardc dumpcis' return?

 DocWilco



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



Re: RFC: /dev/console - /var/log/messages idea/patch

2000-11-24 Thread Alexander Leidinger

On 24 Nov, Cyrille Lefevre wrote:

  The attached patch is a "proof-of-concept" on which I would like
  to get some comments:
   
  I'm only a moronic user, but this would make my life easier.  My machine
  switches into 132x43 on startup, and I always lose the output.  So this
 
 Its in the scrollback buffer.
 
 and how do you access the scroll-back buffer if you are not front to the
 console (read remote) ?

You can't.

I didn't see the relationship between my answer to Ashley and your
question, can you please give me a hint?

Bye,
Alexander.

-- 
   "One world, one web, one program"  -- Microsoft promotional ad
 "Ein Volk, ein Reich, ein Fuehrer"  -- Adolf Hitler

http://www.Leidinger.net   Alexander @ Leidinger.net
  GPG fingerprint = 7423 F3E6 3A7E B334 A9CC  B10A 1F5F 130A A638 6E7E



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



Re: slight improvement in locore.s?

2000-11-24 Thread Matt Dillon

My two cents:  If it's assembly, and it works, and you didn't 
write it... then don't mess with it unless you absolutely have to.

-Matt


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



Re: -current on ibm tp a20p?

2000-11-24 Thread Christian Carstensen

On Fri, 24 Nov 2000, Rogier R. Mulhuijzen wrote:

 1) is this a CardBus card maybe?

It happens with

   a) Lucent WaveLAN (silver)
   b) 3com 3c589d


 2) What does 'pccardc dumpcis' return?

Code 85 not found
Code 85 not found
code Unknown ignored
Code 134 not found
Code 134 not found
code Unknown ignored
Code 13 not found
Code 13 not found
code Unknown ignored
Code 195 not found
Code 195 not found
code Unknown ignored
Code 100 not found
Code 100 not found
code Unknown ignored
Code 115 not found
Code 115 not found
code Unknown ignored
Code 93 not found
Code 93 not found
code Unknown ignored
Code 96 not found
Code 96 not found
code Unknown ignored
Code 192 not found
Code 192 not found
code Unknown ignored
Configuration data for card in slot 0
Tuple #1, code = 0x0 (Null tuple), length = 12
000:  40 cb a3 00 00 00 00 00 00 20 40 60
Tuple #2, code = 0x0 (Null tuple), length = 139
000:  55 44 16 00 01 f3 00 30 70 50 49 2e c0 8b 2e c0
010:  50 49 86 29 00 18 00 00 0c 01 00 00 2e c0 8b 8b
020:  24 6e 01 00 00 00 00 b4 c6 02 00 00 00 41 00 00
030:  0d 43 70 72 67 74 28 29 31 39 2c 39 38 31 39 20
040:  49 74 6c 43 72 6f 61 69 6e 0a 49 74 6c 43 72 6f
050:  61 69 6e 49 74 6c 55 44 2c 50 45 32 30 28 75 6c
060:  20 37 29 18 18 ff 00 80 54 41 00 f2 00 b4 cd 0a
070:  74 32 c3 01 16 02 c0 c0 02 e4 c0 55 ec 60 46 b4
080:  bb 00 01 cd 66 90 c2 00 20 e2 c3
Tuple #3, code = 0x0 (Null tuple), length = 220
000:  6a e8 ff 55 ec 53 c5 04 07 00 09 e4 e8 ff eb 1f
010:  58 c2 00 8b 50 46 24 04 3c 76 04 50 a2 58 c2 00
020:  8b 50 46 c0 04 e8 ff c0 50 d1 58 c2 00 8b 50 46
030:  86 50 d9 86 50 d3 58 c2 00 8b 66 66 46 66 c0 50
040:  d7 66 c0 50 cf 66 5d 04 55 ec 50 8b 04 c1 10 e8
050:  ff 3a 36 66 c0 50 ab 66 5d 04 55 ec 53 1e 46 8e
060:  06 8b 08 4e 67 03 43 f9 59 5b e4 c2 00 66 06 30
070:  2b 8b 4e 02 75 16 66 f6 f5 6c 66 c0 c0 c1 04 03
080:  89 02 c1 10 46 88 07 46 2f c6 05 8d 10 56 66 ca
090:  88 04 76 66 ca c7 00 ff 46 93 6c 89 02 c1 10 5e
0a0:  88 07 c1 10 46 ff c6 05 b4 f8 15 5d c4 55 07 5e
0b0:  32 80 00 01 c3 80 28 f0 00 1e 4d 1e 46 f0 07 59
0c0:  38 59 00 60 08 2e 1e 00 e1 cd 72 80 00 1a e1 80
0d0:  80 0b 2e 1e 00 e1 cd 72 80 00 00 61
Tuple #4, code = 0x0 (Null tuple), length = 96
000:  8b e6 bf 00 0a cd 66 f9 74 f6 01 1c 2a 18 b8 b1
010:  1a 83 01 30 b8 b1 1a 06 02 10 83 01 30 b8 b1 1a
020:  06 02 61 c3 60 3e 02 77 80 bd 00 18 33 0e 02 33
030:  2e 1e 00 30 b8 b1 1a 1d 0e 02 8b e6 bf 00 0a cd
040:  66 e1 bf 00 0d cd 66 90 52 4c f5 88 02 00 03 49
050:  74 6c 42 6f 20 67 6e 20 65 73 6f 20 2e 20 42 69
Tuple #5, code = 0x0 (Null tuple), length = 48
000:  36 00 00 00 00 00 00 01 e8 ff 83 bd 00 04 c0 04
010:  01 cb 60 06 40 26 13 0e 83 20 e0 66 33 66 00 00
020:  2e 0e 03 03 8a 66 c1 03 00 d1 66 e9 66 83 40 00
Tuple #6, code = 0x0 (Null tuple), length = 14
000:  26 e8 fd 3c 0d 50 45 45 30 20 6f 6c 20 6f
Tuple #7, code = 0x20 (Manufacturer ID), length = 105
000:  64 65 6f 67 20 72 65 62 73 20 65 6f 79 00 c0 ff
010:  80 00 8d 81 00 75 e2 8c c1 06 8c 8b 6a 07 8b 13
020:  83 20 e1 8e 2e 26 03 50 53 2e 3e 02 75 66 8b a5
030:  66 0f 1e 02 2e b7 ab 66 d9 17 2e 16 02 2e b7 b5
040:  66 0f 0e 02 03 66 d3 83 10 c1 04 c1 04 33 5b 66
050:  e3 66 e3 33 2e 0e 03 03 8e 83 02 e9 1b 73 eb e8
060:  fe 50 e0 0e 0f 50 ff 92 cb
PCMCIA ID = 0x6564, OEM ID = 0x676f
Tuple #8, code = 0x0 (Null tuple), length = 229
000:  5b 8e 8b fb 8b 8a 2e 0e 03 c1 03 e9 d1 c1 0a 03
010:  90 81 00 8e 33 33 fc aa 1d 0a 45 69 69 67 74 65
020:  52 4c 4c 61 65 0d 0a e8 fd 68 05 d4 b4 b9 00 c0
030:  cd 07 66 90 e8 fd e8 fe f8 75 c3 a9 0e c6 e8 fb
040:  68 00 a6 53 66 57 1e 0f 0f 66 83 b1 00 0b f7 a3
050:  40 0f c6 ba c0 da 3e 00 aa 69 c2 00 fa f0 ec 68
060:  05 68 66 83 b1 00 85 00 12 0d 50 45 45 31 20 61
070:  65 63 64 20 4f 20 44 73 72 63 75 65 77 73 6e 74
080:  66 75 64 00 c3 07 e3 f8 eb 08 eb 03 72 eb 8a 02
090:  80 00 8e e3 53 6a 1e 00 a8 3c 74 e9 ff 3e 00 ff
0a0:  74 3b 73 66 3d 42 24 b8 b6 04 f8 72 50 00 1e 00
0b0:  78 3c 74 eb 8c 8e 66 83 b1 00 17 f7 a3 40 0f 92
0c0:  66 81 24 43 0f 86 0e 20 2e 36 00 ff ee 2e 36 00
0d0:  ff e8 2e 36 00 00 c4 50 68 06 26 75 cb c4 5a c4
0e0:  83 00 1f 68 06
Tuple #9, code = 0x0 (Null tuple), length = 82
000:  af eb 0d 42 5f 6f 64 72 29 3d 20 bb 00 db 48 8a
010:  6c 38 74 8a e2 0f 0f 07 5e 66 59 c3 0a 4e 49 49
020:  4c 29 66 0f 16 00 2e b7 2e 66 d0 2e b7 30 66 d0
030:  2e b7 b9 66 d0 2e b7 bb 66 d0 81 ff 00 66 ea b8
040:  00 c0 8b 13 2b 26 36 00 66 53 50 a1 00 e0 8e 66
050:  e2 66
Tuple #10, code = 0x0 (Null tuple), length = 219
000:  89 66 74 83 04 f4 db c3 10 db db e8 58 66 1f d0
010:  c1 10 c4 c1 10 8b 2c fa 40 8e 36 26 00 e4 8e 8b
020:  fb c1 10 50 53 57 55 00 00 6a 66 00 56 ec 40 8e
030:  26 16 00 e2 83 18 fc a1 00 89 02 a1 00 89 04 a1
040:  00 89 06 a1 00 89 08 

Re: Confusing error messages from shell image activation

2000-11-24 Thread Garrett Wollman

On Thu, 23 Nov 2000 23:39:07 -0600 (CST), Mike Meyer [EMAIL PROTECTED] said:

 Um - compliance with what, exactly?

IEEE Std.1003.1-1990 et seq.

-GAWollman



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



OpenSSH 2.3.0 pre-upgrade

2000-11-24 Thread Brian F. Feldman

(Please direct followups to [EMAIL PROTECTED] and remove all
extraneous addresses.  I'm cross-posting in hopes of reaching the
right audiences that won't necessarily overlap.)

It's time again for an upgrade to our FreeBSD OpenSSH.  Version 2.3.0 was 
released a few weeks back, and working off that I've produced a set of diffs 
from either what's in the tree now or the original OpenBSD, 2.3.0 sources.

What's new in this release?  Mostly the adding of the AES (Rijndael) to the 
SSH2 algorithms.  Is anything now broken?  Well, nothing new broken that I 
know of; there was an issue of the canonical host name not being used, which 
I could have sworn it was before: in either case, it is used now.  The auth 
loops previously did not take NULL struct passwd * arguments, but now they 
do (to inform them to fake authorization).  This deprecated our fake auth 
loop, but gave me a lot of work to correct the logic in the code that 
expects non-NULL pw's.  I think I did it all, but wouldn't be surprised if 
there's still a mistake, so I'd really appreciate others looking at it.

There's some weird issue where for the Diffie-Hellman exchange, OpenSSH 
wants primes but doesn't seem to want to generate them... it expects an
/etc/ssh/primes (which should become /var/run/ssh_primes, if anything) and I 
have no clue where the program is that supposedly generates them.  So, for 
SSH2, the authentication stage generates a large warning and uses a 
hardcoded prime.  This should not actually have an affect on security, 
though, according to my understanding of the Diffie-Hellman protocol.

I probably fixed a ton of smaller bugs on the way I've all but forgotten 
about now.  I'd appreciate anyone who can either test this out to see if it 
works for them (I upgraded all my OpenSSH stuff to 2.3.0, and it is working 
great) or review the changes.  If I've made some mistakes in the code I've 
changed, it could easily be a huge security issue, so it would be really 
nice to have others back me up on the changes made.

The patch to apply on a -CURRENT/-STABLE FreeBSD system's src tree to update 
to this version can be found at:
http://green.bikeshed.org/OpenSSH-2.3.0.patch.gz

Similarly, the diffs from plain OpenBSD OpenSSH 2.3.0 to ours are at:
http://green.bikeshed.org/OpenSSH_to_FreeBSD-2.3.0.patch.gz

Thanks!

--
 Brian Fundakowski Feldman   \  FreeBSD: The Power to Serve!  /
 [EMAIL PROTECTED]`--'




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



Re: -current on ibm tp a20p?

2000-11-24 Thread Yoichi ASAI

Christian Carstensen [EMAIL PROTECTED] wrote:

 has someone of you got -current working on a ibm thinkpad a20p?
 at the moment, i can't use pccard and sound card support.
 to be honest, this problem is not -current specific, - it also occurs
 with 4.x os.

I have ThinkPad A20m, perhaps that is a subset of A20p.
On these laptops, use 0xd4000 as memory slots.

-- kernel config hint file --
hint.pcic.0.maddr="0xd4000"

-- /etc/pccard.conf --
memory  0xd4000  96k

Pccard works fine with these settings.

On the other hand, sound chip does not work. Kernel recognizes
Crystal SoundFusion as CS461x, with device pcm and csa included
in my config. But IRQ sharing prevents it from working.
mpg123 and play (sox) return this message:

pcm0: play interrupt timeout, channel dead

-- dmesg --
csa0: Crystal Semiconductor CS4614/4622/4624 Audio accelerator/
4280 Audio controller mem 0xf400-0xf40f,0xf4121000-0xf4
121fff irq 11 at device 5.0 on pci0
pcm0: CS461x PCM Audio on csa0

---
Yoichi ASAI [EMAIL PROTECTED]


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



Re: -current scheduler strangeness

2000-11-24 Thread Alex Zepeda

On Mon, Nov 20, 2000 at 03:43:27PM +0100, Szilveszter Adam wrote:

 The messages did not start with SMPNG but got a *lot* more frequent in the
 last couple of weeks, making listening to mp3-s a real annoyance during any
 more serious system activity. (Earlier, ie in the early fall and in the
 summer) these messages were almost never seen while in console mode, but
 only with X and RealPlayer messing things up.

I'm getting this too, in fact even pcmplay (about as minimalistic as you
can get) skips a lot and often throws hwptr went backwards.  Oh yeah, I'm
using an AWE64 PnP as well.

- alex


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



stranges in threads implementation... possible bug?

2000-11-24 Thread Sergey Osokin

Hello!
My friend find some stranges in FreeBSD threads implementation...
Here is a "special" code:

=
#include stdio.h
#include assert.h
#include string
#include pthread.h
#include unistd.h
#include errno.h

#define Debug(x)printf x

extern "C" {
typedef void *(*_THR_C_FUNC)(void *args);
}
typedef void *(*_THR_FUNC)(void *args);

/*-*/
classMutex
{
public:
  Mutex() { assert(::pthread_mutex_init(this-lock_, 0) == 0); }
  ~Mutex (void) { assert(::pthread_mutex_destroy(this-lock_)==0); }
  int acquire (void) { return ::pthread_mutex_lock(this-lock_); }
  int release (void) { return ::pthread_mutex_unlock (this-lock_); }
  pthread_mutex_t lock_;
};

/*-*/
class Condition
{
public:
  Condition (Mutex m);
  ~Condition (void);
  int wait (void);
  void signal (void);
protected:
  pthread_cond_t cond_;
  Mutex mutex_;
};

Condition::Condition (Mutex m) : mutex_ (m)
{
  assert (pthread_cond_init(this-cond_, 0) == 0);
}

Condition::~Condition (void)
{
   
while(::pthread_cond_destroy(this-cond_) == -1  errno == EBUSY)
  {
assert(::pthread_cond_broadcast(this-cond_) == 0);
#ifdef __linux__
::sched_yield ();
#else
::pthread_yield();
#endif
  }
}

int Condition::wait (void)
{
  return ::pthread_cond_wait(this-cond_, this-mutex_.lock_);
}

void Condition::signal (void)
{
  assert(::pthread_cond_signal(this-cond_) == 0);
}

/*-*/
class Guard
{
public:
  Guard (Mutex l);
  ~Guard (void);
private:
  Mutex *lock_;
};
Guard::Guard (Mutex l)
  : lock_ (l)
{
  this-lock_-acquire ();
}
Guard::~Guard (void)
{
  this-lock_-release ();
}

/*-*/
class _Base_Thread_Adapter
{
public:
  _Base_Thread_Adapter (_THR_FUNC user_func, void *arg);
  void *invoke (void);
  _THR_C_FUNC entry_point (void) { return entry_point_; }

private:
  _THR_FUNC user_func_;
  void *arg_;
  _THR_C_FUNC entry_point_;
};

extern "C" void * _thread_adapter (void *args)
{
  _Base_Thread_Adapter *thread_args = (_Base_Thread_Adapter*)args;
  void *status = thread_args-invoke ();
  return status;
}

_Base_Thread_Adapter::_Base_Thread_Adapter (_THR_FUNC user_func, void *arg)
  : user_func_ (user_func), arg_ (arg), entry_point_ (_thread_adapter)
{
}

void *
_Base_Thread_Adapter::invoke (void)
{
  void *(*func)(void *) = this-user_func_;
  void *arg = this-arg_;
  delete this;
  return func(arg);
}

/*-*/
class SS {
  public:
void spawn();
static void run();
static void *WThread( void *data );
};
  
/*-*/
static Mutex CMutex;
static Condition Cond(CMutex);
static Mutex m1;

/*-*/
#define REL(m,n) assert(m.release() != -1)
#define ACQ(m,n) assert(m.acquire() != -1)
  
/*-*/
void *
SS::WThread( void *data )
{
Cond.signal();
Debug(("run thread...\n"));
SS::run();
Debug(("thread ended\n"));
return NULL;
}

/*-*/
int thr_create (_THR_FUNC func, void *args)
{
  _Base_Thread_Adapter *thread_args;
  thread_args  = new  _Base_Thread_Adapter(func, args);
  pthread_attr_t attr;
  if (::pthread_attr_init (attr) != 0)
  return -1;
  ::pthread_attr_setdetachstate(attr, PTHREAD_CREATE_DETACHED);
  pthread_t thr_id;
  assert( ::pthread_create (thr_id, attr,
thread_args-entry_point(), thread_args) == 0 );
  ::pthread_attr_destroy (attr);
}
/*-*/
void
SS::spawn()
{
#ifdef BAD
int rc;
Guard guard(m1);   // !!!
#else
Guard guard(m1);   // !!!
int rc;
#endif
pthread_attr_t attr;
if (::pthread_attr_init (attr) != 0) return;
::pthread_attr_setdetachstate(attr, PTHREAD_CREATE_DETACHED);
thr_create(SS::WThread, (void *)0);
::pthread_attr_destroy (attr);
ACQ(CMutex, "CMutex");
rc = Cond.wait();
if( rc == -1 )
  Debug(("Cond wait failed: %s\n", strerror(errno)));
REL(CMutex, "CMutex"); 
}

/*-*/
void
SS::run()
{
string s;   // !!!
string s1;  // !!!
sleep(1);
}

/*=*/
static void sp_call(SS *ss)
{
string s;   // !!!
ss-spawn();
}

/*--*/
int main(int argc, char **argv)
{
SS ss;
sp_call(ss);
sleep(2);
Debug(("Exitting...\n"));
sleep(3);
return 0;
}
=

and here is is a