mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
From: hosokawa@mt.cs.keio.ac.jp (HOSOKAWA Tatsumi)
One of the alpha testers (ETO, Toshihisa <eto@osl.fujitsu.co.jp>) of my APM driver sent me a very small patch to if_ze.c for using IBM PCMCIA Ethernet card II. There are only a few difference between Ethernet card I and II. So we can use them both with this patch. It also includes a patch for PCIC of ThinkPad 230Cs (As long as I remember, this model is available in Japan only. But it is very popular subnote in Japan). Submitted by: hosokawa
This commit is contained in:
parent
66e35128bf
commit
844a5df643
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3759
@ -41,6 +41,10 @@
|
||||
* laptop machines' PCIC (especially, on my Chaplet ILFA 350 ^^;).
|
||||
* HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
|
||||
*/
|
||||
/*
|
||||
* Very small patch for IBM Ethernet PCMCIA Card II and IBM ThinkPad230Cs.
|
||||
* ETO, Toshihisa <eto@osl.fujitsu.co.jp>
|
||||
*/
|
||||
|
||||
#include "ze.h"
|
||||
#if NZE > 0
|
||||
@ -457,6 +461,11 @@ static unsigned char card_info[256];
|
||||
|
||||
#define CARD_INFO "IBM Corp.~Ethernet~0933495"
|
||||
|
||||
/*
|
||||
* IBM Ethernet PCMCIA Card II returns following info.
|
||||
*/
|
||||
#define CARD2_INFO "IBM Corp.~Ethernet~0934214"
|
||||
|
||||
/*
|
||||
* scan the card information structure looking for the version/product info
|
||||
* tuple. when we find it, compare it to the string we are looking for.
|
||||
@ -488,7 +497,15 @@ ze_check_cis (unsigned char *scratch)
|
||||
for (j = i+8; scratch[j] != 0xff; j += 2)
|
||||
card_info[k++] = scratch[j] == '\0' ? '~' : scratch[j];
|
||||
card_info[k++] = '\0';
|
||||
#if 0
|
||||
return (memcmp (card_info, CARD_INFO, sizeof(CARD_INFO)-1) == 0);
|
||||
#else
|
||||
if ((memcmp (card_info, CARD_INFO, sizeof(CARD_INFO)-1) == 0) ||
|
||||
(memcmp (card_info, CARD2_INFO, sizeof(CARD2_INFO)-1) == 0)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
i += 4 + 2 * link;
|
||||
}
|
||||
@ -519,9 +536,13 @@ ze_find_adapter (unsigned char *scratch, int reconfig)
|
||||
* Intel PCMCIA controllers use 0x82 and 0x83
|
||||
* IBM clone chips use 0x88 and 0x89, apparently
|
||||
*/
|
||||
/*
|
||||
* IBM ThinkPad230Cs use 0x84.
|
||||
*/
|
||||
unsigned char idbyte = pcic_getb (slot, PCIC_ID_REV);
|
||||
|
||||
if (idbyte != 0x82 && idbyte != 0x83 &&
|
||||
idbyte != 0x84 && /* for IBM ThinkPad 230Cs */
|
||||
idbyte != 0x88 && idbyte != 0x89) {
|
||||
#if 0
|
||||
printf ("ibmccae: pcic slot %d: wierd id/rev code 0x%02x\n",
|
||||
|
Loading…
Reference in New Issue
Block a user