From: Marcel Holtmann <marcel@holtmann.org>
To: Justin Karneges <justin-qt@affinix.com>
Cc: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] dtl1_cs suspend bug
Date: 23 Sep 2003 23:37:28 +0200 [thread overview]
Message-ID: <1064353054.1620.40.camel@pegasus> (raw)
In-Reply-To: <200309231409.47300.justin-qt@affinix.com>
Hi Justin,
> This is unfortunate, as it pretty much rules out this ever being fixed on the
> Zaurus. Do you think this problem is really a bug in the PCMCIA subsystem?
>
> From my work the other day, it appears that the card is not properly being
> reset. In fact, you can break the driver by running 'cardctl reset'. This
> used to leave bluez in a funny state: hci0 still considered UP, but 'hcitool
> scan' would hang or return odd results.
>
> One thing I tried was unregistering / registering the hci dev in response to a
> pcmcia reset event. This would clean things out on the bluez end, such that
> 'hcitool scan' would exit immediately saying there is no device. This is
> correct, as 'hciconfig' would report the device as DOWN. Issuing 'hciconfig
> hci0 up' would timeout. Interestingly, it seems bluez tries to bring the
> card up automatically, which is kind of cool (when I 'hciconfig' shortly
> after 'cardctl reset', I would see the state as "DOWN INIT RUNNING" or some
> such, and then moments later just "DOWN").
>
> So it seems what needs to be done is for the card to be reset completely. I
> don't know what kind of state 'cardctl reset' leaves the card in. It looks
> like it is a serial-based interface to the card, so even being off by one
> byte could be a problem. Perhaps the card still considers itself to be
> active and in mid-use, and so reregistering the hci dev causes bluez and the
> card to become out of sync. Unlike other hardware, such as memory cards, a
> bluetooth card is pretty much unusable after a suspend, so I think a full
> reset (of both bluez and the card itself) is in order.
>
> To reset the card, I tried calling: dtl1_release, dtl1_config. This didn't
> appear to solve anything. Then I tried putting that into the insertion event
> code, so it became "config, release, config". This failed also, making the
> driver unusable even upon card insert. This seems to imply that your code is
> not doing proper cleanup or resetting. Shouldn't it be safe to call "config,
> release, config, release, config, release, etc" any number of times?
the main problem is the reset of the card itself. I actually don't know
how to do this and I don't have the specs for this card. If you suspend
you also have to suspend the HCI device and resume it have resume. In
general a up/down toggle should work here. You can use hci_suspend_dev()
and hci_resume_dev() in conjunction with hotplug (bluetooth.agent) for
this job. But as you already noticed, you have to bring the UART on the
card in the correct state so that can it be reinit after resume.
Regards
Marcel
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2003-09-23 21:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-22 11:08 [Bluez-devel] dtl1_cs suspend bug Justin Karneges
2003-09-23 12:08 ` Justin Karneges
2003-09-23 12:19 ` Marcel Holtmann
2003-09-23 21:09 ` Justin Karneges
2003-09-23 21:37 ` Marcel Holtmann [this message]
2003-09-23 21:44 ` Justin Karneges
2003-09-23 22:17 ` Marcel Holtmann
2003-09-23 23:48 ` Justin Karneges
2003-09-24 1:35 ` Marcel Holtmann
2003-09-24 6:06 ` Justin Karneges
2003-09-24 9:36 ` Marcel Holtmann
2003-09-25 3:35 ` Justin Karneges
2003-09-23 12:49 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1064353054.1620.40.camel@pegasus \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
--cc=justin-qt@affinix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.