diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-01-26 10:47:24 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-01-26 12:46:09 +0000 |
commit | d4addaa2278f2f7290728179d88f52aa4a3f9ab9 (patch) | |
tree | 09fcf8542087e6938da24f8cc518ad2d3b5ad46b /main | |
parent | 2b19859d701a8cd5f69280e1c56835ba8718dd8e (diff) | |
download | aports-d4addaa2278f2f7290728179d88f52aa4a3f9ab9.tar.bz2 aports-d4addaa2278f2f7290728179d88f52aa4a3f9ab9.tar.xz |
main/dahdi-linux-vserver: build against 3.2.2 kernel
Diffstat (limited to 'main')
-rw-r--r-- | main/dahdi-linux-vserver/APKBUILD | 12 | ||||
-rw-r--r-- | main/dahdi-linux-vserver/dahdi-2.5.0-bri-fixes.patch | 327 | ||||
-rw-r--r-- | main/dahdi-linux-vserver/zaphfc-dahdi-2.6.0.patch | 58 |
3 files changed, 64 insertions, 333 deletions
diff --git a/main/dahdi-linux-vserver/APKBUILD b/main/dahdi-linux-vserver/APKBUILD index 80916278e9..029ba2f30a 100644 --- a/main/dahdi-linux-vserver/APKBUILD +++ b/main/dahdi-linux-vserver/APKBUILD @@ -4,9 +4,9 @@ _flavor=${FLAVOR:-vserver} _realname=dahdi-linux _name=$_realname-$_flavor -_kver=3.2.1 +_kver=3.2.2 _kpkgrel=0 -_myvsver=vs2.3.2.5 +_myvsver=vs2.3.2.6 # verify the kernel version before entering chroot if [ -f ../linux-${_flavor}/APKBUILD ]; then @@ -30,7 +30,7 @@ _mypkgrel=0 pkgrel=$(( $_kpkgrel + $_mypkgrel )) pkgdesc="Digium Asterisk Hardware Device Interface drivers $_dahdiver" url="http://www.asterisk.org" -arch="" +arch="all" license="GPL" depends="dahdi-linux linux-${_flavor}=${_kpkgver}" # we need wget and tar because make install downloads firmware and uses fancy @@ -41,11 +41,11 @@ subpackages="$pkgname-dev" source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/${_realname}-$_dahdiver.tar.gz dahdi-depmod.patch dahdi-bri_dchan.patch - dahdi-2.5.0-bri-fixes.patch dahdi-zaphfc.patch zaphfc-dahdi-flortz.diff zaphfc-dahdi-2.4.0.patch zaphfc-dahdi-2.5.0.patch + zaphfc-dahdi-2.6.0.patch " prepare() { @@ -89,8 +89,8 @@ dev() { md5sums="ea35ad29dafe5490028ff642c35ef9a2 dahdi-linux-2.6.0.tar.gz c78fb8d80f9efdffd950297c88ff9273 dahdi-depmod.patch 3bb419ac598534cd4ad5248f23656001 dahdi-bri_dchan.patch -9088ee5cd24f94b7f90c24e5ed6071e0 dahdi-2.5.0-bri-fixes.patch c6308ea8aaafba0a9d7f9825d7c9dcf8 dahdi-zaphfc.patch 035a6d91b2fb56a9b76a60a2e494fe9e zaphfc-dahdi-flortz.diff 0fdcd8c8c93bc1fe33c0af12b6cc6b05 zaphfc-dahdi-2.4.0.patch -fc49cf22258d63487a83560385c3f6fa zaphfc-dahdi-2.5.0.patch" +fc49cf22258d63487a83560385c3f6fa zaphfc-dahdi-2.5.0.patch +6273db53267e1f322d91bf1c8b97ba19 zaphfc-dahdi-2.6.0.patch" diff --git a/main/dahdi-linux-vserver/dahdi-2.5.0-bri-fixes.patch b/main/dahdi-linux-vserver/dahdi-2.5.0-bri-fixes.patch deleted file mode 100644 index 01dcf646fb..0000000000 --- a/main/dahdi-linux-vserver/dahdi-2.5.0-bri-fixes.patch +++ /dev/null @@ -1,327 +0,0 @@ -Index: dahdi-linux-2.5.0/drivers/dahdi/xpp/card_bri.c -=================================================================== ---- dahdi-linux-2.5.0.orig/drivers/dahdi/xpp/card_bri.c 2011-08-15 14:42:29.000000000 +0300 -+++ dahdi-linux-2.5.0/drivers/dahdi/xpp/card_bri.c 2011-08-15 14:51:37.000000000 +0300 -@@ -274,7 +274,6 @@ - int frame_begin; - - priv = xpd->priv; -- BUG_ON(!priv); - if(transmit) { - direction = "TX"; - frame_begin = priv->txframe_begin; -@@ -312,9 +311,7 @@ - { - struct BRI_priv_data *priv; - -- BUG_ON(!xpd); - priv = xpd->priv; -- BUG_ON(!priv); - if(priv->dchan_alive == up) - return; - if(up) { -@@ -332,9 +329,7 @@ - { - struct BRI_priv_data *priv; - -- BUG_ON(!xpd); - priv = xpd->priv; -- BUG_ON(!priv); - if(priv->layer1_up == up) - return; - priv->layer1_up = up; -@@ -348,9 +343,7 @@ - struct BRI_priv_data *priv; - byte curr_state; - -- BUG_ON(!xpd); - priv = xpd->priv; -- BUG_ON(!priv); - curr_state = priv->state_register.bits.v_su_sta; - XPD_DBG(SIGNAL, xpd, "%s\n", (on)?"ON":"OFF"); - if(on) { -@@ -391,9 +384,7 @@ - struct BRI_priv_data *priv; - byte curr_state; - -- BUG_ON(!xpd); - priv = xpd->priv; -- BUG_ON(!priv); - curr_state = priv->state_register.bits.v_su_sta; - XPD_DBG(SIGNAL, xpd, "%s\n", (on)?"ON":"OFF"); - if(on) { -@@ -443,7 +434,6 @@ - struct BRI_priv_data *priv; - - priv = xpd->priv; -- BUG_ON(!priv); - #ifdef CONFIG_DAHDI_BRI_DCHANS - if(debug & DBG_COMMANDS) - dump_hex_buf(xpd, "D-Chan(abort) RX: dchan_rbuf", -@@ -460,7 +450,6 @@ - byte status; - - priv = xpd->priv; -- BUG_ON(!priv); - #ifdef CONFIG_DAHDI_BRI_DCHANS - if(priv->dchan_r_idx < 4) { - XPD_NOTICE(xpd, "D-Chan RX short frame (dchan_r_idx=%d)\n", -@@ -503,7 +492,6 @@ - int idx; - - priv = xpd->priv; -- BUG_ON(!priv); - dchan_buf = dchan->readchunk; - idx = priv->dchan_r_idx; - if(idx + len >= DCHAN_BUFSIZE) { -@@ -527,7 +515,6 @@ - struct BRI_priv_data *priv; - - priv = xpd->priv; -- BUG_ON(!priv); - #ifdef CONFIG_DAHDI_BRI_DCHANS - dchan->bytes2receive = priv->dchan_r_idx - 1; - dchan->eofrx = 1; -@@ -556,10 +543,7 @@ - return 0; - if(!SPAN_REGISTERED(xpd)) /* Nowhere to copy data */ - return 0; -- BUG_ON(!xpd); - priv = xpd->priv; -- BUG_ON(!priv); -- xbus = xpd->xbus; - dchan = XPD_CHAN(xpd, 2); - if(!IS_OFFHOOK(xpd, 2)) { /* D-chan is used? */ - static int rate_limit; -@@ -629,9 +613,7 @@ - return 0; - if(!SPAN_REGISTERED(xpd)) /* Nowhere to copy data */ - return 0; -- BUG_ON(!xpd); - priv = xpd->priv; -- BUG_ON(!priv); - dchan = XPD_CHAN(xpd, 2); - if(!IS_OFFHOOK(xpd, 2)) { /* D-chan is used? */ - static int rate_limit; -@@ -677,7 +659,6 @@ - struct BRI_priv_data *priv; - - priv = xpd->priv; -- BUG_ON(!priv); - dchan = XPD_CHAN(xpd, 2); - if (dchan == chan) { - atomic_inc(&priv->hdlc_pending); -@@ -716,7 +697,6 @@ - int ret; - - priv = xpd->priv; -- BUG_ON(!priv); - #ifndef CONFIG_DAHDI_BRI_DCHANS - if(atomic_read(&priv->hdlc_pending) == 0) - return 0; -@@ -769,7 +749,6 @@ - { - struct BRI_priv_data *priv; - -- BUG_ON(!xpd); - priv = xpd->priv; - XPD_DBG(PROC, xpd, "\n"); - #ifdef CONFIG_PROC_FS -@@ -784,7 +763,6 @@ - { - struct BRI_priv_data *priv; - -- BUG_ON(!xpd); - priv = xpd->priv; - XPD_DBG(PROC, xpd, "\n"); - #ifdef CONFIG_PROC_FS -@@ -828,7 +806,6 @@ - { - struct BRI_priv_data *priv; - -- BUG_ON(!xpd); - XPD_DBG(GENERAL, xpd, "\n"); - priv = xpd->priv; - DO_LED(xpd, GREEN_LED, BRI_LED_OFF); -@@ -841,7 +818,6 @@ - - static int BRI_card_remove(xbus_t *xbus, xpd_t *xpd) - { -- BUG_ON(!xpd); - XPD_DBG(GENERAL, xpd, "\n"); - bri_proc_remove(xbus, xpd); - return 0; -@@ -877,10 +853,8 @@ - struct BRI_priv_data *priv; - int i; - -- BUG_ON(!xpd); - xbus = xpd->xbus; - priv = xpd->priv; -- BUG_ON(!xbus); - XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off"); - if(!on) { - /* Nothing to do yet */ -@@ -927,11 +901,6 @@ - - static int BRI_card_dahdi_postregistration(xpd_t *xpd, bool on) - { -- xbus_t *xbus; -- -- BUG_ON(!xpd); -- xbus = xpd->xbus; -- BUG_ON(!xbus); - XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off"); - return(0); - } -@@ -956,7 +925,6 @@ - int other_led; - int mod; - -- BUG_ON(!xpd); - if(IS_NT(xpd)) { - which_led = RED_LED; - other_led = GREEN_LED; -@@ -965,7 +933,6 @@ - other_led = RED_LED; - } - priv = xpd->priv; -- BUG_ON(!priv); - timer_count = xpd->timer_count; - if(xpd->blink_mode) { - if((timer_count % DEFAULT_LED_PERIOD) == 0) { -@@ -1014,9 +981,7 @@ - { - struct BRI_priv_data *priv; - -- BUG_ON(!xpd); - priv = xpd->priv; -- BUG_ON(!priv); - if(IS_NT(xpd)) { - if (priv->t1 > HFC_TIMER_OFF) { - if (--priv->t1 == 0) { -@@ -1053,9 +1018,7 @@ - { - struct BRI_priv_data *priv; - -- BUG_ON(!xpd); - priv = xpd->priv; -- BUG_ON(!priv); - if(!priv->initialized || !xbus->self_ticking) - return 0; - if(poll_interval != 0 && (priv->tick_counter % poll_interval) == 0) { -@@ -1111,7 +1074,6 @@ - - static int BRI_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd, unsigned long arg) - { -- BUG_ON(!xpd); - if(!XBUS_IS(xpd->xbus, READY)) - return -ENODEV; - switch (cmd) { -@@ -1131,7 +1093,6 @@ - - static int BRI_card_open(xpd_t *xpd, lineno_t pos) - { -- BUG_ON(!xpd); - if(pos == 2) { - LINE_DBG(SIGNAL, xpd, pos, "OFFHOOK the whole span\n"); - BIT_SET(PHONEDEV(xpd).offhook_state, 0); -@@ -1230,12 +1191,8 @@ - { - struct phonedev *phonedev = container_of(span, struct phonedev, span); - xpd_t *xpd = container_of(phonedev, struct xpd, phonedev); -- struct BRI_priv_data *priv; - struct dahdi_chan *dchan; - -- BUG_ON(!xpd); -- priv = xpd->priv; -- BUG_ON(!priv); - if(!XBUS_IS(xpd->xbus, READY)) { - XPD_DBG(GENERAL, xpd, "Startup called by dahdi. No Hardware. Ignored\n"); - return -ENODEV; -@@ -1267,11 +1224,7 @@ - { - struct phonedev *phonedev = container_of(span, struct phonedev, span); - xpd_t *xpd = container_of(phonedev, struct xpd, phonedev); -- struct BRI_priv_data *priv; - -- BUG_ON(!xpd); -- priv = xpd->priv; -- BUG_ON(!priv); - if(!XBUS_IS(xpd->xbus, READY)) { - XPD_DBG(GENERAL, xpd, "Shutdown called by dahdi. No Hardware. Ignored\n"); - return -ENODEV; -@@ -1292,7 +1245,6 @@ - xpd_t *main_xpd; - unsigned long flags; - -- BUG_ON(!xpd); - main_xpd = xpd_byaddr(xpd->xbus, xpd->addr.unit, 0); - if(!main_xpd) { - XPD_DBG(DEVICES, xpd, "Unit 0 is already gone. Ignore request\n"); -@@ -1350,8 +1302,6 @@ - xpp_line_t wanted_lines; - - -- BUG_ON(!xpd); -- BUG_ON(!pack); - pcm = RPACKET_FIELD(pack, GLOBAL, PCM_WRITE, pcm); - for(subunit = 0; subunit < MAX_SUBUNIT; subunit++) { - xpd_t *tmp_xpd; -@@ -1435,12 +1385,8 @@ - - static int BRI_echocancel_setmask(xpd_t *xpd, xpp_line_t ec_mask) - { -- struct BRI_priv_data *priv; - int i; - -- BUG_ON(!xpd); -- priv = xpd->priv; -- BUG_ON(!priv); - XPD_DBG(GENERAL, xpd, "0x%8X\n", ec_mask); - if (!ECHOOPS(xpd->xbus)) { - XPD_DBG(GENERAL, xpd, -@@ -1466,9 +1412,7 @@ - struct bri_leds *bri_leds; - struct BRI_priv_data *priv; - -- BUG_ON(!xbus); - priv = xpd->priv; -- BUG_ON(!priv); - XPD_DBG(LEDS, xpd, "%s -> %d\n", - (which_led)?"RED":"GREEN", - to_led_state); -@@ -1507,9 +1451,7 @@ - struct BRI_priv_data *priv; - su_rd_sta_t new_state; - -- BUG_ON(!xpd); - priv = xpd->priv; -- BUG_ON(!priv); - if(!priv->initialized) { - XPD_ERR(xpd, "%s called on uninitialized AB\n", __FUNCTION__); - return; -@@ -1621,7 +1563,6 @@ - } - spin_lock_irqsave(&xpd->lock, flags); - priv = xpd->priv; -- BUG_ON(!priv); - if(REG_FIELD(info, do_subreg)) { - XPD_DBG(REGS, xpd, "RI %02X %02X %02X\n", - REG_FIELD(info, regnum), REG_FIELD(info, subreg), REG_FIELD(info, data_low)); -@@ -1665,7 +1606,6 @@ - { - struct BRI_priv_data *priv; - -- BUG_ON(!xpd); - priv = xpd->priv; - XPD_DBG(GENERAL, xpd, "%s\n", (on)?"ON":"OFF"); - if(on) { -@@ -1745,7 +1685,6 @@ - return -ENODEV; - spin_lock_irqsave(&xpd->lock, flags); - priv = xpd->priv; -- BUG_ON(!priv); - len += sprintf(page + len, "%05d Layer 1: ", priv->poll_counter); - if(priv->reg30_good) { - len += sprintf(page + len, "%-5s ", (priv->layer1_up) ? "UP" : "DOWN"); diff --git a/main/dahdi-linux-vserver/zaphfc-dahdi-2.6.0.patch b/main/dahdi-linux-vserver/zaphfc-dahdi-2.6.0.patch new file mode 100644 index 0000000000..5a77438462 --- /dev/null +++ b/main/dahdi-linux-vserver/zaphfc-dahdi-2.6.0.patch @@ -0,0 +1,58 @@ +--- dahdi-linux-2.6.0/drivers/dahdi/zaphfc.c.orig 2012-01-25 14:08:58.000000000 +0200 ++++ dahdi-linux-2.6.0/drivers/dahdi/zaphfc.c 2012-01-25 14:29:26.000000000 +0200 +@@ -122,7 +122,10 @@ + } + spin_unlock_irqrestore(&hfctmp->lock,flags); + if (hfctmp->ztdev != NULL) { +- dahdi_unregister(&hfctmp->ztdev->span); ++ if (hfctmp->ztdev->ddev) { ++ dahdi_unregister_device(hfctmp->ztdev->ddev); ++ dahdi_free_device(hfctmp->ztdev->ddev); ++ } + vfree(hfctmp->ztdev); + printk(KERN_INFO "unregistered from DAHDI.\n"); + } +@@ -680,9 +683,15 @@ + struct hfc_card *hfctmp = zthfc->card; + int i; + ++ zthfc->ddev = dahdi_create_device(); ++ if (!zthfc->ddev) ++ return -ENOMEM; ++ ++ zthfc->ddev->manufacturer = "HFC"; ++ + memset(&zthfc->span, 0x0, sizeof(struct dahdi_span)); // you never can tell... + +- sprintf(zthfc->span.name, "ZTHFC%d", hfc_dev_count + 1); ++ sprintf(zthfc->span.name, "ZTHFC/%d", hfc_dev_count + 1); + if (hfctmp->regs.nt_mode == 1) { + sprintf(zthfc->span.desc, "HFC-S PCI A ISDN card %d [NT]", hfc_dev_count + 1); + } else { +@@ -702,13 +711,14 @@ + + for (i = 0; i < zthfc->span.channels; i++) { + memset(&(zthfc->chans[i]), 0x0, sizeof(struct dahdi_chan)); +- sprintf(zthfc->chans[i].name, "ZTHFC%d/%d/%d", hfc_dev_count + 1,0,i + 1); ++ sprintf(zthfc->chans[i].name, "ZTHFC/%d/%d/%d", hfc_dev_count + 1,0,i + 1); + zthfc->chans[i].pvt = zthfc; + zthfc->chans[i].sigcap = DAHDI_SIG_EM | DAHDI_SIG_CLEAR | DAHDI_SIG_FXSLS | DAHDI_SIG_FXSGS | DAHDI_SIG_FXSKS | DAHDI_SIG_FXOLS | DAHDI_SIG_FXOGS | DAHDI_SIG_FXOKS | DAHDI_SIG_CAS | DAHDI_SIG_SF; + zthfc->chans[i].chanpos = i + 1; + } + +- if (dahdi_register(&zthfc->span,0)) { ++ list_add_tail(&zthfc->span.device_node, &zthfc->ddev->spans); ++ if (dahdi_register_device(zthfc->ddev, &zthfc->card->pcidev->dev)) { + printk(KERN_CRIT "unable to register DAHDI device!\n"); + return -1; + } +--- dahdi-linux-2.6.0/drivers/dahdi/zaphfc.h.orig 2012-01-25 14:23:37.000000000 +0200 ++++ dahdi-linux-2.6.0/drivers/dahdi/zaphfc.h 2012-01-25 14:24:33.000000000 +0200 +@@ -339,6 +339,7 @@ + struct dahdi_span span; + struct dahdi_chan chans[3]; + struct dahdi_chan *_chans[3]; ++ struct dahdi_device *ddev; + struct hfc_card *card; + } dahdi_hfc; + |