From ea5ff881da6f30406c37dd0730af5dc424caaedb Mon Sep 17 00:00:00 2001 From: Nate Williams Date: Sat, 6 Jan 1996 07:49:43 +0000 Subject: [PATCH] Don't rely on the card 'automatically' powering up when we probe it. On some laptops, this doesn't work (ie; IBM 75x series), so force it to power on. With this modification, I am able to read the tuples off 4 different PCMCIA cards on my ThinkPad. Reviewed by: phk@FreeBSD.org Obtained from: if_zp.c --- sys/pccard/i82365.h | 1 + sys/pccard/pcic.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/pccard/i82365.h b/sys/pccard/i82365.h index 3ca9683148e..a6cec01c4d8 100644 --- a/sys/pccard/i82365.h +++ b/sys/pccard/i82365.h @@ -102,6 +102,7 @@ #define PCIC_OUTENA 0x80 /* Output Enable */ #define PCIC_DISRST 0x40 /* Disable RESETDRV */ #define PCIC_APSENA 0x20 /* Auto Pwer Switch Enable */ +#define PCIC_PCPWRE 0x10 /* PC Card Power Enable */ #define PCIC_VCC 0x18 /* Vcc control bits */ #define PCIC_VCC_5V 0x10 /* 5 volts */ #define PCIC_VCC_3V 0x18 /* 3 volts */ diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index 0a0aa5730fc..5fe35ad1d07 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -565,7 +565,7 @@ pcic_probe () /* * Check for a card in this slot. */ - setb (sp, PCIC_POWER, PCIC_APSENA | PCIC_DISRST); + setb (sp, PCIC_POWER, PCIC_PCPWRE| PCIC_DISRST); if ((getb (sp, PCIC_STATUS) & PCIC_CD) != PCIC_CD) { slotp->laststate = slotp->state = empty; } else { @@ -615,7 +615,7 @@ pcic_ioctl(struct slot *slotp, int cmd, caddr_t data) static int pcic_power(struct slot *slotp) { - unsigned char reg = PCIC_DISRST|PCIC_APSENA; + unsigned char reg = PCIC_DISRST|PCIC_PCPWRE; struct pcic_slot *sp = slotp->cdata; switch(sp->controller) {