rpms/kernel/F-8 linux-2.6-libata-fix-bogus-lba48-disks.patch, NONE, 1.1 kernel.spec, 1.325, 1.326

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Wed Jan 23 00:09:12 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31887

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-libata-fix-bogus-lba48-disks.patch 
Log Message:
* Tue Jan 22 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.23.14-117
- Work around broken Seagate LBA48 disks (#429364)


linux-2.6-libata-fix-bogus-lba48-disks.patch:

--- NEW FILE linux-2.6-libata-fix-bogus-lba48-disks.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=17bd9a2f4c35de29d2539a2ff6851d61be281e25
Commit:     17bd9a2f4c35de29d2539a2ff6851d61be281e25
Parent:     b55d1b1814c52463c11707f53dbdc223e09b2924
Author:     Geert Uytterhoeven <geert at linux-m68k.org>
AuthorDate: Mon Oct 29 21:21:37 2007 +0100
Committer:  Jeff Garzik <jeff at garzik.org>
CommitDate: Sun Nov 4 22:53:15 2007 -0500

    libata and bogus LBA48 drives
    
    A colleague noticed recent versions of Ubuntu no longer detect his 80 GB
    ST380020ACE drive. This drive is special in that it advertises LBA48 support,
    but has the lba_capacity_2 field set to zero (cfr.
    http://lkml.org/lkml/2004/3/30/163).
    
    Upon closer look, libata indeed doesn't seem to handle this case yet.
    Below is an (untested) fix.
    
    Signed-off-by: Jeff Garzik <jeff at garzik.org>

    bz f8#429364
---
 include/linux/ata.h |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

--- linux-2.6.23.noarch.orig/include/linux/ata.h
+++ linux-2.6.23.noarch/include/linux/ata.h
@@ -348,7 +348,6 @@ struct ata_taskfile {
 #define ata_id_has_fua(id)	((id)[84] & (1 << 6))
 #define ata_id_has_flush(id)	((id)[83] & (1 << 12))
 #define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13))
-#define ata_id_has_lba48(id)	((id)[83] & (1 << 10))
 #define ata_id_has_hpa(id)	((id)[82] & (1 << 10))
 #define ata_id_has_wcache(id)	((id)[82] & (1 << 5))
 #define ata_id_has_pm(id)	((id)[82] & (1 << 3))
@@ -370,6 +369,15 @@ struct ata_taskfile {
 
 #define ata_id_cdb_intr(id)	(((id)[0] & 0x60) == 0x20)
 
+static inline int ata_id_has_lba48(const u16 *id)
+{
+	if ((id[83] & 0xC000) != 0x4000)
+		return 0;
+	if (!ata_id_u64(id, 100))
+		return 0;
+	return id[83] & (1 << 10);
+}
+
 static inline unsigned int ata_id_major_version(const u16 *id)
 {
 	unsigned int mver;


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.325
retrieving revision 1.326
diff -u -r1.325 -r1.326
--- kernel.spec	22 Jan 2008 23:45:02 -0000	1.325
+++ kernel.spec	23 Jan 2008 00:08:16 -0000	1.326
@@ -692,6 +692,7 @@
 Patch673: linux-2.6-libata-use-stuck-err-for-tapes.patch
 Patch674: linux-2.6-libata-scsi-allow-short-commands.patch
 Patch675: linux-2.6-libata-ahci-enable-ahci-mode-before-reset.patch
+Patch676: linux-2.6-libata-fix-bogus-lba48-disks.patch
 
 Patch680: linux-2.6-wireless.patch
 Patch681: linux-2.6-wireless-pending.patch
@@ -1329,6 +1330,8 @@
 # ApplyPatch linux-2.6-libata-scsi-allow-short-commands.patch
 # fix ahci reset
 ApplyPatch linux-2.6-libata-ahci-enable-ahci-mode-before-reset.patch
+# work around broken lba48 disks
+ApplyPatch linux-2.6-libata-fix-bogus-lba48-disks.patch
 
 # wireless patches headed for 2.6.24
 ApplyPatch linux-2.6-wireless.patch
@@ -2052,6 +2055,9 @@
 
 
 %changelog
+* Tue Jan 22 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.23.14-117
+- Work around broken Seagate LBA48 disks (#429364)
+
 * Tue Jan 22 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.23.14-116
 - Fix memory leak in netlabel code (F7#352281)
 




More information about the fedora-extras-commits mailing list