[kernel] r12312 - in dists/sid/linux-2.6/debian/patches: bugfix/m68k/2.6.26 series

Stephen Marenka smarenka at alioth.debian.org
Thu Oct 16 16:04:22 UTC 2008


Author: smarenka
Date: Thu Oct 16 16:04:21 2008
New Revision: 12312

Log:
[m68k] another mac patch

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-mac_esp-asm-fix.diff
Modified:
   dists/sid/linux-2.6/debian/patches/series/1-extra

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-mac_esp-asm-fix.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-mac_esp-asm-fix.diff	Thu Oct 16 16:04:21 2008
@@ -0,0 +1,82 @@
+From fthain at telegraphics.com.au Mon Oct  6 15:21:37 2008
+Date: Mon, 6 Oct 2008 23:31:02 +1100 (EST)
+From: Finn Thain <fthain at telegraphics.com.au>
+To: Geert Uytterhoeven <geert at linux-m68k.org>
+Cc: linux-m68k at vger.kernel.org
+Subject: [PATCH] mac_esp asm fix
+
+
+Fix asm constraints and arguments so as not to transfer an odd byte when 
+there may be more words to transfer. The bug would probably also cause 
+exceptions sometimes by transferring one too many bytes.
+
+Signed-off-by: Finn Thain <fthain at telegraphics.com.au>
+
+---
+ drivers/scsi/mac_esp.c |   19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+--- a/drivers/scsi/mac_esp.c
++++ b/drivers/scsi/mac_esp.c
+@@ -170,7 +170,7 @@ static inline int mac_esp_wait_for_dreq(
+ 
+ #define MAC_ESP_PDMA_LOOP(operands) \
+ 	asm volatile ( \
+-	     "       tstw %2                   \n" \
++	     "       tstw %1                   \n" \
+ 	     "       jbeq 20f                  \n" \
+ 	     "1:     movew " operands "        \n" \
+ 	     "2:     movew " operands "        \n" \
+@@ -188,14 +188,14 @@ static inline int mac_esp_wait_for_dreq(
+ 	     "14:    movew " operands "        \n" \
+ 	     "15:    movew " operands "        \n" \
+ 	     "16:    movew " operands "        \n" \
+-	     "       subqw #1,%2               \n" \
++	     "       subqw #1,%1               \n" \
+ 	     "       jbne 1b                   \n" \
+-	     "20:    tstw %3                   \n" \
++	     "20:    tstw %2                   \n" \
+ 	     "       jbeq 30f                  \n" \
+ 	     "21:    movew " operands "        \n" \
+-	     "       subqw #1,%3               \n" \
++	     "       subqw #1,%2               \n" \
+ 	     "       jbne 21b                  \n" \
+-	     "30:    tstw %4                   \n" \
++	     "30:    tstw %3                   \n" \
+ 	     "       jbeq 40f                  \n" \
+ 	     "31:    moveb " operands "        \n" \
+ 	     "32:    nop                       \n" \
+@@ -223,8 +223,8 @@ static inline int mac_esp_wait_for_dreq(
+ 	     "       .long  31b,40b            \n" \
+ 	     "       .long  32b,40b            \n" \
+ 	     "       .previous                 \n" \
+-	     : "+a" (addr) \
+-	     : "a" (mep->pdma_io), "r" (count32), "r" (count2), "g" (esp_count))
++	     : "+a" (addr), "+r" (count32), "+r" (count2) \
++	     : "g" (count1), "a" (mep->pdma_io))
+ 
+ static void mac_esp_send_pdma_cmd(struct esp *esp, u32 addr, u32 esp_count,
+ 				  u32 dma_count, int write, u8 cmd)
+@@ -247,19 +247,20 @@ static void mac_esp_send_pdma_cmd(struct
+ 	do {
+ 		unsigned int count32 = esp_count >> 5;
+ 		unsigned int count2 = (esp_count & 0x1F) >> 1;
++		unsigned int count1 = esp_count & 1;
+ 		unsigned int start_addr = addr;
+ 
+ 		if (mac_esp_wait_for_dreq(esp))
+ 			break;
+ 
+ 		if (write) {
+-			MAC_ESP_PDMA_LOOP("%1@,%0 at +");
++			MAC_ESP_PDMA_LOOP("%4@,%0 at +");
+ 
+ 			esp_count -= addr - start_addr;
+ 		} else {
+ 			unsigned int n;
+ 
+-			MAC_ESP_PDMA_LOOP("%0 at +,%1@");
++			MAC_ESP_PDMA_LOOP("%0 at +,%4@");
+ 
+ 			if (mac_esp_wait_for_empty_fifo(esp))
+ 				break;

Modified: dists/sid/linux-2.6/debian/patches/series/1-extra
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/1-extra	(original)
+++ dists/sid/linux-2.6/debian/patches/series/1-extra	Thu Oct 16 16:04:21 2008
@@ -89,12 +89,11 @@
 # fix udev vs. nfcon bug
 + bugfix/m68k/2.6.26/atari-aranym-nf-wrappers.diff arch=m68k
 
-# fix dual scsi busses and a problem with xorg (per fthain)
+# mac patches from the 2.6.27 queue, per Finn Thain
 + bugfix/m68k/2.6.26/mac-esp-fix-for-quadras-with-two-esp-chips.diff arch=m68k
-
 + bugfix/m68k/2.6.26/mac-reinstate-rtc.diff arch=m68k
 + bugfix/m68k/2.6.26/mac-macfb-do-not-overflow-fix-id.diff arch=m68k
 + bugfix/m68k/2.6.26/fbcon-remove-broken-mac-vbl-handler.diff arch=m68k
-#+ bugfix/m68k/2.6.26/baboon-fixup.diff arch=m68k
 + bugfix/m68k/2.6.26/mac-baboon-interrupt-enable-disable.diff arch=m68k
++ bugfix/m68k/2.6.26/mac-mac_esp-asm-fix.diff arch=m68k
 



More information about the Kernel-svn-changes mailing list