Added changes for recent 2.1.x kernels:
changed return type of isdn_close queue_task_* -> queue_task clear/set_bit -> test_and_... where apropriate. changed type of hard_header_cache parameter.
This commit is contained in:
parent
851f8e5b97
commit
8f4f0f33c7
|
@ -6,6 +6,11 @@
|
|||
* (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.3 1997/05/18 09:24:09 calle
|
||||
* added verbose disconnect reason reporting to avmb1.
|
||||
* some fixes in capi20 interface.
|
||||
* changed info messages for B1-PCI
|
||||
*
|
||||
* Revision 1.2 1997/03/05 21:20:41 fritz
|
||||
* Removed include of config.h (mkdep stated this is unneded).
|
||||
*
|
||||
|
@ -317,7 +322,7 @@ void avmb1_handle_capimsg(avmb1_card * card, __u16 appl, struct sk_buff *skb)
|
|||
return;
|
||||
}
|
||||
skb_queue_tail(&recv_queue, skb);
|
||||
queue_task_irq(&tq_recv_notify, &tq_immediate);
|
||||
queue_task(&tq_recv_notify, &tq_immediate);
|
||||
mark_bh(IMMEDIATE_BH);
|
||||
return;
|
||||
|
||||
|
@ -375,10 +380,10 @@ static void notify_handler(void *dummy)
|
|||
__u16 contr;
|
||||
|
||||
for (contr=1; VALID_CARD(contr); contr++)
|
||||
if (clear_bit(contr, ¬ify_up_set))
|
||||
if (test_and_clear_bit(contr, ¬ify_up_set))
|
||||
notify_up(contr);
|
||||
for (contr=1; VALID_CARD(contr); contr++)
|
||||
if (clear_bit(contr, ¬ify_down_set))
|
||||
if (test_and_clear_bit(contr, ¬ify_down_set))
|
||||
notify_down(contr);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.3 1997/05/18 09:24:14 calle
|
||||
* added verbose disconnect reason reporting to avmb1.
|
||||
* some fixes in capi20 interface.
|
||||
* changed info messages for B1-PCI
|
||||
*
|
||||
* Revision 1.2 1997/03/05 21:17:59 fritz
|
||||
* Added capi_poll for compiling under 2.1.27
|
||||
*
|
||||
|
@ -436,7 +441,8 @@ static int capi_open(struct inode *inode, struct file *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void capi_release(struct inode *inode, struct file *file)
|
||||
static CLOSETYPE
|
||||
capi_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
unsigned int minor = MINOR(inode->i_rdev);
|
||||
struct capidev *cdev;
|
||||
|
@ -444,7 +450,7 @@ static void capi_release(struct inode *inode, struct file *file)
|
|||
|
||||
if (minor >= CAPI_MAXMINOR || !capidevs[minor].is_open) {
|
||||
printk(KERN_ERR "capi20: release minor %d ???\n", minor);
|
||||
return;
|
||||
return CLOSEVAL;
|
||||
}
|
||||
cdev = &capidevs[minor];
|
||||
|
||||
|
@ -462,6 +468,7 @@ static void capi_release(struct inode *inode, struct file *file)
|
|||
cdev->is_open = 0;
|
||||
|
||||
MOD_DEC_USE_COUNT;
|
||||
return CLOSEVAL;
|
||||
}
|
||||
|
||||
static struct file_operations capi_fops =
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
*
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.14 1997/04/07 23:00:08 keil
|
||||
* GFP_KERNEL ---> GFP_ATOMIC
|
||||
*
|
||||
* Revision 1.13 1997/04/06 22:55:50 keil
|
||||
* Using SKB's
|
||||
*
|
||||
|
@ -482,11 +485,11 @@ isac_bh(struct IsdnCardState *sp)
|
|||
if (!sp)
|
||||
return;
|
||||
|
||||
if (clear_bit(ISAC_PHCHANGE, &sp->event))
|
||||
if (test_and_clear_bit(ISAC_PHCHANGE, &sp->event))
|
||||
process_new_ph(sp);
|
||||
if (clear_bit(ISAC_RCVBUFREADY, &sp->event))
|
||||
if (test_and_clear_bit(ISAC_RCVBUFREADY, &sp->event))
|
||||
process_rcv(sp);
|
||||
if (clear_bit(ISAC_XMTBUFREADY, &sp->event))
|
||||
if (test_and_clear_bit(ISAC_XMTBUFREADY, &sp->event))
|
||||
process_xmt(sp);
|
||||
}
|
||||
|
||||
|
@ -596,9 +599,9 @@ hscx_bh(struct HscxState *hsp)
|
|||
if (!hsp)
|
||||
return;
|
||||
|
||||
if (clear_bit(HSCX_RCVBUFREADY, &hsp->event))
|
||||
if (test_and_clear_bit(HSCX_RCVBUFREADY, &hsp->event))
|
||||
hscx_process_rcv(hsp);
|
||||
if (clear_bit(HSCX_XMTBUFREADY, &hsp->event))
|
||||
if (test_and_clear_bit(HSCX_XMTBUFREADY, &hsp->event))
|
||||
hscx_process_xmt(hsp);
|
||||
|
||||
}
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.43 1997/03/31 14:09:43 fritz
|
||||
* Fixed memory leak in isdn_close().
|
||||
*
|
||||
* Revision 1.42 1997/03/30 16:51:08 calle
|
||||
* changed calls to copy_from_user/copy_to_user and removed verify_area
|
||||
* were possible.
|
||||
|
@ -1632,7 +1635,7 @@ isdn_open(struct inode *ino, struct file *filep)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static void
|
||||
static CLOSETYPE
|
||||
isdn_close(struct inode *ino, struct file *filep)
|
||||
{
|
||||
uint minor = MINOR(ino->i_rdev);
|
||||
|
@ -1650,38 +1653,39 @@ isdn_close(struct inode *ino, struct file *filep)
|
|||
else
|
||||
dev->infochain = (infostruct *) (p->next);
|
||||
kfree(p);
|
||||
return;
|
||||
return CLOSEVAL;
|
||||
}
|
||||
q = p;
|
||||
p = (infostruct *) (p->next);
|
||||
}
|
||||
printk(KERN_WARNING "isdn: No private data while closing isdnctrl\n");
|
||||
return;
|
||||
return CLOSEVAL;
|
||||
}
|
||||
if (minor < ISDN_MINOR_CTRL) {
|
||||
drvidx = isdn_minor2drv(minor);
|
||||
if (drvidx < 0)
|
||||
return;
|
||||
return CLOSEVAL;
|
||||
c.command = ISDN_CMD_UNLOCK;
|
||||
c.driver = drvidx;
|
||||
(void) dev->drv[drvidx]->interface->command(&c);
|
||||
return;
|
||||
return CLOSEVAL;
|
||||
}
|
||||
if (minor <= ISDN_MINOR_CTRLMAX) {
|
||||
drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
|
||||
if (drvidx < 0)
|
||||
return;
|
||||
return CLOSEVAL;
|
||||
if (dev->profd == current)
|
||||
dev->profd = NULL;
|
||||
c.command = ISDN_CMD_UNLOCK;
|
||||
c.driver = drvidx;
|
||||
(void) dev->drv[drvidx]->interface->command(&c);
|
||||
return;
|
||||
return CLOSEVAL;
|
||||
}
|
||||
#ifdef CONFIG_ISDN_PPP
|
||||
if (minor <= ISDN_MINOR_PPPMAX)
|
||||
isdn_ppp_release(minor - ISDN_MINOR_PPP, filep);
|
||||
#endif
|
||||
return CLOSEVAL;
|
||||
}
|
||||
|
||||
static struct file_operations isdn_fops =
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.43 1997/03/30 16:51:13 calle
|
||||
* changed calls to copy_from_user/copy_to_user and removed verify_area
|
||||
* were possible.
|
||||
*
|
||||
* Revision 1.42 1997/03/11 08:43:51 fritz
|
||||
* Perform a hangup if number is deleted while dialing.
|
||||
*
|
||||
|
@ -402,7 +406,7 @@ isdn_net_stat_callback(int idx, int cmd)
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
if (clear_bit(0, (void *) &(p->dev.tbusy)))
|
||||
if (test_and_clear_bit(0, (void *) &(p->dev.tbusy)))
|
||||
mark_bh(NET_BH);
|
||||
}
|
||||
return 1;
|
||||
|
@ -983,7 +987,7 @@ isdn_net_start_xmit(struct sk_buff *skb, struct device *ndev)
|
|||
return 0;
|
||||
}
|
||||
/* Avoid timer-based retransmission conflicts. */
|
||||
if (set_bit(0, (void *) &ndev->tbusy) != 0)
|
||||
if (test_and_set_bit(0, (void *) &ndev->tbusy) != 0)
|
||||
printk(KERN_WARNING
|
||||
"%s: Transmitter access conflict.\n",
|
||||
ndev->name);
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.40 1997/03/24 22:55:27 fritz
|
||||
* Added debug code for status callbacks.
|
||||
*
|
||||
* Revision 1.39 1997/03/21 18:25:56 fritz
|
||||
* Corrected CTS handling.
|
||||
*
|
||||
|
@ -264,7 +267,7 @@ isdn_tty_try_read(modem_info * info, struct sk_buff *skb)
|
|||
#endif
|
||||
if (info->emu.mdmreg[12] & 128)
|
||||
tty->flip.flag_buf_ptr[len - 1] = 0xff;
|
||||
queue_task_irq_off(&tty->flip.tqueue, &tq_timer);
|
||||
queue_task(&tty->flip.tqueue, &tq_timer);
|
||||
SET_SKB_FREE(skb);
|
||||
kfree_skb(skb, FREE_READ);
|
||||
return 1;
|
||||
|
@ -315,7 +318,7 @@ isdn_tty_readmodem(void)
|
|||
tty->flip.flag_buf_ptr += r;
|
||||
tty->flip.char_buf_ptr += r;
|
||||
if (r)
|
||||
queue_task_irq_off(&tty->flip.tqueue, &tq_timer);
|
||||
queue_task(&tty->flip.tqueue, &tq_timer);
|
||||
restore_flags(flags);
|
||||
}
|
||||
} else
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.28 1997/03/07 01:33:01 fritz
|
||||
* Added proper ifdef's for CONFIG_ISDN_AUDIO
|
||||
*
|
||||
* Revision 1.27 1997/03/05 21:11:49 fritz
|
||||
* Minor fixes.
|
||||
*
|
||||
|
@ -422,10 +425,17 @@ typedef struct isdn_net_local_s {
|
|||
unsigned short,
|
||||
__u32);
|
||||
#else
|
||||
#if (LINUX_VERSION_CODE < 0x2011E)
|
||||
/* Ptr to orig. hard_header_cache */
|
||||
int (*org_hhc)(struct dst_entry *dst,
|
||||
struct dst_entry *neigh,
|
||||
struct hh_cache *hh);
|
||||
#else
|
||||
/* Ptr to orig. hard_header_cache */
|
||||
int (*org_hhc)(struct dst_entry *dst,
|
||||
struct neighbour *neigh,
|
||||
struct hh_cache *hh);
|
||||
#endif
|
||||
#endif
|
||||
/* Ptr to orig. header_cache_update */
|
||||
void (*org_hcu)(struct hh_cache *,
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.19 1997/03/25 23:13:56 keil
|
||||
* NI-1 US protocol
|
||||
*
|
||||
* Revision 1.18 1997/03/04 22:09:18 calle
|
||||
* Change macros copy_from_user and copy_to_user in inline function.
|
||||
* These are now correct replacements of the functions for 2.1.xx
|
||||
|
@ -376,7 +379,6 @@ static inline unsigned long copy_to_user(void *to, const void *from, unsigned lo
|
|||
#define LSTYPE int
|
||||
#define RWARG int
|
||||
#define LSARG off_t
|
||||
#define SET_SKB_FREE(x) ( x->free = 1 )
|
||||
#else
|
||||
#include <asm/uaccess.h>
|
||||
#define GET_USER get_user
|
||||
|
@ -385,11 +387,25 @@ static inline unsigned long copy_to_user(void *to, const void *from, unsigned lo
|
|||
#define LSTYPE long long
|
||||
#define RWARG unsigned long
|
||||
#define LSARG long long
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < 0x02010F)
|
||||
#define SET_SKB_FREE(x) ( x->free = 1 )
|
||||
#else
|
||||
#define SET_SKB_FREE(x)
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < 0x02011F)
|
||||
#define CLOSETYPE void
|
||||
#define CLOSEVAL
|
||||
#else
|
||||
#define CLOSETYPE int
|
||||
#define CLOSEVAL (0)
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < 0x020125)
|
||||
#define test_and_clear_bit clear_bit
|
||||
#define test_and_set_bit set_bit
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
Loading…
Reference in New Issue