2.0.31-pre4

Florian La Roche (florian@knorke.saar.de)
Tue, 12 Aug 1997 15:16:03 +0200


Here is a collection of minor patches. (Most things are for just for gcc.)
Things to watch out:
- I never use ncpfs and the change used to be on linuxhq. Dunno if it
is useful. (Looks bad to have summertime in the kernel anyway...)
- ip_masq.c didn't compile for me. I have placed a "#if 0" around those
places, but cleaned up a printk inside that code. Maybe someone doing
the right patch could include these changed lines, too.

I will collect any further patches posted to linux-kernel and place
them on ftp://jurix.jura.uni-sb.de/pub/linux/source/kernel/linux.dif.
But be careful, as that patch contains also some other patches like
disabling reset for the aic-driver and disabling the "init=" option.

Seems like all important things from linuxhq are now included.

Thanks a lot,
Greetings,

Florian La Roche

--- drivers/char/random.c
+++ drivers/char/random.c 1997/08/12 12:33:33
@@ -1392,7 +1392,7 @@
return (seq);
} else {
if (seq == sseq || (seq+1) == sseq) {
- printk("validated probe(%lx, %lx, %d, %d, %d)\n",
+ printk("validated probe(%x, %x, %d, %d, %d)\n",
saddr, daddr, sport, dport, sseq);
return 1;
}
--- drivers/net/apricot.c
+++ drivers/net/apricot.c 1997/08/12 12:33:33
@@ -298,7 +298,7 @@
i596_add_cmd(dev, &lp->tdr);

boguscnt = 200;
- while (lp->scb.status, lp->scb.command)
+ while (lp->scb.command)
if (--boguscnt == 0)
{
printk("%s: receive unit start timed out with status %4.4x, cmd %4.4x.\n",
@@ -310,7 +310,7 @@
outw(0, ioaddr+4);

boguscnt = 200;
- while (lp->scb.status, lp->scb.command)
+ while (lp->scb.command)
if (--boguscnt == 0)
{
printk("i82596 init timed out with status %4.4x, cmd %4.4x.\n",
@@ -427,7 +427,7 @@
}
}

- while (lp->scb.status, lp->scb.command)
+ while (lp->scb.command)
if (--boguscnt == 0)
{
printk("i596_cleanup_cmd timed out with status %4.4x, cmd %4.4x.\n",
@@ -445,7 +445,7 @@

if (i596_debug > 4) printk ("i596_reset\n");

- while (lp->scb.status, lp->scb.command)
+ while (lp->scb.command)
if (--boguscnt == 0)
{
printk("i596_reset timed out with status %4.4x, cmd %4.4x.\n",
@@ -462,7 +462,7 @@
/* wait for shutdown */
boguscnt = 400;

- while ((lp->scb.status, lp->scb.command) || lp->scb.command)
+ while (lp->scb.command)
if (--boguscnt == 0)
{
printk("i596_reset 2 timed out with status %4.4x, cmd %4.4x.\n",
@@ -499,7 +499,7 @@
else
{
lp->cmd_head = cmd;
- while (lp->scb.status, lp->scb.command)
+ while (lp->scb.command)
if (--boguscnt == 0)
{
printk("i596_add_cmd timed out with status %4.4x, cmd %4.4x.\n",
@@ -767,7 +767,7 @@

lp = (struct i596_private *)dev->priv;

- while (lp->scb.status, lp->scb.command)
+ while (lp->scb.command)
if (--boguscnt == 0)
{
printk("%s: i596 interrupt, timeout status %4.4x command %4.4x.\n", dev->name, lp->scb.status, lp->scb.command);
@@ -889,7 +889,7 @@
if ((lp->scb.cmd != (struct i596_cmd *) I596_NULL) && (dev->start)) ack_cmd | = CUC_START;
*/
boguscnt = 100;
- while (lp->scb.status, lp->scb.command)
+ while (lp->scb.command)
if (--boguscnt == 0)
{
printk("%s: i596 interrupt, timeout status %4.4x command %4.4x.\n", dev->name, lp->scb.status, lp->scb.command);
@@ -927,7 +927,7 @@

i596_cleanup_cmd(lp);

- while (lp->scb.status, lp->scb.command)
+ while (lp->scb.command)
if (--boguscnt == 0)
{
printk("%s: close timed timed out with status %4.4x, cmd %4.4x.\n",
--- drivers/net/ne.c
+++ drivers/net/ne.c 1997/08/12 12:33:33
@@ -160,7 +160,9 @@

int ne_probe(struct device *dev)
{
+#ifndef MODULE
int i;
+#endif
int base_addr = dev ? dev->base_addr : 0;

/* First check any supplied i/o locations. User knows best. <cough> */
@@ -172,7 +174,7 @@
#ifdef CONFIG_PCI
/* Then look for any installed PCI clones */
if (pcibios_present() && (ne_probe_pci(dev) == 0))
- return 0;
+ return 0;
#endif

#ifndef MODULE
--- drivers/net/net_init.c
+++ drivers/net/net_init.c 1997/08/12 12:33:33
@@ -318,7 +318,7 @@
for (i = 0; i < MAX_ETH_CARDS; ++i)
if (ethdev_index[i] == NULL) {
sprintf(dev->name, "eth%d", i);
- printk("loading device '%s'...\n", dev->name);
+ printk(KERN_INFO "probing for device '%s'...\n", dev->name);
ethdev_index[i] = dev;
break;
}
--- drivers/pci/pci.c
+++ drivers/pci/pci.c 1997/08/12 12:33:33
@@ -151,6 +151,10 @@
DEVICE( 3COM, 3COM_3C595TX, "3C595 100bTX"),
DEVICE( 3COM, 3COM_3C595T4, "3C595 100bT4"),
DEVICE( 3COM, 3COM_3C595MII, "3C595 100b-MII"),
+ DEVICE( 3COM, 3COM_3C900, "3C900 10bT"),
+ DEVICE( 3COM, 3COM_3C900C, "3C900 10Combo"),
+ DEVICE( 3COM, 3COM_3C905TX, "3C905 100bTX100"),
+ DEVICE( 3COM, 3COM_3C905T4, "3C905 100bT4"),
DEVICE( AL, AL_M1445, "M1445"),
DEVICE( AL, AL_M1449, "M1449"),
DEVICE( AL, AL_M1451, "M1451"),
@@ -214,6 +218,7 @@
DEVICE( SYMPHONY, SYMPHONY_101, "82C101"),
DEVICE( TEKRAM, TEKRAM_DC290, "DC-290"),
DEVICE( 3DLABS, 3DLABS_300SX, "GLINT 300SX"),
+ DEVICE( AVANCE, AVANCE_2064, "ALG-2064"),
DEVICE( AVANCE, AVANCE_2302, "ALG-2302"),
DEVICE( S3, S3_ViRGE, "ViRGE"),
DEVICE( S3, S3_TRIO, "Trio32/Trio64"),
@@ -247,6 +252,7 @@
DEVICE( INTEL, INTEL_82437VX, "82437VX Triton II"),
DEVICE( INTEL, INTEL_82371AB, "82371AB 430TX PIIX4"),
DEVICE( INTEL, INTEL_P6, "Orion P6"),
+ DEVICE( KTI, KTI_ET32P2, "ET32P2"),
DEVICE( ADAPTEC, ADAPTEC_7850, "AIC-7850"),
DEVICE( ADAPTEC, ADAPTEC_7855, "AIC-7855"),
DEVICE( ADAPTEC, ADAPTEC_7860, "AIC-7860"),
@@ -531,9 +537,10 @@
case PCI_VENDOR_ID_SYMPHONY: return "Symphony";
case PCI_VENDOR_ID_TEKRAM: return "Tekram";
case PCI_VENDOR_ID_3DLABS: return "3Dlabs";
- case PCI_VENDOR_ID_AVANCE: return "Avance";
+ case PCI_VENDOR_ID_AVANCE: return "Avance Logic";
case PCI_VENDOR_ID_S3: return "S3 Inc.";
case PCI_VENDOR_ID_INTEL: return "Intel";
+ case PCI_VENDOR_ID_KTI: return "KTI";
case PCI_VENDOR_ID_ADAPTEC: return "Adaptec";
case PCI_VENDOR_ID_ATRONICS: return "Atronics";
case PCI_VENDOR_ID_HER: return "Hercules";
--- drivers/scsi/53c7,8xx.c
+++ drivers/scsi/53c7,8xx.c 1997/08/12 12:33:33
@@ -670,6 +670,7 @@
EXTENDED_MESSAGE, 2 /* length */, EXTENDED_WDTR, 1 /* 2^1 bytes */
};

+#ifdef DEBUG_NCR
/*
* Function : struct Scsi_Host *find_host (int host)
*
@@ -770,6 +771,7 @@
hostdata->options &= ~OPTION_DISCONNECT;
return 0;
}
+#endif

/*
* Function : static void NCR53c7x0_driver_init (struct Scsi_Host *host)
@@ -5401,6 +5403,7 @@
return size;
}

+#ifdef DEBUG_NCR
/*
* Function : static const char *ncr_state (int state)
*
@@ -5422,6 +5425,7 @@
default: return "unknown";
}
}
+#endif

/*
* Function : int NCR53c7xx_abort (Scsi_Cmnd *cmd)
--- drivers/scsi/aic7xxx.c
+++ drivers/scsi/aic7xxx.c 1997/08/12 12:37:27
@@ -4638,9 +4638,9 @@
{
old_verbose = aic7xxx_verbose;
printk(KERN_INFO "aic7xxx: Warning - detected auto-termination. Please "
- "verify driver");
+ "verify driver\n");
printk(KERN_INFO " detected settings and use manual termination "
- "if necessary.");
+ "if necessary.\n");

/* Configure auto termination. */
outb(SEECS | SEEMS, p->base + SEECTL);
--- drivers/sound/sb_common.c
+++ drivers/sound/sb_common.c 1997/08/12 12:33:33
@@ -261,6 +261,7 @@
return 1;
}

+#if defined(CONFIG_MIDI) && defined(CONFIG_UART401)
static void
sb16_set_mpu_port(sb_devc *devc, struct address_info *hw_config)
{
@@ -283,6 +284,7 @@
printk("SB16: Invalid MIDI I/O port %x\n", hw_config->io_base);
}
}
+#endif

static int
sb16_set_irq_hw (sb_devc * devc, int level)
--- fs/fat/misc.c
+++ fs/fat/misc.c 1997/08/12 12:33:33
@@ -25,6 +25,8 @@
"TZ " "TAZ" "TZP" "TPZ" /* abbreviations of tar.Z and tar.zip */
"GZ " "TGZ" "DEB" /* .gz, .tar.gz and Debian packages */
"GIF" "BMP" "TIF" "GL " "JPG" "PCX" /* graphics */
+ "WAV" /* audio */
+ "MPS" "MPG" "MP1" "MP2" "AVI" "DVD" /* mpeg audio-video files */
"TFM" "VF " "GF " "PK " "PXL" "DVI"; /* TeX */


--- fs/isofs/inode.c
+++ fs/isofs/inode.c 1997/08/12 12:33:33
@@ -133,13 +133,7 @@
!strcmp(this_char,"uid") ||
!strcmp(this_char,"gid"))) {
char * vpnt = value;
- unsigned int ivalue;
- ivalue = 0;
- while(*vpnt){
- if(*vpnt < '0' || *vpnt > '9') break;
- ivalue = ivalue * 10 + (*vpnt - '0');
- vpnt++;
- }
+ unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0);
if (*vpnt) return 0;
switch(*this_char) {
case 'b':
--- fs/ncpfs/dir.c
+++ fs/ncpfs/dir.c 1997/08/12 12:33:33
@@ -1226,13 +1226,13 @@
static int
utc2local(int time)
{
- return time - sys_tz.tz_minuteswest*60;
+ return time - sys_tz.tz_minuteswest*60 + sys_tz.tz_dsttime*3600;
}

static int
local2utc(int time)
{
- return time + sys_tz.tz_minuteswest*60;
+ return time + sys_tz.tz_minuteswest*60 - sys_tz.tz_dsttime*3600;
}

/* Convert a MS-DOS time/date pair to a UNIX date (seconds since 1 1 70). */
--- include/linux/pci.h
+++ include/linux/pci.h 1997/08/12 12:33:33
@@ -417,6 +417,10 @@
#define PCI_DEVICE_ID_3COM_3C595TX 0x5950
#define PCI_DEVICE_ID_3COM_3C595T4 0x5951
#define PCI_DEVICE_ID_3COM_3C595MII 0x5952
+#define PCI_DEVICE_ID_3COM_3C900 0x9000
+#define PCI_DEVICE_ID_3COM_3C900C 0x9001
+#define PCI_DEVICE_ID_3COM_3C905TX 0x9050
+#define PCI_DEVICE_ID_3COM_3C905T4 0x9051

#define PCI_VENDOR_ID_AL 0x10b9
#define PCI_DEVICE_ID_AL_M1445 0x1445
@@ -538,6 +542,7 @@
#define PCI_DEVICE_ID_3DLABS_300SX 0x0001

#define PCI_VENDOR_ID_AVANCE 0x4005
+#define PCI_DEVICE_ID_AVANCE_2064 0x2064
#define PCI_DEVICE_ID_AVANCE_2302 0x2302

#define PCI_VENDOR_ID_S3 0x5333
@@ -575,6 +580,9 @@
#define PCI_DEVICE_ID_INTEL_82437VX 0x7030
#define PCI_DEVICE_ID_INTEL_82371AB 0x7111
#define PCI_DEVICE_ID_INTEL_P6 0x84c4
+
+#define PCI_VENDOR_ID_KTI 0x8e2e
+#define PCI_DEVICE_ID_KTI_ET32P2 0x3000

#define PCI_VENDOR_ID_ADAPTEC 0x9004
#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078
--- include/linux/proc_fs.h
+++ include/linux/proc_fs.h 1997/08/12 12:33:33
@@ -193,7 +193,7 @@
extern struct proc_dir_entry proc_root;
extern struct proc_dir_entry proc_net;
extern struct proc_dir_entry proc_scsi;
-extern struct proc_dir_entry proc_sys;
+extern struct proc_dir_entry proc_sys_root;
extern struct proc_dir_entry proc_pid;
extern struct proc_dir_entry proc_pid_fd;

--- kernel/sysctl.c
+++ kernel/sysctl.c 1997/08/12 12:33:33
@@ -87,8 +87,6 @@
proc_sys_permission
};

-extern struct proc_dir_entry proc_sys_root;
-
static void register_proc_table(ctl_table *, struct proc_dir_entry *);
static void unregister_proc_table(ctl_table *, struct proc_dir_entry *);
#endif
--- net/ipv4/ip_fw.c
+++ net/ipv4/ip_fw.c 1997/08/12 12:33:33
@@ -206,9 +206,9 @@
int ip_fw_chk(struct iphdr *ip, struct device *rif, __u16 *redirport, struct ip_fw *chain, int policy, int mode)
{
struct ip_fw *f;
- struct tcphdr *tcp=(struct tcphdr *)((unsigned long *)ip+ip->ihl);
- struct udphdr *udp=(struct udphdr *)((unsigned long *)ip+ip->ihl);
- struct icmphdr *icmp=(struct icmphdr *)((unsigned long *)ip+ip->ihl);
+ struct tcphdr *tcp=(struct tcphdr *)((__u32 *)ip+ip->ihl);
+ struct udphdr *udp=(struct udphdr *)((__u32 *)ip+ip->ihl);
+ struct icmphdr *icmp=(struct icmphdr *)((__u32 *)ip+ip->ihl);
__u32 src, dst;
__u16 src_port=0xFFFF, dst_port=0xFFFF, icmp_type=0xFF;
unsigned short f_prt=0, prt;
--- net/ipv4/ip_masq.c
+++ net/ipv4/ip_masq.c 1997/08/12 12:33:33
@@ -761,6 +761,7 @@
if (ms!=NULL) {
ip_masq_set_expire(ms,0);

+#if 0
/*
* If sysctl !=0 and no pkt has been received yet
* in this tunnel and routing iface address has changed...
@@ -768,11 +769,11 @@
*/
if ( sysctl_ip_dynaddr && ms->flags & IP_MASQ_F_NO_REPLY && dev->pa_addr != ms->maddr) {
unsigned long flags;
- if (sysctl_ip_dynaddr > 1) {
- printk(KERN_INFO "ip_fw_masquerade(): change maddr from %s",
- in_ntoa(ms->maddr));
- printk(" to %s\n", in_ntoa(dev->pa_addr));
- }
+#ifdef DEBUG_CONFIG_IP_MASQUERADE
+ printk(KERN_INFO "ip_fw_masquerade(): change maddr"
+ " %s -> %s\n", in_ntoa(ms->maddr,
+ in_ntoa(dev->pa_addr));
+#endif
save_flags(flags);
cli();
ip_masq_unhash(ms);
@@ -780,6 +781,7 @@
ip_masq_hash(ms);
restore_flags(flags);
}
+#endif

/*
* Set sport if not defined yet (e.g. ftp PASV). Because
@@ -970,6 +972,7 @@
ip_masq_set_expire(ms, 0);
/* Rewrite source address */

+#if 0
/*
* If sysctl !=0 and no pkt has been received yet
* in this tunnel and routing iface address has changed...
@@ -978,9 +981,9 @@
if ( sysctl_ip_dynaddr && ms->flags & IP_MASQ_F_NO_REPLY && dev->pa_addr != ms->maddr) {
unsigned long flags;
#ifdef DEBUG_CONFIG_IP_MASQUERADE
- printk(KERN_INFO "ip_fw_masq_icmp(): change masq.addr %s",
- in_ntoa(ms->maddr));
- printk("-> %s\n", in_ntoa(dev->pa_addr));
+ printk(KERN_INFO "ip_fw_masquerade(): change maddr"
+ " %s -> %s\n", in_ntoa(ms->maddr,
+ in_ntoa(dev->pa_addr));
#endif
save_flags(flags);
cli();
@@ -989,6 +992,7 @@
ip_masq_hash(ms);
restore_flags(flags);
}
+#endif

iph->saddr = ms->maddr;
ip_send_check(iph);