[Pkg-voip-commits] r7587 - in /zaptel/branches/lenny/debian: changelog patches/series patches/vzaphfc_net_device_2629 patches/vzaphfc_no_owner_2630
tzafrir-guest at alioth.debian.org
tzafrir-guest at alioth.debian.org
Fri Sep 11 16:23:42 UTC 2009
Author: tzafrir-guest
Date: Fri Sep 11 16:23:41 2009
New Revision: 7587
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=7587
Log:
* Patches xpp_sysfs_busid_2630, xpp_procfs_owner_2630, vzaphfc_no_owner_2630:
Fix two 2.6.30 build issues (Closes: #537202).
* Patche vzaphfc_net_device_2629: fixes vzaphfc with 2.6.29 (Closes: #522289).
Added:
zaptel/branches/lenny/debian/patches/vzaphfc_net_device_2629
zaptel/branches/lenny/debian/patches/vzaphfc_no_owner_2630
Modified:
zaptel/branches/lenny/debian/changelog
zaptel/branches/lenny/debian/patches/series
Modified: zaptel/branches/lenny/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/branches/lenny/debian/changelog?rev=7587&op=diff
==============================================================================
--- zaptel/branches/lenny/debian/changelog (original)
+++ zaptel/branches/lenny/debian/changelog Fri Sep 11 16:23:41 2009
@@ -6,11 +6,12 @@
(Closes: #518017)
* Tell Zaptel we do want our custom OSLEC echo canceller (Closes: #510858).
* Fix URLs: digium.com -> asterisk.org .
- * Patches xpp_sysfs_busid_2630 xpp_procfs_owner_2630: Fix two 2.6.30
- build issues (Closes: #537202).
+ * Patches xpp_sysfs_busid_2630, xpp_procfs_owner_2630, vzaphfc_no_owner_2630:
+ Fix two 2.6.30 build issues (Closes: #537202).
* Disable building wcopenpci on sparc as well (Closes: #544779).
-
- -- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Wed, 09 Sep 2009 07:52:04 +0300
+ * Patche vzaphfc_net_device_2629: fixes vzaphfc with 2.6.29 (Closes: #522289).
+
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Fri, 11 Sep 2009 19:17:44 +0300
zaptel (1:1.4.11~dfsg-3) unstable; urgency=high
Modified: zaptel/branches/lenny/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/branches/lenny/debian/patches/series?rev=7587&op=diff
==============================================================================
--- zaptel/branches/lenny/debian/patches/series (original)
+++ zaptel/branches/lenny/debian/patches/series Fri Sep 11 16:23:41 2009
@@ -19,3 +19,5 @@
hrtimer_2628
xpp_sysfs_busid_2630
xpp_procfs_owner_2630
+vzaphfc_no_owner_2630
+vzaphfc_net_device_2629
Added: zaptel/branches/lenny/debian/patches/vzaphfc_net_device_2629
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/branches/lenny/debian/patches/vzaphfc_net_device_2629?rev=7587&op=file
==============================================================================
--- zaptel/branches/lenny/debian/patches/vzaphfc_net_device_2629 (added)
+++ zaptel/branches/lenny/debian/patches/vzaphfc_net_device_2629 Fri Sep 11 16:23:41 2009
@@ -1,0 +1,141 @@
+Only in modules-2.6.29/zaptel/kernel/vzaphfc/: modules.order
+--- a/kernel/vzaphfc/vzaphfc_main.c
++++ b/kernel/vzaphfc/vzaphfc_main.c
+@@ -57,9 +57,9 @@ int debug_level = 0;
+ #endif
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+-#define SET_PROC_DIRENTRY_OWNER(p) do { (p)->owner = THIS_MODULE; }
++#define SET_PROC_DIRENTRY_OWNER(p) do { (p)->owner = THIS_MODULE; } while (0);
+ #else
+-#define SET_PROC_DIRENTRY_OWNER(p) do { } while(0);
++#define SET_PROC_DIRENTRY_OWNER(p) do { } while(0);
+ #endif
+
+ static struct pci_device_id hfc_pci_ids[] = {
+@@ -570,9 +570,18 @@ static int hfc_proc_read_bufs(char *page
+ * net_device interface functions
+ ******************************************/
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
++#define netdev_priv(netdev) (netdev)->priv
++#endif
++
++inline struct hfc_chan_duplex* get_netdev_chan(struct net_device *netdev)
++{
++ return (struct hfc_chan_duplex*)netdev_priv(netdev);
++}
++
+ static int hfc_open(struct net_device *netdev)
+ {
+- struct hfc_chan_duplex *chan = netdev->priv;
++ struct hfc_chan_duplex *chan = get_netdev_chan(netdev);
+ struct hfc_card *card = chan->card;
+
+ spin_lock(&chan->lock);
+@@ -599,7 +608,7 @@ static int hfc_open(struct net_device *n
+
+ static int hfc_close(struct net_device *netdev)
+ {
+- struct hfc_chan_duplex *chan = netdev->priv;
++ struct hfc_chan_duplex *chan = get_netdev_chan(netdev);
+ struct hfc_card *card = chan->card;
+
+ spin_lock(&chan->lock);
+@@ -625,7 +634,7 @@ static int hfc_close(struct net_device *
+
+ static int hfc_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+ {
+- struct hfc_chan_duplex *chan = netdev->priv;
++ struct hfc_chan_duplex *chan = get_netdev_chan(netdev);
+ struct hfc_card *card = chan->card;
+
+ netdev->trans_start = jiffies;
+@@ -643,7 +652,7 @@ static int hfc_xmit_frame(struct sk_buff
+
+ static struct net_device_stats *hfc_get_stats(struct net_device *netdev)
+ {
+- struct hfc_chan_duplex *chan = netdev->priv;
++ struct hfc_chan_duplex *chan = get_netdev_chan(netdev);
+ // struct hfc_card *card = chan->card;
+
+ return &chan->net_device_stats;
+@@ -651,7 +660,7 @@ static struct net_device_stats *hfc_get_
+
+ static void hfc_set_multicast_list(struct net_device *netdev)
+ {
+- struct hfc_chan_duplex *chan = netdev->priv;
++ struct hfc_chan_duplex *chan = get_netdev_chan(netdev);
+ struct hfc_card *card = chan->card;
+
+ spin_lock(&card->lock);
+@@ -742,6 +751,17 @@ static void hfc_set_multicast_list(struc
+ hfc_update_fifo_state(card);
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
++#else
++static struct net_device_ops hfc_netdev_ops = {
++ .ndo_open = hfc_open,
++ .ndo_stop = hfc_close,
++ .ndo_start_xmit = hfc_xmit_frame,
++ .ndo_get_stats = hfc_get_stats,
++ .ndo_set_multicast_list = hfc_set_multicast_list
++};
++#endif
++
+ /******************************************
+ * Zaptel interface (zaptel sucks)
+ ******************************************/
+@@ -1577,12 +1597,16 @@ static void hfc_frame_arrived(struct hfc
+
+ static void hfc_setup_lapd(struct hfc_chan_duplex *chan)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ chan->netdev->priv = chan;
+ chan->netdev->open = hfc_open;
+ chan->netdev->stop = hfc_close;
+ chan->netdev->hard_start_xmit = hfc_xmit_frame;
+ chan->netdev->get_stats = hfc_get_stats;
+ chan->netdev->set_multicast_list = hfc_set_multicast_list;
++#else
++ chan->netdev->netdev_ops = &hfc_netdev_ops;
++#endif
+
+ memset(chan->netdev->dev_addr, 0x00, sizeof(chan->netdev->dev_addr));
+
+@@ -1740,7 +1764,7 @@ static int __devinit hfc_probe(struct pc
+ card->chans[D].tx.fifo_size = card->chans[D].tx.z_max - card->chans[D].tx.z_min + 1;
+ card->chans[D].tx.f_num = card->chans[D].tx.f_max - card->chans[D].tx.f_min + 1;
+
+- if(!(card->chans[D].netdev = alloc_netdev(0, "isdn%dd", setup_lapd))) {
++ if(!(card->chans[D].netdev = alloc_netdev( sizeof(struct hfc_chan_duplex), "isdn%dd", setup_lapd))) {
+ printk(KERN_ERR hfc_DRIVER_PREFIX
+ "net_device alloc failed, abort.\n");
+ err = -ENOMEM;
+--- a/kernel/vzaphfc/lapd.c
++++ b/kernel/vzaphfc/lapd.c
+@@ -12,6 +12,7 @@
+
+ #include "lapd.h"
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ static int lapd_change_mtu(struct net_device *dev, int mtu)
+ {
+ return -EINVAL;
+@@ -21,12 +22,14 @@ static int lapd_mac_addr(struct net_devi
+ {
+ return -EINVAL;
+ }
++#endif
+
+ void setup_lapd(struct net_device *netdev)
+ {
+-
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ netdev->change_mtu = lapd_change_mtu;
+ netdev->set_mac_address = lapd_mac_addr;
++#endif
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ netdev->hard_header = NULL;
+ netdev->rebuild_header = NULL;
Added: zaptel/branches/lenny/debian/patches/vzaphfc_no_owner_2630
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/branches/lenny/debian/patches/vzaphfc_no_owner_2630?rev=7587&op=file
==============================================================================
--- zaptel/branches/lenny/debian/patches/vzaphfc_no_owner_2630 (added)
+++ zaptel/branches/lenny/debian/patches/vzaphfc_no_owner_2630 Fri Sep 11 16:23:41 2009
@@ -1,0 +1,45 @@
+The 'osnwer' field in procfs should not be used as of 2.6.30.
+Use the same fix as of upstream r6642 (Upstream issue 14964).
+
+--- a/kernel/vzaphfc/vzaphfc_main.c
++++ b/kernel/vzaphfc/vzaphfc_main.c
+@@ -56,6 +56,12 @@ static struct proc_dir_entry *hfc_proc_z
+ int debug_level = 0;
+ #endif
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
++#define SET_PROC_DIRENTRY_OWNER(p) do { (p)->owner = THIS_MODULE; }
++#else
++#define SET_PROC_DIRENTRY_OWNER(p) do { } while(0);
++#endif
++
+ static struct pci_device_id hfc_pci_ids[] = {
+ {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_2BD0,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+@@ -1858,22 +1864,22 @@ static int __devinit hfc_probe(struct pc
+ sizeof(card->proc_dir_name),
+ "%d", card->cardnum);
+ card->proc_dir = proc_mkdir(card->proc_dir_name, hfc_proc_zaphfc_dir);
+- card->proc_dir->owner = THIS_MODULE;
++ SET_PROC_DIRENTRY_OWNER(card->proc_dir);
+
+ card->proc_info = create_proc_read_entry(
+ "info", 0444, card->proc_dir,
+ hfc_proc_read_info, card);
+- card->proc_info->owner = THIS_MODULE;
++ SET_PROC_DIRENTRY_OWNER(card->proc_info);
+
+ card->proc_fifos = create_proc_read_entry(
+ "fifos", 0400, card->proc_dir,
+ hfc_proc_read_fifos, card);
+- card->proc_fifos->owner = THIS_MODULE;
++ SET_PROC_DIRENTRY_OWNER(card->proc_fifos);
+
+ card->proc_bufs = create_proc_read_entry(
+ "bufs", 0400, card->proc_dir,
+ hfc_proc_read_bufs, card);
+- card->proc_bufs->owner = THIS_MODULE;
++ SET_PROC_DIRENTRY_OWNER(card->proc_bufs);
+
+ hfc_resetCard(card);
+
More information about the Pkg-voip-commits
mailing list