]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.32 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 21 Apr 2010 23:37:10 +0000 (16:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 21 Apr 2010 23:37:10 +0000 (16:37 -0700)
queue-2.6.32/ext4-fix-async-i-o-writes-beyond-4gb-to-a-sparse-file.patch [new file with mode: 0644]
queue-2.6.32/ext4-flush-delalloc-blocks-when-space-is-low.patch [new file with mode: 0644]
queue-2.6.32/fs-writeback-add-helper-function-to-start-writeback-if-idle.patch [new file with mode: 0644]
queue-2.6.32/ib-iser-rewrite-sg-handling-for-rdma-logic.patch [new file with mode: 0644]
queue-2.6.32/mptctl-remove-printk-which-floods-unnecessary-messages-to-var-log-message.patch [new file with mode: 0644]
queue-2.6.32/mptspi-fix-for-incorrect-data-underrun-errata.patch [new file with mode: 0644]
queue-2.6.32/pcie-aer-prevent-aer-injection-if-hardware-masks-error-reporting.patch
queue-2.6.32/series
queue-2.6.32/tpm-autoload-tpm_tis-based-on-system-pnp-ids.patch [new file with mode: 0644]

diff --git a/queue-2.6.32/ext4-fix-async-i-o-writes-beyond-4gb-to-a-sparse-file.patch b/queue-2.6.32/ext4-fix-async-i-o-writes-beyond-4gb-to-a-sparse-file.patch
new file mode 100644 (file)
index 0000000..fe2c2bd
--- /dev/null
@@ -0,0 +1,74 @@
+From a1de02dccf906faba2ee2d99cac56799bda3b96a Mon Sep 17 00:00:00 2001
+From: Eric Sandeen <sandeen@redhat.com>
+Date: Thu, 4 Feb 2010 23:58:38 -0500
+Subject: ext4: fix async i/o writes beyond 4GB to a sparse file
+
+From: Eric Sandeen <sandeen@redhat.com>
+
+commit a1de02dccf906faba2ee2d99cac56799bda3b96a upstream.
+
+The "offset" member in ext4_io_end holds bytes, not blocks, so
+ext4_lblk_t is wrong - and too small (u32).
+
+This caused the async i/o writes to sparse files beyond 4GB to fail
+when they wrapped around to 0.
+
+Also fix up the type of arguments to ext4_convert_unwritten_extents(),
+it gets ssize_t from ext4_end_aio_dio_nolock() and
+ext4_ext_direct_IO().
+
+Reported-by: Giel de Nijs <giel@vectorwise.com>
+Signed-off-by: Eric Sandeen <sandeen@redhat.com>
+Cc: maximilian attems <max@stro.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/ext4/ext4.h    |    6 +++---
+ fs/ext4/extents.c |    2 +-
+ fs/ext4/inode.c   |    2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+--- a/fs/ext4/ext4.h
++++ b/fs/ext4/ext4.h
+@@ -139,8 +139,8 @@ typedef struct ext4_io_end {
+       struct inode            *inode;         /* file being written to */
+       unsigned int            flag;           /* unwritten or not */
+       int                     error;          /* I/O error code */
+-      ext4_lblk_t             offset;         /* offset in the file */
+-      size_t                  size;           /* size of the extent */
++      loff_t                  offset;         /* offset in the file */
++      ssize_t                 size;           /* size of the extent */
+       struct work_struct      work;           /* data work queue */
+ } ext4_io_end_t;
+@@ -1740,7 +1740,7 @@ extern void ext4_ext_release(struct supe
+ extern long ext4_fallocate(struct inode *inode, int mode, loff_t offset,
+                         loff_t len);
+ extern int ext4_convert_unwritten_extents(struct inode *inode, loff_t offset,
+-                        loff_t len);
++                        ssize_t len);
+ extern int ext4_get_blocks(handle_t *handle, struct inode *inode,
+                          sector_t block, unsigned int max_blocks,
+                          struct buffer_head *bh, int flags);
+--- a/fs/ext4/extents.c
++++ b/fs/ext4/extents.c
+@@ -3547,7 +3547,7 @@ retry:
+  * Returns 0 on success.
+  */
+ int ext4_convert_unwritten_extents(struct inode *inode, loff_t offset,
+-                                  loff_t len)
++                                  ssize_t len)
+ {
+       handle_t *handle;
+       ext4_lblk_t block;
+--- a/fs/ext4/inode.c
++++ b/fs/ext4/inode.c
+@@ -3547,7 +3547,7 @@ static int ext4_end_aio_dio_nolock(ext4_
+ {
+       struct inode *inode = io->inode;
+       loff_t offset = io->offset;
+-      size_t size = io->size;
++      ssize_t size = io->size;
+       int ret = 0;
+       ext4_debug("end_aio_dio_onlock: io 0x%p from inode %lu,list->next 0x%p,"
diff --git a/queue-2.6.32/ext4-flush-delalloc-blocks-when-space-is-low.patch b/queue-2.6.32/ext4-flush-delalloc-blocks-when-space-is-low.patch
new file mode 100644 (file)
index 0000000..18b06ce
--- /dev/null
@@ -0,0 +1,66 @@
+From c8afb44682fcef6273e8b8eb19fab13ddd05b386 Mon Sep 17 00:00:00 2001
+From: Eric Sandeen <sandeen@redhat.com>
+Date: Wed, 23 Dec 2009 07:58:12 -0500
+Subject: ext4: flush delalloc blocks when space is low
+
+From: Eric Sandeen <sandeen@redhat.com>
+
+commit c8afb44682fcef6273e8b8eb19fab13ddd05b386 upstream.
+
+Creating many small files in rapid succession on a small
+filesystem can lead to spurious ENOSPC; on a 104MB filesystem:
+
+for i in `seq 1 22500`; do
+    echo -n > $SCRATCH_MNT/$i
+    echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > $SCRATCH_MNT/$i
+done
+
+leads to ENOSPC even though after a sync, 40% of the fs is free
+again.
+
+This is because we reserve worst-case metadata for delalloc writes,
+and when data is allocated that worst-case reservation is not
+usually needed.
+
+When freespace is low, kicking off an async writeback will start
+converting that worst-case space usage into something more realistic,
+almost always freeing up space to continue.
+
+This resolves the testcase for me, and survives all 4 generic
+ENOSPC tests in xfstests.
+
+We'll still need a hard synchronous sync to squeeze out the last bit,
+but this fixes things up to a large degree.
+
+Signed-off-by: Eric Sandeen <sandeen@redhat.com>
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+Cc: maximilian attems <max@stro.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/ext4/inode.c |   11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+--- a/fs/ext4/inode.c
++++ b/fs/ext4/inode.c
+@@ -3031,11 +3031,18 @@ static int ext4_nonda_switch(struct supe
+       if (2 * free_blocks < 3 * dirty_blocks ||
+               free_blocks < (dirty_blocks + EXT4_FREEBLOCKS_WATERMARK)) {
+               /*
+-               * free block count is less that 150% of dirty blocks
+-               * or free blocks is less that watermark
++               * free block count is less than 150% of dirty blocks
++               * or free blocks is less than watermark
+                */
+               return 1;
+       }
++      /*
++       * Even if we don't switch but are nearing capacity,
++       * start pushing delalloc when 1/2 of free blocks are dirty.
++       */
++      if (free_blocks < 2 * dirty_blocks)
++              writeback_inodes_sb_if_idle(sb);
++
+       return 0;
+ }
diff --git a/queue-2.6.32/fs-writeback-add-helper-function-to-start-writeback-if-idle.patch b/queue-2.6.32/fs-writeback-add-helper-function-to-start-writeback-if-idle.patch
new file mode 100644 (file)
index 0000000..834775d
--- /dev/null
@@ -0,0 +1,69 @@
+From 17bd55d037a02b04d9119511cfd1a4b985d20f63 Mon Sep 17 00:00:00 2001
+From: Eric Sandeen <sandeen@redhat.com>
+Date: Wed, 23 Dec 2009 07:57:07 -0500
+Subject: fs-writeback: Add helper function to start writeback if idle
+
+From: Eric Sandeen <sandeen@redhat.com>
+
+commit 17bd55d037a02b04d9119511cfd1a4b985d20f63 upstream.
+
+ext4, at least, would like to start pushing on writeback if it starts
+to get close to ENOSPC when reserving worst-case blocks for delalloc
+writes.  Writing out delalloc data will convert those worst-case
+predictions into usually smaller actual usage, freeing up space
+before we hit ENOSPC based on this speculation.
+
+Thanks to Jens for the suggestion for the helper function,
+& the naming help.
+
+I've made the helper return status on whether writeback was
+started even though I don't plan to use it in the ext4 patch;
+it seems like it would be potentially useful to test this
+in some cases.
+
+Signed-off-by: Eric Sandeen <sandeen@redhat.com>
+Acked-by: Jan Kara <jack@suse.cz>
+Cc: maximilian attems <max@stro.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/fs-writeback.c         |   17 +++++++++++++++++
+ include/linux/writeback.h |    1 +
+ 2 files changed, 18 insertions(+)
+
+--- a/fs/fs-writeback.c
++++ b/fs/fs-writeback.c
+@@ -1213,6 +1213,23 @@ void writeback_inodes_sb(struct super_bl
+ EXPORT_SYMBOL(writeback_inodes_sb);
+ /**
++ * writeback_inodes_sb_if_idle        -       start writeback if none underway
++ * @sb: the superblock
++ *
++ * Invoke writeback_inodes_sb if no writeback is currently underway.
++ * Returns 1 if writeback was started, 0 if not.
++ */
++int writeback_inodes_sb_if_idle(struct super_block *sb)
++{
++      if (!writeback_in_progress(sb->s_bdi)) {
++              writeback_inodes_sb(sb);
++              return 1;
++      } else
++              return 0;
++}
++EXPORT_SYMBOL(writeback_inodes_sb_if_idle);
++
++/**
+  * sync_inodes_sb     -       sync sb inode pages
+  * @sb: the superblock
+  *
+--- a/include/linux/writeback.h
++++ b/include/linux/writeback.h
+@@ -69,6 +69,7 @@ struct writeback_control {
+ struct bdi_writeback;
+ int inode_wait(void *);
+ void writeback_inodes_sb(struct super_block *);
++int writeback_inodes_sb_if_idle(struct super_block *);
+ void sync_inodes_sb(struct super_block *);
+ void writeback_inodes_wbc(struct writeback_control *wbc);
+ long wb_do_writeback(struct bdi_writeback *wb, int force_wait);
diff --git a/queue-2.6.32/ib-iser-rewrite-sg-handling-for-rdma-logic.patch b/queue-2.6.32/ib-iser-rewrite-sg-handling-for-rdma-logic.patch
new file mode 100644 (file)
index 0000000..815b4be
--- /dev/null
@@ -0,0 +1,203 @@
+From c1ccaf2478f84c2665cf57f981db143aa582d646 Mon Sep 17 00:00:00 2001
+From: Or Gerlitz <ogerlitz@voltaire.com>
+Date: Thu, 12 Nov 2009 11:32:27 -0800
+Subject: IB/iser: Rewrite SG handling for RDMA logic
+
+From: Or Gerlitz <ogerlitz@voltaire.com>
+
+commit c1ccaf2478f84c2665cf57f981db143aa582d646 upstream.
+
+After dma-mapping an SG list provided by the SCSI midlayer, iser has
+to make sure the mapped SG is "aligned for RDMA" in the sense that its
+possible to produce one mapping in the HCA IOMMU which represents the
+whole SG. Next, the mapped SG is formatted for registration with the HCA.
+
+This patch re-writes the logic that does the above, to make it clearer
+and simpler. It also fixes a bug in the being aligned for RDMA checks,
+where a "start" check wasn't done but rather only "end" check.
+
+[commit message in RH kernel tree: "Under heavy load, without the patch,
+the HCA can be programmed to write (corrupt) into pages/location which
+doesn't belong to the SG associated with the actual I/O and cause a
+kernel oops."]
+
+Signed-off-by: Alexander Nezhinsky <alexandern@voltaire.com>
+Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
+Signed-off-by: Roland Dreier <rolandd@cisco.com>
+Cc: maximilian attems <max@stro.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/infiniband/ulp/iser/iser_memory.c |  120 +++++++++++++-----------------
+ 1 file changed, 55 insertions(+), 65 deletions(-)
+
+--- a/drivers/infiniband/ulp/iser/iser_memory.c
++++ b/drivers/infiniband/ulp/iser/iser_memory.c
+@@ -209,6 +209,8 @@ void iser_finalize_rdma_unaligned_sg(str
+       mem_copy->copy_buf = NULL;
+ }
++#define IS_4K_ALIGNED(addr)   ((((unsigned long)addr) & ~MASK_4K) == 0)
++
+ /**
+  * iser_sg_to_page_vec - Translates scatterlist entries to physical addresses
+  * and returns the length of resulting physical address array (may be less than
+@@ -221,62 +223,52 @@ void iser_finalize_rdma_unaligned_sg(str
+  * where --few fragments of the same page-- are present in the SG as
+  * consecutive elements. Also, it handles one entry SG.
+  */
++
+ static int iser_sg_to_page_vec(struct iser_data_buf *data,
+                              struct iser_page_vec *page_vec,
+                              struct ib_device *ibdev)
+ {
+-      struct scatterlist *sgl = (struct scatterlist *)data->buf;
+-      struct scatterlist *sg;
+-      u64 first_addr, last_addr, page;
+-      int end_aligned;
+-      unsigned int cur_page = 0;
++      struct scatterlist *sg, *sgl = (struct scatterlist *)data->buf;
++      u64 start_addr, end_addr, page, chunk_start = 0;
+       unsigned long total_sz = 0;
+-      int i;
++      unsigned int dma_len;
++      int i, new_chunk, cur_page, last_ent = data->dma_nents - 1;
+       /* compute the offset of first element */
+       page_vec->offset = (u64) sgl[0].offset & ~MASK_4K;
++      new_chunk = 1;
++      cur_page  = 0;
+       for_each_sg(sgl, sg, data->dma_nents, i) {
+-              unsigned int dma_len = ib_sg_dma_len(ibdev, sg);
+-
++              start_addr = ib_sg_dma_address(ibdev, sg);
++              if (new_chunk)
++                      chunk_start = start_addr;
++              dma_len = ib_sg_dma_len(ibdev, sg);
++              end_addr = start_addr + dma_len;
+               total_sz += dma_len;
+-              first_addr = ib_sg_dma_address(ibdev, sg);
+-              last_addr  = first_addr + dma_len;
+-
+-              end_aligned   = !(last_addr  & ~MASK_4K);
+-
+-              /* continue to collect page fragments till aligned or SG ends */
+-              while (!end_aligned && (i + 1 < data->dma_nents)) {
+-                      sg = sg_next(sg);
+-                      i++;
+-                      dma_len = ib_sg_dma_len(ibdev, sg);
+-                      total_sz += dma_len;
+-                      last_addr = ib_sg_dma_address(ibdev, sg) + dma_len;
+-                      end_aligned = !(last_addr  & ~MASK_4K);
++              /* collect page fragments until aligned or end of SG list */
++              if (!IS_4K_ALIGNED(end_addr) && i < last_ent) {
++                      new_chunk = 0;
++                      continue;
+               }
++              new_chunk = 1;
+-              /* handle the 1st page in the 1st DMA element */
+-              if (cur_page == 0) {
+-                      page = first_addr & MASK_4K;
+-                      page_vec->pages[cur_page] = page;
+-                      cur_page++;
++              /* address of the first page in the contiguous chunk;
++                 masking relevant for the very first SG entry,
++                 which might be unaligned */
++              page = chunk_start & MASK_4K;
++              do {
++                      page_vec->pages[cur_page++] = page;
+                       page += SIZE_4K;
+-              } else
+-                      page = first_addr;
+-
+-              for (; page < last_addr; page += SIZE_4K) {
+-                      page_vec->pages[cur_page] = page;
+-                      cur_page++;
+-              }
+-
++              } while (page < end_addr);
+       }
++
+       page_vec->data_size = total_sz;
+       iser_dbg("page_vec->data_size:%d cur_page %d\n", page_vec->data_size,cur_page);
+       return cur_page;
+ }
+-#define IS_4K_ALIGNED(addr)   ((((unsigned long)addr) & ~MASK_4K) == 0)
+ /**
+  * iser_data_buf_aligned_len - Tries to determine the maximal correctly aligned
+@@ -284,42 +276,40 @@ static int iser_sg_to_page_vec(struct is
+  * the number of entries which are aligned correctly. Supports the case where
+  * consecutive SG elements are actually fragments of the same physcial page.
+  */
+-static unsigned int iser_data_buf_aligned_len(struct iser_data_buf *data,
+-                                            struct ib_device *ibdev)
++static int iser_data_buf_aligned_len(struct iser_data_buf *data,
++                                    struct ib_device *ibdev)
+ {
+-      struct scatterlist *sgl, *sg;
+-      u64 end_addr, next_addr;
+-      int i, cnt;
+-      unsigned int ret_len = 0;
++      struct scatterlist *sgl, *sg, *next_sg = NULL;
++      u64 start_addr, end_addr;
++      int i, ret_len, start_check = 0;
++
++      if (data->dma_nents == 1)
++              return 1;
+       sgl = (struct scatterlist *)data->buf;
++      start_addr  = ib_sg_dma_address(ibdev, sgl);
+-      cnt = 0;
+       for_each_sg(sgl, sg, data->dma_nents, i) {
+-              /* iser_dbg("Checking sg iobuf [%d]: phys=0x%08lX "
+-                 "offset: %ld sz: %ld\n", i,
+-                 (unsigned long)sg_phys(sg),
+-                 (unsigned long)sg->offset,
+-                 (unsigned long)sg->length); */
+-              end_addr = ib_sg_dma_address(ibdev, sg) +
+-                         ib_sg_dma_len(ibdev, sg);
+-              /* iser_dbg("Checking sg iobuf end address "
+-                     "0x%08lX\n", end_addr); */
+-              if (i + 1 < data->dma_nents) {
+-                      next_addr = ib_sg_dma_address(ibdev, sg_next(sg));
+-                      /* are i, i+1 fragments of the same page? */
+-                      if (end_addr == next_addr) {
+-                              cnt++;
+-                              continue;
+-                      } else if (!IS_4K_ALIGNED(end_addr)) {
+-                              ret_len = cnt + 1;
+-                              break;
+-                      }
+-              }
+-              cnt++;
++              if (start_check && !IS_4K_ALIGNED(start_addr))
++                      break;
++
++              next_sg = sg_next(sg);
++              if (!next_sg)
++                      break;
++
++              end_addr    = start_addr + ib_sg_dma_len(ibdev, sg);
++              start_addr  = ib_sg_dma_address(ibdev, next_sg);
++
++              if (end_addr == start_addr) {
++                      start_check = 0;
++                      continue;
++              } else
++                      start_check = 1;
++
++              if (!IS_4K_ALIGNED(end_addr))
++                      break;
+       }
+-      if (i == data->dma_nents)
+-              ret_len = cnt;  /* loop ended */
++      ret_len = (next_sg) ? i : i+1;
+       iser_dbg("Found %d aligned entries out of %d in sg:0x%p\n",
+                ret_len, data->dma_nents, data);
+       return ret_len;
diff --git a/queue-2.6.32/mptctl-remove-printk-which-floods-unnecessary-messages-to-var-log-message.patch b/queue-2.6.32/mptctl-remove-printk-which-floods-unnecessary-messages-to-var-log-message.patch
new file mode 100644 (file)
index 0000000..9f7a1ea
--- /dev/null
@@ -0,0 +1,33 @@
+From e39e145dfb78d4e20d89139d2576306b4279c126 Mon Sep 17 00:00:00 2001
+From: Kashyap, Desai <kashyap.desai@lsi.com>
+Date: Wed, 7 Oct 2009 11:26:54 +0530
+Subject: [SCSI] mptctl : Remove printk which floods unnecessary messages to var/log/message
+
+From: Kashyap, Desai <kashyap.desai@lsi.com>
+
+commit e39e145dfb78d4e20d89139d2576306b4279c126 upstream.
+
+Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
+Signed-off-by: James Bottomley <James.Bottomley@suse.de>
+Cc: maximilian attems <max@stro.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/message/fusion/mptctl.c |    5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+--- a/drivers/message/fusion/mptctl.c
++++ b/drivers/message/fusion/mptctl.c
+@@ -621,11 +621,8 @@ __mptctl_ioctl(struct file *file, unsign
+        */
+       iocnumX = khdr.iocnum & 0xFF;
+       if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) ||
+-          (iocp == NULL)) {
+-              printk(KERN_DEBUG MYNAM "%s::mptctl_ioctl() @%d - ioc%d not found!\n",
+-                              __FILE__, __LINE__, iocnumX);
++          (iocp == NULL))
+               return -ENODEV;
+-      }
+       if (!iocp->active) {
+               printk(KERN_DEBUG MYNAM "%s::mptctl_ioctl() @%d - Controller disabled.\n",
diff --git a/queue-2.6.32/mptspi-fix-for-incorrect-data-underrun-errata.patch b/queue-2.6.32/mptspi-fix-for-incorrect-data-underrun-errata.patch
new file mode 100644 (file)
index 0000000..e97d170
--- /dev/null
@@ -0,0 +1,135 @@
+From 9b53b39243cf23a0b68eaa16c37ce16eada69a46 Mon Sep 17 00:00:00 2001
+From: Kashyap, Desai <kashyap.desai@lsi.com>
+Date: Wed, 7 Oct 2009 11:27:40 +0530
+Subject: [SCSI] mptspi: Fix for incorrect data underrun errata
+
+From: Kashyap, Desai <kashyap.desai@lsi.com>
+
+commit 9b53b39243cf23a0b68eaa16c37ce16eada69a46 upstream.
+
+Errata:
+Certain conditions on the scsi bus may casue the 53C1030 to incorrectly signal
+a SCSI_DATA_UNDERRUN to the host.
+
+Workaround 1:
+For an Errata on LSI53C1030 When the length of request data
+and transfer data are different with result of command (READ or VERIFY),
+DID_SOFT_ERROR is set.
+
+Workaround 2:
+For potential trouble on LSI53C1030. It is checked whether the length of
+request data is equal to the length of transfer and residual.
+MEDIUM_ERROR is set by incorrect data.
+
+Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
+Signed-off-by: James Bottomley <James.Bottomley@suse.de>
+Cc: maximilian attems <max@stro.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/message/fusion/mptscsih.c |   86 +++++++++++++++++++++++++++++++++++---
+ 1 file changed, 81 insertions(+), 5 deletions(-)
+
+--- a/drivers/message/fusion/mptscsih.c
++++ b/drivers/message/fusion/mptscsih.c
+@@ -792,11 +792,36 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+                        *  precedence!
+                        */
+                       sc->result = (DID_OK << 16) | scsi_status;
+-                      if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) {
+-                              /* Have already saved the status and sense data
++                      if (!(scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID)) {
++
++                              /*
++                               * For an Errata on LSI53C1030
++                               * When the length of request data
++                               * and transfer data are different
++                               * with result of command (READ or VERIFY),
++                               * DID_SOFT_ERROR is set.
+                                */
+-                              ;
+-                      } else {
++                              if (ioc->bus_type == SPI) {
++                                      if (pScsiReq->CDB[0] == READ_6  ||
++                                          pScsiReq->CDB[0] == READ_10 ||
++                                          pScsiReq->CDB[0] == READ_12 ||
++                                          pScsiReq->CDB[0] == READ_16 ||
++                                          pScsiReq->CDB[0] == VERIFY  ||
++                                          pScsiReq->CDB[0] == VERIFY_16) {
++                                              if (scsi_bufflen(sc) !=
++                                                      xfer_cnt) {
++                                                      sc->result =
++                                                      DID_SOFT_ERROR << 16;
++                                                  printk(KERN_WARNING "Errata"
++                                                  "on LSI53C1030 occurred."
++                                                  "sc->req_bufflen=0x%02x,"
++                                                  "xfer_cnt=0x%02x\n",
++                                                  scsi_bufflen(sc),
++                                                  xfer_cnt);
++                                              }
++                                      }
++                              }
++
+                               if (xfer_cnt < sc->underflow) {
+                                       if (scsi_status == SAM_STAT_BUSY)
+                                               sc->result = SAM_STAT_BUSY;
+@@ -835,7 +860,58 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+                       sc->result = (DID_OK << 16) | scsi_status;
+                       if (scsi_state == 0) {
+                               ;
+-                      } else if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) {
++                      } else if (scsi_state &
++                          MPI_SCSI_STATE_AUTOSENSE_VALID) {
++
++                              /*
++                               * For potential trouble on LSI53C1030.
++                               * (date:2007.xx.)
++                               * It is checked whether the length of
++                               * request data is equal to
++                               * the length of transfer and residual.
++                               * MEDIUM_ERROR is set by incorrect data.
++                               */
++                              if ((ioc->bus_type == SPI) &&
++                                      (sc->sense_buffer[2] & 0x20)) {
++                                      u32      difftransfer;
++                                      difftransfer =
++                                      sc->sense_buffer[3] << 24 |
++                                      sc->sense_buffer[4] << 16 |
++                                      sc->sense_buffer[5] << 8 |
++                                      sc->sense_buffer[6];
++                                      if (((sc->sense_buffer[3] & 0x80) ==
++                                              0x80) && (scsi_bufflen(sc)
++                                              != xfer_cnt)) {
++                                              sc->sense_buffer[2] =
++                                                  MEDIUM_ERROR;
++                                              sc->sense_buffer[12] = 0xff;
++                                              sc->sense_buffer[13] = 0xff;
++                                              printk(KERN_WARNING"Errata"
++                                              "on LSI53C1030 occurred."
++                                              "sc->req_bufflen=0x%02x,"
++                                              "xfer_cnt=0x%02x\n" ,
++                                              scsi_bufflen(sc),
++                                              xfer_cnt);
++                                      }
++                                      if (((sc->sense_buffer[3] & 0x80)
++                                              != 0x80) &&
++                                              (scsi_bufflen(sc) !=
++                                              xfer_cnt + difftransfer)) {
++                                              sc->sense_buffer[2] =
++                                                      MEDIUM_ERROR;
++                                              sc->sense_buffer[12] = 0xff;
++                                              sc->sense_buffer[13] = 0xff;
++                                              printk(KERN_WARNING
++                                              "Errata on LSI53C1030 occurred"
++                                              "sc->req_bufflen=0x%02x,"
++                                              " xfer_cnt=0x%02x,"
++                                              "difftransfer=0x%02x\n",
++                                              scsi_bufflen(sc),
++                                              xfer_cnt,
++                                              difftransfer);
++                                      }
++                              }
++
+                               /*
+                                * If running against circa 200003dd 909 MPT f/w,
+                                * may get this (AUTOSENSE_VALID) for actual TASK_SET_FULL
index 891baf711010b12846e6f3ed265c02b60d7e863a..52a791645c4ae5761e1c5f46c96c993003e1f290 100644 (file)
@@ -1,9 +1,9 @@
 From b49bfd32901625e4adcfee011d2b32a43b4db67d Mon Sep 17 00:00:00 2001
-From: Youquan,Song <youquan.song@linux.intel.com>
+From: Youquan Song <youquan.song@linux.intel.com>
 Date: Thu, 17 Dec 2009 08:22:48 -0500
 Subject: PCIe AER: prevent AER injection if hardware masks error reporting
 
-From: Youquan,Song <youquan.song@linux.intel.com>
+From: Youquan Song <youquan.song@linux.intel.com>
 
 commit b49bfd32901625e4adcfee011d2b32a43b4db67d upstream.
 
@@ -15,8 +15,8 @@ If hardware masks special error reporting to RC, the aer_inject driver
 should not inject aer error.
 
 Acked-by: Andi Kleen <ak@linux.intel.com>
-Signed-off-by: Youquan, Song <youquan.song@intel.com>
-Acked-by: Ying, Huang <ying.huang@intel.com>
+Signed-off-by: Youquan Song <youquan.song@intel.com>
+Acked-by: Ying Huang <ying.huang@intel.com>
 Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
 Cc: maximilian attems <max@stro.at>
 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
index 83a059dbdd780fa63125a34ff9a73016b8ad8930..cecbe68d6e9639f530a0b102b5e22f7033d18304 100644 (file)
@@ -176,3 +176,10 @@ revert-sunrpc-move-the-close-processing-after-do-recvfrom-method.patch
 nfsd-ensure-sockets-are-closed-on-error.patch
 alsa-hda-set-front-mic-to-input-vref-50-for-lenovo-3000-y410.patch
 mac80211-fix-deferred-hardware-scan-requests.patch
+fs-writeback-add-helper-function-to-start-writeback-if-idle.patch
+ext4-flush-delalloc-blocks-when-space-is-low.patch
+ext4-fix-async-i-o-writes-beyond-4gb-to-a-sparse-file.patch
+tpm-autoload-tpm_tis-based-on-system-pnp-ids.patch
+ib-iser-rewrite-sg-handling-for-rdma-logic.patch
+mptctl-remove-printk-which-floods-unnecessary-messages-to-var-log-message.patch
+mptspi-fix-for-incorrect-data-underrun-errata.patch
diff --git a/queue-2.6.32/tpm-autoload-tpm_tis-based-on-system-pnp-ids.patch b/queue-2.6.32/tpm-autoload-tpm_tis-based-on-system-pnp-ids.patch
new file mode 100644 (file)
index 0000000..3d2bd12
--- /dev/null
@@ -0,0 +1,34 @@
+From 31bde71c202722a76686c3cf69a254c8a912275a Mon Sep 17 00:00:00 2001
+From: Matt Domsch <Matt_Domsch@dell.com>
+Date: Tue, 3 Nov 2009 12:05:50 +1100
+Subject: tpm: autoload tpm_tis based on system PnP IDs
+
+From: Matt Domsch <Matt_Domsch@dell.com>
+
+commit 31bde71c202722a76686c3cf69a254c8a912275a upstream.
+
+The tpm_tis driver already has a list of supported pnp_device_ids.
+This patch simply exports that list as a MODULE_DEVICE_TABLE() so that
+the module autoloader will discover and load the module at boottime.
+
+Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
+Acked-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: James Morris <jmorris@namei.org>
+Cc: maximilian attems <max@stro.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/tpm/tpm_tis.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/char/tpm/tpm_tis.c
++++ b/drivers/char/tpm/tpm_tis.c
+@@ -637,6 +637,7 @@ static struct pnp_device_id tpm_pnp_tbl[
+       {"", 0},                /* User Specified */
+       {"", 0}                 /* Terminator */
+ };
++MODULE_DEVICE_TABLE(pnp, tpm_pnp_tbl);
+ static __devexit void tpm_tis_pnp_remove(struct pnp_dev *dev)
+ {