summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-03-02 12:56:19 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-03-02 12:56:19 -0500
commita51a0aaebafe45a2069fd2dc7975326e4c7f348c (patch)
tree9a494d78c6a8231ec06b6065e25e7248f34e47b7
parent0f13f7d1e54b992b7834af7673efc592126e43ed (diff)
parent1274fcd685ec15f10261f48dc990367c2180d589 (diff)
Merge pobox.com:/garz/repo/linux-2.6
into pobox.com:/garz/repo/libata-2.6
-rw-r--r--CREDITS15
-rw-r--r--Makefile2
-rw-r--r--arch/arm/kernel/debug.S23
-rw-r--r--arch/arm/mach-imx/dma.c4
-rw-r--r--arch/arm/mach-imx/generic.c4
-rw-r--r--drivers/serial/8250.c72
-rw-r--r--drivers/serial/8250_pci.c9
-rw-r--r--drivers/serial/Makefile2
-rw-r--r--drivers/video/aty/radeon_base.c2
-rw-r--r--fs/sysfs/file.c13
-rw-r--r--include/linux/pci_ids.h3
-rw-r--r--kernel/audit.c6
12 files changed, 97 insertions, 58 deletions
diff --git a/CREDITS b/CREDITS
index 17b8807b9357..71aa0d4d6cd3 100644
--- a/CREDITS
+++ b/CREDITS
@@ -805,6 +805,21 @@ S: One Dell Way
S: Round Rock, TX 78682
S: USA
+N: Ben Dooks
+E: ben-linux@fluff.org
+E: ben@simtec.co.uk
+W: http://www.fluff.org/ben/
+W: http://www.simtec.co.uk/
+D: Samsung S3C2410/S3C2440 support, general ARM support
+D: Maintaining Simtec Electronics development boards
+S: Simtec Electronics
+S: Avondale Drive
+S: Tarleton
+S: Preston
+S: Lancs
+S: PR4 6AX
+S: United Kingdom
+
N: John G Dorsey
E: john+@cs.cmu.edu
D: ARM Linux ports to Assabet/Neponset, Spot
diff --git a/Makefile b/Makefile
index 8627499e585b..786050a974f8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 11
-EXTRAVERSION =-rc5
+EXTRAVERSION =
NAME=Woozy Numbat
# *DOCUMENTATION*
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
index 7c96388b1ef7..caaa919ab47a 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -52,29 +52,6 @@
#include <asm/arch/debug-macro.S>
#endif
-#if 0
-// #elif defined(CONFIG_ARCH_FTVPCI)
- .macro addruart,rx
- mrc p15, 0, \rx, c1, c0
- tst \rx, #1 @ MMU enabled?
- movne \rx, #0xe0000000
- moveq \rx, #0x10000000
- .endm
-
- .macro senduart,rd,rx
- str \rd, [\rx, #0xc]
- .endm
-
- .macro busyuart,rd,rx
-1001: ldr \rd, [\rx, #0x4]
- tst \rd, #1 << 2
- beq 1001b
- .endm
-
- .macro waituart,rd,rx
- .endm
-#endif
-
/*
* Useful debugging routines
*/
diff --git a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c
index 7387ccbd8720..2a44d53d2847 100644
--- a/arch/arm/mach-imx/dma.c
+++ b/arch/arm/mach-imx/dma.c
@@ -136,7 +136,7 @@ dma_err_handler(int irq, void *dev_id, struct pt_regs *regs)
i, channel->name);
DBOSR |= (1 << i);
}
- DISR |= (1 << i);
+ DISR = (1 << i);
}
return IRQ_HANDLED;
}
@@ -158,10 +158,10 @@ dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
*/
printk(KERN_WARNING
"spurious IRQ for DMA channel %d\n", i);
- DISR |= (1 << i);
}
}
}
+ DISR = disr;
return IRQ_HANDLED;
}
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c
index 4954653ec6ae..54377d0f578c 100644
--- a/arch/arm/mach-imx/generic.c
+++ b/arch/arm/mach-imx/generic.c
@@ -100,8 +100,8 @@ EXPORT_SYMBOL(imx_gpio_mode);
static unsigned int imx_decode_pll(unsigned int pll)
{
u32 mfi = (pll >> 10) & 0xf;
- u32 mfn = pll & 0x3f;
- u32 mfd = (pll >> 16) & 0x3f;
+ u32 mfn = pll & 0x3ff;
+ u32 mfd = (pll >> 16) & 0x3ff;
u32 pd = (pll >> 26) & 0xf;
u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512);
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index ec620e33fcf6..a18226a0f671 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -450,9 +450,11 @@ static void disable_rsa(struct uart_8250_port *up)
*/
static int size_fifo(struct uart_8250_port *up)
{
- unsigned char old_fcr, old_mcr, old_dll, old_dlm;
+ unsigned char old_fcr, old_mcr, old_dll, old_dlm, old_lcr;
int count;
+ old_lcr = serial_inp(up, UART_LCR);
+ serial_outp(up, UART_LCR, 0);
old_fcr = serial_inp(up, UART_FCR);
old_mcr = serial_inp(up, UART_MCR);
serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO |
@@ -475,11 +477,40 @@ static int size_fifo(struct uart_8250_port *up)
serial_outp(up, UART_LCR, UART_LCR_DLAB);
serial_outp(up, UART_DLL, old_dll);
serial_outp(up, UART_DLM, old_dlm);
+ serial_outp(up, UART_LCR, old_lcr);
return count;
}
/*
+ * Read UART ID using the divisor method - set DLL and DLM to zero
+ * and the revision will be in DLL and device type in DLM. We
+ * preserve the device state across this.
+ */
+static unsigned int autoconfig_read_divisor_id(struct uart_8250_port *p)
+{
+ unsigned char old_dll, old_dlm, old_lcr;
+ unsigned int id;
+
+ old_lcr = serial_inp(p, UART_LCR);
+ serial_outp(p, UART_LCR, UART_LCR_DLAB);
+
+ old_dll = serial_inp(p, UART_DLL);
+ old_dlm = serial_inp(p, UART_DLM);
+
+ serial_outp(p, UART_DLL, 0);
+ serial_outp(p, UART_DLM, 0);
+
+ id = serial_inp(p, UART_DLL) | serial_inp(p, UART_DLM) << 8;
+
+ serial_outp(p, UART_DLL, old_dll);
+ serial_outp(p, UART_DLM, old_dlm);
+ serial_outp(p, UART_LCR, old_lcr);
+
+ return id;
+}
+
+/*
* This is a helper routine to autodetect StarTech/Exar/Oxsemi UART's.
* When this function is called we know it is at least a StarTech
* 16650 V2, but it might be one of several StarTech UARTs, or one of
@@ -491,7 +522,7 @@ static int size_fifo(struct uart_8250_port *up)
*/
static void autoconfig_has_efr(struct uart_8250_port *up)
{
- unsigned char id1, id2, id3, rev, saved_dll, saved_dlm;
+ unsigned int id1, id2, id3, rev;
/*
* Everything with an EFR has SLEEP
@@ -541,21 +572,13 @@ static void autoconfig_has_efr(struct uart_8250_port *up)
* 0x12 - XR16C2850.
* 0x14 - XR16C854.
*/
- serial_outp(up, UART_LCR, UART_LCR_DLAB);
- saved_dll = serial_inp(up, UART_DLL);
- saved_dlm = serial_inp(up, UART_DLM);
- serial_outp(up, UART_DLL, 0);
- serial_outp(up, UART_DLM, 0);
- id2 = serial_inp(up, UART_DLL);
- id1 = serial_inp(up, UART_DLM);
- serial_outp(up, UART_DLL, saved_dll);
- serial_outp(up, UART_DLM, saved_dlm);
-
- DEBUG_AUTOCONF("850id=%02x:%02x ", id1, id2);
-
- if (id1 == 0x10 || id1 == 0x12 || id1 == 0x14) {
- if (id1 == 0x10)
- up->rev = id2;
+ id1 = autoconfig_read_divisor_id(up);
+ DEBUG_AUTOCONF("850id=%04x ", id1);
+
+ id2 = id1 >> 8;
+ if (id2 == 0x10 || id2 == 0x12 || id2 == 0x14) {
+ if (id2 == 0x10)
+ up->rev = id1 & 255;
up->port.type = PORT_16850;
return;
}
@@ -597,6 +620,19 @@ static void autoconfig_8250(struct uart_8250_port *up)
up->port.type = PORT_16450;
}
+static int broken_efr(struct uart_8250_port *up)
+{
+ /*
+ * Exar ST16C2550 "A2" devices incorrectly detect as
+ * having an EFR, and report an ID of 0x0201. See
+ * http://www.exar.com/info.php?pdf=dan180_oct2004.pdf
+ */
+ if (autoconfig_read_divisor_id(up) == 0x0201 && size_fifo(up) == 16)
+ return 1;
+
+ return 0;
+}
+
/*
* We know that the chip has FIFOs. Does it have an EFR? The
* EFR is located in the same register position as the IIR and
@@ -633,7 +669,7 @@ static void autoconfig_16550a(struct uart_8250_port *up)
* (other ST16C650V2 UARTs, TI16C752A, etc)
*/
serial_outp(up, UART_LCR, 0xBF);
- if (serial_in(up, UART_EFR) == 0) {
+ if (serial_in(up, UART_EFR) == 0 && !broken_efr(up)) {
DEBUG_AUTOCONF("EFRv2 ");
autoconfig_has_efr(up);
return;
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 11ed840476d7..e99ffdd81cce 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -2212,6 +2212,13 @@ static struct pci_device_id serial_pci_tbl[] = {
0, pbn_exar_XR17C158 },
/*
+ * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke)
+ */
+ { PCI_VENDOR_ID_TOPIC, PCI_DEVICE_ID_TOPIC_TP560,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ pbn_b0_1_115200 },
+
+ /*
* These entries match devices with class COMMUNICATION_SERIAL,
* COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
*/
@@ -2241,7 +2248,7 @@ static struct pci_driver serial_pci_driver = {
static int __init serial8250_pci_init(void)
{
- return pci_module_init(&serial_pci_driver);
+ return pci_register_driver(&serial_pci_driver);
}
static void __exit serial8250_pci_exit(void)
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 9ca204984bfb..157808f2fa8d 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -6,9 +6,9 @@
serial-8250-y :=
serial-8250-$(CONFIG_SERIAL_8250_ACPI) += 8250_acpi.o
+serial-8250-$(CONFIG_PNP) += 8250_pnp.o
serial-8250-$(CONFIG_GSC) += 8250_gsc.o
serial-8250-$(CONFIG_PCI) += 8250_pci.o
-serial-8250-$(CONFIG_PNP) += 8250_pnp.o
serial-8250-$(CONFIG_HP300) += 8250_hp300.o
obj-$(CONFIG_SERIAL_CORE) += serial_core.o
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 4bec134eb12c..660ae2a30035 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -2551,7 +2551,7 @@ MODULE_AUTHOR("Ani Joshi");
MODULE_DESCRIPTION("framebuffer driver for ATI Radeon chipset");
MODULE_LICENSE("GPL");
module_param(noaccel, bool, 0);
-module_param(default_dynclk, int, -2);
+module_param(default_dynclk, int, 0);
MODULE_PARM_DESC(default_dynclk, "int: -2=enable on mobility only,-1=do not change,0=off,1=on");
MODULE_PARM_DESC(noaccel, "bool: disable acceleration");
module_param(nomodeset, bool, 0);
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 52d2e5a8d258..352f966a1174 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -231,15 +231,16 @@ static ssize_t
sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
{
struct sysfs_buffer * buffer = file->private_data;
+ ssize_t len;
down(&buffer->sem);
- count = fill_write_buffer(buffer,buf,count);
- if (count > 0)
- count = flush_write_buffer(file->f_dentry,buffer,count);
- if (count > 0)
- *ppos += count;
+ len = fill_write_buffer(buffer, buf, count);
+ if (len > 0)
+ len = flush_write_buffer(file->f_dentry, buffer, len);
+ if (len > 0)
+ *ppos += len;
up(&buffer->sem);
- return count;
+ return len;
}
static int check_perm(struct inode * inode, struct file * file)
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 919fa9768c19..3dca3b53f74b 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1972,6 +1972,9 @@
#define PCI_DEVICE_ID_BCM4401 0x4401
#define PCI_DEVICE_ID_BCM4401B0 0x4402
+#define PCI_VENDOR_ID_TOPIC 0x151f
+#define PCI_DEVICE_ID_TOPIC_TP560 0x0000
+
#define PCI_VENDOR_ID_ENE 0x1524
#define PCI_DEVICE_ID_ENE_1211 0x1211
#define PCI_DEVICE_ID_ENE_1225 0x1225
diff --git a/kernel/audit.c b/kernel/audit.c
index 9b48512a4cf5..9e9471002eae 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -360,7 +360,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
status_set.backlog_limit = audit_backlog_limit;
status_set.lost = atomic_read(&audit_lost);
status_set.backlog = atomic_read(&audit_backlog);
- audit_send_reply(pid, seq, AUDIT_GET, 0, 0,
+ audit_send_reply(NETLINK_CB(skb).pid, seq, AUDIT_GET, 0, 0,
&status_set, sizeof(status_set));
break;
case AUDIT_SET:
@@ -407,8 +407,8 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
/* fallthrough */
case AUDIT_LIST:
#ifdef CONFIG_AUDITSYSCALL
- err = audit_receive_filter(nlh->nlmsg_type, pid, uid, seq,
- data);
+ err = audit_receive_filter(nlh->nlmsg_type, NETLINK_CB(skb).pid,
+ uid, seq, data);
#else
err = -EOPNOTSUPP;
#endif