diff --git a/dmraid-1.0.0.rc14-fixup_lsi1068e.patch b/dmraid-1.0.0.rc14-fixup_lsi1068e.patch new file mode 100644 index 0000000..11f469e --- /dev/null +++ b/dmraid-1.0.0.rc14-fixup_lsi1068e.patch @@ -0,0 +1,59 @@ +Index: 1.0.0.rc14/lib/format/ddf/ddf1.c +=================================================================== +--- 1.0.0.rc14.orig/lib/format/ddf/ddf1.c ++++ 1.0.0.rc14/lib/format/ddf/ddf1.c +@@ -28,6 +28,9 @@ static const char *handler = HANDLER; + // #define PCI_VENDOR_ID_ADAPTEC 0x9004 + #define PCI_VENDOR_ID_ADAPTEC2 0x9005 + ++/* PCI IDs for LSI */ ++#define PCI_VENDOR_ID_LSI 0x1000 ++ + /* Map DDF1 disk status to dmraid status */ + static enum status disk_status(struct ddf1_phys_drive *disk) { + struct states states[] = { +@@ -358,6 +361,13 @@ static int read_extended(struct lib_cont + ddf1->adaptec_mode = 1; + } + ++ if (ddf1->adapter && ++ ddf1->adapter->pci_vendor == PCI_VENDOR_ID_LSI) { ++ log_notice(lc, "%s: LSI mode discovered on %s", ++ handler, di->path); ++ ddf1->lsi_mode = 1; ++ } ++ + /* Read physical drive characteristic data */ + where = to_bytes(pri->primary_table_lba + pri->disk_data_offset); + if (!(ddata = ddf1->disk_data = +@@ -667,10 +677,14 @@ static char *name(struct lib_context *lc + } else { + char *b; + +- for (b = buf + prefix, i = 0; i < 24; b += 8, i += 4) +- sprintf(b, "%02x%02x%02x%02x", +- vd->guid[i], vd->guid[i+1], +- vd->guid[i+2], vd->guid[i+3]); ++ for (b = buf + prefix, i = 0; i < 24; b += 8, i += 4) { ++ if (i == 16 && ddf1->lsi_mode) ++ sprintf(b, "00000000"); ++ else ++ sprintf(b, "%02x%02x%02x%02x", ++ vd->guid[i], vd->guid[i+1], ++ vd->guid[i+2], vd->guid[i+3]); ++ } + } + + out: +Index: 1.0.0.rc14/lib/format/ddf/ddf1.h +=================================================================== +--- 1.0.0.rc14.orig/lib/format/ddf/ddf1.h ++++ 1.0.0.rc14/lib/format/ddf/ddf1.h +@@ -264,6 +264,7 @@ struct ddf1 { + int disk_format; + int in_cpu_format; + int adaptec_mode; ++ int lsi_mode; + }; + + #endif /* FORMAT_HANDLER */ diff --git a/dmraid.changes b/dmraid.changes index 90ac83f..7b31b06 100644 --- a/dmraid.changes +++ b/dmraid.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 16 17:36:09 CEST 2008 - mkoenig@suse.de + +- ignore the timestamp for LSI 1068E DDF1 metadata [bnc#426615] + ------------------------------------------------------------------- Mon Sep 15 13:42:57 CEST 2008 - ro@suse.de diff --git a/dmraid.spec b/dmraid.spec index aa60799..e5e6199 100644 --- a/dmraid.spec +++ b/dmraid.spec @@ -27,7 +27,7 @@ Group: System/Base AutoReqProv: on Summary: A Device-Mapper Software RAID Support Tool Version: 1.0.0.rc14 -Release: 94 +Release: 95 Source: ftp://people.redhat.com/heinzm/sw/dmraid/src/dmraid-%{version}.tar.bz2 Source1: sysconfig.dmraid Source2: boot.dmraid @@ -46,7 +46,9 @@ Patch6: dmraid-1.0.0.rc13-fix_macro.patch Patch7: dmraid-pdc_max_sectors.patch Patch8: dmraid-1.0.0.rc14-ddf1_segfault.patch Patch9: dmraid-move-type-definition.diff -Patch10: libdmraid-events.dif +Patch10: dmraid-1.0.0.rc14-fixup_lsi1068e.patch +# libdmraid-events +Patch50: libdmraid-events.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %fillup_prereq @@ -119,8 +121,9 @@ Authors: %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 pushd libdmraid* -%patch10 +%patch50 popd cp %{SOURCE3} . @@ -202,6 +205,8 @@ install -D -m644 reg_tool/dm_dso_reg_tool.8 $RPM_BUILD_ROOT/usr/share/man/man8/d /%{_lib}/libdmraid-events.so.0 %changelog +* Tue Sep 16 2008 mkoenig@suse.de +- ignore the timestamp for LSI 1068E DDF1 metadata [bnc#426615] * Mon Sep 15 2008 ro@suse.de - fix typo in libdmraid Makefile - split off libdmraid-events0 package according to