From owner-freebsd-mobile Sun May 5 13:35:40 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA07791 for mobile-outgoing; Sun, 5 May 1996 13:35:40 -0700 (PDT) Received: from frig.mt.cs.keio.ac.jp (frig.mt.cs.keio.ac.jp [131.113.32.7]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id NAA07774 Sun, 5 May 1996 13:35:31 -0700 (PDT) Received: (from hosokawa@localhost) by frig.mt.cs.keio.ac.jp (8.6.12+2.4W/3.4Wbeta3) id FAA11285; Mon, 6 May 1996 05:35:20 +0900 Date: Mon, 6 May 1996 05:35:20 +0900 Message-Id: <199605052035.FAA11285@frig.mt.cs.keio.ac.jp> To: freebsd-announce@freebsd.org, freebsd-mobile@freebsd.org, freebsd-hackers@freebsd.org Reply-To: freebsd-mobile@freebsd.org, hosokawa@mt.cs.keio.ac.jp Subject: [PCMCIA] pccard-test-960506 is now available! From: hosokawa@mt.cs.keio.ac.jp (HOSOKAWA Tatsumi) X-Mailer: mnews [version 1.18PL3] 1994-08/01(Mon) Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk We release the new PC-card package based on FreeBSD 2.2-960501-SNAP. You can get it from ftp://ryukyu.mt.cs.keio.ac.jp/pub/FreeBSD/pccard/pccard-test-960506.tar.gz (Note that we changed the ftp site because bash.cc.keio.ac.jp is unstable these days.) Please read http://www.mt.cs.keio.ac.jp/person/hosokawa/freebsd-pcmcia/ for details. ----------------------------------------------------------------------- Current Status ----------------------------------------------------------------------- Type Card Status Driver ----------------------------------------------------------------------- Ethernet 3Com Etherlink III 3C589 OK nep 3Com Etherlink III 3C589B OK nep 3Com Etherlink III 3C589C OK nep Accton EN2212 OK ed Contec C-NET(PC)C OK fe Dayna Communications CommuniCard E OK ed D-link DE-650 Ethernet Card OK ed Eiger Labs EPX-ET10T2 Combo OK ed Farallon EtherMac OK nep Fujitsu FMV-J181 OK fe Fujitsu FMV-J182 OK fe Fujitsu FMV-J182A OK fe GVC NIC-2000P Ethernet Card OK ed Hitachi HT-4840-11 OK fe IC-card Ethernet OK ed IBM Creditcard Ethernet I OK ed IBM Creditcard Ethernet II OK ed Megahertz Ethernet Adapter OK sn Megahertz X-Jack Ethernet OK sn Melco LPC-T OK ed NextCom J Link NC5310 OK fe PLANET Smart Com 2000 OK ed PLANET Smart Com 3500 OK ed RATOC REX-9821 OK fe TDK LAK-CD021 OK fe TDK LAK-CD021A OK fe FAX/Modem Virtually all modem card should work sio *1 (but it still does not work on some machines...) Alpha-testers reported that they can use the following cards. AIWA PV-JF144 OK sio AIWA PV-JF288 OK sio APEX DATA Mobile Plus V.34 OK sio Dell Dacom Modem/FAX V32.bis OK sio Fujitsu FMV-JMD712 OK sio GATEWAY2000 MODEM OK sio Hayes OPTIMA 144 OK sio Hayes OPTIMA 288 V.34 OK sio IBM Push/Pop Modem OK sio I/O Data PCFM144 FAX/Modem OK sio Lasat Credit 288, V34 Data/Fax Modem OK sio Megahertz XJ1144 OK sio Megahertz XJ2144 OK sio Megahertz XJ2144 (JP) OK sio Megahertz XJ2288 OK sio Megahertz XJ3288 (JP) OK sio NewMedia FAX/Modem 14.4K OK sio Novalink NovaModem 144 OK sio NTT-IT ThunderCard AVF288 OK sio OMRON ME2814 Fax/Modem OK sio OMRON MD24XCA Fax/Modem OK sio Panasonic CF-JMD101 OK sio Panasonic TO-CAF288 OK sio PREMAX FM288 OK sio Smart ST1414L Fax/Voice/Modem OK sio TDK DF1414 OK sio TDK DF1414EX OK sio TDK DF2814B/M OK sio US Robotics Sportster PCMCIA V.34 OK sio *2 US Robotics COURIER PCMCIA V.34 OK sio *2 ISDN BUG Linkboy D64K OK sio Digital Cellular NTT DoCoMo DATA/FAX Adapter OK sio SCSI Adaptec SlimSCSI APA-1460 OK aic NewMedia BusToaster OK aic RATOC REX-5535AC OK spc RATOC REX-5535AMC OK spc RATOC REX-5535X OK spc RATOC REX-5535XM OK spc Flash ATA Virtually all Flash ATA card should work wdc *1 Alpha-testers reported that they can use the following cards. Epson Flash Packer 5MB OK wdc Epson Flash Packer 20MB OK wdc Epson Flash Packer 40MB OK wdc HP F1012A OK wdc Midori Elec. Fast Flash OK wdc SunDisk SPD5-5 OK wdc SunDisk SPD5-20 OK wdc SunDisk SPD-40 OK wdc ATA HDD Virtually all ATA HDD card should work wdc *1 Alpha-testers reported that they can use the following cards. Epson America Inc. EHDD170 OK wdc Maxtor MobileMax MXL131 OK wdc Mitsubishi M6887-3 170MB OK wdc ATAPI CD-ROM DEC Digital Mobile Media OK wdc *3 ----------------------------------------------------------------------- *1 Some cards or laptops needs modifications to /etc/pccard.conf, and some combinations of cards and laptops do not work. *2 But, there are also some reports that US Robotics Modem cards can't be used with this package. *3 This CD-ROM has PCIC in it, so it can't be hotplugged. And, ATAPI CDROM is supported by 2.2-SNAP only. ----------------------------------------------------------------------- These are most of supported Ethernet cards of Linux PCMCIA package and the cards whose chipset is supported by current FreeBSD PC-Card package. I think that most of these cards should work and I've already written configurations for some of them in /etc/pccard.conf in this package, but they are not tested. If you have (or your friend has :-)) these cards, please test them and e-mail me (hosokawa@mt.cs.keio.ac.jp) the result WHETHER THEY WORK OR NOT!!! If you can't use these card with this package, send me the following data. 1. Name of the card 2. Name of the chipset the card uses (if you can know that) 3. The result of "pccardc dumpcis" (kill pccardd before testing) 4. The result of "pccardc rdattr 0 0 10000" (if you inserted card into second slot, it's "pccardc rdattr 1 0 10000") 5. Your /etc/pccard.conf Please put "[pccard-test]" on the head of the "Subject:" to pick it up easily. ----------------------------------------------------------------------- Type Card Status Driver ----------------------------------------------------------------------- Ethernet Accton EN2216 EtherCard ? ed Allied Telesis Ethernet Card ? ed AST 1082 Ethernet ? ed CNet CN30BC Ethernet Card ? ed CNet CN40BC Ethernet Card ? ed DataTrek NetCard ? ed Digital DEPCM-BA Ethernet ? ed Edimax Ethernet Combo ? ed EFA InfoExpress SPT EFA 205 10baseT ? ed EP-210 Ethernet Card ? ed Epson EEN10B Ethernet Card ? ed Farallon Etherwave ? ed Genius ME3000II Ethernet ? ed Grey Cell GCS2220 Ethernet Card ? ed Hitachi HT-4840-10 ? fe Hypertec HyperEnet ? ed Infotel IN650ct Ethernet ? ed National Semiconductor InfoMover 4100 ? ed Katron PE-520 Ethernet Card ? ed Kingston KNE-PCM/x Ethernet ? ed LANEED Ethernet ? ed Linksys Ethernet Card ? ed Maxtech PCN2000 Ethernet ? ed NDC Instant-Link ? ed Network General "Sniffer" ? ed RATOC REX-5588 Ethernet ? fe RATOC REX-4486 Ethernet ? fe PreMax PE-200 Ethernet Card ? ed Proteon Ethernet ? ed RPTI EP400 Ethernet Card ? ed SCM Ethernet Combo ? ed Thomas-Conrad Ethernet ? ed Trust Ethernet Combo ? ed Volktek Ethernet ? ed ----------------------------------------------------------------------- These cards work, but they have serious problems ----------------------------------------------------------------------- Type Card Status Driver ----------------------------------------------------------------------- Ethernet Socket EA LAN Adapter NG ed (Broken CIS and broken DMA status register, it hangs up on heavy traffic) ----------------------------------------------------------------------- -- HOSOKAWA, Tatsumi E-mail: hosokawa@mt.cs.keio.ac.jp WWW homepage: http://www.mt.cs.keio.ac.jp/person/hosokawa.html Department of Computer Science, Keio University, Yokohama, Japan From owner-freebsd-mobile Mon May 6 12:54:02 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA04262 for mobile-outgoing; Mon, 6 May 1996 12:54:02 -0700 (PDT) Received: from mail.barrnet.net (mail.barrnet.net [131.119.246.7]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id MAA04257 Mon, 6 May 1996 12:54:00 -0700 (PDT) Received: from rocky.sri.MT.net (rocky.sri.MT.net [204.182.243.10]) by mail.barrnet.net (8.7.5/MAIL-RELAY-LEN) with SMTP id MAA13924; Mon, 6 May 1996 12:53:56 -0700 (PDT) Received: (from nate@localhost) by rocky.sri.MT.net (8.6.12/8.6.12) id NAA18490; Mon, 6 May 1996 13:50:59 -0600 Date: Mon, 6 May 1996 13:50:59 -0600 From: Nate Williams Message-Id: <199605061950.NAA18490@rocky.sri.MT.net> To: freebsd-mobile@freebsd.org, hosokawa@mt.cs.keio.ac.jp Cc: freebsd-announce@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: [PCMCIA] pccard-test-960506 is now available! In-Reply-To: <199605052035.FAA11285@frig.mt.cs.keio.ac.jp> References: <199605052035.FAA11285@frig.mt.cs.keio.ac.jp> Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > We release the new PC-card package based on FreeBSD 2.2-960501-SNAP. This is helpful, thanks! However, I don't think there is any need for some (all) of the patches you've made to apm.c now. Based on feedback I've got from some testers, there machines no work fine w/out *any* of the patches you've added back in, so it would be nice to see if you could get the Nomad testers to test apm.c as it appears stock in the new SNAP. Also, some of the patches you add in are completely redundant due to the changes Bruce and I have made to 'apm_int()' (most noted are the cli/sti changes). Also, most of the changes you made to /sys/pccard.c are a step backwards. I fixed them to be correct, and your patches back out my fixes (slot_suspend/resume need to have void parameters for timeout/untimeout, format changes, etc..). Thanks! Nate From owner-freebsd-mobile Mon May 6 23:49:28 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id XAA16284 for mobile-outgoing; Mon, 6 May 1996 23:49:28 -0700 (PDT) Received: from frig.mt.cs.keio.ac.jp (frig.mt.cs.keio.ac.jp [131.113.32.7]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id XAA16279 Mon, 6 May 1996 23:49:19 -0700 (PDT) Received: (from hosokawa@localhost) by frig.mt.cs.keio.ac.jp (8.6.12+2.4W/3.4Wbeta3) id PAA23261; Tue, 7 May 1996 15:48:38 +0900 Date: Tue, 7 May 1996 15:48:38 +0900 Message-Id: <199605070648.PAA23261@frig.mt.cs.keio.ac.jp> To: nate@sri.MT.net Cc: freebsd-mobile@freebsd.org, freebsd-hackers@freebsd.org, hosokawa@mt.cs.keio.ac.jp Subject: Re: [PCMCIA] pccard-test-960506 is now available! In-Reply-To: Your message of Mon, 6 May 1996 13:50:59 -0600. <199605061950.NAA18490@rocky.sri.MT.net> From: hosokawa@mt.cs.keio.ac.jp (HOSOKAWA Tatsumi) X-Mailer: mnews [version 1.18PL3] 1994-08/01(Mon) Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In article <199605061950.NAA18490@rocky.sri.MT.net> nate@sri.MT.net writes: >> This is helpful, thanks! >> >> However, I don't think there is any need for some (all) of the patches >> you've made to apm.c now. Based on feedback I've got from some testers, >> there machines no work fine w/out *any* of the patches you've added back >> in, so it would be nice to see if you could get the Nomad testers to >> test apm.c as it appears stock in the new SNAP. Also, some of the >> patches you add in are completely redundant due to the changes Bruce and >> I have made to 'apm_int()' (most noted are the cli/sti changes). >> >> Also, most of the changes you made to /sys/pccard.c are a step >> backwards. I fixed them to be correct, and your patches back out my >> fixes (slot_suspend/resume need to have void parameters for >> timeout/untimeout, format changes, etc..). Thank you. Okay, I'll release bug-fix patch soon. This is a quick-hack patch. hosokawa diff -crN sys.pccard-960506/i386/apm/apm.c sys/i386/apm/apm.c *** sys.pccard-960506/i386/apm/apm.c Tue May 7 15:27:39 1996 --- sys/i386/apm/apm.c Tue May 7 12:11:52 1996 *************** *** 40,46 **** #include #include #include - #include #include #include #include --- 40,45 ---- *************** *** 52,63 **** static int apm_int __P((u_long *eax, u_long *ebx, u_long *ecx)); static void apm_resume __P((void)); - #define APM_FORCE_APM10_FLAG 0x01 - #define APM_COMPAT_APM10_FLAG 0x02 - #define APM_SUSPEND_POSTPONE_FLAG 0x04 - #define APM_SUSPEND_DELAY_FLAG 0x08 - #define APM_DSVALUE_BUG_FLAG 0x10 - /* static data */ struct apm_softc { int initialized, active; --- 51,56 ---- *************** *** 68,77 **** u_int cs_limit, ds_limit; u_int cs_entry; u_int intversion; - int force_apm10; - int compat_apm10; - int suspend_postpone; - int suspend_delay; struct apmhook sc_suspend; struct apmhook sc_resume; #ifdef DEVFS --- 61,66 ---- *************** *** 116,122 **** if (kdc_apm.kdc_isa) return; kdc_apm.kdc_state = DC_UNCONFIGURED; - kdc_apm.kdc_description = "Advanced Power Management BIOS"; kdc_apm.kdc_unit = 0; kdc_apm.kdc_isa = id; dev_attach(&kdc_apm); --- 105,110 ---- *************** *** 244,257 **** ebx = PMDV_ALLDEV; ecx = PMST_SUSPEND; - __asm("cli"); if (apm_int(&eax, &ebx, &ecx)) { - __asm("sti"); printf("Entire system suspend failure: errcode = %ld\n", 0xff & (eax >> 8)); return 1; } - __asm("sti"); return 0; } --- 232,242 ---- *************** *** 426,438 **** static void apm_processevent(struct apm_softc *); - static void - apm_suspend_bug(void *dummy) - { - apm_resume(); - } - - /* * Public interface to the suspend/resume: * --- 411,416 ---- *************** *** 451,473 **** if (sc->initialized) { apm_execute_hook(hook[APM_HOOK_SUSPEND]); apm_suspend_system(sc); ! /* ! * Some APM implementations needs extra delay here. ! * If the problem of your machine can be solved ! * with APM_SUSPEND_POSTPONE, please do not use ! * APM_SUSPEND_DELAY. ! * ! * HOSOKAWA, Tatsumi ! */ ! if (sc->suspend_delay) { ! DELAY(100000); ! } ! if (!sc->suspend_postpone) { ! apm_processevent(sc); ! } ! else { ! timeout(apm_suspend_bug, NULL, 5 * hz); ! } } } --- 429,435 ---- if (sc->initialized) { apm_execute_hook(hook[APM_HOOK_SUSPEND]); apm_suspend_system(sc); ! apm_processevent(sc); } } *************** *** 677,685 **** apm_event = apm_getevent(sc); switch (apm_event) { OPMEV_DEBUGMESSAGE(PMEV_STANDBYREQ); - #ifndef APM_IGNORE_STANDBYREQ apm_suspend(); - #endif /* !APM_IGNORE_STANDBYREQ */ break; OPMEV_DEBUGMESSAGE(PMEV_SUSPENDREQ); apm_suspend(); --- 639,645 ---- *************** *** 728,745 **** { #define APM_KERNBASE KERNBASE struct apm_softc *sc = &apm_softc; ! caddr_t apm_bios_work = 0; ! #ifdef APM_DSVALUE_BUG ! dvp->id_flags |= APM_DSVALUE_BUG_FLAG; ! #endif /* APM_DSVALUE_BUG */ ! ! if (dvp->id_flags & APM_DSVALUE_BUG_FLAG) { ! apm_bios_work = (caddr_t)malloc(apm_ds_limit, M_DEVBUF, ! M_NOWAIT); ! bcopy((caddr_t)((apm_ds_base << 4) + APM_KERNBASE), ! apm_bios_work, apm_ds_limit); ! } sc->initialized = 0; --- 688,700 ---- { #define APM_KERNBASE KERNBASE struct apm_softc *sc = &apm_softc; ! #ifdef APM_DSVALUE_BUG ! caddr_t apm_bios_work; ! apm_bioswork = (caddr_t)malloc(apm_ds_limit, M_DEVBUG, M_NOWAIT); ! bcopy((caddr_t)((apm_ds_base << 4) + APM_KERNBASE), apm_bios_work, ! apm_ds_limit); ! #endif /* APM_DSVALUE_BUG */ sc->initialized = 0; *************** *** 754,765 **** sc->ds_limit = apm_ds_limit; sc->cs_entry = apm_cs_entry; ! if (!(dvp->id_flags & APM_DSVALUE_BUG_FLAG)) { ! sc->ds_base = (apm_ds_base << 4) + APM_KERNBASE; ! } ! else { ! sc->ds_base = (u_int)apm_bios_work; ! } /* Always call HLT in idle loop */ sc->always_halt_cpu = 1; --- 709,717 ---- sc->ds_limit = apm_ds_limit; sc->cs_entry = apm_cs_entry; ! #ifdef APM_DSVALUE_BUG ! sc->ds_base = (u_int)apm_bios_work; ! #endif /* APM_DSVALUE_BUG */ /* Always call HLT in idle loop */ sc->always_halt_cpu = 1; *************** *** 767,799 **** sc->slow_idle_cpu = ((apm_flags & APM_CPUIDLE_SLOW) != 0); sc->disabled = ((apm_flags & APM_DISABLED) != 0); sc->disengaged = ((apm_flags & APM_DISENGAGED) != 0); - #ifdef COMPAT_APM10 - sc->compat_apm10 = 1; - #else /* COMPAT_APM10 */ - sc->compat_apm10 = (dvp->id_flags & APM_COMPAT_APM10_FLAG); - #endif /* COMPAT_APM10 */ - #ifdef FORCE_APM10 - sc->force_apm10 = 1; - #else /* FORCE_APM10 */ - sc->force_apm10 = (dvp->id_flags & APM_COMPAT_APM10_FLAG); - if (sc->force_apm10) { - sc->compat_apm10 = 1; - } - #endif /* FORCE_APM10 */ - #ifdef APM_SUSPEND_POSTPONE - sc->suspend_postpone = 1; - #else /* APM_SUSPEND_POSTPONE */ - sc->suspend_postpone = (dvp->id_flags & APM_SUSPEND_POSTPONE_FLAG); - #endif /* APM_SUSPEND_POSTPONE */ - #ifdef APM_SUSPEND_DELAY - sc->suspend_delay = 1; - #else /* APM_SUSPEND_DELAY */ - sc->suspend_delay = (dvp->id_flags & APM_SUSPEND_DELAY_FLAG); - #endif /* APM_SUSPEND_DELAY */ - - if (sc->force_apm10) { - apm_version = 0x100; - } /* print bootstrap messages */ #ifdef APM_DEBUG --- 719,724 ---- *************** *** 820,884 **** apm_addr.segment = GSEL(GAPMCODE32_SEL, SEL_KPL); apm_addr.offset = sc->cs_entry; ! if (!sc->compat_apm10) { ! /* Try to kick bios into 1.1 mode */ ! apm_driver_version(); ! } ! ! if (sc->force_apm10) { ! sc->majorversion = 1; ! sc->minorversion = 0; ! } ! else { ! sc->minorversion = ((apm_version & 0x00f0) >> 4) * 10 + ! ((apm_version & 0x000f) >> 0); ! sc->majorversion = ((apm_version & 0xf000) >> 12) * 10 + ! ((apm_version & 0x0f00) >> 8); ! if (sc->majorversion > 10) { /* maybe buggy APM 1.1 */ ! sc->force_apm10 = sc->compat_apm10 = 1; ! sc->majorversion = 1; ! sc->minorversion = 0; ! } ! } sc->intversion = INTVERSION(sc->majorversion, sc->minorversion); ! if (!sc->compat_apm10) { ! if (sc->intversion >= INTVERSION(1, 1)) { ! printf("apm: Engaged control %s\n", ! is_enabled(!sc->disengaged)); ! } } ! if (sc->compat_apm10) { ! printf(" found APM BIOS version %d.%d", ! sc->majorversion, sc->minorversion); ! { ! static char string[100]; ! sprintf(string, "Advanced Power Management BIOS %d.%d", ! sc->majorversion, sc->minorversion); ! if (sc->intversion >= INTVERSION(1, 1)) { ! strcat(string, " (compat-1.0 mode)"); ! } ! kdc_apm.kdc_description = string; ! } ! printf("\n"); ! } ! else { ! printf(" found APM BIOS version %d.%d\n", ! sc->majorversion, sc->minorversion); ! { ! static char string[100]; ! sprintf(string, "Advanced Power Management BIOS %d.%d", ! sc->majorversion, sc->minorversion); ! kdc_apm.kdc_description = string; ! } ! } ! printf("apm: Slow Idling CPU %s\n", is_enabled(sc->slow_idle_cpu)); ! #ifdef APM_DISABLE_BUG ! sc->disabled = 1; ! #endif /* APM_DISABLE_BUG */ /* enable power management */ if (sc->disabled) { --- 745,781 ---- apm_addr.segment = GSEL(GAPMCODE32_SEL, SEL_KPL); apm_addr.offset = sc->cs_entry; ! #ifdef FORCE_APM10 ! apm_version = 0x100; ! sc->majorversion = 1; ! sc->minorversion = 0; ! sc->intversion = INTVERSION(sc->majorversion, sc->minorversion); ! printf("apm: running in APM 1.0 compatible mode\n"); ! kcd_apm.kdc_description = ! "Advanced Power Management BIOS (1.0 compatability mode)", ! #else ! /* Try to kick bios into 1.1 or greater mode */ ! apm_driver_version(); ! sc->minorversion = ((apm_version & 0x00f0) >> 4) * 10 + ! ((apm_version & 0x000f) >> 0); ! sc->majorversion = ((apm_version & 0xf000) >> 12) * 10 + ! ((apm_version & 0x0f00) >> 8); sc->intversion = INTVERSION(sc->majorversion, sc->minorversion); ! if (sc->intversion >= INTVERSION(1, 1)) { ! #ifdef APM_DEBUG ! printf("apm: Engaged control %s\n", is_enabled(!sc->disengaged)); ! #endif } ! printf("apm: found APM BIOS version %d.%d\n", ! sc->majorversion, sc->minorversion); ! #endif /* FORCE_APM10 */ ! #ifdef APM_DEBUG ! printf("apm: Slow Idling CPU %s\n", is_enabled(sc->slow_idle_cpu)); ! #endif /* enable power management */ if (sc->disabled) { *************** *** 890,896 **** } } - #ifndef APM_NO_ENGAGE /* engage power managment (APM 1.1 or later) */ if (sc->intversion >= INTVERSION(1, 1) && sc->disengaged) { if (apm_engage_disengage_pm(sc, 1)) { --- 787,792 ---- *************** *** 901,907 **** #endif } } - #endif /* APM_NO_ENGAGE */ /* default suspend hook */ sc->sc_suspend.ah_fun = apm_default_suspend; --- 797,802 ---- diff -crN sys.pccard-960506/pccard/pccard.c sys/pccard/pccard.c *** sys.pccard-960506/pccard/pccard.c Tue May 7 15:27:50 1996 --- sys/pccard/pccard.c Tue May 7 14:18:31 1996 *************** *** 56,67 **** #include #endif /* NAPM > 0 */ - #include - #include #include #include #include extern struct kern_devconf kdc_cpu0; --- 56,67 ---- #include #endif /* NAPM > 0 */ #include #include #include + #include + #include #include extern struct kern_devconf kdc_cpu0; *************** *** 97,104 **** * drivers do not need to know about the hooks (or the * data structures). */ ! static int slot_suspend(struct slot * sp); ! static int slot_resume(struct slot * sp); static struct apmhook s_hook[MAXSLOT]; /* APM suspend */ static struct apmhook r_hook[MAXSLOT]; /* APM resume */ #endif /* NAPM > 0 */ --- 97,104 ---- * drivers do not need to know about the hooks (or the * data structures). */ ! static int slot_suspend(void *sp); ! static int slot_resume(void *sp); static struct apmhook s_hook[MAXSLOT]; /* APM suspend */ static struct apmhook r_hook[MAXSLOT]; /* APM resume */ #endif /* NAPM > 0 */ *************** *** 351,376 **** */ #if NAPM > 0 static int ! slot_suspend(struct slot * sp) { struct pccard_dev *dp; ! for (dp = sp->devices; dp; dp = dp->next) { (void) dp->drv->suspend(dp); ! } ! if (!sp->susp_keep_pwr) { sp->ctrl->disable(sp); - } return (0); } static int ! slot_resume(struct slot * sp) { #if 1 int s; ! if (sp->devices) { s = splhigh(); disable_slot(sp); sp->state = empty; --- 351,376 ---- */ #if NAPM > 0 static int ! slot_suspend(void *arg) { + struct slot *sp = arg; struct pccard_dev *dp; ! for (dp = sp->devices; dp; dp = dp->next) (void) dp->drv->suspend(dp); ! if (!sp->susp_keep_pwr) sp->ctrl->disable(sp); return (0); } static int ! slot_resume(void *arg) { + struct slot *sp = arg; #if 1 int s; ! if (sp->state == filled) { s = splhigh(); disable_slot(sp); sp->state = empty; *************** *** 454,467 **** struct apmhook *ap; ap = &s_hook[sp->slot]; ! ap->ah_fun = (int (*)(void *))slot_suspend; ! ap->ah_arg = (void *) sp; ap->ah_name = cp->name; ap->ah_order = APM_MID_ORDER; apm_hook_establish(APM_HOOK_SUSPEND, ap); ap = &r_hook[sp->slot]; ! ap->ah_fun = (int (*)(void *))slot_resume; ! ap->ah_arg = (void *) sp; ap->ah_name = cp->name; ap->ah_order = APM_MID_ORDER; apm_hook_establish(APM_HOOK_RESUME, ap); --- 454,467 ---- struct apmhook *ap; ap = &s_hook[sp->slot]; ! ap->ah_fun = slot_suspend; ! ap->ah_arg = (void *)sp; ap->ah_name = cp->name; ap->ah_order = APM_MID_ORDER; apm_hook_establish(APM_HOOK_SUSPEND, ap); ap = &r_hook[sp->slot]; ! ap->ah_fun = slot_resume; ! ap->ah_arg = (void *)sp; ap->ah_name = cp->name; ap->ah_order = APM_MID_ORDER; apm_hook_establish(APM_HOOK_RESUME, ap); *************** *** 623,628 **** --- 623,642 ---- /* * Remove from device list on this slot. */ + #if 1 + if (sp->devices == devp) { + sp->devices = devp->next; + printf("Remove 0x%x (sp->devices = 0x%x)\n", devp, sp->devices); + } + else { + for (list = sp->devices; list->next; list = list->next) + if (list->next == devp) { + list->next = devp->next; + break; + } + printf("Remove 0x%x from chain\n", devp); + } + #else if (sp->devices == devp) sp->devices = devp->next; else *************** *** 631,636 **** --- 645,651 ---- list->next = devp->next; break; } + #endif /* * Finally, free the memory space. */ diff -crN sys.pccard-960506/pccard/pcic.c sys/pccard/pcic.c *** sys.pccard-960506/pccard/pcic.c Tue May 7 15:27:50 1996 --- sys/pccard/pcic.c Tue May 7 12:09:54 1996 *************** *** 86,92 **** --- 86,94 ---- static void pcic_disable __P((struct slot *)); static void pcic_mapirq __P((struct slot *, int)); static timeout_t pcictimeout; + #ifdef LKM static int pcic_handle __P((struct lkm_table *lkmtp, int cmd)); + #endif /* LKM */ static int pcic_memory(struct slot *, int); static int pcic_io(struct slot *, int); *************** *** 631,637 **** printf("pcic: failed to allocate IRQ\n"); else printf("pcic: controller irq %d\n", pcic_irq); - } /* * Check for a card in this slot. --- 633,638 ---- *************** *** 798,812 **** } slotp->insert_seq = 0; if (sp->controller == PCIC_PD672X || sp->controller == PCIC_PD6710) { - /* - * OS and values of timing registers. - * - * SETUP0 CMD0 RECOV0 SETUP1 CMD1 RECOV1 - * Linux 0x1 0x6, 0x0, 0x1, 0xf, 0x0 - * DHU BIOS? 0x41 0x6, 0x0, 0x1, 0xf, 0x0 - * Original 0x1 0x6, 0x0, 0x1, 0x5f, 0x0 - */ - putb(sp, PCIC_TIME_SETUP0, 0x1); putb(sp, PCIC_TIME_CMD0, 0x6); putb(sp, PCIC_TIME_RECOV0, 0x0); --- 799,804 ---- diff -crN sys.pccard-960506/pccard/slot.h sys/pccard/slot.h *** sys.pccard-960506/pccard/slot.h Tue May 7 15:27:51 1996 --- sys/pccard/slot.h Tue May 7 14:05:53 1996 *************** *** 106,118 **** * Per-slot structure. */ struct slot { ! struct slot *next; /* Master list */ ! int slot; /* Slot number */ ! int flags; /* Slot flags (see below) */ ! int rwmem; /* Read/write flags */ ! int ex_sel; /* PID for select */ ! int irq; /* IRQ allocated (0 = none) */ ! int irqref; /* Reference count of driver IRQs */ struct pccard_dev *devices; /* List of drivers attached */ /* * flags. --- 106,118 ---- * Per-slot structure. */ struct slot { ! struct slot *next; /* Master list */ ! int slot; /* Slot number */ ! int flags; /* Slot flags (see below) */ ! int rwmem; /* Read/write flags */ ! int ex_sel; /* PID for select */ ! int irq; /* IRQ allocated (0 = none) */ ! int irqref; /* Reference count of driver IRQs */ struct pccard_dev *devices; /* List of drivers attached */ /* * flags. -- HOSOKAWA, Tatsumi E-mail: hosokawa@mt.cs.keio.ac.jp WWW homepage: http://www.mt.cs.keio.ac.jp/person/hosokawa.html Department of Computer Science, Keio University, Yokohama, Japan From owner-freebsd-mobile Tue May 7 06:26:01 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA06384 for mobile-outgoing; Tue, 7 May 1996 06:26:01 -0700 (PDT) Received: from frig.mt.cs.keio.ac.jp (frig.mt.cs.keio.ac.jp [131.113.32.7]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id GAA06371 Tue, 7 May 1996 06:25:55 -0700 (PDT) Received: (from hosokawa@localhost) by frig.mt.cs.keio.ac.jp (8.6.12+2.4W/3.4Wbeta3) id WAA28162; Tue, 7 May 1996 22:25:52 +0900 Date: Tue, 7 May 1996 22:25:52 +0900 Message-Id: <199605071325.WAA28162@frig.mt.cs.keio.ac.jp> To: freebsd-announce@freebsd.org, freebsd-mobile@freebsd.org, freebsd-hackers@freebsd.org Reply-To: freebsd-mobile@freebsd.org Subject: [PCMCIA] (minor-bugfix) pccard-test-960508 is now available! From: hosokawa@mt.cs.keio.ac.jp (HOSOKAWA Tatsumi) X-Mailer: mnews [version 1.18PL3] 1994-08/01(Mon) Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Sorry! pccard-test-960506 has some minor problems. I fixed these problems, and release new package (960508). This package contains upgrade diffs. You can get it from, ftp://ryukyu.mt.cs.keio.ac.jp/pub/FreeBSD/pccard/pccard-test-960508.tar.gz -- HOSOKAWA, Tatsumi E-mail: hosokawa@mt.cs.keio.ac.jp WWW homepage: http://www.mt.cs.keio.ac.jp/person/hosokawa.html Department of Computer Science, Keio University, Yokohama, Japan