lkml.org 
[lkml]   [2015]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] firewire: add a parameter to force the speed of the devices.
Date
I was trying to use my old iPod mini firewire (first generation) with
a new firewire card I put in my PC (VIA Technologies, Inc. VT6306/7/8),
but the iPod was not mounted and failed with the following error:
reading config rom failed: no ack
It appears that the configuration rom cannot be read after the
device max speed is set to something else than SCODE_100.

According to the iPod configuration ROM, it should support SCODE_400.

This patch adds a a parameter (force_speed) to the firewire-core module
to be able to set the max speed to use with the firewire devices.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
drivers/firewire/core-device.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index 5245567..a075827 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -44,6 +44,17 @@

#include "core.h"

+static int force_speed = -1;
+module_param_named(force_speed, force_speed, int, 0644);
+MODULE_PARM_DESC(force_speed, "Force device speed (default = -1"
+ ", FW100 = " __stringify(SCODE_100)
+ ", FW200 = " __stringify(SCODE_200)
+ ", FW400 = " __stringify(SCODE_400)
+ ", FW800 = " __stringify(SCODE_800)
+ ", FW1600 = " __stringify(SCODE_1600)
+ ", FW3200 = " __stringify(SCODE_3200)
+ ", FWBETA = " __stringify(SCODE_BETA));
+
void fw_csr_iterator_init(struct fw_csr_iterator *ci, const u32 *p)
{
ci->p = p + 1;
@@ -555,6 +566,8 @@ static int read_config_rom(struct fw_device *device, int generation)
}

device->max_speed = device->node->max_speed;
+ if (force_speed != -1)
+ device->max_speed = force_speed & 0xf;

/*
* Determine the speed of
--
1.9.1


\
 
 \ /
  Last update: 2015-04-21 02:41    [W:0.068 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site