History log of /freebsd-11-stable/sys/dev/exca/exca.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 331722 29-Mar-2018 eadler

Revert r330897:

This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)


# 330897 14-Mar-2018 eadler

Partial merge of the SPDX changes

These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from: pfg


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 298433 21-Apr-2016 pfg

sys: use our roundup2/rounddown2() macros when param.h is available.

rounddown2 tends to produce longer lines than the original code
and when the code has a high indentation level it was not really
advantageous to do the replacement.

This tries to strike a balance between readability using the macros
and flexibility of having the expressions, so not everything is
converted.


# 189579 09-Mar-2009 imp

__LP64__ is what's defined, not _LP64_, according to the manual (and
also experience).


# 188220 06-Feb-2009 imp

fix spelling error

Submitted by: trasz


# 188190 05-Feb-2009 imp

Don't check for mapping above 4GB on 32-bit platforms.


# 188167 05-Feb-2009 imp

Add some additional debugging for the memory code.


# 186796 05-Jan-2009 imp

First cut at fixing memory mapping botch. Nobody must use the ray(4)
driver since it couldn't have worked with NEWCARD w/o these fixes.
This should allow selecting 16-bit memory width as well (which was
what was broken).


# 167832 23-Mar-2007 jhb

- Fix exca_(io|mem)_map() to return proper errno values.
- Change exca_activate_resource() to call BUS_ACTIVATE_RESOURCE() before
calling exca_(io|mem)_map() since the latter use rman_get_bus(tag|handle)
and the recent changes to nexus(4) mean that you need to activate a
resource before reading the bus tag and handle. This was true before,
but now the nexus(4) drivers on x86 and ia64 are more forceful about it.

Reviewed by: imp


# 166942 24-Feb-2007 imp

exca->pccarddev should always be non-null now. Only call it when the
device is actually attached.


# 166742 15-Feb-2007 imp

It turns out that it is easier to not NULL out pccard and cardbus
device pointers. They don't change as the children device drivers
come and go. Rather, check to see if the device is attached where we
would have checked ! NULL. This solves many asymmetries in the code
that likely could lead to crashes when loading/unloading cbb without
one or more of the expected children's driver not present.


# 162591 23-Sep-2006 imp

Cleanup sloppy ifdef.


# 156503 09-Mar-2006 imp

Don't dereference an uninitialized pointer.


# 151458 18-Oct-2005 imp

Set the name of the chipset found


# 151410 17-Oct-2005 imp

Minor commentary correction


# 151309 14-Oct-2005 imp

MFP4: Minor tweaks.


# 150460 22-Sep-2005 imp

'PC Card' instead of other variants


# 140022 10-Jan-2005 imp

Properly calculate the offset in mapping the memory of pccards. This
allows my 3com cards to work again. It appears that this code was
once there, but I removed it when I added the alignment issues.

MFC After: 5 days
PR: 70639 (and likely others)


# 139749 05-Jan-2005 imp

Start each of the license/copyright comments with /*-, minor shuffle of lines


# 133793 15-Aug-2004 imp

Didn't intend to commit debugging code enabled


# 133782 15-Aug-2004 imp

Other part of the cbb isa/pci split. This likely is causing problems
wrt cbb module.


# 120872 07-Oct-2003 imp

Card type stuff was backwards, so assume io for the moment. mem needs
a lot of help and with luck bms will help me fix that.


# 120421 24-Sep-2003 imp

CARDMEM is the offset of the address ON THE CARD (eg which page).
Instead, use EXCA_MEMREG_WIN_SHIFT which is the amount we shift the
bus address by to write into upper memory (eg above 24MB). Use the
latter in this case.


# 119551 29-Aug-2003 imp

When we went to the set_flags interface for the memory resource, we
switched from PCCARD_MEM_FOO to PCCARD_A_MEM_FOO, yet we didn't change
exca in all the right places. Do so now. Also use PCCARD_WIDTH_AUTO
rather than the magic cookie 0.


# 119520 28-Aug-2003 imp

A number of minor fixes to the mapping of memory. This should help
reading the CIS on some cards. However, not all just yet. This makes
at least some of the xircom cards that weren't working to work. It
doesn't make my home and away card work, however.

o Don't get the card offset wrong. This is the biggest hassle for
reading the CIS. The old code was just so wrong I can't believe that
it worked at all.
o Don't set the bit that allows/forces 16-bit memory access to the
memory. It is hard coded with 0x80.
o Don't need to slow down memory access with wait-states. OLDCARD didn't
need them and it doesn't hurt anything.
o remove bogus grousying in comment.


# 119511 27-Aug-2003 imp

Fix location of $FreeBSD$ from last commit.


# 119418 24-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


# 115988 07-Jun-2003 imp

MFP4:
Merge some common code from cbb into exca.


# 115461 31-May-2003 phk

Don't use return(foo(...)); in function returning void.

Found by: FlexeLint


# 110841 14-Feb-2003 imp

Massive overhaul of exca to help with the isa efforts:
o chip_name arrays ifdef'd out.
o use the OLDCARD-like get/put functions so we can support differnt types
of mappings.
o Write the beggings of is this a valid exca device and introduce more
chipset support.

# this is partially a wip, but also needed because some other cahnges I've
# made require some of these changes.


# 104601 07-Oct-2002 imp

Update comments to remind me about power bugs in oldcard.


# 100703 26-Jul-2002 imp

MFp4:
o Protect .h against multiple includes.
o eliminate the pointers to the read/write routines. The
bus_space_read routines can cope since we have the offset
field.
o Print a warning if the requested map address is > 16M and
your chipset doesn't support the extended ExCA registers.


# 97708 01-Jun-2002 alfred

Fix a couple of places where preprocessor concatination was misused and
something wound up grafted to a comma.


# 97613 30-May-2002 takawata

Make oldcard and newcard kernel module work.


# 90187 04-Feb-2002 imp

Default debugging to OFF now.


# 89948 29-Jan-2002 imp

First draft of common code between pccbb and pcic drivers for talking
to ExCA register sets. These registers exist in both ISA and PCI
devices in a couple different ways, and this will provide a common
base for future building. This code is a rehash of the pccbb 16-bit
code, which was a rehash of the pcic code, which was a rehash of the
netbsd i82365 code. More hashing to come.