linux/include
Inaky Perez-Gonzalez c2315b4ea9 wimax/i2400m: clarify and fix i2400m->{ready,updown}
The i2400m driver uses two different bits to distinguish how much the
driver is up. i2400m->ready is used to denote that the infrastructure
to communicate with the device is up and running. i2400m->updown is
used to indicate if 'ready' and the device is up and running, ready to
take control and data traffic.

However, all this was pretty dirty and not clear, with many open spots
where race conditions were present.

This commit cleans up the situation by:

 - documenting the usage of both bits

 - setting them only in specific, well controlled places
   (i2400m_dev_start, i2400m_dev_stop)

 - ensuring the i2400m workqueue can't get in the middle of the
   setting by flushing it when i2400m->ready is set to zero. This
   allows the report hook not having to check again for the bit to be
   set [rx.c:i2400m_report_hook_work()].

 - using i2400m->updown to determine if the device is up and running
   instead of the wimax state in i2400m_dev_reset_handle().

 - not loosing missed messages sent by the hardware before
   i2400m->ready is set. In rx.c, whatever the device sends can be
   sent to user space over the message pipes as soon as the wimax
   device is registered, so don't wait for i2400m->ready to be set.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-10-19 15:56:07 +09:00
..
acpi ACPI: remove acpi_device_uid() and related stuff 2009-09-25 15:09:49 -04:00
asm-generic net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
crypto
drm Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2009-09-30 08:03:00 -07:00
keys
linux wimax/i6x50: add Intel WiFi/WiMAX Link 6050 Series support 2009-10-19 15:55:59 +09:00
math-emu
media
mtd
net wimax/i2400m: clarify and fix i2400m->{ready,updown} 2009-10-19 15:56:07 +09:00
pcmcia PM / PCMCIA: Drop second argument of pcmcia_socket_dev_suspend() 2009-09-29 00:10:41 +02:00
rdma trivial: fix typo "to to" in multiple files 2009-09-21 15:14:55 +02:00
rxrpc
scsi trivial: remove unnecessary semicolons 2009-09-21 15:14:58 +02:00
sound
trace Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2009-10-04 12:39:14 -07:00
video davinci-fb-frame-buffer-driver-for-ti-da8xx-omap-l1xx-v4 2009-09-23 07:39:51 -07:00
xen
Kbuild