[PATCH] CE2 support added to xe driver

Scott Mitchell scott+freebsd at fishballoon.org
Thu Apr 24 05:53:10 PDT 2003


On Wed, Apr 23, 2003 at 09:28:47PM -0600, M. Warner Losh wrote:
> Oh wait, looking at the CIS for the Xircom CreditCard Ethernet+Modem
> 28.8, CEM28, 3.00 that I have shows that it is just a modem.
> 
> Looking at the code:
> 
> 	bus_space_write_1(bst, bsh, DINGO_ECOR, DINGO_ECOR_IRQ_LEVEL |
> 						DINGO_ECOR_INT_ENABLE |
> 						DINGO_ECOR_IOB_ENABLE |
> 						DINGO_ECOR_ETH_ENABLE);
> Set 0x800 to 0x47 (This looks a lot like MFC cards: Enable function,
>    enable I/O and enable IRQ, but the startup software writes 0x41)
> 	ioport = bus_get_resource_start(dev, SYS_RES_IOPORT, sc->port_rid);
> 	bus_space_write_1(bst, bsh, DINGO_EBAR0, ioport & 0xff);
> 	bus_space_write_1(bst, bsh, DINGO_EBAR1, (ioport >> 8) & 0xff);
> Set 0x80a and 0x80c to the ioport we want to use.  This corresponds to
> the I/O base registers in the standard.
> 
> 	bus_space_write_1(bst, bsh, DINGO_DCOR0, DINGO_DCOR0_SF_INT);
> 0x820 to 0x1 (enable function, if it follows the MFC)
> 	bus_space_write_1(bst, bsh, DINGO_DCOR1, DINGO_DCOR1_INT_LEVEL |
> 						 DINGO_DCOR1_EEDIO);
> 0x822 to 0xc (comments don't correspond to the standard meanings)
> 	bus_space_write_1(bst, bsh, DINGO_DCOR2, 0x00);
> 	bus_space_write_1(bst, bsh, DINGO_DCOR3, 0x00);
> 	bus_space_write_1(bst, bsh, DINGO_DCOR4, 0x00);

I'm hoping that something similar to this, along with an offset to the base
address used in the XE_IN* and XE_OUT* macros, will be enough to get these
cards working.  They're really just earlier iterations of the Dingo (CEM56)
hardware, so I'd expect a similar hack to be effective.  The DINGO_DCOR*
registers are Dingo-specific; I'll have to reread the Xircom docs to find
out exactly what's going on there.  Very likely that code will be redundant
on the older cards.

> CISTPL_DEVICE type=null speed=null
>  01 02 00 ff
> CISTPL_DEVICE_A type=null speed=null
>  17 02 00 ff
> CISTPL_VERS_1
>  15 34 04 01 58 69 72 63 6f 6d 00 43 72 65 64 69
>  74 43 61 72 64 20 45 74 68 65 72 6e 65 74 2b 4d
>  6f 64 65 6d 20 32 38 2e 38 00 43 45 4d 32 38 00
>  33 2e 30 30 00 ff
> >>> pccard0: CIS version PCCARD 2.0 or 2.1
> >>> pccard0: CIS info: Xircom, CreditCard Ethernet+Modem 28.8, CEM28, 3.00
> unhandled CISTPL 88
>  88 08 7f 31 3d 00 00 00 00 00
> >>> Vendor Specific tuple
> unhandled CISTPL 89
>  89 08 04 06 00 80 c7 7f 31 3d
> >>> Vendor Specific tuple

Notice that the MAC address is for some reason in tuple 89 on this card (my
CEM28 is exactly the same).  Another quirk will be required there...

	Scott

-- 
===========================================================================
Scott Mitchell           | PGP Key ID | "Eagles may soar, but weasels
Cambridge, England       | 0x54B171B9 |  don't get sucked into jet engines"
scott at fishballoon.org | 0xAA775B8B |      -- Anon


More information about the freebsd-mobile mailing list