Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition) |
|||||||||||||||||||||||||||||||||||||||||||||
[ source navigation ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]
FreeBSD/Linux Kernel Cross Reference
|
Name | Size | Last modified (GMT) | Description | |
Parent directory | 2019-04-21 12:15:47 | |||
iavc/ | 2019-04-21 12:15:47 | |||
README | 7564 bytes | 2009-06-29 10:13:49 | ||
capi.h | 4492 bytes | 2009-06-29 10:13:49 | ||
capi_l4if.c | 11131 bytes | 2009-06-29 10:13:49 | ||
capi_llif.c | 4908 bytes | 2009-06-29 10:13:49 | ||
capi_msgs.c | 26509 bytes | 2009-06-29 10:13:49 | ||
capi_msgs.h | 12536 bytes | 2009-06-29 10:13:49 |
1 $FreeBSD$ 2 3 Message-ID: <3AF56886.7D92609A@cubical.fi> 4 Date: Sun, 06 May 2001 18:06:47 +0300 5 From: Juha-Matti Liukkonen <jml@cubical.fi> 6 Organization: Cubical Solutions Ltd 7 8 Please find the attached diff and tarball for our support software for 9 CAPI 2.0 and AVM's active T1 and T1-B (primary rate) and B1 (basic rate) 10 ISDN adapters for isdn4bsd. The implementation has been made from 11 scratch by us, based on reverse engineering of the Linux driver provided 12 by AVM GmbH and available in ftp.avm.de. Cubical Solutions Ltd offers 13 this implementation for the BSD community free of charge and assuming 14 absolutely no liabilities whatsoever. Feel free to modify the 15 implementation any way you see fit, but please retain our one-liner 16 copyright statement somewhere in the comment headers in the capi and 17 iavc driver modules. 18 19 That said, the attached tarball is i4b-00.96.00-beta with our 20 modifications integrated, and the diff contains all modifications we 21 have made to the original (including the new capi files). Our mods add 22 pseudo-device i4bcapi, which attaches to i4b layer 4, and device iavc0, 23 which implements a link layer driver for AVM's active B1 and T1 adapters 24 for i4bcapi. There are also a couple of related improvements to isdnd, 25 and a number of modifications to isdnd and layer 4 to implement support 26 for up to 30 channels per adapter (for primary rate use). 27 28 We have developed the software explicitly for our telephony application, 29 to be used with AVM's T1 adapters, and the implementation has been 30 tested primarily with this functionality in mind. There may be 31 interesting side effects with eg. the ipr and isppp drivers; we do not 32 use them and therefore their testing has been cursory at best. The 33 i4btel driver works well with the T1 (our primary use), and the i4brbch 34 driver has been verified to work with T1, T1-B and B1 adapters (ftp'd 35 some files over a dialup PPP connection with each adapter). Only the PCI 36 versions of the adapters (equipped with the AMCC DMA controller) are 37 supported, although the basics (PIO mode communication) for the older 38 ISA model support is in place, so only the bus attachment modules should 39 be required to support the older hardware. 40 41 All of the AVM active adapters use downloadable firmware, which is not 42 included in the attached package. The firmware files (t1.t4, t1b.t4, 43 b1.t4) can be found from ftp.avm.de in adapter specific subdirectories, 44 or from the CDs provided with the adapters (in directory 45 'cardware/firmware'). 46 47 Our primary development platform is our own embedded build (we call it 48 'ebsd') based on FreeBSD 4.2-RELEASE. The implementation has also been 49 tested on standard FreeBSD 4.2-RELEASE system. The implementation should 50 not contain any FreeBSD (or even FreeBSD release) specific issues, but 51 it has not been tested or even compiled on any other platforms; 52 specifically, only the FreeBSD overinstall.sh script is modified to 53 install the capi/iavc support in the kernel source tree. 54 55 This code is not under active development here since the functionality 56 we use (i4btel, T1) has been working since the beginning of March. We 57 are also not planning on any further development (no need seen at this 58 point), but I am naturally interested on whatever bugs and development 59 ideas pop up on the community and will keep a keen eye on the isdn 60 mailing list. I personally may be available for consultation, debugging 61 and possibly development projects, but with notable reservations on my 62 time (the current IT industry recession seems to be pushing even more 63 work for us, which tends to keep us pretty busy these days). 64 65 Here are some specific technical notes: 66 67 * isdnd supports new keyword 'firmware=</path/to/file>' in section 68 'controller'. This keyword is supported for all controller types, and 69 causes I4B_CTRL_DOWNLOAD ioctl to be invoked with the specified file as 70 an argument. In systems equipped with both active and passive adapters, 71 and the passive cards being detected first, dummy 'controller' entries 72 are required for the passive cards to get the correct firmwares to 73 correct adapters. (I hope you did not have other uses for this ioctl in 74 mind?) 75 76 * isdnd supports new keyword 'clone=<entry name>' in section 'entry'. 77 This causes the entry to be copied from the existing named entry. At 78 least entry specific 'name' and 'usrdeviceunit' values should be 79 specified after a 'clone'. (Makes configuring 30 or 60 entries way much 80 easier.) 81 82 * a bug in i4btel driver read routine corrected. The conditions in the 83 while() clause caused the receive queue to be referenced before checking 84 if a channel is connected, leading to kernel panic (do a 'dd 85 if=/dev/i4btel0 of=/dev/null' on an unconnected tel device, panic will 86 follow). Correction was to reorder the while clause conditions to check 87 for connectedness first. 88 89 * isdnd and i4b layer 4 support up to CHANNELS_MAX (=30) channels per 90 adapter. The msg_ctrl_info_req_t message reports the number of channels 91 provided by the adapter, the number is stored in the nbchan field of the 92 controller state structure. The fixed stateb1 and stateb2 entries in 93 controller state stuctures are replaced with an array, and all fixed 94 references there are replaced with loops up to nbchan. Passive stack 95 layer 1 and 2 are not modified, layer 3 sets this field to fixed value 2 96 for all adapters (but it could be delegated to the layer 1 driver's 97 attach request). 98 99 * the i4bcapi driver maps i4b channels to logical channels identified 100 with PLCI/NCCI values in the CAPI protocol using the sc_bchan[] array. 101 The PLCI/NCCI handling is merged in the channel mapping and is greatly 102 simplified from the reference state machine model, because in practice 103 there can be only one PLCI/NCCI per channel active at any given time. 104 105 * the i4bcapi driver does not provide any kind of user level interface 106 (such as the /dev/capi20 interface provided by the linux driver), but 107 could relatively easily be extended to do so (and if done, interface 108 compatibility with the linux implementation would probably be a good 109 goal). 110 111 * there are some gritty details in the iavc driver, inherited from the 112 linux code. Despite us being a legitimate company in the telecom 113 business, AVM failed to produce any programming reference material for 114 us (at least in a reasonable time frame), so some guesswork remains due 115 to classic reverse engineering process (particularly there are a few 116 magic numbers in the card initialization sequence whose meaning I do not 117 know). 118 119 * pseudo-devices i4bq931, i4bq921 and some passive stack layer 1 driver 120 (such as iwic) are required to compile, as the required ctrl_desc[] 121 array is in layer 3, which requires layer 2, which requires layer 1. 122 Some architectural cleanup would come in handy here, but we did not want 123 to start making any major changes (and we use iwic in test setups 124 anyway, so we simply always compile it in). 125 126 To summarize: unpack, overinstall, add the following lines (with the 127 usual passive stack configuration including at least one L1 driver) to 128 your kernel configuration file: 129 130 pseudo-device "i4bcapi" 131 device iavc0 132 133 ...and the following to your isdnd.rc: 134 135 controller 136 firmware = /usr/lib/isdn/b1.t4 137 138 ...compile your new kernel, make sure the firmware file is in 139 /usr/lib/isdn, and your B1 adapter should boot up and Just Work (tm). If 140 you have multiple adapters, you need a 'controller' section for each to 141 have them loaded and booted on isdnd startup. 142 143 Have fun -- and let me know if there are any complications, or if I can 144 be of further assistance, 145 146 - Juha 147 -- 148 Juha-Matti Liukkonen, Cubical Solutions Ltd 149 Phone: +358(0)405280142 150 Email: jml@cubical.fi
[ source navigation ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]
This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.