From 92368890d551794ee8d7e90477d8498bb7f82a9b Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Wed, 13 May 2009 21:42:14 +0200 Subject: firewire: core: improve check for local node My recently added test for a device being local in fw-cdev.c got it slightly wrong: Comparisons of node IDs are only valid if the generation is current, which I forgot to check. Normally, serialization by card->lock takes care of this, but a device in FW_DEVICE_GONE state will necessarily have a wrong generation and invalid node_id. The "is it local?" check is made 100% correct and simpler now by means of a struct fw_device flag which is set at fw_device creation. Besides the fw-cdev site which was to be fixed, there is another site which can make use of the new flag, and an RFC-2734 driver will benefit from it too. Signed-off-by: Stefan Richter --- drivers/firewire/fw-device.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/firewire/fw-device.h') diff --git a/drivers/firewire/fw-device.h b/drivers/firewire/fw-device.h index 97588937c01..623cfee289b 100644 --- a/drivers/firewire/fw-device.h +++ b/drivers/firewire/fw-device.h @@ -80,6 +80,7 @@ struct fw_device { u32 *config_rom; size_t config_rom_length; int config_rom_retries; + unsigned is_local:1; unsigned cmc:1; unsigned bc_implemented:2; -- cgit v1.2.3-70-g09d2