12 #include <linux/pci.h>
14 #include <linux/ppp_defs.h>
17 static const char *NETjet_S_revision =
"$Revision: 2.13.2.4 $";
29 netjet_s_interrupt(
int intno,
void *
dev_id)
31 struct IsdnCardState *cs =
dev_id;
39 if (cs->debug & L1_DEB_ISAC)
40 debugl1(cs,
"tiger: i1 %x %x", s1val, val);
56 if ((s0val | s1val) == 0) {
57 spin_unlock_irqrestore(&cs->lock, flags);
76 if (s0val != cs->hw.njet.last_is0)
80 cs->hw.njet.last_is0, s0val);
81 spin_unlock_irqrestore(&cs->lock, flags);
84 cs->hw.njet.irqstat0 = s0val;
96 spin_unlock_irqrestore(&cs->lock, flags);
101 reset_netjet_s(
struct IsdnCardState *cs)
103 cs->hw.njet.ctrl_reg = 0xff;
109 cs->hw.njet.ctrl_reg = 0x40;
111 cs->hw.njet.ctrl_reg = 0x00;
114 cs->hw.njet.auxd = 0;
115 cs->hw.njet.dmactrl = 0;
118 byteout(cs->hw.njet.auxa, cs->hw.njet.auxd);
122 NETjet_S_card_msg(
struct IsdnCardState *cs,
int mt,
void *
arg)
130 spin_unlock_irqrestore(&cs->lock, flags);
143 spin_unlock_irqrestore(&cs->lock, flags);
152 struct IsdnCardState *cs)
159 cs->irq = dev_netjet->
irq;
165 if (!cs->hw.njet.base) {
173 pci_read_config_dword(dev_netjet, 0x04, &cfg);
174 if (cfg & 0x00100000)
181 printk(
KERN_WARNING "Netjet: You tried to load this driver with an incompatible TigerJet-card\n");
191 struct IsdnCardState *cs)
197 cs->hw.njet.ctrl_reg = 0xff;
201 cs->hw.njet.ctrl_reg = 0x00;
205 cs->hw.njet.auxd = 0xC0;
206 cs->hw.njet.dmactrl = 0;
210 byteout(cs->hw.njet.auxa, cs->hw.njet.auxd);
229 struct IsdnCardState *cs)
234 "NETjet-S: %s card configured at %#lx IRQ %d\n",
235 cs->subtyp ?
"TJ320" :
"TJ300", cs->hw.njet.base, cs->irq);
236 if (!
request_region(cs->hw.njet.base, bytecnt,
"netjet-s isdn")) {
238 "HiSax: NETjet-S config port %#lx-%#lx already in use\n",
240 cs->hw.njet.base + bytecnt);
247 cs->BC_Read_Reg = &dummyrr;
248 cs->BC_Write_Reg = &dummywr;
251 cs->cardmsg = &NETjet_S_card_msg;
252 cs->irq_func = &netjet_s_interrupt;
265 struct IsdnCardState *cs = card->
cs;
269 #error "not running on big endian machines now"
271 strcpy(tmp, NETjet_S_revision);
281 ret = njs_pci_probe(dev_netjet, cs);
289 ret = njs_cs_init(card, cs);
297 return njs_cs_init_rest(card, cs);