[asterisk-users] BeroNet HFC-4S card is now detected as only 2 ports

Henrik Woffinden hw at nitramlexa.com
Sat Apr 7 09:26:39 MST 2007


Tzafrir Cohen wrote:
> On Sat, Apr 07, 2007 at 12:17:03PM +0200, Henrik Woffinden wrote:
>   
>> Tzafrir Cohen wrote:
>>     
>>> On Fri, Apr 06, 2007 at 01:18:24AM +0200, Henrik Woffinden wrote:
>>>   
>>>       
>>>> Hello list,
>>>>
>>>> After upgrading from BRIstuff 1y-b to 1y-e my ISDN card is suddently
>>>> detected as 2 ports instead of 4.
>>>>
>>>> I still load the driver as "modprobe qozap ports=12" as I've always
>>>> done. But now it only sees 2 ports.
>>>> Output of "lspci -vvv"
>>>> ------ cut --------
>>>> 02:01.0 ISDN controller: Cologne Chip Designs GmbH ISDN network
>>>> Controller [HFC-4S] (rev 01)
>>>>         Subsystem: Cologne Chip Designs GmbH Unknown device b560
>>>>         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
>>>> ParErr- Stepping- SERR- FastB2B-
>>>>         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
>>>> <TAbort- <MAbort- >SERR- <PERR-
>>>>         Interrupt: pin A routed to IRQ 22
>>>>         Region 0: I/O ports at ddb8 [size=8]
>>>>         Region 1: Memory at fcefa000 (32-bit, non-prefetchable) [size=4K]
>>>>         Capabilities: [40] Power Management version 2
>>>>                 Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA
>>>> PME(D0+,D1+,D2+,D3hot+,D3cold-)
>>>>                 Status: D0 PME-Enable- DSel=0 DScale=0 PME-
>>>> ------ cut --------
>>>>     
>>>>         
>>> Just a comment: the CHANGES file has the item "fixed detection of
>>> miniPCI cards (qozap)". Take a look at the diff between qozap/qozap.c
>>> in -d and in -e .
>>>
>>>   
>>>       
>> Problem solved...
>>
>> If anyone else is interested, here is what I changed to make it work
>> with a BeroNet HFC-4S rev 01 card:
>>
>> Patch file:
>> -------- cut --------
>> 297a298,299
>>     
>>>       } else if (qoztmp->type == 0xb560) {
>>>           qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x23);
>>>       
>> 1584c1586
>> <           if ((tmp->subsystem_device <= 0xb555) ||
>> (tmp->subsystem_device == 0xb558)) {
>> ---
>>     
>>>           if ((tmp->subsystem_device <= 0xb555) ||
>>>       
>> (tmp->subsystem_device == 0xb558) || (tmp->subsystem_device == 0xb560)) {
>> 1638a1641
>>     
>>>               case 0xb560:
>>>       
>> -------- cut ---------
>>
>> I don't know how to make it into a correct patchfile, so if someone else
>> knows that, it could be done and maybe placed where everybody could get it.
>>     
>
> Simply use 'diff -u' instead of 'diff' .
>
> Any idea if this can break anything?
>
>   
Thanks for the tip. Here's a proper patch-file:
[root at delias qozap]# diff -urN qozap.c.orig qozap.c
--- qozap.c.orig        2007-04-07 11:49:36.000000000 +0200
+++ qozap.c     2007-04-07 12:00:52.000000000 +0200
@@ -295,6 +295,8 @@
     } else {
        if (qoztmp->type == 0x08b4) {
            qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x0);
+       } else if (qoztmp->type == 0xb560) {
+           qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x23);
        } else if (qoztmp->type == 0xb550) {
            qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x23);
        } else if (qoztmp->type == 0xb556) {
@@ -1581,7 +1583,7 @@
        if (pcidid == PCI_DEVICE_ID_CCD_M) {
            qoztmp->stports = 8;
        } else {
-           if ((tmp->subsystem_device <= 0xb555) ||
(tmp->subsystem_device == 0xb558)) {
+           if ((tmp->subsystem_device <= 0xb555) ||
(tmp->subsystem_device == 0xb558) || (tmp->subsystem_device == 0xb560)) {
                qoztmp->stports = 4;
            } else {
                qoztmp->stports = 2;
@@ -1636,6 +1638,7 @@
        if (pcidid == PCI_DEVICE_ID_CCD_M4) {
            switch (tmp->subsystem_device) {
                case 0x08b4:
+               case 0xb560:
                        if (ports == -1) ports = 0; /* assume TE mode if
no ports param */
                        printk(KERN_INFO
                        "qozap: CologneChip HFC-4S evaluation board
configured at io port %#x IRQ %d HZ %d\n",

I don't think it will break anything, as I haven't changed any logic,
just added the device 0xb560 to go to the proper options. But I can't
give u a 100% guarantee as I have no experience in programming these cards.

Shall I upload the patch to somewhere?

Happy Easter.

Best regards,

Henrik Woffinden


More information about the asterisk-users mailing list