History log of /openbsd-current/sys/dev/sbus/stp4020.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.23 11-Apr-2023 jsg

fix double words in comments
feedback and ok jmc@ miod, ok millert@


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.22 18-Feb-2020 cheloha

stp(4): tsleep(9) -> tsleep_nsec(9)

With input from kn@.

Compile-tested by kn@.

ok kn@


# 1.21 31-Dec-2019 mpi

Convert infinite sleeps to {m,t}sleep_nsec(9).

ok kn@


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.20 27-Dec-2018 claudio

Convert K&R function definitions to modern C. clang is more picky about
them.
OK otto@ deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.19 19-Mar-2016 mpi

Reduces the noise around the global ``ticks'' variable by renaming
all the local ones to ``nticks''.

ok stefan@, deraadt@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.18 19-Nov-2013 deraadt

oops


# 1.17 18-Nov-2013 deraadt

simplify kthread_create(). no more stdarg
ok matthew guenther mikeb


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.16 10-Apr-2009 miod

Use soft interrupts to dispatch pcmcia device interrupts; this ensures the
driver handlers get invoked at the right level. Parts from NetBSD.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.15 26-Jun-2008 ray

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.14 23-Nov-2005 mickey

use proper bus_size_t for register offsets and not bus_addr_t; uwe@ miod@ testing


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.13 27-Jan-2005 millert

Add pcmcia_intr_string() to format the intr string for pcmcia attach
routines.


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.12 03-Mar-2004 miod

The socket number diagnostic check was simply crying out for unsigned
arithmetic...


# 1.11 02-Mar-2004 miod

Rework the card insertion/removal detection logic:
- instead of queueing events each time the sense information changes,
only remember that the slot needs attention
- when processing a slot needing attention, decide what to do depending upon
its current sense information, rather than what it was when the change
was detected
- handle the ``only one sensor asserted'' state happening during slow
insertion or removal.

This makes the driver much more reactive to insertions and removals, and
also removes unnecessary attach/detach calls.

ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.10 25-Jun-2003 mickey

fix #if/ifdef issue and use u_int16_t instead of int where appropriate


# 1.9 25-Jun-2003 miod

Acknowledge the status interrupt in some odd and usually rare cases, which
could render a sparc so crazy it would panic...


# 1.8 25-Jun-2003 mickey

mimic delays pattern from i82365 on socket enable. actually pull the reset line before clearing it. this together makes some more cards work and unwedges my wedged wedgy on reboot alright; miod@ ok and testing


# 1.7 25-Jun-2003 mickey

fix all the _BITS and their use


# 1.6 25-Jun-2003 miod

Let the stp driver use different bus_space_tag_t for its own device access,
and for access to the pcmcia windows from the pcmcia drivers.


# 1.5 23-Jun-2003 miod

Split the stp driver into its core, and md attachment routines, and provide
attachment routines for sparc and sparc64.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.4 21-Jun-2002 fgsch

branches: 1.4.4; 1.4.8;
make this more quiet on card insertion.


# 1.3 20-Jun-2002 deraadt

rename nell to stp. we do not always follow stupid solaris names


# 1.2 19-Jun-2002 fgsch

- set the size correctly.
- a few minor cosmetical changes.


# 1.1 19-Jun-2002 fgsch

sbus pcmcia bridge driver (nell); from NetBSD.


# 1.22 18-Feb-2020 cheloha

stp(4): tsleep(9) -> tsleep_nsec(9)

With input from kn@.

Compile-tested by kn@.

ok kn@


# 1.21 31-Dec-2019 mpi

Convert infinite sleeps to {m,t}sleep_nsec(9).

ok kn@


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.20 27-Dec-2018 claudio

Convert K&R function definitions to modern C. clang is more picky about
them.
OK otto@ deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.19 19-Mar-2016 mpi

Reduces the noise around the global ``ticks'' variable by renaming
all the local ones to ``nticks''.

ok stefan@, deraadt@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.18 19-Nov-2013 deraadt

oops


# 1.17 18-Nov-2013 deraadt

simplify kthread_create(). no more stdarg
ok matthew guenther mikeb


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.16 10-Apr-2009 miod

Use soft interrupts to dispatch pcmcia device interrupts; this ensures the
driver handlers get invoked at the right level. Parts from NetBSD.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.15 26-Jun-2008 ray

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.14 23-Nov-2005 mickey

use proper bus_size_t for register offsets and not bus_addr_t; uwe@ miod@ testing


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.13 27-Jan-2005 millert

Add pcmcia_intr_string() to format the intr string for pcmcia attach
routines.


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.12 03-Mar-2004 miod

The socket number diagnostic check was simply crying out for unsigned
arithmetic...


# 1.11 02-Mar-2004 miod

Rework the card insertion/removal detection logic:
- instead of queueing events each time the sense information changes,
only remember that the slot needs attention
- when processing a slot needing attention, decide what to do depending upon
its current sense information, rather than what it was when the change
was detected
- handle the ``only one sensor asserted'' state happening during slow
insertion or removal.

This makes the driver much more reactive to insertions and removals, and
also removes unnecessary attach/detach calls.

ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.10 25-Jun-2003 mickey

fix #if/ifdef issue and use u_int16_t instead of int where appropriate


# 1.9 25-Jun-2003 miod

Acknowledge the status interrupt in some odd and usually rare cases, which
could render a sparc so crazy it would panic...


# 1.8 25-Jun-2003 mickey

mimic delays pattern from i82365 on socket enable. actually pull the reset line before clearing it. this together makes some more cards work and unwedges my wedged wedgy on reboot alright; miod@ ok and testing


# 1.7 25-Jun-2003 mickey

fix all the _BITS and their use


# 1.6 25-Jun-2003 miod

Let the stp driver use different bus_space_tag_t for its own device access,
and for access to the pcmcia windows from the pcmcia drivers.


# 1.5 23-Jun-2003 miod

Split the stp driver into its core, and md attachment routines, and provide
attachment routines for sparc and sparc64.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.4 21-Jun-2002 fgsch

branches: 1.4.4; 1.4.8;
make this more quiet on card insertion.


# 1.3 20-Jun-2002 deraadt

rename nell to stp. we do not always follow stupid solaris names


# 1.2 19-Jun-2002 fgsch

- set the size correctly.
- a few minor cosmetical changes.


# 1.1 19-Jun-2002 fgsch

sbus pcmcia bridge driver (nell); from NetBSD.


# 1.21 31-Dec-2019 mpi

Convert infinite sleeps to {m,t}sleep_nsec(9).

ok kn@


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.20 27-Dec-2018 claudio

Convert K&R function definitions to modern C. clang is more picky about
them.
OK otto@ deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.19 19-Mar-2016 mpi

Reduces the noise around the global ``ticks'' variable by renaming
all the local ones to ``nticks''.

ok stefan@, deraadt@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.18 19-Nov-2013 deraadt

oops


# 1.17 18-Nov-2013 deraadt

simplify kthread_create(). no more stdarg
ok matthew guenther mikeb


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.16 10-Apr-2009 miod

Use soft interrupts to dispatch pcmcia device interrupts; this ensures the
driver handlers get invoked at the right level. Parts from NetBSD.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.15 26-Jun-2008 ray

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.14 23-Nov-2005 mickey

use proper bus_size_t for register offsets and not bus_addr_t; uwe@ miod@ testing


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.13 27-Jan-2005 millert

Add pcmcia_intr_string() to format the intr string for pcmcia attach
routines.


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.12 03-Mar-2004 miod

The socket number diagnostic check was simply crying out for unsigned
arithmetic...


# 1.11 02-Mar-2004 miod

Rework the card insertion/removal detection logic:
- instead of queueing events each time the sense information changes,
only remember that the slot needs attention
- when processing a slot needing attention, decide what to do depending upon
its current sense information, rather than what it was when the change
was detected
- handle the ``only one sensor asserted'' state happening during slow
insertion or removal.

This makes the driver much more reactive to insertions and removals, and
also removes unnecessary attach/detach calls.

ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.10 25-Jun-2003 mickey

fix #if/ifdef issue and use u_int16_t instead of int where appropriate


# 1.9 25-Jun-2003 miod

Acknowledge the status interrupt in some odd and usually rare cases, which
could render a sparc so crazy it would panic...


# 1.8 25-Jun-2003 mickey

mimic delays pattern from i82365 on socket enable. actually pull the reset line before clearing it. this together makes some more cards work and unwedges my wedged wedgy on reboot alright; miod@ ok and testing


# 1.7 25-Jun-2003 mickey

fix all the _BITS and their use


# 1.6 25-Jun-2003 miod

Let the stp driver use different bus_space_tag_t for its own device access,
and for access to the pcmcia windows from the pcmcia drivers.


# 1.5 23-Jun-2003 miod

Split the stp driver into its core, and md attachment routines, and provide
attachment routines for sparc and sparc64.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.4 21-Jun-2002 fgsch

branches: 1.4.4; 1.4.8;
make this more quiet on card insertion.


# 1.3 20-Jun-2002 deraadt

rename nell to stp. we do not always follow stupid solaris names


# 1.2 19-Jun-2002 fgsch

- set the size correctly.
- a few minor cosmetical changes.


# 1.1 19-Jun-2002 fgsch

sbus pcmcia bridge driver (nell); from NetBSD.


# 1.20 27-Dec-2018 claudio

Convert K&R function definitions to modern C. clang is more picky about
them.
OK otto@ deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.19 19-Mar-2016 mpi

Reduces the noise around the global ``ticks'' variable by renaming
all the local ones to ``nticks''.

ok stefan@, deraadt@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.18 19-Nov-2013 deraadt

oops


# 1.17 18-Nov-2013 deraadt

simplify kthread_create(). no more stdarg
ok matthew guenther mikeb


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.16 10-Apr-2009 miod

Use soft interrupts to dispatch pcmcia device interrupts; this ensures the
driver handlers get invoked at the right level. Parts from NetBSD.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.15 26-Jun-2008 ray

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.14 23-Nov-2005 mickey

use proper bus_size_t for register offsets and not bus_addr_t; uwe@ miod@ testing


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.13 27-Jan-2005 millert

Add pcmcia_intr_string() to format the intr string for pcmcia attach
routines.


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.12 03-Mar-2004 miod

The socket number diagnostic check was simply crying out for unsigned
arithmetic...


# 1.11 02-Mar-2004 miod

Rework the card insertion/removal detection logic:
- instead of queueing events each time the sense information changes,
only remember that the slot needs attention
- when processing a slot needing attention, decide what to do depending upon
its current sense information, rather than what it was when the change
was detected
- handle the ``only one sensor asserted'' state happening during slow
insertion or removal.

This makes the driver much more reactive to insertions and removals, and
also removes unnecessary attach/detach calls.

ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.10 25-Jun-2003 mickey

fix #if/ifdef issue and use u_int16_t instead of int where appropriate


# 1.9 25-Jun-2003 miod

Acknowledge the status interrupt in some odd and usually rare cases, which
could render a sparc so crazy it would panic...


# 1.8 25-Jun-2003 mickey

mimic delays pattern from i82365 on socket enable. actually pull the reset line before clearing it. this together makes some more cards work and unwedges my wedged wedgy on reboot alright; miod@ ok and testing


# 1.7 25-Jun-2003 mickey

fix all the _BITS and their use


# 1.6 25-Jun-2003 miod

Let the stp driver use different bus_space_tag_t for its own device access,
and for access to the pcmcia windows from the pcmcia drivers.


# 1.5 23-Jun-2003 miod

Split the stp driver into its core, and md attachment routines, and provide
attachment routines for sparc and sparc64.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.4 21-Jun-2002 fgsch

branches: 1.4.4; 1.4.8;
make this more quiet on card insertion.


# 1.3 20-Jun-2002 deraadt

rename nell to stp. we do not always follow stupid solaris names


# 1.2 19-Jun-2002 fgsch

- set the size correctly.
- a few minor cosmetical changes.


# 1.1 19-Jun-2002 fgsch

sbus pcmcia bridge driver (nell); from NetBSD.


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.19 19-Mar-2016 mpi

Reduces the noise around the global ``ticks'' variable by renaming
all the local ones to ``nticks''.

ok stefan@, deraadt@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.18 19-Nov-2013 deraadt

oops


# 1.17 18-Nov-2013 deraadt

simplify kthread_create(). no more stdarg
ok matthew guenther mikeb


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.16 10-Apr-2009 miod

Use soft interrupts to dispatch pcmcia device interrupts; this ensures the
driver handlers get invoked at the right level. Parts from NetBSD.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.15 26-Jun-2008 ray

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.14 23-Nov-2005 mickey

use proper bus_size_t for register offsets and not bus_addr_t; uwe@ miod@ testing


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.13 27-Jan-2005 millert

Add pcmcia_intr_string() to format the intr string for pcmcia attach
routines.


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.12 03-Mar-2004 miod

The socket number diagnostic check was simply crying out for unsigned
arithmetic...


# 1.11 02-Mar-2004 miod

Rework the card insertion/removal detection logic:
- instead of queueing events each time the sense information changes,
only remember that the slot needs attention
- when processing a slot needing attention, decide what to do depending upon
its current sense information, rather than what it was when the change
was detected
- handle the ``only one sensor asserted'' state happening during slow
insertion or removal.

This makes the driver much more reactive to insertions and removals, and
also removes unnecessary attach/detach calls.

ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.10 25-Jun-2003 mickey

fix #if/ifdef issue and use u_int16_t instead of int where appropriate


# 1.9 25-Jun-2003 miod

Acknowledge the status interrupt in some odd and usually rare cases, which
could render a sparc so crazy it would panic...


# 1.8 25-Jun-2003 mickey

mimic delays pattern from i82365 on socket enable. actually pull the reset line before clearing it. this together makes some more cards work and unwedges my wedged wedgy on reboot alright; miod@ ok and testing


# 1.7 25-Jun-2003 mickey

fix all the _BITS and their use


# 1.6 25-Jun-2003 miod

Let the stp driver use different bus_space_tag_t for its own device access,
and for access to the pcmcia windows from the pcmcia drivers.


# 1.5 23-Jun-2003 miod

Split the stp driver into its core, and md attachment routines, and provide
attachment routines for sparc and sparc64.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.4 21-Jun-2002 fgsch

branches: 1.4.4; 1.4.8;
make this more quiet on card insertion.


# 1.3 20-Jun-2002 deraadt

rename nell to stp. we do not always follow stupid solaris names


# 1.2 19-Jun-2002 fgsch

- set the size correctly.
- a few minor cosmetical changes.


# 1.1 19-Jun-2002 fgsch

sbus pcmcia bridge driver (nell); from NetBSD.