Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* $Id: nj_s.c,v 2.13.2.4 2004/01/16 01:53:48 keil Exp $ |
| 2 | * |
| 3 | * This software may be used and distributed according to the terms |
| 4 | * of the GNU General Public License, incorporated herein by reference. |
| 5 | * |
| 6 | */ |
| 7 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | #include <linux/init.h> |
| 9 | #include "hisax.h" |
| 10 | #include "isac.h" |
| 11 | #include "isdnl1.h" |
| 12 | #include <linux/pci.h> |
| 13 | #include <linux/interrupt.h> |
| 14 | #include <linux/ppp_defs.h> |
| 15 | #include "netjet.h" |
| 16 | |
Adrian Bunk | 672c3fd | 2005-06-25 14:59:18 -0700 | [diff] [blame] | 17 | static const char *NETjet_S_revision = "$Revision: 2.13.2.4 $"; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
| 19 | static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off) |
| 20 | { |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 21 | return (5); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | static void dummywr(struct IsdnCardState *cs, int chan, u_char off, u_char value) |
| 25 | { |
| 26 | } |
| 27 | |
| 28 | static irqreturn_t |
David Howells | 7d12e78 | 2006-10-05 14:55:46 +0100 | [diff] [blame] | 29 | netjet_s_interrupt(int intno, void *dev_id) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | { |
| 31 | struct IsdnCardState *cs = dev_id; |
| 32 | u_char val, s1val, s0val; |
| 33 | u_long flags; |
| 34 | |
| 35 | spin_lock_irqsave(&cs->lock, flags); |
| 36 | s1val = bytein(cs->hw.njet.base + NETJET_IRQSTAT1); |
| 37 | if (!(s1val & NETJET_ISACIRQ)) { |
| 38 | val = NETjet_ReadIC(cs, ISAC_ISTA); |
| 39 | if (cs->debug & L1_DEB_ISAC) |
| 40 | debugl1(cs, "tiger: i1 %x %x", s1val, val); |
| 41 | if (val) { |
| 42 | isac_interrupt(cs, val); |
| 43 | NETjet_WriteIC(cs, ISAC_MASK, 0xFF); |
| 44 | NETjet_WriteIC(cs, ISAC_MASK, 0x0); |
| 45 | } |
| 46 | s1val = 1; |
| 47 | } else |
| 48 | s1val = 0; |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 49 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | * read/write stat0 is better, because lower IRQ rate |
| 51 | * Note the IRQ is on for 125 us if a condition match |
| 52 | * thats long on modern CPU and so the IRQ is reentered |
| 53 | * all the time. |
| 54 | */ |
| 55 | s0val = bytein(cs->hw.njet.base + NETJET_IRQSTAT0); |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 56 | if ((s0val | s1val) == 0) { // shared IRQ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | spin_unlock_irqrestore(&cs->lock, flags); |
| 58 | return IRQ_NONE; |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 59 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | if (s0val) |
| 61 | byteout(cs->hw.njet.base + NETJET_IRQSTAT0, s0val); |
| 62 | /* start new code 13/07/00 GE */ |
| 63 | /* set bits in sval to indicate which page is free */ |
| 64 | if (inl(cs->hw.njet.base + NETJET_DMA_WRITE_ADR) < |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 65 | inl(cs->hw.njet.base + NETJET_DMA_WRITE_IRQ)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 66 | /* the 2nd write page is free */ |
| 67 | s0val = 0x08; |
| 68 | else /* the 1st write page is free */ |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 69 | s0val = 0x04; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | if (inl(cs->hw.njet.base + NETJET_DMA_READ_ADR) < |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 71 | inl(cs->hw.njet.base + NETJET_DMA_READ_IRQ)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 | /* the 2nd read page is free */ |
| 73 | s0val |= 0x02; |
| 74 | else /* the 1st read page is free */ |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 75 | s0val |= 0x01; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | if (s0val != cs->hw.njet.last_is0) /* we have a DMA interrupt */ |
| 77 | { |
| 78 | if (test_and_set_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags)) { |
| 79 | printk(KERN_WARNING "nj LOCK_ATOMIC s0val %x->%x\n", |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 80 | cs->hw.njet.last_is0, s0val); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 | spin_unlock_irqrestore(&cs->lock, flags); |
| 82 | return IRQ_HANDLED; |
| 83 | } |
| 84 | cs->hw.njet.irqstat0 = s0val; |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 85 | if ((cs->hw.njet.irqstat0 & NETJET_IRQM0_READ) != |
| 86 | (cs->hw.njet.last_is0 & NETJET_IRQM0_READ)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | /* we have a read dma int */ |
| 88 | read_tiger(cs); |
| 89 | if ((cs->hw.njet.irqstat0 & NETJET_IRQM0_WRITE) != |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 90 | (cs->hw.njet.last_is0 & NETJET_IRQM0_WRITE)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 91 | /* we have a write dma int */ |
| 92 | write_tiger(cs); |
| 93 | /* end new code 13/07/00 GE */ |
| 94 | test_and_clear_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags); |
| 95 | } |
| 96 | spin_unlock_irqrestore(&cs->lock, flags); |
| 97 | return IRQ_HANDLED; |
| 98 | } |
| 99 | |
| 100 | static void |
| 101 | reset_netjet_s(struct IsdnCardState *cs) |
| 102 | { |
| 103 | cs->hw.njet.ctrl_reg = 0xff; /* Reset On */ |
| 104 | byteout(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg); |
| 105 | mdelay(10); |
| 106 | /* now edge triggered for TJ320 GE 13/07/00 */ |
| 107 | /* see comment in IRQ function */ |
| 108 | if (cs->subtyp) /* TJ320 */ |
| 109 | cs->hw.njet.ctrl_reg = 0x40; /* Reset Off and status read clear */ |
| 110 | else |
| 111 | cs->hw.njet.ctrl_reg = 0x00; /* Reset Off and status read clear */ |
| 112 | byteout(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg); |
| 113 | mdelay(10); |
| 114 | cs->hw.njet.auxd = 0; |
| 115 | cs->hw.njet.dmactrl = 0; |
| 116 | byteout(cs->hw.njet.base + NETJET_AUXCTRL, ~NETJET_ISACIRQ); |
| 117 | byteout(cs->hw.njet.base + NETJET_IRQMASK1, NETJET_ISACIRQ); |
| 118 | byteout(cs->hw.njet.auxa, cs->hw.njet.auxd); |
| 119 | } |
| 120 | |
| 121 | static int |
| 122 | NETjet_S_card_msg(struct IsdnCardState *cs, int mt, void *arg) |
| 123 | { |
| 124 | u_long flags; |
| 125 | |
| 126 | switch (mt) { |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 127 | case CARD_RESET: |
| 128 | spin_lock_irqsave(&cs->lock, flags); |
| 129 | reset_netjet_s(cs); |
| 130 | spin_unlock_irqrestore(&cs->lock, flags); |
| 131 | return (0); |
| 132 | case CARD_RELEASE: |
| 133 | release_io_netjet(cs); |
| 134 | return (0); |
| 135 | case CARD_INIT: |
| 136 | reset_netjet_s(cs); |
| 137 | inittiger(cs); |
| 138 | spin_lock_irqsave(&cs->lock, flags); |
| 139 | clear_pending_isac_ints(cs); |
| 140 | initisac(cs); |
| 141 | /* Reenable all IRQ */ |
| 142 | cs->writeisac(cs, ISAC_MASK, 0); |
| 143 | spin_unlock_irqrestore(&cs->lock, flags); |
| 144 | return (0); |
| 145 | case CARD_TEST: |
| 146 | return (0); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 147 | } |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 148 | return (0); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 | } |
| 150 | |
Greg Kroah-Hartman | ed5a84c | 2012-12-21 13:13:05 -0800 | [diff] [blame] | 151 | static int njs_pci_probe(struct pci_dev *dev_netjet, struct IsdnCardState *cs) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 152 | { |
Al Viro | b4482a4 | 2007-10-14 19:35:40 +0100 | [diff] [blame] | 153 | u32 cfg; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 154 | |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 155 | if (pci_enable_device(dev_netjet)) |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 156 | return (0); |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 157 | pci_set_master(dev_netjet); |
| 158 | cs->irq = dev_netjet->irq; |
| 159 | if (!cs->irq) { |
| 160 | printk(KERN_WARNING "NETjet-S: No IRQ for PCI card found\n"); |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 161 | return (0); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | } |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 163 | cs->hw.njet.base = pci_resource_start(dev_netjet, 0); |
| 164 | if (!cs->hw.njet.base) { |
| 165 | printk(KERN_WARNING "NETjet-S: No IO-Adr for PCI card found\n"); |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 166 | return (0); |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 167 | } |
| 168 | /* the TJ300 and TJ320 must be detected, the IRQ handling is different |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 169 | * unfortunately the chips use the same device ID, but the TJ320 has |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 170 | * the bit20 in status PCI cfg register set |
| 171 | */ |
| 172 | pci_read_config_dword(dev_netjet, 0x04, &cfg); |
| 173 | if (cfg & 0x00100000) |
| 174 | cs->subtyp = 1; /* TJ320 */ |
| 175 | else |
| 176 | cs->subtyp = 0; /* TJ300 */ |
| 177 | /* 2001/10/04 Christoph Ersfeld, Formula-n Europe AG www.formula-n.com */ |
| 178 | if ((dev_netjet->subsystem_vendor == 0x55) && |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 179 | (dev_netjet->subsystem_device == 0x02)) { |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 180 | printk(KERN_WARNING "Netjet: You tried to load this driver with an incompatible TigerJet-card\n"); |
| 181 | printk(KERN_WARNING "Use type=41 for Formula-n enter:now ISDN PCI and compatible\n"); |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 182 | return (0); |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 183 | } |
| 184 | /* end new code */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 185 | |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 186 | return (1); |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 187 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 188 | |
Greg Kroah-Hartman | ed5a84c | 2012-12-21 13:13:05 -0800 | [diff] [blame] | 189 | static int njs_cs_init(struct IsdnCard *card, struct IsdnCardState *cs) |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 190 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 191 | |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 192 | cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA; |
| 193 | cs->hw.njet.isac = cs->hw.njet.base | NETJET_ISAC_OFF; |
| 194 | |
| 195 | cs->hw.njet.ctrl_reg = 0xff; /* Reset On */ |
| 196 | byteout(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg); |
| 197 | mdelay(10); |
| 198 | |
| 199 | cs->hw.njet.ctrl_reg = 0x00; /* Reset Off and status read clear */ |
| 200 | byteout(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg); |
| 201 | mdelay(10); |
| 202 | |
| 203 | cs->hw.njet.auxd = 0xC0; |
| 204 | cs->hw.njet.dmactrl = 0; |
| 205 | |
| 206 | byteout(cs->hw.njet.base + NETJET_AUXCTRL, ~NETJET_ISACIRQ); |
| 207 | byteout(cs->hw.njet.base + NETJET_IRQMASK1, NETJET_ISACIRQ); |
| 208 | byteout(cs->hw.njet.auxa, cs->hw.njet.auxd); |
| 209 | |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 210 | switch (((NETjet_ReadIC(cs, ISAC_RBCH) >> 5) & 3)) |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 211 | { |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 212 | case 0: |
| 213 | return 1; /* end loop */ |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 214 | |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 215 | case 3: |
| 216 | printk(KERN_WARNING "NETjet-S: NETspider-U PCI card found\n"); |
| 217 | return -1; /* continue looping */ |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 218 | |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 219 | default: |
| 220 | printk(KERN_WARNING "NETjet-S: No PCI card found\n"); |
| 221 | return 0; /* end loop & function */ |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 222 | } |
| 223 | return 1; /* end loop */ |
| 224 | } |
| 225 | |
Greg Kroah-Hartman | ed5a84c | 2012-12-21 13:13:05 -0800 | [diff] [blame] | 226 | static int njs_cs_init_rest(struct IsdnCard *card, struct IsdnCardState *cs) |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 227 | { |
| 228 | const int bytecnt = 256; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 229 | |
| 230 | printk(KERN_INFO |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 231 | "NETjet-S: %s card configured at %#lx IRQ %d\n", |
| 232 | cs->subtyp ? "TJ320" : "TJ300", cs->hw.njet.base, cs->irq); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 233 | if (!request_region(cs->hw.njet.base, bytecnt, "netjet-s isdn")) { |
| 234 | printk(KERN_WARNING |
Jeff Garzik | 8349304 | 2007-10-31 03:42:07 -0400 | [diff] [blame] | 235 | "HiSax: NETjet-S config port %#lx-%#lx already in use\n", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 236 | cs->hw.njet.base, |
| 237 | cs->hw.njet.base + bytecnt); |
| 238 | return (0); |
| 239 | } |
| 240 | cs->readisac = &NETjet_ReadIC; |
| 241 | cs->writeisac = &NETjet_WriteIC; |
| 242 | cs->readisacfifo = &NETjet_ReadICfifo; |
| 243 | cs->writeisacfifo = &NETjet_WriteICfifo; |
| 244 | cs->BC_Read_Reg = &dummyrr; |
| 245 | cs->BC_Write_Reg = &dummywr; |
| 246 | cs->BC_Send_Data = &netjet_fill_dma; |
| 247 | setup_isac(cs); |
| 248 | cs->cardmsg = &NETjet_S_card_msg; |
| 249 | cs->irq_func = &netjet_s_interrupt; |
Thomas Gleixner | 9ba02be | 2006-07-01 19:29:36 -0700 | [diff] [blame] | 250 | cs->irq_flags |= IRQF_SHARED; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 251 | ISACVersion(cs, "NETjet-S:"); |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 252 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 253 | return (1); |
| 254 | } |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 255 | |
Greg Kroah-Hartman | ed5a84c | 2012-12-21 13:13:05 -0800 | [diff] [blame] | 256 | static struct pci_dev *dev_netjet = NULL; |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 257 | |
Greg Kroah-Hartman | ed5a84c | 2012-12-21 13:13:05 -0800 | [diff] [blame] | 258 | int setup_netjet_s(struct IsdnCard *card) |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 259 | { |
| 260 | int ret; |
| 261 | struct IsdnCardState *cs = card->cs; |
| 262 | char tmp[64]; |
| 263 | |
| 264 | #ifdef __BIG_ENDIAN |
| 265 | #error "not running on big endian machines now" |
| 266 | #endif |
| 267 | strcpy(tmp, NETjet_S_revision); |
| 268 | printk(KERN_INFO "HiSax: Traverse Tech. NETjet-S driver Rev. %s\n", HiSax_getrev(tmp)); |
| 269 | if (cs->typ != ISDN_CTYPE_NETJET_S) |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 270 | return (0); |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 271 | test_and_clear_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags); |
| 272 | |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 273 | for (;;) |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 274 | { |
Tilman Schmidt | 41a68a7 | 2010-01-18 17:24:10 +0100 | [diff] [blame] | 275 | if ((dev_netjet = hisax_find_pci_device(PCI_VENDOR_ID_TIGERJET, |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 276 | PCI_DEVICE_ID_TIGERJET_300, dev_netjet))) { |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 277 | ret = njs_pci_probe(dev_netjet, cs); |
| 278 | if (!ret) |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 279 | return (0); |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 280 | } else { |
| 281 | printk(KERN_WARNING "NETjet-S: No PCI card found\n"); |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 282 | return (0); |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 283 | } |
| 284 | |
| 285 | ret = njs_cs_init(card, cs); |
| 286 | if (!ret) |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 287 | return (0); |
Jeff Garzik | 0566a66 | 2007-07-15 04:25:35 -0400 | [diff] [blame] | 288 | if (ret > 0) |
| 289 | break; |
| 290 | /* otherwise, ret < 0, continue looping */ |
| 291 | } |
| 292 | |
| 293 | return njs_cs_init_rest(card, cs); |
| 294 | } |