Date: Fri, 20 Aug 1999 14:29:26 +0200 From: "Alberto Reggiori (vaio)" <alberto.reggiori@jrc.it> To: freebsd-mobile@FreeBSD.ORG Subject: 3Com MegaHertz 10/100 Lan Pccard 3CCFE575BT Message-ID: <37BD4A26.3E8B2693@jrc.it>
next in thread | raw e-mail | index | archive | help
Hello! I am new to this list, and apologize me for any syntax error writing to you. I have been fighting hard to configure my Sony VAIO PCG-C1X with a 3Com MegaHertz 10/100 Lan Pccard 3CCFE575B running fbsd 2.2.8 stable. Finally, thanks to the patched posted a few days ago by Osamu MIHARA <mihara@prd.fc.nec.co.jp> with a small id change I got the card working. The patch was for PAO3, but I just diff-ed the files with mine PAO 2 (2.2.8) version. The only change I made is in the product id (if_ep.c). It works like a charm for me :-) all the best Alberto The Osamu patch adapted for PAO2 (for PAO3 just change the product id in if_ep.c) : --- if_ep.c +++ if_ep.c Thu Aug 19 16:16:21 1999 @@ -214,8 +214,11 @@ epb->prod_id = get_e(sc, EEPROM_PROD_ID); /* 3C589's product id? */ - if (epb->prod_id != 0x9058) { + /* if (epb->prod_id != 0x9058) { */ + /* if (epb->prod_id != 0x6055) { */ + if (epb->prod_id != 0x4b57) { printf("ep%d: failed to come ready.\n", devi->pd_unit); + printf("product id is %x\n", epb->prod_id); return (ENXIO); } @@ -257,6 +260,20 @@ outw(BASE + EP_W0_RESOURCE_CFG, (sc->epb->res_cfg & 0x0fff) | 0x3000); outw(BASE + EP_W0_PRODUCT_ID, sc->epb->prod_id); + + + /* experimental code + * turn on the MII tranceiver + */ + GO_WINDOW(3); + outw(BASE + EP_W3_OPTIONS, 0x8040); + DELAY(1000); + outw(BASE + EP_W3_OPTIONS, 0xc040); + outw(BASE + EP_COMMAND, RX_RESET); + outw(BASE + EP_COMMAND, TX_RESET); + while (inw(BASE + EP_STATUS) & S_COMMAND_IN_PROGRESS); + DELAY(1000); + outw(BASE + EP_W3_OPTIONS, 0x8040); ep_attach(sc); --- if_epreg.h +++ if_epreg.h Thu Aug 19 16:16:28 1999 @@ -130,9 +130,9 @@ * Commands to read/write EEPROM trough EEPROM command register (Window 0, * Offset 0xa) */ -#define EEPROM_CMD_RD 0x0080 /* Read: Address required (5 bits) */ -#define EEPROM_CMD_WR 0x0040 /* Write: Address required (5 bits) */ -#define EEPROM_CMD_ERASE 0x00c0 /* Erase: Address required (5 bits) */ +#define EEPROM_CMD_RD 0x0200 /* Read: Address required (5 bits) */ +#define EEPROM_CMD_WR 0x0100 /* Write: Address required (5 bits) */ +#define EEPROM_CMD_ERASE 0x0300 /* Erase: Address required (5 bits) */ #define EEPROM_CMD_EWEN 0x0030 /* Erase/Write Enable: No data required */ #define EEPROM_BUSY (1<<15) @@ -194,15 +194,15 @@ * Window 1 registers. Operating Set. */ /* Write */ -#define EP_W1_TX_PIO_WR_2 0x02 -#define EP_W1_TX_PIO_WR_1 0x00 +#define EP_W1_TX_PIO_WR_2 0x12 +#define EP_W1_TX_PIO_WR_1 0x10 /* Read */ #define EP_W1_FREE_TX 0x0c -#define EP_W1_TX_STATUS 0x0b /* byte */ -#define EP_W1_TIMER 0x0a /* byte */ -#define EP_W1_RX_STATUS 0x08 -#define EP_W1_RX_PIO_RD_2 0x02 -#define EP_W1_RX_PIO_RD_1 0x00 +#define EP_W1_TX_STATUS 0x1b /* byte */ +#define EP_W1_TIMER 0x1a /* byte */ +#define EP_W1_RX_STATUS 0x18 +#define EP_W1_RX_PIO_RD_2 0x12 +#define EP_W1_RX_PIO_RD_1 0x10 /* * Window 2 registers. Station Address Setup/Read @@ -219,6 +219,7 @@ * Window 3 registers. FIFO Management. */ /* Read */ +#define EP_W3_OPTIONS 0x08 #define EP_W3_FREE_TX 0x0c #define EP_W3_FREE_RX 0x0a To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37BD4A26.3E8B2693>