Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753384AbbDUAgq (ORCPT ); Mon, 20 Apr 2015 20:36:46 -0400 Received: from smtpfb1-g21.free.fr ([212.27.42.9]:56095 "EHLO smtpfb1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781AbbDUAgk (ORCPT ); Mon, 20 Apr 2015 20:36:40 -0400 From: Laurent Vivier To: Stefan Richter Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Laurent Vivier Subject: [PATCH 2/2] firewire: add a parameter to force the speed of the devices. Date: Tue, 21 Apr 2015 02:36:16 +0200 Message-Id: <1429576576-1637-3-git-send-email-laurent@vivier.eu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1429576576-1637-1-git-send-email-laurent@vivier.eu> References: <1429576576-1637-1-git-send-email-laurent@vivier.eu> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1960 Lines: 56 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/