From: Chris Wright Date: Thu, 13 Mar 2008 06:16:04 +0000 (-0700) Subject: more backlog added to 2.6.24 queue X-Git-Tag: v2.6.24.4~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a231d9fbdccae1e9c8218dbff9abb7e7d9dac4f;p=thirdparty%2Fkernel%2Fstable-queue.git more backlog added to 2.6.24 queue --- diff --git a/queue-2.6.24/arcmsr-fix-irqs-disabled-warning-spew.patch b/queue-2.6.24/arcmsr-fix-irqs-disabled-warning-spew.patch new file mode 100644 index 00000000000..b18a11d8614 --- /dev/null +++ b/queue-2.6.24/arcmsr-fix-irqs-disabled-warning-spew.patch @@ -0,0 +1,95 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 11:28:22 2008 +From: Mike Pagano +To: stable@kernel.org +Date: Wed, 27 Feb 2008 19:35:01 -0500 +Message-Id: <200802271935.01193.mpagano@gentoo.org> +Cc: kernel@gentoo.org, dsd@gentoo.org +Subject: arcmsr: fix IRQs disabled warning spew + +As of 2.6.24, running the archttp passthrough daemon with the arcmsr +driver produces an endless spew of dma_free_coherent warnings: + + WARNING: at arch/x86/kernel/pci-dma_64.c:169 dma_free_coherent() + +It turns out that coherent memory is not needed, so commit 76d78300 by +Nick Cheng switched it to kmalloc (as well as +making a lot of other changes which have not been included here). + +James Bottomley pointed out that the new kmalloc usage was also wrong, +I corrected this in commit 69e562c2. + +This patch combines both of the above for the purpose of fixing 2.6.24. +details in http://bugs.gentoo.org/208493. + +Signed-off-by: Daniel Drake +Cc: Nick Cheng +Cc: James Bottomley +Signed-off-by: Chris Wright + +--- + drivers/scsi/arcmsr/arcmsr_hba.c | 20 +++++++++----------- + 1 file changed, 9 insertions(+), 11 deletions(-) + +--- a/drivers/scsi/arcmsr/arcmsr_hba.c ++++ b/drivers/scsi/arcmsr/arcmsr_hba.c +@@ -1380,17 +1380,16 @@ static int arcmsr_iop_message_xfer(struc + switch(controlcode) { + + case ARCMSR_MESSAGE_READ_RQBUFFER: { +- unsigned long *ver_addr; +- dma_addr_t buf_handle; ++ unsigned char *ver_addr; + uint8_t *pQbuffer, *ptmpQbuffer; + int32_t allxfer_len = 0; + +- ver_addr = pci_alloc_consistent(acb->pdev, 1032, &buf_handle); ++ ver_addr = kmalloc(1032, GFP_ATOMIC); + if (!ver_addr) { + retvalue = ARCMSR_MESSAGE_FAIL; + goto message_out; + } +- ptmpQbuffer = (uint8_t *) ver_addr; ++ ptmpQbuffer = ver_addr; + while ((acb->rqbuf_firstindex != acb->rqbuf_lastindex) + && (allxfer_len < 1031)) { + pQbuffer = &acb->rqbuffer[acb->rqbuf_firstindex]; +@@ -1419,25 +1418,24 @@ static int arcmsr_iop_message_xfer(struc + } + arcmsr_iop_message_read(acb); + } +- memcpy(pcmdmessagefld->messagedatabuffer, (uint8_t *)ver_addr, allxfer_len); ++ memcpy(pcmdmessagefld->messagedatabuffer, ver_addr, allxfer_len); + pcmdmessagefld->cmdmessage.Length = allxfer_len; + pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_OK; +- pci_free_consistent(acb->pdev, 1032, ver_addr, buf_handle); ++ kfree(ver_addr); + } + break; + + case ARCMSR_MESSAGE_WRITE_WQBUFFER: { +- unsigned long *ver_addr; +- dma_addr_t buf_handle; ++ unsigned char *ver_addr; + int32_t my_empty_len, user_len, wqbuf_firstindex, wqbuf_lastindex; + uint8_t *pQbuffer, *ptmpuserbuffer; + +- ver_addr = pci_alloc_consistent(acb->pdev, 1032, &buf_handle); ++ ver_addr = kmalloc(1032, GFP_ATOMIC); + if (!ver_addr) { + retvalue = ARCMSR_MESSAGE_FAIL; + goto message_out; + } +- ptmpuserbuffer = (uint8_t *)ver_addr; ++ ptmpuserbuffer = ver_addr; + user_len = pcmdmessagefld->cmdmessage.Length; + memcpy(ptmpuserbuffer, pcmdmessagefld->messagedatabuffer, user_len); + wqbuf_lastindex = acb->wqbuf_lastindex; +@@ -1483,7 +1481,7 @@ static int arcmsr_iop_message_xfer(struc + retvalue = ARCMSR_MESSAGE_FAIL; + } + } +- pci_free_consistent(acb->pdev, 1032, ver_addr, buf_handle); ++ kfree(ver_addr); + } + break; + diff --git a/queue-2.6.24/atmel_spi-fix-clock-polarity.patch b/queue-2.6.24/atmel_spi-fix-clock-polarity.patch new file mode 100644 index 00000000000..9e955a9baf6 --- /dev/null +++ b/queue-2.6.24/atmel_spi-fix-clock-polarity.patch @@ -0,0 +1,61 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 14:16:24 2008 +From: Haavard Skinnemoen +To: stable@kernel.org +Date: Fri, 29 Feb 2008 15:16:16 +0100 +Message-Id: <1204294576-21505-1-git-send-email-hskinnemoen@atmel.com> +Cc: david-b@pacbell.net, anemo@mba.ocn.ne.jp, torvalds@linux-foundation.org, akpm@linux-foundation.org +Subject: atmel_spi: fix clock polarity + +From: Atsushi Nemoto +commit: f6febccd7f86fbe94858a4a32d9384cc014c9f40 + +The atmel_spi driver does not initialize clock polarity correctly (except for +at91rm9200 CS0 channel) in some case. + +The atmel_spi driver uses gpio-controlled chipselect. OTOH spi clock signal +is controlled by CSRn.CPOL bit, but this register controls clock signal +correctly only in 'real transfer' duration. At the time of cs_activate() +call, CSRn.CPOL will be initialized correctly, but the controller do not know +which channel is to be used next, so clock signal will stay at the inactive +state of last transfer. If clock polarity of new transfer and last transfer +was differ, new transfer will start with wrong clock signal state. + +For example, if you started SPI MODE 2 or 3 transfer after SPI MODE 0 or 1 +transfer, the clock signal state at the assertion of chipselect will be low. +Of course this will violates SPI transfer. + +This patch is short term solution for this problem. It makes all CSRn.CPOL +match for the transfer before activating chipselect. For longer term, the +best fix might be to let NPCS0 stay selected permanently in MR and overwrite +CSR0 with to the new slave's settings before asserting CS. + +Signed-off-by: Atsushi Nemoto +Acked-by: Haavard Skinnemoen +Cc: David Brownell +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Chris Wright +--- + + drivers/spi/atmel_spi.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/spi/atmel_spi.c ++++ b/drivers/spi/atmel_spi.c +@@ -85,6 +85,16 @@ static void cs_activate(struct atmel_spi + unsigned gpio = (unsigned) spi->controller_data; + unsigned active = spi->mode & SPI_CS_HIGH; + u32 mr; ++ int i; ++ u32 csr; ++ u32 cpol = (spi->mode & SPI_CPOL) ? SPI_BIT(CPOL) : 0; ++ ++ /* Make sure clock polarity is correct */ ++ for (i = 0; i < spi->master->num_chipselect; i++) { ++ csr = spi_readl(as, CSR0 + 4 * i); ++ if ((csr ^ cpol) & SPI_BIT(CPOL)) ++ spi_writel(as, CSR0 + 4 * i, csr ^ SPI_BIT(CPOL)); ++ } + + mr = spi_readl(as, MR); + mr = SPI_BFINS(PCS, ~(1 << spi->chip_select), mr); diff --git a/queue-2.6.24/b43-backport-bcm4311-fix.patch b/queue-2.6.24/b43-backport-bcm4311-fix.patch new file mode 100644 index 00000000000..510d6173b00 --- /dev/null +++ b/queue-2.6.24/b43-backport-bcm4311-fix.patch @@ -0,0 +1,136 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 14:13:11 2008 +From: Michael Buesch +To: stable@kernel.org +Date: Fri, 29 Feb 2008 12:55:41 +0100 +Content-Disposition: inline +Message-Id: <200802291255.41906.mb@bu3sch.de> +Cc: Greg KH , linux-wireless@vger.kernel.org, bcm43xx-dev@lists.berlios.de, alexey.zaytsev@gmail.com +Subject: b43: Backport bcm4311 fix + +This is a backport of upstream commit 013978b6 ("b43: Changes to enable +BCM4311 rev 02 with wireless core revision 13") and the changes include +the following: + +(1) Add the 802.11 rev 13 device to the ssb_device_id table to load b43. +(2) Add PHY revision 9 to the supported list. +(3) Change the 2-bit routing code for address extensions to 0b10 rather + than the 0b01 used for the 32-bit case. +(4) Remove some magic numbers in the DMA setup. + +The DMA implementation for this chip supports full 64-bit addressing with +one exception. Whenever the Descriptor Ring Buffer is in high memory, a +fatal DMA error occurs. This problem was not present in 2.6.24-rc2 due +to code to "Bias the placement of kernel pages at lower PFNs". When +commit 44048d70 reverted that code, the DMA error appeared. As a "fix", +use the GFP_DMA flag when allocating the buffer for 64-bit DMA. At present, +this problem is thought to arise from a hardware error. + +Signed-off-by: Michael Buesch +Cc: Larry Finger +Cc: John W. Linville +Cc: Alexey Zaytsev +Signed-off-by: Chris Wright + +--- + drivers/net/wireless/b43/dma.c | 30 ++++++++++++++++++++++-------- + drivers/net/wireless/b43/main.c | 3 ++- + 2 files changed, 24 insertions(+), 9 deletions(-) + +--- a/drivers/net/wireless/b43/dma.c ++++ b/drivers/net/wireless/b43/dma.c +@@ -165,7 +165,7 @@ static void op64_fill_descriptor(struct + addrhi = (((u64) dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK); + addrext = (((u64) dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK) + >> SSB_DMA_TRANSLATION_SHIFT; +- addrhi |= ssb_dma_translation(ring->dev->dev); ++ addrhi |= (ssb_dma_translation(ring->dev->dev) << 1); + if (slot == ring->nr_slots - 1) + ctl0 |= B43_DMA64_DCTL0_DTABLEEND; + if (start) +@@ -426,9 +426,21 @@ static inline + static int alloc_ringmemory(struct b43_dmaring *ring) + { + struct device *dev = ring->dev->dev->dev; ++ gfp_t flags = GFP_KERNEL; + ++ /* The specs call for 4K buffers for 30- and 32-bit DMA with 4K ++ * alignment and 8K buffers for 64-bit DMA with 8K alignment. Testing ++ * has shown that 4K is sufficient for the latter as long as the buffer ++ * does not cross an 8K boundary. ++ * ++ * For unknown reasons - possibly a hardware error - the BCM4311 rev ++ * 02, which uses 64-bit DMA, needs the ring buffer in very low memory, ++ * which accounts for the GFP_DMA flag below. ++ */ ++ if (ring->dma64) ++ flags |= GFP_DMA; + ring->descbase = dma_alloc_coherent(dev, B43_DMA_RINGMEMSIZE, +- &(ring->dmabase), GFP_KERNEL); ++ &(ring->dmabase), flags); + if (!ring->descbase) { + b43err(ring->dev->wl, "DMA ringmemory allocation failed\n"); + return -ENOMEM; +@@ -483,7 +495,7 @@ int b43_dmacontroller_rx_reset(struct b4 + return 0; + } + +-/* Reset the RX DMA channel */ ++/* Reset the TX DMA channel */ + int b43_dmacontroller_tx_reset(struct b43_wldev *dev, u16 mmio_base, int dma64) + { + int i; +@@ -647,7 +659,7 @@ static int dmacontroller_setup(struct b4 + b43_dma_write(ring, B43_DMA64_TXRINGHI, + ((ringbase >> 32) & + ~SSB_DMA_TRANSLATION_MASK) +- | trans); ++ | (trans << 1)); + } else { + u32 ringbase = (u32) (ring->dmabase); + +@@ -680,8 +692,9 @@ static int dmacontroller_setup(struct b4 + b43_dma_write(ring, B43_DMA64_RXRINGHI, + ((ringbase >> 32) & + ~SSB_DMA_TRANSLATION_MASK) +- | trans); +- b43_dma_write(ring, B43_DMA64_RXINDEX, 200); ++ | (trans << 1)); ++ b43_dma_write(ring, B43_DMA64_RXINDEX, ring->nr_slots * ++ sizeof(struct b43_dmadesc64)); + } else { + u32 ringbase = (u32) (ring->dmabase); + +@@ -695,11 +708,12 @@ static int dmacontroller_setup(struct b4 + b43_dma_write(ring, B43_DMA32_RXRING, + (ringbase & ~SSB_DMA_TRANSLATION_MASK) + | trans); +- b43_dma_write(ring, B43_DMA32_RXINDEX, 200); ++ b43_dma_write(ring, B43_DMA32_RXINDEX, ring->nr_slots * ++ sizeof(struct b43_dmadesc32)); + } + } + +- out: ++out: + return err; + } + +--- a/drivers/net/wireless/b43/main.c ++++ b/drivers/net/wireless/b43/main.c +@@ -101,6 +101,7 @@ static const struct ssb_device_id b43_ss + SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 7), + SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 9), + SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 10), ++ SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 13), + SSB_DEVTABLE_END + }; + +@@ -3079,7 +3080,7 @@ static int b43_phy_versioning(struct b43 + unsupported = 1; + break; + case B43_PHYTYPE_G: +- if (phy_rev > 8) ++ if (phy_rev > 9) + unsupported = 1; + break; + default: diff --git a/queue-2.6.24/e1000e-fix-crc-stripping-in-hardware-context-bug.patch b/queue-2.6.24/e1000e-fix-crc-stripping-in-hardware-context-bug.patch new file mode 100644 index 00000000000..31c8c98c70a --- /dev/null +++ b/queue-2.6.24/e1000e-fix-crc-stripping-in-hardware-context-bug.patch @@ -0,0 +1,41 @@ +From 5918bd88effd0233a048983570ec5803f5f753dc Mon Sep 17 00:00:00 2001 +From: Auke Kok +Date: Tue, 12 Feb 2008 15:20:24 -0800 +Subject: e1000e: Fix CRC stripping in hardware context bug + +CRC stripping was only correctly enabled for packet split recieves +which is used when receiving jumbo frames. Correctly enable SECRC +also for normal buffer packet receives. + +Tested by Andy Gospodarek and Johan Andersson, see bugzilla #9940. + +Signed-off-by: Auke Kok +Signed-off-by: Jeff Garzik +Cc: Mike Pagano +Signed-off-by: Chris Wright +--- + drivers/net/e1000e/netdev.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/net/e1000e/netdev.c ++++ b/drivers/net/e1000e/netdev.c +@@ -1686,6 +1686,9 @@ static void e1000_setup_rctl(struct e100 + else + rctl |= E1000_RCTL_LPE; + ++ /* Enable hardware CRC frame stripping */ ++ rctl |= E1000_RCTL_SECRC; ++ + /* Setup buffer sizes */ + rctl &= ~E1000_RCTL_SZ_4096; + rctl |= E1000_RCTL_BSEX; +@@ -1751,9 +1754,6 @@ static void e1000_setup_rctl(struct e100 + + /* Enable Packet split descriptors */ + rctl |= E1000_RCTL_DTYP_PS; +- +- /* Enable hardware CRC frame stripping */ +- rctl |= E1000_RCTL_SECRC; + + psrctl |= adapter->rx_ps_bsize0 >> + E1000_PSRCTL_BSIZE0_SHIFT; diff --git a/queue-2.6.24/ecryptfs-make-ecryptfs_prepare_write-decrypt-the-page.patch b/queue-2.6.24/ecryptfs-make-ecryptfs_prepare_write-decrypt-the-page.patch new file mode 100644 index 00000000000..7849e4349ac --- /dev/null +++ b/queue-2.6.24/ecryptfs-make-ecryptfs_prepare_write-decrypt-the-page.patch @@ -0,0 +1,172 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 14:48:05 2008 +Date: Wed, 5 Mar 2008 00:50:13 GMT +Message-Id: <200803050050.m250oCvJ002167@hera.kernel.org> +From: jejb@kernel.org +To: jejb@kernel.org, stable@kernel.org +Subject: eCryptfs: make ecryptfs_prepare_write decrypt the page + +From: Michael Halcrow +commit: e4465fdaeb3f7b5ef47f389d3eac76db79ff20d8 + +When the page is not up to date, ecryptfs_prepare_write() should be +acting much like ecryptfs_readpage(). This includes the painfully +obvious step of actually decrypting the page contents read from the +lower encrypted file. + +Note that this patch resolves a bug in eCryptfs in 2.6.24 that one can +produce with these steps: + +# mount -t ecryptfs /secret /secret +# echo "abc" > /secret/file.txt +# umount /secret +# mount -t ecryptfs /secret /secret +# echo "def" >> /secret/file.txt +# cat /secret/file.txt + +Without this patch, the resulting data returned from cat is likely to +be something other than "abc\ndef\n". + +(Thanks to Benedikt Driessen for reporting this.) + +Signed-off-by: Michael Halcrow +Cc: Benedikt Driessen +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +[chrisw@sous-sol.org: backport to 2.6.24.3] +Signed-off-by: Chris Wright +--- + fs/ecryptfs/mmap.c | 102 +++++++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 76 insertions(+), 26 deletions(-) + +--- a/fs/ecryptfs/mmap.c ++++ b/fs/ecryptfs/mmap.c +@@ -263,52 +263,102 @@ out: + return 0; + } + +-/* This function must zero any hole we create */ ++/** ++ * ecryptfs_prepare_write ++ * @file: The eCryptfs file ++ * @page: The eCryptfs page ++ * @from: The start byte from which we will write ++ * @to: The end byte to which we will write ++ * ++ * This function must zero any hole we create ++ * ++ * Returns zero on success; non-zero otherwise ++ */ + static int ecryptfs_prepare_write(struct file *file, struct page *page, + unsigned from, unsigned to) + { +- int rc = 0; + loff_t prev_page_end_size; ++ int rc = 0; + + if (!PageUptodate(page)) { +- rc = ecryptfs_read_lower_page_segment(page, page->index, 0, +- PAGE_CACHE_SIZE, +- page->mapping->host); +- if (rc) { +- printk(KERN_ERR "%s: Error attemping to read lower " +- "page segment; rc = [%d]\n", __FUNCTION__, rc); +- ClearPageUptodate(page); +- goto out; +- } else ++ struct ecryptfs_crypt_stat *crypt_stat = ++ &ecryptfs_inode_to_private( ++ file->f_path.dentry->d_inode)->crypt_stat; ++ ++ if (!(crypt_stat->flags & ECRYPTFS_ENCRYPTED) ++ || (crypt_stat->flags & ECRYPTFS_NEW_FILE)) { ++ rc = ecryptfs_read_lower_page_segment( ++ page, page->index, 0, PAGE_CACHE_SIZE, ++ page->mapping->host); ++ if (rc) { ++ printk(KERN_ERR "%s: Error attemping to read " ++ "lower page segment; rc = [%d]\n", ++ __FUNCTION__, rc); ++ ClearPageUptodate(page); ++ goto out; ++ } else ++ SetPageUptodate(page); ++ } else if (crypt_stat->flags & ECRYPTFS_VIEW_AS_ENCRYPTED) { ++ if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR) { ++ rc = ecryptfs_copy_up_encrypted_with_header( ++ page, crypt_stat); ++ if (rc) { ++ printk(KERN_ERR "%s: Error attempting " ++ "to copy the encrypted content " ++ "from the lower file whilst " ++ "inserting the metadata from " ++ "the xattr into the header; rc " ++ "= [%d]\n", __FUNCTION__, rc); ++ ClearPageUptodate(page); ++ goto out; ++ } ++ SetPageUptodate(page); ++ } else { ++ rc = ecryptfs_read_lower_page_segment( ++ page, page->index, 0, PAGE_CACHE_SIZE, ++ page->mapping->host); ++ if (rc) { ++ printk(KERN_ERR "%s: Error reading " ++ "page; rc = [%d]\n", ++ __FUNCTION__, rc); ++ ClearPageUptodate(page); ++ goto out; ++ } ++ SetPageUptodate(page); ++ } ++ } else { ++ rc = ecryptfs_decrypt_page(page); ++ if (rc) { ++ printk(KERN_ERR "%s: Error decrypting page " ++ "at index [%ld]; rc = [%d]\n", ++ __FUNCTION__, page->index, rc); ++ ClearPageUptodate(page); ++ goto out; ++ } + SetPageUptodate(page); ++ } + } +- + prev_page_end_size = ((loff_t)page->index << PAGE_CACHE_SHIFT); +- +- /* +- * If creating a page or more of holes, zero them out via truncate. +- * Note, this will increase i_size. +- */ ++ /* If creating a page or more of holes, zero them out via truncate. ++ * Note, this will increase i_size. */ + if (page->index != 0) { + if (prev_page_end_size > i_size_read(page->mapping->host)) { + rc = ecryptfs_truncate(file->f_path.dentry, + prev_page_end_size); + if (rc) { +- printk(KERN_ERR "Error on attempt to " ++ printk(KERN_ERR "%s: Error on attempt to " + "truncate to (higher) offset [%lld];" +- " rc = [%d]\n", prev_page_end_size, rc); ++ " rc = [%d]\n", __FUNCTION__, ++ prev_page_end_size, rc); + goto out; + } + } + } +- /* +- * Writing to a new page, and creating a small hole from start of page? +- * Zero it out. +- */ +- if ((i_size_read(page->mapping->host) == prev_page_end_size) && +- (from != 0)) { ++ /* Writing to a new page, and creating a small hole from start ++ * of page? Zero it out. */ ++ if ((i_size_read(page->mapping->host) == prev_page_end_size) ++ && (from != 0)) + zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0); +- } + out: + return rc; + } diff --git a/queue-2.6.24/fix-default-compose-table-initialization.patch b/queue-2.6.24/fix-default-compose-table-initialization.patch new file mode 100644 index 00000000000..2347e82559a --- /dev/null +++ b/queue-2.6.24/fix-default-compose-table-initialization.patch @@ -0,0 +1,205 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 15:58:42 2008 +Date: Mon, 3 Mar 2008 01:23:49 +0000 +From: Samuel Thibault +To: torvalds@osdl.org, stable@kernel.org +Message-ID: <20080303012349.GA12338@implementation> +Subject: Fix default compose table initialization + +From: Samuel Thibault +commit: 5ce2087ed0eb424e0889bdc9102727f65d2ecdde + +Oddly enough, unsigned int c = '\300'; puts a "negative" value in c, not +0300... This fixes the default unicode compose table by using integers +instead of character constants. + +Signed-off-by: Samuel Thibault +Signed-off-by: Linus Torvalds + +Fold in upstream commit 10a7f3135ac4937a3dc8ed11614a2b70cbd44728 (Build +fix for drivers/s390/char/defkeymap.c) from Tony Breeds. + +Commit 5ce2087ed0eb424e0889bdc9102727f65d2ecdde (Fix default compose +table initialization) left a trailing quote. + + CC drivers/s390/char/defkeymap.o +drivers/s390/char/defkeymap.c:155: error: missing terminating ' character +drivers/s390/char/defkeymap.c:156: error: syntax error before ';' token +make[3]: *** [drivers/s390/char/defkeymap.o] Error 1 + +Fix that. + +Signed-off-by: Tony Breeds +Signed-off-by: Chris Wright +--- + drivers/acorn/char/defkeymap-l7200.c | 68 +++++++++++++++++------------------ + drivers/char/defkeymap.c_shipped | 68 +++++++++++++++++------------------ + drivers/s390/char/defkeymap.c | 4 +- + 3 files changed, 70 insertions(+), 70 deletions(-) + +--- a/drivers/acorn/char/defkeymap-l7200.c ++++ b/drivers/acorn/char/defkeymap-l7200.c +@@ -347,40 +347,40 @@ char *func_table[MAX_NR_FUNC] = { + }; + + struct kbdiacruc accent_table[MAX_DIACR] = { +- {'`', 'A', '\300'}, {'`', 'a', '\340'}, +- {'\'', 'A', '\301'}, {'\'', 'a', '\341'}, +- {'^', 'A', '\302'}, {'^', 'a', '\342'}, +- {'~', 'A', '\303'}, {'~', 'a', '\343'}, +- {'"', 'A', '\304'}, {'"', 'a', '\344'}, +- {'O', 'A', '\305'}, {'o', 'a', '\345'}, +- {'0', 'A', '\305'}, {'0', 'a', '\345'}, +- {'A', 'A', '\305'}, {'a', 'a', '\345'}, +- {'A', 'E', '\306'}, {'a', 'e', '\346'}, +- {',', 'C', '\307'}, {',', 'c', '\347'}, +- {'`', 'E', '\310'}, {'`', 'e', '\350'}, +- {'\'', 'E', '\311'}, {'\'', 'e', '\351'}, +- {'^', 'E', '\312'}, {'^', 'e', '\352'}, +- {'"', 'E', '\313'}, {'"', 'e', '\353'}, +- {'`', 'I', '\314'}, {'`', 'i', '\354'}, +- {'\'', 'I', '\315'}, {'\'', 'i', '\355'}, +- {'^', 'I', '\316'}, {'^', 'i', '\356'}, +- {'"', 'I', '\317'}, {'"', 'i', '\357'}, +- {'-', 'D', '\320'}, {'-', 'd', '\360'}, +- {'~', 'N', '\321'}, {'~', 'n', '\361'}, +- {'`', 'O', '\322'}, {'`', 'o', '\362'}, +- {'\'', 'O', '\323'}, {'\'', 'o', '\363'}, +- {'^', 'O', '\324'}, {'^', 'o', '\364'}, +- {'~', 'O', '\325'}, {'~', 'o', '\365'}, +- {'"', 'O', '\326'}, {'"', 'o', '\366'}, +- {'/', 'O', '\330'}, {'/', 'o', '\370'}, +- {'`', 'U', '\331'}, {'`', 'u', '\371'}, +- {'\'', 'U', '\332'}, {'\'', 'u', '\372'}, +- {'^', 'U', '\333'}, {'^', 'u', '\373'}, +- {'"', 'U', '\334'}, {'"', 'u', '\374'}, +- {'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, +- {'T', 'H', '\336'}, {'t', 'h', '\376'}, +- {'s', 's', '\337'}, {'"', 'y', '\377'}, +- {'s', 'z', '\337'}, {'i', 'j', '\377'}, ++ {'`', 'A', 0300}, {'`', 'a', 0340}, ++ {'\'', 'A', 0301}, {'\'', 'a', 0341}, ++ {'^', 'A', 0302}, {'^', 'a', 0342}, ++ {'~', 'A', 0303}, {'~', 'a', 0343}, ++ {'"', 'A', 0304}, {'"', 'a', 0344}, ++ {'O', 'A', 0305}, {'o', 'a', 0345}, ++ {'0', 'A', 0305}, {'0', 'a', 0345}, ++ {'A', 'A', 0305}, {'a', 'a', 0345}, ++ {'A', 'E', 0306}, {'a', 'e', 0346}, ++ {',', 'C', 0307}, {',', 'c', 0347}, ++ {'`', 'E', 0310}, {'`', 'e', 0350}, ++ {'\'', 'E', 0311}, {'\'', 'e', 0351}, ++ {'^', 'E', 0312}, {'^', 'e', 0352}, ++ {'"', 'E', 0313}, {'"', 'e', 0353}, ++ {'`', 'I', 0314}, {'`', 'i', 0354}, ++ {'\'', 'I', 0315}, {'\'', 'i', 0355}, ++ {'^', 'I', 0316}, {'^', 'i', 0356}, ++ {'"', 'I', 0317}, {'"', 'i', 0357}, ++ {'-', 'D', 0320}, {'-', 'd', 0360}, ++ {'~', 'N', 0321}, {'~', 'n', 0361}, ++ {'`', 'O', 0322}, {'`', 'o', 0362}, ++ {'\'', 'O', 0323}, {'\'', 'o', 0363}, ++ {'^', 'O', 0324}, {'^', 'o', 0364}, ++ {'~', 'O', 0325}, {'~', 'o', 0365}, ++ {'"', 'O', 0326}, {'"', 'o', 0366}, ++ {'/', 'O', 0330}, {'/', 'o', 0370}, ++ {'`', 'U', 0331}, {'`', 'u', 0371}, ++ {'\'', 'U', 0332}, {'\'', 'u', 0372}, ++ {'^', 'U', 0333}, {'^', 'u', 0373}, ++ {'"', 'U', 0334}, {'"', 'u', 0374}, ++ {'\'', 'Y', 0335}, {'\'', 'y', 0375}, ++ {'T', 'H', 0336}, {'t', 'h', 0376}, ++ {'s', 's', 0337}, {'"', 'y', 0377}, ++ {'s', 'z', 0337}, {'i', 'j', 0377}, + }; + + unsigned int accent_table_size = 68; +--- a/drivers/char/defkeymap.c_shipped ++++ b/drivers/char/defkeymap.c_shipped +@@ -223,40 +223,40 @@ char *func_table[MAX_NR_FUNC] = { + }; + + struct kbdiacruc accent_table[MAX_DIACR] = { +- {'`', 'A', '\300'}, {'`', 'a', '\340'}, +- {'\'', 'A', '\301'}, {'\'', 'a', '\341'}, +- {'^', 'A', '\302'}, {'^', 'a', '\342'}, +- {'~', 'A', '\303'}, {'~', 'a', '\343'}, +- {'"', 'A', '\304'}, {'"', 'a', '\344'}, +- {'O', 'A', '\305'}, {'o', 'a', '\345'}, +- {'0', 'A', '\305'}, {'0', 'a', '\345'}, +- {'A', 'A', '\305'}, {'a', 'a', '\345'}, +- {'A', 'E', '\306'}, {'a', 'e', '\346'}, +- {',', 'C', '\307'}, {',', 'c', '\347'}, +- {'`', 'E', '\310'}, {'`', 'e', '\350'}, +- {'\'', 'E', '\311'}, {'\'', 'e', '\351'}, +- {'^', 'E', '\312'}, {'^', 'e', '\352'}, +- {'"', 'E', '\313'}, {'"', 'e', '\353'}, +- {'`', 'I', '\314'}, {'`', 'i', '\354'}, +- {'\'', 'I', '\315'}, {'\'', 'i', '\355'}, +- {'^', 'I', '\316'}, {'^', 'i', '\356'}, +- {'"', 'I', '\317'}, {'"', 'i', '\357'}, +- {'-', 'D', '\320'}, {'-', 'd', '\360'}, +- {'~', 'N', '\321'}, {'~', 'n', '\361'}, +- {'`', 'O', '\322'}, {'`', 'o', '\362'}, +- {'\'', 'O', '\323'}, {'\'', 'o', '\363'}, +- {'^', 'O', '\324'}, {'^', 'o', '\364'}, +- {'~', 'O', '\325'}, {'~', 'o', '\365'}, +- {'"', 'O', '\326'}, {'"', 'o', '\366'}, +- {'/', 'O', '\330'}, {'/', 'o', '\370'}, +- {'`', 'U', '\331'}, {'`', 'u', '\371'}, +- {'\'', 'U', '\332'}, {'\'', 'u', '\372'}, +- {'^', 'U', '\333'}, {'^', 'u', '\373'}, +- {'"', 'U', '\334'}, {'"', 'u', '\374'}, +- {'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, +- {'T', 'H', '\336'}, {'t', 'h', '\376'}, +- {'s', 's', '\337'}, {'"', 'y', '\377'}, +- {'s', 'z', '\337'}, {'i', 'j', '\377'}, ++ {'`', 'A', 0300}, {'`', 'a', 0340}, ++ {'\'', 'A', 0301}, {'\'', 'a', 0341}, ++ {'^', 'A', 0302}, {'^', 'a', 0342}, ++ {'~', 'A', 0303}, {'~', 'a', 0343}, ++ {'"', 'A', 0304}, {'"', 'a', 0344}, ++ {'O', 'A', 0305}, {'o', 'a', 0345}, ++ {'0', 'A', 0305}, {'0', 'a', 0345}, ++ {'A', 'A', 0305}, {'a', 'a', 0345}, ++ {'A', 'E', 0306}, {'a', 'e', 0346}, ++ {',', 'C', 0307}, {',', 'c', 0347}, ++ {'`', 'E', 0310}, {'`', 'e', 0350}, ++ {'\'', 'E', 0311}, {'\'', 'e', 0351}, ++ {'^', 'E', 0312}, {'^', 'e', 0352}, ++ {'"', 'E', 0313}, {'"', 'e', 0353}, ++ {'`', 'I', 0314}, {'`', 'i', 0354}, ++ {'\'', 'I', 0315}, {'\'', 'i', 0355}, ++ {'^', 'I', 0316}, {'^', 'i', 0356}, ++ {'"', 'I', 0317}, {'"', 'i', 0357}, ++ {'-', 'D', 0320}, {'-', 'd', 0360}, ++ {'~', 'N', 0321}, {'~', 'n', 0361}, ++ {'`', 'O', 0322}, {'`', 'o', 0362}, ++ {'\'', 'O', 0323}, {'\'', 'o', 0363}, ++ {'^', 'O', 0324}, {'^', 'o', 0364}, ++ {'~', 'O', 0325}, {'~', 'o', 0365}, ++ {'"', 'O', 0326}, {'"', 'o', 0366}, ++ {'/', 'O', 0330}, {'/', 'o', 0370}, ++ {'`', 'U', 0331}, {'`', 'u', 0371}, ++ {'\'', 'U', 0332}, {'\'', 'u', 0372}, ++ {'^', 'U', 0333}, {'^', 'u', 0373}, ++ {'"', 'U', 0334}, {'"', 'u', 0374}, ++ {'\'', 'Y', 0335}, {'\'', 'y', 0375}, ++ {'T', 'H', 0336}, {'t', 'h', 0376}, ++ {'s', 's', 0337}, {'"', 'y', 0377}, ++ {'s', 'z', 0337}, {'i', 'j', 0377}, + }; + + unsigned int accent_table_size = 68; +--- a/drivers/s390/char/defkeymap.c ++++ b/drivers/s390/char/defkeymap.c +@@ -151,8 +151,8 @@ char *func_table[MAX_NR_FUNC] = { + }; + + struct kbdiacruc accent_table[MAX_DIACR] = { +- {'^', 'c', '\003'}, {'^', 'd', '\004'}, +- {'^', 'z', '\032'}, {'^', '\012', '\000'}, ++ {'^', 'c', 0003}, {'^', 'd', 0004}, ++ {'^', 'z', 0032}, {'^', 0012, 0000}, + }; + + unsigned int accent_table_size = 4; diff --git a/queue-2.6.24/ioat-fix-ack-handling-driver-must-ensure-that-ack-is-zero.patch b/queue-2.6.24/ioat-fix-ack-handling-driver-must-ensure-that-ack-is-zero.patch new file mode 100644 index 00000000000..da3168dba05 --- /dev/null +++ b/queue-2.6.24/ioat-fix-ack-handling-driver-must-ensure-that-ack-is-zero.patch @@ -0,0 +1,44 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 14:37:56 2008 +Date: Tue, 4 Mar 2008 19:40:09 GMT +Message-Id: <200803041940.m24Je9mN030185@hera.kernel.org> +From: jejb@kernel.org +To: jejb@kernel.org, stable@kernel.org +Subject: ioat: fix 'ack' handling, driver must ensure that 'ack' is zero + +From: Dan Williams +commit: 6497dcffe07b7c3d863f9899280c4f6eae999161 + +Initialize 'ack' to zero in case the descriptor has been recycled. + +Prevents "kernel BUG at crypto/async_tx/async_xor.c:185!" + +Signed-off-by: Dan Williams +Acked-by: Shannon Nelson +[chrisw@sous-sol.org: backport to 2.6.24.3] +Signed-off-by: Chris Wright +--- +Dan, Shannon, can you please verify the backport. +thanks, +-chris + + drivers/dma/ioat_dma.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/dma/ioat_dma.c ++++ b/drivers/dma/ioat_dma.c +@@ -726,6 +726,7 @@ static struct dma_async_tx_descriptor *i + + if (new) { + new->len = len; ++ new->async_tx.ack = 0; + return &new->async_tx; + } else + return NULL; +@@ -749,6 +750,7 @@ static struct dma_async_tx_descriptor *i + + if (new) { + new->len = len; ++ new->async_tx.ack = 0; + return &new->async_tx; + } else + return NULL; diff --git a/queue-2.6.24/macb-fix-speed-setting.patch b/queue-2.6.24/macb-fix-speed-setting.patch new file mode 100644 index 00000000000..27cc914ec25 --- /dev/null +++ b/queue-2.6.24/macb-fix-speed-setting.patch @@ -0,0 +1,34 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 14:35:07 2008 +From: Haavard Skinnemoen +To: stable@kernel.org +Date: Mon, 3 Mar 2008 16:51:48 +0100 +Message-Id: <1204559508-13480-1-git-send-email-hskinnemoen@atmel.com> +Cc: anemo@mba.ocn.ne.jp, hskinnemoen@atmel.com, jeff@garzik.org +Subject: macb: Fix speed setting + +From: Atsushi Nemoto +commit: 179956f498bd8cc55fb803c4ee0cf18be59c8b01 + +Fix NCFGR.SPD setting on 10Mbps. This bug was introduced by +conversion to generic PHY layer in kernel 2.6.23. + +Signed-off-by: Atsushi Nemoto +Signed-off-by: Jeff Garzik +Signed-off-by: Haavard Skinnemoen +Signed-off-by: Chris Wright +--- + + drivers/net/macb.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/macb.c ++++ b/drivers/net/macb.c +@@ -148,7 +148,7 @@ static void macb_handle_link_change(stru + + if (phydev->duplex) + reg |= MACB_BIT(FD); +- if (phydev->speed) ++ if (phydev->speed == SPEED_100) + reg |= MACB_BIT(SPD); + + macb_writel(bp, NCFGR, reg); diff --git a/queue-2.6.24/moduleparam-fix-alpha-ia64-and-ppc64-compile-failures.patch b/queue-2.6.24/moduleparam-fix-alpha-ia64-and-ppc64-compile-failures.patch new file mode 100644 index 00000000000..71c1c4834e2 --- /dev/null +++ b/queue-2.6.24/moduleparam-fix-alpha-ia64-and-ppc64-compile-failures.patch @@ -0,0 +1,62 @@ +From 91d35dd93e14c34539a8005183ea500f25caad02 Mon Sep 17 00:00:00 2001 +From: Ivan Kokshaysky +Date: Wed, 13 Feb 2008 15:03:26 -0800 +Message-Id: <200802271925.13372.mpagano@gentoo.org> +Subject: moduleparam: fix alpha, ia64 and ppc64 compile failures + +[upstream commit: 91d35dd9] + +On alpha, ia64 and ppc64 only relocations to local data can go into +read-only sections. The vast majority of module parameters use the global +generic param_set_*/param_get_* functions, so the 'const' attribute for +struct kernel_param is not only useless, but it also causes compile +failures due to 'section type conflict' in those rare cases where +param_set/get are local functions. + +This fixes http://bugzilla.kernel.org/show_bug.cgi?id=8964 + +Signed-off-by: Ivan Kokshaysky +Cc: Richard Henderson +Cc: "Luck, Tony" +Cc: Anton Blanchard +Cc: Paul Mackerras +Cc: Adrian Bunk +Cc: Kamalesh Babulal +Cc: Rusty Russell +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Cc: Mike Pagano +[chrisw@sous-sol.org: backport to 2.6.24.3] +Signed-off-by: Chris Wright +--- + include/linux/moduleparam.h | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +--- a/include/linux/moduleparam.h ++++ b/include/linux/moduleparam.h +@@ -62,6 +62,16 @@ struct kparam_array + void *elem; + }; + ++/* On alpha, ia64 and ppc64 relocations to global data cannot go into ++ read-only sections (which is part of respective UNIX ABI on these ++ platforms). So 'const' makes no sense and even causes compile failures ++ with some compilers. */ ++#if defined(CONFIG_ALPHA) || defined(CONFIG_IA64) || defined(CONFIG_PPC64) ++#define __moduleparam_const ++#else ++#define __moduleparam_const const ++#endif ++ + /* This is the fundamental function for registering boot/module + parameters. perm sets the visibility in sysfs: 000 means it's + not there, read bits mean it's readable, write bits mean it's +@@ -71,7 +81,7 @@ struct kparam_array + static int __param_perm_check_##name __attribute__((unused)) = \ + BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)); \ + static const char __param_str_##name[] = prefix #name; \ +- static struct kernel_param const __param_##name \ ++ static struct kernel_param __moduleparam_const __param_##name \ + __attribute_used__ \ + __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \ + = { __param_str_##name, perm, set, get, { arg } } diff --git a/queue-2.6.24/pata_hpt-pata_serverworks-fix-udma-masking.patch b/queue-2.6.24/pata_hpt-pata_serverworks-fix-udma-masking.patch new file mode 100644 index 00000000000..e2f9d2cc3c3 --- /dev/null +++ b/queue-2.6.24/pata_hpt-pata_serverworks-fix-udma-masking.patch @@ -0,0 +1,84 @@ +From 6ddd68615ae9b21096545d7d6ab0f04113ae8b42 Mon Sep 17 00:00:00 2001 +From: Alan Cox +Date: Tue, 26 Feb 2008 13:35:54 -0800 +Message-Id: <200802262136.m1QLajKW010124@imap1.linux-foundation.org> +Subject: pata_hpt*, pata_serverworks: fix UDMA masking + +[upstream commit: 6ddd6861] + +When masking, mask out the modes that are unsupported not the ones +that are supported. This makes life happier. + +Signed-off-by: Alan Cox +Signed-off-by: Andrew Morton +Signed-off-by: Jeff Garzik +Signed-off-by: Chris Wright +--- + drivers/ata/pata_hpt366.c | 6 +++--- + drivers/ata/pata_hpt37x.c | 6 +++--- + drivers/ata/pata_serverworks.c | 2 +- + 3 files changed, 7 insertions(+), 7 deletions(-) + +--- a/drivers/ata/pata_hpt366.c ++++ b/drivers/ata/pata_hpt366.c +@@ -27,7 +27,7 @@ + #include + + #define DRV_NAME "pata_hpt366" +-#define DRV_VERSION "0.6.1" ++#define DRV_VERSION "0.6.2" + + struct hpt_clock { + u8 xfer_speed; +@@ -180,9 +180,9 @@ static unsigned long hpt366_filter(struc + if (hpt_dma_blacklisted(adev, "UDMA", bad_ata33)) + mask &= ~ATA_MASK_UDMA; + if (hpt_dma_blacklisted(adev, "UDMA3", bad_ata66_3)) +- mask &= ~(0x07 << ATA_SHIFT_UDMA); ++ mask &= ~(0xF8 << ATA_SHIFT_UDMA); + if (hpt_dma_blacklisted(adev, "UDMA4", bad_ata66_4)) +- mask &= ~(0x0F << ATA_SHIFT_UDMA); ++ mask &= ~(0xF0 << ATA_SHIFT_UDMA); + } + return ata_pci_default_filter(adev, mask); + } +--- a/drivers/ata/pata_hpt37x.c ++++ b/drivers/ata/pata_hpt37x.c +@@ -24,7 +24,7 @@ + #include + + #define DRV_NAME "pata_hpt37x" +-#define DRV_VERSION "0.6.9" ++#define DRV_VERSION "0.6.11" + + struct hpt_clock { + u8 xfer_speed; +@@ -281,7 +281,7 @@ static unsigned long hpt370_filter(struc + if (hpt_dma_blacklisted(adev, "UDMA", bad_ata33)) + mask &= ~ATA_MASK_UDMA; + if (hpt_dma_blacklisted(adev, "UDMA100", bad_ata100_5)) +- mask &= ~(0x1F << ATA_SHIFT_UDMA); ++ mask &= ~(0xE0 << ATA_SHIFT_UDMA); + } + return ata_pci_default_filter(adev, mask); + } +@@ -297,7 +297,7 @@ static unsigned long hpt370a_filter(stru + { + if (adev->class == ATA_DEV_ATA) { + if (hpt_dma_blacklisted(adev, "UDMA100", bad_ata100_5)) +- mask &= ~ (0x1F << ATA_SHIFT_UDMA); ++ mask &= ~(0xE0 << ATA_SHIFT_UDMA); + } + return ata_pci_default_filter(adev, mask); + } +--- a/drivers/ata/pata_serverworks.c ++++ b/drivers/ata/pata_serverworks.c +@@ -226,7 +226,7 @@ static unsigned long serverworks_csb_fil + + for (i = 0; (p = csb_bad_ata100[i]) != NULL; i++) { + if (!strcmp(p, model_num)) +- mask &= ~(0x1F << ATA_SHIFT_UDMA); ++ mask &= ~(0xE0 << ATA_SHIFT_UDMA); + } + return ata_pci_default_filter(adev, mask); + } diff --git a/queue-2.6.24/pci-x86-always-use-conf1-to-access-config-space-below-256-bytes.patch b/queue-2.6.24/pci-x86-always-use-conf1-to-access-config-space-below-256-bytes.patch new file mode 100644 index 00000000000..a412061516b --- /dev/null +++ b/queue-2.6.24/pci-x86-always-use-conf1-to-access-config-space-below-256-bytes.patch @@ -0,0 +1,220 @@ +From a0ca9909609470ad779b9b9cc68ce96e975afff7 Mon Sep 17 00:00:00 2001 +From: Ivan Kokshaysky +Date: Mon, 14 Jan 2008 17:31:09 -0500 +Message-Id: <200802271928.54830.mpagano@gentoo.org> +Subject: PCI x86: always use conf1 to access config space below 256 bytes + +[upsteam commit: a0ca9909] + +Thanks to Loic Prylli , who originally proposed +this idea. + +Always using legacy configuration mechanism for the legacy config space +and extended mechanism (mmconf) for the extended config space is +a simple and very logical approach. It's supposed to resolve all +known mmconf problems. It still allows per-device quirks (tweaking +dev->cfg_size). It also allows to get rid of mmconf fallback code. + +This patch fixes a boot hang on Intel Q35 chipset as detailed at: + http://bugs.gentoo.org/198810 + +Signed-off-by: Ivan Kokshaysky +Signed-off-by: Matthew Wilcox +Signed-off-by: Linus Torvalds +Cc: Mike Pagano +Signed-off-by: Chris Wright +--- + arch/x86/pci/mmconfig-shared.c | 35 ----------------------------------- + arch/x86/pci/mmconfig_32.c | 22 +++++++++------------- + arch/x86/pci/mmconfig_64.c | 22 ++++++++++------------ + arch/x86/pci/pci.h | 7 ------- + 4 files changed, 19 insertions(+), 67 deletions(-) + +--- a/arch/x86/pci/mmconfig-shared.c ++++ b/arch/x86/pci/mmconfig-shared.c +@@ -22,42 +22,9 @@ + #define MMCONFIG_APER_MIN (2 * 1024*1024) + #define MMCONFIG_APER_MAX (256 * 1024*1024) + +-DECLARE_BITMAP(pci_mmcfg_fallback_slots, 32*PCI_MMCFG_MAX_CHECK_BUS); +- + /* Indicate if the mmcfg resources have been placed into the resource table. */ + static int __initdata pci_mmcfg_resources_inserted; + +-/* K8 systems have some devices (typically in the builtin northbridge) +- that are only accessible using type1 +- Normally this can be expressed in the MCFG by not listing them +- and assigning suitable _SEGs, but this isn't implemented in some BIOS. +- Instead try to discover all devices on bus 0 that are unreachable using MM +- and fallback for them. */ +-static void __init unreachable_devices(void) +-{ +- int i, bus; +- /* Use the max bus number from ACPI here? */ +- for (bus = 0; bus < PCI_MMCFG_MAX_CHECK_BUS; bus++) { +- for (i = 0; i < 32; i++) { +- unsigned int devfn = PCI_DEVFN(i, 0); +- u32 val1, val2; +- +- pci_conf1_read(0, bus, devfn, 0, 4, &val1); +- if (val1 == 0xffffffff) +- continue; +- +- if (pci_mmcfg_arch_reachable(0, bus, devfn)) { +- raw_pci_ops->read(0, bus, devfn, 0, 4, &val2); +- if (val1 == val2) +- continue; +- } +- set_bit(i + 32 * bus, pci_mmcfg_fallback_slots); +- printk(KERN_NOTICE "PCI: No mmconfig possible on device" +- " %02x:%02x\n", bus, i); +- } +- } +-} +- + static const char __init *pci_mmcfg_e7520(void) + { + u32 win; +@@ -270,8 +237,6 @@ void __init pci_mmcfg_init(int type) + return; + + if (pci_mmcfg_arch_init()) { +- if (type == 1) +- unreachable_devices(); + if (known_bridge) + pci_mmcfg_insert_resources(IORESOURCE_BUSY); + pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; +--- a/arch/x86/pci/mmconfig_32.c ++++ b/arch/x86/pci/mmconfig_32.c +@@ -30,10 +30,6 @@ static u32 get_base_addr(unsigned int se + struct acpi_mcfg_allocation *cfg; + int cfg_num; + +- if (seg == 0 && bus < PCI_MMCFG_MAX_CHECK_BUS && +- test_bit(PCI_SLOT(devfn) + 32*bus, pci_mmcfg_fallback_slots)) +- return 0; +- + for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) { + cfg = &pci_mmcfg_config[cfg_num]; + if (cfg->pci_segment == seg && +@@ -68,13 +64,16 @@ static int pci_mmcfg_read(unsigned int s + u32 base; + + if ((bus > 255) || (devfn > 255) || (reg > 4095)) { +- *value = -1; ++err: *value = -1; + return -EINVAL; + } + ++ if (reg < 256) ++ return pci_conf1_read(seg,bus,devfn,reg,len,value); ++ + base = get_base_addr(seg, bus, devfn); + if (!base) +- return pci_conf1_read(seg,bus,devfn,reg,len,value); ++ goto err; + + spin_lock_irqsave(&pci_config_lock, flags); + +@@ -105,9 +104,12 @@ static int pci_mmcfg_write(unsigned int + if ((bus > 255) || (devfn > 255) || (reg > 4095)) + return -EINVAL; + ++ if (reg < 256) ++ return pci_conf1_write(seg,bus,devfn,reg,len,value); ++ + base = get_base_addr(seg, bus, devfn); + if (!base) +- return pci_conf1_write(seg,bus,devfn,reg,len,value); ++ return -EINVAL; + + spin_lock_irqsave(&pci_config_lock, flags); + +@@ -134,12 +136,6 @@ static struct pci_raw_ops pci_mmcfg = { + .write = pci_mmcfg_write, + }; + +-int __init pci_mmcfg_arch_reachable(unsigned int seg, unsigned int bus, +- unsigned int devfn) +-{ +- return get_base_addr(seg, bus, devfn) != 0; +-} +- + int __init pci_mmcfg_arch_init(void) + { + printk(KERN_INFO "PCI: Using MMCONFIG\n"); +--- a/arch/x86/pci/mmconfig_64.c ++++ b/arch/x86/pci/mmconfig_64.c +@@ -40,9 +40,7 @@ static char __iomem *get_virt(unsigned i + static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) + { + char __iomem *addr; +- if (seg == 0 && bus < PCI_MMCFG_MAX_CHECK_BUS && +- test_bit(32*bus + PCI_SLOT(devfn), pci_mmcfg_fallback_slots)) +- return NULL; ++ + addr = get_virt(seg, bus); + if (!addr) + return NULL; +@@ -56,13 +54,16 @@ static int pci_mmcfg_read(unsigned int s + + /* Why do we have this when nobody checks it. How about a BUG()!? -AK */ + if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { +- *value = -1; ++err: *value = -1; + return -EINVAL; + } + ++ if (reg < 256) ++ return pci_conf1_read(seg,bus,devfn,reg,len,value); ++ + addr = pci_dev_base(seg, bus, devfn); + if (!addr) +- return pci_conf1_read(seg,bus,devfn,reg,len,value); ++ goto err; + + switch (len) { + case 1: +@@ -88,9 +89,12 @@ static int pci_mmcfg_write(unsigned int + if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) + return -EINVAL; + ++ if (reg < 256) ++ return pci_conf1_write(seg,bus,devfn,reg,len,value); ++ + addr = pci_dev_base(seg, bus, devfn); + if (!addr) +- return pci_conf1_write(seg,bus,devfn,reg,len,value); ++ return -EINVAL; + + switch (len) { + case 1: +@@ -126,12 +130,6 @@ static void __iomem * __init mcfg_iorema + return addr; + } + +-int __init pci_mmcfg_arch_reachable(unsigned int seg, unsigned int bus, +- unsigned int devfn) +-{ +- return pci_dev_base(seg, bus, devfn) != NULL; +-} +- + int __init pci_mmcfg_arch_init(void) + { + int i; +--- a/arch/x86/pci/pci.h ++++ b/arch/x86/pci/pci.h +@@ -98,13 +98,6 @@ extern void pcibios_sort(void); + + /* pci-mmconfig.c */ + +-/* Verify the first 16 busses. We assume that systems with more busses +- get MCFG right. */ +-#define PCI_MMCFG_MAX_CHECK_BUS 16 +-extern DECLARE_BITMAP(pci_mmcfg_fallback_slots, 32*PCI_MMCFG_MAX_CHECK_BUS); +- +-extern int __init pci_mmcfg_arch_reachable(unsigned int seg, unsigned int bus, +- unsigned int devfn); + extern int __init pci_mmcfg_arch_init(void); + + /* diff --git a/queue-2.6.24/scsi-fix-bug-when-sum-bufflen.patch b/queue-2.6.24/scsi-fix-bug-when-sum-bufflen.patch new file mode 100644 index 00000000000..836cd446831 --- /dev/null +++ b/queue-2.6.24/scsi-fix-bug-when-sum-bufflen.patch @@ -0,0 +1,46 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 15:04:02 2008 +From: James Bottomley +To: stable@kernel.org +Date: Wed, 05 Mar 2008 10:23:26 -0600 +Message-Id: <1204734206.3047.37.camel@localhost.localdomain> +Subject: SCSI: fix BUG when sum(scatterlist) > bufflen + +From: Tony Battersby +commit: 4d2de3a50ce19af2008a90636436a1bf5b3b697b + +When sending a SCSI command to a tape drive via the SCSI Generic (sg) +driver, if the command has a data transfer length more than +scatter_elem_sz (32 KB default) and not a multiple of 512, then I either +hit BUG_ON(!valid_dma_direction(direction)) in dma_unmap_sg() or else +the command never completes (depending on the LLDD). + +When constructing scatterlists, the sg driver rounds up the scatterlist +element sizes to be a multiple of 512. This can result in +sum(scatterlist lengths) > bufflen. In this case, scsi_req_map_sg() +incorrectly sets bio->bi_size to sum(scatterlist lengths) rather than to +bufflen. When the command completes, req_bio_endio() detects that +bio->bi_size != 0, and so it doesn't call bio_endio(). This causes the +command to be resubmitted, resulting in BUG_ON or the command never +completing. + +This patch makes scsi_req_map_sg() set bio->bi_size to bufflen rather +than to sum(scatterlist lengths), which fixes the problem. + +Signed-off-by: Tony Battersby +Acked-by: Mike Christie +Signed-off-by: James Bottomley +Signed-off-by: Chris Wright +--- + drivers/scsi/scsi_lib.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/scsi/scsi_lib.c ++++ b/drivers/scsi/scsi_lib.c +@@ -298,7 +298,6 @@ static int scsi_req_map_sg(struct reques + page = sg_page(sg); + off = sg->offset; + len = sg->length; +- data_len += len; + + while (len > 0 && data_len > 0) { + /* diff --git a/queue-2.6.24/scsi-gdth-bugfix-for-the-at-exit-problems.patch b/queue-2.6.24/scsi-gdth-bugfix-for-the-at-exit-problems.patch new file mode 100644 index 00000000000..c360b99ad93 --- /dev/null +++ b/queue-2.6.24/scsi-gdth-bugfix-for-the-at-exit-problems.patch @@ -0,0 +1,177 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 17:02:30 2008 +Date: Thu, 6 Mar 2008 02:10:15 GMT +Message-Id: <200803060210.m262AFgC024896@hera.kernel.org> +From: jejb@kernel.org +To: jejb@kernel.org, stable@kernel.org +Subject: SCSI: gdth: bugfix for the at-exit problems + +From: Boaz Harrosh +commit: b31ddd31c266c2ad1b708cad0d3d8e0aa7fa2737 + +gdth_exit would first remove all cards then stop the timer +and would not sync with the timer function. This caused a crash +in gdth_timer() when module was unloaded. +So del_timer_sync the timer before we delete the cards. + +also the reboot notifier function would crash. So clean +that up and fix the crashes. + +Signed-off-by: Boaz Harrosh +Tested-by: Joerg Dorchain: +Tested-by: Stefan Priebe +Tested-by: Jon Chelton +Cc: Stable Tree +Signed-off-by: James Bottomley +Signed-off-by: Chris Wright +--- + drivers/scsi/gdth.c | 82 +++++++++++++++++----------------------------------- + 1 file changed, 28 insertions(+), 54 deletions(-) + +--- a/drivers/scsi/gdth.c ++++ b/drivers/scsi/gdth.c +@@ -183,7 +183,6 @@ static int gdth_ioctl(struct inode *inod + unsigned int cmd, unsigned long arg); + + static void gdth_flush(gdth_ha_str *ha); +-static int gdth_halt(struct notifier_block *nb, ulong event, void *buf); + static int gdth_queuecommand(Scsi_Cmnd *scp,void (*done)(Scsi_Cmnd *)); + static int __gdth_queuecommand(gdth_ha_str *ha, struct scsi_cmnd *scp, + struct gdth_cmndinfo *cmndinfo); +@@ -418,12 +417,6 @@ static inline void gdth_set_sglist(struc + #include "gdth_proc.h" + #include "gdth_proc.c" + +-/* notifier block to get a notify on system shutdown/halt/reboot */ +-static struct notifier_block gdth_notifier = { +- gdth_halt, NULL, 0 +-}; +-static int notifier_disabled = 0; +- + static gdth_ha_str *gdth_find_ha(int hanum) + { + gdth_ha_str *ha; +@@ -3793,6 +3786,8 @@ static void gdth_timeout(ulong data) + gdth_ha_str *ha; + ulong flags; + ++ BUG_ON(list_empty(&gdth_instances)); ++ + ha = list_first_entry(&gdth_instances, gdth_ha_str, list); + spin_lock_irqsave(&ha->smp_lock, flags); + +@@ -4668,45 +4663,6 @@ static void gdth_flush(gdth_ha_str *ha) + } + } + +-/* shutdown routine */ +-static int gdth_halt(struct notifier_block *nb, ulong event, void *buf) +-{ +- gdth_ha_str *ha; +-#ifndef __alpha__ +- gdth_cmd_str gdtcmd; +- char cmnd[MAX_COMMAND_SIZE]; +-#endif +- +- if (notifier_disabled) +- return NOTIFY_OK; +- +- TRACE2(("gdth_halt() event %d\n",(int)event)); +- if (event != SYS_RESTART && event != SYS_HALT && event != SYS_POWER_OFF) +- return NOTIFY_DONE; +- +- notifier_disabled = 1; +- printk("GDT-HA: Flushing all host drives .. "); +- list_for_each_entry(ha, &gdth_instances, list) { +- gdth_flush(ha); +- +-#ifndef __alpha__ +- /* controller reset */ +- memset(cmnd, 0xff, MAX_COMMAND_SIZE); +- gdtcmd.BoardNode = LOCALBOARD; +- gdtcmd.Service = CACHESERVICE; +- gdtcmd.OpCode = GDT_RESET; +- TRACE2(("gdth_halt(): reset controller %d\n", ha->hanum)); +- gdth_execute(ha->shost, &gdtcmd, cmnd, 10, NULL); +-#endif +- } +- printk("Done.\n"); +- +-#ifdef GDTH_STATISTICS +- del_timer(&gdth_timer); +-#endif +- return NOTIFY_OK; +-} +- + /* configure lun */ + static int gdth_slave_configure(struct scsi_device *sdev) + { +@@ -5141,13 +5097,13 @@ static void gdth_remove_one(gdth_ha_str + + scsi_remove_host(shp); + ++ gdth_flush(ha); ++ + if (ha->sdev) { + scsi_free_host_dev(ha->sdev); + ha->sdev = NULL; + } + +- gdth_flush(ha); +- + if (shp->irq) + free_irq(shp->irq,ha); + +@@ -5173,6 +5129,24 @@ static void gdth_remove_one(gdth_ha_str + scsi_host_put(shp); + } + ++static int gdth_halt(struct notifier_block *nb, ulong event, void *buf) ++{ ++ gdth_ha_str *ha; ++ ++ TRACE2(("gdth_halt() event %d\n", (int)event)); ++ if (event != SYS_RESTART && event != SYS_HALT && event != SYS_POWER_OFF) ++ return NOTIFY_DONE; ++ ++ list_for_each_entry(ha, &gdth_instances, list) ++ gdth_flush(ha); ++ ++ return NOTIFY_OK; ++} ++ ++static struct notifier_block gdth_notifier = { ++ gdth_halt, NULL, 0 ++}; ++ + static int __init gdth_init(void) + { + if (disable) { +@@ -5235,7 +5209,6 @@ static int __init gdth_init(void) + add_timer(&gdth_timer); + #endif + major = register_chrdev(0,"gdth", &gdth_fops); +- notifier_disabled = 0; + register_reboot_notifier(&gdth_notifier); + gdth_polling = FALSE; + return 0; +@@ -5245,14 +5218,15 @@ static void __exit gdth_exit(void) + { + gdth_ha_str *ha; + +- list_for_each_entry(ha, &gdth_instances, list) +- gdth_remove_one(ha); ++ unregister_chrdev(major, "gdth"); ++ unregister_reboot_notifier(&gdth_notifier); + + #ifdef GDTH_STATISTICS +- del_timer(&gdth_timer); ++ del_timer_sync(&gdth_timer); + #endif +- unregister_chrdev(major,"gdth"); +- unregister_reboot_notifier(&gdth_notifier); ++ ++ list_for_each_entry(ha, &gdth_instances, list) ++ gdth_remove_one(ha); + } + + module_init(gdth_init); diff --git a/queue-2.6.24/scsi-gdth-fix-to-internal-commands-execution.patch b/queue-2.6.24/scsi-gdth-fix-to-internal-commands-execution.patch new file mode 100644 index 00000000000..c9c415a8401 --- /dev/null +++ b/queue-2.6.24/scsi-gdth-fix-to-internal-commands-execution.patch @@ -0,0 +1,177 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 17:00:38 2008 +Date: Thu, 6 Mar 2008 02:10:13 GMT +Message-Id: <200803060210.m262ADDU024879@hera.kernel.org> +From: jejb@kernel.org +To: jejb@kernel.org, stable@kernel.org +Subject: SCSI: gdth: fix to internal commands execution + +From: Boaz Harrosh +commit: ee54cc6af95a7fa09da298493b853a9e64fa8abd + +The recent patch named: + [SCSI] gdth: !use_sg cleanup and use of scsi accessors + +has done a bad job in handling internal commands issued by gdth_execute(). + +Internal commands are issued with device gdth_cmd_str ready made directly +to the card, without any mapping or translations of scsi commands. So here +I added a gdth_cmd_str pointer to the gdth_cmndinfo private structure which +is then copied directly to host. + +following this patch is a cleanup that removes the home cooked accessors +and reverts them to regular scsi_cmnd accessors. Since they are not used +anymore. After review maybe the 2 patches should be squashed together. + +FIXME: There is still a problem with gdth_get_info(). as reported there + is a WARN_ON trigerd in dma_free_coherent() when doing: + $ cat /proc/sys/gdth/0 + +Signed-off-by: Boaz Harrosh +Tested-by: Joerg Dorchain: +Tested-by: Stefan Priebe +Tested-by: Jon Chelton +Cc: Stable Tree +Signed-off-by: James Bottomley +Signed-off-by: Chris Wright +--- + drivers/scsi/gdth.c | 30 ++++++++++++------------------ + drivers/scsi/gdth.h | 1 + + 2 files changed, 13 insertions(+), 18 deletions(-) + +--- a/drivers/scsi/gdth.c ++++ b/drivers/scsi/gdth.c +@@ -160,7 +160,7 @@ static void gdth_readapp_event(gdth_ha_s + static void gdth_clear_events(void); + + static void gdth_copy_internal_data(gdth_ha_str *ha, Scsi_Cmnd *scp, +- char *buffer, ushort count, int to_buffer); ++ char *buffer, ushort count); + static int gdth_internal_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp); + static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, ushort hdrive); + +@@ -439,8 +439,8 @@ static struct gdth_cmndinfo *gdth_get_cm + for (i=0; icmndinfo[i].index == 0) { + priv = &ha->cmndinfo[i]; +- priv->index = i+1; + memset(priv, 0, sizeof(*priv)); ++ priv->index = i+1; + break; + } + } +@@ -487,7 +487,6 @@ int __gdth_execute(struct scsi_device *s + gdth_ha_str *ha = shost_priv(sdev->host); + Scsi_Cmnd *scp; + struct gdth_cmndinfo cmndinfo; +- struct scatterlist one_sg; + DECLARE_COMPLETION_ONSTACK(wait); + int rval; + +@@ -501,13 +500,10 @@ int __gdth_execute(struct scsi_device *s + /* use request field to save the ptr. to completion struct. */ + scp->request = (struct request *)&wait; + scp->timeout_per_command = timeout*HZ; +- sg_init_one(&one_sg, gdtcmd, sizeof(*gdtcmd)); +- gdth_set_sglist(scp, &one_sg); +- gdth_set_sg_count(scp, 1); +- gdth_set_bufflen(scp, sizeof(*gdtcmd)); + scp->cmd_len = 12; + memcpy(scp->cmnd, cmnd, 12); + cmndinfo.priority = IOCTL_PRI; ++ cmndinfo.internal_cmd_str = gdtcmd; + cmndinfo.internal_command = 1; + + TRACE(("__gdth_execute() cmd 0x%x\n", scp->cmnd[0])); +@@ -2348,7 +2344,7 @@ static void gdth_next(gdth_ha_str *ha) + * buffers, kmap_atomic() as needed. + */ + static void gdth_copy_internal_data(gdth_ha_str *ha, Scsi_Cmnd *scp, +- char *buffer, ushort count, int to_buffer) ++ char *buffer, ushort count) + { + ushort cpcount,i, max_sg = gdth_sg_count(scp); + ushort cpsum,cpnow; +@@ -2374,10 +2370,7 @@ static void gdth_copy_internal_data(gdth + } + local_irq_save(flags); + address = kmap_atomic(sg_page(sl), KM_BIO_SRC_IRQ) + sl->offset; +- if (to_buffer) +- memcpy(buffer, address, cpnow); +- else +- memcpy(address, buffer, cpnow); ++ memcpy(address, buffer, cpnow); + flush_dcache_page(sg_page(sl)); + kunmap_atomic(address, KM_BIO_SRC_IRQ); + local_irq_restore(flags); +@@ -2431,7 +2424,7 @@ static int gdth_internal_cache_cmd(gdth_ + strcpy(inq.vendor,ha->oem_name); + sprintf(inq.product,"Host Drive #%02d",t); + strcpy(inq.revision," "); +- gdth_copy_internal_data(ha, scp, (char*)&inq, sizeof(gdth_inq_data), 0); ++ gdth_copy_internal_data(ha, scp, (char*)&inq, sizeof(gdth_inq_data)); + break; + + case REQUEST_SENSE: +@@ -2441,7 +2434,7 @@ static int gdth_internal_cache_cmd(gdth_ + sd.key = NO_SENSE; + sd.info = 0; + sd.add_length= 0; +- gdth_copy_internal_data(ha, scp, (char*)&sd, sizeof(gdth_sense_data), 0); ++ gdth_copy_internal_data(ha, scp, (char*)&sd, sizeof(gdth_sense_data)); + break; + + case MODE_SENSE: +@@ -2453,7 +2446,7 @@ static int gdth_internal_cache_cmd(gdth_ + mpd.bd.block_length[0] = (SECTOR_SIZE & 0x00ff0000) >> 16; + mpd.bd.block_length[1] = (SECTOR_SIZE & 0x0000ff00) >> 8; + mpd.bd.block_length[2] = (SECTOR_SIZE & 0x000000ff); +- gdth_copy_internal_data(ha, scp, (char*)&mpd, sizeof(gdth_modep_data), 0); ++ gdth_copy_internal_data(ha, scp, (char*)&mpd, sizeof(gdth_modep_data)); + break; + + case READ_CAPACITY: +@@ -2463,7 +2456,7 @@ static int gdth_internal_cache_cmd(gdth_ + else + rdc.last_block_no = cpu_to_be32(ha->hdr[t].size-1); + rdc.block_length = cpu_to_be32(SECTOR_SIZE); +- gdth_copy_internal_data(ha, scp, (char*)&rdc, sizeof(gdth_rdcap_data), 0); ++ gdth_copy_internal_data(ha, scp, (char*)&rdc, sizeof(gdth_rdcap_data)); + break; + + case SERVICE_ACTION_IN: +@@ -2475,7 +2468,7 @@ static int gdth_internal_cache_cmd(gdth_ + rdc16.last_block_no = cpu_to_be64(ha->hdr[t].size-1); + rdc16.block_length = cpu_to_be32(SECTOR_SIZE); + gdth_copy_internal_data(ha, scp, (char*)&rdc16, +- sizeof(gdth_rdcap16_data), 0); ++ sizeof(gdth_rdcap16_data)); + } else { + scp->result = DID_ABORT << 16; + } +@@ -2845,6 +2838,7 @@ static int gdth_fill_raw_cmd(gdth_ha_str + static int gdth_special_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp) + { + register gdth_cmd_str *cmdp; ++ struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp); + int cmd_index; + + cmdp= ha->pccb; +@@ -2853,7 +2847,7 @@ static int gdth_special_cmd(gdth_ha_str + if (ha->type==GDT_EISA && ha->cmd_cnt>0) + return 0; + +- gdth_copy_internal_data(ha, scp, (char *)cmdp, sizeof(gdth_cmd_str), 1); ++ *cmdp = *cmndinfo->internal_cmd_str; + cmdp->RequestBuffer = scp; + + /* search free command index */ +--- a/drivers/scsi/gdth.h ++++ b/drivers/scsi/gdth.h +@@ -915,6 +915,7 @@ typedef struct { + struct gdth_cmndinfo { /* per-command private info */ + int index; + int internal_command; /* don't call scsi_done */ ++ gdth_cmd_str *internal_cmd_str; /* crier for internal messages*/ + dma_addr_t sense_paddr; /* sense dma-addr */ + unchar priority; + int timeout; diff --git a/queue-2.6.24/scsi-mpt-fusion-don-t-oops-if-numphys-0.patch b/queue-2.6.24/scsi-mpt-fusion-don-t-oops-if-numphys-0.patch new file mode 100644 index 00000000000..abe0ee19d3f --- /dev/null +++ b/queue-2.6.24/scsi-mpt-fusion-don-t-oops-if-numphys-0.patch @@ -0,0 +1,32 @@ +From 51f39eae14b4874618e73281c236e3a1c1572d4d Mon Sep 17 00:00:00 2001 +From: Krzysztof Oledzki +Date: Tue, 4 Mar 2008 14:56:23 -0800 +Message-ID: +Subject: SCSI: mpt fusion: don't oops if NumPhys==0 + +Don't oops if NumPhys==0, instead return -ENODEV. +This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=9909 + +Signed-off-by: Krzysztof Piotr Oledzki +Acked-by: Eric Moore +Signed-off-by: Andrew Morton +Signed-off-by: James Bottomley +Signed-off-by: Chris Wright +--- + drivers/message/fusion/mptsas.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/message/fusion/mptsas.c ++++ b/drivers/message/fusion/mptsas.c +@@ -1699,6 +1699,11 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc + if (error) + goto out_free_consistent; + ++ if (!buffer->NumPhys) { ++ error = -ENODEV; ++ goto out_free_consistent; ++ } ++ + /* save config data */ + port_info->num_phys = buffer->NumPhys; + port_info->phy_info = kcalloc(port_info->num_phys, diff --git a/queue-2.6.24/series b/queue-2.6.24/series index c31d09bce02..2502ab360db 100644 --- a/queue-2.6.24/series +++ b/queue-2.6.24/series @@ -39,3 +39,24 @@ netfilter-nfnetlink_queue-fix-skb_linear_assert-when-mangling-packet-data.patch netfilter-fix-incorrect-use-of-skb_make_writable.patch netfilter-fix-ebtable-targets-return.patch scsi-advansys-fix-overrun_buf-aligned-bug.patch +pata_hpt-pata_serverworks-fix-udma-masking.patch +moduleparam-fix-alpha-ia64-and-ppc64-compile-failures.patch +pci-x86-always-use-conf1-to-access-config-space-below-256-bytes.patch +e1000e-fix-crc-stripping-in-hardware-context-bug.patch +arcmsr-fix-irqs-disabled-warning-spew.patch +b43-backport-bcm4311-fix.patch +atmel_spi-fix-clock-polarity.patch +x86-move-out-tick_nohz_stop_sched_tick-call-from-the-loop.patch +macb-fix-speed-setting.patch +ioat-fix-ack-handling-driver-must-ensure-that-ack-is-zero.patch +ecryptfs-make-ecryptfs_prepare_write-decrypt-the-page.patch +vt-notifier-fix-for-vt-switch.patch +usb-ftdi_sio-workaround-for-broken-matrix-orbital-serial-port.patch +usb-ftdi_sio-really-enable-em1010pc.patch +usb-ehci-handle-large-bulk-urbs-correctly.patch +scsi-fix-bug-when-sum-bufflen.patch +x86-don-t-use-p6_nops-if-compiling-with-config_x86_generic.patch +fix-default-compose-table-initialization.patch +scsi-gdth-bugfix-for-the-at-exit-problems.patch +scsi-gdth-fix-to-internal-commands-execution.patch +scsi-mpt-fusion-don-t-oops-if-numphys-0.patch diff --git a/queue-2.6.24/usb-ehci-handle-large-bulk-urbs-correctly.patch b/queue-2.6.24/usb-ehci-handle-large-bulk-urbs-correctly.patch new file mode 100644 index 00000000000..d546d691bb6 --- /dev/null +++ b/queue-2.6.24/usb-ehci-handle-large-bulk-urbs-correctly.patch @@ -0,0 +1,45 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 15:02:39 2008 +Date: Wed, 5 Mar 2008 00:50:27 GMT +Message-Id: <200803050050.m250oR6B002409@hera.kernel.org> +From: jejb@kernel.org +To: jejb@kernel.org, stable@kernel.org +Subject: USB: ehci: handle large bulk URBs correctly (again) + +From: Misha Zhilin +commit: b5f7a0ec11694e60c99d682549dfaf8a03d7ad97 + +USB: ehci: Fixes completion for multi-qtd URB the short read case + +When use of urb->status in the EHCI driver was reworked last August +(commit 14c04c0f88f228fee1f412be91d6edcb935c78aa), a bug was inserted +in the handling of early completion for bulk transactions that need +more than one qTD (e.g. more than 20KB in one URB). + +This patch resolves that problem by ensuring that the early completion +status is preserved until the URB is handed back to its submitter, +instead of resetting it after each qTD. + +Signed-off-by: Misha Zhilin +Signed-off-by: David Brownell +Acked-by: Alan Stern +Cc: stable@kernel.org +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Chris Wright +--- + drivers/usb/host/ehci-q.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/ehci-q.c ++++ b/drivers/usb/host/ehci-q.c +@@ -315,10 +315,10 @@ qh_completions (struct ehci_hcd *ehci, s + if (likely (last->urb != urb)) { + ehci_urb_done(ehci, last->urb, last_status); + count++; ++ last_status = -EINPROGRESS; + } + ehci_qtd_free (ehci, last); + last = NULL; +- last_status = -EINPROGRESS; + } + + /* ignore urbs submitted during completions we reported */ diff --git a/queue-2.6.24/usb-ftdi_sio-really-enable-em1010pc.patch b/queue-2.6.24/usb-ftdi_sio-really-enable-em1010pc.patch new file mode 100644 index 00000000000..df4ed7661b4 --- /dev/null +++ b/queue-2.6.24/usb-ftdi_sio-really-enable-em1010pc.patch @@ -0,0 +1,39 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 14:26:42 2008 +Message-ID: <47CDBA77.2010707@cryonet.de> +Date: Tue, 04 Mar 2008 22:09:11 +0100 +From: Sven Andersen +To: gregkh@suse.de +Cc: stable@kernel.org +Subject: USB: ftdi_sio - really enable EM1010PC + +[upstream commit: 4ae897df] + +Add EM1010PC to ftdi_sio.c + +Signed-off-by: Sven Andersen +Cc: stable +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Chris Wright +--- + +Peter Stark submitted a patch for enabling multiple ELV-devices +and adding the EM1010PC to ftdi_sio which has already been applied. +For some reason this line got lost somewhere. + +As Peters patch went into 2.6.24-stable this might be applicable +there too. + +--- + drivers/usb/serial/ftdi_sio.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -499,6 +499,7 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, FTDI_ELV_FS20SIG_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_ELV_WS300PC_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1300PC_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_ELV_EM1010PC_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_ELV_WS500_PID) }, + { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) }, + { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) }, diff --git a/queue-2.6.24/usb-ftdi_sio-workaround-for-broken-matrix-orbital-serial-port.patch b/queue-2.6.24/usb-ftdi_sio-workaround-for-broken-matrix-orbital-serial-port.patch new file mode 100644 index 00000000000..2562fd8ed0d --- /dev/null +++ b/queue-2.6.24/usb-ftdi_sio-workaround-for-broken-matrix-orbital-serial-port.patch @@ -0,0 +1,96 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 14:52:54 2008 +Date: Wed, 5 Mar 2008 00:50:26 GMT +Message-Id: <200803050050.m250oQ3C002385@hera.kernel.org> +From: jejb@kernel.org +To: jejb@kernel.org, stable@kernel.org +Subject: USB: ftdi_sio: Workaround for broken Matrix Orbital serial port + +From: Kevin Vance +commit: 546d7eec389a3df3173b3131d92829c14e614601 + +Workaround for the FT232RL-based, Matrix Orbital VK204-25-USB serial port +added to the ftdi_sio driver. + +The device has an invalid endpoint descriptor, which must be modified +before it can be used. + +Signed-off-by: Kevin Vance +Cc: stable +Signed-off-by: Greg Kroah-Hartman +[chrisw@sous-sol.org: backport to 2.6.24.3 w/out ftdi_jtag_probe] +Signed-off-by: Chris Wright +--- + drivers/usb/serial/ftdi_sio.c | 24 ++++++++++++++++++++++++ + drivers/usb/serial/ftdi_sio.h | 7 +++++++ + 2 files changed, 31 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -310,6 +310,7 @@ struct ftdi_sio_quirk { + }; + + static int ftdi_olimex_probe (struct usb_serial *serial); ++static int ftdi_mtxorb_hack_setup (struct usb_serial *serial); + static void ftdi_USB_UIRT_setup (struct ftdi_private *priv); + static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv); + +@@ -317,6 +318,10 @@ static struct ftdi_sio_quirk ftdi_olimex + .probe = ftdi_olimex_probe, + }; + ++static struct ftdi_sio_quirk ftdi_mtxorb_hack_quirk = { ++ .probe = ftdi_mtxorb_hack_setup, ++}; ++ + static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = { + .port_probe = ftdi_USB_UIRT_setup, + }; +@@ -379,6 +384,8 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, ++ { USB_DEVICE(MTXORB_VK_VID, MTXORB_VK_PID), ++ .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, + { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, +@@ -1301,6 +1308,23 @@ static int ftdi_olimex_probe(struct usb_ + return 0; + } + ++/* ++ * The Matrix Orbital VK204-25-USB has an invalid IN endpoint. ++ * We have to correct it if we want to read from it. ++ */ ++static int ftdi_mtxorb_hack_setup(struct usb_serial *serial) ++{ ++ struct usb_host_endpoint *ep = serial->dev->ep_in[1]; ++ struct usb_endpoint_descriptor *ep_desc = &ep->desc; ++ ++ if (ep->enabled && ep_desc->wMaxPacketSize == 0) { ++ ep_desc->wMaxPacketSize = 0x40; ++ info("Fixing invalid wMaxPacketSize on read pipe"); ++ } ++ ++ return 0; ++} ++ + /* ftdi_shutdown is called from usbserial:usb_serial_disconnect + * it is called when the usb device is disconnected + * +--- a/drivers/usb/serial/ftdi_sio.h ++++ b/drivers/usb/serial/ftdi_sio.h +@@ -98,6 +98,13 @@ + #define FTDI_MTXORB_5_PID 0xFA05 /* Matrix Orbital Product Id */ + #define FTDI_MTXORB_6_PID 0xFA06 /* Matrix Orbital Product Id */ + ++/* ++ * The following are the values for the Matrix Orbital VK204-25-USB ++ * display, which use the FT232RL. ++ */ ++#define MTXORB_VK_VID 0x1b3d ++#define MTXORB_VK_PID 0x0158 ++ + /* Interbiometrics USB I/O Board */ + /* Developed for Interbiometrics by Rudolf Gugler */ + #define INTERBIOMETRICS_VID 0x1209 diff --git a/queue-2.6.24/vt-notifier-fix-for-vt-switch.patch b/queue-2.6.24/vt-notifier-fix-for-vt-switch.patch new file mode 100644 index 00000000000..a7a74873dfa --- /dev/null +++ b/queue-2.6.24/vt-notifier-fix-for-vt-switch.patch @@ -0,0 +1,37 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 14:51:22 2008 +Date: Wed, 5 Mar 2008 00:50:23 GMT +Message-Id: <200803050050.m250oNHv002327@hera.kernel.org> +From: jejb@kernel.org +To: jejb@kernel.org, stable@kernel.org +Subject: VT notifier fix for VT switch + +From: Samuel Thibault +commit: 8182ec49a73729334f5a6c65a607ba7009ebd6d6 + +VT notifier callbacks need to be aware of console switches. This is already +partially done from console_callback(), but at that time fg_console, cursor +positions, etc. are not yet updated and hence screen readers fetch the old +values. + +This adds an update notify after all of the values are updated in +redraw_screen(vc, 1). + +Signed-off-by: Samuel Thibault +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Chris Wright +--- + drivers/char/vt.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/char/vt.c ++++ b/drivers/char/vt.c +@@ -702,6 +702,7 @@ void redraw_screen(struct vc_data *vc, i + if (is_switch) { + set_leds(); + compute_shiftstate(); ++ notify_update(vc); + } + } + diff --git a/queue-2.6.24/x86-don-t-use-p6_nops-if-compiling-with-config_x86_generic.patch b/queue-2.6.24/x86-don-t-use-p6_nops-if-compiling-with-config_x86_generic.patch new file mode 100644 index 00000000000..747806cf250 --- /dev/null +++ b/queue-2.6.24/x86-don-t-use-p6_nops-if-compiling-with-config_x86_generic.patch @@ -0,0 +1,42 @@ +From stable-bounces@linux.kernel.org Wed Mar 12 15:05:15 2008 +Message-ID: <47CF31CE.5020106@redhat.com> +Date: Wed, 05 Mar 2008 18:50:38 -0500 +From: Chuck Ebbert +To: linux-stable +Cc: "H. Peter Anvin" +Subject: x86: don't use P6_NOPs if compiling with CONFIG_X86_GENERIC + +From: H. Peter Anvin +Commit: 959b3be64cab9160cd74532a49b89cdd918d38e9 + +x86: don't use P6_NOPs if compiling with CONFIG_X86_GENERIC + +P6_NOPs are definitely not supported on some VIA CPUs, and possibly +(unverified) on AMD K7s. It is also the only thing that prevents a +686 kernel from running on Transmeta TM3x00/5x00 (Crusoe) series. + +The performance benefit over generic NOPs is very small, so when +building for generic consumption, avoid using them. + +Signed-off-by: H. Peter Anvin +Signed-off-by: Ingo Molnar +Signed-off-by: Thomas Gleixner +[cebbert@redhat.com: backport to 2.6.24] +Signed-off-by: Chris Wright +--- + + include/asm-x86/processor_32.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/include/asm-x86/processor_32.h ++++ b/include/asm-x86/processor_32.h +@@ -714,7 +714,8 @@ static inline unsigned int cpuid_edx(uns + #define ASM_NOP8 K7_NOP8 + #elif defined(CONFIG_M686) || defined(CONFIG_MPENTIUMII) || \ + defined(CONFIG_MPENTIUMIII) || defined(CONFIG_MPENTIUMM) || \ +- defined(CONFIG_MCORE2) || defined(CONFIG_PENTIUM4) ++ defined(CONFIG_MCORE2) || defined(CONFIG_PENTIUM4) && \ ++ !defined(CONFIG_X86_GENERIC) + #define ASM_NOP1 P6_NOP1 + #define ASM_NOP2 P6_NOP2 + #define ASM_NOP3 P6_NOP3 diff --git a/queue-2.6.24/x86-move-out-tick_nohz_stop_sched_tick-call-from-the-loop.patch b/queue-2.6.24/x86-move-out-tick_nohz_stop_sched_tick-call-from-the-loop.patch new file mode 100644 index 00000000000..f345cd37c3b --- /dev/null +++ b/queue-2.6.24/x86-move-out-tick_nohz_stop_sched_tick-call-from-the-loop.patch @@ -0,0 +1,38 @@ +From 3d97775a80a03013abe1fd681620925f884ad18a Mon Sep 17 00:00:00 2001 +From: Hiroshi Shimamoto +Date: Wed, 30 Jan 2008 13:33:00 +0100 +Message-ID: <20080303132251.GA32030@elte.hu> +Subject: x86: move out tick_nohz_stop_sched_tick() call from the loop + +[upstream commit: 3d97775a] + +Move out tick_nohz_stop_sched_tick() call from the loop in cpu_idle +same as 32-bit version. + +Signed-off-by: Hiroshi Shimamoto +Signed-off-by: Ingo Molnar +Signed-off-by: Thomas Gleixner +Cc: Ed Tomlinson +Signed-off-by: Chris Wright +--- + arch/x86/kernel/process_64.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/arch/x86/kernel/process_64.c ++++ b/arch/x86/kernel/process_64.c +@@ -212,14 +212,13 @@ void cpu_idle (void) + current_thread_info()->status |= TS_POLLING; + /* endless idle loop with no priority at all */ + while (1) { ++ tick_nohz_stop_sched_tick(); + while (!need_resched()) { + void (*idle)(void); + + if (__get_cpu_var(cpu_idle_state)) + __get_cpu_var(cpu_idle_state) = 0; + +- tick_nohz_stop_sched_tick(); +- + rmb(); + idle = pm_idle; + if (!idle)