From owner-freebsd-mobile Sat Dec 15 8:51:51 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from eastgate.starhub.net.sg (eastgate.starhub.net.sg [203.116.1.189]) by hub.freebsd.org (Postfix) with ESMTP id A24D937B405 for ; Sat, 15 Dec 2001 08:51:46 -0800 (PST) Received: from zaapth-ext (twchan@mcns64.docsis252.singa.pore.net [202.156.252.64]) by eastgate.starhub.net.sg (8.12.1/8.12.1) with ESMTP id fBFGpiI1032335 for ; Sun, 16 Dec 2001 00:51:44 +0800 (SST) Date: Sun, 16 Dec 2001 00:51:15 +0800 (SGT) From: Chan Tur Wei X-X-Sender: To: Warner Losh Cc: Subject: Re: Linksys PCM200 v2 ? In-Reply-To: <200112130809.fBD89FM42811@harmony.village.org> Message-ID: <20011216002731.T82122-100000@zaapth.twnet.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, Thanks for the pointer, Warner. I looked at the OpenBSD code and didn't really see anything special where the EEPROM romwidth stuff is used (except in (b) below). I then made the following hacks to if_dc.c: a) Create a new device ID b) Changed the dc_eeprom_putbyte() to feed the bits properly (I think there's a bug in the original code) c) Changed dc_delay() to a fixed DELAY(20) This yields the following when I plug in the Linksys PCM200 card: pccbb0: card inserted: event=0x00000000, state=30000b20 pccbb0: pccbb_power: CARD_VCC_0V and CARD_VPP_0V [44] pccbb0: pccbb_power: CARD_VCC_3V and CARD_VPP_VCC [11] pccbb0: bad Vcc request. ctrl=0x33, status=0x30000b20 pccbb_power: CARD_VCC_3V and CARD_VPP_VCC [11] found-> vendor=0x13d1, dev=0xab03, revid=0x11 class=02-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0000, statreg=0x0290, cachelnsz=8 (dwords) lattimer=0xa8 (5040 ns), mingnt=0xff (63750 ns), maxlat=0xff (63750 ns) intpin=a, irq=128 cardbus0: Expecting link target, got 0x59 cardbus0: Resource not specified in CIS: id=10, size=100 cardbus0: Resource not specified in CIS: id=14, size=400 cardbus0: Non-prefetchable memory at 84002000-840023ff cardbus0: Non-prefetchable memory rid=14 at 84002000-840023ff (400) cardbus0: IO port at 1000-10ff cardbus0: IO port rid=10 at 1000-10ff dc0: <(twchan) LinkSys PCM200 10/100BaseTX> port 0x1000-0x10ff mem 0x84002000-0x840023ff irq 10 at device 0.0 on cardbus0 dc0: Ethernet address: 00:04:5a:91:4c:72 miibus0: on dc0 ukphy0: on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Success, it seems, as the MAC address is now the right one. However, when I ifconfig up the device, I will just a whole stream of dc0: device timeouts. Is it due to my dumb laptop Bios having not properly assigned the IRQ's for the cardbus stuff? The "intpin=a, irq=128" line above looks unhealthy. If this is indeed the case, any idea if I can whack the Bios into submission? Or some other way I can get the IRQ's through? Thanks for any additional pointers! Regards -T.W.Chan- On Thu, 13 Dec 2001, Warner Losh wrote: > Date: Thu, 13 Dec 2001 01:09:15 -0700 > From: Warner Losh > To: Chan Tur Wei > Cc: freebsd-mobile@FreeBSD.ORG > Subject: Re: Linksys PCM200 v2 ? > > In message <20011213143537.U71947-100000@zaapth.twnet.org> Chan Tur Wei writes: > : Anyone done this yet? > > No, but you may have good luck porting the EEPROM size detection code > from OpenBSD's dc driver. They claim to have fixed a few bugs in ours > related to cardbus cards. > > Warner > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message