mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* What's in linux1394-2.6.git?
@ 2008-01-17 21:07 Stefan Richter
  2008-01-17 21:09 ` What's in linux1394-2.6.git? - drivers/ieee1394 queue Stefan Richter
  2008-01-17 21:10 ` What's in linux1394-2.6.git? - drivers/firewire queue Stefan Richter
  0 siblings, 2 replies; 14+ messages in thread
From: Stefan Richter @ 2008-01-17 21:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel

Not much, and all of it is meant to be merged post 2.6.24.  The most
notable updates are fixes to firewire-ohci which fundamentally improve
isochronous reception via libdc1394 v2.

After these fixes, the most notable remaining issues with
drivers/firewire are:
  - difficulties to detect SBP-2 (storage) devices on some hosts
    (need to collect debug data for this ASAP),
  - DV reception broken on OHCI 1.0 variants of VIA VT630x,
  - IP over 1394 still not implemented/ ported.

So, distributors of kernel packages, be advised that the firewire
drivers are still not as functional as the classic ieee1394 driver
stack.  As always, more details on this are captured at
wiki.linux1394.org.

I will follow up to this post with two combo patches, reflecting the
merge queue for drivers/ieee1394 and drivers/firewire respectively,
because several of the patches have not been seen on lkml yet, only on
linux1394-devel.  All of the patches have been in -mm though (except for
a refresh of two small patches which happened after -rc8-mm1).

Shortlog and diffstat:

David Moore (3):
      firewire: fw-ohci: Fix for dualbuffer three-or-more buffers
      firewire: fw-ohci: Bug fixes for packet-per-buffer support
      firewire: fw-ohci: Dynamically allocate buffers for DMA descriptors

Jay Fenlason (1):
      firewire: fw-sbp2: quiet logout errors on device removal

Joe Perches (1):
      ieee1394: Add missing "space"

Nick Piggin (1):
      ieee1394: nopage

Rabin Vincent (1):
      firewire: Fix extraction of source node id

Stefan Richter (11):
      ieee1394: sbp2: prepare for s/g chaining
      ieee1394: sbp2: s/g list access cosmetics
      ieee1394: small cleanup after "nopage"
      ieee1394: remove unused code
      ieee1394: sbp2: raise default transfer size limit
      ieee1394: ohci1394: don't schedule IT tasklets on IR events
      firewire: fw-sbp2: refactor workq and kref handling
      firewire: fw-sbp2: prepare for s/g chaining
      firewire: fw-sbp2: remove unused misleading macro
      firewire: fw-ohci: CycleTooLong interrupt management
      firewire vs. ieee1394: clarify MAINTAINERS


 MAINTAINERS                              |    4 +-
 drivers/firewire/fw-ohci.c               |  390 +++++++++++++---------
 drivers/firewire/fw-sbp2.c               |   84 +++--
 drivers/firewire/fw-transaction.c        |    2 +-
 drivers/ieee1394/dma.c                   |   39 +--
 drivers/ieee1394/ieee1394_transactions.c |   68 ----
 drivers/ieee1394/ohci1394.c              |   12 +-
 drivers/ieee1394/raw1394.c               |    4 +-
 drivers/ieee1394/sbp2.c                  |   52 ++--
 drivers/ieee1394/sbp2.h                  |    1 -
 10 files changed, 340 insertions(+), 316 deletions(-)

-- 
Stefan Richter
-=====-==--- ---= =---=
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* What's in linux1394-2.6.git? - drivers/ieee1394 queue
  2008-01-17 21:07 What's in linux1394-2.6.git? Stefan Richter
@ 2008-01-17 21:09 ` Stefan Richter
  2008-01-17 21:10 ` What's in linux1394-2.6.git? - drivers/firewire queue Stefan Richter
  1 sibling, 0 replies; 14+ messages in thread
From: Stefan Richter @ 2008-01-17 21:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel

commit 95d0449d39ec13c88b46e7f6d7f7e8862c186fbf
Author: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date:   Sun Dec 16 20:53:13 2007 +0100

    ieee1394: ohci1394: don't schedule IT tasklets on IR events
    
    Bug noted by Pieter Palmers:  Isochronous transmit tasklets were
    scheduled on isochronous receive events, in addition to the proper
    isochronous receive tasklets.
    
    http://marc.info/?l=linux1394-devel&m=119783196222802
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index 372c5c1..969de2a 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -2126,10 +2126,14 @@ static void ohci_schedule_iso_tasklets(struct ti_ohci *ohci,
 	list_for_each_entry(t, &ohci->iso_tasklet_list, link) {
 		mask = 1 << t->context;
 
-		if (t->type == OHCI_ISO_TRANSMIT && tx_event & mask)
-			tasklet_schedule(&t->tasklet);
-		else if (rx_event & mask)
-			tasklet_schedule(&t->tasklet);
+		if (t->type == OHCI_ISO_TRANSMIT) {
+			if (tx_event & mask)
+				tasklet_schedule(&t->tasklet);
+		} else {
+			/* OHCI_ISO_RECEIVE or OHCI_ISO_MULTICHANNEL_RECEIVE */
+			if (rx_event & mask)
+				tasklet_schedule(&t->tasklet);
+		}
 	}
 
 	spin_unlock_irqrestore(&ohci->iso_tasklet_list_lock, flags);

commit 35331124d1af257c546fa550dc00e111ed65790a
Author: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date:   Sun Dec 16 17:31:26 2007 +0100

    ieee1394: sbp2: raise default transfer size limit
    
    This patch speeds up sbp2 a little bit --- but more importantly, it
    brings the behavior of sbp2 and fw-sbp2 closer to each other.  Like
    fw-sbp2, sbp2 now does not limit the size of single transfers to 255
    sectors anymore, unless told so by a blacklist flag or by module load
    parameters.
    
    Only very old bridge chips have been known to need the 255 sectors
    limit, and we have got one such chip in our hardwired blacklist.  There
    certainly is a danger that more bridges need that limit; but I prefer to
    have this issue present in both fw-sbp2 and sbp2 rather than just one of
    them.
    
    An OXUF922 with 400GB 7200RPM disk on an S400 controller is sped up by
    this patch from 22.9 to 23.5 MB/s according to hdparm.  The same effect
    could be achieved before by setting a higher max_sectors module
    parameter.  On buses which use 1394b beta mode, sbp2 and fw-sbp2 will
    now achieve virtually the same bandwidth.  Fw-sbp2 only remains faster
    on 1394a buses due to fw-core's gap count optimization.
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 2a7ceaf..273b6cb 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -51,6 +51,7 @@
  * Grep for inline FIXME comments below.
  */
 
+#include <linux/blkdev.h>
 #include <linux/compiler.h>
 #include <linux/delay.h>
 #include <linux/device.h>
@@ -127,17 +128,21 @@ MODULE_PARM_DESC(serialize_io, "Serialize requests coming from SCSI drivers "
 		 "(default = Y, faster but buggy = N)");
 
 /*
- * Bump up max_sectors if you'd like to support very large sized
- * transfers. Please note that some older sbp2 bridge chips are broken for
- * transfers greater or equal to 128KB.  Default is a value of 255
- * sectors, or just under 128KB (at 512 byte sector size). I can note that
- * the Oxsemi sbp2 chipsets have no problems supporting very large
- * transfer sizes.
+ * Adjust max_sectors if you'd like to influence how many sectors each SCSI
+ * command can transfer at most. Please note that some older SBP-2 bridge
+ * chips are broken for transfers greater or equal to 128KB, therefore
+ * max_sectors used to be a safe 255 sectors for many years. We now have a
+ * default of 0 here which means that we let the SCSI stack choose a limit.
+ *
+ * The SBP2_WORKAROUND_128K_MAX_TRANS flag, if set either in the workarounds
+ * module parameter or in the sbp2_workarounds_table[], will override the
+ * value of max_sectors. We should use sbp2_workarounds_table[] to cover any
+ * bridge chip which becomes known to need the 255 sectors limit.
  */
-static int sbp2_max_sectors = SBP2_MAX_SECTORS;
+static int sbp2_max_sectors;
 module_param_named(max_sectors, sbp2_max_sectors, int, 0444);
 MODULE_PARM_DESC(max_sectors, "Change max sectors per I/O supported "
-		 "(default = " __stringify(SBP2_MAX_SECTORS) ")");
+		 "(default = 0 = use SCSI stack's default)");
 
 /*
  * Exclusive login to sbp2 device? In most cases, the sbp2 driver should
@@ -1979,6 +1984,8 @@ static int sbp2scsi_slave_configure(struct scsi_device *sdev)
 		sdev->skip_ms_page_8 = 1;
 	if (lu->workarounds & SBP2_WORKAROUND_FIX_CAPACITY)
 		sdev->fix_capacity = 1;
+	if (lu->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS)
+		blk_queue_max_sectors(sdev->request_queue, 128 * 1024 / 512);
 	return 0;
 }
 
@@ -2085,9 +2092,6 @@ static int sbp2_module_init(void)
 		sbp2_shost_template.cmd_per_lun = 1;
 	}
 
-	if (sbp2_default_workarounds & SBP2_WORKAROUND_128K_MAX_TRANS &&
-	    (sbp2_max_sectors * 512) > (128 * 1024))
-		sbp2_max_sectors = 128 * 1024 / 512;
 	sbp2_shost_template.max_sectors = sbp2_max_sectors;
 
 	hpsb_register_highlevel(&sbp2_highlevel);
diff --git a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h
index 333a4bb..d2ecb0d 100644
--- a/drivers/ieee1394/sbp2.h
+++ b/drivers/ieee1394/sbp2.h
@@ -222,7 +222,6 @@ struct sbp2_status_block {
  */
 
 #define SBP2_MAX_SG_ELEMENT_LENGTH		0xf000
-#define SBP2_MAX_SECTORS			255
 /* There is no real limitation of the queue depth (i.e. length of the linked
  * list of command ORBs) at the target. The chosen depth is merely an
  * implementation detail of the sbp2 driver. */

commit c0dc4201c05734c2af8b6667c361ee520290e341
Author: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date:   Sat Dec 15 14:11:41 2007 +0100

    ieee1394: remove unused code
    
    The code has been in "#if 0 - #endif" since Linux 2.6.12.
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/ieee1394/ieee1394_transactions.c b/drivers/ieee1394/ieee1394_transactions.c
index 6779893..10c3d9f 100644
--- a/drivers/ieee1394/ieee1394_transactions.c
+++ b/drivers/ieee1394/ieee1394_transactions.c
@@ -570,71 +570,3 @@ int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation,
 
 	return retval;
 }
-
-#if 0
-
-int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation,
-	      u64 addr, int extcode, quadlet_t * data, quadlet_t arg)
-{
-	struct hpsb_packet *packet;
-	int retval = 0;
-
-	BUG_ON(in_interrupt());	// We can't be called in an interrupt, yet
-
-	packet = hpsb_make_lockpacket(host, node, addr, extcode, data, arg);
-	if (!packet)
-		return -ENOMEM;
-
-	packet->generation = generation;
-	retval = hpsb_send_packet_and_wait(packet);
-	if (retval < 0)
-		goto hpsb_lock_fail;
-
-	retval = hpsb_packet_success(packet);
-
-	if (retval == 0) {
-		*data = packet->data[0];
-	}
-
-      hpsb_lock_fail:
-	hpsb_free_tlabel(packet);
-	hpsb_free_packet(packet);
-
-	return retval;
-}
-
-int hpsb_send_gasp(struct hpsb_host *host, int channel, unsigned int generation,
-		   quadlet_t * buffer, size_t length, u32 specifier_id,
-		   unsigned int version)
-{
-	struct hpsb_packet *packet;
-	int retval = 0;
-	u16 specifier_id_hi = (specifier_id & 0x00ffff00) >> 8;
-	u8 specifier_id_lo = specifier_id & 0xff;
-
-	HPSB_VERBOSE("Send GASP: channel = %d, length = %Zd", channel, length);
-
-	length += 8;
-
-	packet = hpsb_make_streampacket(host, NULL, length, channel, 3, 0);
-	if (!packet)
-		return -ENOMEM;
-
-	packet->data[0] = cpu_to_be32((host->node_id << 16) | specifier_id_hi);
-	packet->data[1] =
-	    cpu_to_be32((specifier_id_lo << 24) | (version & 0x00ffffff));
-
-	memcpy(&(packet->data[2]), buffer, length - 8);
-
-	packet->generation = generation;
-
-	packet->no_waiter = 1;
-
-	retval = hpsb_send_packet(packet);
-	if (retval < 0)
-		hpsb_free_packet(packet);
-
-	return retval;
-}
-
-#endif				/*  0  */

commit 004a57d0931e171e5f70cd09d06ecbb266a94dd4
Author: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date:   Sat Dec 15 14:04:42 2007 +0100

    ieee1394: small cleanup after "nopage"
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c
index ec024b5..73685e7 100644
--- a/drivers/ieee1394/dma.c
+++ b/drivers/ieee1394/dma.c
@@ -231,28 +231,20 @@ void dma_region_sync_for_device(struct dma_region *dma, unsigned long offset,
 
 #ifdef CONFIG_MMU
 
-/* fault() handler for mmap access */
-
 static int dma_region_pagefault(struct vm_area_struct *vma,
-					struct vm_fault *vmf)
+				struct vm_fault *vmf)
 {
-	unsigned long kernel_virt_addr;
-
 	struct dma_region *dma = (struct dma_region *)vma->vm_private_data;
 
 	if (!dma->kvirt)
-		goto error;
+		return VM_FAULT_SIGBUS;
 
 	if (vmf->pgoff >= dma->n_pages)
-		goto error;
+		return VM_FAULT_SIGBUS;
 
-	kernel_virt_addr = (unsigned long)dma->kvirt + (vmf->pgoff << PAGE_SHIFT);
-	vmf->page = vmalloc_to_page((void *)kernel_virt_addr);
+	vmf->page = vmalloc_to_page(dma->kvirt + (vmf->pgoff << PAGE_SHIFT));
 	get_page(vmf->page);
 	return 0;
-
-      error:
-	return VM_FAULT_SIGBUS;
 }
 
 static struct vm_operations_struct dma_region_vm_ops = {

commit d8f26b4379c5801be20ae073ef0ef8d3900a00c3
Author: Nick Piggin <npiggin@suse.de>
Date:   Wed Dec 5 18:15:53 2007 +1100

    ieee1394: nopage
    
    Convert ieee1394 from nopage to fault.
    Remove redundant vma range checks (correct resource range check is retained).
    
    Signed-off-by: Nick Piggin <npiggin@suse.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c
index 7c4eb39..ec024b5 100644
--- a/drivers/ieee1394/dma.c
+++ b/drivers/ieee1394/dma.c
@@ -231,37 +231,32 @@ void dma_region_sync_for_device(struct dma_region *dma, unsigned long offset,
 
 #ifdef CONFIG_MMU
 
-/* nopage() handler for mmap access */
+/* fault() handler for mmap access */
 
-static struct page *dma_region_pagefault(struct vm_area_struct *area,
-					 unsigned long address, int *type)
+static int dma_region_pagefault(struct vm_area_struct *vma,
+					struct vm_fault *vmf)
 {
-	unsigned long offset;
 	unsigned long kernel_virt_addr;
-	struct page *ret = NOPAGE_SIGBUS;
 
-	struct dma_region *dma = (struct dma_region *)area->vm_private_data;
+	struct dma_region *dma = (struct dma_region *)vma->vm_private_data;
 
 	if (!dma->kvirt)
-		goto out;
-
-	if ((address < (unsigned long)area->vm_start) ||
-	    (address >
-	     (unsigned long)area->vm_start + (dma->n_pages << PAGE_SHIFT)))
-		goto out;
-
-	if (type)
-		*type = VM_FAULT_MINOR;
-	offset = address - area->vm_start;
-	kernel_virt_addr = (unsigned long)dma->kvirt + offset;
-	ret = vmalloc_to_page((void *)kernel_virt_addr);
-	get_page(ret);
-      out:
-	return ret;
+		goto error;
+
+	if (vmf->pgoff >= dma->n_pages)
+		goto error;
+
+	kernel_virt_addr = (unsigned long)dma->kvirt + (vmf->pgoff << PAGE_SHIFT);
+	vmf->page = vmalloc_to_page((void *)kernel_virt_addr);
+	get_page(vmf->page);
+	return 0;
+
+      error:
+	return VM_FAULT_SIGBUS;
 }
 
 static struct vm_operations_struct dma_region_vm_ops = {
-	.nopage = dma_region_pagefault,
+	.fault = dma_region_pagefault,
 };
 
 /**
@@ -275,7 +270,7 @@ int dma_region_mmap(struct dma_region *dma, struct file *file,
 	if (!dma->kvirt)
 		return -EINVAL;
 
-	/* must be page-aligned */
+	/* must be page-aligned (XXX: comment is wrong, we could allow pgoff) */
 	if (vma->vm_pgoff != 0)
 		return -EINVAL;
 

commit 09d0fee3e92fcf68335bbd24f9fd27ca299135a3
Author: Joe Perches <joe@perches.com>
Date:   Mon Nov 19 17:48:10 2007 -0800

    ieee1394: Add missing "space"
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index cadf047..37e7e10 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -858,7 +858,7 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer,
 	int found = 0, size = 0, rcode = -1;
 	struct arm_request_response *arm_req_resp = NULL;
 
-	DBGMSG("arm_read  called by node: %X"
+	DBGMSG("arm_read  called by node: %X "
 	       "addr: %4.4x %8.8x length: %Zu", nodeid,
 	       (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF),
 	       length);
@@ -1012,7 +1012,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid,
 	int found = 0, size = 0, rcode = -1, length_conflict = 0;
 	struct arm_request_response *arm_req_resp = NULL;
 
-	DBGMSG("arm_write called by node: %X"
+	DBGMSG("arm_write called by node: %X "
 	       "addr: %4.4x %8.8x length: %Zu", nodeid,
 	       (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF),
 	       length);

commit 9de7e0bcd8d6bf4ccdf1ecfafde5c435bd3f34d6
Author: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date:   Sun Nov 4 14:59:24 2007 +0100

    ieee1394: sbp2: s/g list access cosmetics
    
    Replace sg->length by sg_dma_len(sg).  Rename a variable for shorter
    line lengths and eliminate some superfluous local variables.
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 08923dc..2a7ceaf 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -1451,7 +1451,7 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb,
 				     struct sbp2_fwhost_info *hi,
 				     struct sbp2_command_info *cmd,
 				     unsigned int scsi_use_sg,
-				     struct scatterlist *sgpnt,
+				     struct scatterlist *sg,
 				     u32 orb_direction,
 				     enum dma_data_direction dma_dir)
 {
@@ -1461,12 +1461,12 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb,
 
 	/* special case if only one element (and less than 64KB in size) */
 	if ((scsi_use_sg == 1) &&
-	    (sgpnt[0].length <= SBP2_MAX_SG_ELEMENT_LENGTH)) {
+	    (sg_dma_len(sg) <= SBP2_MAX_SG_ELEMENT_LENGTH)) {
 
-		cmd->dma_size = sgpnt[0].length;
+		cmd->dma_size = sg_dma_len(sg);
 		cmd->dma_type = CMD_DMA_PAGE;
 		cmd->cmd_dma = dma_map_page(hi->host->device.parent,
-					    sg_page(&sgpnt[0]), sgpnt[0].offset,
+					    sg_page(sg), sg->offset,
 					    cmd->dma_size, cmd->dma_dir);
 
 		orb->data_descriptor_lo = cmd->cmd_dma;
@@ -1477,11 +1477,11 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb,
 						&cmd->scatter_gather_element[0];
 		u32 sg_count, sg_len;
 		dma_addr_t sg_addr;
-		int i, count = dma_map_sg(hi->host->device.parent, sgpnt,
+		int i, count = dma_map_sg(hi->host->device.parent, sg,
 					  scsi_use_sg, dma_dir);
 
 		cmd->dma_size = scsi_use_sg;
-		cmd->sge_buffer = sgpnt;
+		cmd->sge_buffer = sg;
 
 		/* use page tables (s/g) */
 		orb->misc |= ORB_SET_PAGE_TABLE_PRESENT(0x1);
@@ -1489,9 +1489,9 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb,
 
 		/* loop through and fill out our SBP-2 page tables
 		 * (and split up anything too large) */
-		for (i = 0, sg_count = 0; i < count; i++, sgpnt = sg_next(sgpnt)) {
-			sg_len = sg_dma_len(sgpnt);
-			sg_addr = sg_dma_address(sgpnt);
+		for (i = 0, sg_count = 0; i < count; i++, sg = sg_next(sg)) {
+			sg_len = sg_dma_len(sg);
+			sg_addr = sg_dma_address(sg);
 			while (sg_len) {
 				sg_element[sg_count].segment_base_lo = sg_addr;
 				if (sg_len > SBP2_MAX_SG_ELEMENT_LENGTH) {
@@ -1521,11 +1521,10 @@ static void sbp2_create_command_orb(struct sbp2_lu *lu,
 				    unchar *scsi_cmd,
 				    unsigned int scsi_use_sg,
 				    unsigned int scsi_request_bufflen,
-				    void *scsi_request_buffer,
+				    struct scatterlist *sg,
 				    enum dma_data_direction dma_dir)
 {
 	struct sbp2_fwhost_info *hi = lu->hi;
-	struct scatterlist *sgpnt = (struct scatterlist *)scsi_request_buffer;
 	struct sbp2_command_orb *orb = &cmd->command_orb;
 	u32 orb_direction;
 
@@ -1560,7 +1559,7 @@ static void sbp2_create_command_orb(struct sbp2_lu *lu,
 		orb->data_descriptor_lo = 0x0;
 		orb->misc |= ORB_SET_DIRECTION(1);
 	} else
-		sbp2_prep_command_orb_sg(orb, hi, cmd, scsi_use_sg, sgpnt,
+		sbp2_prep_command_orb_sg(orb, hi, cmd, scsi_use_sg, sg,
 					 orb_direction, dma_dir);
 
 	sbp2util_cpu_to_be32_buffer(orb, sizeof(*orb));
@@ -1650,7 +1649,6 @@ static int sbp2_send_command(struct sbp2_lu *lu, struct scsi_cmnd *SCpnt,
 			     void (*done)(struct scsi_cmnd *))
 {
 	unchar *scsi_cmd = (unchar *)SCpnt->cmnd;
-	unsigned int request_bufflen = scsi_bufflen(SCpnt);
 	struct sbp2_command_info *cmd;
 
 	cmd = sbp2util_allocate_command_orb(lu, SCpnt, done);
@@ -1658,7 +1656,7 @@ static int sbp2_send_command(struct sbp2_lu *lu, struct scsi_cmnd *SCpnt,
 		return -EIO;
 
 	sbp2_create_command_orb(lu, cmd, scsi_cmd, scsi_sg_count(SCpnt),
-				request_bufflen, scsi_sglist(SCpnt),
+				scsi_bufflen(SCpnt), scsi_sglist(SCpnt),
 				SCpnt->sc_data_direction);
 	sbp2_link_orb_command(lu, cmd);
 

commit 3a498bf2fb8d411e5560b32aec532e74b4987b18
Author: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date:   Tue Jan 15 21:11:28 2008 +0100

    ieee1394: sbp2: prepare for s/g chaining
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index b83d254..08923dc 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -1489,7 +1489,7 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb,
 
 		/* loop through and fill out our SBP-2 page tables
 		 * (and split up anything too large) */
-		for (i = 0, sg_count = 0 ; i < count; i++, sgpnt++) {
+		for (i = 0, sg_count = 0; i < count; i++, sgpnt = sg_next(sgpnt)) {
 			sg_len = sg_dma_len(sgpnt);
 			sg_addr = sg_dma_address(sgpnt);
 			while (sg_len) {

-- 
Stefan Richter
-=====-==--- ---= =---=
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* What's in linux1394-2.6.git? - drivers/firewire queue
  2008-01-17 21:07 What's in linux1394-2.6.git? Stefan Richter
  2008-01-17 21:09 ` What's in linux1394-2.6.git? - drivers/ieee1394 queue Stefan Richter
@ 2008-01-17 21:10 ` Stefan Richter
  1 sibling, 0 replies; 14+ messages in thread
From: Stefan Richter @ 2008-01-17 21:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel

commit e1d65076dd7009a35a83b408e8095597a243c447
Author: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date:   Sat Jan 12 12:32:44 2008 +0100

    firewire vs. ieee1394: clarify MAINTAINERS
    
    Maintainers like to receive less mail, and submitters like to have to Cc
    less recipients.
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/MAINTAINERS b/MAINTAINERS
index f3d7256..974617f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1573,7 +1573,7 @@ P:	Alexander Viro
 M:	viro@zeniv.linux.org.uk
 S:	Maintained
 
-FIREWIRE SUBSYSTEM
+FIREWIRE SUBSYSTEM (drivers/firewire, <linux/firewire*.h>)
 P:	Kristian Hoegsberg, Stefan Richter
 M:	krh@redhat.com, stefanr@s5r6.in-berlin.de
 L:	linux1394-devel@lists.sourceforge.net
@@ -1893,7 +1893,7 @@ L:	linux-ide@vger.kernel.org
 L:	linux-scsi@vger.kernel.org
 S:	Orphan
 
-IEEE 1394 SUBSYSTEM
+IEEE 1394 SUBSYSTEM (drivers/ieee1394)
 P:	Ben Collins
 M:	ben.collins@ubuntu.com
 P:	Stefan Richter

commit 6f81353c95c9538371d23964c17338198e38ad3f
Author: David Moore <dcm@MIT.EDU>
Date:   Sun Jan 6 17:21:41 2008 -0500

    firewire: fw-ohci: Dynamically allocate buffers for DMA descriptors
    
    Previously, the fw-ohci driver used fixed-length buffers for storing
    descriptors for isochronous receive DMA programs.  If an application
    (such as libdc1394) generated a DMA program that was too large, fw-ohci
    would reach the limit of its fixed-sized buffer and return an error to
    userspace.
    
    This patch replaces the fixed-length ring-buffer with a linked-list of
    page-sized buffers.  Additional buffers can be dynamically allocated and
    appended to the list when necessary.  For a particular context, buffers
    are kept around after use and reused as necessary, so there is no
    allocation taking place after the DMA program is generated for the first
    time.
    
    In addition, the buffers it uses are coherent for DMA so there is no
    syncing required before and after writes.  This syncing wasn't properly
    done in the previous version of the code.
    
    -
    
    This is the fourth version of my patch that replaces a fixed-length
    buffer for DMA descriptors with a dynamically allocated linked-list of
    buffers.
    
    As we discovered with the last attempt, new context programs are
    sometimes queued from interrupt context, making it unacceptable to call
    tasklet_disable() from context_get_descriptors().
    
    This version of the patch uses ohci->lock for all locking needs instead
    of tasklet_disable/enable.  There is a new requirement that
    context_get_descriptors() be called while holding ohci->lock.  It was
    already held for the AT context, so adding the requirement for the iso
    context did not seem particularly onerous.  In addition, this has the
    side benefit of allowing iso queue to be safely called from concurrent
    user-space threads, which previously was not safe.
    
    Signed-off-by: David Moore <dcm@acm.org>
    Signed-off-by: Kristian Høgsberg <krh@redhat.com>
    Signed-off-by: Jarod Wilson <jwilson@redhat.com>
    
    -
    
    Fixes the following issues:
      - Isochronous reception stopped prematurely if an application used a
        larger buffer.  (Reproduced with coriander.)
      - Isochronous reception stopped after one or a few frames on VT630x
        in OHCI 1.0 mode.  (Fixes reception in coriander, but dvgrab still
        doesn't work with these chips.)
    
    Patch update: struct member alignment, whitespace nits
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index 74d5d94..7ebad3c 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -98,17 +98,48 @@ struct context;
 typedef int (*descriptor_callback_t)(struct context *ctx,
 				     struct descriptor *d,
 				     struct descriptor *last);
+
+/*
+ * A buffer that contains a block of DMA-able coherent memory used for
+ * storing a portion of a DMA descriptor program.
+ */
+struct descriptor_buffer {
+	struct list_head list;
+	dma_addr_t buffer_bus;
+	size_t buffer_size;
+	size_t used;
+	struct descriptor buffer[0];
+};
+
 struct context {
 	struct fw_ohci *ohci;
 	u32 regs;
+	int total_allocation;
 
-	struct descriptor *buffer;
-	dma_addr_t buffer_bus;
-	size_t buffer_size;
-	struct descriptor *head_descriptor;
-	struct descriptor *tail_descriptor;
-	struct descriptor *tail_descriptor_last;
-	struct descriptor *prev_descriptor;
+	/*
+	 * List of page-sized buffers for storing DMA descriptors.
+	 * Head of list contains buffers in use and tail of list contains
+	 * free buffers.
+	 */
+	struct list_head buffer_list;
+
+	/*
+	 * Pointer to a buffer inside buffer_list that contains the tail
+	 * end of the current DMA program.
+	 */
+	struct descriptor_buffer *buffer_tail;
+
+	/*
+	 * The descriptor containing the branch address of the first
+	 * descriptor that has not yet been filled by the device.
+	 */
+	struct descriptor *last;
+
+	/*
+	 * The last descriptor in the DMA program.  It contains the branch
+	 * address that must be updated upon appending a new descriptor.
+	 */
+	struct descriptor *prev;
 
 	descriptor_callback_t callback;
 
@@ -198,8 +229,6 @@ static inline struct fw_ohci *fw_ohci(struct fw_card *card)
 #define SELF_ID_BUF_SIZE		0x800
 #define OHCI_TCODE_PHY_PACKET		0x0e
 #define OHCI_VERSION_1_1		0x010010
-#define ISO_BUFFER_SIZE			(64 * 1024)
-#define AT_BUFFER_SIZE			4096
 
 static char ohci_driver_name[] = KBUILD_MODNAME;
 
@@ -456,71 +485,108 @@ find_branch_descriptor(struct descriptor *d, int z)
 static void context_tasklet(unsigned long data)
 {
 	struct context *ctx = (struct context *) data;
-	struct fw_ohci *ohci = ctx->ohci;
 	struct descriptor *d, *last;
 	u32 address;
 	int z;
+	struct descriptor_buffer *desc;
 
-	dma_sync_single_for_cpu(ohci->card.device, ctx->buffer_bus,
-				ctx->buffer_size, DMA_TO_DEVICE);
-
-	d    = ctx->tail_descriptor;
-	last = ctx->tail_descriptor_last;
-
+	desc = list_entry(ctx->buffer_list.next,
+			struct descriptor_buffer, list);
+	last = ctx->last;
 	while (last->branch_address != 0) {
+		struct descriptor_buffer *old_desc = desc;
 		address = le32_to_cpu(last->branch_address);
 		z = address & 0xf;
-		d = ctx->buffer + (address - ctx->buffer_bus) / sizeof(*d);
+		address &= ~0xf;
+
+		/* If the branch address points to a buffer outside of the
+		 * current buffer, advance to the next buffer. */
+		if (address < desc->buffer_bus ||
+				address >= desc->buffer_bus + desc->used)
+			desc = list_entry(desc->list.next,
+					struct descriptor_buffer, list);
+		d = desc->buffer + (address - desc->buffer_bus) / sizeof(*d);
 		last = find_branch_descriptor(d, z);
 
 		if (!ctx->callback(ctx, d, last))
 			break;
 
-		ctx->tail_descriptor      = d;
-		ctx->tail_descriptor_last = last;
+		if (old_desc != desc) {
+			/* If we've advanced to the next buffer, move the
+			 * previous buffer to the free list. */
+			unsigned long flags;
+			old_desc->used = 0;
+			spin_lock_irqsave(&ctx->ohci->lock, flags);
+			list_move_tail(&old_desc->list, &ctx->buffer_list);
+			spin_unlock_irqrestore(&ctx->ohci->lock, flags);
+		}
+		ctx->last = last;
 	}
 }
 
+/*
+ * Allocate a new buffer and add it to the list of free buffers for this
+ * context.  Must be called with ohci->lock held.
+ */
+static int
+context_add_buffer(struct context *ctx)
+{
+	struct descriptor_buffer *desc;
+	dma_addr_t bus_addr;
+	int offset;
+
+	/*
+	 * 16MB of descriptors should be far more than enough for any DMA
+	 * program.  This will catch run-away userspace or DoS attacks.
+	 */
+	if (ctx->total_allocation >= 16*1024*1024)
+		return -ENOMEM;
+
+	desc = dma_alloc_coherent(ctx->ohci->card.device, PAGE_SIZE,
+			&bus_addr, GFP_ATOMIC);
+	if (!desc)
+		return -ENOMEM;
+
+	offset = (void *)&desc->buffer - (void *)desc;
+	desc->buffer_size = PAGE_SIZE - offset;
+	desc->buffer_bus = bus_addr + offset;
+	desc->used = 0;
+
+	list_add_tail(&desc->list, &ctx->buffer_list);
+	ctx->total_allocation += PAGE_SIZE;
+
+	return 0;
+}
+
 static int
 context_init(struct context *ctx, struct fw_ohci *ohci,
-	     size_t buffer_size, u32 regs,
-	     descriptor_callback_t callback)
+	     u32 regs, descriptor_callback_t callback)
 {
 	ctx->ohci = ohci;
 	ctx->regs = regs;
-	ctx->buffer_size = buffer_size;
-	ctx->buffer = kmalloc(buffer_size, GFP_KERNEL);
-	if (ctx->buffer == NULL)
+	ctx->total_allocation = 0;
+
+	INIT_LIST_HEAD(&ctx->buffer_list);
+	if (context_add_buffer(ctx) < 0)
 		return -ENOMEM;
 
+	ctx->buffer_tail = list_entry(ctx->buffer_list.next,
+			struct descriptor_buffer, list);
+
 	tasklet_init(&ctx->tasklet, context_tasklet, (unsigned long)ctx);
 	ctx->callback = callback;
 
-	ctx->buffer_bus =
-		dma_map_single(ohci->card.device, ctx->buffer,
-			       buffer_size, DMA_TO_DEVICE);
-	if (dma_mapping_error(ctx->buffer_bus)) {
-		kfree(ctx->buffer);
-		return -ENOMEM;
-	}
-
-	ctx->head_descriptor      = ctx->buffer;
-	ctx->prev_descriptor      = ctx->buffer;
-	ctx->tail_descriptor      = ctx->buffer;
-	ctx->tail_descriptor_last = ctx->buffer;
-
 	/*
 	 * We put a dummy descriptor in the buffer that has a NULL
 	 * branch address and looks like it's been sent.  That way we
-	 * have a descriptor to append DMA programs to.  Also, the
-	 * ring buffer invariant is that it always has at least one
-	 * element so that head == tail means buffer full.
+	 * have a descriptor to append DMA programs to.
 	 */
-
-	memset(ctx->head_descriptor, 0, sizeof(*ctx->head_descriptor));
-	ctx->head_descriptor->control = cpu_to_le16(DESCRIPTOR_OUTPUT_LAST);
-	ctx->head_descriptor->transfer_status = cpu_to_le16(0x8011);
-	ctx->head_descriptor++;
+	memset(ctx->buffer_tail->buffer, 0, sizeof(*ctx->buffer_tail->buffer));
+	ctx->buffer_tail->buffer->control = cpu_to_le16(DESCRIPTOR_OUTPUT_LAST);
+	ctx->buffer_tail->buffer->transfer_status = cpu_to_le16(0x8011);
+	ctx->buffer_tail->used += sizeof(*ctx->buffer_tail->buffer);
+	ctx->last = ctx->buffer_tail->buffer;
+	ctx->prev = ctx->buffer_tail->buffer;
 
 	return 0;
 }
@@ -529,35 +595,42 @@ static void
 context_release(struct context *ctx)
 {
 	struct fw_card *card = &ctx->ohci->card;
+	struct descriptor_buffer *desc, *tmp;
 
-	dma_unmap_single(card->device, ctx->buffer_bus,
-			 ctx->buffer_size, DMA_TO_DEVICE);
-	kfree(ctx->buffer);
+	list_for_each_entry_safe(desc, tmp, &ctx->buffer_list, list)
+		dma_free_coherent(card->device, PAGE_SIZE, desc,
+			desc->buffer_bus -
+			((void *)&desc->buffer - (void *)desc));
 }
 
+/* Must be called with ohci->lock held */
 static struct descriptor *
 context_get_descriptors(struct context *ctx, int z, dma_addr_t *d_bus)
 {
-	struct descriptor *d, *tail, *end;
-
-	d = ctx->head_descriptor;
-	tail = ctx->tail_descriptor;
-	end = ctx->buffer + ctx->buffer_size / sizeof(*d);
-
-	if (d + z <= tail) {
-		goto has_space;
-	} else if (d > tail && d + z <= end) {
-		goto has_space;
-	} else if (d > tail && ctx->buffer + z <= tail) {
-		d = ctx->buffer;
-		goto has_space;
-	}
+	struct descriptor *d = NULL;
+	struct descriptor_buffer *desc = ctx->buffer_tail;
+
+	if (z * sizeof(*d) > desc->buffer_size)
+		return NULL;
+
+	if (z * sizeof(*d) > desc->buffer_size - desc->used) {
+		/* No room for the descriptor in this buffer, so advance to the
+		 * next one. */
 
-	return NULL;
+		if (desc->list.next == &ctx->buffer_list) {
+			/* If there is no free buffer next in the list,
+			 * allocate one. */
+			if (context_add_buffer(ctx) < 0)
+				return NULL;
+		}
+		desc = list_entry(desc->list.next,
+				struct descriptor_buffer, list);
+		ctx->buffer_tail = desc;
+	}
 
- has_space:
+	d = desc->buffer + desc->used / sizeof(*d);
 	memset(d, 0, z * sizeof(*d));
-	*d_bus = ctx->buffer_bus + (d - ctx->buffer) * sizeof(*d);
+	*d_bus = desc->buffer_bus + desc->used;
 
 	return d;
 }
@@ -567,7 +640,7 @@ static void context_run(struct context *ctx, u32 extra)
 	struct fw_ohci *ohci = ctx->ohci;
 
 	reg_write(ohci, COMMAND_PTR(ctx->regs),
-		  le32_to_cpu(ctx->tail_descriptor_last->branch_address));
+		  le32_to_cpu(ctx->last->branch_address));
 	reg_write(ohci, CONTROL_CLEAR(ctx->regs), ~0);
 	reg_write(ohci, CONTROL_SET(ctx->regs), CONTEXT_RUN | extra);
 	flush_writes(ohci);
@@ -577,15 +650,13 @@ static void context_append(struct context *ctx,
 			   struct descriptor *d, int z, int extra)
 {
 	dma_addr_t d_bus;
+	struct descriptor_buffer *desc = ctx->buffer_tail;
 
-	d_bus = ctx->buffer_bus + (d - ctx->buffer) * sizeof(*d);
+	d_bus = desc->buffer_bus + (d - desc->buffer) * sizeof(*d);
 
-	ctx->head_descriptor = d + z + extra;
-	ctx->prev_descriptor->branch_address = cpu_to_le32(d_bus | z);
-	ctx->prev_descriptor = find_branch_descriptor(d, z);
-
-	dma_sync_single_for_device(ctx->ohci->card.device, ctx->buffer_bus,
-				   ctx->buffer_size, DMA_TO_DEVICE);
+	desc->used += (z + extra) * sizeof(*d);
+	ctx->prev->branch_address = cpu_to_le32(d_bus | z);
+	ctx->prev = find_branch_descriptor(d, z);
 
 	reg_write(ctx->ohci, CONTROL_SET(ctx->regs), CONTEXT_WAKE);
 	flush_writes(ctx->ohci);
@@ -1571,8 +1642,7 @@ ohci_allocate_iso_context(struct fw_card *card, int type, size_t header_size)
 	if (ctx->header == NULL)
 		goto out;
 
-	retval = context_init(&ctx->context, ohci, ISO_BUFFER_SIZE,
-			      regs, callback);
+	retval = context_init(&ctx->context, ohci, regs, callback);
 	if (retval < 0)
 		goto out_with_header;
 
@@ -1933,16 +2003,22 @@ ohci_queue_iso(struct fw_iso_context *base,
 	       unsigned long payload)
 {
 	struct iso_context *ctx = container_of(base, struct iso_context, base);
+	unsigned long flags;
+	int retval;
 
+	spin_lock_irqsave(&ctx->context.ohci->lock, flags);
 	if (base->type == FW_ISO_CONTEXT_TRANSMIT)
-		return ohci_queue_iso_transmit(base, packet, buffer, payload);
+		retval = ohci_queue_iso_transmit(base, packet, buffer, payload);
 	else if (ctx->context.ohci->version >= OHCI_VERSION_1_1)
-		return ohci_queue_iso_receive_dualbuffer(base, packet,
+		retval = ohci_queue_iso_receive_dualbuffer(base, packet,
 							 buffer, payload);
 	else
-		return ohci_queue_iso_receive_packet_per_buffer(base, packet,
+		retval = ohci_queue_iso_receive_packet_per_buffer(base, packet,
 								buffer,
 								payload);
+	spin_unlock_irqrestore(&ctx->context.ohci->lock, flags);
+
+	return retval;
 }
 
 static const struct fw_card_driver ohci_driver = {
@@ -2014,10 +2090,10 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 	ar_context_init(&ohci->ar_response_ctx, ohci,
 			OHCI1394_AsRspRcvContextControlSet);
 
-	context_init(&ohci->at_request_ctx, ohci, AT_BUFFER_SIZE,
+	context_init(&ohci->at_request_ctx, ohci,
 		     OHCI1394_AsReqTrContextControlSet, handle_at_packet);
 
-	context_init(&ohci->at_response_ctx, ohci, AT_BUFFER_SIZE,
+	context_init(&ohci->at_response_ctx, ohci,
 		     OHCI1394_AsRspTrContextControlSet, handle_at_packet);
 
 	reg_write(ohci, OHCI1394_IsoRecvIntMaskSet, ~0);

commit 5f22f2ebc5bd28c6a5501b1c0e47c0eda5b1c9db
Author: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date:   Sat Dec 22 22:14:52 2007 +0100

    firewire: fw-ohci: CycleTooLong interrupt management
    
    The firewire-ohci driver so far lacked the ability to resume cycle
    master duty after that condition happened, as added to ohci1394 in Linux
    2.6.18 by commit 57fdb58fa5a140bdd52cf4c4ffc30df73676f0a5.  This ports
    this patch to fw-ohci.
    
    The "cycle too long" condition has been seen in practice
      - with IIDC cameras if a mode with packets too large for a speed is
        chosen,
      - sporadically when capturing DV on a VIA VT6306 card with ohci1394/
        ieee1394/ raw1394/ dvgrab 2.
        https://bugzilla.redhat.com/show_bug.cgi?id=415841#c7
    (This does not fix Fedora bug 415841.)
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index a9f2d07..74d5d94 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -1079,6 +1079,13 @@ static irqreturn_t irq_handler(int irq, void *data)
 	if (unlikely(event & OHCI1394_postedWriteErr))
 		fw_error("PCI posted write error\n");
 
+	if (unlikely(event & OHCI1394_cycleTooLong)) {
+		if (printk_ratelimit())
+			fw_notify("isochronous cycle too long\n");
+		reg_write(ohci, OHCI1394_LinkControlSet,
+			  OHCI1394_LinkControl_cycleMaster);
+	}
+
 	if (event & OHCI1394_cycle64Seconds) {
 		cycle_time = reg_read(ohci, OHCI1394_IsochronousCycleTimer);
 		if ((cycle_time & 0x80000000) == 0)
@@ -1152,8 +1159,8 @@ static int ohci_enable(struct fw_card *card, u32 *config_rom, size_t length)
 		  OHCI1394_RQPkt | OHCI1394_RSPkt |
 		  OHCI1394_reqTxComplete | OHCI1394_respTxComplete |
 		  OHCI1394_isochRx | OHCI1394_isochTx |
-		  OHCI1394_postedWriteErr | OHCI1394_cycle64Seconds |
-		  OHCI1394_masterIntEnable);
+		  OHCI1394_postedWriteErr | OHCI1394_cycleTooLong |
+		  OHCI1394_cycle64Seconds | OHCI1394_masterIntEnable);
 
 	/* Activate link_on bit and contender bit in our self ID packets.*/
 	if (ohci_update_phy_reg(card, 4, 0,

commit c31a331aa8e073f15578423217fec270a0060ddc
Author: Rabin Vincent <rabin@rab.in>
Date:   Fri Dec 21 23:02:15 2007 +0530

    firewire: Fix extraction of source node id
    
    Fix extraction of the source node id from the packet header.
    
    Signed-off-by: Rabin Vincent <rabin@rab.in>
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c
index c00d4a9..8018c3b 100644
--- a/drivers/firewire/fw-transaction.c
+++ b/drivers/firewire/fw-transaction.c
@@ -650,7 +650,7 @@ fw_core_handle_request(struct fw_card *card, struct fw_packet *p)
 		 HEADER_GET_OFFSET_HIGH(p->header[1]) << 32) | p->header[2];
 	tcode       = HEADER_GET_TCODE(p->header[0]);
 	destination = HEADER_GET_DESTINATION(p->header[0]);
-	source      = HEADER_GET_SOURCE(p->header[0]);
+	source      = HEADER_GET_SOURCE(p->header[1]);
 
 	spin_lock_irqsave(&address_handler_lock, flags);
 	handler = lookup_enclosing_address_handler(&address_handler_list,

commit 3fa7597d1ee9a616ca39acb38f23fdc88168be80
Author: David Moore <dcm@MIT.EDU>
Date:   Wed Dec 19 15:26:38 2007 -0500

    firewire: fw-ohci: Bug fixes for packet-per-buffer support
    
    This patch corrects a number of bugs in the current OHCI 1.0
    packet-per-buffer support:
    
    1. Correctly deal with payloads that cross a page boundary.  The
    previous version would not split the descriptor at such a boundary,
    potentially corrupting unrelated memory.
    
    2. Allow user-space to specify multiple packets per struct
    fw_cdev_iso_packet in the same way that dual-buffer allows.  This is
    signaled by header_length being a multiple of header_size.  This
    multiple determines the number of packets.  The payload size allocated
    per packet is determined by dividing the total payload size by the
    number of packets.
    
    3. Make sync support work properly for packet-per-buffer.
    
    I have tested this patch with libdc1394 by forcing my OHCI 1.1
    controller to use the packet-per-buffer support instead of dual-buffer.
    
    I would greatly appreciate testing by those who have a DV devices and
    other types of iso streamers to make sure I didn't cause any
    regressions.
    
    Stefan, with this patch, I'm hoping that libdc1394 will work with all
    your OHCI 1.0 controllers now.
    
    The one bit of future work that remains for packet-per-buffer support is
    the automatic compaction of short payloads that I discussed with
    Kristian.
    
    Signed-off-by: David Moore <dcm@acm.org>
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index a44d16d..a9f2d07 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -1461,24 +1461,24 @@ static int handle_ir_packet_per_buffer(struct context *context,
 {
 	struct iso_context *ctx =
 		container_of(context, struct iso_context, context);
-	struct descriptor *pd = d + 1;
+	struct descriptor *pd;
 	__le32 *ir_header;
-	size_t header_length;
-	void *p, *end;
-	int i, z;
+	void *p;
+	int i;
 
-	if (pd->res_count == pd->req_count)
+	for (pd = d; pd <= last; pd++) {
+		if (pd->transfer_status)
+			break;
+	}
+	if (pd > last)
 		/* Descriptor(s) not done yet, stop iteration */
 		return 0;
 
-	header_length = le16_to_cpu(d->req_count);
-
 	i   = ctx->header_length;
-	z   = le32_to_cpu(pd->branch_address) & 0xf;
-	p   = d + z;
-	end = p + header_length;
+	p   = last + 1;
 
-	while (p < end && i + ctx->base.header_size <= PAGE_SIZE) {
+	if (ctx->base.header_size > 0 &&
+			i + ctx->base.header_size <= PAGE_SIZE) {
 		/*
 		 * The iso header is byteswapped to little endian by
 		 * the controller, but the remaining header quadlets
@@ -1487,14 +1487,11 @@ static int handle_ir_packet_per_buffer(struct context *context,
 		 */
 		*(u32 *) (ctx->header + i) = __swab32(*(u32 *) (p + 4));
 		memcpy(ctx->header + i + 4, p + 8, ctx->base.header_size - 4);
-		i += ctx->base.header_size;
-		p += ctx->base.header_size + 4;
+		ctx->header_length += ctx->base.header_size;
 	}
 
-	ctx->header_length = i;
-
-	if (le16_to_cpu(pd->control) & DESCRIPTOR_IRQ_ALWAYS) {
-		ir_header = (__le32 *) (d + z);
+	if (le16_to_cpu(last->control) & DESCRIPTOR_IRQ_ALWAYS) {
+		ir_header = (__le32 *) p;
 		ctx->base.callback(&ctx->base,
 				   le32_to_cpu(ir_header[0]) & 0xffff,
 				   ctx->header_length, ctx->header,
@@ -1502,7 +1499,6 @@ static int handle_ir_packet_per_buffer(struct context *context,
 		ctx->header_length = 0;
 	}
 
-
 	return 1;
 }
 
@@ -1853,67 +1849,70 @@ ohci_queue_iso_receive_packet_per_buffer(struct fw_iso_context *base,
 {
 	struct iso_context *ctx = container_of(base, struct iso_context, base);
 	struct descriptor *d = NULL, *pd = NULL;
-	struct fw_iso_packet *p;
+	struct fw_iso_packet *p = packet;
 	dma_addr_t d_bus, page_bus;
 	u32 z, header_z, rest;
-	int i, page, offset, packet_count, header_size;
-
-	if (packet->skip) {
-		d = context_get_descriptors(&ctx->context, 1, &d_bus);
-		if (d == NULL)
-			return -ENOMEM;
-
-		d->control = cpu_to_le16(DESCRIPTOR_STATUS |
-					 DESCRIPTOR_INPUT_LAST |
-					 DESCRIPTOR_BRANCH_ALWAYS |
-					 DESCRIPTOR_WAIT);
-		context_append(&ctx->context, d, 1, 0);
-	}
-
-	/* one descriptor for header, one for payload */
-	/* FIXME: handle cases where we need multiple desc. for payload */
-	z = 2;
-	p = packet;
+	int i, j, length;
+	int page, offset, packet_count, header_size, payload_per_buffer;
 
 	/*
 	 * The OHCI controller puts the status word in the
 	 * buffer too, so we need 4 extra bytes per packet.
 	 */
 	packet_count = p->header_length / ctx->base.header_size;
-	header_size  = packet_count * (ctx->base.header_size + 4);
+	header_size  = ctx->base.header_size + 4;
 
 	/* Get header size in number of descriptors. */
 	header_z = DIV_ROUND_UP(header_size, sizeof(*d));
 	page     = payload >> PAGE_SHIFT;
 	offset   = payload & ~PAGE_MASK;
-	rest     = p->payload_length;
+	payload_per_buffer = p->payload_length / packet_count;
 
 	for (i = 0; i < packet_count; i++) {
 		/* d points to the header descriptor */
+		z = DIV_ROUND_UP(payload_per_buffer + offset, PAGE_SIZE) + 1;
 		d = context_get_descriptors(&ctx->context,
-					    z + header_z, &d_bus);
+				z + header_z, &d_bus);
 		if (d == NULL)
 			return -ENOMEM;
 
-		d->control      = cpu_to_le16(DESCRIPTOR_INPUT_MORE);
+		d->control      = cpu_to_le16(DESCRIPTOR_STATUS |
+					      DESCRIPTOR_INPUT_MORE);
+		if (p->skip && i == 0)
+			d->control |= cpu_to_le16(DESCRIPTOR_WAIT);
 		d->req_count    = cpu_to_le16(header_size);
 		d->res_count    = d->req_count;
+		d->transfer_status = 0;
 		d->data_address = cpu_to_le32(d_bus + (z * sizeof(*d)));
 
-		/* pd points to the payload descriptor */
-		pd = d + 1;
+		rest = payload_per_buffer;
+		for (j = 1; j < z; j++) {
+			pd = d + j;
+			pd->control = cpu_to_le16(DESCRIPTOR_STATUS |
+						  DESCRIPTOR_INPUT_MORE);
+
+			if (offset + rest < PAGE_SIZE)
+				length = rest;
+			else
+				length = PAGE_SIZE - offset;
+			pd->req_count = cpu_to_le16(length);
+			pd->res_count = pd->req_count;
+			pd->transfer_status = 0;
+
+			page_bus = page_private(buffer->pages[page]);
+			pd->data_address = cpu_to_le32(page_bus + offset);
+
+			offset = (offset + length) & ~PAGE_MASK;
+			rest -= length;
+			if (offset == 0)
+				page++;
+		}
 		pd->control = cpu_to_le16(DESCRIPTOR_STATUS |
 					  DESCRIPTOR_INPUT_LAST |
 					  DESCRIPTOR_BRANCH_ALWAYS);
-		if (p->interrupt)
+		if (p->interrupt && i == packet_count - 1)
 			pd->control |= cpu_to_le16(DESCRIPTOR_IRQ_ALWAYS);
 
-		pd->req_count = cpu_to_le16(rest);
-		pd->res_count = pd->req_count;
-
-		page_bus = page_private(buffer->pages[page]);
-		pd->data_address = cpu_to_le32(page_bus + offset);
-
 		context_append(&ctx->context, d, z, header_z);
 	}
 

commit 736287c63aa037b675150d4e13af8f4d11912434
Author: David Moore <dcm@MIT.EDU>
Date:   Wed Dec 19 03:09:18 2007 -0500

    firewire: fw-ohci: Fix for dualbuffer three-or-more buffers
    
    This patch fixes the problem where different OHCI 1.1 controllers behave
    differently when a received iso packet straddles three or more buffers
    when using the dual-buffer receive mode.  Two changes are made in order
    to handle this situation:
    
    1. The packet sync DMA descriptor is given a non-zero header length and
    non-zero payload length.  This is because zero-payload descriptors are
    not discussed in the OHCI 1.1 specs and their behavior is thus
    undefined.  Instead we use a header size just large enough for a single
    header and a payload length of 4 bytes for this first descriptor.
    
    2. As we process received packets in the context's tasklet, read the
    packet length out of the headers.  Keep track of the running total of
    the packet length as "excess_bytes", so we can ignore any descriptors
    where no packet starts or ends.  These descriptors may not have had
    their first_res_count or second_res_count fields updated by the
    controller so we cannot rely on those values.
    
    The main drawback of this patch is that the excess_bytes value might get
    "out of sync" with the packet descriptors if something strange happens
    to the DMA program.  I'm not if such a thing could ever happen, but I
    appreciate any suggestions in making it more robust.
    
    Also, the packet-per-buffer support may need a similar fix to deal with
    issue 1, but I haven't done any work on that yet.
    
    Stefan, I'm hoping that with this patch, all your OHCI 1.1 controllers
    will work properly with an unmodified version of libdc1394.
    
    Signed-off-by: David Moore <dcm@acm.org>
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index 436a855..a44d16d 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -125,6 +125,7 @@ struct context {
 struct iso_context {
 	struct fw_iso_context base;
 	struct context context;
+	int excess_bytes;
 	void *header;
 	size_t header_length;
 };
@@ -1408,9 +1409,13 @@ static int handle_ir_dualbuffer_packet(struct context *context,
 	void *p, *end;
 	int i;
 
-	if (db->first_res_count > 0 && db->second_res_count > 0)
-		/* This descriptor isn't done yet, stop iteration. */
-		return 0;
+	if (db->first_res_count > 0 && db->second_res_count > 0) {
+		if (ctx->excess_bytes <= le16_to_cpu(db->second_req_count)) {
+			/* This descriptor isn't done yet, stop iteration. */
+			return 0;
+		}
+		ctx->excess_bytes -= le16_to_cpu(db->second_req_count);
+	}
 
 	header_length = le16_to_cpu(db->first_req_count) -
 		le16_to_cpu(db->first_res_count);
@@ -1429,11 +1434,15 @@ static int handle_ir_dualbuffer_packet(struct context *context,
 		*(u32 *) (ctx->header + i) = __swab32(*(u32 *) (p + 4));
 		memcpy(ctx->header + i + 4, p + 8, ctx->base.header_size - 4);
 		i += ctx->base.header_size;
+		ctx->excess_bytes +=
+			(le32_to_cpu(*(u32 *)(p + 4)) >> 16) & 0xffff;
 		p += ctx->base.header_size + 4;
 	}
-
 	ctx->header_length = i;
 
+	ctx->excess_bytes -= le16_to_cpu(db->second_req_count) -
+		le16_to_cpu(db->second_res_count);
+
 	if (le16_to_cpu(db->control) & DESCRIPTOR_IRQ_ALWAYS) {
 		ir_header = (__le32 *) (db + 1);
 		ctx->base.callback(&ctx->base,
@@ -1775,19 +1784,6 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
 	 * packet, retransmit or terminate..
 	 */
 
-	if (packet->skip) {
-		d = context_get_descriptors(&ctx->context, 2, &d_bus);
-		if (d == NULL)
-			return -ENOMEM;
-
-		db = (struct db_descriptor *) d;
-		db->control = cpu_to_le16(DESCRIPTOR_STATUS |
-					  DESCRIPTOR_BRANCH_ALWAYS |
-					  DESCRIPTOR_WAIT);
-		db->first_size = cpu_to_le16(ctx->base.header_size + 4);
-		context_append(&ctx->context, d, 2, 0);
-	}
-
 	p = packet;
 	z = 2;
 
@@ -1815,11 +1811,18 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
 		db->control = cpu_to_le16(DESCRIPTOR_STATUS |
 					  DESCRIPTOR_BRANCH_ALWAYS);
 		db->first_size = cpu_to_le16(ctx->base.header_size + 4);
-		db->first_req_count = cpu_to_le16(header_size);
+		if (p->skip && rest == p->payload_length) {
+			db->control |= cpu_to_le16(DESCRIPTOR_WAIT);
+			db->first_req_count = db->first_size;
+		} else {
+			db->first_req_count = cpu_to_le16(header_size);
+		}
 		db->first_res_count = db->first_req_count;
 		db->first_buffer = cpu_to_le32(d_bus + sizeof(*db));
 
-		if (offset + rest < PAGE_SIZE)
+		if (p->skip && rest == p->payload_length)
+			length = 4;
+		else if (offset + rest < PAGE_SIZE)
 			length = rest;
 		else
 			length = PAGE_SIZE - offset;
@@ -1835,7 +1838,8 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
 		context_append(&ctx->context, d, z, header_z);
 		offset = (offset + length) & ~PAGE_MASK;
 		rest -= length;
-		page++;
+		if (offset == 0)
+			page++;
 	}
 
 	return 0;

commit 485c755abaec14690375eaf2697d187cc7d39903
Author: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date:   Sun Dec 16 17:32:11 2007 +0100

    firewire: fw-sbp2: remove unused misleading macro
    
    SBP2_MAX_SECTORS is nowhere used in fw-sbp2.
    It merely got copied over from sbp2 where it played a role in the past.
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 0b458e2..6064c6e 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -151,9 +151,7 @@ struct sbp2_target {
 };
 
 #define SBP2_MAX_SG_ELEMENT_LENGTH	0xf000
-#define SBP2_MAX_SECTORS		255	/* Max sectors supported */
 #define SBP2_ORB_TIMEOUT		2000	/* Timeout in ms */
-
 #define SBP2_ORB_NULL			0x80000000
 
 #define SBP2_DIRECTION_TO_MEDIA		0x0

commit 1cc5d8ba2bcafe54fa17337d299fa474685eda89
Author: Jay Fenlason <fenlason@redhat.com>
Date:   Wed Nov 7 17:39:00 2007 -0500

    firewire: fw-sbp2: quiet logout errors on device removal
    
    This suppresses both reply timed out and management write failed
    errors on LOGOUT requests.
    
    Signed-off-by: Jay Fenlason <fenlason@redhat.com>
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index aa0e89c..0b458e2 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -540,14 +540,26 @@ sbp2_send_management_orb(struct sbp2_logical_unit *lu, int node_id,
 
 	retval = -EIO;
 	if (sbp2_cancel_orbs(lu) == 0) {
-		fw_error("orb reply timed out, rcode=0x%02x\n",
-			 orb->base.rcode);
+		/*
+		 * Logout requests frequently get sent to devices that aren't
+		 * there any more, resulting in extraneous error messages in
+		 * the logs.  Unfortunately, this means logout requests that
+		 * actually fail don't get logged.
+		 */
+		if (function != SBP2_LOGOUT_REQUEST)
+			fw_error("orb reply timed out, rcode=0x%02x\n",
+				 orb->base.rcode);
 		goto out;
 	}
 
 	if (orb->base.rcode != RCODE_COMPLETE) {
-		fw_error("management write failed, rcode 0x%02x\n",
-			 orb->base.rcode);
+		/*
+		 * On device removal from the bus, sometimes the logout
+		 * request times out, sometimes it just fails.
+		 */
+		if (function != SBP2_LOGOUT_REQUEST)
+			fw_error("management write failed, rcode 0x%02x\n",
+				 orb->base.rcode);
 		goto out;
 	}
 

commit 2f0b83b7b1d9f304e8d2805a2922168848f56d8f
Author: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date:   Tue Jan 15 21:10:50 2008 +0100

    firewire: fw-sbp2: prepare for s/g chaining
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 35f47a2..aa0e89c 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -1107,9 +1107,9 @@ sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device,
 	 * elements larger than 65535 bytes, some IOMMUs may merge sg elements
 	 * during DMA mapping, and Linux currently doesn't prevent this.
 	 */
-	for (i = 0, j = 0; i < count; i++) {
-		sg_len = sg_dma_len(sg + i);
-		sg_addr = sg_dma_address(sg + i);
+	for (i = 0, j = 0; i < count; i++, sg = sg_next(sg)) {
+		sg_len = sg_dma_len(sg);
+		sg_addr = sg_dma_address(sg);
 		while (sg_len) {
 			/* FIXME: This won't get us out of the pinch. */
 			if (unlikely(j >= ARRAY_SIZE(orb->page_table))) {

commit aa982a37874003320f2399395a6839e74553f5e3
Author: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date:   Wed Nov 7 01:12:51 2007 +0100

    firewire: fw-sbp2: refactor workq and kref handling
    
    This somewhat reduces the size of firewire-sbp2.ko.
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 624ff3e..35f47a2 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -628,6 +628,21 @@ static void sbp2_release_target(struct kref *kref)
 
 static struct workqueue_struct *sbp2_wq;
 
+/*
+ * Always get the target's kref when scheduling work on one its units.
+ * Each workqueue job is responsible to call sbp2_target_put() upon return.
+ */
+static void sbp2_queue_work(struct sbp2_logical_unit *lu, unsigned long delay)
+{
+	if (queue_delayed_work(sbp2_wq, &lu->work, delay))
+		kref_get(&lu->tgt->kref);
+}
+
+static void sbp2_target_put(struct sbp2_target *tgt)
+{
+	kref_put(&tgt->kref, sbp2_release_target);
+}
+
 static void sbp2_reconnect(struct work_struct *work);
 
 static void sbp2_login(struct work_struct *work)
@@ -649,16 +664,12 @@ static void sbp2_login(struct work_struct *work)
 
 	if (sbp2_send_management_orb(lu, node_id, generation,
 				SBP2_LOGIN_REQUEST, lu->lun, &response) < 0) {
-		if (lu->retries++ < 5) {
-			if (queue_delayed_work(sbp2_wq, &lu->work,
-					       DIV_ROUND_UP(HZ, 5)))
-				kref_get(&lu->tgt->kref);
-		} else {
+		if (lu->retries++ < 5)
+			sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5));
+		else
 			fw_error("failed to login to %s LUN %04x\n",
 				 unit->device.bus_id, lu->lun);
-		}
-		kref_put(&lu->tgt->kref, sbp2_release_target);
-		return;
+		goto out;
 	}
 
 	lu->generation        = generation;
@@ -700,7 +711,8 @@ static void sbp2_login(struct work_struct *work)
 		lu->sdev = sdev;
 		scsi_device_put(sdev);
 	}
-	kref_put(&lu->tgt->kref, sbp2_release_target);
+ out:
+	sbp2_target_put(lu->tgt);
 }
 
 static int sbp2_add_logical_unit(struct sbp2_target *tgt, int lun_entry)
@@ -865,18 +877,13 @@ static int sbp2_probe(struct device *dev)
 
 	get_device(&unit->device);
 
-	/*
-	 * We schedule work to do the login so we can easily
-	 * reschedule retries. Always get the ref before scheduling
-	 * work.
-	 */
+	/* Do the login in a workqueue so we can easily reschedule retries. */
 	list_for_each_entry(lu, &tgt->lu_list, link)
-		if (queue_delayed_work(sbp2_wq, &lu->work, 0))
-			kref_get(&tgt->kref);
+		sbp2_queue_work(lu, 0);
 	return 0;
 
  fail_tgt_put:
-	kref_put(&tgt->kref, sbp2_release_target);
+	sbp2_target_put(tgt);
 	return -ENOMEM;
 
  fail_shost_put:
@@ -889,7 +896,7 @@ static int sbp2_remove(struct device *dev)
 	struct fw_unit *unit = fw_unit(dev);
 	struct sbp2_target *tgt = unit->device.driver_data;
 
-	kref_put(&tgt->kref, sbp2_release_target);
+	sbp2_target_put(tgt);
 	return 0;
 }
 
@@ -915,10 +922,8 @@ static void sbp2_reconnect(struct work_struct *work)
 			lu->retries = 0;
 			PREPARE_DELAYED_WORK(&lu->work, sbp2_login);
 		}
-		if (queue_delayed_work(sbp2_wq, &lu->work, DIV_ROUND_UP(HZ, 5)))
-			kref_get(&lu->tgt->kref);
-		kref_put(&lu->tgt->kref, sbp2_release_target);
-		return;
+		sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5));
+		goto out;
 	}
 
 	lu->generation        = generation;
@@ -930,8 +935,8 @@ static void sbp2_reconnect(struct work_struct *work)
 
 	sbp2_agent_reset(lu);
 	sbp2_cancel_orbs(lu);
-
-	kref_put(&lu->tgt->kref, sbp2_release_target);
+ out:
+	sbp2_target_put(lu->tgt);
 }
 
 static void sbp2_update(struct fw_unit *unit)
@@ -947,8 +952,7 @@ static void sbp2_update(struct fw_unit *unit)
 	 */
 	list_for_each_entry(lu, &tgt->lu_list, link) {
 		lu->retries = 0;
-		if (queue_delayed_work(sbp2_wq, &lu->work, 0))
-			kref_get(&tgt->kref);
+		sbp2_queue_work(lu, 0);
 	}
 }
 

-- 
Stefan Richter
-=====-==--- ---= =---=
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* What's in linux1394-2.6.git?
@ 2010-02-25 21:12 Stefan Richter
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Richter @ 2010-02-25 21:12 UTC (permalink / raw)
  To: linux1394-devel; +Cc: linux-kernel

Hi all,

if there are no objections, I will see to get the following pulled into
the mainline early next week:

  - three cycle timer related enhancements (hence mostly audio related):
    hardware quirk fix for reliable cycle timer register access,
    "quirks" module parameter for firewire-ohci, choice of clock for
    local time in the read-cycle-timer ioctl,

  - a few fixes (minor ones as far as I can tell),

  - some refactoring like the config ROM text leaf accessor and dead
    code removal.

Clemens Ladisch (2):
      firewire: add fw_csr_string() helper function
      firewire: ohci: work around cycle timer bugs on VIA controllers

Németh Márton (1):
      firewire: make PCI device id constant

Stefan Richter (21):
      firewire: core: fw_csr_string addendum
      firewire: qualify config ROM cache pointers as const pointers
      firewire: ohci: enable cycle timer fix on ALi and NEC controllers
      firewire: get_cycle_timer optimization and cleanup
      firewire: remove incomplete Bus_Time CSR support
      Merge tag 'v2.6.33' for its firewire changes since last branch point
      firewire: core: fix "giving up on config rom" with Panasonic AG-DV2500
      firewire: core: don't fail device creation in case of too large config ROM blocks
      firewire: core: increase stack size of config ROM reader
      firewire: core: fix an information leak
      firewire: core: rename an internal function
      firewire: cdev: add more flexible cycle timer ioctl
      firewire: cdev: increment ABI version number
      firewire: core: change type of a data buffer
      firewire: core: combine a bit of repeated code
      firewire: ohci: remove unused dualbuffer IR code
      firewire: ohci: reorder struct fw_ohci for better cache efficiency
      firewire: ohci: use an ID table for quirks detection
      firewire: ohci: add module parameter to activate quirk fixes
      firewire: ohci: fix IR/IT context mask mixup
      firewire: ohci: extend initialization log message

 drivers/firewire/core-cdev.c            |  368 +++++++++++++++----------------
 drivers/firewire/core-device.c          |  198 +++++++++++------
 drivers/firewire/core-transaction.c     |   17 +-
 drivers/firewire/core.h                 |    2 +-
 drivers/firewire/ohci.c                 |  364 ++++++++++--------------------
 drivers/firewire/sbp2.c                 |    5 +-
 drivers/media/dvb/firewire/firedtv-fw.c |   39 +---
 include/linux/firewire-cdev.h           |   40 +++-
 include/linux/firewire.h                |   11 +-
 include/linux/pci_ids.h                 |    1 -
 10 files changed, 493 insertions(+), 552 deletions(-)

-- 
Stefan Richter
-=====-==-=- --=- ==--=
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* What's in linux1394-2.6.git?
@ 2009-11-24 17:34 Stefan Richter
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Richter @ 2009-11-24 17:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel

Here is a summary of what is currently queued up in

    git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git

and also visible in linux-next.  Gitweb:

    http://git.kernel.org/?p=linux/kernel/git/ieee1394/linux1394-2.6.git


fixes branch
============

These are two fixes which make the new firewire driver stack
interoperable with FFADO, the userspace drivers for FireWire audio
interfaces.  I will ask Linus to pull this branch later this week, in
hope to get these fixes released in 2.6.32.

In addition to these two kernel fixes, there are also some updates to
the firewire-core backend of libraw1394 necessary to make it work with
FFADO.  At the moment these proposed updates are queued up at the
"testing" branch of

    git://git.kernel.org/pub/scm/libs/ieee1394/libraw1394.git testing

Here is the shortlog and diffstat of the fixes branch; full log and diff
follow at the end of this message:

Jay Fenlason (2):
      firewire: ohci: Make cycleMatch ISO transmission work
      firewire: ohci: pass correct iso xmit timestamps to core

 drivers/firewire/ohci.c |   41 +++++++++++++++++++++++++++++++++-----
 1 files changed, 35 insertions(+), 6 deletions(-)

Many thanks to Jay for debugging and fixing these issues.

Some more kernel work will be neessary for fully satisfactory support of
FireWire audio interfaces:  Multiplex FCP requests as necessary for
multiple device support; implement variable split transaction time-out;
longer-term: implement a kernelspace streaming component for FFADO (some
groundwork has been done in a GSoC project).


master branch
=============

This is for the post 2.6.32 merge window.  We have got minor fixes and
tweaks, among them reduced stack usage in ioctls and and a considerable
reduction of stack usage in the bus reset handler tasklet.

Akinobu Mita (1):
      ieee1394: Use hweight32

Stefan Richter (9):
      firewire: cdev: fix memory leak in an error path
      firewire: normalize style of queue_work wrappers
      firewire: cdev: normalize variable names
      firewire: optimize config ROM creation
      firewire: core: clarify generate_config_rom usage
      firewire: core: optimize Topology Map creation
      firewire: core: WARN on wrong usage of core transaction functions
      firewire: ohci: 0 may be a valid DMA address
      firewire: cdev: reduce stack usage by ioctl_dispatch

 drivers/firewire/core-card.c        |   75 ++++++++----------
 drivers/firewire/core-cdev.c        |  113 ++++++++++++++++-----------
 drivers/firewire/core-topology.c    |   17 +++--
 drivers/firewire/core-transaction.c |   19 ++---
 drivers/firewire/core.h             |    9 +-
 drivers/firewire/ohci.c             |   39 ++++++----
 drivers/firewire/sbp2.c             |    9 ++-
 drivers/ieee1394/ohci1394.c         |    8 +--
 include/linux/firewire.h            |   17 +----
 9 files changed, 159 insertions(+), 147 deletions(-)


firedtv branch
==============

This is only a temporary branch with updates of the FireDTV DVB driver.
These updates are currently picked up by Mauro and will go into the
mainline via the V4L-DVB tree.  Most notably, the firedtv driver is now
finally ported from the old ieee1394 stack to the new firewire stack.
Depending on which one or two of the stacks are chosen in Kconfig, the
firedtv driver is built with an interface to one or both of the stacks.

Stefan Richter (11):
      firedtv: move remote control workqueue handling into rc source file
      firedtv: reform lock transaction backend call
      firedtv: add missing include, rename a constant
      firedtv: port to new firewire core
      firedtv: shrink buffer pointer table
      firedtv: packet requeuing is likely to succeed
      firedtv: remove an unnecessary function argument
      Merge tag 'v2.6.32-rc8' into firedtv
      firedtv: do not DMA-map stack addresses
      firedtv: remove check for interrupting signal
      firedtv: reduce memset()s

 drivers/media/dvb/firewire/Kconfig        |    7 +-
 drivers/media/dvb/firewire/Makefile       |    1 +
 drivers/media/dvb/firewire/firedtv-1394.c |   42 +-
 drivers/media/dvb/firewire/firedtv-avc.c  |  566 +++++++++++----------
 drivers/media/dvb/firewire/firedtv-dvb.c  |   16 +-
 drivers/media/dvb/firewire/firedtv-fw.c   |  376 ++++++++++++++
 drivers/media/dvb/firewire/firedtv-rc.c   |    2 +
 drivers/media/dvb/firewire/firedtv.h      |   23 +-
 8 files changed, 746 insertions(+), 287 deletions(-)
 create mode 100644 drivers/media/dvb/firewire/firedtv-fw.c


And here are the two patches from the "fixes" branch because they
weren't posted to LKML yet:

commit 31769cef2e973544164aa7d0db2e2024660d5e21
Author: Jay Fenlason <fenlason@redhat.com>
Date:   Sat Nov 21 00:05:56 2009 +0100

    firewire: ohci: pass correct iso xmit timestamps to core
    
    Here is the final set of patches I used to get ffado to work with the
    new firewire stack.  With these patches, I was able to start ardour
    and record from and playback to my PreSonus Inspire1394 from a
    (mostly) Fedora 12 system.
    
    Signed-off-by: Jay Fenlason <fenlason@redhat.com>
    
    Until now, firewire-ohci exposed only the transmit cycle of the last
    transmitted packet at each isochronous transmit complete event.  This
    made it impossible for FFADO (FireWire audio drivers in userspace) to
    synchronize audio-out streams.  The fix is to store the timestamp of
    each packet in the iso xmit event.  As a bonus, the transfer status is
    stored too.
    
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index c07cfad..94260aa 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -1904,15 +1904,30 @@ static int handle_it_packet(struct context *context,
 {
 	struct iso_context *ctx =
 		container_of(context, struct iso_context, context);
+	int i;
+	struct descriptor *pd;
 
-	if (last->transfer_status == 0)
-		/* This descriptor isn't done yet, stop iteration. */
+	for (pd = d; pd <= last; pd++)
+		if (pd->transfer_status)
+			break;
+	if (pd > last)
+		/* Descriptor(s) not done yet, stop iteration */
 		return 0;
 
-	if (le16_to_cpu(last->control) & DESCRIPTOR_IRQ_ALWAYS)
+	i = ctx->header_length;
+	if (i + 4 < PAGE_SIZE) {
+		/* Present this value as big-endian to match the receive code */
+		*(__be32 *)(ctx->header + i) = cpu_to_be32(
+				((u32)le16_to_cpu(pd->transfer_status) << 16) |
+				le16_to_cpu(pd->res_count));
+		ctx->header_length += 4;
+	}
+	if (le16_to_cpu(last->control) & DESCRIPTOR_IRQ_ALWAYS) {
 		ctx->base.callback(&ctx->base, le16_to_cpu(last->res_count),
-				   0, NULL, ctx->base.callback_data);
-
+				   ctx->header_length, ctx->header,
+				   ctx->base.callback_data);
+		ctx->header_length = 0;
+	}
 	return 1;
 }
 

commit 5ed1f321a71b8549cc2eea26c94fe7943ed01d31
Author: Jay Fenlason <fenlason@redhat.com>
Date:   Tue Nov 17 12:29:17 2009 -0500

    firewire: ohci: Make cycleMatch ISO transmission work
    
    Calling the START_ISO ioctl with a nonnegative cycle paramater has
    never worked.  Last night I got around to figuring out why.  Most of
    this patch is a big comment explaining why we enable an interrupt
    source then don't actually do anything when we get one.  As the
    comment says, we should do more, but we don't have a way to tell
    userspace what happened. . .
    
    Signed-off-by: Jay Fenlason <fenlason@redhat.com>
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (edited comment)

diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 5d52425..c07cfad 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -275,7 +275,7 @@ static void log_irqs(u32 evt)
 	    !(evt & OHCI1394_busReset))
 		return;
 
-	fw_notify("IRQ %08x%s%s%s%s%s%s%s%s%s%s%s%s%s\n", evt,
+	fw_notify("IRQ %08x%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", evt,
 	    evt & OHCI1394_selfIDComplete	? " selfID"		: "",
 	    evt & OHCI1394_RQPkt		? " AR_req"		: "",
 	    evt & OHCI1394_RSPkt		? " AR_resp"		: "",
@@ -286,6 +286,7 @@ static void log_irqs(u32 evt)
 	    evt & OHCI1394_postedWriteErr	? " postedWriteErr"	: "",
 	    evt & OHCI1394_cycleTooLong		? " cycleTooLong"	: "",
 	    evt & OHCI1394_cycle64Seconds	? " cycle64Seconds"	: "",
+	    evt & OHCI1394_cycleInconsistent	? " cycleInconsistent"	: "",
 	    evt & OHCI1394_regAccessFail	? " regAccessFail"	: "",
 	    evt & OHCI1394_busReset		? " busReset"		: "",
 	    evt & ~(OHCI1394_selfIDComplete | OHCI1394_RQPkt |
@@ -293,6 +294,7 @@ static void log_irqs(u32 evt)
 		    OHCI1394_respTxComplete | OHCI1394_isochRx |
 		    OHCI1394_isochTx | OHCI1394_postedWriteErr |
 		    OHCI1394_cycleTooLong | OHCI1394_cycle64Seconds |
+		    OHCI1394_cycleInconsistent |
 		    OHCI1394_regAccessFail | OHCI1394_busReset)
 						? " ?"			: "");
 }
@@ -1439,6 +1441,17 @@ static irqreturn_t irq_handler(int irq, void *data)
 			  OHCI1394_LinkControl_cycleMaster);
 	}
 
+	if (unlikely(event & OHCI1394_cycleInconsistent)) {
+		/*
+		 * We need to clear this event bit in order to make
+		 * cycleMatch isochronous I/O work.  In theory we should
+		 * stop active cycleMatch iso contexts now and restart
+		 * them at least two cycles later.  (FIXME?)
+		 */
+		if (printk_ratelimit())
+			fw_notify("isochronous cycle inconsistent\n");
+	}
+
 	if (event & OHCI1394_cycle64Seconds) {
 		cycle_time = reg_read(ohci, OHCI1394_IsochronousCycleTimer);
 		if ((cycle_time & 0x80000000) == 0)
@@ -1528,6 +1541,7 @@ static int ohci_enable(struct fw_card *card, u32 *config_rom, size_t length)
 		  OHCI1394_reqTxComplete | OHCI1394_respTxComplete |
 		  OHCI1394_isochRx | OHCI1394_isochTx |
 		  OHCI1394_postedWriteErr | OHCI1394_cycleTooLong |
+		  OHCI1394_cycleInconsistent |
 		  OHCI1394_cycle64Seconds | OHCI1394_regAccessFail |
 		  OHCI1394_masterIntEnable);
 	if (param_debug & OHCI_PARAM_DEBUG_BUSRESETS)
-- 
Stefan Richter
-=====-==--= =-== ==---
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: What's in linux1394-2.6.git?
  2009-06-14 10:46 Stefan Richter
@ 2009-06-14 10:48 ` Stefan Richter
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Richter @ 2009-06-14 10:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel

I wrote:
> Batch 2: for-linus..for-next
> ============================
> 
> This contains Jay Fenlason's IPv4-over-1394 driver,

A note to those who pulled linux1394-2.6.git's "net" branch in the last
few days:  I deleted this branch, and for-next is not an ancestor of it
requeued the IPv4 patches to after the latest firewire-core updates.
-- 
Stefan Richter
-=====-==--= -==- -===-
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* What's in linux1394-2.6.git?
@ 2009-06-14 10:46 Stefan Richter
  2009-06-14 10:48 ` Stefan Richter
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Richter @ 2009-06-14 10:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel

There are two batches in the FireWire/ IEEE 1394 repo, one to be merged
soon, and another one which I'm not entirely sure of yet.  Both batches
deal with the newer firewire drivers only, the older ieee1394 stack is
left untouched this time.

As usual, the updates can be fetched from
    git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
or browsed at
    http://git.kernel.org/?p=linux/kernel/git/ieee1394/linux1394-2.6.git

I will send a pull request for the 1st batch in the next few days.

Batch 1: origin..for-linus
==========================

This contains (1.) a few small fixes, (2.) a small addition to
firewire-core's sysfs ABI in order to considerably simplify udev rules
to set /dev/fw* ownership and ACLs, and (3.) preparations to add more
drivers. Of these preparations, the bigger functional enhancements were
actually already merged in 2.6.30-rc1; the remaining ones are small
functional additions and a total reorganization of files, as you can see
in the diffstat.

After the udev related change went into mainline, I will send the
respective udev rules update to linux-hotplug for inclusion into
mainline udev.

Stefan Richter (14):
      firewire: core: improve check for local node
      firewire: core: check for missing struct update at build time, not run time
      firewire: core: add sysfs attribute for easier udev rules
      firewire: share device ID table type with ieee1394
      firewire: also use vendor ID in root directory for driver matches
      firewire: ohci: access bus_seconds atomically
      firewire: clean up includes
      firewire: reorganize header files
      firewire: rename source files
      firewire: add parent-of-unit accessor
      firewire: core: include linux/uaccess.h instead of asm/uaccess.h
      firewire: core: prepare for non-core children of card devices
      firewire: core: don't update Broadcast_Channel if RFC 2734 conditions aren't met
      firewire: core: use more outbound tlabels

 drivers/firewire/Makefile                          |    8 +-
 drivers/firewire/{fw-card.c => core-card.c}        |   25 +-
 drivers/firewire/{fw-cdev.c => core-cdev.c}        |   13 +-
 drivers/firewire/{fw-device.c => core-device.c}    |  154 ++++-
 drivers/firewire/{fw-iso.c => core-iso.c}          |    6 +-
 .../firewire/{fw-topology.c => core-topology.c}    |   24 +-
 .../{fw-transaction.c => core-transaction.c}       |   36 +-
 drivers/firewire/core.h                            |  293 ++++++++
 drivers/firewire/fw-device.h                       |  202 -----
 drivers/firewire/fw-topology.h                     |   77 --
 drivers/firewire/fw-transaction.h                  |  446 ------------
 drivers/firewire/{fw-ohci.c => ohci.c}             |   19 +-
 drivers/firewire/{fw-ohci.h => ohci.h}             |    6 +-
 drivers/firewire/{fw-sbp2.c => sbp2.c}             |   58 +-
 include/linux/firewire.h                           |  357 +++++++++
 15 files changed, 898 insertions(+), 826 deletions(-)
 rename drivers/firewire/{fw-card.c => core-card.c} (97%)
 rename drivers/firewire/{fw-cdev.c => core-cdev.c} (99%)
 rename drivers/firewire/{fw-device.c => core-device.c} (88%)
 rename drivers/firewire/{fw-iso.c => core-iso.c} (99%)
 rename drivers/firewire/{fw-topology.c => core-topology.c} (97%)
 rename drivers/firewire/{fw-transaction.c => core-transaction.c} (98%)
 create mode 100644 drivers/firewire/core.h
 delete mode 100644 drivers/firewire/fw-device.h
 delete mode 100644 drivers/firewire/fw-topology.h
 delete mode 100644 drivers/firewire/fw-transaction.h
 rename drivers/firewire/{fw-ohci.c => ohci.c} (99%)
 rename drivers/firewire/{fw-ohci.h => ohci.h} (98%)
 rename drivers/firewire/{fw-sbp2.c => sbp2.c} (97%)
 create mode 100644 include/linux/firewire.h


Batch 2: for-linus..for-next
============================

This contains Jay Fenlason's IPv4-over-1394 driver, which is one of the
last two or so bigger steps to make drivers/firewire/ a functional superset
of drivers/ieee1394/.  Alas, the code in here has not been seen on LKML
yet, and I recently encountered some stability issues in stress tests of
the driver.

Jay Fenlason (1):
      firewire: add IPv4 support

Stefan Richter (5):
      firewire: net: add Kconfig item, rename driver
      firewire: net: style changes
      firewire: net: allow for unordered unit discovery
      firewire: net: remove unused code
      firewire: net: adjust net_device ops

 drivers/firewire/Kconfig     |   12 +
 drivers/firewire/Makefile    |    4 +-
 drivers/firewire/core-card.c |    2 +
 drivers/firewire/core-iso.c  |    7 +
 drivers/firewire/core.h      |   87 --
 drivers/firewire/net.c       | 1655 ++++++++++++++++++++++++++++++++++
 drivers/ieee1394/Kconfig     |    2 +-
 include/linux/firewire.h     |   87 ++
 8 files changed, 1767 insertions(+), 89 deletions(-)
 create mode 100644 drivers/firewire/net.c

-- 
Stefan Richter
-=====-==--= -==- -===-
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* What's in linux1394-2.6.git?
@ 2009-03-17 21:11 Stefan Richter
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Richter @ 2009-03-17 21:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel

The following list of firewire subsystem changes are planned to be
included in the next pull request.  We basically have a number of
firewire-core feature extensions, primarily for userspace drivers,
secondarily for kernelspace drivers.  These extensions are essential for
the firewire backend of libdc1394 and good-to-have for the firewire
backend of libraw1394.

With these changes, functionality of libdc1394 on the newer firewire
driver stack not only catches up to libdc1394 on the classic ieee1394
stack but surpasses it.  (On Linux, libdc1394 is the basic framework for
IIDC based video acquisition in industrial and research settings.)

Jay Fenlason deserves most of the credit for the queued-up work.  He
also implemented several of the firewire-cdev extensions first; I merely
redid them based on his implementation.

David Moore (1):
      firewire: Include iso timestamp in headers when header_size > 4

Jay Fenlason (4):
      firewire: add a client_list_lock
      firewire: cdev: use an idr rather than a linked list for resources
      firewire: implement asynchronous stream transmission
      firewire: broadcast channel support

Jay Fenlason, Stefan Richter (2):
      firewire: cdev: add ioctls for isochronous resource management
      firewire: cdev: add ioctl for broadcast write requests

Stefan Richter (44):
      firewire: convert client_list_lock to mutex
      firewire: cdev: documentation fixlet
      firewire: cdev: tcodes input validation
      firewire: cdev: fix race of fw_device_op_release with bus reset
      firewire: cdev: address handler input validation
      firewire: core: remove outdated comment
      firewire: core: remove obsolete assertions
      firewire: standardize a variable name
      firewire: remove line breaks before function names
      firewire: core: remove unused definitions
      firewire: cdev: use list_first_entry
      firewire: prevent creation of multiple IR DMA contexts for the same channel
      firewire: cdev: fix documentation of FW_CDEV_IOC_GET_INFO
      firewire: cdev: reference-count client instances
      firewire: cdev: unify names of struct types and of their instances
      firewire: cdev: sort includes
      firewire: core: topology header fix
      firewire: cdev: add ioctls for manual iso resource management
      firewire: cdev: add ioctl to query maximum transmission speed
      firewire: cdev: restrict broadcast write requests to Units Space
      firewire: cdev: extend transaction payload size check
      firewire: cdev: replace some spin_lock_irqsave by spin_lock_irq
      firewire: cdev: shut down iso context before freeing the buffer
      firewire: cdev: increment fw_cdev_version, update documentation
      firewire: cdev: add ioctls for iso resource management, amendment
      firewire: cdev: simplify a schedule_delayed_work wrapper
      firewire: core: clean up includes
      firewire: core: move some functions
      firewire: core: remove condition which is always false
      firewire: normalize a variable name
      firewire: core: normalize a function argument name
      firewire: cdev: amendment to "add ioctl to query maximum transmission speed"
      firewire: cdev: secure add_descriptor ioctl
      firewire: cdev: fix race of ioctl_send_request with bus reset
      firewire: cdev: simplify FW_CDEV_IOC_SEND_REQUEST return value
      firewire: cdev: add closure to async stream ioctl
      firewire: core: drop unused call parameters of close_transaction
      firewire: core: increase bus manager grace period
      firewire: core: simplify broadcast channel allocation
      firewire: core: optimize propagation of BROADCAST_CHANNEL
      ieee1394: sbp2: follow up on "ieee1394: inherit ud vendor_id from node vendor_id"
      ieee1394: raw1394: add sparse annotations to raw1394_compat_write
      ieee1394: constify device ID tables
      DVB: firedtv: fix printk format mismatch

Tobias Klauser (1):
      ieee1394: Storage class should be before const qualifier

 drivers/firewire/fw-card.c               |  149 +++--
 drivers/firewire/fw-cdev.c               | 1044 +++++++++++++++++++++---------
 drivers/firewire/fw-device.c             |  203 ++++---
 drivers/firewire/fw-device.h             |   23 +-
 drivers/firewire/fw-iso.c                |  227 ++++++-
 drivers/firewire/fw-ohci.c               |  260 ++++----
 drivers/firewire/fw-sbp2.c               |   57 +-
 drivers/firewire/fw-topology.c           |   29 +-
 drivers/firewire/fw-topology.h           |   19 +-
 drivers/firewire/fw-transaction.c        |  185 +++---
 drivers/firewire/fw-transaction.h        |  138 ++---
 drivers/ieee1394/csr.c                   |    8 +-
 drivers/ieee1394/dv1394.c                |    2 +-
 drivers/ieee1394/eth1394.c               |    4 +-
 drivers/ieee1394/highlevel.c             |    2 +-
 drivers/ieee1394/nodemgr.c               |    4 +-
 drivers/ieee1394/nodemgr.h               |    2 +-
 drivers/ieee1394/raw1394.c               |   14 +-
 drivers/ieee1394/sbp2.c                  |    9 +-
 drivers/ieee1394/video1394.c             |    2 +-
 drivers/media/dvb/firewire/firedtv-avc.c |    4 +-
 include/linux/firewire-cdev.h            |  218 ++++++-
 22 files changed, 1679 insertions(+), 924 deletions(-)

-- 
Stefan Richter
-=====-==--= --== =---=
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* What's in linux1394-2.6.git?
@ 2008-12-22 20:59 Stefan Richter
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Richter @ 2008-12-22 20:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel

Well, more interesting is what's /not/ yet in linux1394-2.6.git but will
hopefully be ready for the post-2.6.28 merge window, and that's the
following changes to the <linux/firewire-cdev.h> ABI:
  - Add ioctls for isochronous resource management,
  - add ioctl for broadcast write requests,
  - add ioctl for iso context removal, allow more than one iso context
    per fd.  (This is the least important feature though.)

Jay Fenlason has had implementations of all of these for a while now, I
just need to bring them up-to-date with the latest fw-cdev changes,
notably the client resource idr change.

So, I hope to have some substantial additions ready soon, on top of what
/is/ in linux1394-2.6.git at the moment:

David Moore (1):
      firewire: Include iso timestamp in headers when header_size > 4

Frans Pop (1):
      ieee1394: ohci1394: don't leave interrupts enabled during suspend/resume

Harvey Harrison (7):
      ieee1394: consolidate uses of IEEE1934_BUSID_MAGIC
      ieee1394: pcilynx: trivial endian annotation
      ieee1394: replace CSR_SET_BUS_INFO_GENERATION macro
      ieee1394: mark bus_info_data as a __be32 array
      ieee1394: eth1394: trivial sparse annotations
      ieee1394: dv1394 annotate frame input/output structs as little endian
      ieee1934: dv1394: interrupt enabling/disabling broken on big-endian

Jay Fenlason (3):
      firewire: add a client_list_lock
      firewire: typo in comment
      firewire: improve refcounting of fw_card

Stefan Richter (12):
      firewire: convert client_list_lock to mutex
      firewire: fw-sbp2: remove unnecessary locking
      firewire: fix small memory leak at module removal
      ieee1394: replace a GFP_ATOMIC by GFP_KERNEL allocation
      ieee1394: mark all hpsb_address_ops instances as const
      ieee1394: ohci1394: pass error codes from request_irq through
      ieee1394: ohci1394: flush MMIO writes before delay in initialization
      firewire: fix resetting of bus manager retry counter
      firewire: reorder struct fw_card for better cache efficiency
      firewire: cdev: documentation fixlet
      firewire: cdev: tcodes input validation
      ieee1394: ignore nonzero Bus_Info_Block.max_rom, fetch config ROM in quadlets

 drivers/firewire/fw-card.c        |   20 ++++++--
 drivers/firewire/fw-cdev.c        |   63 ++++++++++++++++---------
 drivers/firewire/fw-device.c      |   11 +++--
 drivers/firewire/fw-device.h      |    6 ++
 drivers/firewire/fw-ohci.c        |   73 ++++++++++++++---------------
 drivers/firewire/fw-sbp2.c        |   21 ++------
 drivers/firewire/fw-topology.c    |   16 +++----
 drivers/firewire/fw-transaction.c |    2 +
 drivers/firewire/fw-transaction.h |   13 ++---
 drivers/ieee1394/csr.c            |   12 ++--
 drivers/ieee1394/csr.h            |   10 ++--
 drivers/ieee1394/csr1212.c        |   45 ++++++------------
 drivers/ieee1394/csr1212.h        |    9 +---
 drivers/ieee1394/dv1394-private.h |   44 +++++++++---------
 drivers/ieee1394/dv1394.c         |   12 ++--
 drivers/ieee1394/eth1394.c        |   28 ++++++------
 drivers/ieee1394/eth1394.h        |   16 +++---
 drivers/ieee1394/highlevel.c      |    9 ++--
 drivers/ieee1394/highlevel.h      |    7 ++-
 drivers/ieee1394/hosts.c          |    6 +-
 drivers/ieee1394/hosts.h          |    2 +-
 drivers/ieee1394/ieee1394.h       |    3 +
 drivers/ieee1394/nodemgr.c        |   20 ++------
 drivers/ieee1394/nodemgr.h        |    3 -
 drivers/ieee1394/ohci1394.c       |   26 ++++++++---
 drivers/ieee1394/pcilynx.c        |    2 +-
 drivers/ieee1394/pcilynx.h        |    2 +-
 drivers/ieee1394/raw1394.c        |    2 +-
 drivers/ieee1394/sbp2.c           |    4 +-
 include/linux/firewire-cdev.h     |    2 +-
 30 files changed, 246 insertions(+), 243 deletions(-)

Some further notes:
  - We still need to increment the ABI version number due to David's
    patch, and document the change appropriately.
  - There is still an old fw-topology patch in #master which is not yet
    merge-ready, my "insist on successive self ID complete events".
  - I really should stop messing around with drivers/ieee1394 and
    instead concentrate on drivers/firewire now.

But wait, there is one other thing sitting in linux1394-2.6.git:  The
firedtv driver which went from Greg's staging tree to linux1394-2.6.git
before it was decided to put several staging drivers into 2.6.28
mainline --- and so it happened that firedtv is still out of the
mainline.  I still want to do some mostly trivial updates to it before I
post a snapshot on LKML for review.  I hope to get this done during the
coming merge window, or slightly thereafter, and to get it finally into
mainline for 2.6.29.

There is one todo-item of this driver which is not trivial, and that's
its adaptation from drivers/ieee1394 to drivers/firewire.  But this
should not block its mainline submission.

Ben Backx (2):
      firesat: fix DVB-S2 device recognition
      firesat: add DVB-S support for DVB-S2 devices

Greg Kroah-Hartman (1):
      DVB: add firesat driver

Henrik Kurelid (5):
      firesat: update isochronous interface, add CI support
      firesat: avc resend
      firedtv: fix returned struct for ca_info
      firedtv: use length_field() of PMT as length
      firedtv: fix registration - adapter number could only be zero

Stefan Richter (29):
      firesat: add missing copyright notes
      firesat: rename to firedtv
      firedtv: nicer registration message and some initialization fixes
      firedtv: some header cleanups
      firedtv: replace semaphore by mutex
      firedtv: move some code back to ieee1394 core
      firedtv: replace tasklet by workqueue job
      firedtv: fix remote control input
      ieee1394: use correct barrier types between accesses of nodeid and generation
      ieee1394: add hpsb_node_read() and hpsb_node_lock()
      ieee1394: inherit ud vendor_id from node vendor_id
      firedtv: use hpsb_node_read(), _write(), _lock()
      firedtv: add vendor_id and version to driver match table
      firedtv: remove unused dual subunit code from initialization
      firedtv: fix initialization of dvb_frontend.ops
      firedtv: remove unused struct members
      firedtv: fix string comparison and a few sparse warnings
      firedtv: register input device as child of a FireWire device
      firedtv: remove various debug code
      firedtv: remove AV/C debug code
      firedtv: remove CA debug code
      firedtv: trivial cleanups in firesat-ci
      firedtv: trivial cleanups in cmp
      firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
      firedtv: don't retry oPCR updates endlessly
      firedtv: trivial cleanups in avc_api
      firedtv: trivial reorganization in avc_api
      firedtv: replace mdelay by msleep
      firedtv: increase FCP frame length for DVB-S2 tune QSPK

 drivers/ieee1394/dma.h                   |    1 +
 drivers/ieee1394/ieee1394_core.c         |    1 +
 drivers/ieee1394/ieee1394_transactions.c |   29 +
 drivers/ieee1394/ieee1394_transactions.h |    2 +
 drivers/ieee1394/iso.h                   |    1 +
 drivers/ieee1394/nodemgr.c               |   10 +-
 drivers/ieee1394/nodemgr.h               |   18 +
 drivers/media/dvb/Kconfig                |    2 +
 drivers/media/dvb/Makefile               |    2 +
 drivers/media/dvb/firesat/Kconfig        |   12 +
 drivers/media/dvb/firesat/Makefile       |   13 +
 drivers/media/dvb/firesat/avc_api.c      | 1051 ++++++++++++++++++++++
 drivers/media/dvb/firesat/avc_api.h      |  432 +++++++++
 drivers/media/dvb/firesat/cmp.c          |  171 ++++
 drivers/media/dvb/firesat/cmp.h          |    9 +
 drivers/media/dvb/firesat/firesat-ci.c   |  261 ++++++
 drivers/media/dvb/firesat/firesat-ci.h   |    9 +
 drivers/media/dvb/firesat/firesat-rc.c   |  191 ++++
 drivers/media/dvb/firesat/firesat-rc.h   |   11 +
 drivers/media/dvb/firesat/firesat.h      |  227 +++++
 drivers/media/dvb/firesat/firesat_1394.c |  291 ++++++
 drivers/media/dvb/firesat/firesat_dvb.c  |  276 ++++++
 drivers/media/dvb/firesat/firesat_fe.c   |  245 +++++
 drivers/media/dvb/firesat/firesat_iso.c  |  111 +++
 24 files changed, 3373 insertions(+), 3 deletions(-)
 create mode 100644 drivers/media/dvb/firesat/Kconfig
 create mode 100644 drivers/media/dvb/firesat/Makefile
 create mode 100644 drivers/media/dvb/firesat/avc_api.c
 create mode 100644 drivers/media/dvb/firesat/avc_api.h
 create mode 100644 drivers/media/dvb/firesat/cmp.c
 create mode 100644 drivers/media/dvb/firesat/cmp.h
 create mode 100644 drivers/media/dvb/firesat/firesat-ci.c
 create mode 100644 drivers/media/dvb/firesat/firesat-ci.h
 create mode 100644 drivers/media/dvb/firesat/firesat-rc.c
 create mode 100644 drivers/media/dvb/firesat/firesat-rc.h
 create mode 100644 drivers/media/dvb/firesat/firesat.h
 create mode 100644 drivers/media/dvb/firesat/firesat_1394.c
 create mode 100644 drivers/media/dvb/firesat/firesat_dvb.c
 create mode 100644 drivers/media/dvb/firesat/firesat_fe.c
 create mode 100644 drivers/media/dvb/firesat/firesat_iso.c

-- 
Stefan Richter
-=====-==--- ==-- =-==-
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: What's in linux1394-2.6.git?
  2008-10-10 18:30 Stefan Richter
@ 2008-10-13 12:18 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2008-10-13 12:18 UTC (permalink / raw)
  To: Stefan Richter; +Cc: linux-kernel, linux1394-devel

On Fri, 10 Oct 2008 20:30:35 +0200 (CEST)
Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:

> I suppose I will ask Mauro instead of Linus to pull the driver, although
> the patch queue does not touch the DVB subsystem except for adding the
> driver to the Makefile and Kconfig.

Seems fine for me. As we've added several new drivers for 2.6.28, this is
also safer to avoid (trivial) conflicts.

Cheers,
Mauro

^ permalink raw reply	[flat|nested] 14+ messages in thread

* What's in linux1394-2.6.git?
@ 2008-10-10 18:30 Stefan Richter
  2008-10-13 12:18 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Richter @ 2008-10-10 18:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel, Mauro Carvalho Chehab

The "misc" branch
=================
essentially contains continuations of work in 2.6.27 on the old ieee1394
stack:
  - BKL removal (now complete in the IEEE 1394 subsystem),
  - more robustness against connection loss.

All of this except for "firewire: time out in fw_core_remove_card" is
merge-ready and will appear in a pull request mid of next week.  There
is nothing interesting for the new firewire stack in it, alas.

Jay Fenlason (1):
      firewire: fw_send_request_sync()

Julia Lawall (1):
      ieee1394: Use DIV_ROUND_UP

Stefan Richter (12):
      ieee1394: sbp2: stricter dma_sync
      ieee1394: sbp2: check for DMA mapping failures
      ieee1394: sbp2: enforce s/g segment size limit
      firewire: fw-sbp2: enforce s/g segment size limit
      firewire: fw-sbp2: fix another small generation access bug
      ieee1394: raw1394: replace BKL by local mutex, make ioctl() and mmap() thread-safe
      ieee1394: raw1394: narrow down the state_mutex protected region
      ieee1394: raw1394: make write() thread-safe
      ieee1394: nodemgr clean up class iterators
      ieee1394: survive a few seconds connection loss
      ieee1394: dv1394, video1394: remove unnecessary expressions
      firewire: time out in fw_core_remove_card


The "cdev" branch
=================
contains updates to the firewire-core userspace interface which I think
should be deferred to after 2.6.28 (for 2.6.29-rc1).  I would like to
add Jay Fenlason's other pending work on the userspace API (iso resource
management, broadcast requests...) and some touch-ups.  I wished I had
all of this ready for the currently open merge window, but I simply d id
not have the necessary time.

Well, actually the two fixes and the documentation patch can and will
already go in in next week's pull request.

David Moore (1):
      firewire: Include iso timestamp in headers when header_size > 4

Jay Fenlason (3):
      firewire: fw_send_request_sync()
      firewire: Add more documentation to firewire-cdev.h
      firewire: add a client_list_lock

Stefan Richter (2):
      firewire: fix setting tag and sy in iso transmission
      firewire: fix ioctl() return code


The "master" branch
===================
has stuff that is still not merge-ready even though it's half a year
old.

Stefan Richter (2):
      firewire: insist on successive self ID complete events
      firewire: unnecessary BM delay after generation rollover


The "firedtv" branch
====================
has one new driver for some FireWire DVB devices.  Well, it's actually
an old driver which went through v4l-experimental and Greg's staging
tree, and was taken into linux1394-2.6.git only for some mainline
submission preparations.

There are four things which would be nice to do before asking for this
to be pulled into mainline:
  - rename the directory, files and some types and variables from
    firesat to firedtv,
  - replace bitfield accesses of on-the-wire data by opencoded
    shifting/ masking/ endian conversion macros,
  - trivial but possibly numerous stylistic touchups (whitespace,
    comment style...),
  - post a snapshot on LKML.
These steps are all simple boring tasks.  I hope to complete them still
during the merge window.  Furthermore, maybe I will collapse most of the
commits which I authored into a single commit to condense less
interesting history.

I suppose I will ask Mauro instead of Linus to pull the driver, although
the patch queue does not touch the DVB subsystem except for adding the
driver to the Makefile and Kconfig.

Ben Backx (2):
      firesat: fix DVB-S2 device recognition
      firesat: add DVB-S support for DVB-S2 devices

Greg Kroah-Hartman (1):
      DVB: add firesat driver

Henrik Kurelid (2):
      firesat: update isochronous interface, add CI support
      firesat: avc resend

Stefan Richter (18):
      firesat: add missing copyright notes
      firesat: rename to firedtv
      firedtv: nicer registration message and some initialization fixes
      firedtv: some header cleanups
      firedtv: replace semaphore by mutex
      firedtv: move some code back to ieee1394 core
      firedtv: replace tasklet by workqueue job
      firedtv: fix remote control input
      ieee1394: use correct barrier types between accesses of nodeid and generation
      ieee1394: add hpsb_node_read() and hpsb_node_lock()
      ieee1394: inherit ud vendor_id from node vendor_id
      firedtv: use hpsb_node_read(), _write(), _lock()
      firedtv: add vendor_id and version to driver match table
      firedtv: remove unused dual subunit code from initialization
      firedtv: fix initialization of dvb_frontend.ops
      firedtv: remove unused struct members
      firedtv: fix string comparison and a few sparse warnings
      firedtv: register input device as child of a FireWire device
-- 
Stefan Richter
-=====-==--- =-=- -=-=-
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: What's in linux1394-2.6.git?
  2008-07-14 11:42 Stefan Richter
@ 2008-07-14 12:37 ` Stefan Richter
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Richter @ 2008-07-14 12:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel, linux-scsi

On 14 Jul, Stefan Richter wrote:
> I now rebased all linux1394-2.6.git branches onto v2.6.26.  Here is how
> it looks like now and what I plan to get merged into mainline:

PS, URLs for checkouts:
    git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
    http://www.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git

gitweb:
    http://git.kernel.org/?p=linux/kernel/git/ieee1394/linux1394-2.6.git
-- 
Stefan Richter
-=====-==--- -=== -===-
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* What's in linux1394-2.6.git?
@ 2008-07-14 11:42 Stefan Richter
  2008-07-14 12:37 ` Stefan Richter
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Richter @ 2008-07-14 11:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel, linux-scsi

Hi all,

I now rebased all linux1394-2.6.git branches onto v2.6.26.  Here is how
it looks like now and what I plan to get merged into mainline:


branch for-linus (based on v2.6.26)
===================================

Contains cleanups including bits of Big Kernel Lock related work and
Philippe's patch to include IR/IT DMA buffers of raw1394, video1394,
dv1394 in core dumps.  All of these patches have been seen on lkml and
linux1394-devel and have been in many -next kernels without problem. I
will send a pull request to Linus soon, maybe still today.

Alan Cox (1):
      ieee1394: raw1394: Push the BKL down into the driver ioctls

Philippe De Muyter (1):
      ieee1394: dump mmapped iso buffers in core files

Stefan Richter (7):
      ieee1394: reduce log noise about config ROM CRC errors
      ieee1394: video1394: reorder module init, prepare BKL removal
      firewire: implement broadcast_channel CSR for 1394a compliance
      firewire: remove unused struct members
      firewire: clean up some includes
      firewire: clean up fw_card reference counting
      firewire: don't respond to broadcast write requests

 drivers/firewire/fw-card.c        |   32 +++++++++++++++++---------
 drivers/firewire/fw-device.c      |    5 +--
 drivers/firewire/fw-device.h      |    1 -
 drivers/firewire/fw-ohci.c        |    1 -
 drivers/firewire/fw-transaction.c |   32 +++++++++++++++++++-------
 drivers/firewire/fw-transaction.h |   34 ++++++++++++++++++++++------
 drivers/ieee1394/csr1212.c        |   32 ++++++++++++++++++--------
 drivers/ieee1394/dma.c            |    2 +-
 drivers/ieee1394/highlevel.c      |    4 +--
 drivers/ieee1394/highlevel.h      |   13 ++++++++++-
 drivers/ieee1394/raw1394.c        |   20 ++++++++++++----
 drivers/ieee1394/video1394.c      |    2 +
 12 files changed, 125 insertions(+), 53 deletions(-)


branch sbp2-spindown (based on v2.6.26)
=======================================

Contains a new device quirk handling in sd-mod and uses it for some
buggy SBP-2 disks.  Also changes the default setting of
manage_start_stop of all SBP-2 HDDs from off to on.  That is, disks will
now per default spun down if the system is suspended or shut down or if
sd-mod is unbound from a HDD.  This change is only done if the SBP-2
driver has exclusively logged in to a HDD (also the default mode), i.e.
the feature is not used in multiple initiator setups.

The patches have been seen on lkml, lsml, and linux1394-devel and have
been in many -next kernels without problem.  James has been polled for
ACK or NAK regarding the SCSI change a few times but I didn't get a
response.  I will nevertheless submit this for mainline merge ASAP but
in a pull request separate from the other for-linus patches.

Stefan Richter (5):
      scsi: sd: optionally set power condition in START STOP UNIT
      firewire: fw-sbp2: fix spindown for PL-3507 and TSB42AA9 firmwares
      ieee1394: sbp2: fix spindown for PL-3507 and TSB42AA9 firmwares
      firewire: fw-sbp2: spin disks down on suspend and shutdown
      ieee1394: sbp2: spin disks down on suspend and shutdown

 drivers/firewire/fw-sbp2.c |   25 +++++++++++++++++++++++--
 drivers/ieee1394/sbp2.c    |   22 ++++++++++++++++++++--
 drivers/ieee1394/sbp2.h    |    1 +
 drivers/scsi/sd.c          |    5 +++++
 include/scsi/scsi_device.h |    1 +
 5 files changed, 50 insertions(+), 4 deletions(-)


branch for-next (based on for-linus)
====================================

Contains new patches which have not yet been in -next.  However, they
look like they could be merged even before 2.6.27-rc1 gets out.

Stefan Richter (5):
      firewire: fix race of bus reset with request transmission
      firewire: fully initialize fw_transaction before marking it pending
      firewire: small fw_fill_request cleanup
      firewire: warn on unfinished transactions during card removal
      Merge branch 'sbp2-spindown' into for-next

 drivers/firewire/fw-card.c        |    2 +-
 drivers/firewire/fw-topology.c    |    2 --
 drivers/firewire/fw-transaction.c |   21 +++++++++------------
 3 files changed, 10 insertions(+), 15 deletions(-)


branch master (based on for-next)
=================================

Contains an already very old fix and a small optimization.  The fix
still needs follow-up work; it trades a fix for potential but rare
kernel panic with not too rare but avoidable temporary connection loss.
I need to implement something to let the connection survive the
respective situations.

Stefan Richter (2):
      firewire: insist on successive self ID complete events
      firewire: unnecessary BM delay after generation rollover

 drivers/firewire/fw-card.c        |    2 +-
 drivers/firewire/fw-topology.c    |   12 ++++++++++++
 drivers/firewire/fw-transaction.h |    9 +++++++++
 3 files changed, 22 insertions(+), 1 deletions(-)

-- 
Stefan Richter
-=====-==--- -=== -===-
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

* What's in linux1394-2.6.git?
@ 2008-04-02 21:52 Stefan Richter
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Richter @ 2008-04-02 21:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux1394-devel

Well, nothing big.  First of all, what's _not_ in linux1394-2.6.git:  DV
reception is still broken in drivers/firewire/ on OHCI 1.0 variants of
VIA VT630x.  IP over 1394 is still not ported from drivers/ieee1394/ to
drivers/firewire/.  Both issues are held up by of lack of manpower.

These and a bunch of other miscellaneous issues with drivers/firewire/
still keep them labeled EXPERIMENTAL for the time to come, even though
we made some good progress with what went in for 2.6.25. Before
distributors consider to switch from the ieee1394 subsystem to the
firewire subsystem, they should have a good look at the ToDo and
migration pages at wiki.linux1394.org.

Now, what do we actually have for 2.6.26:

  - raw1394, video1394, dv1394:  [improvement]  These drivers are no
    longer bound to unit directory devices. This has always been
    unnecessary and got in the way of more specialized out-of-tree
    drivers.
  - firewire-core:  [fix]  Recognize changes in the configuration ROM of
    devices while they are plugged in.
  - firewire-ohci:  [feature]  Logging of various events can be enabled
    at runtime by a module parameter.  This helps debugging the drivers
    as well as devices.
  - firewire-ohci:  [feature]  Unfiltered remote DMA can be enabled at
    compile time via a new option in the kernel hacking menu.  This
    enables remote debugging as with ohci1394.
  - all:  A bunch of bug fixes which seemed to fit into .26 better than
    into .25.  Small cleanups.

Almost all patches have been seen on LKML (and all on linux1394-devel),
hence I don't repost them this time.  They have all been exposed to -mm
and to -next.  In the latter, linux1394-2.6.git is still involved in a
trivial merge conflict due to the kernel hacking menu entry.

Still pending work:  My firewire-core reference counting changes had two
comments from Kristian which I will address in an incremental update;
perhaps I manage to do this in time for the merge.  Also, Pieter
Palmer's iso transmit patch for the ieee1394 stack may perhaps be ready
then.

Shortlog and diffstat:

Adrian Bunk (1):
      firewire: cleanups

Harvey Harrison (1):
      ieee1394: replace remaining __FUNCTION__ occurrences

Jarod Wilson (3):
      firewire: fw-sbp2: set dual-phase cycle_limit
      firewire: replace more hex values with defined csr constants
      firewire: use bitwise and to get reg in handle_registers

Marcin Slusarz (1):
      ieee1394: be*_add_cpu conversion

Robert P. J. Day (2):
      ieee1394: Use shorter list_splice_init() for brevity.
      ieee1394: Remove superfluous calls to kobject_set_name().

Stefan Richter (30):
      ieee1394: sbp2: relax SCSI DMA alignment
      ieee1394: prevent device binding of raw1394, video1394, dv1394
      ieee1394: ohci1394: switch on bus power after resume on PPC PMac
      ieee1394: ohci1394: refactor probe, remove, suspend, resume
      ieee1394: ohci1394: unroll a macro with return
      ieee1394: ohci1394: refactor some printk format strings
      ieee1394: ohci1394: missing PPC PMac feature calls in failure path
      firewire: fw-sbp2: relax SCSI DMA alignment
      firewire: remove superfluous reference counting
      firewire: fw-sbp2: fix reference counting
      firewire: refactor fw_unit reference counting
      firewire: fw-sbp2: remove usages of fw_memcpy_to_be32
      firewire: fw-sbp2: simplify some macros
      firewire: fw-sbp2: remove unnecessary memset
      firewire: fw-sbp2: reduce log noise
      firewire: fw-ohci: add option for remote debugging
      firewire: fw-ohci: switch on bus power after resume on PPC PMac
      firewire: fw-ohci: refactor probe, remove, suspend, resume
      firewire: replace static ROM cache by allocated cache
      firewire: reread config ROM when device reset the bus
      firewire: remove unused struct member
      firewire: insist on successive self ID complete events
      firewire: fw-ohci: add self ID error check
      firewire: fw-ohci: catch self_id_count == 0
      firewire: debug interrupt events
      firewire: fw-ohci: untangle a mixed unsigned/signed expression
      firewire: wait until PHY configuration packet was transmitted (fix bus reset loop)
      firewire: fw-ohci: missing PPC PMac feature calls in failure path
      firewire: unnecessary BM delay after generation rollover
      firewire: fix synchronization of gap counts

 Documentation/debugging-via-ohci1394.txt |   13 +-
 drivers/firewire/Kconfig                 |    5 +
 drivers/firewire/fw-card.c               |   52 +---
 drivers/firewire/fw-cdev.c               |   13 +-
 drivers/firewire/fw-device.c             |  263 +++++++++++++++----
 drivers/firewire/fw-device.h             |   38 ++-
 drivers/firewire/fw-iso.c                |    5 -
 drivers/firewire/fw-ohci.c               |  321 +++++++++++++++++-----
 drivers/firewire/fw-ohci.h               |    1 +
 drivers/firewire/fw-sbp2.c               |  150 +++++------
 drivers/firewire/fw-topology.c           |   22 ++-
 drivers/firewire/fw-topology.h           |   11 +-
 drivers/firewire/fw-transaction.c        |   75 +++---
 drivers/firewire/fw-transaction.h        |   17 +-
 drivers/ieee1394/csr.c                   |    6 +-
 drivers/ieee1394/dv1394.c                |    4 +-
 drivers/ieee1394/highlevel.c             |    6 +-
 drivers/ieee1394/ieee1394_core.c         |    2 +-
 drivers/ieee1394/nodemgr.c               |    6 +-
 drivers/ieee1394/ohci1394.c              |  229 ++++++++--------
 drivers/ieee1394/pcilynx.c               |   15 +-
 drivers/ieee1394/raw1394.c               |    2 -
 drivers/ieee1394/sbp2.c                  |   11 +-
 drivers/ieee1394/video1394.c             |    4 +-
 lib/Kconfig.debug                        |   10 +
 25 files changed, 820 insertions(+), 461 deletions(-)

-- 
Stefan Richter
-=====-==--- -=-- ---=-
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-02-25 21:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-17 21:07 What's in linux1394-2.6.git? Stefan Richter
2008-01-17 21:09 ` What's in linux1394-2.6.git? - drivers/ieee1394 queue Stefan Richter
2008-01-17 21:10 ` What's in linux1394-2.6.git? - drivers/firewire queue Stefan Richter
2008-04-02 21:52 What's in linux1394-2.6.git? Stefan Richter
2008-07-14 11:42 Stefan Richter
2008-07-14 12:37 ` Stefan Richter
2008-10-10 18:30 Stefan Richter
2008-10-13 12:18 ` Mauro Carvalho Chehab
2008-12-22 20:59 Stefan Richter
2009-03-17 21:11 Stefan Richter
2009-06-14 10:46 Stefan Richter
2009-06-14 10:48 ` Stefan Richter
2009-11-24 17:34 Stefan Richter
2010-02-25 21:12 Stefan Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®