rpms/kernel/devel kernel.spec, 1.502, 1.503 linux-2.6-firewire-git-pending.patch, 1.17, 1.18 linux-2.6-firewire-git-update.patch, 1.9, 1.10
Jarod Wilson (jwilson)
fedora-extras-commits at redhat.com
Fri Mar 14 18:16:08 UTC 2008
- Previous message (by thread): rpms/glibc/devel .cvsignore, 1.232, 1.233 glibc-fedora.patch, 1.258, 1.259 glibc.spec, 1.345, 1.346 sources, 1.257, 1.258
- Next message (by thread): rpms/doxygen/devel doxygen.spec,1.50,1.51
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jwilson
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7430
Modified Files:
kernel.spec linux-2.6-firewire-git-pending.patch
linux-2.6-firewire-git-update.patch
Log Message:
* Fri Mar 14 2008 Jarod Wilson <jwilson at redhat.com>
- Resync firewire patches w/linux1394-2.6.git
- Update firewire selfID/AT/AR debug patch to version
that can be enabled via module options
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.502
retrieving revision 1.503
diff -u -r1.502 -r1.503
--- kernel.spec 14 Mar 2008 15:04:02 -0000 1.502
+++ kernel.spec 14 Mar 2008 18:15:31 -0000 1.503
@@ -1756,6 +1756,11 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
%changelog
+* Fri Mar 14 2008 Jarod Wilson <jwilson at redhat.com>
+- Resync firewire patches w/linux1394-2.6.git
+- Update firewire selfID/AT/AR debug patch to version
+ that can be enabled via module options
+
* Fri Mar 14 2008 Adam Jackson <ajax at redhat.com>
- usb: additional quirk for Microsoft wireless receiver
linux-2.6-firewire-git-pending.patch:
Index: linux-2.6-firewire-git-pending.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-firewire-git-pending.patch,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- linux-2.6-firewire-git-pending.patch 13 Mar 2008 01:17:17 -0000 1.17
+++ linux-2.6-firewire-git-pending.patch 14 Mar 2008 18:15:31 -0000 1.18
@@ -21,7 +21,7 @@
*/
#define SBP2_MIN_LOGIN_ORB_TIMEOUT 5000U /* Timeout in ms */
#define SBP2_MAX_LOGIN_ORB_TIMEOUT 40000U /* Timeout in ms */
-+#define SBP2_MAX_RECONNECT_ORB_TIMEOUT 6000U /* Timeout in ms */
++#define SBP2_MAX_RECONNECT_ORB_TIMEOUT 10000U /* Timeout in ms */
#define SBP2_ORB_TIMEOUT 2000U /* Timeout in ms */
#define SBP2_ORB_NULL 0x80000000
#define SBP2_MAX_SG_ELEMENT_LENGTH 0xf000
@@ -55,218 +55,6 @@
-Use bitwise and to get reg in handle_registers.
-
-Signed-off-by: Jarod Wilson <jwilson at redhat.com>
-
----
-
- drivers/firewire/fw-transaction.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c
-index 56f7ee9..e550535 100644
---- a/drivers/firewire/fw-transaction.c
-+++ b/drivers/firewire/fw-transaction.c
-@@ -791,7 +791,7 @@ handle_registers(struct fw_card *card, struct fw_request *request,
- unsigned long long offset,
- void *payload, size_t length, void *callback_data)
- {
-- int reg = offset - CSR_REGISTER_BASE;
-+ int reg = offset & ~CSR_REGISTER_BASE;
- unsigned long long bus_time;
- __be32 *data = payload;
-
-
-
-Trivial change to replace more meaningless (to the untrained eye) hex
-values with defined CSR constants.
-
-Signed-off-by: Jarod Wilson <jwilson at redhat.com>
-
----
-
- drivers/firewire/fw-device.c | 2 +-
- drivers/firewire/fw-transaction.c | 9 ++++++---
- 2 files changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c
-index 19f2fc4..f559c63 100644
---- a/drivers/firewire/fw-device.c
-+++ b/drivers/firewire/fw-device.c
-@@ -410,7 +410,7 @@ read_rom(struct fw_device *device, int generation, int index, u32 *data)
-
- init_completion(&callback_data.done);
-
-- offset = 0xfffff0000400ULL + index * 4;
-+ offset = (CSR_REGISTER_BASE | CSR_CONFIG_ROM) + index * 4;
- fw_send_request(device->card, &t, TCODE_READ_QUADLET_REQUEST,
- device->node_id, generation, device->max_speed,
- offset, NULL, 4, complete_transaction, &callback_data);
-diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c
-index 99529e5..56f7ee9 100644
---- a/drivers/firewire/fw-transaction.c
-+++ b/drivers/firewire/fw-transaction.c
-@@ -396,7 +396,8 @@ const struct fw_address_region fw_high_memory_region =
- const struct fw_address_region fw_private_region =
- { .start = 0xffffe0000000ULL, .end = 0xfffff0000000ULL, };
- const struct fw_address_region fw_csr_region =
-- { .start = 0xfffff0000000ULL, .end = 0xfffff0000800ULL, };
-+ { .start = CSR_REGISTER_BASE,
-+ .end = CSR_REGISTER_BASE | CSR_CONFIG_ROM_END, };
- const struct fw_address_region fw_unit_space_region =
- { .start = 0xfffff0000900ULL, .end = 0x1000000000000ULL, };
- EXPORT_SYMBOL(fw_low_memory_region);
-@@ -741,7 +742,8 @@ fw_core_handle_response(struct fw_card *card, struct fw_packet *p)
- EXPORT_SYMBOL(fw_core_handle_response);
-
- static const struct fw_address_region topology_map_region =
-- { .start = 0xfffff0001000ull, .end = 0xfffff0001400ull, };
-+ { .start = CSR_REGISTER_BASE | CSR_TOPOLOGY_MAP,
-+ .end = CSR_REGISTER_BASE | CSR_TOPOLOGY_MAP_END, };
-
- static void
- handle_topology_map(struct fw_card *card, struct fw_request *request,
-@@ -779,7 +781,8 @@ static struct fw_address_handler topology_map = {
- };
-
- static const struct fw_address_region registers_region =
-- { .start = 0xfffff0000000ull, .end = 0xfffff0000400ull, };
-+ { .start = CSR_REGISTER_BASE,
-+ .end = CSR_REGISTER_BASE | CSR_CONFIG_ROM, };
-
- static void
- handle_registers(struct fw_card *card, struct fw_request *request,
-
-
-
-If this ever happens to anybody, we want to have it in his log.
-
-Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
----
- drivers/firewire/fw-topology.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-Index: linux/drivers/firewire/fw-topology.c
-===================================================================
---- linux.orig/drivers/firewire/fw-topology.c
-+++ linux/drivers/firewire/fw-topology.c
-@@ -21,6 +21,7 @@
- #include <linux/module.h>
- #include <linux/wait.h>
- #include <linux/errno.h>
-+#include <asm/bug.h>
- #include <asm/system.h>
- #include "fw-transaction.h"
- #include "fw-topology.h"
-@@ -425,8 +426,8 @@ update_tree(struct fw_card *card, struct
- node1 = fw_node(list1.next);
-
- while (&node0->link != &list0) {
-+ WARN_ON(node0->port_count != node1->port_count);
-
-- /* assert(node0->port_count == node1->port_count); */
- if (node0->link_on && !node1->link_on)
- event = FW_NODE_LINK_OFF;
- else if (!node0->link_on && node1->link_on)
-
---
-Stefan Richter
--=====-==--- --== -=---
-http://arcgraph.de/sr/
-
-
-Remove some less necessary information, point out that video1394 and
-dv1394 should be blacklisted along with ohci1394.
-
-Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
----
- drivers/firewire/Kconfig | 50 ++++++++++++++-------------------------
- 1 file changed, 19 insertions(+), 31 deletions(-)
-
-Index: linux/drivers/firewire/Kconfig
-===================================================================
---- linux.orig/drivers/firewire/Kconfig
-+++ linux/drivers/firewire/Kconfig
-@@ -1,5 +1,3 @@
--# -*- shell-script -*-
--
- comment "An alternative FireWire stack is available with EXPERIMENTAL=y"
- depends on EXPERIMENTAL=n
-
-@@ -21,27 +19,7 @@ config FIREWIRE
- NOTE:
-
- You should only build ONE of the stacks, unless you REALLY know what
-- you are doing. If you install both, you should configure them only as
-- modules rather than link them statically, and you should blacklist one
-- of the concurrent low-level drivers in /etc/modprobe.conf. Add either
--
-- blacklist firewire-ohci
-- or
-- blacklist ohci1394
--
-- there depending on which driver you DON'T want to have auto-loaded.
-- You can optionally do the same with the other IEEE 1394/ FireWire
-- drivers.
--
-- If you have an old modprobe which doesn't implement the blacklist
-- directive, use either
--
-- install firewire-ohci /bin/true
-- or
-- install ohci1394 /bin/true
--
-- and so on, depending on which modules you DON't want to have
-- auto-loaded.
-+ you are doing.
-
- config FIREWIRE_OHCI
- tristate "Support for OHCI FireWire host controllers"
-@@ -57,8 +35,24 @@ config FIREWIRE_OHCI
-
- NOTE:
-
-- If you also build ohci1394 of the classic stack, blacklist either
-- ohci1394 or firewire-ohci to let hotplug load only the desired driver.
-+ You should only build ohci1394 or firewire-ohci, but not both.
-+ If you nevertheless want to install both, you should configure them
-+ only as modules and blacklist the driver(s) which you don't want to
-+ have auto-loaded. Add either
-+
-+ blacklist firewire-ohci
-+ or
-+ blacklist ohci1394
-+ blacklist video1394
-+ blacklist dv1394
-+
-+ to /etc/modprobe.conf or /etc/modprobe.d/* and update modprobe.conf
-+ depending on your distribution. The latter two modules should be
-+ blacklisted together with ohci1394 because they depend on ohci1394.
-+
-+ If you have an old modprobe which doesn't implement the blacklist
-+ directive, use "install modulename /bin/true" for the modules to be
-+ blacklisted.
-
- config FIREWIRE_SBP2
- tristate "Support for storage devices (SBP-2 protocol driver)"
-@@ -75,9 +69,3 @@ config FIREWIRE_SBP2
-
- You should also enable support for disks, CD-ROMs, etc. in the SCSI
- configuration section.
--
-- NOTE:
--
-- If you also build sbp2 of the classic stack, blacklist either sbp2
-- or firewire-sbp2 to let hotplug load only the desired driver.
--
-
---
-Stefan Richter
--=====-==--- --== -=--=
-http://arcgraph.de/sr/
-
-
Adds a goofy routine to dump the configuration ROM as far as it could be
read, if fw-core failed to get it all.
@@ -605,149 +393,202 @@
http://arcgraph.de/sr/
+
+Date: Mon, 10 Mar 2008 23:28:07 +0100 (CET)
+From: Stefan Richter <stefanr at s5r6.in-berlin.de>
+Subject: [PATCH update] firewire: debug AT, AR, and selfID-complete events
+To: Jarod Wilson <jwilson at redhat.com>
+cc: linux1394-devel at lists.sourceforge.net,
+ linux-kernel at vger.kernel.org
+
+On 10 Mar, Jarod Wilson wrote:
+> My vote would be to include this sort of thing with a run-time option to
+> enable the extra spew, since its a perfectly accepted standard for other
+> drivers. It ought to be extremely useful in determining whats going wrong
+> with end-user setups, particularly in cases where we can't reproduce the
+> problem (typically for lack of having the specific hardware in-house).
+
+
+From: Stefan Richter <stefanr at s5r6.in-berlin.de>
+Subject: firewire: debug AT, AR, and selfID-complete events
+
This adds debug printks for asynchronous transmission and reception and
-for self ID reception. The debug code is per default deactivated by #if
-blocks.
+for self ID reception. They can be enabled at module load time, and at
+runtime via /sys/module/firewire_ohci/parameters/debug.
+
+This code inflates firewire-ohci.ko by 6 kB = 24% on x86-64 and
+by 4 kB = 20% on i686.
Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
+Signed-off-by: Jarod Wilson <jwilson at redhat.com>
---
-I am undecided whether this is OK for mainline, and whether the debug
-options should become a Kconfig option or runtime options.
-
-It may be temporarily useful to the few driver developers. Do we want
-end users to provide us with debug logs of this kind? Then it should
-be one or two runtime options.
-
+Update: Converted into runtime option, shortened some strings, added
+payload dump of quadlet transactions and of selfID generation.
- drivers/firewire/fw-ohci.c | 113 +++++++++++++++++++++++++++++++++++++
- 1 file changed, 113 insertions(+)
+ drivers/firewire/fw-ohci.c | 139 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 139 insertions(+)
Index: linux/drivers/firewire/fw-ohci.c
===================================================================
--- linux.orig/drivers/firewire/fw-ohci.c
+++ linux/drivers/firewire/fw-ohci.c
-@@ -40,6 +40,9 @@
+@@ -27,6 +27,7 @@
+ #include <linux/kernel.h>
+ #include <linux/mm.h>
+ #include <linux/module.h>
++#include <linux/moduleparam.h>
+ #include <linux/pci.h>
+ #include <linux/spinlock.h>
+
+@@ -40,6 +41,16 @@
#include "fw-ohci.h"
#include "fw-transaction.h"
-+#define FIREWIRE_OHCI_DEBUG_AT_AR 0
-+#define FIREWIRE_OHCI_DEBUG_SELFIDS 0
++#define OHCI_PARAM_DEBUG_SELFIDS 1
++#define OHCI_PARAM_DEBUG_AT_AR 2
++
++static int param_debug;
++module_param_named(debug, param_debug, int, 0644);
++MODULE_PARM_DESC(debug, "Verbose logging (default = 0"
++ ", self-IDs = " __stringify(OHCI_PARAM_DEBUG_SELFIDS)
++ ", AT and AR events = " __stringify(OHCI_PARAM_DEBUG_AT_AR)
++ ", or a combination)");
+
#define DESCRIPTOR_OUTPUT_MORE 0
#define DESCRIPTOR_OUTPUT_LAST (1 << 12)
#define DESCRIPTOR_INPUT_MORE (2 << 12)
-@@ -316,6 +319,71 @@ static int ar_context_add_page(struct ar
+@@ -316,6 +327,88 @@ static int ar_context_add_page(struct ar
return 0;
}
-+#if FIREWIRE_OHCI_DEBUG_AT_AR
++static const char *evts[] = {
++ [0x00] = "evt_no_status", [0x01] = "-reserved-",
++ [0x02] = "evt_long_packet", [0x03] = "evt_missing_ack",
++ [0x04] = "evt_underrun", [0x05] = "evt_overrun",
++ [0x06] = "evt_descriptor_read", [0x07] = "evt_data_read",
++ [0x08] = "evt_data_write", [0x09] = "evt_bus_reset",
++ [0x0a] = "evt_timeout", [0x0b] = "evt_tcode_err",
++ [0x0c] = "-reserved-", [0x0d] = "-reserved-",
++ [0x0e] = "evt_unknown", [0x0f] = "evt_flushed",
++ [0x10] = "-reserved-", [0x11] = "ack_complete",
++ [0x12] = "ack_pending ", [0x13] = "-reserved-",
++ [0x14] = "ack_busy_X", [0x15] = "ack_busy_A",
++ [0x16] = "ack_busy_B", [0x17] = "-reserved-",
++ [0x18] = "-reserved-", [0x19] = "-reserved-",
++ [0x1a] = "-reserved-", [0x1b] = "ack_tardy",
++ [0x1c] = "-reserved-", [0x1d] = "ack_data_error",
++ [0x1e] = "ack_type_error", [0x1f] = "-reserved-",
++};
++static const char *tcodes[] = {
++ [0x0] = "QW req", [0x1] = "BW req",
++ [0x2] = "W resp", [0x3] = "-reserved-",
++ [0x4] = "QR req", [0x5] = "BR req",
++ [0x6] = "QR resp", [0x7] = "BR resp",
++ [0x8] = "cycle start", [0x9] = "Lk req",
++ [0xa] = "async stream packet", [0xb] = "Lk resp",
++ [0xc] = "-reserved-", [0xd] = "-reserved-",
++ [0xe] = "link internal", [0xf] = "-reserved-",
++};
++static const char *phys[] = {
++ [0x0] = "phy config packet", [0x1] = "link-on packet",
++ [0x2] = "self-id packet", [0x3] = "-reserved-",
++};
++
+static void debug_ar_at_event(char dir, int speed, u32 *header, int evt)
+{
-+ static const char *evts[] = {
-+ [0x00] = "evt_no_status", [0x01] = "-reserved-",
-+ [0x02] = "evt_long_packet", [0x03] = "evt_missing_ack",
-+ [0x04] = "evt_underrun", [0x05] = "evt_overrun",
-+ [0x06] = "evt_descriptor_read", [0x07] = "evt_data_read",
-+ [0x08] = "evt_data_write", [0x09] = "evt_bus_reset",
-+ [0x0a] = "evt_timeout", [0x0b] = "evt_tcode_err",
-+ [0x0c] = "-reserved-", [0x0d] = "-reserved-",
-+ [0x0e] = "evt_unknown", [0x0f] = "evt_flushed",
-+ [0x10] = "-reserved-", [0x11] = "ack_complete",
-+ [0x12] = "ack_pending ", [0x13] = "-reserved-",
-+ [0x14] = "ack_busy_X", [0x15] = "ack_busy_A",
-+ [0x16] = "ack_busy_B", [0x17] = "-reserved-",
-+ [0x18] = "-reserved-", [0x19] = "-reserved-",
-+ [0x1a] = "-reserved-", [0x1b] = "ack_tardy",
-+ [0x1c] = "-reserved-", [0x1d] = "ack_data_error",
-+ [0x1e] = "ack_type_error", [0x1f] = "-reserved-",
-+ };
-+ static const char *tcodes[] = {
-+ [0x0] = "quadlet write request", [0x1] = "block write request",
-+ [0x2] = "write response", [0x3] = "-reserved-",
-+ [0x4] = "quadlet read request", [0x5] = "block read request",
-+ [0x6] = "quadlet read response", [0x7] = "block read response",
-+ [0x8] = "cycle start", [0x9] = "lock request",
-+ [0xa] = "async stream packet", [0xb] = "lock response",
-+ [0xc] = "-reserved-", [0xd] = "-reserved-",
-+ [0xe] = "link internal", [0xf] = "reserved",
-+ };
-+ static const char *phys[] = {
-+ [0x0] = "phy config packet", [0x1] = "link-on packet",
-+ [0x2] = "self-id packet", [0x3] = "-reserved-",
-+ };
+ int tcode = header[0] >> 4 & 0xf;
++ char specific[12];
+
+ evt &= 0x1f;
-+ if (header[0] == ~header[1])
-+ printk(KERN_DEBUG "A%c evt %02x: %s, %s, %08x\n",
-+ dir, evt, evts[evt], phys[header[0] >> 30 & 0x3],
++ if (header[0] == ~header[1]) {
++ printk(KERN_DEBUG "A%c %s, %s, %08x\n",
++ dir, evts[evt], phys[header[0] >> 30 & 0x3],
+ header[0]);
-+ else if (tcode == 0xe)
-+ printk(KERN_DEBUG "A%c evt %02x: %s, %s\n",
-+ dir, evt, evts[evt], tcodes[tcode]);
-+ else if (tcode == 0x0 || tcode == 0x1 ||
-+ tcode == 0x4 || tcode == 0x5 || tcode == 0x9)
-+ printk(KERN_DEBUG "A%c evt %02x: tcode %x spd %x tl %02x "
-+ "src %04x dest %04x: "
-+ "%s, %s, %04x%08x\n",
-+ dir, evt, tcode, speed, header[0] >> 10 & 0x3f,
-+ header[1] >> 16, header[0] >> 16,
-+ evts[evt], tcodes[tcode], header[1] & 0xffff, header[2]);
-+ else
-+ printk(KERN_DEBUG "A%c evt %02x: tcode %x spd %x tl %02x "
-+ "src %04x dest %04x: "
-+ "%s, %s\n",
-+ dir, evt, tcode, speed, header[0] >> 10 & 0x3f,
-+ header[1] >> 16, header[0] >> 16,
-+ evts[evt], tcodes[tcode]);
++ return;
++ }
++
++ switch (tcode) {
++ case 0x0: case 0x6: case 0x8:
++ snprintf(specific, sizeof(specific), " = %08x",
++ be32_to_cpu((__force __be32)header[3]));
++ break;
++ case 0x1: case 0x5: case 0x7: case 0x9: case 0xb:
++ snprintf(specific, sizeof(specific), " %x,%x",
++ header[3] >> 16, header[3] & 0xffff);
++ break;
++ default:
++ specific[0] = '\0';
++ }
++
++ switch (tcode) {
++ case 0xe: case 0xa:
++ printk(KERN_DEBUG "A%c %s, %s\n",
++ dir, evts[evt], tcodes[tcode]);
++ break;
++ case 0x0: case 0x1: case 0x4: case 0x5: case 0x9:
++ printk(KERN_DEBUG "A%c spd %x tl %02x, "
++ "%04x -> %04x, %s, "
++ "%s, %04x%08x%s\n",
++ dir, speed, header[0] >> 10 & 0x3f,
++ header[1] >> 16, header[0] >> 16, evts[evt],
++ tcodes[tcode], header[1] & 0xffff, header[2], specific);
++ break;
++ default:
++ printk(KERN_DEBUG "A%c spd %x tl %02x, "
++ "%04x -> %04x, %s, "
++ "%s%s\n",
++ dir, speed, header[0] >> 10 & 0x3f,
++ header[1] >> 16, header[0] >> 16, evts[evt],
++ tcodes[tcode], specific);
++ }
+}
-+#else
-+#define debug_ar_at_event(dir, speed, header, evt)
-+#endif /* FIREWIRE_OHCI_DEBUG_AT_AR */
+
#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
#define cond_le32_to_cpu(v) \
(ohci->old_uninorth ? (__force __u32)(v) : le32_to_cpu(v))
-@@ -376,6 +444,8 @@ static __le32 *handle_ar_packet(struct a
+@@ -376,6 +469,9 @@ static __le32 *handle_ar_packet(struct a
p.timestamp = status & 0xffff;
p.generation = ohci->request_generation;
-+ debug_ar_at_event('R', p.speed, p.header, status >> 16 & 0x1f);
++ if (unlikely(param_debug & OHCI_PARAM_DEBUG_AT_AR))
++ debug_ar_at_event('R', p.speed, p.header, status >> 16 & 0x1f);
+
/*
* The OHCI bus reset handler synthesizes a phy packet with
* the new generation number when a bus reset happens (see
-@@ -824,6 +894,8 @@ static int handle_at_packet(struct conte
+@@ -824,6 +920,9 @@ static int handle_at_packet(struct conte
evt = le16_to_cpu(last->transfer_status) & 0x1f;
packet->timestamp = le16_to_cpu(last->res_count);
-+ debug_ar_at_event('T', packet->speed, packet->header, evt);
++ if (unlikely(param_debug & OHCI_PARAM_DEBUG_AT_AR))
++ debug_ar_at_event('T', packet->speed, packet->header, evt);
+
switch (evt) {
case OHCI1394_evt_timeout:
/* Async response transmit timed out. */
-@@ -1005,6 +1077,45 @@ at_context_transmit(struct context *ctx,
+@@ -1005,6 +1104,43 @@ at_context_transmit(struct context *ctx,
}
-+#if FIREWIRE_OHCI_DEBUG_SELFIDS
++static const char *speed[] = {
++ [0] = "S100", [1] = "S200", [2] = "S400", [3] = "beta",
++};
++static const char *power[] = {
++ [0] = "+0W", [1] = "+15W", [2] = "+30W", [3] = "+45W",
++ [4] = "-3W", [5] = " ?W", [6] = "-3..-6W", [7] = "-3..-10W",
++};
++static const char port[] = { '.', '-', 'p', 'c', };
++
+static char _p(u32 *s, int shift)
+{
-+ static const char port_connected[] = { '.', '-', 'p', 'c', };
-+
-+ return port_connected[*s >> shift & 3];
++ return port[*s >> shift & 3];
+}
+
-+static void debug_selfid_complete_event(int self_id_count, u32 *s)
++static void debug_selfids(int generation, int self_id_count, u32 *s)
+{
-+ static const char *speed[] = {
-+ [0] = "S100", [1] = "S200", [2] = "S400", [3] = "beta",
-+ };
-+ static const char *power[] = {
-+ [0] = "+0W", [1] = "+15W", [2] = "+30W", [3] = "+45W",
-+ [4] = "-3W", [5] = " ?W", [6] = "-3..-6W", [7] = "-3..-10W",
-+ };
++ printk(KERN_DEBUG KBUILD_MODNAME ": %d selfIDs, generation %d\n",
++ self_id_count, generation);
+
+ for (; self_id_count--; ++s)
+ if ((*s & 1 << 23) == 0)
@@ -766,138 +607,26 @@
+ _p(s, 8), _p(s, 6), _p(s, 4), _p(s, 2),
+ *s & 1 ? "..." : "");
+}
-+#else
-+#define debug_selfid_complete_event(self_id_count, s)
-+#endif /* FIREWIRE_OHCI_DEBUG_SELFIDS */
+
static void bus_reset_tasklet(unsigned long data)
{
struct fw_ohci *ohci = (struct fw_ohci *)data;
-@@ -1115,6 +1226,8 @@ static void bus_reset_tasklet(unsigned l
+@@ -1115,6 +1251,9 @@ static void bus_reset_tasklet(unsigned l
dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
free_rom, free_rom_bus);
-+ debug_selfid_complete_event(self_id_count, ohci->self_id_buffer);
++ if (unlikely(param_debug & OHCI_PARAM_DEBUG_SELFIDS))
++ debug_selfids(generation, self_id_count, ohci->self_id_buffer);
+
fw_core_handle_bus_reset(&ohci->card, ohci->node_id, generation,
self_id_count, ohci->self_id_buffer);
}
+
--
Stefan Richter
--=====-==--- --== -=--=
+-=====-==--- --== -=-=-
http://arcgraph.de/sr/
-Currently, we do nothing to guarantee we have a consistent DMA buffer for
-asynchronous receive packets. Rather than doing several sync's following a
-dma_map_single() to get consistent buffers, just switch to using
-dma_alloc_coherent().
-
-Resolves constant buffer failures on my own x86_64 laptop w/4GB of RAM and
-likely to fix a number of other failures witnessed on x86_64 systems with
-4GB of RAM or more.
-Signed-off-by: Jarod Wilson <jwilson at redhat.com>
-
----
-
- drivers/firewire/fw-ohci.c | 18 +++++-------------
- 1 files changed, 5 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
-index 28ea78c..081a434 100644
---- a/drivers/firewire/fw-ohci.c
-+++ b/drivers/firewire/fw-ohci.c
-@@ -284,16 +284,10 @@ static int ar_context_add_page(struct ar_context *ctx)
- dma_addr_t ab_bus;
- size_t offset;
-
-- ab = (struct ar_buffer *) __get_free_page(GFP_ATOMIC);
-+ ab = dma_alloc_coherent(dev, PAGE_SIZE, &ab_bus, GFP_ATOMIC);
- if (ab == NULL)
- return -ENOMEM;
-
-- ab_bus = dma_map_single(dev, ab, PAGE_SIZE, DMA_BIDIRECTIONAL);
-- if (dma_mapping_error(ab_bus)) {
-- free_page((unsigned long) ab);
-- return -ENOMEM;
-- }
--
- memset(&ab->descriptor, 0, sizeof(ab->descriptor));
- ab->descriptor.control = cpu_to_le16(DESCRIPTOR_INPUT_MORE |
- DESCRIPTOR_STATUS |
-@@ -304,8 +298,6 @@ static int ar_context_add_page(struct ar_context *ctx)
- ab->descriptor.res_count = cpu_to_le16(PAGE_SIZE - offset);
- ab->descriptor.branch_address = 0;
-
-- dma_sync_single_for_device(dev, ab_bus, PAGE_SIZE, DMA_BIDIRECTIONAL);
--
- ctx->last_buffer->descriptor.branch_address = cpu_to_le32(ab_bus | 1);
- ctx->last_buffer->next = ab;
- ctx->last_buffer = ab;
-@@ -409,6 +401,7 @@ static void ar_context_tasklet(unsigned long data)
-
- if (d->res_count == 0) {
- size_t size, rest, offset;
-+ dma_addr_t buffer_bus;
-
- /*
- * This descriptor is finished and we may have a
-@@ -417,9 +410,7 @@ static void ar_context_tasklet(unsigned long data)
- */
-
- offset = offsetof(struct ar_buffer, data);
-- dma_unmap_single(ohci->card.device,
-- le32_to_cpu(ab->descriptor.data_address) - offset,
-- PAGE_SIZE, DMA_BIDIRECTIONAL);
-+ buffer_bus = le32_to_cpu(ab->descriptor.data_address) - offset;
-
- buffer = ab;
- ab = ab->next;
-@@ -435,7 +426,8 @@ static void ar_context_tasklet(unsigned long data)
- while (buffer < end)
- buffer = handle_ar_packet(ctx, buffer);
-
-- free_page((unsigned long)buffer);
-+ dma_free_coherent(ohci->card.device, PAGE_SIZE,
-+ buffer, buffer_bus);
- ar_context_add_page(ctx);
- } else {
- buffer = ctx->pointer;
-
-
-
-Per DMA API docs, when using dma_map_single(), DMA_TO_DEVICE synchronization
-must be done after the last modification of the memory region by software
-before it can be handed off to the device and safely read. Such a sync is
-currently missing from firewire_ohci:at_context_queue_packet().
-
-At least on my setup, where I could within seconds reliably reproduce a panic
-in handle_at_packet() by simply dd'ing from two drives on different controllers,
-the panic is gone.
-
-See http://bugzilla.kernel.org/show_bug.cgi?id=9617
-
-Signed-off-by: Jarod Wilson <jwilson at redhat.com>
-
----
-
- drivers/firewire/fw-ohci.c | 4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
-index 081a434..c60abb8 100644
---- a/drivers/firewire/fw-ohci.c
-+++ b/drivers/firewire/fw-ohci.c
-@@ -778,6 +778,10 @@ at_context_queue_packet(struct context *ctx, struct fw_packet *packet)
- return -1;
- }
-
-+ /* Sync the DMA buffer up for the device to read from */
-+ dma_sync_single_for_device(ohci->card.device, payload_bus,
-+ packet->payload_length, DMA_TO_DEVICE);
-+
- context_append(ctx, d, z, 4 - z);
-
- /* If the context isn't already running, start it up. */
linux-2.6-firewire-git-update.patch:
Index: linux-2.6-firewire-git-update.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-firewire-git-update.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- linux-2.6-firewire-git-update.patch 10 Mar 2008 14:09:35 -0000 1.9
+++ linux-2.6-firewire-git-update.patch 14 Mar 2008 18:15:31 -0000 1.10
@@ -1,14 +1,17 @@
+git diff in linux1394-2.6.git vs. v2.6.25-rc5 as of 04.14.2008
+
Documentation/debugging-via-ohci1394.txt | 13 +-
+ drivers/firewire/Kconfig | 50 ++----
drivers/firewire/fw-card.c | 40 +-----
- drivers/firewire/fw-cdev.c | 13 ++-
- drivers/firewire/fw-device.c | 261 ++++++++++++++++++++++++------
- drivers/firewire/fw-device.h | 38 ++++--
- drivers/firewire/fw-ohci.c | 114 ++++++++++---
- drivers/firewire/fw-sbp2.c | 175 +++++++++++---------
- drivers/firewire/fw-topology.c | 3 +
+ drivers/firewire/fw-cdev.c | 13 +-
+ drivers/firewire/fw-device.c | 263 ++++++++++++++++++++++++------
+ drivers/firewire/fw-device.h | 38 +++-
+ drivers/firewire/fw-ohci.c | 136 +++++++++++-----
+ drivers/firewire/fw-sbp2.c | 180 +++++++++++---------
+ drivers/firewire/fw-topology.c | 6 +-
drivers/firewire/fw-topology.h | 11 +-
- drivers/firewire/fw-transaction.c | 2 +-
- drivers/firewire/fw-transaction.h | 10 +-
+ drivers/firewire/fw-transaction.c | 13 +-
+ drivers/firewire/fw-transaction.h | 12 +-
drivers/ieee1394/csr.c | 6 +-
drivers/ieee1394/dv1394.c | 3 +-
drivers/ieee1394/highlevel.c | 6 +-
@@ -17,10 +20,10 @@
drivers/ieee1394/ohci1394.c | 111 ++++++-------
drivers/ieee1394/pcilynx.c | 12 +-
drivers/ieee1394/raw1394.c | 1 -
- drivers/ieee1394/sbp2.c | 11 +-
+ drivers/ieee1394/sbp2.c | 16 +-
drivers/ieee1394/video1394.c | 3 +-
- lib/Kconfig.debug | 10 ++
- 22 files changed, 538 insertions(+), 313 deletions(-)
+ lib/Kconfig.debug | 10 +
+ 23 files changed, 584 insertions(+), 367 deletions(-)
diff --git a/Documentation/debugging-via-ohci1394.txt b/Documentation/debugging-via-ohci1394.txt
index c360d4e..371ba27 100644
@@ -46,6 +49,82 @@
To activate it, enable CONFIG_PROVIDE_OHCI1394_DMA_INIT (Kernel hacking menu:
Provide code for enabling DMA over FireWire early on boot) and pass the
+diff --git a/drivers/firewire/Kconfig b/drivers/firewire/Kconfig
+index fe9e768..25bdc2d 100644
+--- a/drivers/firewire/Kconfig
++++ b/drivers/firewire/Kconfig
+@@ -1,5 +1,3 @@
+-# -*- shell-script -*-
+-
+ comment "An alternative FireWire stack is available with EXPERIMENTAL=y"
+ depends on EXPERIMENTAL=n
+
+@@ -21,27 +19,7 @@ config FIREWIRE
+ NOTE:
+
+ You should only build ONE of the stacks, unless you REALLY know what
+- you are doing. If you install both, you should configure them only as
+- modules rather than link them statically, and you should blacklist one
+- of the concurrent low-level drivers in /etc/modprobe.conf. Add either
+-
+- blacklist firewire-ohci
+- or
+- blacklist ohci1394
+-
+- there depending on which driver you DON'T want to have auto-loaded.
+- You can optionally do the same with the other IEEE 1394/ FireWire
+- drivers.
+-
+- If you have an old modprobe which doesn't implement the blacklist
+- directive, use either
+-
+- install firewire-ohci /bin/true
+- or
+- install ohci1394 /bin/true
+-
+- and so on, depending on which modules you DON't want to have
+- auto-loaded.
++ you are doing.
+
+ config FIREWIRE_OHCI
+ tristate "Support for OHCI FireWire host controllers"
+@@ -57,8 +35,24 @@ config FIREWIRE_OHCI
+
+ NOTE:
+
+- If you also build ohci1394 of the classic stack, blacklist either
+- ohci1394 or firewire-ohci to let hotplug load only the desired driver.
++ You should only build ohci1394 or firewire-ohci, but not both.
++ If you nevertheless want to install both, you should configure them
++ only as modules and blacklist the driver(s) which you don't want to
++ have auto-loaded. Add either
++
++ blacklist firewire-ohci
++ or
++ blacklist ohci1394
++ blacklist video1394
++ blacklist dv1394
++
++ to /etc/modprobe.conf or /etc/modprobe.d/* and update modprobe.conf
++ depending on your distribution. The latter two modules should be
++ blacklisted together with ohci1394 because they depend on ohci1394.
++
++ If you have an old modprobe which doesn't implement the blacklist
++ directive, use "install modulename /bin/true" for the modules to be
++ blacklisted.
+
+ config FIREWIRE_SBP2
+ tristate "Support for storage devices (SBP-2 protocol driver)"
+@@ -75,9 +69,3 @@ config FIREWIRE_SBP2
+
+ You should also enable support for disks, CD-ROMs, etc. in the SCSI
+ configuration section.
+-
+- NOTE:
+-
+- If you also build sbp2 of the classic stack, blacklist either sbp2
+- or firewire-sbp2 to let hotplug load only the desired driver.
+-
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c
index a034627..7e4012d 100644
--- a/drivers/firewire/fw-card.c
@@ -158,7 +237,7 @@
if (get_info->bus_reset != 0) {
void __user *uptr = u64_to_uptr(get_info->bus_reset);
diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c
-index 870125a..19f2fc4 100644
+index 870125a..f559c63 100644
--- a/drivers/firewire/fw-device.c
+++ b/drivers/firewire/fw-device.c
@@ -25,7 +25,7 @@
@@ -298,6 +377,15 @@
}
static struct device_attribute fw_device_attributes[] = {
+@@ -388,7 +410,7 @@ read_rom(struct fw_device *device, int generation, int index, u32 *data)
+
+ init_completion(&callback_data.done);
+
+- offset = 0xfffff0000400ULL + index * 4;
++ offset = (CSR_REGISTER_BASE | CSR_CONFIG_ROM) + index * 4;
+ fw_send_request(device->card, &t, TCODE_READ_QUADLET_REQUEST,
+ device->node_id, generation, device->max_speed,
+ offset, NULL, 4, complete_transaction, &callback_data);
@@ -400,6 +422,9 @@ read_rom(struct fw_device *device, int generation, int index, u32 *data)
return callback_data.rcode;
}
@@ -746,7 +834,7 @@
#define CSR_LEAF 0x80
#define CSR_DIRECTORY 0xc0
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
-index 7ebad3c..28ea78c 100644
+index 7ebad3c..0f02b8d 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -33,6 +33,10 @@
@@ -760,15 +848,49 @@
#include "fw-ohci.h"
#include "fw-transaction.h"
-@@ -175,6 +179,7 @@ struct fw_ohci {
+@@ -173,8 +177,9 @@ struct fw_ohci {
+ struct tasklet_struct bus_reset_tasklet;
+ int node_id;
int generation;
- int request_generation;
+- int request_generation;
++ int request_generation; /* for timestamping incoming requests */
u32 bus_seconds;
+ bool old_uninorth;
/*
* Spinlock for accessing fw_ohci data. Never call out of
-@@ -311,15 +316,22 @@ static int ar_context_add_page(struct ar_context *ctx)
+@@ -276,19 +281,13 @@ static int ar_context_add_page(struct ar_context *ctx)
+ {
+ struct device *dev = ctx->ohci->card.device;
+ struct ar_buffer *ab;
+- dma_addr_t ab_bus;
++ dma_addr_t uninitialized_var(ab_bus);
+ size_t offset;
+
+- ab = (struct ar_buffer *) __get_free_page(GFP_ATOMIC);
++ ab = dma_alloc_coherent(dev, PAGE_SIZE, &ab_bus, GFP_ATOMIC);
+ if (ab == NULL)
+ return -ENOMEM;
+
+- ab_bus = dma_map_single(dev, ab, PAGE_SIZE, DMA_BIDIRECTIONAL);
+- if (dma_mapping_error(ab_bus)) {
+- free_page((unsigned long) ab);
+- return -ENOMEM;
+- }
+-
+ memset(&ab->descriptor, 0, sizeof(ab->descriptor));
+ ab->descriptor.control = cpu_to_le16(DESCRIPTOR_INPUT_MORE |
+ DESCRIPTOR_STATUS |
+@@ -299,8 +298,6 @@ static int ar_context_add_page(struct ar_context *ctx)
+ ab->descriptor.res_count = cpu_to_le16(PAGE_SIZE - offset);
+ ab->descriptor.branch_address = 0;
+
+- dma_sync_single_for_device(dev, ab_bus, PAGE_SIZE, DMA_BIDIRECTIONAL);
+-
+ ctx->last_buffer->descriptor.branch_address = cpu_to_le32(ab_bus | 1);
+ ctx->last_buffer->next = ab;
+ ctx->last_buffer = ab;
+@@ -311,15 +308,22 @@ static int ar_context_add_page(struct ar_context *ctx)
return 0;
}
@@ -794,7 +916,7 @@
tcode = (p.header[0] >> 4) & 0x0f;
switch (tcode) {
-@@ -331,7 +343,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
+@@ -331,7 +335,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
break;
case TCODE_READ_BLOCK_REQUEST :
@@ -803,7 +925,7 @@
p.header_length = 16;
p.payload_length = 0;
break;
-@@ -340,7 +352,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
+@@ -340,7 +344,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
case TCODE_READ_BLOCK_RESPONSE:
case TCODE_LOCK_REQUEST:
case TCODE_LOCK_RESPONSE:
@@ -812,7 +934,7 @@
p.header_length = 16;
p.payload_length = p.header[3] >> 16;
break;
-@@ -357,7 +369,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
+@@ -357,7 +361,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
/* FIXME: What to do about evt_* errors? */
length = (p.header_length + p.payload_length + 3) / 4;
@@ -821,7 +943,7 @@
p.ack = ((status >> 16) & 0x1f) - 16;
p.speed = (status >> 21) & 0x7;
-@@ -375,7 +387,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
+@@ -375,7 +379,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
*/
if (p.ack + 16 == 0x09)
@@ -830,7 +952,36 @@
else if (ctx == &ohci->ar_request_ctx)
fw_core_handle_request(&ohci->card, &p);
else
-@@ -532,7 +544,7 @@ static int
+@@ -397,6 +401,7 @@ static void ar_context_tasklet(unsigned long data)
+
+ if (d->res_count == 0) {
+ size_t size, rest, offset;
++ dma_addr_t buffer_bus;
+
+ /*
+ * This descriptor is finished and we may have a
+@@ -405,9 +410,7 @@ static void ar_context_tasklet(unsigned long data)
+ */
+
+ offset = offsetof(struct ar_buffer, data);
+- dma_unmap_single(ohci->card.device,
+- le32_to_cpu(ab->descriptor.data_address) - offset,
+- PAGE_SIZE, DMA_BIDIRECTIONAL);
++ buffer_bus = le32_to_cpu(ab->descriptor.data_address) - offset;
+
+ buffer = ab;
+ ab = ab->next;
+@@ -423,7 +426,8 @@ static void ar_context_tasklet(unsigned long data)
+ while (buffer < end)
+ buffer = handle_ar_packet(ctx, buffer);
+
+- free_page((unsigned long)buffer);
++ dma_free_coherent(ohci->card.device, PAGE_SIZE,
++ buffer, buffer_bus);
+ ar_context_add_page(ctx);
+ } else {
+ buffer = ctx->pointer;
+@@ -532,7 +536,7 @@ static int
context_add_buffer(struct context *ctx)
{
struct descriptor_buffer *desc;
@@ -839,7 +990,7 @@
int offset;
/*
-@@ -1022,13 +1034,14 @@ static void bus_reset_tasklet(unsigned long data)
+@@ -1022,13 +1026,14 @@ static void bus_reset_tasklet(unsigned long data)
*/
self_id_count = (reg_read(ohci, OHCI1394_SelfIDCount) >> 3) & 0x3ff;
@@ -856,7 +1007,7 @@
}
rmb();
-@@ -1091,6 +1104,11 @@ static void bus_reset_tasklet(unsigned long data)
+@@ -1091,6 +1096,11 @@ static void bus_reset_tasklet(unsigned long data)
reg_write(ohci, OHCI1394_ConfigROMhdr, ohci->next_header);
}
@@ -868,7 +1019,7 @@
spin_unlock_irqrestore(&ohci->lock, flags);
if (free_rom)
-@@ -1316,7 +1334,7 @@ ohci_set_config_rom(struct fw_card *card, u32 *config_rom, size_t length)
+@@ -1316,7 +1326,7 @@ ohci_set_config_rom(struct fw_card *card, u32 *config_rom, size_t length)
unsigned long flags;
int retval = -EBUSY;
__be32 *next_config_rom;
@@ -877,7 +1028,7 @@
ohci = fw_ohci(card);
-@@ -1429,6 +1447,9 @@ static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
+@@ -1429,6 +1439,9 @@ static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
static int
ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation)
{
@@ -887,7 +1038,7 @@
struct fw_ohci *ohci = fw_ohci(card);
unsigned long flags;
int n, retval = 0;
-@@ -1460,6 +1481,7 @@ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation)
+@@ -1460,6 +1473,7 @@ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation)
out:
spin_unlock_irqrestore(&ohci->lock, flags);
return retval;
@@ -895,7 +1046,7 @@
}
static u64
-@@ -1487,7 +1509,7 @@ static int handle_ir_dualbuffer_packet(struct context *context,
+@@ -1487,7 +1501,7 @@ static int handle_ir_dualbuffer_packet(struct context *context,
void *p, *end;
int i;
@@ -904,7 +1055,7 @@
if (ctx->excess_bytes <= le16_to_cpu(db->second_req_count)) {
/* This descriptor isn't done yet, stop iteration. */
return 0;
-@@ -1513,7 +1535,7 @@ static int handle_ir_dualbuffer_packet(struct context *context,
+@@ -1513,7 +1527,7 @@ static int handle_ir_dualbuffer_packet(struct context *context,
memcpy(ctx->header + i + 4, p + 8, ctx->base.header_size - 4);
i += ctx->base.header_size;
ctx->excess_bytes +=
@@ -913,7 +1064,7 @@
p += ctx->base.header_size + 4;
}
ctx->header_length = i;
-@@ -2039,6 +2061,35 @@ static const struct fw_card_driver ohci_driver = {
+@@ -2039,6 +2053,35 @@ static const struct fw_card_driver ohci_driver = {
.stop_iso = ohci_stop_iso,
};
@@ -949,7 +1100,7 @@
static int __devinit
pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
{
-@@ -2048,6 +2099,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
+@@ -2048,6 +2091,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
int err;
size_t size;
@@ -958,7 +1109,7 @@
ohci = kzalloc(sizeof(*ohci), GFP_KERNEL);
if (ohci == NULL) {
fw_error("Could not malloc fw_ohci data.\n");
-@@ -2059,13 +2112,17 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
+@@ -2059,13 +2104,17 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
err = pci_enable_device(dev);
if (err) {
fw_error("Failed to enable OHCI hardware.\n");
@@ -977,7 +1128,7 @@
spin_lock_init(&ohci->lock);
tasklet_init(&ohci->bus_reset_tasklet,
-@@ -2151,8 +2208,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
+@@ -2151,8 +2200,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
pci_release_region(dev, 0);
fail_disable:
pci_disable_device(dev);
@@ -988,13 +1139,13 @@
return err;
}
-@@ -2180,39 +2237,42 @@ static void pci_remove(struct pci_dev *dev)
+@@ -2180,39 +2229,42 @@ static void pci_remove(struct pci_dev *dev)
pci_iounmap(dev, ohci->registers);
pci_release_region(dev, 0);
pci_disable_device(dev);
- fw_card_put(&ohci->card);
-+ ohci_pmac_off(dev);
+ kfree(&ohci->card);
++ ohci_pmac_off(dev);
fw_notify("Removed fw-ohci device.\n");
}
@@ -1043,7 +1194,7 @@
fw_error("pci_enable_device failed\n");
return err;
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
-index 03069a4..366981b 100644
+index 03069a4..2a99937 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -153,6 +153,7 @@ struct sbp2_target {
@@ -1121,7 +1272,19 @@
u8 command_block[12];
} request;
struct scsi_cmnd *cmd;
-@@ -453,8 +450,7 @@ sbp2_send_orb(struct sbp2_orb *orb, struct sbp2_logical_unit *lu,
+@@ -330,6 +327,11 @@ static const struct {
+ .model = ~0,
+ .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,
+ },
++ /* Datafab MD2-FW2 with Symbios/LSILogic SYM13FW500 bridge */ {
++ .firmware_revision = 0x002600,
++ .model = ~0,
++ .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,
++ },
+
+ /*
+ * There are iPods (2nd gen, 3rd gen) with model_id == 0, but
+@@ -453,8 +455,7 @@ sbp2_send_orb(struct sbp2_orb *orb, struct sbp2_logical_unit *lu,
unsigned long flags;
orb->pointer.high = 0;
@@ -1131,7 +1294,7 @@
spin_lock_irqsave(&device->card->lock, flags);
list_add_tail(&orb->link, &lu->orb_list);
-@@ -530,31 +526,31 @@ sbp2_send_management_orb(struct sbp2_logical_unit *lu, int node_id,
+@@ -530,31 +531,31 @@ sbp2_send_management_orb(struct sbp2_logical_unit *lu, int node_id,
if (dma_mapping_error(orb->response_bus))
goto fail_mapping_response;
@@ -1175,7 +1338,7 @@
init_completion(&orb->done);
orb->base.callback = complete_management_orb;
-@@ -599,8 +595,7 @@ sbp2_send_management_orb(struct sbp2_logical_unit *lu, int node_id,
+@@ -599,8 +600,7 @@ sbp2_send_management_orb(struct sbp2_logical_unit *lu, int node_id,
sizeof(orb->response), DMA_FROM_DEVICE);
fail_mapping_response:
if (response)
@@ -1185,7 +1348,7 @@
kref_put(&orb->base.kref, free_orb);
return retval;
-@@ -695,10 +690,8 @@ static void sbp2_conditionally_block(struct sbp2_logical_unit *lu)
+@@ -695,10 +695,8 @@ static void sbp2_conditionally_block(struct sbp2_logical_unit *lu)
if (!tgt->dont_block && !lu->blocked &&
lu->generation != card->generation) {
lu->blocked = true;
@@ -1197,7 +1360,7 @@
}
spin_unlock_irqrestore(&card->lock, flags);
}
-@@ -725,10 +718,8 @@ static void sbp2_conditionally_unblock(struct sbp2_logical_unit *lu)
+@@ -725,10 +723,8 @@ static void sbp2_conditionally_unblock(struct sbp2_logical_unit *lu)
}
spin_unlock_irqrestore(&card->lock, flags);
@@ -1209,7 +1372,7 @@
}
/*
-@@ -790,7 +781,7 @@ static void sbp2_release_target(struct kref *kref)
+@@ -790,7 +786,7 @@ static void sbp2_release_target(struct kref *kref)
scsi_remove_host(shost);
fw_notify("released %s\n", tgt->bus_id);
@@ -1218,7 +1381,7 @@
scsi_host_put(shost);
fw_device_put(device);
}
-@@ -812,6 +803,45 @@ static void sbp2_target_put(struct sbp2_target *tgt)
+@@ -812,6 +808,45 @@ static void sbp2_target_put(struct sbp2_target *tgt)
kref_put(&tgt->kref, sbp2_release_target);
}
@@ -1250,7 +1413,7 @@
+ struct fw_device *device = fw_device(lu->tgt->unit->device.parent);
+ DECLARE_COMPLETION_ONSTACK(done);
+ struct fw_transaction t;
-+ static u32 busy_timeout;
++ static __be32 busy_timeout;
+
+ busy_timeout = cpu_to_be32(SBP2_CYCLE_LIMIT | SBP2_RETRY_LIMIT);
+
@@ -1264,7 +1427,7 @@
static void sbp2_reconnect(struct work_struct *work);
static void sbp2_login(struct work_struct *work)
-@@ -855,19 +885,16 @@ static void sbp2_login(struct work_struct *work)
+@@ -855,19 +890,16 @@ static void sbp2_login(struct work_struct *work)
tgt->address_high = local_node_id << 16;
sbp2_set_generation(lu, generation);
@@ -1289,7 +1452,7 @@
PREPARE_DELAYED_WORK(&lu->work, sbp2_reconnect);
sbp2_agent_reset(lu);
-@@ -1083,6 +1110,7 @@ static int sbp2_probe(struct device *dev)
+@@ -1083,6 +1115,7 @@ static int sbp2_probe(struct device *dev)
kref_init(&tgt->kref);
INIT_LIST_HEAD(&tgt->lu_list);
tgt->bus_id = unit->device.bus_id;
@@ -1297,7 +1460,7 @@
if (fw_device_enable_phys_dma(device) < 0)
goto fail_shost_put;
-@@ -1091,6 +1119,7 @@ static int sbp2_probe(struct device *dev)
+@@ -1091,6 +1124,7 @@ static int sbp2_probe(struct device *dev)
goto fail_shost_put;
fw_device_get(device);
@@ -1305,7 +1468,7 @@
/* Initialize to values that won't match anything in our table. */
firmware_revision = 0xff000000;
-@@ -1106,8 +1135,6 @@ static int sbp2_probe(struct device *dev)
+@@ -1106,8 +1140,6 @@ static int sbp2_probe(struct device *dev)
sbp2_init_workarounds(tgt, model, firmware_revision);
@@ -1314,7 +1477,7 @@
/* Do the login in a workqueue so we can easily reschedule retries. */
list_for_each_entry(lu, &tgt->lu_list, link)
sbp2_queue_work(lu, 0);
-@@ -1339,9 +1366,12 @@ sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device,
+@@ -1339,9 +1371,12 @@ sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device,
* tables.
*/
if (count == 1 && sg_dma_len(sg) < SBP2_MAX_SG_ELEMENT_LENGTH) {
@@ -1330,7 +1493,7 @@
return 0;
}
-@@ -1362,16 +1392,14 @@ sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device,
+@@ -1362,16 +1397,14 @@ sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device,
goto fail_page_table;
}
l = min(sg_len, SBP2_MAX_SG_ELEMENT_LENGTH);
@@ -1349,7 +1512,7 @@
orb->page_table_bus =
dma_map_single(device->card->device, orb->page_table,
sizeof(orb->page_table), DMA_TO_DEVICE);
-@@ -1385,11 +1413,10 @@ sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device,
+@@ -1385,11 +1418,10 @@ sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device,
* initiator (i.e. us), but data_descriptor can refer to data
* on other nodes so we need to put our ID in descriptor.high.
*/
@@ -1365,7 +1528,7 @@
return 0;
-@@ -1435,8 +1462,7 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
+@@ -1435,8 +1467,7 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
orb->done = done;
orb->cmd = cmd;
@@ -1375,7 +1538,7 @@
/*
* At speed 100 we can do 512 bytes per packet, at speed 200,
* 1024 bytes per packet etc. The SBP-2 max_payload field
-@@ -1445,25 +1471,17 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
+@@ -1445,25 +1476,17 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
*/
max_payload = min(device->max_speed + 7,
device->card->max_receive - 1);
@@ -1404,7 +1567,7 @@
memcpy(orb->request.command_block, cmd->cmnd, COMMAND_SIZE(*cmd->cmnd));
orb->base.callback = complete_command_orb;
-@@ -1491,11 +1509,8 @@ static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
+@@ -1491,11 +1514,8 @@ static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
sdev->allow_restart = 1;
@@ -1418,7 +1581,7 @@
if (lu->tgt->workarounds & SBP2_WORKAROUND_INQUIRY_36)
sdev->inquiry_len = 36;
-@@ -1553,16 +1568,14 @@ sbp2_sysfs_ieee1394_id_show(struct device *dev, struct device_attribute *attr,
+@@ -1553,16 +1573,14 @@ sbp2_sysfs_ieee1394_id_show(struct device *dev, struct device_attribute *attr,
{
struct scsi_device *sdev = to_scsi_device(dev);
struct sbp2_logical_unit *lu;
@@ -1438,10 +1601,18 @@
}
diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c
-index e47bb04..25e8725 100644
+index e47bb04..ebdec4c 100644
--- a/drivers/firewire/fw-topology.c
+++ b/drivers/firewire/fw-topology.c
-@@ -107,6 +107,7 @@ static struct fw_node *fw_node_create(u32 sid, int port_count, int color)
+@@ -21,6 +21,7 @@
+ #include <linux/module.h>
+ #include <linux/wait.h>
+ #include <linux/errno.h>
++#include <asm/bug.h>
+ #include <asm/system.h>
+ #include "fw-transaction.h"
+ #include "fw-topology.h"
+@@ -107,6 +108,7 @@ static struct fw_node *fw_node_create(u32 sid, int port_count, int color)
node->node_id = LOCAL_BUS | SELF_ID_PHY_ID(sid);
node->link_on = SELF_ID_LINK_ON(sid);
node->phy_speed = SELF_ID_PHY_SPEED(sid);
@@ -1449,7 +1620,14 @@
node->port_count = port_count;
atomic_set(&node->ref_count, 1);
-@@ -430,6 +431,8 @@ update_tree(struct fw_card *card, struct fw_node *root)
+@@ -424,12 +426,14 @@ update_tree(struct fw_card *card, struct fw_node *root)
+ node1 = fw_node(list1.next);
+
+ while (&node0->link != &list0) {
++ WARN_ON(node0->port_count != node1->port_count);
+
+- /* assert(node0->port_count == node1->port_count); */
+ if (node0->link_on && !node1->link_on)
event = FW_NODE_LINK_OFF;
else if (!node0->link_on && node1->link_on)
event = FW_NODE_LINK_ON;
@@ -1481,10 +1659,30 @@
struct fw_node {
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c
-index 7fcc59d..99529e5 100644
+index 7fcc59d..e550535 100644
--- a/drivers/firewire/fw-transaction.c
+++ b/drivers/firewire/fw-transaction.c
-@@ -751,7 +751,7 @@ handle_topology_map(struct fw_card *card, struct fw_request *request,
+@@ -396,7 +396,8 @@ const struct fw_address_region fw_high_memory_region =
+ const struct fw_address_region fw_private_region =
+ { .start = 0xffffe0000000ULL, .end = 0xfffff0000000ULL, };
+ const struct fw_address_region fw_csr_region =
+- { .start = 0xfffff0000000ULL, .end = 0xfffff0000800ULL, };
++ { .start = CSR_REGISTER_BASE,
++ .end = CSR_REGISTER_BASE | CSR_CONFIG_ROM_END, };
+ const struct fw_address_region fw_unit_space_region =
+ { .start = 0xfffff0000900ULL, .end = 0x1000000000000ULL, };
+ EXPORT_SYMBOL(fw_low_memory_region);
+@@ -741,7 +742,8 @@ fw_core_handle_response(struct fw_card *card, struct fw_packet *p)
+ EXPORT_SYMBOL(fw_core_handle_response);
+
+ static const struct fw_address_region topology_map_region =
+- { .start = 0xfffff0001000ull, .end = 0xfffff0001400ull, };
++ { .start = CSR_REGISTER_BASE | CSR_TOPOLOGY_MAP,
++ .end = CSR_REGISTER_BASE | CSR_TOPOLOGY_MAP_END, };
+
+ static void
+ handle_topology_map(struct fw_card *card, struct fw_request *request,
+@@ -751,7 +753,7 @@ handle_topology_map(struct fw_card *card, struct fw_request *request,
void *payload, size_t length, void *callback_data)
{
int i, start, end;
@@ -1493,8 +1691,27 @@
if (!TCODE_IS_READ_REQUEST(tcode)) {
fw_send_response(card, request, RCODE_TYPE_ERROR);
+@@ -779,7 +781,8 @@ static struct fw_address_handler topology_map = {
+ };
+
+ static const struct fw_address_region registers_region =
+- { .start = 0xfffff0000000ull, .end = 0xfffff0000400ull, };
++ { .start = CSR_REGISTER_BASE,
++ .end = CSR_REGISTER_BASE | CSR_CONFIG_ROM, };
+
+ static void
+ handle_registers(struct fw_card *card, struct fw_request *request,
+@@ -788,7 +791,7 @@ handle_registers(struct fw_card *card, struct fw_request *request,
+ unsigned long long offset,
+ void *payload, size_t length, void *callback_data)
+ {
+- int reg = offset - CSR_REGISTER_BASE;
++ int reg = offset & ~CSR_REGISTER_BASE;
+ unsigned long long bus_time;
+ __be32 *data = payload;
+
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h
-index 09cb728..1a22a23 100644
+index 09cb728..8d1987f 100644
--- a/drivers/firewire/fw-transaction.h
+++ b/drivers/firewire/fw-transaction.h
@@ -86,12 +86,12 @@
@@ -1513,7 +1730,7 @@
}
static inline void
-@@ -221,7 +221,6 @@ struct fw_card {
+@@ -221,12 +221,9 @@ struct fw_card {
const struct fw_card_driver *driver;
struct device *device;
atomic_t device_count;
@@ -1521,7 +1738,12 @@
int node_id;
int generation;
-@@ -263,9 +262,6 @@ struct fw_card {
+- /* This is the generation used for timestamping incoming requests. */
+- int request_generation;
+ int current_tlabel, tlabel_mask;
+ struct list_head transaction_list;
+ struct timer_list flush_timer;
+@@ -263,9 +260,6 @@ struct fw_card {
int bm_generation;
};
@@ -1913,10 +2135,22 @@
/******************************************************************************/
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
-index 9e2b196..d5b9281 100644
+index 9e2b196..16b9d0a 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
-@@ -610,7 +610,7 @@ static struct sbp2_command_info *sbp2util_allocate_command_orb(
+@@ -376,6 +376,11 @@ static const struct {
+ .model_id = SBP2_ROM_VALUE_WILDCARD,
+ .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,
+ },
++ /* Datafab MD2-FW2 with Symbios/LSILogic SYM13FW500 bridge */ {
++ .firmware_revision = 0x002600,
++ .model_id = SBP2_ROM_VALUE_WILDCARD,
++ .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,
++ },
+ /* iPod 4th generation */ {
+ .firmware_revision = 0x0a2700,
+ .model_id = 0x000021,
+@@ -610,7 +615,7 @@ static struct sbp2_command_info *sbp2util_allocate_command_orb(
cmd->Current_SCpnt = Current_SCpnt;
list_add_tail(&cmd->list, &lu->cmd_orb_inuse);
} else
@@ -1925,7 +2159,7 @@
spin_unlock_irqrestore(&lu->cmd_orb_lock, flags);
return cmd;
}
-@@ -1289,7 +1289,7 @@ static int sbp2_set_busy_timeout(struct sbp2_lu *lu)
+@@ -1289,7 +1294,7 @@ static int sbp2_set_busy_timeout(struct sbp2_lu *lu)
data = cpu_to_be32(SBP2_BUSY_TIMEOUT_VALUE);
if (hpsb_node_write(lu->ne, SBP2_BUSY_TIMEOUT_ADDRESS, &data, 4))
@@ -1934,7 +2168,7 @@
return 0;
}
-@@ -1980,11 +1980,8 @@ static int sbp2scsi_slave_alloc(struct scsi_device *sdev)
+@@ -1980,11 +1985,8 @@ static int sbp2scsi_slave_alloc(struct scsi_device *sdev)
lu->sdev = sdev;
sdev->allow_restart = 1;
- Previous message (by thread): rpms/glibc/devel .cvsignore, 1.232, 1.233 glibc-fedora.patch, 1.258, 1.259 glibc.spec, 1.345, 1.346 sources, 1.257, 1.258
- Next message (by thread): rpms/doxygen/devel doxygen.spec,1.50,1.51
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list