aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/core-device.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index 57461923bacf..9a262439e3a7 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -955,8 +955,9 @@ static void fw_device_init(struct work_struct *work)
955 device->config_rom_retries++; 955 device->config_rom_retries++;
956 schedule_delayed_work(&device->work, RETRY_DELAY); 956 schedule_delayed_work(&device->work, RETRY_DELAY);
957 } else { 957 } else {
958 fw_notify("giving up on config rom for node id %x\n", 958 if (device->node->link_on)
959 device->node_id); 959 fw_notify("giving up on config rom for node id %x\n",
960 device->node_id);
960 if (device->node == device->card->root_node) 961 if (device->node == device->card->root_node)
961 fw_schedule_bm_work(device->card, 0); 962 fw_schedule_bm_work(device->card, 0);
962 fw_device_release(&device->device); 963 fw_device_release(&device->device);
@@ -1169,9 +1170,12 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
1169 1170
1170 switch (event) { 1171 switch (event) {
1171 case FW_NODE_CREATED: 1172 case FW_NODE_CREATED:
1172 case FW_NODE_LINK_ON: 1173 /*
1173 if (!node->link_on) 1174 * Attempt to scan the node, regardless whether its self ID has
1174 break; 1175 * the L (link active) flag set or not. Some broken devices
1176 * send L=0 but have an up-and-running link; others send L=1
1177 * without actually having a link.
1178 */
1175 create: 1179 create:
1176 device = kzalloc(sizeof(*device), GFP_ATOMIC); 1180 device = kzalloc(sizeof(*device), GFP_ATOMIC);
1177 if (device == NULL) 1181 if (device == NULL)
@@ -1214,6 +1218,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
1214 break; 1218 break;
1215 1219
1216 case FW_NODE_INITIATED_RESET: 1220 case FW_NODE_INITIATED_RESET:
1221 case FW_NODE_LINK_ON:
1217 device = node->data; 1222 device = node->data;
1218 if (device == NULL) 1223 if (device == NULL)
1219 goto create; 1224 goto create;
@@ -1231,10 +1236,10 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
1231 break; 1236 break;
1232 1237
1233 case FW_NODE_UPDATED: 1238 case FW_NODE_UPDATED:
1234 if (!node->link_on || node->data == NULL) 1239 device = node->data;
1240 if (device == NULL)
1235 break; 1241 break;
1236 1242
1237 device = node->data;
1238 device->node_id = node->node_id; 1243 device->node_id = node->node_id;
1239 smp_wmb(); /* update node_id before generation */ 1244 smp_wmb(); /* update node_id before generation */
1240 device->generation = card->generation; 1245 device->generation = card->generation;