History log of /netbsd/sys/dev/pci/twa.c (Results 1 – 25 of 61)
Revision Date Author Comments
# ec0fc95d 10-Dec-2021 andvar <andvar@NetBSD.org>

s/occured/occurred/ in comments, log messages and man pages.


# 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.


# 79fb1406 09-Dec-2018 jdolecek <jdolecek@NetBSD.org>

use pci_intr_establish_xname() everywhere


# 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 ...


# dc522034 27-Sep-2016 pgoyette <pgoyette@NetBSD.org>

Add a missing ')' in the call to bswap64().

Should fix compile error of twa module for sparc and sparc64


# 24c93e40 27-Sep-2016 pgoyette <pgoyette@NetBSD.org>

Modularize the ld driver and all of its attachments. Ensure that all
parents are capable of rescan (or otherwise provide a means of attaching
children post-initialization).


# 575a7585 07-Jul-2016 msaitoh <msaitoh@NetBSD.org>

KNF. Remove extra spaces. No functional change.


# fb9cd6cc 27-Sep-2014 christos <christos@NetBSD.org>

fix size in memset() parameter. Thanks max.


# 5784fce3 21-Sep-2014 christos <christos@NetBSD.org>

fix memset size inconsistency


# 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.


# b8930f84 29-Mar-2014 christos <christos@NetBSD.org>

make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.


# 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 ...


# 8fd05a06 13-Mar-2014 hannken <hannken@NetBSD.org>

Add __diagused.


# 05fd0bf3 25-Feb-2014 pooka <pooka@NetBSD.org>

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicat

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

show more ...


# 069e092e 17-Oct-2013 christos <christos@NetBSD.org>

- remove unused variables
- move debugging code inside debugging sections


# 3a9c57eb 14-Sep-2013 joerg <joerg@NetBSD.org>

Comment out twa_error_table, but keep it around for documentation
purposes.


# d92b7083 02-Nov-2012 chs <chs@NetBSD.org>

fix autoconf output (don't print from the match routine).


# 75df6393 28-Jul-2012 matt <matt@NetBSD.org>

Make this compile with i386/conf/ALL


# 2f61c820 27-Jul-2012 jakllsch <jakllsch@NetBSD.org>

Convert twa(4) to device_t (CFATTACH_DECL_NEW).


# 75fbecf5 30-Jan-2012 drochner <drochner@NetBSD.org>

Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names

Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names instead
of the pcidevs generated one. More complicated cases, where names
are composed at runtime, are left alone for now. It certainly makes
sense to simplify the drivers here rather than inventing a catch-all API.
This should serve as as example for new drivers, and also ensure
consistent output in the AB_QUIET ("boot -q") case. Also, it avoids
excessive stack usage where drivers attach child devices because the
buffer for the device name is not kept on the local stack anymore.

show more ...


# 55b033b1 27-Jan-2012 para <para@NetBSD.org>

extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(wit

extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged

show more ...


# 88c00ee5 31-Aug-2011 plunky <plunky@NetBSD.org>

NULL does not need a cast


# b442c748 24-May-2011 joerg <joerg@NetBSD.org>

Explicitly get rid of constness.


123