Commit fa3b21ed authored by Kai Germaschewski's avatar Kai Germaschewski

Merge

parents 236b5445 3bb3efb5
......@@ -343,12 +343,16 @@ static int __devinit b1pci_pci_probe(struct pci_dev *pdev,
static void __devexit b1pci_pci_remove(struct pci_dev *pdev)
{
#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4
avmcard *card = pci_get_drvdata(pdev);
if (card->dma)
b1pciv4_remove(pdev);
else
b1pci_remove(pdev);
#else
b1pci_remove(pdev);
#endif
}
static struct pci_driver b1pci_pci_driver = {
......
......@@ -703,16 +703,16 @@ int jiftime(char *s, long mark)
return 8;
}
static u8 tmpbuf[HISAX_STATUS_BUFSIZE];
static char tmpbuf[HISAX_STATUS_BUFSIZE];
void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt,
void VHiSax_putstatus(struct IsdnCardState *cs, char *head, const char *fmt,
va_list args)
{
/* if head == NULL the fmt contains the full info */
unsigned long flags;
int count, i;
u8 *p;
char *p;
isdn_ctrl ic;
int len;
......@@ -727,7 +727,7 @@ void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt,
len = p - tmpbuf;
p = tmpbuf;
} else {
p = fmt;
p = (char *) fmt;
len = strlen(fmt);
}
if (!cs) {
......
......@@ -1402,7 +1402,7 @@ int jiftime(char *s, long mark);
int HiSax_command(isdn_ctrl * ic);
int HiSax_writebuf_skb(int id, int chan, int ack, struct sk_buff *skb);
void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...);
void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args);
void VHiSax_putstatus(struct IsdnCardState *cs, char *head, const char *fmt, va_list args);
void HiSax_reportcard(int cardnr, int sel);
int QuickHex(char *txt, u8 * p, int cnt);
void LogFrame(struct IsdnCardState *cs, u8 * p, int size);
......
......@@ -231,7 +231,7 @@ fcclassic_setup(struct fritz_adapter *adapter)
adapter->isac.write_isac = &fcclassic_write_isac;
adapter->isac.read_isac_fifo = &fcclassic_read_isac_fifo;
adapter->isac.write_isac_fifo = &fcclassic_write_isac_fifo;
isac_setup(&adapter->isac);
hisax_isac_setup(&adapter->isac);
for (i = 0; i < 2; i++) {
hscx_init(&adapter->hscx[i]);
adapter->hscx[i].priv = adapter;
......
......@@ -46,24 +46,22 @@ MODULE_PARM(debug, "i");
MODULE_AUTHOR("Kai Germaschewski <kai.germaschewski@gmx.de>/Karsten Keil <kkeil@suse.de>");
MODULE_DESCRIPTION("AVM Fritz!PCI/PnP ISDN driver");
// FIXME temporary hack until I sort out the new PnP stuff
#define __ISAPNP__
static struct pci_device_id fcpci_ids[] __devinitdata = {
{ PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1 , PCI_ANY_ID, PCI_ANY_ID,
0, 0, (unsigned long) "Fritz!Card PCI" },
{ PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1_V2, PCI_ANY_ID, PCI_ANY_ID,
0, 0, (unsigned long) "Fritz!Card PCI v2" },
{ }
{ .vendor = PCI_VENDOR_ID_AVM,
.device = PCI_DEVICE_ID_AVM_A1,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long) "Fritz!Card PCI",
},
{ .vendor = PCI_VENDOR_ID_AVM,
.device = PCI_DEVICE_ID_AVM_A1_V2,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = (unsigned long) "Fritz!Card PCI v2" },
{}
};
MODULE_DEVICE_TABLE(pci, fcpci_ids);
static struct pnp_card_device_id fcpnp_ids[] __devinitdata = {
{ .id = "AVM0900",
.driver_data = (unsigned long) "Fritz!Card PnP",
.devs = { { "AVM0900" } } }
};
MODULE_DEVICE_TABLE(pnp_card, fcpnp_ids);
MODULE_DEVICE_TABLE(pci, fcpci_ids);
static int protocol = 2; /* EURO-ISDN Default */
MODULE_PARM(protocol, "i");
......@@ -782,7 +780,7 @@ static int __devinit fcpcipnp_setup(struct fritz_adapter *adapter)
case AVM_FRITZ_PCI:
case AVM_FRITZ_PNP:
fcpci_init(adapter);
isac_setup(&adapter->isac);
hisax_isac_setup(&adapter->isac);
break;
}
val = adapter->read_hdlc_status(adapter, 0);
......@@ -908,10 +906,10 @@ static struct pci_driver fcpci_driver = {
.id_table = fcpci_ids,
};
#ifdef __ISAPNP__
#ifdef CONFIG_PNP_CARD
static int __devinit fcpnp_probe(struct pnp_card *card,
const struct pnp_card_device_id *card_id)
const struct pnp_card_id *card_id)
{
struct fritz_adapter *adapter;
struct pnp_dev *pnp_dev;
......@@ -957,6 +955,14 @@ static void __devexit fcpnp_remove(struct pnp_card *pcard)
delete_adapter(adapter);
}
static struct pnp_card_id fcpnp_ids[] __devinitdata = {
{ .id = "AVM0900",
.driver_data = (unsigned long) "Fritz!Card PnP",
.devs = { { "AVM0900" } },
},
{}
};
static struct pnpc_driver fcpnp_driver = {
.name = "fcpnp",
.probe = fcpnp_probe,
......@@ -968,7 +974,7 @@ static struct pnpc_driver fcpnp_driver = {
static int __init hisax_fcpcipnp_init(void)
{
int retval, pci_nr_found;
int retval = 0, pci_nr_found;
printk(KERN_INFO "hisax_fcpcipnp: Fritz!Card PCI/PCIv2/PnP ISDN driver v0.0.1\n");
......@@ -977,10 +983,8 @@ static int __init hisax_fcpcipnp_init(void)
goto out;
pci_nr_found = retval;
#ifdef __ISAPNP__
#ifdef CONFIG_PNP_CARD
retval = pnpc_register_driver(&fcpnp_driver);
#else
retval = 0;
#endif
if (retval < 0)
goto out_unregister_pci;
......@@ -988,14 +992,14 @@ static int __init hisax_fcpcipnp_init(void)
#if !defined(CONFIG_HOTPLUG) || defined(MODULE)
if (pci_nr_found + retval == 0) {
retval = -ENODEV;
goto out_unregister_isapnp;
goto out_unregister_pnp;
}
#endif
return 0;
#if !defined(CONFIG_HOTPLUG) || defined(MODULE)
out_unregister_isapnp:
#ifdef __ISAPNP__
out_unregister_pnp:
#ifdef CONFIG_PNP_CARD
pnpc_unregister_driver(&fcpnp_driver);
#endif
#endif
......@@ -1007,7 +1011,7 @@ static int __init hisax_fcpcipnp_init(void)
static void __exit hisax_fcpcipnp_exit(void)
{
#ifdef __ISAPNP__
#ifdef CONFIG_PNP_CARD
pnpc_unregister_driver(&fcpnp_driver);
#endif
pci_unregister_driver(&fcpci_driver);
......
......@@ -770,7 +770,7 @@ void isac_init(struct isac *isac)
FsmInitTimer(&isac->l1m, &isac->timer);
}
void isac_setup(struct isac *isac)
void hisax_isac_setup(struct isac *isac)
{
int val, eval;
......@@ -890,7 +890,7 @@ EXPORT_SYMBOL(isac_d_l2l1);
EXPORT_SYMBOL(isacsx_setup);
EXPORT_SYMBOL(isacsx_irq);
EXPORT_SYMBOL(isac_setup);
EXPORT_SYMBOL(hisax_isac_setup);
EXPORT_SYMBOL(isac_irq);
module_init(hisax_isac_init);
......
......@@ -36,7 +36,7 @@ struct isac {
void isac_init(struct isac *isac);
void isac_d_l2l1(struct hisax_if *hisax_d_if, int pr, void *arg);
void isac_setup(struct isac *isac);
void hisax_isac_setup(struct isac *isac);
void isac_irq(struct isac *isac);
void isacsx_setup(struct isac *isac);
......
......@@ -126,7 +126,7 @@ static char *strL1Event[] =
};
void
debugl1(struct IsdnCardState *cs, char *fmt, ...)
debugl1(struct IsdnCardState *cs, const char *fmt, ...)
{
va_list args;
char tmp[8];
......
......@@ -28,7 +28,7 @@
#define B_LL_CONNECT 9
#define B_LL_OK 10
extern void debugl1(struct IsdnCardState *cs, char *fmt, ...);
extern void debugl1(struct IsdnCardState *cs, const char *fmt, ...);
extern void DChannel_proc_xmt(struct IsdnCardState *cs);
extern void DChannel_proc_rcv(struct IsdnCardState *cs);
extern void l1_msg(struct IsdnCardState *cs, int pr, void *arg);
......
......@@ -85,7 +85,7 @@ config ISDN_TTY_FAX
config ISDN_X25
bool "X.25 PLP on top of ISDN"
depends on X25
depends on X25 && BROKEN
help
This feature provides the X.25 protocol over ISDN connections.
See <file:Documentation/isdn/README.x25> for more information
......
......@@ -58,6 +58,7 @@
#include "isdn_net.h"
#include "isdn_ppp.h"
#include "isdn_ciscohdlck.h"
#include "isdn_concap.h"
#define ISDN_NET_TX_TIMEOUT (20*HZ)
......
......@@ -1037,7 +1037,7 @@ isdn_ppp_start_xmit(struct sk_buff *skb, struct net_device *ndev)
isdn_ppp_frame_log("xmit1", skb->data, skb->len, 32, ipppd->unit, -1);
ippp_push_proto(ind_ppp, skb, proto);
ippp_mp_xmit(idev, skb, proto);
ippp_mp_xmit(idev, skb);
return 0;
drop:
......
......@@ -91,12 +91,13 @@ ippp_mp_disconnected(isdn_net_dev *idev)
}
void
ippp_mp_xmit(isdn_net_dev *idev, struct sk_buff *skb, u16 proto)
ippp_mp_xmit(isdn_net_dev *idev, struct sk_buff *skb)
{
struct ind_ppp *ind_ppp = idev->ind_priv;
struct inl_ppp *inl_ppp = idev->mlp->inl_priv;
unsigned char *p;
long txseq;
u32 txseq;
u16 proto;
if (!(inl_ppp->mp_cfg & SC_MP_PROT)) {
return ippp_xmit(idev, skb);
......
......@@ -19,7 +19,7 @@
int ippp_mp_bind(isdn_net_dev *idev);
void ippp_mp_disconnected(isdn_net_dev *idev);
int ippp_mp_bundle(isdn_net_dev *idev, int val);
void ippp_mp_xmit(isdn_net_dev *idev, struct sk_buff *skb, u16 proto);
void ippp_mp_xmit(isdn_net_dev *idev, struct sk_buff *skb);
void ippp_mp_receive(isdn_net_dev *idev, struct sk_buff *skb, u16 proto);
#else
......@@ -42,9 +42,9 @@ ippp_mp_bundle(isdn_net_dev *idev, int val)
}
static inline void
ippp_mp_xmit(isdn_net_dev *idev, struct sk_buff *skb, u16 proto)
ippp_mp_xmit(isdn_net_dev *idev, struct sk_buff *skb)
{
ippp_xmit(idev, skb, proto);
ippp_xmit(idev, skb);
}
static inline void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment