From owner-freebsd-bugs Tue Aug 22 9:50:26 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4C9F837B424 for ; Tue, 22 Aug 2000 09:50:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id JAA22966; Tue, 22 Aug 2000 09:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from bbnrel4.net.external.hp.com (bbnrel4.net.external.hp.com [155.208.254.68]) by hub.freebsd.org (Postfix) with ESMTP id 865A837B424 for ; Tue, 22 Aug 2000 09:40:25 -0700 (PDT) Received: from hpcpbla.bri.hp.com (hpcpbla.bri.hp.com [15.144.112.65]) by bbnrel4.net.external.hp.com (Postfix) with ESMTP id 9C885145FC for ; Tue, 22 Aug 2000 18:40:20 +0200 (METDST) Received: from sse0691.bri.hp.com (sse0691.bri.hp.com [15.144.0.53]) by hpcpbla.bri.hp.com (8.9.3 (PHNE_18979)/8.9.3 SMKit7.0) with ESMTP id RAA03601 for ; Tue, 22 Aug 2000 17:40:18 +0100 (BST) Received: (from root@localhost) by sse0691.bri.hp.com (8.9.3/8.9.3) id RAA62521; Tue, 22 Aug 2000 17:43:14 +0100 (BST) (envelope-from steve) Message-Id: <200008221643.RAA62521@sse0691.bri.hp.com> Date: Tue, 22 Aug 2000 17:43:14 +0100 (BST) From: Steve Roome Reply-To: steve@sse0691.bri.hp.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/20783: patch to use IPACv1.2 with Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 20783 >Category: kern >Synopsis: patch to use IPACv1.2 with >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Aug 22 09:50:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Steve Roome >Release: FreeBSD 4.1-STABLE i386 >Organization: >Environment: 4.1-stable This is a patch to the i4b source to work with IPAC v1.2 it's pulled from a mailing list and this is after it's been applied successfully. >Description: newer PCI isdn cards might report themselves as IPAC v1.2 but the driver doesn't by default support this, although it does seem work to treat it similarly to IPAC v.1.1 >How-To-Repeat: An attempt to use a newer PCI ISDN card that reports itself as being IPAC v.1.2 will cause the driver to malfunction. >Fix: diff -ur i4b.2/layer1/i4b_avm_fritz_pci.c i4b/layer1/i4b_avm_fritz_pci.c --- i4b.2/layer1/i4b_avm_fritz_pci.c Thu Aug 3 00:52:55 2000 +++ i4b/layer1/i4b_avm_fritz_pci.c Mon Aug 21 19:05:12 2000 @@ -39,7 +39,7 @@ * * $Id: i4b_avm_fritz_pci.c,v 1.3 1999/12/13 21:25:26 hm Exp $ * - * $FreeBSD: src/sys/i4b/layer1/i4b_avm_fritz_pci.c,v 1.6.2.1 2000/08/02 23:52:55 peter Exp $ + * $FreeBSD: src/sys/i4b/layer1/i4b_avm_fritz_pci.c,v 1.6 1999/12/14 20:48:18 hm Exp $ * * last edit-date: [Mon Dec 13 21:59:04 1999] * @@ -504,7 +504,7 @@ asc->avma1pp_unit = unit; - rid = PCIR_MAPS+4; + rid = PCI_MAP_REG_START+4; asc->avma1pp_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1, RF_ACTIVE); @@ -523,7 +523,7 @@ RF_SHAREABLE | RF_ACTIVE); if (asc->avma1pp_irq == NULL) { - bus_release_resource(dev, SYS_RES_IOPORT, PCIR_MAPS+4, asc->avma1pp_res); + bus_release_resource(dev, SYS_RES_IOPORT, PCI_MAP_REG_START+4, asc->avma1pp_res); printf("avma1pp%d: couldn't map interrupt\n", unit); error = ENXIO; goto fail; @@ -533,7 +533,7 @@ if (error) { bus_release_resource(dev, SYS_RES_IRQ, 0, asc->avma1pp_res); - bus_release_resource(dev, SYS_RES_IOPORT, PCIR_MAPS+4, asc->avma1pp_res); + bus_release_resource(dev, SYS_RES_IOPORT, PCI_MAP_REG_START+4, asc->avma1pp_res); printf("avma1pp%d: couldn't set up irq\n", unit); goto fail; } diff -ur i4b.2/layer1/i4b_elsa_qs1p.c i4b/layer1/i4b_elsa_qs1p.c --- i4b.2/layer1/i4b_elsa_qs1p.c Thu Aug 3 00:52:55 2000 +++ i4b/layer1/i4b_elsa_qs1p.c Mon Aug 21 19:05:12 2000 @@ -29,7 +29,7 @@ * * $Id: i4b_elsa_qs1p.c,v 1.2 1999/12/13 21:25:26 hm Exp $ * - * $FreeBSD: src/sys/i4b/layer1/i4b_elsa_qs1p.c,v 1.6.2.1 2000/08/02 23:52:55 peter Exp $ + * $FreeBSD: src/sys/i4b/layer1/i4b_elsa_qs1p.c,v 1.6 1999/12/14 20:48:19 hm Exp $ * * last edit-date: [Mon Dec 13 21:59:51 1999] * @@ -77,8 +77,8 @@ #define PORT0_MAPOFF 4 #define PORT1_MAPOFF 12 -#define ELSA_PORT0_MAPOFF (PCIR_MAPS+PORT0_MAPOFF) -#define ELSA_PORT1_MAPOFF (PCIR_MAPS+PORT1_MAPOFF) +#define ELSA_PORT0_MAPOFF (PCI_MAP_REG_START+PORT0_MAPOFF) +#define ELSA_PORT1_MAPOFF (PCI_MAP_REG_START+PORT1_MAPOFF) #define PCI_QS1000_DID 0x1000 #define PCI_QS1000_VID 0x1048 diff -ur i4b.2/layer1/i4b_ipac.h i4b/layer1/i4b_ipac.h --- i4b.2/layer1/i4b_ipac.h Tue Dec 14 20:48:20 1999 +++ i4b/layer1/i4b_ipac.h Mon Aug 21 19:05:12 2000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -49,6 +49,7 @@ /* chip version */ #define IPAC_V11 0x01 /* IPAC Version 1.1 */ +#define IPAC_V12 0x02 /* IPAC Version 1.2 */ /* * definitions of registers and bits for the IPAC ISDN chip. diff -ur i4b.2/layer1/i4b_isic.c i4b/layer1/i4b_isic.c --- i4b.2/layer1/i4b_isic.c Tue Dec 14 20:48:21 1999 +++ i4b/layer1/i4b_isic.c Mon Aug 21 19:05:12 2000 @@ -306,16 +306,17 @@ if(sc->sc_ipac) { - ret = IPAC_READ(IPAC_ID); + sc->sc_ipac_version = IPAC_READ(IPAC_ID); - switch(ret) + switch(sc->sc_ipac_version) { - case 0x01: + case IPAC_V11: + case IPAC_V12: break; default: printf("isic%d: Error, IPAC version %d unknown!\n", - unit, ret); + unit, sc->sc_ipac_version); return ENXIO; break; diff -ur i4b.2/layer1/i4b_l1.h i4b/layer1/i4b_l1.h --- i4b.2/layer1/i4b_l1.h Tue Dec 14 20:48:22 1999 +++ i4b/layer1/i4b_l1.h Mon Aug 21 19:05:12 2000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -204,7 +204,8 @@ int sc_isac_version; /* version number of ISAC */ int sc_hscx_version; /* version number of HSCX */ - + int sc_ipac_version; /* version number of IPAC */ + int sc_I430state; /* I.430 state F3 .... F8 */ int sc_I430T3; /* I.430 Timer T3 running */ diff -ur i4b.2/layer1/pci_isic.c i4b/layer1/pci_isic.c --- i4b.2/layer1/pci_isic.c Sat Aug 28 01:45:44 1999 +++ i4b/layer1/pci_isic.c Mon Aug 21 19:05:13 2000 @@ -220,12 +220,15 @@ if(sc->sc_ipac) { - u_int ret = IPAC_READ(IPAC_ID); + sc->sc_ipac_version = IPAC_READ(IPAC_ID); - switch(ret) + switch(sc->sc_ipac_version) { - case 0x01: - printf("%s: IPAC PSB2115 Version 1.1\n", sc->sc_dev.dv_xname); + case IPAC_V11: + case IPAC_V12: + printf("%s: IPAC PSB2115 Version 1.%d\n", + sc->sc_dev.dv_xname, + sc->sc_ipac_versio); break; default: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message