2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 17:23:55 +08:00
linux-next/drivers/ieee1394
Stefan Richter 3e98eab46d ieee1394: sbp2: safer initialization of status fifo
Sbp2's copy of the status fifo was cleared when management ORBs or new
command ORBs were prepared.  The latter had potential for a race
condition if the block layer's soft IRQ and the 1394 LLD's interrupt
handler ran on different CPUs.  It would also yield wrong status if a
command was completed with non-zero completion status before other
commands that had zero completion status, and no new command was
enqueued in the meantime.

Now, the status buffer is cleared right before it is written.  Thus it
ends up in the following simpler and safer access pattern:
 - sbp2_alloc_device: allocates and implicitly clears once,
 - sbp2_handle_status_write: clears, writes, and reads,
 - sbp2_query_logins, sbp2_login_device, sbp2_reconnect_device: read.
The latter three do not race with sbp2_handle_status_write because of
how the protocol works.

As a tiny optimization, the first two quadlets of the status never need
to be cleared.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-09-17 19:29:22 +02:00
..
.gitignore gitignore: misc files 2006-01-01 22:21:50 +01:00
config_roms.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
config_roms.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
csr1212.c ieee1394: add preprocessor constant for invalid csr address 2006-06-12 18:15:31 -04:00
csr1212.h ieee1394: add preprocessor constant for invalid csr address 2006-06-12 18:15:31 -04:00
csr.c [PATCH] ieee1394: fix calculation of csr->expire 2006-07-03 12:01:59 -04:00
csr.h [PATCH] ieee1394: clean up declarations of hpsb_*_config_rom 2006-07-03 12:02:31 -04:00
dma.c [PATCH] ieee1394: update #include directives in midlayer header files 2006-07-03 12:02:29 -04:00
dma.h [PATCH] ieee1394: update #include directives in midlayer header files 2006-07-03 12:02:29 -04:00
dv1394-private.h [PATCH] ieee1394: dv1394: sem2mutex conversion 2006-07-03 12:02:32 -04:00
dv1394.c [PATCH] ieee1394: dv1394: sem2mutex conversion 2006-07-03 12:02:32 -04:00
dv1394.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
eth1394.c ieee1394: remove #include <asm/semaphore.h> 2006-09-17 19:18:50 +02:00
eth1394.h ieee1394: add preprocessor constant for invalid csr address 2006-06-12 18:15:31 -04:00
highlevel.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
highlevel.h [PATCH] ieee1394: update #include directives in midlayer header files 2006-07-03 12:02:29 -04:00
hosts.c ieee1394: shrink tlabel pools, remove tpool semaphores 2006-09-17 19:17:13 +02:00
hosts.h ieee1394: shrink tlabel pools, remove tpool semaphores 2006-09-17 19:17:13 +02:00
ieee1394_core.c ieee1394: remove #include <asm/semaphore.h> 2006-09-17 19:18:50 +02:00
ieee1394_core.h ieee1394: remove #include <asm/semaphore.h> 2006-09-17 19:18:50 +02:00
ieee1394_hotplug.h [PATCH] ieee1394: remove redundant code from ieee1394_hotplug.h 2006-07-03 12:02:30 -04:00
ieee1394_transactions.c ieee1394: shrink tlabel pools, remove tpool semaphores 2006-09-17 19:17:13 +02:00
ieee1394_transactions.h ieee1394: shrink tlabel pools, remove tpool semaphores 2006-09-17 19:17:13 +02:00
ieee1394_types.h ieee1394: shrink tlabel pools, remove tpool semaphores 2006-09-17 19:17:13 +02:00
ieee1394-ioctl.h [PATCH] ieee1394: coding style and comment fixes in midlayer header files 2006-07-03 12:02:28 -04:00
ieee1394.h [PATCH] ieee1394: coding style and comment fixes in midlayer header files 2006-07-03 12:02:28 -04:00
iso.c [PATCH] ieee1394: update #include directives in midlayer header files 2006-07-03 12:02:29 -04:00
iso.h [PATCH] ieee1394: update #include directives in midlayer header files 2006-07-03 12:02:29 -04:00
Kconfig [PATCH] ieee1394: nodemgr: do not peek into struct semaphore 2006-06-25 10:00:54 -07:00
Makefile Remove amdtp, cmp drivers. 2005-11-18 00:16:26 -05:00
nodemgr.c ieee1394: shrink tlabel pools, remove tpool semaphores 2006-09-17 19:17:13 +02:00
nodemgr.h ieee1394: shrink tlabel pools, remove tpool semaphores 2006-09-17 19:17:13 +02:00
ohci1394.c ieee1394: merge from Linus 2006-09-17 18:19:31 +02:00
ohci1394.h ohci1394: set address range properties 2006-06-12 18:13:32 -04:00
oui2c.sh Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
oui.db Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pcilynx.c [PATCH] irq-flags: firewire: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
pcilynx.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
raw1394-private.h [PATCH] ieee1394: raw1394: remove redundant counting semaphore 2006-07-03 12:02:33 -04:00
raw1394.c [PATCH] ieee1394: raw1394: remove redundant counting semaphore 2006-07-03 12:02:33 -04:00
raw1394.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sbp2.c ieee1394: sbp2: safer initialization of status fifo 2006-09-17 19:29:22 +02:00
sbp2.h ieee1394: sbp2: discard return value of sbp2_link_orb_command 2006-09-17 19:29:01 +02:00
video1394.c [PATCH] ieee1394: update #include directives in midlayer header files 2006-07-03 12:02:29 -04:00
video1394.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00