[smartmontools/f12/master] add missing patch

Michal Hlavinka mhlavink at fedoraproject.org
Mon Nov 15 12:02:38 UTC 2010


commit 9491cbf1b8106b7a9cf8065f9958573e1b4082e6
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Mon Nov 15 13:02:29 2010 +0100

    add missing patch

 smartmontools-5.40-megaraid.patch |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/smartmontools-5.40-megaraid.patch b/smartmontools-5.40-megaraid.patch
new file mode 100644
index 0000000..3c3f8bc
--- /dev/null
+++ b/smartmontools-5.40-megaraid.patch
@@ -0,0 +1,33 @@
+diff -up smartmontools-5.39.1/os_linux.cpp.megaraid smartmontools-5.39.1/os_linux.cpp
+--- smartmontools-5.39.1/os_linux.cpp.megaraid	2010-01-28 21:24:32.000000000 +0100
++++ smartmontools-5.39.1/os_linux.cpp	2010-11-15 12:58:56.648181400 +0100
+@@ -1095,17 +1095,21 @@ bool linux_megaraid_device::megasas_cmd(
+   pthru->cdb_len = cdbLen;
+   pthru->timeout = 0;
+   pthru->flags = MFI_FRAME_DIR_READ;
+-  pthru->sge_count = 1;
+-  pthru->data_xfer_len = dataLen;
+-  pthru->sgl.sge32[0].phys_addr = (intptr_t)data;
+-  pthru->sgl.sge32[0].length = (uint32_t)dataLen;
++  if (dataLen > 0) {
++    pthru->sge_count = 1;
++    pthru->data_xfer_len = dataLen;
++    pthru->sgl.sge32[0].phys_addr = (intptr_t)data;
++    pthru->sgl.sge32[0].length = (uint32_t)dataLen;
++  }
+   memcpy(pthru->cdb, cdb, cdbLen);
+ 
+   uio.host_no = m_hba;
+-  uio.sge_count = 1;
+-  uio.sgl_off = offsetof(struct megasas_pthru_frame, sgl);
+-  uio.sgl[0].iov_base = data;
+-  uio.sgl[0].iov_len = dataLen;
++  if (dataLen > 0) {
++    uio.sge_count = 1;
++    uio.sgl_off = offsetof(struct megasas_pthru_frame, sgl);
++    uio.sgl[0].iov_base = data;
++    uio.sgl[0].iov_len = dataLen;
++  }
+ 
+   rc = 0;
+   errno = 0;


More information about the scm-commits mailing list