Date: Mon, 19 Jul 1999 10:58:07 +0900 From: Osamu MIHARA <mihara@prd.fc.nec.co.jp> To: mobile@freebsd.org Subject: 3COM Megahertz 10/100 LAN+56K Modem (3CCFEM556BI) Message-ID: <14226.34351.40295.87915G@mosra.prd.fc.nec.co.jp>
next in thread | raw e-mail | index | archive | help
--Multipart_Mon_Jul_19_10:58:07_1999-1 Content-Type: text/plain; charset=US-ASCII Hi everyone, I have tried to make 3COM Megahertz 10/100 LAN+56K Modem (3CCFEM556BI) (LAN side) work with FreeBSD 3.2 with PAO3, and succeed in it. Here I attach a patch for ep driver and an entry for /etc/pccard.conf. You need to add an pccard.conf entry, apply this patch in /sys/i386/isa, rebuild kernel and reboot the system. Of course, you need PAO3 system prior to make this patch. This patch just changes ep driver to support ONLY 3CCFEM556BI, and as a result, other devices supported by original ep driver may not work. (Is anyone inform me how to add new device driver?) I got a lot of information of this card from Linux 3c574 driver. It changes I/O port addresses and activate MII interface. I'm using this driver on my ThinkPad 235 for several weeks and have no problem. Please inform me your result if you try this patch. -- Osamu MIHARA // NEC Printers Division --Multipart_Mon_Jul_19_10:58:07_1999-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="pccard.conf.entry" Content-Transfer-Encoding: 7bit # 3Com Megahertz 10/100 LAN+56K Modem # as ethernet card "3Com" "Megahertz 3CCFEM556BI" config default "ep0" any insert logger -s 3com Megahertz 10/100 LAN+56K Modem inserted insert /etc/pccard_ether $device remove logger -s 3com Megahertz 10/100 LAN+56K Modem removed remove /etc/pccard_ether_remove $device --Multipart_Mon_Jul_19_10:58:07_1999-1 Content-Type: application/octet-stream; type=patch Content-Disposition: attachment; filename="if_ep.patch" Content-Transfer-Encoding: 7bit --- if_ep.c Wed Jun 9 15:52:52 1999 +++ if_ep.c Thu Jul 15 10:07:38 1999 @@ -198,8 +198,9 @@ epb->prod_id = get_e(sc, EEPROM_PROD_ID); /* 3C589's product id? */ - if (epb->prod_id != 0x9058) { + if (epb->prod_id != 0x6055) { printf("ep%d: failed to come ready.\n", devi->pd_unit); + printf("product id is %x\n", epb->prod_id); return (ENXIO); } @@ -241,6 +242,19 @@ 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 Sat Apr 18 07:36:35 1998 +++ if_epreg.h Thu Jun 17 12:52:20 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 --Multipart_Mon_Jul_19_10:58:07_1999-1-- 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?14226.34351.40295.87915G>