rpms/kernel/devel linux-2.6-firewire-check-condition.patch, NONE, 1.1 linux-2.6-firewire-context-run.patch, NONE, 1.1
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Apr 6 15:26:05 UTC 2007
Author: krh
Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv19995
Added Files:
linux-2.6-firewire-check-condition.patch
linux-2.6-firewire-context-run.patch
Log Message:
* Fri Apr 6 2007 Kristian Høgsberg <krh at redhat.com>
- Add patches to fix #235463 and possibly #235199 and #231708.
linux-2.6-firewire-check-condition.patch:
fw-sbp2.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
--- NEW FILE linux-2.6-firewire-check-condition.patch ---
>From ad12bc442b70e3bfd831e197dbaeabcd6086a137 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Kristian_H=C3=B8gsberg?= <krh at redhat.com>
Date: Fri, 6 Apr 2007 10:44:57 -0400
Subject: [PATCH] Report CHECK_CONDITION up to the SCSI stack.
On some devices (e.g. the 3rd generation iPod) the command agent
dies a lot, typically on SCSI level errors. When it dies it returns
an CHECK_CONDITION status, and we need to propagate this up to the
SCSI stack so it properly recover the device.
---
drivers/firewire/fw-sbp2.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 2e5479b..28d0884 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -746,7 +746,8 @@ static struct fw_driver sbp2_driver = {
.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)
{
sense_data[0] = 0x70;
sense_data[1] = 0x0;
@@ -767,20 +768,19 @@ static unsigned int sbp2_status_to_sense_data(u8 * sbp2_status, u8 * sense_data)
switch (sbp2_status[0] & 0x3f) {
case SAM_STAT_GOOD:
- return DID_OK;
+ return DID_OK << 16;
case SAM_STAT_CHECK_CONDITION:
- /* return CHECK_CONDITION << 1 | DID_OK << 16; */
- return DID_OK;
+ return DID_OK << 16 | CHECK_CONDITION << 1;
case SAM_STAT_BUSY:
- return DID_BUS_BUSY;
+ return DID_BUS_BUSY << 16;
case SAM_STAT_CONDITION_MET:
case SAM_STAT_RESERVATION_CONFLICT:
case SAM_STAT_COMMAND_TERMINATED:
default:
- return DID_ERROR;
+ return DID_ERROR << 16;
}
}
@@ -801,26 +801,26 @@ complete_command_orb(struct sbp2_orb *base_orb, struct sbp2_status *status)
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,
@@ -841,7 +841,7 @@ complete_command_orb(struct sbp2_orb *base_orb, struct sbp2_status *status)
sizeof orb->request_buffer_bus,
DMA_FROM_DEVICE);
- orb->cmd->result = result << 16;
+ orb->cmd->result = result;
orb->done(orb->cmd);
kfree(orb);
--
1.4.4.2
linux-2.6-firewire-context-run.patch:
fw-ohci.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE linux-2.6-firewire-context-run.patch ---
>From 758c2744e2a64aa0c20d229b1f08a6d6b48b8d17 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Kristian_H=C3=B8gsberg?= <krh at redhat.com>
Date: Fri, 6 Apr 2007 10:32:26 -0400
Subject: [PATCH] Check CONTEXT_RUN, not CONTEXT_ACTIVE to se if context is running.
Doh.
---
drivers/firewire/fw-ohci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index 6f9895d..fca7eac 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -661,7 +661,7 @@ at_context_queue_packet(struct context *ctx, struct fw_packet *packet)
/* 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;
--
1.4.4.2
More information about the fedora-cvs-commits
mailing list