diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-01-25 14:46:48 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-01-25 14:47:25 +0200 |
commit | 9b1ea25937b6b934843d7bef8ebc399189292619 (patch) | |
tree | bee171e6fd56bd8ab019b6c289f29d7636152e07 /main/dahdi-linux-grsec | |
parent | d1a56cb116314ee549df8fe88e1a6b8ce0f6b053 (diff) | |
download | aports-9b1ea25937b6b934843d7bef8ebc399189292619.tar.bz2 aports-9b1ea25937b6b934843d7bef8ebc399189292619.tar.xz |
main/dahdi-linux-grsec: fix zaphfc, and enable build
Diffstat (limited to 'main/dahdi-linux-grsec')
-rw-r--r-- | main/dahdi-linux-grsec/APKBUILD | 4 | ||||
-rw-r--r-- | main/dahdi-linux-grsec/zaphfc-dahdi-2.6.0.patch | 58 |
2 files changed, 61 insertions, 1 deletions
diff --git a/main/dahdi-linux-grsec/APKBUILD b/main/dahdi-linux-grsec/APKBUILD index 4aeba866c4..3b3d40ee7a 100644 --- a/main/dahdi-linux-grsec/APKBUILD +++ b/main/dahdi-linux-grsec/APKBUILD @@ -24,7 +24,7 @@ _dahdiver=2.6.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 @@ -39,6 +39,7 @@ source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/${_realna zaphfc-dahdi-flortz.diff zaphfc-dahdi-2.4.0.patch zaphfc-dahdi-2.5.0.patch + zaphfc-dahdi-2.6.0.patch constify.patch " # dahdi-2.5.0-bri-fixes.patch @@ -88,4 +89,5 @@ c6308ea8aaafba0a9d7f9825d7c9dcf8 dahdi-zaphfc.patch 035a6d91b2fb56a9b76a60a2e494fe9e zaphfc-dahdi-flortz.diff 0fdcd8c8c93bc1fe33c0af12b6cc6b05 zaphfc-dahdi-2.4.0.patch 9ed23321512274c6c5c5b76af0411e38 zaphfc-dahdi-2.5.0.patch +6273db53267e1f322d91bf1c8b97ba19 zaphfc-dahdi-2.6.0.patch 15fd0337d9e592f2f1829770c2e69c86 constify.patch" diff --git a/main/dahdi-linux-grsec/zaphfc-dahdi-2.6.0.patch b/main/dahdi-linux-grsec/zaphfc-dahdi-2.6.0.patch new file mode 100644 index 0000000000..5a77438462 --- /dev/null +++ b/main/dahdi-linux-grsec/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; + |