Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Apr 2005 18:26:08 +0900
From:      Pyun YongHyeon <yongari@rndsoft.co.kr>
To:        freebsd-sparc64@freebsd.org
Subject:   em(4) patch
Message-ID:  <20050414092608.GB2855@michelle.rndsoft.co.kr>

next in thread | raw e-mail | index | archive | help

I have a initial patch that make em(4) work on sparc64.
The patch seems to work but it may have uncovered bugs in it.
The chagnges are
. outl/inl -> bus_space_read/bus_space_write
. 64bit IO BAR check(Obtained from OpenBSD)
. add suspend/resume code(not tested)
. printf -> device_printf
. fix memory/resource leakages
. always honor IFF_OACTIVE flag
. don't blidnly call RX/TX handlers
. remove EM_MAX_INTR loops
. create TX dmamap at device initialization
. enable PCI memory write and invalidate
. EM_MMBA -> PCIR_BAR(0)
. TX/RX descriptor alignment is 16 not PAGE_SIZE
. TX/RX descriptor length should be multiple of 128 not 4096.
. don't create MCLBYTES*8 size TX buffers if we are not use JUMBO frame
. use bus_dmamap_load_mbuf_sg() for loading RX buffers.
. always print watchdog timeout message(Obtained from OpenBSD)
. don't count twice in some statistics(Obtained from OpenBSD)

I have tested 82545GM chipset based card on Ultra60(SMP). VLAN and
POLLING were not tested at all so it may have bugs. JUMBO frame support
needs more coding and cleanups since sparc64 does not allow non-aligned
memory access. So don't try to use JUMBO frame at this time.
If you want to test em(4) on SMP with ofw_console you need additional
patch. Alternatively you can use sc(4) or serial console.
I'd like to hear success/failure.

em patch:
http://www.kr.freebsd.org/~yongari/em.patch.0414
ofw_console patch:
http://www.kr.freebsd.org/~yongari/ofw_console.patch.0414

Thanks.
-- 
Regards,
Pyun YongHyeon
http://www.kr.freebsd.org/~yongari	|	yongari@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050414092608.GB2855>