aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/fw-device.c')
-rw-r--r--drivers/firewire/fw-device.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c
index c04c28800f1d..2ab13e0f3469 100644
--- a/drivers/firewire/fw-device.c
+++ b/drivers/firewire/fw-device.c
@@ -358,12 +358,9 @@ static ssize_t
358guid_show(struct device *dev, struct device_attribute *attr, char *buf) 358guid_show(struct device *dev, struct device_attribute *attr, char *buf)
359{ 359{
360 struct fw_device *device = fw_device(dev); 360 struct fw_device *device = fw_device(dev);
361 u64 guid;
362 361
363 guid = ((u64)device->config_rom[3] << 32) | device->config_rom[4]; 362 return snprintf(buf, PAGE_SIZE, "0x%08x%08x\n",
364 363 device->config_rom[3], device->config_rom[4]);
365 return snprintf(buf, PAGE_SIZE, "0x%016llx\n",
366 (unsigned long long)guid);
367} 364}
368 365
369static struct device_attribute fw_device_attributes[] = { 366static struct device_attribute fw_device_attributes[] = {
@@ -723,13 +720,22 @@ static void fw_device_init(struct work_struct *work)
723 */ 720 */
724 if (atomic_cmpxchg(&device->state, 721 if (atomic_cmpxchg(&device->state,
725 FW_DEVICE_INITIALIZING, 722 FW_DEVICE_INITIALIZING,
726 FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN) 723 FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN) {
727 fw_device_shutdown(&device->work.work); 724 fw_device_shutdown(&device->work.work);
728 else 725 } else {
729 fw_notify("created new fw device %s " 726 if (device->config_rom_retries)
730 "(%d config rom retries, S%d00)\n", 727 fw_notify("created device %s: GUID %08x%08x, S%d00, "
731 device->device.bus_id, device->config_rom_retries, 728 "%d config ROM retries\n",
732 1 << device->max_speed); 729 device->device.bus_id,
730 device->config_rom[3], device->config_rom[4],
731 1 << device->max_speed,
732 device->config_rom_retries);
733 else
734 fw_notify("created device %s: GUID %08x%08x, S%d00\n",
735 device->device.bus_id,
736 device->config_rom[3], device->config_rom[4],
737 1 << device->max_speed);
738 }
733 739
734 /* 740 /*
735 * Reschedule the IRM work if we just finished reading the 741 * Reschedule the IRM work if we just finished reading the