Subject: Re: i386 laptop questions:
To: None <port-i386@NetBSD.ORG>
From: None <rvb@IGW.TRUST.CS.CMU.EDU>
List: port-i386
Date: 06/16/1995 15:41:24
I will soon get a Hinote Ultra loaner and might be in a better
position to advise you. I use a NEC VERSA E. I run a may 15 -current.
The suspend resume problem that I saw is a bug in hdcwait(). Below is
a copy of the code. The problem is that on "errors" wdcwait returns a
1. Some of the code that calls it; checks for < 0. vs != 0. So
there really is no timeout here.
I have an old ATA spec which is a little bit inconsistent. If the
error bit set is really a MEDIA CHANGE, I guess the hardware is
anticipating that you might have removed the hard drive around
the suspend/resume. So this may be a feature.
NOTE: the inittodr(0) is a gross but really convenient hack.
#define new
int
wdcwait(wdc, mask)
struct wdc_softc *wdc;
int mask;
{
int iobase = wdc->sc_iobase;
int timeout = 0;
u_char status;
extern int cold;
#ifdef new
wdc->sc_error = 0;
#endif
for (;;) {
wdc->sc_status = status = inb(iobase+wd_status);
if ((status & WDCS_BSY) == 0 && (status & mask) == mask)
break;
if (++timeout > WDCNDELAY)
return -1;
delay(WDCDELAY);
}
if (status & WDCS_ERR) {
wdc->sc_error = inb(iobase+wd_error);
#ifdef new
if (wdc->sc_error & WDCE_MCR) {
printf("wd: media change\n");
inittodr(0); /* hssss */
}
return -1;
#else
return WDCS_ERR;
#endif
}
#ifdef WDCNDELAY_DEBUG
/* After autoconfig, there should be no long delays. */
if (!cold && timeout > WDCNDELAY_DEBUG)
printf("%s: warning: busy-wait took %dus\n",
wdc->sc_dev.dv_xname, WDCDELAY * timeout);
#endif
return 0;
}
----------------------------------------------------------------------
Next:
I have also seen the seen the Fn+key presses do the wrong thing. I am
not sure what is wrong here.
I can give you a dlink DE600 driver if that helps.
I've seen a 3c589 driver for linux.
Finally, I'd guess the battery drain is really a hardware problem.
In suspend/resume the machine should really be off. I presume that
the battery normally lasts 2+ hours. If it drains in 1 hour here
that would be really strange.