1/*- 2 * ---------------------------------------------------------------------------- 3 * "THE BEER-WARE LICENSE" (Revision 42): 4 * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you 5 * can do whatever you want with this stuff. If we meet some day, and you think 6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7 * ---------------------------------------------------------------------------- 8 */ --- 9 unchanged lines hidden (view full) --- 18 * 19 * The FALC54 and MUNICH32X have far too many registers and weird modes for 20 * comfort, so I have not bothered typing it all into a "fooreg.h" file, 21 * you will (badly!) need the documentation anyway if you want to mess with 22 * this gadget. 23 */ 24 25#include <sys/cdefs.h> |
26__FBSDID("$FreeBSD: head/sys/pci/if_mn.c 177599 2008-03-25 09:39:02Z ru $"); |
27 28/* 29 * Stuff to describe the MUNIC32X and FALC54 chips. 30 */ 31 32#define M32_CHAN 32 /* We have 32 channels */ 33#define M32_TS 32 /* We have 32 timeslots */ 34 --- 653 unchanged lines hidden (view full) --- 688 if (nts == 32) 689 sc->m32_mem.cs[chan].itbs = 63; 690 else 691 sc->m32_mem.cs[chan].itbs = nts * 2; 692 693 /* Setup a transmit chain with one descriptor */ 694 /* XXX: we actually send a 1 byte packet */ 695 dp = mn_alloc_desc(); |
696 MGETHDR(m, M_WAIT, MT_DATA); |
697 m->m_pkthdr.len = 0; 698 dp->m = m; 699 dp->flags = 0xc0000000 + (1 << 16); 700 dp->next = vtophys(dp); 701 dp->vnext = 0; 702 dp->data = vtophys(sc->name); 703 sc->m32_mem.cs[chan].tdesc = vtophys(dp); 704 sc->ch[chan]->x1 = dp; 705 sc->ch[chan]->xl = dp; 706 707 /* Setup a receive chain with 5 + NTS descriptors */ 708 709 dp = mn_alloc_desc(); 710 m = NULL; |
711 MGETHDR(m, M_WAIT, MT_DATA); 712 MCLGET(m, M_WAIT); |
713 dp->m = m; 714 dp->data = vtophys(m->m_data); 715 dp->flags = 0x40000000; 716 dp->flags += 1600 << 16; 717 dp->next = vtophys(dp); 718 dp->vnext = 0; 719 sc->ch[chan]->rl = dp; 720 721 for (i = 0; i < (nts + 10); i++) { 722 dp2 = dp; 723 dp = mn_alloc_desc(); 724 m = NULL; |
725 MGETHDR(m, M_WAIT, MT_DATA); 726 MCLGET(m, M_WAIT); |
727 dp->m = m; 728 dp->data = vtophys(m->m_data); 729 dp->flags = 0x00000000; 730 dp->flags += 1600 << 16; 731 dp->next = vtophys(dp2); 732 dp->vnext = dp2; 733 } 734 sc->m32_mem.cs[chan].rdesc = vtophys(dp); --- 716 unchanged lines hidden --- |