Removing USB keyboard after filesystems synced causes panic
with destroyed mutex twa(4)?
Giovanni Trematerra
giovanni.trematerra at gmail.com
Thu Mar 25 08:18:21 UTC 2010
Sorry for top posting. I report just for the record the test that
Garrett kindly did.
On Wed, Mar 24, 2010 at 8:45 PM, Garrett Cooper <yanefbsd at gmail.com> wrote:
> The patch looks good for commit. No performance regression at
> boot, no functional regression when the keyboard's detached, and if
> I'm not mistaken it appears that performance actually improves at
> reboot (seems like the window between the final fs sync and the reboot
> is more along the lines of what's expected for a system that doesn't
> have the RAID card).
> Thanks!
> -Garrett
On Sun, Mar 14, 2010 at 12:56 AM, Giovanni Trematerra
<giovanni.trematerra at gmail.com> wrote:
> On Sat, Mar 13, 2010 at 4:33 AM, Garrett Cooper <yanefbsd at gmail.com> wrote:
>> On Wed, Mar 10, 2010 at 9:58 PM, Garrett Cooper <yanefbsd at gmail.c
>>>>
>
> if you don't mind could you try this patch? Less dirty but always quick :)
>
> Thank you for your time.
>
> --
> Gianni
>
>
> diff -r 69c84861a227 sys/dev/twa/tw_cl.h
> --- a/sys/dev/twa/tw_cl.h Thu Mar 11 16:18:11 2010 -0500
> +++ b/sys/dev/twa/tw_cl.h Sat Mar 13 18:50:16 2010 -0500
> @@ -66,6 +66,8 @@
> #define TW_CLI_CTLR_STATE_RESET_PHASE1_IN_PROGRESS (1<<5)
> /* G66 register write access bug needs to be worked around. */
> #define TW_CLI_CTLR_STATE_G66_WORKAROUND_NEEDED (1<<6)
> +/* Controller is shutting down. */
> +#define TW_CLI_CTLR_STATE_SHUTDOWN_IN_PROGRESS (1<<7)
>
> /* Possible values of ctlr->ioctl_lock.lock. */
> #define TW_CLI_LOCK_FREE 0x0 /* lock is free */
> diff -r 69c84861a227 sys/dev/twa/tw_cl_init.c
> --- a/sys/dev/twa/tw_cl_init.c Thu Mar 11 16:18:11 2010 -0500
> +++ b/sys/dev/twa/tw_cl_init.c Sat Mar 13 18:50:16 2010 -0500
> @@ -598,6 +598,7 @@ tw_cl_shutdown_ctlr(struct tw_cl_ctlr_ha
> * and notify the controller that we are going down.
> */
> ctlr->state &= ~TW_CLI_CTLR_STATE_ACTIVE;
> + ctlr->state |= TW_CLI_CTLR_STATE_SHUTDOWN_IN_PROGRESS;
>
> tw_cli_disable_interrupts(ctlr);
>
> diff -r 69c84861a227 sys/dev/twa/tw_cl_intr.c
> --- a/sys/dev/twa/tw_cl_intr.c Thu Mar 11 16:18:11 2010 -0500
> +++ b/sys/dev/twa/tw_cl_intr.c Sat Mar 13 18:50:16 2010 -0500
> @@ -75,9 +75,12 @@ tw_cl_interrupt(struct tw_cl_ctlr_handle
> if (ctlr == NULL)
> goto out;
>
> - /* If we get an interrupt while resetting, it is a shared
> - one for another device, so just bail */
> - if (ctlr->state & TW_CLI_CTLR_STATE_RESET_IN_PROGRESS)
> + /*
> + * If we get an interrupt while resetting or shutting down,
> + * it is a shared one for another device, so just bail
> + */
> + if (ctlr->state & TW_CLI_CTLR_STATE_RESET_IN_PROGRESS ||
> + ctlr->state & TW_CLI_CTLR_STATE_SHUTDOWN_IN_PROGRESS)
> goto out;
>
> /*
>
More information about the freebsd-current
mailing list