1 |
Author: mpagano |
2 |
Date: 2009-07-02 02:03:38 +0000 (Thu, 02 Jul 2009) |
3 |
New Revision: 1580 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/2.6.30/2500_ide-cd-handle-fragmented-patckets.patch |
7 |
Modified: |
8 |
genpatches-2.6/trunk/2.6.30/0000_README |
9 |
Log: |
10 |
Adding ide-cd patch for the handling of fragmented packets. See bug #274182 |
11 |
|
12 |
Modified: genpatches-2.6/trunk/2.6.30/0000_README |
13 |
=================================================================== |
14 |
--- genpatches-2.6/trunk/2.6.30/0000_README 2009-06-23 19:55:11 UTC (rev 1579) |
15 |
+++ genpatches-2.6/trunk/2.6.30/0000_README 2009-07-02 02:03:38 UTC (rev 1580) |
16 |
@@ -39,6 +39,10 @@ |
17 |
Individual Patch Descriptions: |
18 |
-------------------------------------------------------------------------- |
19 |
|
20 |
+Patch: 2500_ide-cd-handle-fragmented-patckets.patch |
21 |
+From: http://bugs.gentoo.org/show_bug.cgi?id=274182 |
22 |
+Desc: ide-cd: handle fragmented packet commands gracefully |
23 |
+ |
24 |
Patch: 4100_dm-bbr.patch |
25 |
From: EVMS 2.5.2 |
26 |
Desc: Bad block relocation support for LiveCD users |
27 |
|
28 |
Added: genpatches-2.6/trunk/2.6.30/2500_ide-cd-handle-fragmented-patckets.patch |
29 |
=================================================================== |
30 |
--- genpatches-2.6/trunk/2.6.30/2500_ide-cd-handle-fragmented-patckets.patch (rev 0) |
31 |
+++ genpatches-2.6/trunk/2.6.30/2500_ide-cd-handle-fragmented-patckets.patch 2009-07-02 02:03:38 UTC (rev 1580) |
32 |
@@ -0,0 +1,49 @@ |
33 |
+From: Borislav Petkov <petkovbb@×××××.com> |
34 |
+Date: Fri, 26 Jun 2009 18:22:37 +0000 (-0700) |
35 |
+Subject: ide-cd: handle fragmented packet commands gracefully |
36 |
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=9c72ebef5aabf3532469d602a9d87beceea268b1 |
37 |
+ |
38 |
+ide-cd: handle fragmented packet commands gracefully |
39 |
+ |
40 |
+There are some devices in the wild that clear the DRQ bit during the |
41 |
+last word of a packet command and therefore could use a "second chance" |
42 |
+for that last word of data to be xferred instead of simply failing the |
43 |
+request. Do that by attempting to suck in those last bytes in PIO mode. |
44 |
+ |
45 |
+In addition, the ATA_ERR bit has to be cleared for we cannot be sure the |
46 |
+data is valid otherwise. |
47 |
+ |
48 |
+See http://bugzilla.kernel.org/show_bug.cgi?id=13399 for details. |
49 |
+ |
50 |
+Signed-off-by: Borislav Petkov <petkovbb@×××××.com> |
51 |
+Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@×××××.com> |
52 |
+Signed-off-by: David S. Miller <davem@×××××××××.net> |
53 |
+--- |
54 |
+ |
55 |
+diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c |
56 |
+index f0ede59..6a9a769 100644 |
57 |
+--- a/drivers/ide/ide-cd.c |
58 |
++++ b/drivers/ide/ide-cd.c |
59 |
+@@ -592,9 +592,19 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) |
60 |
+ } |
61 |
+ } else if (!blk_pc_request(rq)) { |
62 |
+ ide_cd_request_sense_fixup(drive, cmd); |
63 |
+- /* complain if we still have data left to transfer */ |
64 |
++ |
65 |
+ uptodate = cmd->nleft ? 0 : 1; |
66 |
+- if (uptodate == 0) |
67 |
++ |
68 |
++ /* |
69 |
++ * suck out the remaining bytes from the drive in an |
70 |
++ * attempt to complete the data xfer. (see BZ#13399) |
71 |
++ */ |
72 |
++ if (!(stat & ATA_ERR) && !uptodate && thislen) { |
73 |
++ ide_pio_bytes(drive, cmd, write, thislen); |
74 |
++ uptodate = cmd->nleft ? 0 : 1; |
75 |
++ } |
76 |
++ |
77 |
++ if (!uptodate) |
78 |
+ rq->cmd_flags |= REQ_FAILED; |
79 |
+ } |
80 |
+ goto out_end; |
81 |
+ |