2 static const char rcsid[] =
3 "Revision: 3.4.5 Date: 2002/03/07 ";
215 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
217 #include <linux/module.h>
218 #include <linux/kernel.h>
221 #include <linux/pci.h>
222 #include <linux/errno.h>
223 #include <linux/string.h>
226 #include <linux/net.h>
228 #include <linux/if_arp.h>
229 #include <linux/netdevice.h>
233 #include <linux/slab.h>
237 #include <asm/uaccess.h>
241 #define CPC_LOCK(card,flags) \
243 spin_lock_irqsave(&card->card_lock, flags); \
246 #define CPC_UNLOCK(card,flags) \
248 spin_unlock_irqrestore(&card->card_lock, flags); \
251 #undef PC300_DEBUG_PCI
252 #undef PC300_DEBUG_INTR
253 #undef PC300_DEBUG_TX
254 #undef PC300_DEBUG_RX
255 #undef PC300_DEBUG_OTHER
276 #define cpc_min(a,b) (((a)<(b))?(a):(b))
279 #define cpc_max(a,b) (((a)>(b))?(a):(b))
283 static void tx_dma_buf_pt_init(
pc300_t *,
int);
284 static void tx_dma_buf_init(
pc300_t *,
int);
285 static void rx_dma_buf_pt_init(
pc300_t *,
int);
286 static void rx_dma_buf_init(
pc300_t *,
int);
287 static void tx_dma_buf_check(
pc300_t *,
int);
288 static void rx_dma_buf_check(
pc300_t *,
int);
290 static int clock_rate_calc(
u32,
u32,
int *);
292 static void plx_init(
pc300_t *);
294 static int cpc_attach(
struct net_device *,
unsigned short,
unsigned short);
297 #ifdef CONFIG_PC300_MLPPP
307 static void tx_dma_buf_pt_init(
pc300_t *
card,
int ch)
316 (ch_factor + ((i + 1) & (N_DMA_TX_BUF - 1))) *
sizeof(
pcsca_bd_t)));
322 static void tx_dma_buf_init(
pc300_t * card,
int ch)
334 tx_dma_buf_pt_init(card, ch);
337 static void rx_dma_buf_pt_init(
pc300_t * card,
int ch)
346 (ch_factor + ((i + 1) & (N_DMA_RX_BUF - 1))) *
sizeof(
pcsca_bd_t)));
352 static void rx_dma_buf_init(
pc300_t * card,
int ch)
364 rx_dma_buf_pt_init(card, ch);
367 static void tx_dma_buf_check(
pc300_t * card,
int ch)
374 printk(
"#CH%d: f_bd = %d(0x%08zx), n_bd = %d(0x%08zx)\n", ch,
379 i != ((next_bd + 1) & (N_DMA_TX_BUF - 1));
380 i = (i + 1) & (N_DMA_TX_BUF - 1),
382 printk(
"\n CH%d TX%d: next=0x%x, ptbuf=0x%x, ST=0x%x, len=%d",
390 #ifdef PC300_DEBUG_OTHER
392 static void tx1_dma_buf_check(
pc300_t * card,
int ch)
401 printk(
"#CH%d: f_bd = %d(0x%08x), n_bd = %d(0x%08x)\n", ch,
404 printk(
"TX_CDA=0x%08x, TX_EDA=0x%08x\n",
409 printk(
"\n CH%d TX%d: next=0x%x, ptbuf=0x%x, ST=0x%x, len=%d",
418 static void rx_dma_buf_check(
pc300_t * card,
int ch)
427 printk(
"#CH%d: f_bd = %d, l_bd = %d\n", ch, first_bd, last_bd);
428 for (i = 0, ptdescr = (card->
hw.
rambase +
430 i < N_DMA_RX_BUF; i++, ptdescr++) {
432 printk (
"\n CH%d RX%d: next=0x%x, ptbuf=0x%x, ST=0x%x, len=%d",
441 static int dma_get_rx_frame_size(
pc300_t * card,
int ch)
451 first_bd = (first_bd + 1) & (N_DMA_RX_BUF - 1);
466 static int dma_buf_write(
pc300_t *card,
int ch,
u8 *ptdata,
int len)
477 for (i = 0; i < nbuf; i++) {
483 &ptdata[len - tosend], nchar);
486 if ((i + 1) == nbuf) {
564 static void tx_dma_stop(
pc300_t * card,
int ch)
567 u8 drr_ena_bit = 1 << (5 + 2 * ch);
568 u8 drr_rst_bit = 1 << (1 + 2 * ch);
575 static void rx_dma_stop(
pc300_t * card,
int ch)
578 u8 drr_ena_bit = 1 << (4 + 2 * ch);
579 u8 drr_rst_bit = 1 << (2 * ch);
586 static void rx_dma_start(
pc300_t * card,
int ch)
611 static void falc_issue_cmd(
pc300_t *card,
int ch,
u8 cmd)
618 printk(
"%s: FALC command locked(cmd=0x%x).\n",
626 static void falc_intr_enable(
pc300_t * card,
int ch)
676 static void falc_open_timeslot(
pc300_t * card,
int ch,
int timeslot)
683 ~(0x80 >> ((timeslot - tshf) & 0x07)));
686 (0x80 >> (timeslot & 0x07)));
689 (0x80 >> (timeslot & 0x07)));
692 static void falc_close_timeslot(
pc300_t * card,
int ch,
int timeslot)
699 (0x80 >> ((timeslot - tshf) & 0x07)));
702 ~(0x80 >> (timeslot & 0x07)));
705 ~(0x80 >> (timeslot & 0x07)));
708 static void falc_close_all_timeslots(
pc300_t * card,
int ch)
730 static void falc_open_all_timeslots(
pc300_t * card,
int ch)
762 static void falc_init_timeslot(
pc300_t * card,
int ch)
770 if (conf->tslot_bitmap & (1 << tslot)) {
772 falc_open_timeslot(card, ch, tslot + 1);
775 falc_close_timeslot(card, ch, tslot + 1);
780 static void falc_enable_comm(
pc300_t * card,
int ch)
786 falc_open_all_timeslots(card, ch);
788 falc_init_timeslot(card, ch);
796 static void falc_disable_comm(
pc300_t * card,
int ch)
802 falc_close_all_timeslots(card, ch);
810 static void falc_init_t1(
pc300_t * card,
int ch)
828 if (conf->phys_settings.clock_type ==
CLOCK_INT) {
843 switch (conf->lcode) {
874 switch (conf->fr_mode) {
976 falc_close_all_timeslots(card, ch);
979 static void falc_init_e1(
pc300_t * card,
int ch)
992 if (conf->phys_settings.clock_type ==
CLOCK_INT) {
1007 switch (conf->lcode) {
1034 switch (conf->fr_mode) {
1156 falc_close_all_timeslots(card, ch);
1159 static void falc_init_hdlc(
pc300_t * card,
int ch)
1182 falc_intr_enable(card, ch);
1185 static void te_config(
pc300_t * card,
int ch)
1192 unsigned long flags;
1195 switch (conf->media) {
1205 if (conf->tslot_bitmap == 0xffffffffUL)
1221 falc_init_t1(card, ch);
1223 falc_init_e1(card, ch);
1225 falc_init_hdlc(card, ch);
1245 static void falc_check_status(
pc300_t * card,
int ch,
unsigned char frs0)
1266 falc_disable_comm(card, ch);
1289 falc_disable_comm(card, ch);
1310 falc_disable_comm(card, ch);
1337 falc_disable_comm(card, ch);
1352 falc_disable_comm(card, ch);
1390 falc_enable_comm(card, ch);
1401 static void falc_update_stats(
pc300_t * card,
int ch)
1453 static void falc_remote_loop(
pc300_t * card,
int ch,
int loop_on)
1468 falc_disable_comm(card, ch);
1498 static void falc_local_loop(
pc300_t * card,
int ch,
int loop_on)
1525 static void falc_payload_loop(
pc300_t * card,
int ch,
int loop_on)
1540 falc_disable_comm(card, ch);
1551 falc_open_all_timeslots(card, ch);
1579 static void turn_off_xlu(
pc300_t * card,
int ch)
1600 static void turn_off_xld(
pc300_t * card,
int ch)
1622 static void falc_generate_loop_up_code(
pc300_t * card,
int ch)
1643 falc_disable_comm(card, ch);
1655 static void falc_generate_loop_down_code(
pc300_t * card,
int ch)
1685 static void falc_pattern_test(
pc300_t * card,
int ch,
unsigned int activate)
1732 static u16 falc_pattern_test_error(
pc300_t * card,
int ch)
1749 if ((skb = dev_alloc_skb(10 + skb_main->
len)) ==
NULL) {
1757 skb_reset_mac_header(skb);
1759 skb->
len = 10 + skb_main->
len;
1761 skb_copy_to_linear_data(skb, dev->
name, 5);
1763 skb->
data[6] = rx_tx;
1767 skb_copy_from_linear_data(skb_main, &skb->
data[10], skb_main->
len);
1772 static void cpc_tx_timeout(
struct net_device *dev)
1778 unsigned long flags;
1781 dev->
stats.tx_errors++;
1782 dev->
stats.tx_aborted_errors++;
1796 netif_wake_queue(dev);
1805 unsigned long flags;
1806 #ifdef PC300_DEBUG_TX
1810 if (!netif_carrier_ok(dev)) {
1813 dev->
stats.tx_errors++;
1814 dev->
stats.tx_carrier_errors++;
1817 printk(
"%s: DCD is OFF. Going administrative down.\n", dev->
name);
1818 dev->
stats.tx_errors++;
1819 dev->
stats.tx_carrier_errors++;
1830 netif_wake_queue(dev);
1835 if (dma_buf_write(card, ch, (
u8 *)skb->
data, skb->
len) != 0) {
1837 netif_stop_queue(dev);
1839 dev->
stats.tx_errors++;
1840 dev->
stats.tx_dropped++;
1843 #ifdef PC300_DEBUG_TX
1845 for (i = 0; i < skb->
len; i++)
1851 cpc_trace(dev, skb,
'T');
1859 netif_stop_queue(dev);
1876 static void cpc_net_rx(
struct net_device *dev)
1882 #ifdef PC300_DEBUG_RX
1889 if ((rxb = dma_get_rx_frame_size(card, ch)) == -1)
1892 if (!netif_carrier_ok(dev)) {
1894 printk(
"%s : DCD is OFF - drop %d rx bytes\n", dev->
name, rxb);
1897 if (rxb > (dev->
mtu + 40)) {
1898 printk(
"%s : MTU exceeded %d\n", dev->
name, rxb);
1901 skb = dev_alloc_skb(rxb);
1910 if (((rxb = dma_buf_read(card, ch, skb)) <= 0) || (skb ==
NULL)) {
1911 #ifdef PC300_DEBUG_RX
1914 if ((skb ==
NULL) && (rxb > 0)) {
1916 dev->
stats.rx_errors++;
1917 dev->
stats.rx_length_errors++;
1924 dev->
stats.rx_errors++;
1925 dev->
stats.rx_fifo_errors++;
1928 dev->
stats.rx_errors++;
1929 dev->
stats.rx_crc_errors++;
1932 dev->
stats.rx_errors++;
1933 dev->
stats.rx_frame_errors++;
1942 dev->
stats.rx_bytes += rxb;
1944 #ifdef PC300_DEBUG_RX
1946 for (i = 0; i < skb->
len; i++)
1951 cpc_trace(dev, skb,
'R');
1953 dev->
stats.rx_packets++;
1954 skb->
protocol = hdlc_type_trans(skb, dev);
1975 dev->
dev->stats.tx_packets++;
1984 #ifdef CONFIG_PC300_MLPPP
1990 netif_wake_queue(dev->
dev);
1991 #ifdef CONFIG_PC300_MLPPP
1996 static void sca_intr(
pc300_t * card)
2002 unsigned char dsr_rx;
2005 for (ch = 0; ch < card->
hw.
nchan; ch++) {
2019 #ifdef PC300_DEBUG_INTR
2020 printk (
"sca_intr: RX intr chan[%d] (st=0x%08lx, dsr=0x%02x)\n",
2021 ch, status, drx_stat);
2025 #ifdef CONFIG_PC300_MLPPP
2029 rx_dma_stop(card, ch);
2032 rx_dma_start(card, ch);
2037 rx_dma_stop(card, ch);
2041 dev->
stats.rx_errors++;
2042 dev->
stats.rx_over_errors++;
2045 rx_dma_start(card, ch);
2058 #ifdef CONFIG_PC300_MLPPP
2078 #ifdef PC300_DEBUG_INTR
2079 printk(
"%s: RX intr chan[%d] (st=0x%08lx, dsr=0x%02x, dsr2=0x%02x)\n",
2080 dev->
name, ch, status, drx_stat, dsr_rx);
2093 #ifdef PC300_DEBUG_INTR
2094 printk (
"sca_intr: TX intr chan[%d] (st=0x%08lx, dsr=0x%02x)\n",
2095 ch, status, dtx_stat);
2108 dev->
stats.tx_errors++;
2109 dev->
stats.tx_fifo_errors++;
2114 if (dtx_stat & DSR_BOF) {
2118 if (dtx_stat & DSR_EOM) {
2137 #ifdef PC300_DEBUG_INTR
2138 printk(
"sca_intr: MSCI intr chan[%d] (st=0x%08lx, st1=0x%02x)\n",
2143 printk (
"%s: DCD is OFF. Going administrative down.\n",
2145 #ifdef CONFIG_PC300_MLPPP
2155 printk (
"%s: DCD is ON. Going administrative up.\n",
2157 #ifdef CONFIG_PC300_MLPPP
2168 if (++intr_count == 10)
2174 static void falc_t1_loop_detection(
pc300_t *card,
int ch,
u8 frs1)
2185 falc_remote_loop(card, ch, 0);
2188 if ((frs1 & FRS1_LLBAD) &&
2192 falc_remote_loop(card, ch, 1);
2199 static void falc_e1_loop_detection(
pc300_t *card,
int ch,
u8 rsp)
2210 falc_remote_loop(card, ch, 0);
2217 falc_remote_loop(card, ch, 1);
2224 static void falc_t1_intr(
pc300_t * card,
int ch)
2256 falc_update_stats(card, ch);
2257 falc_check_status(card, ch,
2264 falc_t1_loop_detection(card, ch,
2271 static void falc_e1_intr(
pc300_t * card,
int ch)
2276 u8 isr1, isr2, isr3, gis,
rsp;
2282 if (gis & GIS_ISR0) {
2285 if (gis & GIS_ISR1) {
2291 (FRS0_LOS | FRS0_AIS | FRS0_LFA)) {
2306 falc_e1_loop_detection(card, ch, rsp);
2309 if (gis & GIS_ISR2) {
2325 if (gis & GIS_ISR3) {
2327 if (isr3 & FISR3_SEC) {
2329 falc_update_stats(card, ch);
2330 falc_check_status(card, ch,
2333 if (isr3 & FISR3_ES) {
2340 static void falc_intr(
pc300_t * card)
2344 for (ch = 0; ch < card->
hw.
nchan; ch++) {
2349 falc_t1_intr(card, ch);
2351 falc_e1_intr(card, ch);
2359 volatile u8 plx_status;
2362 #ifdef PC300_DEBUG_INTR
2363 printk(
"cpc_intr: spurious intr %d\n", irq);
2369 #ifdef PC300_DEBUG_INTR
2370 printk(
"cpc_intr: spurious intr2 %d\n", irq);
2396 static void cpc_sca_status(
pc300_t * card,
int ch)
2400 unsigned long flags;
2402 tx_dma_buf_check(card, ch);
2403 rx_dma_buf_check(card, ch);
2405 printk (
"ILAR=0x%02x, WCRL=0x%02x, PCR=0x%02x, BTCR=0x%02x, BOLR=0x%02x\n",
2408 printk(
"TX_CDA=0x%08x, TX_EDA=0x%08x\n",
2411 printk(
"RX_CDA=0x%08x, RX_EDA=0x%08x, BFL=0x%04x\n",
2415 printk(
"DMER=0x%02x, DSR_TX=0x%02x, DSR_RX=0x%02x\n",
2418 printk(
"DMR_TX=0x%02x, DMR_RX=0x%02x, DIR_TX=0x%02x, DIR_RX=0x%02x\n",
2422 printk(
"DCR_TX=0x%02x, DCR_RX=0x%02x, FCT_TX=0x%02x, FCT_RX=0x%02x\n",
2426 printk(
"MD0=0x%02x, MD1=0x%02x, MD2=0x%02x, MD3=0x%02x, IDL=0x%02x\n",
2432 printk(
"CMD=0x%02x, SA0=0x%02x, SA1=0x%02x, TFN=0x%02x, CTL=0x%02x\n",
2438 printk(
"ST0=0x%02x, ST1=0x%02x, ST2=0x%02x, ST3=0x%02x, ST4=0x%02x\n",
2444 printk (
"CST0=0x%02x, CST1=0x%02x, CST2=0x%02x, CST3=0x%02x, FST=0x%02x\n",
2450 printk(
"TRC0=0x%02x, TRC1=0x%02x, RRC=0x%02x, TBN=0x%02x, RBN=0x%02x\n",
2456 printk(
"TFS=0x%02x, TNR0=0x%02x, TNR1=0x%02x, RNR=0x%02x\n",
2461 printk(
"TCR=0x%02x, RCR=0x%02x, TNR1=0x%02x, RNR=0x%02x\n",
2466 printk(
"TXS=0x%02x, RXS=0x%02x, EXS=0x%02x, TMCT=0x%02x, TMCR=0x%02x\n",
2472 printk(
"IE0=0x%02x, IE1=0x%02x, IE2=0x%02x, IE4=0x%02x, FIE=0x%02x\n",
2488 static void cpc_falc_status(
pc300_t * card,
int ch)
2492 unsigned long flags;
2495 printk(
"CH%d: %s %s %d channels\n",
2496 ch, (pfalc->
sync ?
"SYNC" :
""), (pfalc->
active ?
"ACTIVE" :
""),
2499 printk(
" pden=%d, los=%d, losr=%d, lfa=%d, farec=%d\n",
2501 printk(
" lmfa=%d, ais=%d, sec=%d, es=%d, rai=%d\n",
2503 printk(
" bec=%d, fec=%d, cvc=%d, cec=%d, ebc=%d\n",
2507 printk(
" STATUS: %s %s %s %s %s %s\n",
2511 (pfalc->
loss_fa ?
"LFA" :
""),
2512 (pfalc->
loss_mfa ?
"LMF" :
""), (pfalc->
prbs ?
"PRB" :
""));
2516 static int cpc_change_mtu(
struct net_device *dev,
int new_mtu)
2524 static int cpc_ioctl(
struct net_device *dev,
struct ifreq *ifr,
int cmd)
2532 void __user *
arg = ifr->ifr_data;
2533 struct if_settings *settings = &ifr->ifr_settings;
2541 #ifdef CONFIG_PC300_MLPPP
2565 #ifdef CONFIG_PC300_MLPPP
2588 cpc_sca_status(card, ch);
2591 cpc_falc_status(card, ch);
2609 sizeof(dev->
stats));
2665 switch (pc300loop.loop_type) {
2667 falc_local_loop(card, ch, pc300loop.loop_on);
2671 falc_remote_loop(card, ch, pc300loop.loop_on);
2675 falc_payload_loop(card, ch, pc300loop.loop_on);
2679 if (pc300loop.loop_on) {
2680 falc_generate_loop_up_code (card, ch);
2682 turn_off_xlu(card, ch);
2687 if (pc300loop.loop_on) {
2688 falc_generate_loop_down_code (card, ch);
2690 turn_off_xld(card, ch);
2716 if (pc300patrntst.patrntst_on == 2) {
2718 falc_pattern_test(card, ch, 1);
2720 pc300patrntst.num_errors =
2721 falc_pattern_test_error(card, ch);
2726 falc_pattern_test(card, ch, pc300patrntst.patrntst_on);
2732 switch (ifr->ifr_settings.type) {
2736 ifr->ifr_settings.type = conf->
media;
2737 if (ifr->ifr_settings.size < size) {
2739 ifr->ifr_settings.size =
size;
2760 if (ifr->ifr_settings.size != size) {
2765 settings->ifs_ifsu.sync, size)) {
2774 conf->
media = ifr->ifr_settings.type;
2789 if (ifr->ifr_settings.size != te_size) {
2794 settings->ifs_ifsu.te1, size)) {
2803 conf->
media = ifr->ifr_settings.type;
2825 for (br = 0, br_pwr = 1; br <= 9; br++, br_pwr <<= 1) {
2826 if ((tc = clock / br_pwr / rate) <= 0xff) {
2833 error = ((rate - (clock / br_pwr /
rate)) /
rate) * 1000;
2835 if (error < -10 || error > 10)
2920 te_config(card, ch);
2931 tmc = clock_rate_calc(clkrate, card->
hw.
clock, &br);
3015 rx_dma_buf_init(card, ch);
3021 rx_dma_start(card, ch);
3048 tx_dma_buf_init(card, ch);
3058 static int cpc_attach(
struct net_device *dev,
unsigned short encoding,
3059 unsigned short parity)
3119 rx_dma_stop(card, ch);
3120 tx_dma_stop(card, ch);
3145 #ifdef PC300_DEBUG_OTHER
3146 printk(
"pc300: cpc_open");
3155 result = cpc_opench(d);
3159 netif_start_queue(dev);
3172 unsigned long flags;
3174 #ifdef PC300_DEBUG_OTHER
3175 printk(
"pc300: cpc_close");
3178 netif_stop_queue(dev);
3186 #ifdef CONFIG_PC300_MLPPP
3204 for (i = 0; i < card->
hw.
ramsize; i++) {
3205 data = (
u8)(i & 0xff);
3214 static void plx_init(
pc300_t * card)
3234 static void show_version(
void)
3236 char *rcsvers, *rcsdate, *
tmp;
3238 rcsvers =
strchr(rcsid,
' ');
3240 tmp =
strchr(rcsvers,
' ');
3242 rcsdate =
strchr(tmp,
' ');
3246 pr_info(
"Cyclades-PC300 driver %s %s\n", rcsvers, rcsdate);
3251 .ndo_stop = cpc_close,
3252 .ndo_tx_timeout = cpc_tx_timeout,
3253 .ndo_set_mac_address =
NULL,
3254 .ndo_change_mtu = cpc_change_mtu,
3255 .ndo_do_ioctl = cpc_ioctl,
3259 static void cpc_init_card(
pc300_t * card)
3261 int i, devcount = 0;
3262 static int board_nbr = 1;
3269 #ifdef USE_PCI_CLOCK
3316 for (i = 0; i < card->
hw.
nchan; i++) {
3363 hdlc = dev_to_hdlc(dev);
3364 hdlc->
xmit = cpc_queue_xmit;
3365 hdlc->
attach = cpc_attach;
3396 printk (
" #%d, %dKB of RAM at 0x%08x, IRQ%d, channel %d.\n",
3401 printk (
"Dev%d on card(0x%08x): unable to allocate i/f name.\n",
3415 int err, eeprom_outdated = 0;
3424 printk(
"PC300 found at RAM 0x%016llx, "
3425 "but could not allocate card structure.\n",
3428 goto err_disable_dev;
3447 switch (device_id) {
3461 #ifdef PC300_DEBUG_PCI
3462 printk(
"cpc (bus=0x0%x,pci_id=0x%x,", pdev->
bus->number, pdev->
devfn);
3464 printk(
"cpc:found ramaddr=0x%08lx plxaddr=0x%08lx "
3465 "ctladdr=0x%08lx falcaddr=0x%08lx\n",
3474 printk(
"WARNING: couldn't allocate I/O region for PC300 board "
3481 eeprom_outdated = 1;
3488 printk(
"PC300 found at RAM 0x%08x, "
3489 "but could not allocate PLX mem region.\n",
3491 goto err_release_io;
3495 printk(
"PC300 found at RAM 0x%08x, "
3496 "but could not allocate RAM mem region.\n",
3498 goto err_release_plx;
3501 "SCA-II Registers")) {
3502 printk(
"PC300 found at RAM 0x%08x, "
3503 "but could not allocate SCA mem region.\n",
3505 goto err_release_ram;
3511 switch (device_id) {
3528 #ifdef PC300_DEBUG_PCI
3529 printk(
"cpc: relocate ramaddr=0x%08lx plxaddr=0x%08lx "
3530 "ctladdr=0x%08lx falcaddr=0x%08lx\n",
3536 pci_set_drvdata(pdev, card);
3539 switch (device_id) {
3578 printk (
"PC300 found at RAM 0x%08x, but could not allocate IRQ%d.\n",
3583 cpc_init_card(card);
3585 if (eeprom_outdated)
3586 printk(
"WARNING: PC300 with outdated EEPROM.\n");
3612 pc300_t *card = pci_get_drvdata(pdev);
3621 for (i = 0; i < card->
hw.
nchan; i++) {
3635 for (i = 0; i < card->
hw.
nchan; i++)
3647 .id_table = cpc_pci_dev_id,
3648 .probe = cpc_init_one,
3652 static int __init cpc_init(
void)
3655 return pci_register_driver(&cpc_driver);
3658 static void __exit cpc_cleanup_module(
void)