Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/macppc/dev/pbms.c
RevisionDateAuthorComments
 1.20  28-Mar-2022  riastradh uhidev(9): Get the device and interface through attach args.

This way uhidev drivers don't need access to uhidev_softc itself for
it.
 1.19  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.18  24-Jul-2021  andvar branches: 1.18.2;
Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.17  24-Apr-2021  thorpej branches: 1.17.2;
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?).
 1.16  03-Sep-2018  riastradh branches: 1.16.14;
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!)
 1.15  13-Dec-2017  maya branches: 1.15.2; 1.15.4;
Catch up with hid.h header location change

Fixes macppc kernels build
 1.14  28-Apr-2016  skrll Fix build
 1.13  27-Oct-2012  chs branches: 1.13.12; 1.13.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.12  20-Dec-2010  phx branches: 1.12.8; 1.12.18;
The driver didn't work, because it expects the whole data packet in a
single interrupt. Reality shows that with current kernels a 81 bytes packet
is split into 3 interrupts with 32 + 32 + 17 bytes. I have added a workaround
to deal with it. The Geyser2 devices with 64 byte packets are unsupported
at the moment. Somebody needs to test it.

New: Added support for the iBook 12-inch trackpad.
 1.11  19-Nov-2010  phx Make sure the interface protocol is UIPROTO_MOUSE, before we attach.
 1.10  08-Nov-2010  pooka usb port stuff is a goner
 1.9  05-Nov-2009  dyoung branches: 1.9.2; 1.9.4;
In awacs(4) and snapper(4), use deviter(9) instead of accessing
alldevs directly.

In pbms(4), delete some unused debugging macros, expand USB
compatibility macros, and add a child-detachment routine. Simplify
pbms(4) deactivation and detachment.

These changes are compile-tested, only.
 1.8  01-Mar-2009  aymeric . use device_private() (led to immediate crash during attach)
. while there, fix the aspect ratio of the trackpad on the geyser2 model
 1.7  17-Oct-2007  garbled branches: 1.7.20; 1.7.28; 1.7.30; 1.7.34; 1.7.36; 1.7.38;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.6  14-Sep-2007  aymeric add support for the "newer" trackpads found at least in the last generation
G4 powerbooks (powerbook5,8). Information found in the Linux driver.
 1.5  04-Mar-2007  christos branches: 1.5.2; 1.5.10; 1.5.18; 1.5.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.4  12-Nov-2006  plunky branches: 1.4.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.3  06-Feb-2006  jmmv branches: 1.3.2; 1.3.10; 1.3.16; 1.3.20; 1.3.22; 1.3.24;
Fix build by correcting pbms_ioctl's prototype.
 1.2  05-Feb-2006  xtraeme Add a pbms(4) manpage. Remove it from the source code and update TODO.
 1.1  05-Feb-2006  christos powerbook 15" mouse driver from Johan Wallen.
 1.3.24.1  10-Dec-2006  yamt sync with head.
 1.3.22.2  09-Sep-2006  rpaulo sync with head
 1.3.22.1  06-Feb-2006  rpaulo file pbms.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:41:05 +0000
 1.3.20.1  18-Nov-2006  ad Sync with head.
 1.3.16.5  27-Oct-2007  yamt sync with head.
 1.3.16.4  03-Sep-2007  yamt sync with head.
 1.3.16.3  30-Dec-2006  yamt sync with head.
 1.3.16.2  21-Jun-2006  yamt sync with head.
 1.3.16.1  06-Feb-2006  yamt file pbms.c was added on branch yamt-lazymbuf on 2006-06-21 14:53:13 +0000
 1.3.10.2  22-Apr-2006  simonb Sync with head.
 1.3.10.1  06-Feb-2006  simonb file pbms.c was added on branch simonb-timecounters on 2006-04-22 11:37:41 +0000
 1.3.2.2  18-Feb-2006  yamt sync with head.
 1.3.2.1  06-Feb-2006  yamt file pbms.c was added on branch yamt-uio_vmspace on 2006-02-18 15:38:41 +0000
 1.4.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.5.20.1  06-Nov-2007  matt sync with HEAD
 1.5.18.1  02-Oct-2007  joerg Sync with HEAD.
 1.5.10.2  03-Oct-2007  garbled Sync with HEAD
 1.5.10.1  14-Sep-2007  macallan sync with HEAD
 1.5.2.1  09-Oct-2007  ad Sync with head.
 1.7.38.1  21-Apr-2010  matt sync to netbsd-5
 1.7.36.1  25-Aug-2009  snj Pull up following revision(s) (requested by aymeric in ticket #916):
sys/arch/macppc/dev/pbms.c: revision 1.8
. use device_private() (led to immediate crash during attach)
. while there, fix the aspect ratio of the trackpad on the geyser2 model
 1.7.34.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.30.2  11-Jan-2010  snj Apply patch (requested by tsutsui in ticket #916):
Fix crash on detach.
 1.7.30.1  25-Aug-2009  snj Pull up following revision(s) (requested by aymeric in ticket #916):
sys/arch/macppc/dev/pbms.c: revision 1.8
. use device_private() (led to immediate crash during attach)
. while there, fix the aspect ratio of the trackpad on the geyser2 model
 1.7.28.1  03-Mar-2009  skrll Sync with HEAD.
 1.7.20.2  11-Mar-2010  yamt sync with head
 1.7.20.1  04-May-2009  yamt sync with head.
 1.9.4.1  05-Mar-2011  rmind sync with head
 1.9.2.1  09-Nov-2010  uebayasi Sync with HEAD.
 1.12.18.2  03-Dec-2017  jdolecek update from HEAD
 1.12.18.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.12.8.1  30-Oct-2012  yamt sync with head
 1.13.14.1  29-May-2016  skrll Sync with HEAD
 1.13.12.1  08-Apr-2017  snj Pull up following revision(s) (requested by skrll in ticket #1398):
sys/arch/macppc/dev/pbms.c: revision 1.14
Fix build
 1.15.4.1  10-Jun-2019  christos Sync with HEAD
 1.15.2.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.16.14.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.17.2.1  01-Aug-2021  thorpej Sync with HEAD.
 1.18.2.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed