lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1429576576-1637-3-git-send-email-laurent@vivier.eu>
Date:	Tue, 21 Apr 2015 02:36:16 +0200
From:	Laurent Vivier <laurent@...ier.eu>
To:	Stefan Richter <stefanr@...6.in-berlin.de>
Cc:	linux1394-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, Laurent Vivier <laurent@...ier.eu>
Subject: [PATCH 2/2] firewire: add a parameter to force the speed of the devices.

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@...ier.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ