dragonfly.git
19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Sat, 18 Sep 2004 21:05:43 +0000 (21:05 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Sat, 18 Sep 2004 21:05:07 +0000 (21:05 +0000)]
timeout/untimeout ==> callout_*

Note: The driver is currently not stoped when pccard is unloaded.
This might be a problem, but it is definitely not new.

19 years agoAdd DragonFly-stable-supfile and cleanup the comments in it and
Matthew Dillon [Sat, 18 Sep 2004 20:36:38 +0000 (20:36 +0000)]
Add DragonFly-stable-supfile and cleanup the comments in it and
DragonFly-src-supfile.

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Sat, 18 Sep 2004 20:25:17 +0000 (20:25 +0000)]
timeout/untimeout ==> callout_*

19 years agomalloc() M_NOWAIT -> M_WAITOK, plus remove bzero's in favor of M_ZERO.
Matthew Dillon [Sat, 18 Sep 2004 20:02:38 +0000 (20:02 +0000)]
malloc() M_NOWAIT -> M_WAITOK, plus remove bzero's in favor of M_ZERO.

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Sat, 18 Sep 2004 19:54:28 +0000 (19:54 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_* [structural fields appeared not to be used,
Matthew Dillon [Sat, 18 Sep 2004 19:42:12 +0000 (19:42 +0000)]
timeout/untimeout ==> callout_* [structural fields appeared not to be used,
#if 0 them out]

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Sat, 18 Sep 2004 19:43:22 +0000 (19:43 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Sat, 18 Sep 2004 19:32:59 +0000 (19:32 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Sat, 18 Sep 2004 19:11:29 +0000 (19:11 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Sat, 18 Sep 2004 19:08:08 +0000 (19:08 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Sat, 18 Sep 2004 19:02:35 +0000 (19:02 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Sat, 18 Sep 2004 18:47:20 +0000 (18:47 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Sat, 18 Sep 2004 18:33:38 +0000 (18:33 +0000)]
timeout/untimeout ==> callout_*

19 years agoUse ioctl_map_range instead of ioctl_map_cmd, as required by the mapping API.
Joerg Sonnenberger [Sat, 18 Sep 2004 16:25:54 +0000 (16:25 +0000)]
Use ioctl_map_range instead of ioctl_map_cmd, as required by the mapping API.

Noticied-by: Simon 'corecode' Schubert
19 years agoGet rid off the host.conf to nsswitch.conf conversion.
Jeroen Ruigrok/asmodai [Sat, 18 Sep 2004 07:16:32 +0000 (07:16 +0000)]
Get rid off the host.conf to nsswitch.conf conversion.
We will not be going the nsswitch way.

Discussed with: matt

19 years agoFix the ncpu check for 'ps' so it does not display the 'M' flag on UP
Matthew Dillon [Fri, 17 Sep 2004 17:30:42 +0000 (17:30 +0000)]
Fix the ncpu check for 'ps' so it does not display the 'M' flag on UP
systems.

19 years agoJoerg pointed out that callout_init is called by the SYSINIT. Reorganize
Matthew Dillon [Fri, 17 Sep 2004 17:06:59 +0000 (17:06 +0000)]
Joerg pointed out that callout_init is called by the SYSINIT.  Reorganize
the SYSINIT and add an acct_init() procedure to better-organize the
initialization code.

19 years agoAdd missing callout_init().
Matthew Dillon [Fri, 17 Sep 2004 16:47:21 +0000 (16:47 +0000)]
Add missing callout_init().

19 years agoFix a type-o / syntax error in the last commit.
Matthew Dillon [Fri, 17 Sep 2004 10:15:00 +0000 (10:15 +0000)]
Fix a type-o / syntax error in the last commit.

19 years agoAdd a missing free to a failure case (non critical).
Matthew Dillon [Fri, 17 Sep 2004 10:03:35 +0000 (10:03 +0000)]
Add a missing free to a failure case (non critical).

19 years agoFix a number of races. First, retain PG_BUSY through a vm_page_remove(),
Matthew Dillon [Fri, 17 Sep 2004 10:02:12 +0000 (10:02 +0000)]
Fix a number of races.  First, retain PG_BUSY through a vm_page_remove(),
allowing it to be held atomically through a vm_page_rename() and
through most of a vm_page_free_toq() call.  Before vm_page_remove() unbusy'd
the page, leading to possible races and definite future issues.

Use a critical section instead of splvm() for critical VM page operations,
to protect against IPIs.

In-discussion-with: David Rhodus

19 years agoMake the freeing free mbuf assertion a bit more verbose.
Matthew Dillon [Fri, 17 Sep 2004 09:54:22 +0000 (09:54 +0000)]
Make the freeing free mbuf assertion a bit more verbose.

19 years agoFix a race on SMP systems. Since we might block while obtaining the MP
Matthew Dillon [Fri, 17 Sep 2004 09:53:27 +0000 (09:53 +0000)]
Fix a race on SMP systems.  Since we might block while obtaining the MP
lock we have to check sc->next to see if we raced a deletion of our
callout, and loop if we did.

19 years agomissing log message for last commit: Rearrange the mbuf clearing code in
Matthew Dillon [Fri, 17 Sep 2004 09:51:12 +0000 (09:51 +0000)]
missing log message for last commit: Rearrange the mbuf clearing code in
the tx ring scan so we do not have to make major assumptions with regard
to side effects / blocking effects of m_freem().

19 years ago*** empty log message ***
Matthew Dillon [Fri, 17 Sep 2004 09:49:24 +0000 (09:49 +0000)]
*** empty log message ***

19 years agoOops CALLOUT_DID_INIT had the same flags value as CALLOUT_MPSAFE, causing
Matthew Dillon [Fri, 17 Sep 2004 09:34:54 +0000 (09:34 +0000)]
Oops CALLOUT_DID_INIT had the same flags value as CALLOUT_MPSAFE, causing
all timeout functions to operate as if they were MPSAFE, which does bad
things to SMP systems!

19 years agoUnbreak the SCSI drivers. Move the callout_init() from xpt_get_ccb() to
Matthew Dillon [Fri, 17 Sep 2004 09:09:21 +0000 (09:09 +0000)]
Unbreak the SCSI drivers.  Move the callout_init() from xpt_get_ccb() to
xpt_setup_ccb().  Otherwise the callout for stack-based ccb's (and there
are a LOT of them) will not be properly initialized.  The only caller of
xpt_get_ccb() also calls xpt_setup_ccb().

19 years agoRemove a superfluous (and incorrect due to the recent callout changes) bzero()
Matthew Dillon [Fri, 17 Sep 2004 08:25:30 +0000 (08:25 +0000)]
Remove a superfluous (and incorrect due to the recent callout changes) bzero()
call.

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Fri, 17 Sep 2004 03:39:39 +0000 (03:39 +0000)]
timeout/untimeout ==> callout_*

19 years agoMove the callout init below the softc allocation. *sigh*
Joerg Sonnenberger [Fri, 17 Sep 2004 03:25:43 +0000 (03:25 +0000)]
Move the callout init below the softc allocation. *sigh*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Fri, 17 Sep 2004 02:52:39 +0000 (02:52 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Fri, 17 Sep 2004 02:38:10 +0000 (02:38 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Fri, 17 Sep 2004 02:20:53 +0000 (02:20 +0000)]
timeout/untimeout ==> callout_*

19 years agoIt is unlikely that NetBSD wants to take this code back or that DF will
Joerg Sonnenberger [Fri, 17 Sep 2004 01:50:06 +0000 (01:50 +0000)]
It is unlikely that NetBSD wants to take this code back or that DF will
switch to XS, so just nuke those parts.

Do some header inclusion reordering according to style(9) while here,

19 years agotimeout/untimeout ==> callout_* for p->p_ithandle
Joerg Sonnenberger [Fri, 17 Sep 2004 01:29:45 +0000 (01:29 +0000)]
timeout/untimeout ==> callout_* for p->p_ithandle

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Fri, 17 Sep 2004 01:12:30 +0000 (01:12 +0000)]
timeout/untimeout ==> callout_*

19 years agoFix typo.
Joerg Sonnenberger [Fri, 17 Sep 2004 01:09:09 +0000 (01:09 +0000)]
Fix typo.

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Fri, 17 Sep 2004 01:08:13 +0000 (01:08 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Fri, 17 Sep 2004 01:03:58 +0000 (01:03 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Fri, 17 Sep 2004 00:28:44 +0000 (00:28 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Fri, 17 Sep 2004 00:21:08 +0000 (00:21 +0000)]
timeout/untimeout ==> callout_*

19 years agoMove all the softclock/callout initialization out of MD and into MI. Get rid
Matthew Dillon [Fri, 17 Sep 2004 00:18:16 +0000 (00:18 +0000)]
Move all the softclock/callout initialization out of MD and into MI.  Get rid
of the extremely low-level virtual address space allocation for the old
timeout() API's data structures and simply malloc() them in the new MI code
(they will soon be removed entirely when the old API is removed).  Replace
the softclock swi with a non-preempting high priority helper thread (one
per cpu).  The lack of preemption allows us to retain compatibility with
splsoftclock() use elsewhere in the kernel until those uses can be cleaned up,
then we *might* make softclock threads preempt-capable.

Rewrite the callout_*() implementation to make all data structures per-cpu.
Add an MP flag (similar to what FreeBSD did), but create a separate API
function, callout_init_mp() instead of adding an additional badly defined
argument to callout_init().   callout_reset() and callout_stop() will now
complain if the supplied structure is uninitialized (zero'd, e.g.
callout_init() was not called on it).

It is our intention to obsolete the old timeout()/untimeout() APIs and work
is ongoing in that regard, and Joerg will soon import the new OpenBSD
timeout_{set,add,del}() API.  The callout*() API will be retained.

In DragonFly these APIs will guarentee that the callback will occur on the
same cpu that the timeout was added on, a feature that the TCP protocol stacks
will soon be able to take advantage of.

Idea and Brainstorming by: Jeffrey Hsu, Joerg Sonnenberger, and Matthew Dillon

19 years agoChange the FreeBSD 5 jail sysctls to the correct DragonFly locations.
Joerg Sonnenberger [Fri, 17 Sep 2004 00:08:54 +0000 (00:08 +0000)]
Change the FreeBSD 5 jail sysctls to the correct DragonFly locations.

Noticed-by: Tomaz Borstnar <tomaz.borstnar@over.net>
19 years agotimeout/untimeout ==> callout_* [ Adding missing callout_init()'s ].
Matthew Dillon [Fri, 17 Sep 2004 00:07:27 +0000 (00:07 +0000)]
timeout/untimeout ==> callout_* [ Adding missing callout_init()'s ].

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 23:40:24 +0000 (23:40 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 23:34:19 +0000 (23:34 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 23:30:10 +0000 (23:30 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 23:19:34 +0000 (23:19 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 23:14:29 +0000 (23:14 +0000)]
timeout/untimeout ==> callout_*

This moves the reset of the arptimer after the list processing. There's no
protection against multiple runs here, so this makes more sense.

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 23:06:42 +0000 (23:06 +0000)]
timeout/untimeout ==> callout_*

19 years agoFix some warnings / typos
Joerg Sonnenberger [Thu, 16 Sep 2004 23:01:34 +0000 (23:01 +0000)]
Fix some warnings / typos

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 22:59:06 +0000 (22:59 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 22:35:30 +0000 (22:35 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 22:26:22 +0000 (22:26 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 22:12:39 +0000 (22:12 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 22:12:07 +0000 (22:12 +0000)]
timeout/untimeout ==> callout_*

Use splsoftclock protection here to avoid a race as suggestion by Matt.
This seems superflous though and it could be better to just use atomic
inc/dec on proc_waiting.

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 21:55:03 +0000 (21:55 +0000)]
timeout/untimeout ==> callout_*

19 years agoDon't include the PCI parts until the our system has involved to support
Joerg Sonnenberger [Thu, 16 Sep 2004 20:50:00 +0000 (20:50 +0000)]
Don't include the PCI parts until the our system has involved to support
this.

19 years agoAdd comment markers to avoid the same stupid mistake as I made.
Jeroen Ruigrok/asmodai [Thu, 16 Sep 2004 16:29:39 +0000 (16:29 +0000)]
Add comment markers to avoid the same stupid mistake as I made.

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Thu, 16 Sep 2004 15:15:51 +0000 (15:15 +0000)]
timeout/untimeout ==> callout_*

19 years agoRemove unused defines
Joerg Sonnenberger [Thu, 16 Sep 2004 14:56:32 +0000 (14:56 +0000)]
Remove unused defines

19 years agoDon't include arpa/inet.h, which needs certain struct to be defined.
Joerg Sonnenberger [Thu, 16 Sep 2004 13:40:23 +0000 (13:40 +0000)]
Don't include arpa/inet.h, which needs certain struct to be defined.
Just include machine/endian.h and define the prototypes here too.

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Thu, 16 Sep 2004 05:01:17 +0000 (05:01 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Thu, 16 Sep 2004 04:49:32 +0000 (04:49 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Thu, 16 Sep 2004 04:45:49 +0000 (04:45 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Thu, 16 Sep 2004 04:39:31 +0000 (04:39 +0000)]
timeout/untimeout ==> callout_*

19 years agoRemove a redundant bzero (which also specified the wrong length in anycase
Matthew Dillon [Thu, 16 Sep 2004 04:25:18 +0000 (04:25 +0000)]
Remove a redundant bzero (which also specified the wrong length in anycase
after the callout_handle->callout conversion).

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Thu, 16 Sep 2004 03:54:37 +0000 (03:54 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Matthew Dillon [Thu, 16 Sep 2004 03:43:09 +0000 (03:43 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*, even though this is currently not used.
Joerg Sonnenberger [Wed, 15 Sep 2004 20:38:36 +0000 (20:38 +0000)]
timeout/untimeout ==> callout_*, even though this is currently not used.

19 years agoSplit DN_NEXT into a version with and without cast. For the left side usages,
Joerg Sonnenberger [Wed, 15 Sep 2004 20:30:09 +0000 (20:30 +0000)]
Split DN_NEXT into a version with and without cast. For the left side usages,
cast the pointers to (struct mbuf *) instead.

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 20:23:22 +0000 (20:23 +0000)]
timeout/untimeout ==> callout_*

19 years agoMove the timer declaration a bit up. I don't know why GCC 3.4 works and
Joerg Sonnenberger [Wed, 15 Sep 2004 20:05:13 +0000 (20:05 +0000)]
Move the timer declaration a bit up. I don't know why GCC 3.4 works and
2.95 doesn't.

19 years ago- ISO C cleanup
Joerg Sonnenberger [Wed, 15 Sep 2004 19:58:05 +0000 (19:58 +0000)]
- ISO C cleanup
- make functions and globals static, remove ttymsg
- use clnt_pcreateerror when dealing with rpc
- use getopt for consistency
- remove useless void casts
- error check unlink and warn if final close failed
- make pointer conversions explicit
- WARNS=6 clean

Mostly-submitted-by: Liam J. Foy <liamfoy@sepulcrum.org>
19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 19:34:55 +0000 (19:34 +0000)]
timeout/untimeout ==> callout_*

19 years agoif_clone_event should take a struct if_clone *, not a struct ifnet *.
Joerg Sonnenberger [Wed, 15 Sep 2004 19:33:36 +0000 (19:33 +0000)]
if_clone_event should take a struct if_clone *, not a struct ifnet *.

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 19:29:35 +0000 (19:29 +0000)]
timeout/untimeout ==> callout_*

19 years agoReplace the timeout based busy-loop with a DELAY(1000) based busy-loop.
Joerg Sonnenberger [Wed, 15 Sep 2004 17:58:18 +0000 (17:58 +0000)]
Replace the timeout based busy-loop with a DELAY(1000) based busy-loop.

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 16:54:21 +0000 (16:54 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 16:46:19 +0000 (16:46 +0000)]
timeout/untimeout ==> callout_*

19 years agoDon't use dev/acpia/* includes for the ACPI5 infrastructure.
Joerg Sonnenberger [Wed, 15 Sep 2004 16:33:09 +0000 (16:33 +0000)]
Don't use dev/acpia/* includes for the ACPI5 infrastructure.

Noticed-by: YONETANI Tomokazu <qhwt+dragonfly-bugs@les.ath.cx>
19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 16:25:12 +0000 (16:25 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 16:11:52 +0000 (16:11 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 16:02:41 +0000 (16:02 +0000)]
timeout/untimeout ==> callout_*

19 years agoRemove unused consumer of timeout
Joerg Sonnenberger [Wed, 15 Sep 2004 15:40:54 +0000 (15:40 +0000)]
Remove unused consumer of timeout

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 15:32:00 +0000 (15:32 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 15:22:02 +0000 (15:22 +0000)]
timeout/untimeout ==> callout_*

19 years agoThe prefered location of the byteorder functions is arpa/inet.h. This
Joerg Sonnenberger [Wed, 15 Sep 2004 15:04:31 +0000 (15:04 +0000)]
The prefered location of the byteorder functions is arpa/inet.h. This
are also provided from sys/param.h and netinet/in.h, for historic purpose
and standard compliance.

Change the prototypes to reflect the use of POSIX fixed types, GCC does
produce warnings otherwise.

19 years agoSUS3 specified that netinet/in.h provides ntohl and may provide all the
Joerg Sonnenberger [Wed, 15 Sep 2004 15:00:50 +0000 (15:00 +0000)]
SUS3 specified that netinet/in.h provides ntohl and may provide all the
interfaces from arpa/inet.h. Therefore include the later in the !_KERNEL
case, a lot of Linux program depend on this.

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 14:31:22 +0000 (14:31 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 14:24:33 +0000 (14:24 +0000)]
timeout/untimeout ==> callout_*

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 13:54:42 +0000 (13:54 +0000)]
timeout/untimeout ==> callout_*

19 years ago'vidcontrol show' was broken by the better vesa support commit. Fix it.
Matthew Dillon [Wed, 15 Sep 2004 05:55:48 +0000 (05:55 +0000)]
'vidcontrol show' was broken by the better vesa support commit.  Fix it.

Submitted-by: "Deng XueFeng" <dsnofe@msn.com>
19 years agoDon't complain when a cdevsw with non-zero refs is being removed if it still
Matthew Dillon [Wed, 15 Sep 2004 03:21:03 +0000 (03:21 +0000)]
Don't complain when a cdevsw with non-zero refs is being removed if it still
has links to other mask/match sets.  Add misc comments to the code.

19 years agoFix cdevsw_remove() warnings related to the removal of mass media (e.g.
Matthew Dillon [Wed, 15 Sep 2004 02:56:35 +0000 (02:56 +0000)]
Fix cdevsw_remove() warnings related to the removal of mass media (e.g.
usb memory sticks).  disk_destroy() was not properly specifying the unit
number when destroying the cdevsw and raw device.

19 years agotimeout/untimeout ==> callout_*
Joerg Sonnenberger [Wed, 15 Sep 2004 01:51:55 +0000 (01:51 +0000)]
timeout/untimeout ==> callout_*

19 years agoImprove error reporting when the cdevsw code detects problems.
Matthew Dillon [Wed, 15 Sep 2004 01:48:09 +0000 (01:48 +0000)]
Improve error reporting when the cdevsw code detects problems.

19 years agoConvert timeout ==> callout_*.
Joerg Sonnenberger [Wed, 15 Sep 2004 01:39:10 +0000 (01:39 +0000)]
Convert timeout ==> callout_*.

Note that ACPI doesn't support detach / unloading, therefore no
callout_stop is used.

19 years agoWhen a umass storage device is unplugged there might be pending requests
Matthew Dillon [Wed, 15 Sep 2004 01:38:13 +0000 (01:38 +0000)]
When a umass storage device is unplugged there might be pending requests
which either fail or wind up in limbo.  The state machine will attempt to
issue a BBB RESET, but since this does not occur on our bulk or interrupt
pipes simply aborting the pipes is not sufficient to ensure that all of our
xfer requests have been idled.

We must also wait for any in-progress RESET's to complete, which is
accomplished by testing sc->transfer_state.  Otherwise we may wind up
freeing an active xfer request and blow up.