## Automatically generated incremental diff
## From:   linux-2.2.10-pre5
## To:     linux-2.2.10
## Robot:  $Id: make-incremental-diff,v 1.5 2001/12/01 08:32:36 hpa Exp $

diff -urN linux-2.2.10-pre5/Documentation/Configure.help linux/Documentation/Configure.help
--- linux-2.2.10-pre5/Documentation/Configure.help	Mon Dec  3 18:50:12 2001
+++ linux/Documentation/Configure.help	Mon Dec  3 18:50:27 2001
@@ -5228,7 +5228,7 @@
   section (except for CONFIG_IP_ROUTE_TOS and CONFIG_IP_ROUTE_FWMARK).
   At the moment, few devices support fast switching (tulip is one of
   them, modified 8390 can be found at
-  ftp://ftp.inr.ac.ru/ip-routing/fastroute-8390.tar.gz).
+  ftp://ftp.inr.ac.ru/ip-routing/fastroute/fastroute-8390.tar.gz).
 
   If unsure, say N.
 
@@ -5238,8 +5238,8 @@
   during periods of extremal congestion. At the moment only a couple
   of device drivers support it (really only one -- tulip, modified
   8390 can be found at
-  ftp://ftp.inr.ac.ru/ip-routing/fastroute-8390.tar.gz). Really, this
-  option is applicable to any machine attached to a fast enough
+  ftp://ftp.inr.ac.ru/ip-routing/fastroute/fastroute-8390.tar.gz).
+  Really, this option is applicable to any machine attached to a fast enough
   network, and even a 10 Mb NIC is able to kill a not very slow box,
   such as a 120MHz Pentium.
 
@@ -6546,16 +6546,6 @@
   under Linux, say Y here (you must also remember to enable the driver
   for your HIPPI card below). Most people will say N here.
   
-CERN HIPPI PCI adapter support
-CONFIG_CERN_HIPPI
-  Say Y here if this is your PCI HIPPI network card.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called cern_hippi.o. If you want to compile it as
-  a module, say M here and read Documentation/modules.txt. If unsure,
-  say N.
-
 Essential RoadRunner HIPPI PCI adapter support
 CONFIG_ROADRUNNER
   Say Y here if this is your PCI HIPPI network card.
@@ -6656,9 +6646,6 @@
   (PhotoCDs). There is a new driver (next question) which can do
   this. If you want that one, say N here.
 
-  If the driver doesn't work out of the box, you might want to have a
-  look at drivers/cdrom/mcd.h. 
-
   If you say Y here, you should also say Y or M to "ISO 9660 CDROM
   filesystem support" below, because that's the filesystem used on
   CDROMs. 
@@ -7492,13 +7479,6 @@
   want), say M here and read Documentation/modules.txt. The module
   will be called smbfs.o. Most people say N, however.
 
-SMB Win95 bug work-around
-CONFIG_SMB_WIN95
-  If you want to connect to a share exported by Windows 95, you should
-  say Y here. The Windows 95 server contains a bug that makes listing
-  directories unreliable. This option slows down the listing of
-  directories. This makes the Windows 95 server a bit more stable.
-
 Coda filesystem support
 CONFIG_CODA_FS
   Coda is an advanced network filesystem, similar to NFS in that it
@@ -10791,6 +10771,30 @@
   haven't changed the setting of jumper JP3 on the card. Removing the
   jumper sets the card to 0x358.
 
+ADS Cadet AM/FM Radio Tuner Card
+CONFIG_RADIO_CADET
+  Choose Y here if you have one of these AM/FM radio cards, and then fill
+  in the port address below.
+  
+  In order to control your radio card, you will need to use programs
+  that are compatible with the Video for Linux API. Information on 
+  this API and pointers to "v4l" programs may be found on the WWW at
+  http://roadrunner.swansea.uk.linux.org/v4l.shtml; to browse the WWW,
+  you need to have access to a machine on the Internet that has a 
+  program like lynx or netscape.
+
+  Further documentation on this driver can be found on the WWW at
+  http://linux.blackhawke.net/cadet.html. 
+
+  If you want to compile this driver as a module ( = code which can be
+  inserted in and removed from the running kernel whenever you want),
+  say M here and read Documentation/modules.txt. The module will be
+  called radio-cadet.o.
+
+ADS Cadet AM/FM Radio Tuner Card I/O Port
+CONFIG_RADIO_CADET_PORT
+  Enter the I/O address of the card here (most commonly 330). 
+
 SF16FMI Radio
 CONFIG_RADIO_SF16FMI
   Choose Y here if you have one of these FM radio cards, and then fill
@@ -10973,6 +10977,15 @@
   from the running kernel whenever you want). If you want to compile
   it as a module, say M here and read Documentation/modules.txt.
 
+PlanB Video-In for PowerMacs
+CONFIG_VIDEO_PLANB
+  PlanB is the V4L driver for the PowerMac 7x00/8x00 series video
+  input hardware. If you want to experiment with this, say Y.
+  Otherwise, or if you don't understand a word, say N.
+  See http://www.cpu.lu/~mlan/planb.html for more info.
+
+  Saying M will compile this driver as a module (planb.o).
+
 #
 # ARM options
 #
@@ -11270,6 +11283,21 @@
 
   If unsure, say Y.
 
+IrPORT IrDA Device Driver
+CONFIG_IRPORT_SIR
+  Say Y here if you want to build support for the IrPORT IrDA device
+  driver. If you want to compile it as a module, say M here and
+  read Documentation/modules.txt. IrPORT can be used instead of
+  IrTTY and sometimes this can be better. One example is if your
+  IrDA port does not have echo-canceling, which will work OK with
+  IrPORT since this driver is working in half-duplex mode only. You
+  don't need to use irattach with IrPORT, but you just insert it 
+  the same way as FIR drivers (insmod irport io=0x3e8 irq=11).
+  Notice that IrPORT is a SIR device driver which means that speed
+  is limited to 115200 bps.
+
+  If unsure, say Y.
+
 Winbond W83977AF IrDA Device Driver
 CONFIG_WINBOND_FIR
   Say Y here if you want to build IrDA support for the Winbond
@@ -11293,6 +11321,13 @@
   read Documentation/modules.txt. This chipset is used by the Toshiba
   Tecra laptops.
 
+Toshiba Type-O IR Port Device Driver
+CONFIG_TOSHIBA_FIR
+  Say Y here if you want to build support for the Toshiba Type-O IR
+  chipset. If you want to compile it as a module, say M here and
+  read Documentation/modules.txt. This chipset is used by the Toshiba
+  Libretto 100CT, and many more laptops.
+
 ESI JetEye PC Dongle
 CONFIG_ESI_DONGLE
   Say Y here if you want to build support for the Extended Systems
@@ -11329,6 +11364,15 @@
   normal 9-pin serial port connector, and can currently only be used
   by IrTTY. To activate support for Greenwich dongles you will have to
   insert "irattach -d girbil" in the /etc/irda/drivers script.
+
+Parallax Litelink dongle
+CONFIG_LITELINK_DONGLE
+  Say Y here if you want to build support for the Parallax Litelink
+  dongle. If you want to compile it as a module, say M here and read
+  Documentation/modules.txt. The Parallax dongle attaches to the
+  normal 9-pin serial port connector, and can currently only be used
+  by IrTTY. To activate support for Parallax dongles you will have to
+  insert "irattach -d litelink" in the /etc/irda/drivers script.
 
 VME (Motorola and BVM) support
 CONFIG_VME
diff -urN linux-2.2.10-pre5/arch/sparc/kernel/signal.c linux/arch/sparc/kernel/signal.c
--- linux-2.2.10-pre5/arch/sparc/kernel/signal.c	Wed Mar 10 16:53:36 1999
+++ linux/arch/sparc/kernel/signal.c	Mon Dec  3 18:50:27 2001
@@ -1,4 +1,4 @@
-/*  $Id: signal.c,v 1.91 1999/01/26 11:00:44 jj Exp $
+/*  $Id: signal.c,v 1.91.2.1 1999/06/14 00:36:13 davem Exp $
  *  linux/arch/sparc/kernel/signal.c
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
@@ -1194,6 +1194,7 @@
 			default:
 				lock_kernel();
 				sigaddset(&current->signal, signr);
+				recalc_sigpending(current);
 				current->flags |= PF_SIGNALED;
 				do_exit(exit_code);
 				/* NOT REACHED */
diff -urN linux-2.2.10-pre5/arch/sparc64/kernel/ioctl32.c linux/arch/sparc64/kernel/ioctl32.c
--- linux-2.2.10-pre5/arch/sparc64/kernel/ioctl32.c	Tue May 11 08:24:31 1999
+++ linux/arch/sparc64/kernel/ioctl32.c	Mon Dec  3 18:50:27 2001
@@ -1,4 +1,4 @@
-/* $Id: ioctl32.c,v 1.62 1999/05/01 09:17:44 davem Exp $
+/* $Id: ioctl32.c,v 1.62.2.1 1999/06/09 04:53:03 davem Exp $
  * ioctl32.c: Conversion between 32bit and 64bit native ioctls.
  *
  * Copyright (C) 1997  Jakub Jelinek  (jj@sunsite.mff.cuni.cz)
@@ -37,6 +37,7 @@
 #include <linux/fb.h>
 #include <linux/ext2_fs.h>
 #include <linux/videodev.h>
+#include <linux/netdevice.h>
 
 #include <scsi/scsi.h>
 /* Ugly hack. */
@@ -417,6 +418,23 @@
         __kernel_caddr_t32  ifcbuf;
 };
 
+static int dev_ifname32(unsigned int fd, unsigned long arg)
+{
+	struct device *dev;
+	struct ifreq32 ifr32;
+	int err;
+
+	if (copy_from_user(&ifr32, (struct ifreq32 *)arg, sizeof(struct ifreq32)))
+		return -EFAULT;
+
+	dev = dev_get_by_index(ifr32.ifr_ifindex);
+	if (!dev)
+		return -ENODEV;
+
+	err = copy_to_user((struct ifreq32 *)arg, &ifr32, sizeof(struct ifreq32));
+	return (err ? -EFAULT : 0);
+}
+
 static inline int dev_ifconf(unsigned int fd, unsigned long arg)
 {
 	struct ifconf32 ifc32;
@@ -1687,6 +1705,10 @@
 		goto out;
 	}
 	switch (cmd) {
+	case SIOCGIFNAME:
+		error = dev_ifname32(fd, arg);
+		goto out;
+
 	case SIOCGIFCONF:
 		error = dev_ifconf(fd, arg);
 		goto out;
diff -urN linux-2.2.10-pre5/arch/sparc64/kernel/signal.c linux/arch/sparc64/kernel/signal.c
--- linux-2.2.10-pre5/arch/sparc64/kernel/signal.c	Tue Oct 27 09:52:20 1998
+++ linux/arch/sparc64/kernel/signal.c	Mon Dec  3 18:50:27 2001
@@ -1,4 +1,4 @@
-/*  $Id: signal.c,v 1.38 1998/10/16 03:19:04 davem Exp $
+/*  $Id: signal.c,v 1.38.2.1 1999/06/14 00:36:21 davem Exp $
  *  arch/sparc64/kernel/signal.c
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
@@ -950,6 +950,7 @@
 			default:
 				lock_kernel();
 				sigaddset(&current->signal, signr);
+				recalc_sigpending(current);
 				current->flags |= PF_SIGNALED;
 				do_exit(exit_code);
 				/* NOT REACHED */
diff -urN linux-2.2.10-pre5/arch/sparc64/kernel/signal32.c linux/arch/sparc64/kernel/signal32.c
--- linux-2.2.10-pre5/arch/sparc64/kernel/signal32.c	Tue Oct 27 09:52:20 1998
+++ linux/arch/sparc64/kernel/signal32.c	Mon Dec  3 18:50:27 2001
@@ -1,4 +1,4 @@
-/*  $Id: signal32.c,v 1.47 1998/10/13 09:07:40 davem Exp $
+/*  $Id: signal32.c,v 1.47.2.1 1999/06/14 00:36:24 davem Exp $
  *  arch/sparc64/kernel/signal32.c
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
@@ -1336,6 +1336,7 @@
 			default:
 				lock_kernel();
 				sigaddset(&current->signal, signr);
+				recalc_sigpending(current);
 				current->flags |= PF_SIGNALED;
 				do_exit(exit_code);
 				/* NOT REACHED */
diff -urN linux-2.2.10-pre5/fs/Config.in linux/fs/Config.in
--- linux-2.2.10-pre5/fs/Config.in	Mon Dec  3 18:50:14 2001
+++ linux/fs/Config.in	Mon Dec  3 18:50:35 2001
@@ -86,9 +86,6 @@
     fi
   fi
   tristate 'SMB filesystem support (to mount WfW shares etc.)' CONFIG_SMB_FS
-  if [ "$CONFIG_SMB_FS" != "n" ]; then
-    bool 'SMB Win95 bug work-around' CONFIG_SMB_WIN95
-  fi
 fi
 if [ "$CONFIG_IPX" != "n" -o "$CONFIG_INET" != "n" ]; then
   tristate 'NCP filesystem support (to mount NetWare volumes)' CONFIG_NCP_FS
diff -urN linux-2.2.10-pre5/fs/smbfs/inode.c linux/fs/smbfs/inode.c
--- linux-2.2.10-pre5/fs/smbfs/inode.c	Mon Dec  3 18:50:14 2001
+++ linux/fs/smbfs/inode.c	Mon Dec  3 18:50:35 2001
@@ -376,9 +376,6 @@
 	*mnt = *((struct smb_mount_data *) raw_data);
 	/* ** temp ** pass config flags in file mode */
 	mnt->version = (mnt->file_mode >> 9);
-#ifdef CONFIG_SMB_WIN95
-	mnt->version |= SMB_FIX_WIN95;
-#endif
 	mnt->file_mode &= (S_IRWXU | S_IRWXG | S_IRWXO);
 	mnt->file_mode |= S_IFREG;
 	mnt->dir_mode  &= (S_IRWXU | S_IRWXG | S_IRWXO);
@@ -387,8 +384,6 @@
 	/*
 	 * Display the enabled options
 	 */
-	if (mnt->version & SMB_FIX_WIN95)
-		printk("SMBFS: Win 95 bug fixes enabled\n");
 	if (mnt->version & SMB_FIX_OLDATTR)
 		printk("SMBFS: Using core getattr (Win 95 speedup)\n");
 	else if (mnt->version & SMB_FIX_DIRATTR)
diff -urN linux-2.2.10-pre5/fs/smbfs/proc.c linux/fs/smbfs/proc.c
--- linux-2.2.10-pre5/fs/smbfs/proc.c	Tue Nov  3 21:56:58 1998
+++ linux/fs/smbfs/proc.c	Mon Dec  3 18:50:35 2001
@@ -39,6 +39,9 @@
 #define SMB_DIRINFO_SIZE 43
 #define SMB_STATUS_SIZE  21
 
+/* yes, this deliberately has two parts */
+#define DENTRY_PATH(dentry) (dentry)->d_parent->d_name.name,(dentry)->d_name.name
+
 static int smb_proc_setattr_ext(struct smb_sb_info *, struct inode *,
 				struct smb_fattr *);
 static inline int
@@ -174,24 +177,22 @@
 		  /* JanFebMarApr May Jun Jul Aug Sep Oct Nov Dec */
 
 
-extern struct timezone sys_tz;
-
 static time_t
-utc2local(time_t time)
+utc2local(struct smb_sb_info *server, time_t time)
 {
-	return time - sys_tz.tz_minuteswest * 60 - (sys_tz.tz_dsttime ? 3600 :0);
+	return time - server->opt.serverzone*60;
 }
 
 static time_t
-local2utc(time_t time)
+local2utc(struct smb_sb_info *server, time_t time)
 {
-	return time + sys_tz.tz_minuteswest * 60 + (sys_tz.tz_dsttime ? 3600 : 0);
+	return time + server->opt.serverzone*60;
 }
 
 /* Convert a MS-DOS time/date pair to a UNIX date (seconds since 1 1 70). */
 
 static time_t
-date_dos2unix(__u16 date, __u16 time)
+date_dos2unix(struct smb_sb_info *server, __u16 date, __u16 time)
 {
 	int month, year;
 	time_t secs;
@@ -202,18 +203,19 @@
 	    ((date & 31) - 1 + day_n[month] + (year / 4) + year * 365 - ((year & 3) == 0 &&
 						   month < 2 ? 1 : 0) + 3653);
 	/* days since 1.1.70 plus 80's leap day */
-	return local2utc(secs);
+	return local2utc(server, secs);
 }
 
 
 /* Convert linear UNIX date to a MS-DOS time/date pair. */
 
 static void
-date_unix2dos(int unix_date, __u16 *date, __u16 *time)
+date_unix2dos(struct smb_sb_info *server,
+	      int unix_date, __u16 *date, __u16 *time)
 {
 	int day, year, nl_day, month;
 
-	unix_date = utc2local(unix_date);
+	unix_date = utc2local(server, unix_date);
 	*time = (unix_date % 60) / 2 +
 		(((unix_date / 60) % 60) << 5) +
 		(((unix_date / 3600) % 24) << 11);
@@ -355,6 +357,11 @@
 	int error  = server->err;
 	char *class = "Unknown";
 
+#ifdef SMBFS_DEBUG_VERBOSE
+	printk("smb_errno: errcls %d  code %d  from command 0x%x\n",
+		errcls, error, SMB_CMD(server->packet));
+#endif
+
 	if (errcls == ERRDOS)
 		switch (error)
 		{
@@ -456,7 +463,7 @@
 		class = "ERRCMD";
 
 err_unknown:
-	printk("smb_errno: class %s, code %d from command %x\n",
+	printk("smb_errno: class %s, code %d from command 0x%x\n",
 		class, error, SMB_CMD(server->packet));
 	return EIO;
 }
@@ -646,9 +653,27 @@
 	server->generation += 1;
 	server->state = CONN_VALID;
 	error = 0;
+
+	/* check if we have an old smbmount that uses seconds for the 
+	   serverzone */
+	if (server->opt.serverzone > 12*60 || server->opt.serverzone < -12*60)
+		server->opt.serverzone /= 60;
+
+	/* now that we have an established connection we can detect the server
+	   type and enable bug workarounds */
+	if (server->opt.protocol == SMB_PROTOCOL_NT1 &&
+	    (server->opt.max_xmit < 0x1000) &&
+	    !(server->opt.capabilities & SMB_CAP_NT_SMBS)) {
+		server->mnt->version |= SMB_FIX_WIN95;
 #ifdef SMBFS_DEBUG_VERBOSE
-printk("smb_newconn: protocol=%d, max_xmit=%d, pid=%d\n",
-server->opt.protocol, server->opt.max_xmit, server->conn_pid);
+		printk("smb_newconn: detected WIN95 server\n");
+#endif
+	}
+
+#ifdef SMBFS_DEBUG_VERBOSE
+printk("smb_newconn: protocol=%d, max_xmit=%d, pid=%d capabilities=0x%x\n",
+       server->opt.protocol, server->opt.max_xmit, server->conn_pid,
+       server->opt.capabilities);
 #endif
 
 out:
@@ -755,7 +780,7 @@
 		{
 #ifdef SMBFS_DEBUG_VERBOSE
 printk("smb_proc_open: %s/%s R/W failed, error=%d, retrying R/O\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, error);
+       DENTRY_PATH(dentry), error);
 #endif
 			mode = read_only;
 			goto retry;
@@ -789,7 +814,7 @@
 	if (!inode)
 	{
 		printk("smb_open: no inode for dentry %s/%s\n",
-			dentry->d_parent->d_name.name, dentry->d_name.name);
+		       DENTRY_PATH(dentry));
 		goto out;
 	}
 
@@ -810,7 +835,7 @@
 		{
 #ifdef SMBFS_PARANOIA
 printk("smb_open: %s/%s open failed, result=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, result);
+       DENTRY_PATH(dentry), result);
 #endif
 			goto out;
 		}
@@ -829,8 +854,7 @@
 	{
 #ifdef SMBFS_PARANOIA
 printk("smb_open: %s/%s access denied, access=%x, wish=%x\n",
-dentry->d_parent->d_name.name, dentry->d_name.name,
-inode->u.smbfs_i.access, wish);
+       DENTRY_PATH(dentry), inode->u.smbfs_i.access, wish);
 #endif
 		result = -EACCES;
 	}
@@ -845,7 +869,7 @@
 {
 	smb_setup_header(server, SMBclose, 3, 0);
 	WSET(server->packet, smb_vwv0, fileid);
-	DSET(server->packet, smb_vwv1, utc2local(mtime));
+	DSET(server->packet, smb_vwv1, utc2local(server, mtime));
 	return smb_request_ok(server, SMBclose, 0, 0);
 }
 
@@ -946,7 +970,7 @@
 			{
 #ifdef SMBFS_DEBUG_VERBOSE
 printk("smb_close_dentry: closing %s/%s, count=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, dentry->d_count);
+       DENTRY_PATH(dentry), dentry->d_count);
 #endif
 				smb_proc_close_inode(server, ino);
 			}
@@ -954,7 +978,7 @@
 		}
 #ifdef SMBFS_DEBUG_VERBOSE
 printk("smb_close_dentry: closed %s/%s, count=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, dentry->d_count);
+       DENTRY_PATH(dentry), dentry->d_count);
 #endif
 	}
 }
@@ -1014,7 +1038,7 @@
 out:
 #ifdef SMBFS_DEBUG_VERBOSE
 printk("smb_proc_read: file %s/%s, count=%d, result=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, count, result);
+       DENTRY_PATH(dentry), count, result);
 #endif
 	smb_unlock_server(server);
 	return result;
@@ -1029,8 +1053,7 @@
 
 #if SMBFS_DEBUG_VERBOSE
 printk("smb_proc_write: file %s/%s, count=%d@%ld, packet_size=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, 
-count, offset, server->packet_size);
+       DENTRY_PATH(dentry), count, offset, server->packet_size);
 #endif
 	smb_lock_server(server);
 	p = smb_setup_header(server, SMBwrite, 5, count + 3);
@@ -1063,7 +1086,7 @@
       retry:
 	p = smb_setup_header(server, SMBcreate, 3, 0);
 	WSET(server->packet, smb_vwv0, attr);
-	DSET(server->packet, smb_vwv1, utc2local(ctime));
+	DSET(server->packet, smb_vwv1, utc2local(server, ctime));
 	*p++ = 4;
 	p = smb_encode_path(server, p, dentry, NULL);
 	smb_setup_bcc(server, p);
@@ -1323,7 +1346,7 @@
 
 #ifdef SMBFS_DEBUG_VERBOSE
 printk("smb_proc_readdir_short: %s/%s, pos=%d\n",
-dir->d_parent->d_name.name, dir->d_name.name, fpos);
+       DENTRY_PATH(dir), fpos);
 #endif
 
 	smb_lock_server(server);
@@ -1804,15 +1827,15 @@
 	 */
 	date = WVAL(resp_data, 0);
 	time = WVAL(resp_data, 2);
-	fattr->f_ctime = date_dos2unix(date, time);
+	fattr->f_ctime = date_dos2unix(server, date, time);
 
 	date = WVAL(resp_data, 4);
 	time = WVAL(resp_data, 6);
-	fattr->f_atime = date_dos2unix(date, time);
+	fattr->f_atime = date_dos2unix(server, date, time);
 
 	date = WVAL(resp_data, 8);
 	time = WVAL(resp_data, 10);
-	fattr->f_mtime = date_dos2unix(date, time);
+	fattr->f_mtime = date_dos2unix(server, date, time);
 #ifdef SMBFS_DEBUG_VERBOSE
 printk("smb_proc_getattr_ff: name=%s, date=%x, time=%x, mtime=%ld\n",
 mask, date, time, fattr->f_mtime);
@@ -1831,7 +1854,7 @@
  */
 static int
 smb_proc_getattr_core(struct smb_sb_info *server, struct dentry *dir,
-			struct smb_fattr *fattr)
+		      struct smb_fattr *fattr)
 {
 	int result;
 	char *p;
@@ -1849,13 +1872,13 @@
 		goto out;
 	}
 	fattr->attr    = WVAL(server->packet, smb_vwv0);
-	fattr->f_mtime = local2utc(DVAL(server->packet, smb_vwv1));
+	fattr->f_mtime = local2utc(server, DVAL(server->packet, smb_vwv1));
 	fattr->f_size  = DVAL(server->packet, smb_vwv3);
 	fattr->f_ctime = fattr->f_mtime; 
 	fattr->f_atime = fattr->f_mtime; 
 #ifdef SMBFS_DEBUG_TIMESTAMP
 printk("getattr_core: %s/%s, mtime=%ld\n",
-dir->d_name.name, name->name, fattr->f_mtime);
+       DENTRY_PATH(dir), fattr->f_mtime);
 #endif
 	result = 0;
 
@@ -1926,18 +1949,18 @@
 	}
 	date = WVAL(resp_data, off_date);
 	time = WVAL(resp_data, off_time);
-	attr->f_ctime = date_dos2unix(date, time);
+	attr->f_ctime = date_dos2unix(server, date, time);
 
 	date = WVAL(resp_data, 4 + off_date);
 	time = WVAL(resp_data, 4 + off_time);
-	attr->f_atime = date_dos2unix(date, time);
+	attr->f_atime = date_dos2unix(server, date, time);
 
 	date = WVAL(resp_data, 8 + off_date);
 	time = WVAL(resp_data, 8 + off_time);
-	attr->f_mtime = date_dos2unix(date, time);
+	attr->f_mtime = date_dos2unix(server, date, time);
 #ifdef SMBFS_DEBUG_TIMESTAMP
 printk("getattr_trans2: %s/%s, date=%x, time=%x, mtime=%ld\n",
-dir->d_name.name, name->name, date, time, attr->f_mtime);
+       DENTRY_PATH(dir), date, time, attr->f_mtime);
 #endif
 	attr->f_size = DVAL(resp_data, 12);
 	attr->attr = WVAL(resp_data, 20);
@@ -1980,6 +2003,7 @@
 	return result;
 }
 
+
 /*
  * Called with the server locked. Because of bugs in the
  * core protocol, we use this only to set attributes. See
@@ -1994,7 +2018,7 @@
  */
 static int
 smb_proc_setattr_core(struct smb_sb_info *server, struct dentry *dentry,
-			__u16 attr)
+		      __u16 attr)
 {
 	char *p;
 	int result;
@@ -2009,11 +2033,6 @@
 	WSET(server->packet, smb_vwv6, 0);
 	WSET(server->packet, smb_vwv7, 0);
 	*p++ = 4;
-	/*
-	 * Samba uses three leading '\', so we'll do it too.
-	 */
-	*p++ = '\\';
-	*p++ = '\\';
 	p = smb_encode_path(server, p, dentry, NULL);
 	*p++ = 4;
 	*p++ = 0;
@@ -2044,7 +2063,7 @@
 
 #ifdef SMBFS_DEBUG_VERBOSE
 printk("smb_proc_setattr: setting %s/%s, open=%d\n", 
-dir->d_parent->d_name.name, dir->d_name.name, smb_is_open(dir->d_inode));
+       DENTRY_PATH(dir), smb_is_open(dir->d_inode));
 #endif
 	smb_lock_server(server);
 	result = smb_proc_setattr_core(server, dir, fattr->attr);
@@ -2069,10 +2088,10 @@
 	/* We don't change the creation time */
 	WSET(server->packet, smb_vwv1, 0);
 	WSET(server->packet, smb_vwv2, 0);
-	date_unix2dos(fattr->f_atime, &date, &time);
+	date_unix2dos(server, fattr->f_atime, &date, &time);
 	WSET(server->packet, smb_vwv3, date);
 	WSET(server->packet, smb_vwv4, time);
-	date_unix2dos(fattr->f_mtime, &date, &time);
+	date_unix2dos(server, fattr->f_mtime, &date, &time);
 	WSET(server->packet, smb_vwv5, date);
 	WSET(server->packet, smb_vwv6, time);
 #ifdef SMBFS_DEBUG_TIMESTAMP
@@ -2119,15 +2138,15 @@
 
 	WSET(data, 0, 0); /* creation time */
 	WSET(data, 2, 0);
-	date_unix2dos(fattr->f_atime, &date, &time);
+	date_unix2dos(server, fattr->f_atime, &date, &time);
 	WSET(data, 4, date);
 	WSET(data, 6, time);
-	date_unix2dos(fattr->f_mtime, &date, &time);
+	date_unix2dos(server, fattr->f_mtime, &date, &time);
 	WSET(data, 8, date);
 	WSET(data, 10, time);
 #ifdef SMBFS_DEBUG_TIMESTAMP
 printk("setattr_trans2: %s/%s, date=%x, time=%x, mtime=%ld\n", 
-dir->d_parent->d_name.name, dir->d_name.name, date, time, fattr->f_mtime);
+       DENTRY_PATH(dir), date, time, fattr->f_mtime);
 #endif
 	DSET(data, 12, 0); /* size */
 	DSET(data, 16, 0); /* blksize */
@@ -2174,10 +2193,12 @@
 
 #ifdef SMBFS_DEBUG_VERBOSE
 printk("smb_proc_settime: setting %s/%s, open=%d\n", 
-dentry->d_parent->d_name.name, dentry->d_name.name, smb_is_open(inode));
+       DENTRY_PATH(dentry), smb_is_open(inode));
 #endif
 	smb_lock_server(server);
-	if (server->opt.protocol >= SMB_PROTOCOL_LANMAN2)
+	/* setting the time on a Win95 server fails (tridge) */
+	if (server->opt.protocol >= SMB_PROTOCOL_LANMAN2 && 
+	    !(server->mnt->version & SMB_FIX_WIN95))
 	{
 		if (smb_is_open(inode) &&
 		    inode->u.smbfs_i.access != SMB_O_RDONLY)
@@ -2194,12 +2215,13 @@
 		{
 			/*
 			 * Set the mtime by opening and closing the file.
+			 * Note that the file is opened read-only, but this
+			 * still allows us to set the date (tridge)
 			 */
 			result = -EACCES;
 			if (!smb_is_open(inode))
-				smb_proc_open(server, dentry, SMB_O_WRONLY);
-			if (smb_is_open(inode) &&
-			    inode->u.smbfs_i.access != SMB_O_RDONLY)
+				smb_proc_open(server, dentry, SMB_O_RDONLY);
+			if (smb_is_open(inode))
 			{
 				inode->i_mtime = fattr->f_mtime;
 				result = smb_proc_close_inode(server, inode);
diff -urN linux-2.2.10-pre5/include/asm-sparc/spinlock.h linux/include/asm-sparc/spinlock.h
--- linux-2.2.10-pre5/include/asm-sparc/spinlock.h	Thu Apr 22 19:24:52 1999
+++ linux/include/asm-sparc/spinlock.h	Mon Dec  3 18:50:35 2001
@@ -17,7 +17,7 @@
 
 #define spin_lock_init(lock)	do { } while(0)
 #define spin_lock(lock)		do { } while(0)
-#define spin_trylock(lock)	do { } while(0)
+#define spin_trylock(lock)	(1)
 #define spin_unlock_wait(lock)	do { } while(0)
 #define spin_unlock(lock)	do { } while(0)
 #define spin_lock_irq(lock)	cli()
diff -urN linux-2.2.10-pre5/include/asm-sparc64/spinlock.h linux/include/asm-sparc64/spinlock.h
--- linux-2.2.10-pre5/include/asm-sparc64/spinlock.h	Wed Mar 10 16:53:38 1999
+++ linux/include/asm-sparc64/spinlock.h	Mon Dec  3 18:50:35 2001
@@ -15,7 +15,7 @@
 
 #define spin_lock_init(lock)	do { } while(0)
 #define spin_lock(lock)		do { } while(0)
-#define spin_trylock(lock)	do { } while(0)
+#define spin_trylock(lock)	(1)
 #define spin_unlock_wait(lock)	do { } while(0)
 #define spin_unlock(lock)	do { } while(0)
 #define spin_lock_irq(lock)	cli()
diff -urN linux-2.2.10-pre5/include/linux/smb.h linux/include/linux/smb.h
--- linux-2.2.10-pre5/include/linux/smb.h	Sun Dec 27 22:18:28 1998
+++ linux/include/linux/smb.h	Mon Dec  3 18:50:35 2001
@@ -57,7 +57,7 @@
 	/* The following are NT LM 0.12 options */
 	__u32              maxraw;
 	__u32              capabilities;
-	__u16              serverzone;
+	__s16              serverzone;
 };
 
 #ifdef __KERNEL__
diff -urN linux-2.2.10-pre5/include/linux/smb_fs.h linux/include/linux/smb_fs.h
--- linux-2.2.10-pre5/include/linux/smb_fs.h	Tue May 11 10:37:15 1999
+++ linux/include/linux/smb_fs.h	Mon Dec  3 18:50:35 2001
@@ -77,6 +77,22 @@
 #define SMB_FIX_OLDATTR	0x0002	/* Use core getattr (Win 95 speedup) */
 #define SMB_FIX_DIRATTR	0x0004	/* Use find_first for getattr */
 
+
+/* NT1 protocol capability bits */
+#define SMB_CAP_RAW_MODE         0x0001
+#define SMB_CAP_MPX_MODE         0x0002
+#define SMB_CAP_UNICODE          0x0004
+#define SMB_CAP_LARGE_FILES      0x0008
+#define SMB_CAP_NT_SMBS          0x0010
+#define SMB_CAP_RPC_REMOTE_APIS  0x0020
+#define SMB_CAP_STATUS32         0x0040
+#define SMB_CAP_LEVEL_II_OPLOCKS 0x0080
+#define SMB_CAP_LOCK_AND_READ    0x0100
+#define SMB_CAP_NT_FIND          0x0200
+#define SMB_CAP_DFS              0x1000
+#define SMB_CAP_LARGE_READX      0x4000
+
+
 /* linux/fs/smbfs/mmap.c */
 int smb_mmap(struct file *, struct vm_area_struct *);
 
