FreeBSD Bugzilla – Attachment 9296 Details for
Bug 19089
Patch: Add if_ed support to FreeBSD/Alpha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 5.28 KB, created by
alex
on 2000-06-07 14:30:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
alex
Created:
2000-06-07 14:30:02 UTC
Size:
5.28 KB
patch
obsolete
>Index: alpha/alpha/vm_machdep.c >=================================================================== >RCS file: /usr/home/ncvs/src/sys/alpha/alpha/vm_machdep.c,v >retrieving revision 1.30 >diff -u -r1.30 vm_machdep.c >--- alpha/alpha/vm_machdep.c 2000/05/05 09:54:57 1.30 >+++ alpha/alpha/vm_machdep.c 2000/06/07 09:30:45 >@@ -296,6 +296,20 @@ > #endif > > /* >+ * Convert kernel VA to physical address >+ */ >+u_long >+kvtop(void *addr) >+{ >+ vm_offset_t va; >+ >+ va = pmap_kextract((vm_offset_t)addr); >+ if (va == 0) >+ panic("kvtop: zero page frame"); >+ return((int)va); >+} >+ >+/* > * Map an IO request into kernel virtual address space. > * > * All requests are (re)mapped into kernel VA space. >Index: conf/files >=================================================================== >RCS file: /usr/home/ncvs/src/sys/conf/files,v >retrieving revision 1.372 >diff -u -r1.372 files >--- conf/files 2000/06/07 04:53:48 1.372 >+++ conf/files 2000/06/07 13:12:18 >@@ -123,6 +123,9 @@ > dev/dpt/dpt_pci.c optional dpt pci > dev/dpt/dpt_scsi.c optional dpt > dev/ed/if_ed_pci.c optional ed pci >+dev/ed/if_ed.c optional ed >+dev/ed/if_ed_isa.c optional ed isa >+dev/ed/if_ed_pccard.c optional ed card > dev/en/midway.c optional en > dev/ep/if_ep.c optional ep > dev/ep/if_ep_eisa.c optional ep eisa >Index: conf/files.i386 >=================================================================== >RCS file: /usr/home/ncvs/src/sys/conf/files.i386,v >retrieving revision 1.319 >diff -u -r1.319 files.i386 >--- conf/files.i386 2000/06/02 09:27:47 1.319 >+++ conf/files.i386 2000/06/07 13:12:24 >@@ -71,9 +71,6 @@ > dev/ata/atapi-cd.c optional atapicd > dev/ata/atapi-fd.c optional atapifd > dev/ata/atapi-tape.c optional atapist >-dev/ed/if_ed.c optional ed >-dev/ed/if_ed_isa.c optional ed isa >-dev/ed/if_ed_pccard.c optional ed card > dev/eisa/eisaconf.c optional eisa > dev/fb/fb.c optional fb > dev/fb/fb.c optional vga >Index: dev/ed/if_ed.c >=================================================================== >RCS file: /usr/home/ncvs/src/sys/dev/ed/if_ed.c,v >retrieving revision 1.180 >diff -u -r1.180 if_ed.c >--- dev/ed/if_ed.c 2000/06/01 21:55:49 1.180 >+++ dev/ed/if_ed.c 2000/06/07 13:11:29 >@@ -75,7 +75,7 @@ > static void ed_reset __P((struct ifnet *)); > static void ed_watchdog __P((struct ifnet *)); > >-static void ds_getmcaf __P((struct ed_softc *, u_long *)); >+static void ds_getmcaf __P((struct ed_softc *, u_int32_t *)); > > static void ed_get_packet __P((struct ed_softc *, char *, /* u_short */ int)); > >@@ -98,7 +98,7 @@ > > static void ed_setrcr __P((struct ed_softc *)); > >-static u_long ds_crc __P((u_char *ep)); >+static u_int32_t ds_crc __P((u_char *ep)); > > static u_short ed_get_Linksys __P((struct ed_softc *)); > >@@ -3211,13 +3214,13 @@ > } else { > /* set up multicast addresses and filter modes */ > if (ifp->if_flags & IFF_MULTICAST) { >- u_long mcaf[2]; >+ u_int32_t mcaf[2]; > > if (ifp->if_flags & IFF_ALLMULTI) { > mcaf[0] = 0xffffffff; > mcaf[1] = 0xffffffff; > } else > ds_getmcaf(sc, mcaf); > > /* > * Set multicast filter on chip. >@@ -3254,12 +3258,12 @@ > /* > * Compute crc for ethernet address > */ >-static u_long >+static u_int32_t > ds_crc(ep) > u_char *ep; > { > #define POLYNOMIAL 0x04c11db6 >- register u_long crc = 0xffffffffL; >+ register u_int32_t crc = 0xffffffffL; > register int carry, i, j; > register u_char b; > >@@ -3284,9 +3288,9 @@ > static void > ds_getmcaf(sc, mcaf) > struct ed_softc *sc; >- u_long *mcaf; >+ u_int32_t *mcaf; > { >- register u_int index; >+ register u_int32_t index; > register u_char *af = (u_char *) mcaf; > struct ifmultiaddr *ifma; > >Index: dev/ed/if_edreg.h >=================================================================== >RCS file: /usr/home/ncvs/src/sys/dev/ed/if_edreg.h,v >retrieving revision 1.27 >diff -u -r1.27 if_edreg.h >--- dev/ed/if_edreg.h 1999/09/02 15:06:23 1.27 >+++ dev/ed/if_edreg.h 2000/06/07 13:14:53 >@@ -788,8 +788,13 @@ > #define ED_WD_ROM_CHECKSUM_TOTAL 0xFF > #endif > >+#ifdef __alpha__ >+#define ED_WD_NIC_OFFSET 0x00 /* I/O base offset to NIC */ >+#define ED_WD_ASIC_OFFSET 0x10 /* I/O base offset to ASIC */ >+#else > #define ED_WD_NIC_OFFSET 0x10 /* I/O base offset to NIC */ > #define ED_WD_ASIC_OFFSET 0 /* I/O base offset to ASIC */ >+#endif > #define ED_WD_IO_PORTS 32 /* # of i/o addresses used */ > > #define ED_WD_PAGE_OFFSET 0 /* page offset for NIC access to mem */ >Index: dev/ed/if_edvar.h >=================================================================== >RCS file: /usr/home/ncvs/src/sys/dev/ed/if_edvar.h,v >retrieving revision 1.4 >diff -u -r1.4 if_edvar.h >--- dev/ed/if_edvar.h 1999/12/10 07:22:53 1.4 >+++ dev/ed/if_edvar.h 2000/06/07 13:15:24 >@@ -48,8 +48,13 @@ > struct resource* irq_res; /* resource for irq */ > void* irq_handle; /* handle for irq handler */ > >+#ifdef __alpha__ >+ u_int asic_addr; /* ASIC I/O bus address */ >+ u_int nic_addr; /* NIC (DS8390) I/O bus address */ >+#else > u_short asic_addr; /* ASIC I/O bus address */ > u_short nic_addr; /* NIC (DS8390) I/O bus address */ >+#endif > > /* > * The following 'proto' variable is part of a work-around for 8013EBT asics >@@ -71,7 +76,7 @@ > > caddr_t mem_start; /* NIC memory start address */ > caddr_t mem_end; /* NIC memory end address */ >- u_long mem_size; /* total NIC memory size */ >+ u_int32_t mem_size; /* total NIC memory size */ > caddr_t mem_ring; /* start of RX ring-buffer (in NIC mem) */ > > u_char mem_shared; /* NIC memory is shared with host */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19089
: 9296