rpms/kernel/devel kernel-2.6.spec, 1.3063, 1.3064 linux-2.6-firewire.patch, 1.6, 1.7

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Apr 13 18:34:43 UTC 2007


Author: krh

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv9951

Modified Files:
	kernel-2.6.spec linux-2.6-firewire.patch 
Log Message:
* Fri Apr 13 2007 Kristian Høgsberg <krh at redhat.com>
- Redo diff against the 'juju' upstream branch so we get the right
  fixes in the firewire patch.



Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3063
retrieving revision 1.3064
diff -u -r1.3063 -r1.3064
--- kernel-2.6.spec	13 Apr 2007 13:16:51 -0000	1.3063
+++ kernel-2.6.spec	13 Apr 2007 18:34:41 -0000	1.3064
@@ -2258,6 +2258,10 @@
 #  - tux.
 
 %changelog
+* Fri Apr 13 2007 Kristian Høgsberg <krh at redhat.com>
+- Redo diff against the 'juju' upstream branch so we get the right
+  fixes in the firewire patch.
+
 * Fri Apr 13 2007 David Woodhouse <dwmw2 at redhat.com>
 - Fix PS3 Ethernet IPv6 checksum problems, autoload PS3 USB modules
 

linux-2.6-firewire.patch:
 Makefile                  |    1 
 firewire/Kconfig          |   60 +
 firewire/Makefile         |   10 
 firewire/fw-card.c        |  542 +++++++++++++
 firewire/fw-device-cdev.c |  974 +++++++++++++++++++++++
 firewire/fw-device-cdev.h |  260 ++++++
 firewire/fw-device.c      |  780 ++++++++++++++++++
 firewire/fw-device.h      |  149 +++
 firewire/fw-iso.c         |  163 +++
 firewire/fw-ohci.c        | 1896 ++++++++++++++++++++++++++++++++++++++++++++++
 firewire/fw-ohci.h        |  153 +++
 firewire/fw-sbp2.c        | 1165 ++++++++++++++++++++++++++++
 firewire/fw-topology.c    |  519 ++++++++++++
 firewire/fw-topology.h    |   94 ++
 firewire/fw-transaction.c |  889 +++++++++++++++++++++
 firewire/fw-transaction.h |  505 ++++++++++++
 ieee1394/Kconfig          |    2 
 17 files changed, 8162 insertions(+)

Index: linux-2.6-firewire.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-firewire.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- linux-2.6-firewire.patch	12 Apr 2007 21:26:01 -0000	1.6
+++ linux-2.6-firewire.patch	13 Apr 2007 18:34:41 -0000	1.7
@@ -2998,10 +2998,10 @@
 +EXPORT_SYMBOL(fw_iso_context_stop);
 diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
 new file mode 100644
-index 0000000..b941239
+index 0000000..34eb468
 --- /dev/null
 +++ b/drivers/firewire/fw-ohci.c
-@@ -0,0 +1,1890 @@
+@@ -0,0 +1,1896 @@
 +/*						-*- c-basic-offset: 8 -*-
 + *
 + * fw-ohci.c - Driver for OHCI 1394 boards
@@ -3666,7 +3666,7 @@
 +
 +	/* If the context isn't already running, start it up. */
 +	reg = reg_read(ctx->ohci, control_set(ctx->regs));
-+	if ((reg & CONTEXT_ACTIVE) == 0)
++	if ((reg & CONTEXT_RUN) == 0)
 +		context_run(ctx, 0);
 +
 +	return 0;
@@ -4261,7 +4261,13 @@
 +	p = db + 1;
 +	end = p + header_length;
 +	while (p < end && i + ctx->base.header_size <= PAGE_SIZE) {
-+		memcpy(ctx->header + i, p + 4, ctx->base.header_size);
++		/* The iso header is byteswapped to little endian by
++		 * the controller, but the remaining header quadlets
++		 * are big endian.  We want to present all the headers
++		 * as big endian, so we have to swap the first
++		 * quadlet. */
++		*(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;
 +	}
@@ -5053,7 +5059,7 @@
 +#endif /* __fw_ohci_h */
 diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
 new file mode 100644
-index 0000000..d7940db
+index 0000000..7ce9b81
 --- /dev/null
 +++ b/drivers/firewire/fw-sbp2.c
 @@ -0,0 +1,1165 @@
@@ -5352,7 +5358,8 @@
 +	spin_lock_irqsave(&card->lock, flags);
 +	list_for_each_entry(orb, &sd->orb_list, link) {
 +		if (status_get_orb_high(status) == 0 &&
-+		    status_get_orb_low(status) == orb->request_bus) {
++		    status_get_orb_low(status) == orb->request_bus &&
++		    orb->rcode == RCODE_COMPLETE) {
 +			list_del(&orb->link);
 +			break;
 +		}
@@ -5823,8 +5830,11 @@
 +	.id_table = sbp2_id_table,
 +};
 +
-+static unsigned int sbp2_status_to_sense_data(u8 * sbp2_status, u8 * sense_data)
++static unsigned int
++sbp2_status_to_sense_data(u8 *sbp2_status, u8 *sense_data)
 +{
++	int sam_status;
++
 +	sense_data[0] = 0x70;
 +	sense_data[1] = 0x0;
 +	sense_data[2] = sbp2_status[1];
@@ -5842,22 +5852,19 @@
 +	sense_data[14] = sbp2_status[12];
 +	sense_data[15] = sbp2_status[13];
 +
-+	switch (sbp2_status[0] & 0x3f) {
-+	case SAM_STAT_GOOD:
-+		return DID_OK;
++	sam_status = sbp2_status[0] & 0x3f;
 +
++	switch (sam_status) {
++	case SAM_STAT_GOOD:
 +	case SAM_STAT_CHECK_CONDITION:
-+		/* return CHECK_CONDITION << 1 | DID_OK << 16; */
-+		return DID_OK;
-+
-+	case SAM_STAT_BUSY:
-+		return DID_BUS_BUSY;
-+
 +	case SAM_STAT_CONDITION_MET:
++	case SAM_STAT_BUSY:
 +	case SAM_STAT_RESERVATION_CONFLICT:
 +	case SAM_STAT_COMMAND_TERMINATED:
++		return DID_OK << 16 | sam_status;
++
 +	default:
-+		return DID_ERROR;
++		return DID_ERROR << 16;
 +	}
 +}
 +
@@ -5871,33 +5878,31 @@
 +	int result;
 +
 +	if (status != NULL) {
-+		if (status_get_dead(*status)) {
-+			fw_notify("agent died, issuing agent reset\n");
++		if (status_get_dead(*status))
 +			sbp2_agent_reset(unit);
-+		}
 +
 +		switch (status_get_response(*status)) {
 +		case SBP2_STATUS_REQUEST_COMPLETE:
-+			result = DID_OK;
++			result = DID_OK << 16;
 +			break;
 +		case SBP2_STATUS_TRANSPORT_FAILURE:
-+			result = DID_BUS_BUSY;
++			result = DID_BUS_BUSY << 16;
 +			break;
 +		case SBP2_STATUS_ILLEGAL_REQUEST:
 +		case SBP2_STATUS_VENDOR_DEPENDENT:
 +		default:
-+			result = DID_ERROR;
++			result = DID_ERROR << 16;
 +			break;
 +		}
 +
-+		if (result == DID_OK && status_get_len(*status) > 1)
++		if (result == DID_OK << 16 && status_get_len(*status) > 1)
 +			result = sbp2_status_to_sense_data(status_get_data(*status),
 +							   orb->cmd->sense_buffer);
 +	} else {
 +		/* If the orb completes with status == NULL, something
 +		 * went wrong, typically a bus reset happened mid-orb
 +		 * or when sending the write (less likely). */
-+		result = DID_BUS_BUSY;
++		result = DID_BUS_BUSY << 16;
 +	}
 +
 +	dma_unmap_single(device->card->device, orb->base.request_bus,
@@ -5918,9 +5923,8 @@
 +				 sizeof orb->request_buffer_bus,
 +				 DMA_FROM_DEVICE);
 +
-+	orb->cmd->result = result << 16;
++	orb->cmd->result = result;
 +	orb->done(orb->cmd);
-+
 +	kfree(orb);
 +}
 +
@@ -6030,6 +6034,8 @@
 +		goto fail_alloc;
 +	}
 +
++	/* Initialize rcode to something not RCODE_COMPLETE. */
++	orb->base.rcode = -1;
 +	orb->base.request_bus =
 +		dma_map_single(device->card->device, &orb->request,
 +			       sizeof orb->request, DMA_TO_DEVICE);
@@ -6135,7 +6141,7 @@
 +	struct fw_unit *unit = (struct fw_unit *)cmd->device->host->hostdata[0];
 +
 +	fw_notify("sbp2_scsi_abort\n");
-+
++	sbp2_agent_reset(unit);
 +	sbp2_cancel_orbs(unit);
 +
 +	return SUCCESS;




More information about the fedora-cvs-commits mailing list