firewire: core: optimize card shutdown

This fixes a regression by "firewire: keep highlevel drivers attached
during brief connection loss": There were 2 seconds unnecessary waiting
added to the shutdown procedure of each controller.

We use card->link as status flag to signal the device handler that there
is no use to wait for a come-back.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

+5 -3
+1 -1
drivers/firewire/fw-card.c
··· 512 512 fw_core_initiate_bus_reset(card, 1); 513 513 514 514 mutex_lock(&card_mutex); 515 - list_del(&card->link); 515 + list_del_init(&card->link); 516 516 mutex_unlock(&card_mutex); 517 517 518 518 /* Set up the dummy driver. */
+4 -2
drivers/firewire/fw-device.c
··· 657 657 container_of(work, struct fw_device, work.work); 658 658 int minor = MINOR(device->device.devt); 659 659 660 - if (time_is_after_jiffies(device->card->reset_jiffies + SHUTDOWN_DELAY)) { 660 + if (time_is_after_jiffies(device->card->reset_jiffies + SHUTDOWN_DELAY) 661 + && !list_empty(&device->card->link)) { 661 662 schedule_delayed_work(&device->work, SHUTDOWN_DELAY); 662 663 return; 663 664 } ··· 1075 1074 if (atomic_xchg(&device->state, 1076 1075 FW_DEVICE_GONE) == FW_DEVICE_RUNNING) { 1077 1076 PREPARE_DELAYED_WORK(&device->work, fw_device_shutdown); 1078 - schedule_delayed_work(&device->work, SHUTDOWN_DELAY); 1077 + schedule_delayed_work(&device->work, 1078 + list_empty(&card->link) ? 0 : SHUTDOWN_DELAY); 1079 1079 } 1080 1080 break; 1081 1081 }