]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.drivers/libfc-fix-read-IO-data-integrity
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / libfc-fix-read-IO-data-integrity
1 From 09585f46fdc490d932e9753660a6ee8108acca10 Mon Sep 17 00:00:00 2001
2 From: Vasu Dev <vasu.dev@vintel.com>
3 Date: Fri, 23 Jan 2009 02:27:33 -0800
4 Subject: libfc: IO data integrity issue when a IO data frame lost
5 References: bnc#469536
6
7 The fc_fcp_complete_locked detected data underrun in this case and set
8 the FC_DATA_UNDRUN but that was ignored by fc_io_compl for all cases
9 including read underrun.
10
11 Added code to not to ignore FC_DATA_UNDRUN for read IO and instead
12 suggested scsi-ml to retry cmd to recover from lost data frame.
13
14 Not sure if it is okay to ignore FC_DATA_UNDRUN for other case, so let
15 code as is for other cases but removed or-ing with zero valued fsp->cdb_status
16 for those cases.
17
18 Please ignore previously submitted patch fixing this issue differently at
19 http://www.open-fcoe.org/pipermail/devel/2009-January/001543.html.
20 Although that patch also fixed this issue but was causing unnecessary
21 FC abort to trigger scsi-ml retry to recover from this underrun issue.
22
23 Also bumped up module version to 1.0.7.
24
25 Signed-off-by: Vasu Dev <vasu.dev@intel.com>
26 Signed-off-by: Hannes Reinecke <hare@suse.de>
27
28 ---
29 drivers/scsi/fcoe/libfcoe.c | 2 +-
30 drivers/scsi/libfc/fc_fcp.c | 8 ++++----
31 2 files changed, 5 insertions(+), 5 deletions(-)
32
33 --- a/drivers/scsi/fcoe/libfcoe.c
34 +++ b/drivers/scsi/fcoe/libfcoe.c
35 @@ -60,7 +60,7 @@ static int debug_fcoe;
36 MODULE_AUTHOR("Open-FCoE.org");
37 MODULE_DESCRIPTION("FCoE");
38 MODULE_LICENSE("GPL");
39 -MODULE_VERSION("1.0.6");
40 +MODULE_VERSION("1.0.7");
41
42 /* fcoe host list */
43 LIST_HEAD(fcoe_hostlist);
44 --- a/drivers/scsi/libfc/fc_fcp.c
45 +++ b/drivers/scsi/libfc/fc_fcp.c
46 @@ -42,7 +42,7 @@
47 MODULE_AUTHOR("Open-FCoE.org");
48 MODULE_DESCRIPTION("libfc");
49 MODULE_LICENSE("GPL");
50 -MODULE_VERSION("1.0.6");
51 +MODULE_VERSION("1.0.7");
52
53 static int fc_fcp_debug;
54
55 @@ -1811,12 +1811,12 @@ static void fc_io_compl(struct fc_fcp_pk
56 sc_cmd->result = DID_ERROR << 16;
57 break;
58 case FC_DATA_UNDRUN:
59 - if (fsp->cdb_status == 0) {
60 + if ((fsp->cdb_status == 0) && !(fsp->req_flags & FC_SRB_READ)) {
61 /*
62 * scsi status is good but transport level
63 - * underrun. for read it should be an error??
64 + * underrun.
65 */
66 - sc_cmd->result = (DID_OK << 16) | fsp->cdb_status;
67 + sc_cmd->result = DID_OK << 16;
68 } else {
69 /*
70 * scsi got underrun, this is an error