## Automatically generated incremental diff
## From:   linux-2.2.19-pre17
## To:     linux-2.2.19-pre18
## Robot:  $Id: make-incremental-diff,v 1.8 2001/12/04 06:05:04 hpa Exp $

diff -urN linux-2.2.19-pre17/CREDITS linux/CREDITS
--- linux-2.2.19-pre17/CREDITS	Mon Dec  3 22:16:55 2001
+++ linux/CREDITS	Mon Dec  3 22:17:02 2001
@@ -968,13 +968,12 @@
 S: USA
 
 N: Harald Hoyer
-E: HarryH@Royal.Net
-W: http://hot.spotline.de/
-W: http://home.pages.de/~saturn
+E: harald.hoyer@parzelle.de
+W: http://parzelle.de/
 D: ip_masq_quake
 D: md boot support
-S: Alleenstrasse 27
-S: D-71679 Asperg
+S: Hohe Strasse 30
+S: D-70176 Stuttgart
 S: Germany
 
 N: Kenn Humborg
@@ -1380,12 +1379,8 @@
 S: Czech Republic
 
 N: Paul Mackerras
-E: paulus@linuxcare.com
+E: paulus@samba.org
 D: Linux port for PCI Power Macintosh
-S: Linuxcare, Inc.
-S: 24 Marcus Clarke Street
-S: Canberra ACT 2601
-S: Australia
 
 N: Pat Mackinlay
 E: pat@it.com.au
@@ -1869,8 +1864,8 @@
 S: Germany
 
 N: Stephen Rothwell
-E: sfr@linuxcare.com.au
-W: http://linuxcare.com.au/sfr
+E: sfr@canb.auug.org.au
+W: http://www.canb.auug.org.au/~sfr
 P: 1024/BD8C7805 CD A4 9D 01 10 6E 7E 3B  91 88 FA D9 C8 40 AA 02
 D: Boot/setup/build work for setup > 2K
 D: Author, APM driver
@@ -2154,7 +2149,7 @@
 
 N: Andrew Tridgell
 E: tridge@samba.org
-W: http://linuxcare.com.au/tridge/
+W: http://samba.org/tridge/
 D: dosemu, networking, samba
 S: 3 Ballow Crescent
 S: MacGregor A.C.T 2615
diff -urN linux-2.2.19-pre17/Documentation/SubmittingDrivers linux/Documentation/SubmittingDrivers
--- linux-2.2.19-pre17/Documentation/SubmittingDrivers	Sun Dec 10 16:49:41 2000
+++ linux/Documentation/SubmittingDrivers	Mon Dec  3 22:17:02 2001
@@ -105,7 +105,7 @@
 
 Kernel traffic:
 	Weekly summary of kernel list activity (much easier to read)
-	[http://kt.linuxcare.com/kernel-traffic]
+	[http://kt.zork.net/kernel-traffic]
 
 Linux USB project:
 	http://sourceforge.net/projects/linux-usb/
diff -urN linux-2.2.19-pre17/Documentation/kernel-docs.txt linux/Documentation/kernel-docs.txt
--- linux-2.2.19-pre17/Documentation/kernel-docs.txt	Wed Jun  7 14:26:42 2000
+++ linux/Documentation/kernel-docs.txt	Mon Dec  3 22:17:02 2001
@@ -529,7 +529,7 @@
        produced during the week. Published every Thursday.
        
      * Name: "Kernel Traffic"
-       URL: http://kt.linuxcare.com
+       URL: http://kt.zork.net
        Keywords: linux-kernel mailing list, weekly kernel news.
        Description: Weekly newsletter covering the most relevant
        discussions of the linux-kernel mailing list.
diff -urN linux-2.2.19-pre17/MAINTAINERS linux/MAINTAINERS
--- linux-2.2.19-pre17/MAINTAINERS	Mon Dec  3 22:16:55 2001
+++ linux/MAINTAINERS	Mon Dec  3 22:17:02 2001
@@ -135,9 +135,9 @@
 
 APM DRIVER
 P:	Stephen Rothwell
-M:	apm@linuxcare.com.au
+M:	sfr@canb.auug.org.au
 L:	linux-laptop@vger.kernel.org
-W:	http://linuxcare.com.au/apm/
+W:	http://www.canb.auug.org.au/~sfr/
 S:	Supported
 
 APPLETALK NETWORK LAYER
@@ -607,7 +607,7 @@
 
 LINUX FOR POWER MACINTOSH
 P:	Paul Mackerras
-M:	paulus@linuxcare.com
+M:	paulus@samba.org
 W:	http://www.linuxppc.org/
 L:	linuxppc-dev@lists.linuxppc.org
 S:	Maintained
diff -urN linux-2.2.19-pre17/Makefile linux/Makefile
--- linux-2.2.19-pre17/Makefile	Mon Dec  3 22:16:55 2001
+++ linux/Makefile	Mon Dec  3 22:17:02 2001
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 19
-EXTRAVERSION = pre17
+EXTRAVERSION = pre18
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
diff -urN linux-2.2.19-pre17/arch/i386/boot/setup.S linux/arch/i386/boot/setup.S
--- linux-2.2.19-pre17/arch/i386/boot/setup.S	Mon Dec  3 22:16:55 2001
+++ linux/arch/i386/boot/setup.S	Mon Dec  3 22:17:02 2001
@@ -18,7 +18,7 @@
 ! March 1993/June 1994 (Christoph.Niemann@linux.org)
 !
 ! add APM BIOS checking by Stephen Rothwell, May 1994
-! (Stephen.Rothwell@canb.auug.org.au)
+! (sfr@canb.auug.org.au)
 !
 ! High load stuff, initrd support and position independency
 ! by Hans Lermen & Werner Almesberger, February 1996
diff -urN linux-2.2.19-pre17/arch/i386/kernel/apm.c linux/arch/i386/kernel/apm.c
--- linux-2.2.19-pre17/arch/i386/kernel/apm.c	Mon Dec  3 22:16:55 2001
+++ linux/arch/i386/kernel/apm.c	Mon Dec  3 22:17:02 2001
@@ -1,6 +1,6 @@
 /* -*- linux-c -*-
  * APM BIOS driver for Linux
- * Copyright 1994-2000 Stephen Rothwell (sfr@linuxcare.com)
+ * Copyright 1994-2001 Stephen Rothwell (sfr@canb.auug.org.au)
  *
  * Initial development of this driver was funded by NEC Australia P/L
  *	and NEC Corporation
@@ -23,7 +23,7 @@
  * March 1996, Rik Faith (faith@cs.unc.edu):
  *    Prohibit APM BIOS calls unless apm_enabled.
  *    (Thanks to Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>)
- * April 1996, Stephen Rothwell (Stephen.Rothwell@canb.auug.org.au)
+ * April 1996, Stephen Rothwell (sfr@canb.auug.org.au)
  *    Version 1.0 and 1.1
  * May 1996, Version 1.2
  * Feb 1998, Version 1.3
@@ -116,7 +116,7 @@
  *         Make power off under SMP work again.
  *         Fix thinko with initial engaging of BIOS.
  *         Make sure power off only happens on CPU 0
- *         (Paul "Rusty" Russell <rusty@linuxcare.com>).
+ *         (Paul "Rusty" Russell <rusty@rustcorp.com.au>).
  *         Do error notification to user mode if BIOS calls fail.
  *         Move entrypoint offset fix to ...boot/setup.S
  *         where it belongs (Cosmos <gis88564@cis.nctu.edu.tw>).
diff -urN linux-2.2.19-pre17/drivers/i2o/i2o_core.c linux/drivers/i2o/i2o_core.c
--- linux-2.2.19-pre17/drivers/i2o/i2o_core.c	Mon Sep  4 10:39:18 2000
+++ linux/drivers/i2o/i2o_core.c	Mon Dec  3 22:17:02 2001
@@ -2901,7 +2901,6 @@
 
 
 
-#ifdef MODULE
 
 EXPORT_SYMBOL(i2o_install_handler);
 EXPORT_SYMBOL(i2o_remove_handler);
@@ -2936,6 +2935,8 @@
 EXPORT_SYMBOL(i2o_issue_params);
 
 EXPORT_SYMBOL(i2o_report_status);
+
+#ifdef MODULE
 
 MODULE_AUTHOR("Red Hat Software");
 MODULE_DESCRIPTION("I2O Core");
diff -urN linux-2.2.19-pre17/drivers/isdn/hisax/config.c linux/drivers/isdn/hisax/config.c
--- linux-2.2.19-pre17/drivers/isdn/hisax/config.c	Mon Dec  3 22:16:55 2001
+++ linux/drivers/isdn/hisax/config.c	Mon Dec  3 22:17:02 2001
@@ -436,7 +436,7 @@
 }
 
 #ifndef MODULE
-static void __init
+void __init
 HiSax_setup(char *str, int *ints)
 {
 	int i, j, argc;
diff -urN linux-2.2.19-pre17/drivers/net/hamradio/scc.c linux/drivers/net/hamradio/scc.c
--- linux-2.2.19-pre17/drivers/net/hamradio/scc.c	Sun Dec 10 16:49:42 2000
+++ linux/drivers/net/hamradio/scc.c	Mon Dec  3 22:17:02 2001
@@ -1,7 +1,7 @@
 #define RCS_ID "$Id: scc.c,v 1.75 1998/11/04 15:15:01 jreuter Exp jreuter $"
 
 #define VERSION "3.0"
-#define BANNER  "Z8530 SCC driver version "VERSION".dl1bke (experimental) by DL1BKE\n"
+#define BANNER  "Z8530 SCC driver version "VERSION".dl1bke (experimental) by DL1BKE / patch F6FBB\n"
 
 /*
  * Please use z8530drv-utils-3.0 with this version.
@@ -417,6 +417,7 @@
 		{
 			scc_tx_done(scc);
 			Outb(scc->ctrl, RES_Tx_P);
+			del_timer(&scc->fs_wdog);	/* Stop failsafe watchdog */
 			return;
 		}
 		
@@ -426,6 +427,7 @@
 			scc->tx_buff = NULL;
 			scc_tx_done(scc);
 			Outb(scc->ctrl, RES_Tx_P);
+			del_timer(&scc->fs_wdog);	/* Stop failsafe watchdog */
 			return;
 		}
 
@@ -451,6 +453,7 @@
 		dev_kfree_skb(skb);
 		scc->tx_buff = NULL;
 		scc->stat.tx_state = TXS_NEWFRAME; /* next frame... */
+		mod_timer(&scc->fs_wdog, jiffies + HZ*60);	/* restart failsafe watchdog */
 		return;
 	} 
 	
@@ -823,6 +826,7 @@
 {
 	del_timer(&scc->tx_t);
 	del_timer(&scc->tx_wdog);
+	del_timer(&scc->fs_wdog);
 
 	disable_irq(scc->irq);
 
@@ -1334,6 +1338,29 @@
 }
 
 
+/* FailSafe timeout
+ *
+ * Fall into this timeout if a buffer is waiting
+ * and nothing has been sent during 1 minute
+ */
+
+static void t_failsafe(unsigned long channel)
+{
+	struct scc_channel *scc = (struct scc_channel *) channel;
+	
+	del_timer(&scc->fs_wdog);
+
+	/* Kernel message */
+	printk(KERN_ERR "z8530drv: scc port %s failed. Re-init done.\n", scc->dev->name);
+
+	/* Add 1000 to the tx-underrun counter */
+	scc->stat.tx_under += 1000;
+	
+	/* re-initialize the port */
+	scc_net_close(scc->dev);
+	scc_net_open(scc->dev);
+}
+
 /* ******************************************************************** */
 /* *			Set/get L1 parameters			      * */
 /* ******************************************************************** */
@@ -1687,6 +1714,7 @@
 
 	del_timer(&scc->tx_t);
 	del_timer(&scc->tx_wdog);
+	del_timer(&scc->fs_wdog);
 
 	restore_flags(flags);
 	
@@ -1726,6 +1754,7 @@
 	struct scc_channel *scc = (struct scc_channel *) dev->priv;
 	unsigned long flags;
 	char kisscmd;
+	int nbbuf;
 	
 	if (scc == NULL || scc->magic != SCC_MAGIC || dev->tbusy)
 	{
@@ -1755,8 +1784,9 @@
 
 	save_flags(flags);
 	cli();
-	
-	if (skb_queue_len(&scc->tx_queue) > scc->dev->tx_queue_len)
+
+	nbbuf = skb_queue_len(&scc->tx_queue);
+	if (nbbuf > scc->dev->tx_queue_len)
 	{
 		struct sk_buff *skb_del;
 		skb_del = __skb_dequeue(&scc->tx_queue);
@@ -1765,6 +1795,16 @@
 	__skb_queue_tail(&scc->tx_queue, skb);
 
 	dev->trans_start = jiffies;
+
+	if (nbbuf == 0)
+	{
+		del_timer(&scc->fs_wdog);
+		/* Arm the failsafe timer for 1 minute */
+		scc->fs_wdog.data = (unsigned long) scc;
+		scc->fs_wdog.function = t_failsafe;
+		scc->fs_wdog.expires = jiffies + HZ*60;
+		add_timer(&scc->fs_wdog);
+	}
 
 	/*
 	 * Start transmission if the trx state is idle or
diff -urN linux-2.2.19-pre17/drivers/scsi/cpqfc.Readme linux/drivers/scsi/cpqfc.Readme
--- linux-2.2.19-pre17/drivers/scsi/cpqfc.Readme	Sun Dec 10 16:49:43 2000
+++ linux/drivers/scsi/cpqfc.Readme	Mon Dec  3 22:17:02 2001
@@ -6,6 +6,11 @@
 33 and 66MHz.  Only supports FC-AL.
 SEST size 512 Exchanges (simultaneous I/Os) limited by module kmalloc() 
 	max of 128k bytes contiguous.
+
+Ver 1.3.6  Feb  27, 2001
+  Added Target_Device_Reset function for SCSI error handling
+  Fixed problem with not reseting addressing mode after implicit logout
+
 Ver 1.3.4  Sep   7, 2000
   Added Modinfo information
   Fixed problem with statically linking the driver
@@ -212,5 +217,5 @@
 
 
 Send questions/comments to:
-donald.zimmerman@compaq.com
-dszimmerman@yahoo.com
+Amy Vanzant-Hodge (fibrechannel@compaq.com)
+
diff -urN linux-2.2.19-pre17/drivers/scsi/cpqfcTS.h linux/drivers/scsi/cpqfcTS.h
--- linux-2.2.19-pre17/drivers/scsi/cpqfcTS.h	Sun Dec 10 16:49:43 2000
+++ linux/drivers/scsi/cpqfcTS.h	Mon Dec  3 22:17:02 2001
@@ -5,11 +5,13 @@
 // These functions are required by the Linux SCSI layers
 extern int cpqfcTS_detect(Scsi_Host_Template *);
 extern int cpqfcTS_release(struct Scsi_Host *);
-const char * cpqfcTS_info(struct Scsi_Host *);
+extern const char * cpqfcTS_info(struct Scsi_Host *);
 extern int cpqfcTS_proc_info(char *, char **, off_t, int, int, int);
 extern int cpqfcTS_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
 extern int cpqfcTS_abort(Scsi_Cmnd *);
 extern int cpqfcTS_reset(Scsi_Cmnd *, unsigned int);
+extern int cpqfcTS_eh_abort(Scsi_Cmnd *Cmnd);
+extern int cpqfcTS_eh_device_reset(Scsi_Cmnd *);
 extern int cpqfcTS_biosparam(Disk *, kdev_t, int[]);
 extern int cpqfcTS_ioctl( Scsi_Device *ScsiDev, int Cmnd, void *arg);
 
@@ -24,8 +26,10 @@
  proc_info:              cpqfcTS_proc_info,      \
  ioctl:                  cpqfcTS_ioctl,          \
  queuecommand:           cpqfcTS_queuecommand,   \
- eh_abort_handler:       cpqfcTS_abort,          \
+ eh_device_reset_handler:   cpqfcTS_eh_device_reset,   \
+ eh_abort_handler:       cpqfcTS_eh_abort,       \
  reset:                  cpqfcTS_reset,          \
+ abort:                  cpqfcTS_abort,		 \
  bios_param:             cpqfcTS_biosparam,      \
  can_queue:              CPQFCTS_REQ_QUEUE_LEN,  \
  this_id:                -1,                     \
@@ -33,7 +37,8 @@
  cmd_per_lun:            CPQFCTS_CMD_PER_LUN,    \
  present:                0,                      \
  unchecked_isa_dma:      0,                      \
- use_clustering:         ENABLE_CLUSTERING       \
+ use_clustering:         ENABLE_CLUSTERING,      \
+ use_new_eh_code:        1			 \
 }
 
 #endif /* CPQFCTS_H */ 
diff -urN linux-2.2.19-pre17/drivers/scsi/cpqfcTSinit.c linux/drivers/scsi/cpqfcTSinit.c
--- linux-2.2.19-pre17/drivers/scsi/cpqfcTSinit.c	Sun Dec 10 16:49:43 2000
+++ linux/drivers/scsi/cpqfcTSinit.c	Mon Dec  3 22:17:02 2001
@@ -61,10 +61,13 @@
 
 #include "cpqfcTS.h"
 
+#include <linux/config.h>  
 #include <linux/module.h>
 /* Embedded module documentation macros - see module.h */
 MODULE_AUTHOR("Compaq Computer Corporation");
 MODULE_DESCRIPTION("Driver for Compaq 64-bit/66Mhz PCI Fibre Channel HBA");
+  
+int cpqfcTS_TargetDeviceReset( Scsi_Device *ScsiDev, unsigned int reset_flags);
 
 // This struct was originally defined in 
 // /usr/src/linux/include/linux/proc_fs.h
@@ -312,7 +315,6 @@
       HostAdapter->max_id =  0;   // incremented as devices log in    
       HostAdapter->max_lun = CPQFCTS_MAX_LUN;         // LUNs per FC device
       HostAdapter->max_channel = CPQFCTS_MAX_CHANNEL; // multiple busses?
-      HostAdapter->hostt->use_new_eh_code = 1; // new error handling
       
       // get the pointer to our HBA specific data... (one for
       // each HBA on the PCI bus(ses)).
@@ -410,9 +412,12 @@
 	// slowest(worst) case, measured on 1Gb Finisar GT analyzer
 	
 	int wait_time;
+	unsigned long flags=0;
+ 
+        spin_unlock_irqrestore(&io_request_lock, flags);
         for( wait_time = jiffies + 4*HZ; wait_time > jiffies; )
 	  schedule();  // (our worker task needs to run)
-
+	spin_lock_irqsave(&io_request_lock, flags);
       }
       
       NumberOfAdapters++; 
@@ -454,7 +459,7 @@
   Scsi_Cmnd *ScsiPassThruCmnd;
   unsigned long flags;
 
-  ENTER("cpqfcTS_ioctl");
+  printk(" Enter cpqfcTS_ioctl ");
   
   // can we find an FC device mapping to this SCSI target?
   DumCmnd.channel = ScsiDev->channel;		// For searching
@@ -472,6 +477,7 @@
  
   else  // we know what FC device to operate on...
   {
+    printk("ioctl CMND %d", Cmnd);
     switch (Cmnd) 
     {
       // Passthrough provides a mechanism to bypass the RAID
@@ -653,6 +659,17 @@
         put_user(pLoggedInPort->u.ucWWN[i], 
 		&((Scsi_FCTargAddress *) arg)->host_wwn[j++]);
         break;
+
+
+      case SCSI_IOCTL_FC_TDR:
+          
+        result = cpqfcTS_TargetDeviceReset( ScsiDev, 0);
+
+        break;
+
+
+
+
     default:
       result = -EINVAL;
       break;
@@ -1347,13 +1364,20 @@
 
 int cpqfcTS_abort(Scsi_Cmnd *Cmnd)
 {
+	printk(" cpqfcTS_abort called?? \n");
+ 	return 0;
+}
+ 
+int cpqfcTS_eh_abort(Scsi_Cmnd *Cmnd)
+{
+
   struct Scsi_Host *HostAdapter = Cmnd->host;
   // get the pointer to our Scsi layer HBA buffer  
   CPQFCHBA *cpqfcHBAdata = (CPQFCHBA *)HostAdapter->hostdata;
   PTACHYON fcChip = &cpqfcHBAdata->fcChip;
   FC_EXCHANGES *Exchanges = fcChip->Exchanges;
   int i;
-  ENTER("cpqfcTS_abort");
+  ENTER("cpqfcTS_eh_abort");
 
   Cmnd->result = DID_ABORT <<16;  // assume we'll find it
 
@@ -1439,28 +1463,116 @@
 Done:
   
 //    panic("_abort");
-  LEAVE("cpqfcTS_abort");
+  LEAVE("cpqfcTS_eh_abort");
   return 0;  // (see scsi.h)
 }    
 
 
+// FCP-SCSI Target Device Reset
+// See dpANS Fibre Channel Protocol for SCSI
+// X3.269-199X revision 12, pg 25
+
+int cpqfcTS_TargetDeviceReset( Scsi_Device *ScsiDev, 
+                               unsigned int reset_flags)
+{
+  int timeout = 10*HZ;
+  int retries = 1;
+  char scsi_cdb[12];
+  unsigned long flags;
+  int result;
+  Scsi_Cmnd * SCpnt;
+  Scsi_Device * SDpnt;
 
 
-// To be done...	
-int cpqfcTS_reset(Scsi_Cmnd *Cmnd, unsigned int reset_flags)
-{
-  int return_status = SUCCESS;
+  // printk("   ENTERING cpqfcTS_TargetDeviceReset() - flag=%d \n",reset_flags);
 
-  ENTER("cpqfcTS_reset");
+  if (ScsiDev->host->eh_active) return FAILED;
 
+  memset( scsi_cdb, 0, sizeof( scsi_cdb));
 
-            
+  scsi_cdb[0] = RELEASE;
 
-  LEAVE("cpqfcTS_reset");
-  return return_status;
-}    
+  spin_lock_irqsave(&io_request_lock, flags);
 
+  SCpnt = scsi_allocate_device(NULL, ScsiDev, 1);
+  {
+    struct semaphore sem = MUTEX_LOCKED;
+        
+    SCpnt->SCp.buffers_residual = FCP_TARGET_RESET;
 
+	SCpnt->request.sem = &sem;
+	scsi_do_cmd(SCpnt,  scsi_cdb, NULL,  0, my_ioctl_done,  timeout, retries);
+	spin_unlock_irqrestore(&io_request_lock, flags);
+	down(&sem);
+    spin_lock_irqsave(&io_request_lock, flags);
+    SCpnt->request.sem = NULL;
+  }
+    
+/*
+      if(driver_byte(SCpnt->result) != 0)
+	  switch(SCpnt->sense_buffer[2] & 0xf) {
+	case ILLEGAL_REQUEST:
+	    if(cmd[0] == ALLOW_MEDIUM_REMOVAL) dev->lockable = 0;
+	    else printk("SCSI device (ioctl) reports ILLEGAL REQUEST.\n");
+	    break;
+	case NOT_READY: // This happens if there is no disc in drive 
+	    if(dev->removable && (cmd[0] != TEST_UNIT_READY)){
+		printk(KERN_INFO "Device not ready.  Make sure there is a disc in the drive.\n");
+		break;
+	    }
+	case UNIT_ATTENTION:
+	    if (dev->removable){
+		dev->changed = 1;
+		SCpnt->result = 0; // This is no longer considered an error
+		// gag this error, VFS will log it anyway /axboe 
+		// printk(KERN_INFO "Disc change detected.\n"); 
+		break;
+	    };
+	default: // Fall through for non-removable media
+	    printk("SCSI error: host %d id %d lun %d return code = %x\n",
+		   dev->host->host_no,
+		   dev->id,
+		   dev->lun,
+		   SCpnt->result);
+	    printk("\tSense class %x, sense error %x, extended sense %x\n",
+		   sense_class(SCpnt->sense_buffer[0]),
+		   sense_error(SCpnt->sense_buffer[0]),
+		   SCpnt->sense_buffer[2] & 0xf);
+	    
+      };
+*/    
+  result = SCpnt->result;
+
+  SDpnt = SCpnt->device;
+  scsi_release_command(SCpnt);
+  SCpnt = NULL;
+
+  if (!SDpnt->was_reset && SDpnt->scsi_request_fn)
+	(*SDpnt->scsi_request_fn)();
+
+  wake_up(&SDpnt->device_wait);
+  spin_unlock_irqrestore(&io_request_lock, flags);
+  // printk("   LEAVING cpqfcTS_TargetDeviceReset() - return SUCCESS \n");
+  return SUCCESS;
+}
+
+
+int cpqfcTS_eh_device_reset(Scsi_Cmnd *Cmnd)
+{
+  Scsi_Device *SDpnt = Cmnd->device;
+  // printk("   ENTERING cpqfcTS_eh_device_reset() \n");
+  return cpqfcTS_TargetDeviceReset( SDpnt, 0);
+}
+
+	
+int cpqfcTS_reset(Scsi_Cmnd *Cmnd, unsigned int reset_flags)
+{
+
+  ENTER("cpqfcTS_reset");
+
+  LEAVE("cpqfcTS_reset");
+  return SCSI_RESET_ERROR;      /* Bus Reset Not supported */
+}
 
 /* This function determines the bios parameters for a given
    harddisk. These tend to be numbers that are made up by the
@@ -1805,7 +1917,7 @@
 
 #ifdef MODULE
 
-Scsi_Host_Template driver_template = CPQFCTS;
+static Scsi_Host_Template driver_template = CPQFCTS;
 
 #include "scsi_module.c"
 
diff -urN linux-2.2.19-pre17/drivers/scsi/cpqfcTSstructs.h linux/drivers/scsi/cpqfcTSstructs.h
--- linux-2.2.19-pre17/drivers/scsi/cpqfcTSstructs.h	Sun Dec 10 16:49:43 2000
+++ linux/drivers/scsi/cpqfcTSstructs.h	Mon Dec  3 22:17:02 2001
@@ -31,7 +31,7 @@
 #define CPQFCTS_DRIVER_VER(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
 #define VER_MAJOR 1
 #define VER_MINOR 3
-#define VER_SUBMINOR 4
+#define VER_SUBMINOR 6
 
 // Macros for kernel (esp. SMP) tracing using a PCI analyzer
 // (e.g. x86).
@@ -244,6 +244,7 @@
 #define ELS_RJT 0x1000000
 #define SCSI_REPORT_LUNS 0x0A0
 #define REPORT_LUNS 0xA0 // SCSI-3 command op-code
+#define FCP_TARGET_RESET 0x200
 
 #define ELS_LILP_FRAME 0x00000711 // 1st payload word of LILP frame
 
diff -urN linux-2.2.19-pre17/drivers/scsi/cpqfcTSworker.c linux/drivers/scsi/cpqfcTSworker.c
--- linux-2.2.19-pre17/drivers/scsi/cpqfcTSworker.c	Sun Dec 10 16:49:43 2000
+++ linux/drivers/scsi/cpqfcTSworker.c	Mon Dec  3 22:17:02 2001
@@ -149,7 +149,6 @@
               CPQFCHBA* cpqfcHBAdata, 
 	      TachFCHDR_GCMND* fchs);
 
-
 // (see scsi_error.c comments on kernel task creation)
 
 void cpqfcTSWorkerThread( void *host)
@@ -1069,6 +1068,7 @@
   pFcPort->flogi = FALSE;
   pFcPort->LOGO_timer = 0;
   pFcPort->device_blocked = TRUE; // block Scsi Requests
+  pFcPort->ScsiNexus.VolumeSetAddressing=0;	
 }
 
   
@@ -2934,7 +2934,6 @@
   ULONG ulStatus;
   UCHAR *ucBuff;
 
-
   if( !cpqfcHBAdata->PortDiscDone) // cleared by LDn
   {
     printk("Discard Q'd ReportLun command\n");
@@ -2976,7 +2975,7 @@
 
     Cmnd->channel = pLoggedInPort->ScsiNexus.channel;
     Cmnd->target = pLoggedInPort->ScsiNexus.target;
-    
+
 	    
     ulStatus = cpqfcTSBuildExchange(
       cpqfcHBAdata,
@@ -3404,7 +3403,7 @@
     if( port_id_valid ) // look for alpa first
     {
       if( pLoggedInPort->port_id == port_id )
-        break;  // found it!
+          break;  // found it!
     }
     if( wwn_valid ) // look for wwn second
     {
@@ -4326,7 +4325,6 @@
       break;
     
     
-    
     case BLS_ABTS:   // FC defined basic link service command ABTS 
                      // Abort Sequence
                      
@@ -4498,6 +4496,7 @@
 
                          // Fibre Channel SCSI 'originator' sequences...
                          // (originator means 'initiator' in FCP-SCSI)
+
     case SCSI_IWE: // TachLite Initiator Write Entry
     {
       PFC_LOGGEDIN_PORT pLoggedInPort = 
@@ -6171,7 +6170,18 @@
       // 4 bytes Control Field FCP_CNTL
       *payload++ = 0;    // byte 0: (MSB) reserved
       *payload++ = 0;    // byte 1: task codes
-      *payload++ = 0;    // byte 2: task management flags
+
+                         // byte 2: task management flags
+      // another "use" of the spare field to accomplish TDR
+      // note combination needed
+      if( (Cmnd->cmnd[0] == RELEASE) &&
+          (Cmnd->SCp.buffers_residual == FCP_TARGET_RESET) )
+      {
+        Cmnd->cmnd[0] = 0;    // issue "Test Unit Ready" for TDR
+        *payload++ = 0x20;    // target device reset bit
+      }
+      else
+        *payload++ = 0;    // no TDR
 		      // byte 3: (LSB) execution management codes
 		      // bit 0 write, bit 1 read (don't set together)
       
diff -urN linux-2.2.19-pre17/drivers/usb/scanner.c linux/drivers/usb/scanner.c
--- linux-2.2.19-pre17/drivers/usb/scanner.c	Sun Dec 10 16:49:43 2000
+++ linux/drivers/usb/scanner.c	Mon Dec  3 22:17:03 2001
@@ -174,7 +174,7 @@
  *      <flynn@isr.uni-stuttgart.de>.
  *    - Added iVina 1200U ID. Thanks to Dyson Lin <dyson@avision.com.tw>.
  *    - Added access time update for the device file courtesy of Paul
- *      Mackerras <paulus@linuxcare.com>.  This allows a user space daemon
+ *      Mackerras <paulus@samba.org>.  This allows a user space daemon
  *      to turn the lamp off for a Umax 1220U scanner after a prescribed
  *      time.
  *    - Fixed HP S20 ID's.  Thanks to Ruud Linders <rlinders@xs4all.nl>.
diff -urN linux-2.2.19-pre17/include/linux/apm_bios.h linux/include/linux/apm_bios.h
--- linux-2.2.19-pre17/include/linux/apm_bios.h	Mon Dec  3 22:16:56 2001
+++ linux/include/linux/apm_bios.h	Mon Dec  3 22:17:03 2001
@@ -3,7 +3,7 @@
 
 /*
  * Include file for the interface to an APM BIOS
- * Copyright 1994-2000 Stephen Rothwell (sfr@linuxcare.com)
+ * Copyright 1994-2001 Stephen Rothwell (sfr@canb.auug.org.au)
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
diff -urN linux-2.2.19-pre17/include/linux/scc.h linux/include/linux/scc.h
--- linux-2.2.19-pre17/include/linux/scc.h	Fri Dec 18 13:57:21 1998
+++ linux/include/linux/scc.h	Mon Dec  3 22:17:03 2001
@@ -251,6 +251,7 @@
 
 	struct timer_list tx_t;		/* tx timer for this channel */
 	struct timer_list tx_wdog;	/* tx watchdogs */
+	struct timer_list fs_wdog;	/* failsafe watchdogs */
 };
 
 int scc_init(void);
diff -urN linux-2.2.19-pre17/include/scsi/scsi.h linux/include/scsi/scsi.h
--- linux-2.2.19-pre17/include/scsi/scsi.h	Sun Dec 10 16:49:44 2000
+++ linux/include/scsi/scsi.h	Mon Dec  3 22:17:03 2001
@@ -208,6 +208,9 @@
 /* Used to get Fibre Channel WWN and port_id from device */
 #define SCSI_IOCTL_FC_TARGET_ADDRESS 0x5387
 
+/* Used to invoke Target Defice Reset for Fibre Channel */
+#define SCSI_IOCTL_FC_TDR 0x5388
+
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically
diff -urN linux-2.2.19-pre17/mm/filemap.c linux/mm/filemap.c
--- linux-2.2.19-pre17/mm/filemap.c	Mon Dec  3 22:16:56 2001
+++ linux/mm/filemap.c	Mon Dec  3 22:17:03 2001
@@ -254,7 +254,8 @@
 		if (page) {
 			char *dest = (char*) (offset + page_address(page));
 
-			if ((unsigned long)dest != source_address) {
+			if ((unsigned long)dest != source_address 
+				|| !segment_eq(get_fs(), KERNEL_DS)) {
 				wait_on_page(page);
 				memcpy(dest, buf, len);
 				flush_dcache_page(page_address(page));
