From owner-cvs-all Sun Jan 7 5:33:32 2001 Delivered-To: cvs-all@freebsd.org Received: from mobile.wemm.org (c1315225-a.plstn1.sfba.home.com [65.0.135.147]) by hub.freebsd.org (Postfix) with ESMTP id 9771137B402; Sun, 7 Jan 2001 05:33:12 -0800 (PST) Received: from netplex.com.au (localhost [127.0.0.1]) by mobile.wemm.org (8.11.1/8.11.1) with ESMTP id f07DXlt11106; Sun, 7 Jan 2001 05:33:47 -0800 (PST) (envelope-from peter@netplex.com.au) Message-Id: <200101071333.f07DXlt11106@mobile.wemm.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Warner Losh Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/pccard card_if.m pccard.c src/sys/dev/pccbb pccbb.c In-Reply-To: <200101070808.f0788tW31080@freefall.freebsd.org> Date: Sun, 07 Jan 2001 05:33:46 -0800 From: Peter Wemm Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Warner Losh wrote: > imp 2001/01/07 00:08:54 PST > > Modified files: > sys/dev/pccard card_if.m pccard.c > sys/dev/pccbb pccbb.c > Log: > Undo the interface change to CARD_GET_MEMORY_OFFSET. It wasn't tested > by even a compile of the OLDCARD code, was unapproved by me the keeper > of OLDCARD and broke OLDCARD and the ray driver. > > Adjust new code to cope with the older interface. But this is incomplete and cannot work. :-( You are calling methods that do not exist. (there is no CARD_GET_MEMORY_OFFSET() in pccbb yet). For what it is worth, this is all that would have been required to get ray and oldcard to work without breaking newcard: Index: dev/ray/if_ray.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ray/if_ray.c,v retrieving revision 1.47 diff -u -2 -r1.47 if_ray.c --- dev/ray/if_ray.c 2001/01/02 20:29:25 1.47 +++ dev/ray/if_ray.c 2001/01/07 13:06:41 @@ -3367,5 +3367,5 @@ offset); error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->dev), - sc->dev, sc->am_rid, 0); + sc->dev, sc->am_rid, 0, NULL); if (error) { RAY_PRINTF(sc, "CARD_SET_MEMORY_OFFSET returned 0x%0x", @@ -3455,5 +3455,5 @@ offset); error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->dev), - sc->dev, sc->cm_rid, 0); + sc->dev, sc->cm_rid, 0, NULL); if (error) { RAY_PRINTF(sc, "CARD_SET_MEMORY_OFFSET returned 0x%0x", Index: pccard/pccard_nbk.c =================================================================== RCS file: /home/ncvs/src/sys/pccard/pccard_nbk.c,v retrieving revision 1.23 diff -u -2 -r1.23 pccard_nbk.c --- pccard/pccard_nbk.c 2000/09/28 07:22:30 1.23 +++ pccard/pccard_nbk.c 2001/01/07 13:08:00 @@ -306,8 +306,8 @@ static int pccard_set_memory_offset(device_t bus, device_t child, int rid, - u_int32_t offset) + u_int32_t offset, u_int32_t *offsetp) { return CARD_SET_MEMORY_OFFSET(device_get_parent(bus), child, rid, - offset); + offset, offsetp); } Index: pccard/pcic.c =================================================================== RCS file: /home/ncvs/src/sys/pccard/pcic.c,v retrieving revision 1.100 diff -u -2 -r1.100 pcic.c --- pccard/pcic.c 2000/12/11 15:02:50 1.100 +++ pccard/pcic.c 2001/01/07 13:08:27 @@ -978,5 +978,6 @@ static int -pcic_set_memory_offset(device_t bus, device_t child, int rid, u_int32_t offset) +pcic_set_memory_offset(device_t bus, device_t child, int rid, u_int32_t offset, + u_int32_t *offsetp) { struct pccard_devinfo *devi = device_get_ivars(child); @@ -984,4 +985,6 @@ mp->card = offset; + if (offsetp) + *offsetp = offset; return (pcic_memory(devi->slt, rid)); This is pretty trivial and is essentially a NOP for the existing drivers. Anyway, I am running just happily with this commit backed out and with the above patch. All of the modules and drivers compile. pccbb0: at device 12.0 on pci0 cardbus0: on pccbb0 pccard0: <16-bit PCCard bus> on pccbb0 pccbb1: at device 12.1 on pci0 cardbus1: on pccbb1 pccard1: <16-bit PCCard bus> on pccbb1 ... dc0: port 0x3000-0x30ff mem 0x44020000-0x4403ffff,0x44002000-0x440023ff irq 9 at device 0.0 on cardbus0 dc0: Ethernet address: 00:e0:98:8e:e5:d0 miibus0: on dc0 ukphy0: on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto ed0: at port 0x300-0x31f irq 9 function 0 config 32 on pccard1 ed0: address 38:ff:90:c8:c6:df, type NE2000 (16 bit) dc0: flags=8843 mtu 1500 inet 10.0.0.5 netmask 0xffffff00 broadcast 10.0.0.255 ether 00:e0:98:8e:e5:d0 media: autoselect (100baseTX ) status: active supported media: autoselect 100baseTX 100baseTX 10baseT/UTP 10baseT/UTP none ed0: flags=8843 mtu 1500 inet 10.1.1.2 netmask 0xffffff00 broadcast 10.1.1.255 ether 38:ff:90:c8:c6:df Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message