From: Alan Cox Date: Fri, 23 Nov 2007 20:20:58 +0000 (-0500) Subject: Linux 2.2.15pre12 X-Git-Tag: 2.2.15pre12 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=6e18a539bf0d5a55b09df0a0cfd338779c270ee0;p=history.git Linux 2.2.15pre12 o Further small irda fixes (Dag Brattli) o Missing bh_atomic unlocks in mcast/masq (Dave Miller) o K7 cache reporting fix (Catalin Muresan) o Fix phonedev registering specifying unit (Thomas Sparr) o Fix egcs/pcbit isdn issues (Fernando Carvalho) --- diff --git a/Documentation/Configure.help b/Documentation/Configure.help index fc2910877aa8..b97393c82de0 100644 --- a/Documentation/Configure.help +++ b/Documentation/Configure.help @@ -3481,12 +3481,11 @@ CONFIG_BRIDGE other third party bridge products. In order to use this, you'll need the bridge configuration tools - available via FTP (user: anonymous) from - ftp://shadow.cabi.net/pub/Linux. Please read the Bridge mini-HOWTO - for more information. Note that if your box acts as a bridge, it - probably contains several Ethernet devices, but the kernel is not - able to recognize more than one at boot time without help; for - details read the Ethernet-HOWTO, available via FTP (user: anonymous) + available from http://lrp.plain.co.nz/tarballs/bridgex-0.30.tar.gz + Note that if your box acts as a bridge, it probably contains several + Ethernet devices, but the kernel is not able to recognize more than + one ISA ethernet card at boot time without help; for details read + the Ethernet-HOWTO, available via FTP (user: anonymous) in ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. The Bridging code is still in test. If unsure, say N. diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 8940331e02a6..ff8f10922fde 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -445,13 +445,14 @@ __initfunc(static int get_model_name(struct cpuinfo_x86 *c)) cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]); cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]); c->x86_model_id[48] = 0; + /* Set MTRR capability flag if appropriate */ - if(boot_cpu_data.x86 !=5) - return 1; - if((boot_cpu_data.x86_model == 9) || - ((boot_cpu_data.x86_model == 8) && - (boot_cpu_data.x86_mask >= 8))) - c->x86_capability |= X86_FEATURE_MTRR; + if(boot_cpu_data.x86 == 5) { + if((boot_cpu_data.x86_model == 9) || + ((boot_cpu_data.x86_model == 8) && + (boot_cpu_data.x86_mask >= 8))) + c->x86_capability |= X86_FEATURE_MTRR; + } if (n >= 0x80000005){ cpuid(0x80000005, &dummy, &dummy, &ecx, &edx); diff --git a/drivers/isdn/pcbit/capi.c b/drivers/isdn/pcbit/capi.c index ed681f375547..1a32c0825429 100644 --- a/drivers/isdn/pcbit/capi.c +++ b/drivers/isdn/pcbit/capi.c @@ -304,7 +304,14 @@ int capi_tdata_req(struct pcbit_chan* chan, struct sk_buff *skb) data_len = skb->len; - skb_push(skb, 10); + if(skb_headroom(skb) < 10) + { + printk(KERN_CRIT "No headspace (%u) on headroom %p for capi header\n", skb_headroom(skb), skb); + } + else + { + skb_push(skb, 10); + } *((u16 *) (skb->data)) = chan->callref; skb->data[2] = chan->layer2link; diff --git a/drivers/isdn/pcbit/drv.c b/drivers/isdn/pcbit/drv.c index f52b59d0397d..92b1e398af25 100644 --- a/drivers/isdn/pcbit/drv.c +++ b/drivers/isdn/pcbit/drv.c @@ -144,7 +144,7 @@ int pcbit_init_dev(int board, int mem_base, int irq) dev->send_seq = 0; dev->unack_seq = 0; - dev->hl_hdrlen = 10; + dev->hl_hdrlen = 16; dev_if = kmalloc(sizeof(isdn_if), GFP_KERNEL); @@ -166,7 +166,7 @@ int pcbit_init_dev(int board, int mem_base, int irq) ISDN_FEATURE_L2_HDLC | ISDN_FEATURE_L2_TRANS ); dev_if->writebuf_skb = pcbit_xmit; - dev_if->hl_hdrlen = 10; + dev_if->hl_hdrlen = 16; dev_if->maxbufsize = MAXBUFSIZE; dev_if->command = pcbit_command; @@ -494,9 +494,6 @@ void pcbit_l3_receive(struct pcbit_dev * dev, ulong msg, struct callb_data cbdata; int complete, err; isdn_ctrl ictl; -#ifdef DEBUG - struct msg_fmt * fmsg; -#endif switch(msg) { @@ -710,9 +707,6 @@ void pcbit_l3_receive(struct pcbit_dev * dev, ulong msg, default: printk(KERN_DEBUG "pcbit_l3_receive: unknown message %08lx\n", msg); - fmsg = (struct msg_fmt *) &msg; - printk(KERN_DEBUG "cmd=%02x sub=%02x\n", - fmsg->cmd, fmsg->scmd); break; #endif } diff --git a/drivers/isdn/pcbit/layer2.c b/drivers/isdn/pcbit/layer2.c index 36bd6f8aad9e..98daf755849d 100644 --- a/drivers/isdn/pcbit/layer2.c +++ b/drivers/isdn/pcbit/layer2.c @@ -7,6 +7,11 @@ * the GNU Public License, incorporated herein by reference. */ +/* + * 19991203 - Fernando Carvalho - takion@superbofh.org + * Hacked to compile with egcs and run with current version of isdn modules +*/ + /* * PCBIT-D low-layer interface */ @@ -205,7 +210,7 @@ pcbit_transmit(struct pcbit_dev *dev) /* Type 0 frame */ - struct msg_fmt *msg; + ulong msg; if (frame->skb) totlen = FRAME_HDR_LEN + PREHDR_LEN + frame->skb->len; @@ -214,7 +219,7 @@ pcbit_transmit(struct pcbit_dev *dev) flen = MIN(totlen, free); - msg = (struct msg_fmt *) &(frame->msg); + msg = frame->msg; /* * Board level 2 header @@ -222,9 +227,9 @@ pcbit_transmit(struct pcbit_dev *dev) pcbit_writew(dev, flen - FRAME_HDR_LEN); - pcbit_writeb(dev, msg->cpu); + pcbit_writeb(dev, GET_MSG_CPU(msg)); - pcbit_writeb(dev, msg->proc); + pcbit_writeb(dev, GET_MSG_PROC(msg)); /* TH */ pcbit_writew(dev, frame->hdr_len + PREHDR_LEN); @@ -244,8 +249,8 @@ pcbit_transmit(struct pcbit_dev *dev) pcbit_writew(dev, 0); /* C + S */ - pcbit_writeb(dev, msg->cmd); - pcbit_writeb(dev, msg->scmd); + pcbit_writeb(dev, GET_MSG_CMD(msg)); + pcbit_writeb(dev, GET_MSG_SCMD(msg)); /* NUM */ pcbit_writew(dev, frame->refnum); @@ -312,8 +317,7 @@ void pcbit_deliver(void *data) { struct frame_buf *frame; - unsigned long flags; - struct msg_fmt msg; + unsigned long flags, msg; struct pcbit_dev *dev = (struct pcbit_dev *) data; save_flags(flags); @@ -323,10 +327,10 @@ pcbit_deliver(void *data) dev->read_queue = frame->next; restore_flags(flags); - msg.cpu = 0; - msg.proc = 0; - msg.cmd = frame->skb->data[2]; - msg.scmd = frame->skb->data[3]; + SET_MSG_CPU(msg, 0); + SET_MSG_PROC(msg, 0); + SET_MSG_CMD(msg, frame->skb->data[2]); + SET_MSG_SCMD(msg, frame->skb->data[3]); frame->refnum = *((ushort *) frame->skb->data + 4); frame->msg = *((ulong *) & msg); diff --git a/drivers/isdn/pcbit/layer2.h b/drivers/isdn/pcbit/layer2.h index 2f56a5844891..f8984f990e92 100644 --- a/drivers/isdn/pcbit/layer2.h +++ b/drivers/isdn/pcbit/layer2.h @@ -7,6 +7,11 @@ * the GNU Public License, incorporated herein by reference. */ +/* + * 19991203 - Fernando Carvalho - takion@superbofh.org + * Hacked to compile with egcs and run with current version of isdn modules +*/ + /* * PCBIT-D low-layer interface definitions */ @@ -84,21 +89,20 @@ Intel 1 2 3 4 */ -struct msg_fmt { -#ifdef __LITTLE_ENDIAN /* Little Endian */ - u_char scmd; - u_char cmd; - u_char proc; - u_char cpu; +#ifdef __LITTLE_ENDIAN +#define SET_MSG_SCMD(msg, ch) (msg = (msg & 0xffffff00) | (((ch) & 0xff))) +#define SET_MSG_CMD(msg, ch) (msg = (msg & 0xffff00ff) | (((ch) & 0xff) << 8)) +#define SET_MSG_PROC(msg, ch) (msg = (msg & 0xff00ffff) | (((ch) & 0xff) << 16)) +#define SET_MSG_CPU(msg, ch) (msg = (msg & 0x00ffffff) | (((ch) & 0xff) << 24)) + +#define GET_MSG_SCMD(msg) ((msg) & 0xFF) +#define GET_MSG_CMD(msg) ((msg) >> 8 & 0xFF) +#define GET_MSG_PROC(msg) ((msg) >> 16 & 0xFF) +#define GET_MSG_CPU(msg) ((msg) >> 24) + #else #error "Non-Intel CPU" - u_char cpu; - u_char proc; - u_char cmd; - u_char scmd; #endif -}; - #define MAX_QUEUED 7 @@ -107,14 +111,13 @@ struct msg_fmt { #define SET_RUN_TIMEOUT 2*HZ /* 2 seconds */ - struct frame_buf { ulong msg; - unsigned short refnum; - unsigned short dt_len; - unsigned short hdr_len; + unsigned int refnum; + unsigned int dt_len; + unsigned int hdr_len; struct sk_buff *skb; - unsigned short copied; + unsigned int copied; struct frame_buf * next; }; diff --git a/drivers/isdn/pcbit/module.c b/drivers/isdn/pcbit/module.c index 55dad0fce1cb..55dfd75ac88a 100644 --- a/drivers/isdn/pcbit/module.c +++ b/drivers/isdn/pcbit/module.c @@ -46,8 +46,8 @@ int pcbit_init(void) num_boards = 0; - printk(KERN_INFO - "PCBIT-D device driver v 0.5 - " + printk(KERN_NOTICE + "PCBIT-D device driver v 0.5-fjpc0 19991204 - " "Copyright (C) 1996 Universidade de Lisboa\n"); if (mem[0] || irq[0]) @@ -97,7 +97,7 @@ void cleanup_module(void) for (board = 0; board < num_boards; board++) pcbit_terminate(board); - printk(KERN_INFO + printk(KERN_NOTICE "PCBIT-D module unloaded\n"); } diff --git a/drivers/telephony/phonedev.c b/drivers/telephony/phonedev.c index fa6d41556274..47a9b0ecbd76 100644 --- a/drivers/telephony/phonedev.c +++ b/drivers/telephony/phonedev.c @@ -10,7 +10,8 @@ * * Author: Alan Cox, * - * Fixes: + * Fixes: Mar 01 2000 Thomas Sparr, + * phone_register_device now works with unit!=PHONE_UNIT_ANY */ #include @@ -84,7 +85,7 @@ int phone_register_device(struct phone_device *p, int unit) if (unit != PHONE_UNIT_ANY) { base = unit; - end = unit; + end = unit + 1; /* enter the loop at least one time */ } for (i = base; i < end; i++) { if (phone_device[i] == NULL) { diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c index bce3f4a4a265..098825a66255 100644 --- a/net/core/dev_mcast.c +++ b/net/core/dev_mcast.c @@ -156,8 +156,10 @@ int dev_mc_add(struct device *dev, void *addr, int alen, int glbl) } } - if ((dmi=dmi1)==NULL) + if ((dmi=dmi1)==NULL) { + end_bh_atomic(); return -ENOMEM; + } memcpy(dmi->dmi_addr, addr, alen); dmi->dmi_addrlen=alen; dmi->next=dev->mc_list; diff --git a/net/ipv4/ip_masq_user.c b/net/ipv4/ip_masq_user.c index 848cbfe8ba74..120b59f1d033 100644 --- a/net/ipv4/ip_masq_user.c +++ b/net/ipv4/ip_masq_user.c @@ -2,7 +2,7 @@ * IP_MASQ_USER user space control module * * - * $Id: ip_masq_user.c,v 1.1.2.3 1999/11/16 06:33:51 davem Exp $ + * $Id: ip_masq_user.c,v 1.1.2.4 2000/02/29 23:50:24 davem Exp $ */ #include @@ -186,8 +186,10 @@ static int ip_masq_user_del(struct ip_masq_user *ums) ums->saddr, ums->sport, ums->daddr, ums->dport); end_bh_atomic(); - } else + } else { + end_bh_atomic(); return EINVAL; + } if (ms == NULL) { return ESRCH; @@ -224,8 +226,10 @@ static struct ip_masq * ip_masq_user_locked_get (struct ip_masq_user *ums, int * ums->saddr, ums->sport, ums->daddr, ums->dport); end_bh_atomic(); - } else + } else { + end_bh_atomic(); *err = EINVAL; + } if (ms == NULL) *err = ESRCH; return ms; diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c index 0a810af9c7fb..d753c2b5ee1e 100644 --- a/net/irda/irda_device.c +++ b/net/irda/irda_device.c @@ -6,7 +6,7 @@ * Status: Experimental. * Author: Dag Brattli * Created at: Sat Oct 9 09:22:27 1999 - * Modified at: Sun Jan 23 09:16:36 2000 + * Modified at: Wed Mar 1 11:00:34 2000 * Modified by: Dag Brattli * * Copyright (c) 1999-2000 Dag Brattli, All Rights Reserved. @@ -46,6 +46,7 @@ #include #include #include +#include #include diff --git a/net/irda/parameters.c b/net/irda/parameters.c index 6d2d19289f03..2fe3d22dd3dc 100644 --- a/net/irda/parameters.c +++ b/net/irda/parameters.c @@ -6,7 +6,7 @@ * Status: Experimental. * Author: Dag Brattli * Created at: Mon Jun 7 10:25:11 1999 - * Modified at: Sun Jan 30 14:08:39 2000 + * Modified at: Wed Mar 1 10:58:05 2000 * Modified by: Dag Brattli * * Copyright (c) 1999-2000 Dag Brattli, All Rights Reserved. @@ -356,21 +356,23 @@ int irda_param_pack(__u8 *buf, char *fmt, ...) for (p = fmt; *p != '\0'; p++) { switch (*p) { case 'b': /* 8 bits unsigned byte */ - buf[n++] = va_arg(args, __u8); + buf[n++] = (__u8)va_arg(args, int); break; case 's': /* 16 bits unsigned short */ - arg.s = va_arg(args, __u16); + arg.s = (__u16)va_arg(args, int); put_unaligned(arg.s, (__u16 *)(buf+n)); n+=2; break; case 'i': /* 32 bits unsigned integer */ arg.i = va_arg(args, __u32); put_unaligned(arg.i, (__u32 *)(buf+n)); n+=4; break; +#if 0 case 'c': /* \0 terminated string */ arg.c = va_arg(args, char *); strcpy(buf+n, arg.c); n += strlen(arg.c) + 1; break; +#endif default: va_end(args); return -1;