History log of /netbsd/sys/dev/i2o/iop.c (Results 1 – 25 of 92)
Revision Date Author Comments
# beecddb6 07-Aug-2021 thorpej <thorpej@NetBSD.org>

Merge thorpej-cfargs2.


# 3bee0c11 24-Apr-2021 thorpej <thorpej@NetBSD.org>

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass a

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).

show more ...


# 70747dc1 10-Nov-2019 chs <chs@NetBSD.org>

in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.


# a8a5c538 03-Sep-2018 riastradh <riastradh@NetBSD.org>

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a n

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)

show more ...


# 1d42e734 28-Oct-2017 riastradh <riastradh@NetBSD.org>

Kill some more extern struct cfdriver declarations.

Down with externs in .c!


# 57d2ecf1 16-Aug-2015 msaitoh <msaitoh@NetBSD.org>

Fix a buffer pointer check in iop_msg_unmap(). The number of im_xfer
is IOP_MAX_MSG_XFERS and it's three. iop_systab_set() makes three ximit
buffers. In this case, iop_msg_unmap() overrruns by "if((+

Fix a buffer pointer check in iop_msg_unmap(). The number of im_xfer
is IOP_MAX_MSG_XFERS and it's three. iop_systab_set() makes three ximit
buffers. In this case, iop_msg_unmap() overrruns by "if((++ix)->ix_size == 0)".
Check overrun first.

This change fixes a bug that iop(4) panics while attaching iopsp(4).

show more ...


# 1a918832 25-Jul-2014 dholland <dholland@NetBSD.org>

Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.


# 76258fa0 16-Mar-2014 dholland <dholland@NetBSD.org>

Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found

Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.

show more ...


# 83aa8923 17-Oct-2013 christos <christos@NetBSD.org>

remove unused variables and __USE a debugging variable


# 5eb37420 14-Sep-2013 joerg <joerg@NetBSD.org>

#if 0 iop_status, but keep it for documentation purposes.


# 5f819ca3 27-Oct-2012 chs <chs@NetBSD.org>

split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.


# 8184d5dc 13-Nov-2010 uebayasi <uebayasi@NetBSD.org>

Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.


# 8f7318d7 21-Feb-2010 bouyer <bouyer@NetBSD.org>

Fix confusion about PRE/POST in previous; and another place that has the
same issue. Also add a BUS_DMASYNC_POSTWRITE to the POLL operation.
Problem pointed out by tsutsui@.
Still not perfect (a BUS_

Fix confusion about PRE/POST in previous; and another place that has the
same issue. Also add a BUS_DMASYNC_POSTWRITE to the POLL operation.
Problem pointed out by tsutsui@.
Still not perfect (a BUS_DMASYNC_PREREAD would be needed after the
testing the condition in the POLL() macro), but closer.

show more ...


# 80f97b6e 21-Feb-2010 bouyer <bouyer@NetBSD.org>

Fix bus_dmamap_sync(): it should be a BUS_DMASYNC_POSTWRITE after
writing to DMA memory.
Found by code inspection.


# bf551971 19-Feb-2010 asau <asau@NetBSD.org>

Don't mix BUS_DMASYNC_PREREAD and BUS_DMASYNC_POSTWRITE.
Suggested by <bouyer>, fixes PR kern/42662


# 40cf6f36 21-Oct-2009 rmind <rmind@NetBSD.org>

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pm

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.

show more ...


# 529e91fc 12-May-2009 cegger <cegger@NetBSD.org>

struct device * -> device_t, no functional changes intended.


# f60765db 14-Sep-2008 mhitch <mhitch@NetBSD.org>

Use the physical address from the bus_dmamap_load() map, not the one from
the bus_dmamem_alloc(). Fixes iop(4) on alpha, and possibly sparc64 as
described in the thread
http://mail-index.netbsd.org/

Use the physical address from the bus_dmamap_load() map, not the one from
the bus_dmamem_alloc(). Fixes iop(4) on alpha, and possibly sparc64 as
described in the thread
http://mail-index.netbsd.org/port-sparc64/2008/06/04/msg000413.html.

show more ...


# 0de5da96 08-Sep-2008 gmcgarry <gmcgarry@NetBSD.org>

Replace most gcc-specific __attribute__ uses with BSD-style sys/cdef.h
preprocessor macros.


# 1f459d82 08-Jun-2008 tsutsui <tsutsui@NetBSD.org>

Replace device_lookup() with device_lookup_private() on getting softc
for future device_t/softc spilt.


# 536e41c5 08-Jun-2008 ad <ad@NetBSD.org>

Fix up bus_dmamap_sync calls.


# e071d39c 05-May-2008 ad <ad@NetBSD.org>

- Convert hashinit() to use kmem_alloc(). The hash tables can be large
and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memo

- Convert hashinit() to use kmem_alloc(). The hash tables can be large
and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.

show more ...


# ce099b40 28-Apr-2008 martin <martin@NetBSD.org>

Remove clause 3 and 4 from TNF licenses


# 0e50a946 06-Apr-2008 cegger <cegger@NetBSD.org>

use aprint_*_dev and device_xname


# 598ab03a 05-Dec-2007 ad <ad@NetBSD.org>

Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.


1234