Commit adbc4706 authored by Linus Torvalds's avatar Linus Torvalds

v2.4.6.1 -> v2.4.6.2

  - merge with Alan (USB, zoran, sony motion-eye, rio, dmi-scan)
parent 17023327
......@@ -78,8 +78,8 @@ P: 1024/85AD9EED AD C0 49 08 91 67 DF D7 FA 04 1A EE 09 E8 44 B0
D: Unix98 pty support.
D: APM update to 1.2 spec.
D: /devfs hacking.
S: 322 N. Riverside Dr.
S: Neptune, NJ 07753
S: 7 Kiwi Loop
S: Howell, NJ 07731
S: USA
N: Erik Andersen
......@@ -679,6 +679,14 @@ S: Ottawa, Ontario
S: K1N 6Z9
S: CANADA
N: Jeff Dike
E: jdike@karaya.com
W: http://user-mode-linux.sourceforge.net
D: User mode kernel port
S: RR1 Box 67C
S: Deering NH 03244
S: USA
N: Eddie C. Dost
E: ecd@skynet.be
D: Linux/Sparc kernel hacker
......@@ -1062,6 +1070,11 @@ S: PO-Box 297
S: 2400 AG, Alphen aan den Rijn
S: The Netherlands
N: Enver Haase
E: ehaase@inf.fu-berlin.de
W: http://www.inf.fu-berlin.de/~ehaase
D: Driver for the Commodore A2232 serial board
N: Bruno Haible
E: haible@ma2s2.mathematik.uni-karlsruhe.de
D: SysV FS, shm swapping, memory management fixes
......@@ -1275,12 +1288,11 @@ S: Pittsburgh, PA 15203-1250
S: USA
N: Gareth Hughes
E: gareth@valinux.com
E: gareth@precisioninsight.com
E: gareth.hughes@acm.org
D: Pentium III FXSR, SSE support
S: 11/187 West Street
S: Crows Nest NSW 2065
S: Australia
D: Author/maintainer of most DRM drivers (especially ATI, MGA)
D: Core DRM templates, general DRM and 3D-related hacking
S: No fixed address
N: Kenn Humborg
E: kenn@wombat.ie
......@@ -2259,6 +2271,15 @@ N: Ken Pizzini
E: ken@halcyon.com
D: CDROM driver "sonycd535" (Sony CDU-535/531)
N: Stelian Pop
E: stelian.pop@fr.alcove.com
P: 1024D/EDBB6147 7B36 0E07 04BC 11DC A7A0 D3F7 7185 9E7A EDBB 6147
D: sonypi, meye drivers, mct_u232 usb serial hacks
S: Alcve
S: 153, bd. Anatole France
S: 93200 Saint Denis
S: France
N: Frederic Potter
E: fpotter@cirpack.com
D: Some PCI kernel support
......@@ -2355,14 +2376,15 @@ S: 75019 Paris
S: France
N: Rik van Riel
E: riel@nl.linux.org
W: http://www.nl.linux.org/~riel/
E: riel@conectiva.com.br
W: http://www.surriel.com/
D: Linux-MM site, Documentation/sysctl/*, swap/mm readaround
D: clustering contributor, kswapd fixes, random kernel hacker,
D: nl.linux.org maintainer, minor scheduler additions
S: IJsselstraat 23a
S: 9725 GA Groningen
S: The Netherlands
D: nl.linux.org administrator, minor scheduler additions
S: Conectiva S.A.
S: R. Tocantins, 89 - Cristo Rei
S: 80050-430 - Curitiba - Paran
S: Brazil
N: Pekka Riikonen
E: priikone@poseidon.pspt.fi
......@@ -2868,6 +2890,7 @@ S: Belgium
N: Petr Vandrovec
E: vandrove@vc.cvut.cz
D: Small contributions to ncpfs
D: Matrox framebuffer driver
S: Chudenicka 8
S: 10200 Prague 10, Hostivar
S: Czech Republic
......
Sony Programmable I/O Control Device Driver Readme
--------------------------------------------------
Copyright (C) 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve
Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au>
Copyright (C) 2001 Junichi Morita <jun1m@mars.dti.ne.jp>
Copyright (C) 2000 Takaya Kinjo <t-kinjo@tc4.so-net.ne.jp>
Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
This driver enables access to the Sony Programmable I/O Control Device which
can be found in many (all ?) Sony Vaio laptops.
It will give access (through a user space utility) to some events those laptops
generate, like:
- jogdial events (the small wheel on the side of Vaios)
- capture button events (only on Vaio Picturebook series)
- Fn keys
- bluetooth button (only on C1VR model)
Those events (see linux/sonypi.h) can be polled using the character device node
/dev/sonypi (major 10, minor auto allocated or specified as a option).
A simple daemon which translates the jogdial movements into mouse wheel events
can be downloaded at: <http://www.alcove-labs.org/en/software/sonypi/>
This driver supports also some ioctl commands for setting the LCD screen
brightness (some more commands may be added in the future).
This driver can also be used to set the camera controls on Picturebook series
(brightness, contrast etc), and is used by the video4linux driver for the
Motion Eye camera.
Please note that this driver was created by reverse engineering the Windows
driver and the ACPI BIOS, because Sony doesn't agree to release any programming
specs for its laptops. If someone convinces them to do so, drop me a note.
Module options:
---------------
minor: minor number of the misc device /dev/sonypi,
default is -1 (automatic allocation, see /proc/misc
or kernel logs)
camera: if you have a PictureBook series Vaio (with the
integrated MotionEye camera), set this parameter to 1
in order to let the driver access to the camera
fnkeyinit: on some Vaios (C1VE, C1VR etc), the Fn key events don't
get enabled unless you set this parameter to 1
verbose: print unknown events from the sonypi device
Module use:
-----------
In order to automatically load the sonypi module on use, you can put those
lines in your /etc/modules.conf file:
alias char-major-10-250 sonypi
options sonypi minor=250 fnkeyinit=1
This supposes the use of minor 250 for the sonypi device:
# mknod /dev/sonypi c 10 250
Bugs:
-----
- since all development was done by reverse engineering, there is
_absolutely no guarantee_ that this driver will not crash your
laptop. Permanently.
This diff is collapsed.
Vaio Picturebook Motion Eye Camera Driver Readme
------------------------------------------------
Copyright (C) 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve
Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
This driver enable the use of video4linux compatible applications with the
Motion Eye camera.
It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480.
Grabbing is supported in packed YUV colorspace only.
MJPEG hardware grabbing is supported via a private API (see below).
Module options:
---------------
gbuffers: number of capture buffers, default is 2 (32 max)
gbufsize: size of each capture buffer, default is 614400
video_nr: video device to register (0 = /dev/video0, etc)
Module use:
-----------
In order to automatically load the meye module on use, you can put those lines
in your /etc/modules.conf file:
alias char-major-81 videodev
alias char-major-81-0 meye
options meye gbuffers=32
Usage:
------
xawtv >= 3.49 (<http://bytesex.org/xawtv/>)
for display and uncompressed video capture:
xawtv -c /dev/video0 -geometry 640x480
or
xawtv -c /dev/video0 -geometry 320x240
motioneye (<http://www.alcove-labs.org/en/software/meye/>)
for getting ppm or jpg snapshots, mjpeg video
Private API:
------------
The driver supports frame grabbing with the video4linux API, so
all video4linux tools (like xawtv) should work with this driver.
Besides the video4linux interface, the driver has a private interface
for accessing the Motion Eye extended parameters (camera sharpness,
agc, video framerate), the shapshot and the MJPEG capture facilities.
This interface consists of several ioctls (prototypes and structures
can be found in include/linux/meye.h):
MEYEIOC_G_PARAMS
MEYEIOC_S_PARAMS
Get and set the extended parameters of the motion eye camera.
The user should always query the current parameters with
MEYEIOC_G_PARAMS, change what he likes and then issue the
MEYEIOC_S_PARAMS call (checking for -EINVAL). The extended
parameters are described by the meye_params structure.
MEYEIOC_QBUF_CAPT
Queue a buffer for capture (the buffers must have been
obtained with a VIDIOCGMBUF call and mmap'ed by the
application). The argument to MEYEIOC_QBUF_CAPT is the
buffer number to queue (or -1 to end capture). The first
call to MEYEIOC_QBUF_CAPT starts the streaming capture.
MEYEIOC_SYNC
Takes as an argument the buffer number you want to sync.
This ioctl blocks untils the buffer is filled and ready
for the application to use. It returns the buffer size.
MEYEIOC_STILLCAPT
MEYEIOC_STILLJCAPT
Takes a snapshot in an uncompressed or compressed jpeg format.
This ioctl blocks until the snapshot is done and returns (for
jpeg snapshot) the size of the image. The image data is
available from the first mmap'ed buffer.
Look at the 'motioneye' application code for an actual example.
Bugs / Todo:
------------
- overlay output is not supported (although the camera is capable of).
(it should not be too hard to to it, provided we found how...)
- mjpeg hardware playback doesn't work (depends on overlay...)
- rewrite the driver to use some commun video4linux API for snapshot
and mjpeg capture. Unfortunately, video4linux1 does not permit it,
the BUZ API seems to be targeted to TV cards only. The video4linux 2
API may be an option, if it goes into the kernel (maybe 2.5
material ?).
W9966 Camera driver, written by Jakob Kemi (jakob.kemi@post.utfors.se)
Ok, after a lot of work in softice, wdasm, reading pdf-files
and trial-and-error work I've finally got everything to work.
Since I needed some vision for a robotics project I borrowed
this camera from a friend and started hacking. Anyway I've
converted my original code from the AVR 8bit RISC C/asm
into a working linux driver. I would really appreciate _any_
kind of feedback regarding this driver.
To get it working quickly configure your kernel
to support parport, ieee1284, video4linux, experimental drivers
and w9966
If w9966 is statically linked it will perform aggressive probing
for the camera. If built as a module you'll have more configuration options.
Options:
modprobe w9966.o pardev=parport0(or whatever) parmode=0 (0=auto, 1=ecp, 2=epp)
voila!
you can also type 'modinfo -p w9966.o' for option usage
(or checkout w9966.c)
I've only tested it with custom built testprograms
(http://hem.fyristorg.com/mogul/w9966.html) and with gqcam.
(you'll need to tweak the code to qcam a bit to make it work,
dimensions and such)
The slow framerate is due to missing DMA ECP read support in the
parport drivers. I might add working EPP support later.
Good luck!
/Jakob
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 7
EXTRAVERSION =-pre1
EXTRAVERSION =-pre2
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
......
This diff is collapsed.
......@@ -13,6 +13,7 @@
#include <linux/ptrace.h>
#include <linux/interrupt.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/ioport.h>
......@@ -24,6 +25,11 @@
#define MAX_SLOTS 21
#define PCICMD_ERROR_BITS ((PCI_STATUS_DETECTED_PARITY | \
PCI_STATUS_REC_MASTER_ABORT | \
PCI_STATUS_REC_TARGET_ABORT | \
PCI_STATUS_PARITY) << 16)
extern int setup_arm_irq(int, struct irqaction *);
extern void pcibios_report_status(u_int status_mask, int warn);
extern void register_isa_ports(unsigned int, unsigned int, unsigned int);
......@@ -255,12 +261,33 @@ static void dc21285_parity_irq(int irq, void *dev_id, struct pt_regs *regs)
add_timer(timer);
}
void __init dc21285_init(struct arm_pci_sysdata *sysdata)
void __init dc21285_setup_resources(struct resource **resource)
{
struct resource *busmem, *busmempf;
busmem = kmalloc(sizeof(*busmem), GFP_KERNEL);
busmempf = kmalloc(sizeof(*busmempf), GFP_KERNEL);
memset(busmem, 0, sizeof(*busmem));
memset(busmempf, 0, sizeof(*busmempf));
busmem->flags = IORESOURCE_MEM;
busmem->name = "Footbridge non-prefetch";
busmempf->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
busmempf->name = "Footbridge prefetch";
allocate_resource(&iomem_resource, busmempf, 0x20000000,
0x80000000, 0xffffffff, 0x20000000, NULL, NULL);
allocate_resource(&iomem_resource, busmem, 0x40000000,
0x80000000, 0xffffffff, 0x40000000, NULL, NULL);
resource[0] = &ioport_resource;
resource[1] = busmem;
resource[2] = busmempf;
}
void __init dc21285_init(void *sysdata)
{
unsigned long cntl;
unsigned int mem_size, mem_mask;
unsigned int pci_cmd = PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE;
int cfn_mode;
mem_size = (unsigned int)high_memory - PAGE_OFFSET;
......@@ -286,26 +313,17 @@ void __init dc21285_init(struct arm_pci_sysdata *sysdata)
"central function" : "addin");
if (cfn_mode) {
static struct resource csrmem, csrio, busmem, busmempf;
struct pci_bus *bus;
static struct resource csrmem, csrio;
csrio.flags = IORESOURCE_IO;
csrio.name = "Footbridge";
csrio.flags = IORESOURCE_IO;
csrio.name = "Footbridge";
csrmem.flags = IORESOURCE_MEM;
csrmem.name = "Footbridge";
busmem.flags = IORESOURCE_MEM;
busmem.name = "Footbridge non-prefetch";
busmempf.flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
busmempf.name = "Footbridge prefetch";
allocate_resource(&ioport_resource, &csrio, 128,
0xff00, 0xffff, 128, NULL, NULL);
allocate_resource(&iomem_resource, &csrmem, 128,
0xf4000000, 0xf8000000, 128, NULL, NULL);
allocate_resource(&iomem_resource, &busmempf, 0x20000000,
0x00000000, 0x80000000, 0x20000000, NULL, NULL);
allocate_resource(&iomem_resource, &busmem, 0x40000000,
0x00000000, 0x80000000, 0x40000000, NULL, NULL);
/*
* Map our SDRAM at a known address in PCI space, just in case
......@@ -313,37 +331,23 @@ void __init dc21285_init(struct arm_pci_sysdata *sysdata)
* necessary, since some VGA cards forcefully use PCI addresses
* in the range 0x000a0000 to 0x000c0000. (eg, S3 cards).
*/
*CSR_PCICACHELINESIZE = 0x00002008;
*CSR_PCICSRBASE = csrmem.start;
*CSR_PCICSRIOBASE = csrio.start;
*CSR_PCISDRAMBASE = __virt_to_bus(PAGE_OFFSET);
*CSR_PCIROMBASE = 0;
*CSR_PCICMD = pci_cmd |
(1 << 31) | (1 << 29) | (1 << 28) | (1 << 24);
bus = pci_scan_bus(0, &dc21285_ops, sysdata);
/*
* bus->resource[0] is the IO resource for this bus
* bus->resource[1] is the mem resource for this bus
* bus->resource[2] is the prefetch mem resource for this bus
*/
bus->resource[1] = &busmem;
bus->resource[2] = &busmempf;
pci_cmd |= sysdata->bus[0].features;
*CSR_PCICMD = PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
PCI_COMMAND_INVALIDATE | PCICMD_ERROR_BITS;
printk("PCI: Fast back to back transfers %sabled\n",
(sysdata->bus[0].features & PCI_COMMAND_FAST_BACK) ?
"en" : "dis");
pci_scan_bus(0, &dc21285_ops, sysdata);
/*
* Clear any existing errors - we aren't
* interested in historical data...
*/
cntl = *CSR_SA110_CNTL & 0xffffde07;
*CSR_SA110_CNTL = cntl | SA110_CNTL_RXSERR;
*CSR_PCICMD = pci_cmd | 1 << 31 | 1 << 29 | 1 << 28 | 1 << 24;
} else {
*CSR_SA110_CNTL = (*CSR_SA110_CNTL & 0xffffde07) |
SA110_CNTL_RXSERR;
*CSR_PCICMD = (*CSR_PCICMD & 0xffff) | PCICMD_ERROR_BITS;
} else if (footbridge_cfn_mode() != 0) {
/*
* If we are not compiled to accept "add-in" mode, then
* we are using a constant virt_to_bus translation which
......
......@@ -155,7 +155,7 @@ static void a5k_floppy_enable_dma(dmach_t channel, dma_t *dma)
}
memcpy((void *)0x1c, fiqhandler_start, fiqhandler_length);
regs.ARM_r9 = dma->buf.length;
regs.ARM_r10 = dma->buf.address;
regs.ARM_r10 = (unsigned long)dma->buf.address;
regs.ARM_fp = FLOPPYDMA_BASE;
set_fiq_regs(&regs);
enable_fiq(dma->dma_irq);
......
......@@ -79,7 +79,7 @@ ENTRY(stext)
* ideal, but in this case, it should ONLY set r0 and r1 to the
* appropriate value.
*/
#if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_INTEGRATOR)
#if defined(CONFIG_ARCH_NETWINDER)
/*
* Compatability cruft for old NetWinder NeTTroms. This
* code is currently scheduled for destruction in 2.5.xx
......@@ -124,8 +124,6 @@ __entry:
* FIXME - No bootloader, so manually set 'r1' with our architecture number.
*/
mov r1, #MACH_TYPE_L7200
#elif defined(CONFIG_ARCH_INTEGRATOR)
mov r1, #MACH_TYPE_INTEGRATOR
#endif
mov r0, #F_BIT | I_BIT | MODE_SVC @ make sure svc mode
......@@ -236,14 +234,16 @@ __create_page_tables:
* nearest megabyte boundary.
*/
add r0, r4, #(TEXTADDR & 0xff000000) >> 18 @ start of kernel
bic r2, r3, #0x00f00000
str r2, [r0] @ PAGE_OFFSET + 0MB
add r0, r0, #(TEXTADDR & 0x00f00000) >> 18
str r3, [r0], #4 @ PAGE_OFFSET + 0MB
str r3, [r0], #4 @ KERNEL + 0MB
add r3, r3, #1 << 20
str r3, [r0], #4 @ PAGE_OFFSET + 1MB
str r3, [r0], #4 @ KERNEL + 1MB
add r3, r3, #1 << 20
str r3, [r0], #4 @ PAGE_OFFSET + 2MB
str r3, [r0], #4 @ KERNEL + 2MB
add r3, r3, #1 << 20
str r3, [r0], #4 @ PAGE_OFFSET + 3MB
str r3, [r0], #4 @ KERNEL + 3MB
/*
* Ensure that the first section of RAM is present.
......
......@@ -216,7 +216,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
irq_exit(cpu, irq);
if (softirq_active(cpu) & softirq_mask(cpu))
if (softirq_pending(cpu))
do_softirq();
return;
......
......@@ -50,13 +50,14 @@ void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
BUG();
}
static void __init oldlatch_init(void)
static int __init oldlatch_init(void)
{
if (machine_is_archimedes()) {
oldlatch_aupdate(0xff, 0xff);
/* Thats no FDC reset...*/
oldlatch_bupdate(0xff, LATCHB_FDCRESET);
}
return 0;
}
__initcall(oldlatch_init);
......
......@@ -129,8 +129,6 @@ plx90x0_init(struct arm_sysdata *sysdata)
static const unsigned long int base = PLX_BASE;
char *what;
unsigned long bar = (unsigned long)virt_to_bus((void *)PAGE_OFFSET);
unsigned int pci_cmd = PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE;
/* Have a sniff around and see which PLX device is present. */
unsigned long id = __raw_readl(base + 0xf0);
......@@ -189,10 +187,4 @@ plx90x0_init(struct arm_sysdata *sysdata)
"system error", NULL);
pci_scan_bus(0, &plx90x0_ops, sysdata);
pci_cmd |= sysdata->bus[0].features;
printk("PCI: Fast back to back transfers %sabled\n",
(sysdata->bus[0].features & PCI_COMMAND_FAST_BACK) ?
"en" : "dis");
}
......@@ -28,9 +28,9 @@
#include <asm/uaccess.h>
#include <asm/ipc.h>
/*
* Constant strings used in inlined functions in header files
*/
extern unsigned long do_mremap(unsigned long addr, unsigned long old_len,
unsigned long new_len, unsigned long flags,
unsigned long new_addr);
/*
* sys_pipe() is the normal C calling standard for creating
......
......@@ -11,6 +11,7 @@
#include <asm/irq.h>
#include <asm/mach/pci.h>
#include <asm/hardware/dec21285.h>
/* cats host-specific stuff */
static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
......@@ -31,7 +32,9 @@ static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
}
struct hw_pci cats_pci __initdata = {
init: dc21285_init,
swizzle: no_swizzle,
map_irq: cats_map_irq,
setup_resources: dc21285_setup_resources,
init: dc21285_init,
mem_offset: DC21285_PCI_MEM,
swizzle: no_swizzle,
map_irq: cats_map_irq,
};
......@@ -11,6 +11,7 @@
#include <asm/irq.h>
#include <asm/mach/pci.h>
#include <asm/hardware/dec21285.h>
static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
......@@ -33,7 +34,9 @@ static int __init ebsa285_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
}
struct hw_pci ebsa285_pci __initdata = {
init: dc21285_init,
swizzle: ebsa285_swizzle,
map_irq: ebsa285_map_irq,
setup_resources: dc21285_setup_resources,
init: dc21285_init,
mem_offset: DC21285_PCI_MEM,
swizzle: ebsa285_swizzle,
map_irq: ebsa285_map_irq,
};
......@@ -11,6 +11,7 @@
#include <asm/irq.h>
#include <asm/mach/pci.h>
#include <asm/hardware/dec21285.h>
/* netwinder host-specific stuff */
static int __init netwinder_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
......@@ -48,7 +49,9 @@ static int __init netwinder_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
}
struct hw_pci netwinder_pci __initdata = {
init: dc21285_init,
swizzle: no_swizzle,
map_irq: netwinder_map_irq,
setup_resources: dc21285_setup_resources,
init: dc21285_init,
mem_offset: DC21285_PCI_MEM,
swizzle: no_swizzle,
map_irq: netwinder_map_irq,
};
......@@ -11,6 +11,7 @@
#include <asm/irq.h>
#include <asm/mach/pci.h>
#include <asm/hardware/dec21285.h>
static int irqmap_personal_server[] __initdata = {
IRQ_IN0, IRQ_IN1, IRQ_IN2, IRQ_IN3, 0, 0, 0,
......@@ -37,7 +38,9 @@ static int __init personal_server_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
}
struct hw_pci personal_server_pci __initdata = {
init: dc21285_init,
swizzle: no_swizzle,
map_irq: personal_server_map_irq,
setup_resources: dc21285_setup_resources,
init: dc21285_init,
mem_offset: DC21285_PCI_MEM,
swizzle: no_swizzle,
map_irq: personal_server_map_irq,
};
......@@ -6,7 +6,7 @@
# To add an entry into this database, please see Documentation/arm/README,
# or contact rmk@arm.linux.org.uk
#
# Last update: Sun Jun 17 00:53:17 2001
# Last update: Wed Jul 4 20:04:11 2001
#
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
#
......@@ -91,12 +91,17 @@ mercury ARCH_MERCURY MERCURY 78
empeg SA1100_EMPEG EMPEG 79
adi_eb ARCH_I80200FCC I80200FCC 80
itt_cpb SA1100_ITT_CPB ITT_CPB 81
sa1110_svc ARCH_SA1110_SVC SA1110_SVC 82
svc SA1100_SVC SVC 82
alpha2 SA1100_ALPHA2 ALPHA2 84
alpha1 SA1100_ALPHA1 ALPHA1 85
netarm ARCH_NETARM NETARM 86
simpad SA1100_SIMPAD SIMPAD 87
pda1 ARCH_PDA1 PDA1 88
lubbock ARCH_LUBBOCK LUBBOCK 89
aniko ARCH_ANIKO ANIKO 90
clep7212 ARCH_CLEP7212 CLEP7212 91
cs89712 ARCH_CS89712 CS89712 92
weararm SA1100_WEARARM WEARARM 93
possio_px SA1100_POSSIO_PX POSSIO_PX 94
# The following are unallocated
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/apm_bios.h>
#include <linux/slab.h>
#include <asm/io.h>
struct dmi_header
......@@ -13,6 +15,7 @@ struct dmi_header
};
#define dmi_printk(x)
//#define dmi_printk(x) printk(x)
static char * __init dmi_string(struct dmi_header *dm, u8 s)
{
......@@ -90,9 +93,254 @@ int __init dmi_iterate(void (*decode)(struct dmi_header *))
}
enum
{
DMI_BIOS_VENDOR,
DMI_BIOS_VERSION,
DMI_BIOS_DATE,
DMI_SYS_VENDOR,
DMI_PRODUCT_NAME,
DMI_PRODUCT_VERSION,
DMI_BOARD_VENDOR,
DMI_BOARD_NAME,
DMI_BOARD_VERSION,
DMI_STRING_MAX
};
static char *dmi_ident[DMI_STRING_MAX];
/*
* Save a DMI string
*/
static void __init dmi_save_ident(struct dmi_header *dm, int slot, int string)
{
char *d = (char*)dm;
char *p = dmi_string(dm, d[string]);
if(p==NULL || *p == 0)
return;
if (dmi_ident[slot])
return;
dmi_ident[slot] = kmalloc(strlen(p)+1, GFP_KERNEL);
if(dmi_ident[slot])
strcpy(dmi_ident[slot], p);
else
printk(KERN_ERR "dmi_save_ident: out of memory.\n");
}
/*
* DMI callbacks for problem boards
*/
struct dmi_strmatch
{
u8 slot;
char *substr;
};
#define NONE 255
struct dmi_blacklist
{
int (*callback)(struct dmi_blacklist *);
char *ident;
struct dmi_strmatch matches[4];
};
#define NO_MATCH { NONE, NULL}
#define MATCH(a,b) { a, b }
/*
* We have problems with IDE DMA on some platforms. In paticular the
* KT7 series. On these it seems the newer BIOS has fixed them. The
* rule needs to be improved to match specific BIOS revisions with
* corruption problems
*/
static __init int disable_ide_dma(struct dmi_blacklist *d)
{
#ifdef CONFIG_BLK_DEV_IDE
extern int noautodma;
if(noautodma == 0)
{
noautodma = 1;
printk(KERN_INFO "%s series board detected. Disabling IDE DMA.\n", d->ident);
}
#endif
return 0;
}
/*
* Some machines require the "reboot=b" commandline option, this quirk makes that automatic.
*/
static __init int set_bios_reboot(struct dmi_blacklist *d)
{
extern int reboot_thru_bios;
if (reboot_thru_bios == 0)
{
reboot_thru_bios = 1;
printk(KERN_INFO "%s series board detected. Selecting BIOS-method for reboots.\n", d->ident);
}
return 0;
}
/*
* Some bioses have a broken protected mode poweroff and need to use realmode
*/
static __init int set_realmode_power_off(struct dmi_blacklist *d)
{
if (apm_info.realmode_power_off == 0)
{
apm_info.realmode_power_off = 1;
printk(KERN_INFO "%s bios detected. Using realmode poweroff only.\n", d->ident);
}
return 0;
}
/*
* Some laptops require interrupts to be enabled during APM calls
*/
static __init int set_apm_ints(struct dmi_blacklist *d)
{
if (apm_info.allow_ints == 0)
{
apm_info.allow_ints = 1;
printk(KERN_INFO "%s machine detected. Enabling interrupts during APM calls.\n", d->ident);
}
return 0;
}
/*
* Some APM bioses corrupt memory or just plain do not work
*/
static __init int apm_is_horked(struct dmi_blacklist *d)
{
if (apm_info.disabled == 0)
{
apm_info.disabled = 1;
printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident);
}
return 0;
}
/*
* Check for clue free BIOS implementations who use
* the following QA technique
*
* [ Write BIOS Code ]<------
* | ^
* < Does it Compile >----N--
* |Y ^
* < Does it Boot Win98 >-N--
* |Y
* [Ship It]
*
* Phoenix A04 08/24/2000 is known bad (Dell Inspiron 5000e)
* Phoenix A07 09/29/2000 is known good (Dell Inspiron 5000)
*/
static __init int broken_apm_power(struct dmi_blacklist *d)
{
apm_info.get_power_status_broken = 1;
printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n");
return 0;
}
/*
* Process the DMI blacklists
*/
/*
* This will be expanded over time to force things like the APM
* interrupt mask settings according to the laptop
*/
static __initdata struct dmi_blacklist dmi_blacklist[]={
#if 0
{ disable_ide_dma, "KT7", { /* Overbroad right now - kill DMA on problem KT7 boards */
MATCH(DMI_PRODUCT_NAME, "KT7-RAID"),
NO_MATCH, NO_MATCH, NO_MATCH
} },
#endif
{ broken_apm_power, "Dell Inspiron 5000e", { /* Handle problems with APM on Inspiron 5000e */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "A04"),
MATCH(DMI_BIOS_DATE, "08/24/2000"), NO_MATCH
} },
{ set_realmode_power_off, "Award Software v4.60 PGMA", { /* broken PM poweroff bios */
MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."),
MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
MATCH(DMI_BIOS_DATE, "134526184"), NO_MATCH
} },
{ set_bios_reboot, "PowerEdge 1300/500", { /* Handle problems with rebooting on Dell 1300's */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/500"),
NO_MATCH, NO_MATCH
} },
{ set_bios_reboot, "PowerEdge 1300/550", { /* Handle problems with rebooting on Dell 1300's */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/550"),
NO_MATCH, NO_MATCH
} },
{ set_apm_ints, "IBM", { /* Allow interrupts during suspend on IBM laptops */
MATCH(DMI_SYS_VENDOR, "IBM"),
NO_MATCH, NO_MATCH, NO_MATCH
} },
{ set_apm_ints, "ASUSTeK", { /* Allow interrupts during APM or the clock goes slow */
MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
MATCH(DMI_PRODUCT_NAME, "L8400K series Notebook PC"),
NO_MATCH, NO_MATCH
} },
{ apm_is_horked, "Trigem Delhi3", { /* APM crashes */
MATCH(DMI_SYS_VENDOR, "TriGem Computer, Inc"),
MATCH(DMI_PRODUCT_NAME, "Delhi3"),
NO_MATCH, NO_MATCH,
} },
{ NULL, }
};
/*
* Walk the blacklist table running matching functions until someone
* returns 1 or we hit the end.
*/
static __init void dmi_check_blacklist(void)
{
struct dmi_blacklist *d;
int i;
d=&dmi_blacklist[0];
while(d->callback)
{
for(i=0;i<4;i++)
{
int s = d->matches[i].slot;
if(s==NONE)
continue;
if(dmi_ident[s] && strstr(dmi_ident[s], d->matches[i].substr))
continue;
/* No match */
goto fail;
}
if(d->callback(d))
return;
fail:
d++;
}
}
/*
* Process a DMI table entry. Right now all we care about are the BIOS
* and machine entries. For 2.4 we should pull the smbus controller info
* and machine entries. For 2.5 we should pull the smbus controller info
* out of here.
*/
......@@ -105,66 +353,47 @@ static void __init dmi_decode(struct dmi_header *dm)
{
case 0:
p=dmi_string(dm,data[4]);
if(*p && *p!=' ')
if(*p)
{
dmi_printk(("BIOS Vendor: %s\n", p));
dmi_save_ident(dm, DMI_BIOS_VENDOR, 4);
dmi_printk(("BIOS Version: %s\n",
dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_BIOS_VERSION, 5);
dmi_printk(("BIOS Release: %s\n",
dmi_string(dm, data[8])));
}
/*
* Check for clue free BIOS implementations who use
* the following QA technique
*
* [ Write BIOS Code ]<------
* | ^
* < Does it Compile >----N--
* |Y ^
* < Does it Boot Win98 >-N--
* |Y
* [Ship It]
*
* Phoenix A04 08/24/2000 is known bad (Dell Inspiron 5000e)
* Phoenix A07 09/29/2000 is known good (Dell Inspiron 5000)
*/
if(strcmp(dmi_string(dm, data[4]), "Phoenix Technologies LTD")==0)
{
if(strcmp(dmi_string(dm, data[5]), "A04")==0
&& strcmp(dmi_string(dm, data[8]), "08/24/2000")==0)
{
apm_info.get_power_status_broken = 1;
printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n");
}
dmi_save_ident(dm, DMI_BIOS_DATE, 8);
}
break;
case 1:
p=dmi_string(dm,data[4]);
if(*p && *p!=' ')
if(*p)
{
dmi_printk(("System Vendor: %s.\n",p));
dmi_save_ident(dm, DMI_SYS_VENDOR, 4);
dmi_printk(("Product Name: %s.\n",
dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_PRODUCT_NAME, 5);
dmi_printk(("Version %s.\n",
dmi_string(dm, data[6])));
dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6);
dmi_printk(("Serial Number %s.\n",
dmi_string(dm, data[7])));
}
break;
case 2:
p=dmi_string(dm,data[4]);
if(*p && *p!=' ')
if(*p)
{
dmi_printk(("Board Vendor: %s.\n",p));
dmi_save_ident(dm, DMI_BOARD_VENDOR, 4);
dmi_printk(("Board Name: %s.\n",
dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_BOARD_NAME, 5);
dmi_printk(("Board Version: %s.\n",
dmi_string(dm, data[6])));
dmi_save_ident(dm, DMI_BOARD_VERSION, 6);
}
break;
case 3:
......@@ -177,7 +406,10 @@ static void __init dmi_decode(struct dmi_header *dm)
static int __init dmi_scan_machine(void)
{
return dmi_iterate(dmi_decode);
int err = dmi_iterate(dmi_decode);
if(err == 0)
dmi_check_blacklist();
return err;
}
module_init(dmi_scan_machine);
......@@ -391,6 +391,38 @@ static int pirq_serverworks_set(struct pci_dev *router, struct pci_dev *dev, int
return 1;
}
/* Support for AMD756 PCI IRQ Routing
* Jhon H. Caicedo <jhcaiced@osso.org.co>
* Jun/21/2001 0.2.0 Release, fixed to use "nybble" functions... (jhcaiced)
* Jun/19/2001 Alpha Release 0.1.0 (jhcaiced)
* The AMD756 pirq rules are nibble-based
* offset 0x56 0-3 PIRQA 4-7 PIRQB
* offset 0x57 0-3 PIRQC 4-7 PIRQD
*/
static int pirq_amd756_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
{
u8 irq;
irq = 0;
if (pirq <= 4)
{
irq = read_config_nybble(router, 0x56, pirq - 1);
}
printk(KERN_INFO "AMD756: dev %04x:%04x, router pirq : %d get irq : %2d\n",
dev->vendor, dev->device, pirq, irq);
return irq;
}
static int pirq_amd756_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
{
printk(KERN_INFO "AMD756: dev %04x:%04x, router pirq : %d SET irq : %2d\n",
dev->vendor, dev->device, pirq, irq);
if (pirq <= 4)
{
write_config_nybble(router, 0x56, pirq - 1, irq);
}
return 1;
}
#ifdef CONFIG_PCI_BIOS
static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
......@@ -426,6 +458,8 @@ static struct irq_router pirq_routers[] = {
{ "VLSI 82C534", PCI_VENDOR_ID_VLSI, PCI_DEVICE_ID_VLSI_82C534, pirq_vlsi_get, pirq_vlsi_set },
{ "ServerWorks", PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4,
pirq_serverworks_get, pirq_serverworks_set },
{ "AMD756 VIPER", PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_740B,
pirq_amd756_get, pirq_amd756_set },
{ "default", 0, 0, NULL, NULL }
};
......
......@@ -152,7 +152,7 @@ __setup("idle=", idle_setup);
static long no_idt[2];
static int reboot_mode;
static int reboot_thru_bios;
int reboot_thru_bios;
static int __init reboot_setup(char *str)
{
......
......@@ -1438,8 +1438,16 @@ static void __init init_cyrix(struct cpuinfo_x86 *c)
break;
case 5: /* 6x86MX/M II */
if (dir1 > 7) dir0_msn++; /* M II */
else c->coma_bug = 1; /* 6x86MX, it has the bug. */
if (dir1 > 7)
{
dir0_msn++; /* M II */
/* Enable MMX extensions (App note 108) */
setCx86(CX86_CCR7, getCx86(CX86_CCR7)|1);
}
else
{
c->coma_bug = 1; /* 6x86MX, it has the bug. */
}
tmp = (!(dir0_lsn & 7) || dir0_lsn & 1) ? 2 : 0;
Cx86_cb[tmp] = cyrix_model_mult2[dir0_lsn & 7];
p = Cx86_cb+tmp;
......
......@@ -370,7 +370,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
/* This is the X/Open sanctioned signal stack switching. */
if (ka->sa.sa_flags & SA_ONSTACK) {
if (! on_sig_stack(esp))
if (sas_ss_flags(esp) == 0)
esp = current->sas_ss_sp + current->sas_ss_size;
}
......
......@@ -89,10 +89,8 @@ ENTRY(FPU_u_div)
movl REGB,%ebx
movl DEST,%edi
movw EXP(%esi),%dx
movw EXP(%ebx),%ax
.byte 0x0f,0xbf,0xc0 /* movsx %ax,%eax */
.byte 0x0f,0xbf,0xd2 /* movsx %dx,%edx */
movswl EXP(%esi),%edx
movswl EXP(%ebx),%eax
subl %eax,%edx
addl EXP_BIAS,%edx
......
......@@ -365,6 +365,11 @@ static void blk_init_free_list(request_queue_t *q)
*/
for (i = 0; i < queue_nr_requests; i++) {
rq = kmem_cache_alloc(request_cachep, SLAB_KERNEL);
if (rq == NULL) {
/* We'll get a `leaked requests' message from blk_cleanup_queue */
printk(KERN_EMERG "blk_init_free_list: error allocating requests\n");
break;
}
memset(rq, 0, sizeof(struct request));
rq->rq_status = RQ_INACTIVE;
list_add(&rq->table, &q->request_freelist[i & 1]);
......
......@@ -466,7 +466,7 @@ MODULE_PARM_DESC(rd_blocksize, "Blocksize of each RAM disk in bytes.");
* romfs
* gzip
*/
int __init
static int __init
identify_ramdisk_image(kdev_t device, struct file *fp, int start_block)
{
const int size = 512;
......
......@@ -42,8 +42,8 @@ if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
dep_tristate ' Multi-Tech multiport card support (EXPERIMENTAL)' CONFIG_ISI m
fi
dep_tristate ' Microgate SyncLink card support' CONFIG_SYNCLINK m
dep_tristate ' HDLC line discipline support' CONFIG_N_HDLC m
tristate ' Microgate SyncLink card support' CONFIG_SYNCLINK
tristate ' HDLC line discipline support' CONFIG_N_HDLC
tristate ' SDL RISCom/8 card support' CONFIG_RISCOM8
tristate ' Specialix IO8+ card support' CONFIG_SPECIALIX
if [ "$CONFIG_SPECIALIX" != "n" ]; then
......@@ -60,6 +60,9 @@ if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
tristate ' Stallion EC8/64, ONboard, Brumby support' CONFIG_ISTALLION
fi
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_ZORRO" = "y" ]; then
tristate 'Commodore A2232 serial support (EXPERIMENTAL)' CONFIG_A2232
fi
if [ "$CONFIG_FOOTBRIDGE" = "y" ]; then
bool 'DC21285 serial port support' CONFIG_SERIAL_21285
if [ "$CONFIG_SERIAL_21285" = "y" ]; then
......@@ -135,6 +138,7 @@ if [ "$CONFIG_WATCHDOG" != "n" ]; then
tristate ' Acquire SBC Watchdog Timer' CONFIG_ACQUIRE_WDT
tristate ' Advantech SBC Watchdog Timer' CONFIG_ADVANTECH_WDT
tristate ' SBC-60XX Watchdog Timer' CONFIG_60XX_WDT
tristate ' W83877F (EMACS) Watchdog Timer' CONFIG_W83877F_WDT
tristate ' Mixcom Watchdog' CONFIG_MIXCOMWD
tristate ' Intel i810 TCO timer / Watchdog' CONFIG_I810_TCO
if [ "$CONFIG_FOOTBRIDGE" = "y" ]; then
......@@ -169,6 +173,9 @@ fi
tristate 'Double Talk PC internal speech card support' CONFIG_DTLK
tristate 'Siemens R3964 line discipline' CONFIG_R3964
tristate 'Applicom intelligent fieldbus card support' CONFIG_APPLICOM
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Sony Vaio Programmable I/O Control Device support' CONFIG_SONYPI $CONFIG_PCI
fi
mainmenu_option next_comment
comment 'Ftape, the floppy tape device driver'
......
......@@ -23,7 +23,7 @@ obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o raw.o pty.o misc.o random.o
export-objs := busmouse.o console.o keyboard.o sysrq.o \
misc.o pty.o random.o selection.o serial.o \
tty_io.o
sonypi.o tty_io.o tty_ioctl.o
mod-subdirs := joystick ftape drm pcmcia
......@@ -48,6 +48,20 @@ ifeq ($(ARCH),s390x)
SERIAL =
endif
ifeq ($(ARCH),s390)
KEYMAP =
KEYBD =
CONSOLE =
SERIAL =
endif
ifeq ($(ARCH),s390x)
KEYMAP =
KEYBD =
CONSOLE =
SERIAL =
endif
ifeq ($(ARCH),m68k)
ifdef CONFIG_AMIGA
KEYBD = amikeyb.o
......@@ -139,6 +153,7 @@ obj-$(CONFIG_SYNCLINK) += synclink.o
obj-$(CONFIG_N_HDLC) += n_hdlc.o
obj-$(CONFIG_SPECIALIX) += specialix.o
obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o
obj-$(CONFIG_SX) += sx.o generic_serial.o
obj-$(CONFIG_RIO) += rio/rio.o generic_serial.o
obj-$(CONFIG_SH_SCI) += sh-sci.o generic_serial.o
......@@ -162,6 +177,7 @@ obj-$(CONFIG_BUSMOUSE) += busmouse.o
obj-$(CONFIG_DTLK) += dtlk.o
obj-$(CONFIG_R3964) += n_r3964.o
obj-$(CONFIG_APPLICOM) += applicom.o
obj-$(CONFIG_SONYPI) += sonypi.o
obj-$(CONFIG_MS_BUSMOUSE) += msbusmouse.o
obj-$(CONFIG_82C710_MOUSE) += qpmouse.o
obj-$(CONFIG_AMIGAMOUSE) += amigamouse.o
......
......@@ -128,7 +128,7 @@ static ssize_t dtlk_read(struct file *file, char *buf,
{
unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev);
char ch;
int retval, i = 0, retries;
int i = 0, retries;
/* Can't seek (pread) on the DoubleTalk. */
if (ppos != &file->f_pos)
......@@ -144,8 +144,8 @@ static ssize_t dtlk_read(struct file *file, char *buf,
while (i < count && dtlk_readable()) {
ch = dtlk_read_lpc();
/* printk("dtlk_read() reads 0x%02x\n", ch); */
if ((retval = put_user(ch, buf++)))
return retval;
if (put_user(ch, buf++))
return -EFAULT;
i++;
}
if (i)
......@@ -163,7 +163,7 @@ static ssize_t dtlk_read(struct file *file, char *buf,
static ssize_t dtlk_write(struct file *file, const char *buf,
size_t count, loff_t * ppos)
{
int i = 0, retries = 0, err, ch;
int i = 0, retries = 0, ch;
TRACE_TEXT("(dtlk_write");
#ifdef TRACING
......@@ -171,7 +171,8 @@ static ssize_t dtlk_write(struct file *file, const char *buf,
{
int i, ch;
for (i = 0; i < count; i++) {
err = get_user(ch, buf + i);
if (get_user(ch, buf + i))
return -EFAULT;
if (' ' <= ch && ch <= '~')
printk("%c", ch);
else
......@@ -189,7 +190,7 @@ static ssize_t dtlk_write(struct file *file, const char *buf,
return -EINVAL;
while (1) {
while (i < count && (err = get_user(ch, buf)) == 0 &&
while (i < count && !get_user(ch, buf) &&
(ch == DTLK_CLEAR || dtlk_writeable())) {
dtlk_write_tts(ch);
buf++;
......@@ -279,7 +280,6 @@ static int dtlk_ioctl(struct inode *inode,
unsigned long arg)
{
struct dtlk_settings *sp;
int err;
char portval;
TRACE_TEXT(" dtlk_ioctl");
......@@ -287,9 +287,8 @@ static int dtlk_ioctl(struct inode *inode,
case DTLK_INTERROGATE:
sp = dtlk_interrogate();
err = copy_to_user((char *) arg, (char *) sp,
sizeof(struct dtlk_settings));
if (err)
if (copy_to_user((char *) arg, (char *) sp,
sizeof(struct dtlk_settings)))
return -EINVAL;
return 0;
......
......@@ -14,6 +14,8 @@
* after patches by harald to irq code.
* [09-JAN-99] triemer minor fix for schedule - due to removal of timeout
* field from "current" - somewhere between 2.1.121 and 2.1.131
Qua Jun 27 15:02:26 BRT 2001
* [27-JUN-2001] Arnaldo Carvalho de Melo <acme@conectiva.com.br> - cleanups
*
* Parts (C) 1999 David Airlie, airlied@linux.ie
* [07-SEP-99] Bugfixes
......@@ -835,7 +837,7 @@ static int get_serial_info (struct dz_serial *info, struct serial_struct *retinf
tmp.close_delay = info->close_delay;
tmp.closing_wait = info->closing_wait;
return copy_to_user (retinfo, &tmp, sizeof(*retinfo));
return copy_to_user(retinfo, &tmp, sizeof(*retinfo)) ? -EFAULT : 0;
}
static int set_serial_info (struct dz_serial *info, struct serial_struct *new_info)
......@@ -919,9 +921,9 @@ static void send_break (struct dz_serial *info, int duration)
restore_flags (flags);
}
static int dz_ioctl (struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
static int dz_ioctl (struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg)
{
int error;
struct dz_serial * info = (struct dz_serial *)tty->driver_data;
int retval;
......@@ -951,41 +953,26 @@ static int dz_ioctl (struct tty_struct *tty, struct file *file, unsigned int cmd
return 0;
case TIOCGSOFTCAR:
error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(long));
if (error)
return error;
put_user (C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg);
return 0;
return put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg);
case TIOCSSOFTCAR:
error = get_user (arg, (unsigned long *)arg);
if (error)
return error;
if (get_user (arg, (unsigned long *)arg))
return -EFAULT;
tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0));
return 0;
case TIOCGSERIAL:
error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(struct serial_struct));
if (error)
return error;
return get_serial_info (info, (struct serial_struct *)arg);
case TIOCSSERIAL:
return set_serial_info (info, (struct serial_struct *) arg);
case TIOCSERGETLSR: /* Get line status register */
error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(unsigned int));
if (error)
return error;
else
return get_lsr_info (info, (unsigned int *)arg);
return get_lsr_info (info, (unsigned int *)arg);
case TIOCSERGSTRUCT:
error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(struct dz_serial));
if (error)
return error;
copy_to_user((struct dz_serial *)arg, info, sizeof(struct dz_serial));
return 0;
return copy_to_user((struct dz_serial *)arg, info,
sizeof(struct dz_serial)) ? -EFAULT : 0;
default:
return -ENOIOCTLCMD;
......@@ -1436,7 +1423,7 @@ static void dz_console_put_char (unsigned char ch)
* dz_console_print ()
*
* dz_console_print is registered for printk.
* The console_lock must be held when we get here.
* The console must be locked when we get here.
* -------------------------------------------------------------------
*/
static void dz_console_print (struct console *cons,
......
......@@ -344,7 +344,7 @@ static int gs_wait_tx_flushed (void * ptr, int timeout)
struct gs_port *port = ptr;
long end_jiffies;
int jiffies_to_transmit, charsleft = 0, rv = 0;
int to, rcib;
int rcib;
func_enter();
......@@ -368,6 +368,7 @@ static int gs_wait_tx_flushed (void * ptr, int timeout)
return rv;
}
/* stop trying: now + twice the time it would normally take + seconds */
if (timeout == 0) timeout = MAX_SCHEDULE_TIMEOUT;
end_jiffies = jiffies;
if (timeout != MAX_SCHEDULE_TIMEOUT)
end_jiffies += port->baud?(2 * rcib * 10 * HZ / port->baud):0;
......@@ -376,11 +377,9 @@ static int gs_wait_tx_flushed (void * ptr, int timeout)
gs_dprintk (GS_DEBUG_FLUSH, "now=%lx, end=%lx (%ld).\n",
jiffies, end_jiffies, end_jiffies-jiffies);
to = 100;
/* the expression is actually jiffies < end_jiffies, but that won't
work around the wraparound. Tricky eh? */
while (to-- &&
(charsleft = gs_real_chars_in_buffer (port->tty)) &&
while ((charsleft = gs_real_chars_in_buffer (port->tty)) &&
time_after (end_jiffies, jiffies)) {
/* Units check:
chars * (bits/char) * (jiffies /sec) / (bits/sec) = jiffies!
......@@ -1059,6 +1058,19 @@ void gs_getserial(struct gs_port *port, struct serial_struct *sp)
copy_to_user(sp, &sio, sizeof(struct serial_struct));
}
void gs_got_break(struct gs_port *port)
{
if (port->flags & ASYNC_SAK) {
do_SAK (port->tty);
}
*(port->tty->flip.flag_buf_ptr) = TTY_BREAK;
port->tty->flip.flag_buf_ptr++;
port->tty->flip.char_buf_ptr++;
port->tty->flip.count++;
}
EXPORT_SYMBOL(gs_put_char);
EXPORT_SYMBOL(gs_write);
EXPORT_SYMBOL(gs_write_room);
......@@ -1075,4 +1087,4 @@ EXPORT_SYMBOL(gs_set_termios);
EXPORT_SYMBOL(gs_init_port);
EXPORT_SYMBOL(gs_setserial);
EXPORT_SYMBOL(gs_getserial);
EXPORT_SYMBOL(gs_got_break);
This diff is collapsed.
......@@ -139,7 +139,7 @@ static UCHAR ct79[] = { 2, BYP, 0x4F,0 }; // XMIT_NOW
//static UCHAR ct86[]={ 2, BTH, 0x56,0 }; // RCV_ENABLE
static UCHAR ct87[] = { 1, BYP, 0x57 }; // HW_TEST
//static UCHAR ct88[]={ 3, BTH, 0x58,0,0 }; // RCV_THRESHOLD
static UCHAR ct89[]={ 1, BYP, 0x59 }; // DSS_NOW
//static UCHAR ct89[]={ 1, BYP, 0x59 }; // DSS_NOW
//static UCHAR ct90[]={ 3, BYP, 0x5A,0,0 }; // Set SILO
//static UCHAR ct91[]={ 2, BYP, 0x5B,0 }; // timed break
......
......@@ -124,6 +124,7 @@ static int zf_action = GEN_RESET;
static int zf_is_open = 0;
static int zf_expect_close = 0;
static spinlock_t zf_lock;
static spinlock_t zf_port_lock;
static struct timer_list zf_timer;
static unsigned long next_heartbeat = 0;
......@@ -140,7 +141,7 @@ static unsigned long next_heartbeat = 0;
#ifndef ZF_DEBUG
# define dprintk(format, args...)
#else
# define dprintk(format, args...) printk(KERN_DEBUG PFX ":" __FUNCTION__ ":%d: " format, __LINE__ , ## args)
# define dprintk(format, args...) printk(KERN_DEBUG PFX; ":" __FUNCTION__ ":%d: " format, __LINE__ , ## args)
#endif
......@@ -175,7 +176,7 @@ static inline void zf_set_control(unsigned short new)
* Just get current counter value
*/
inline unsigned short zf_get_timer(unsigned char n)
static inline unsigned short zf_get_timer(unsigned char n)
{
switch(n){
case WD1:
......@@ -209,17 +210,20 @@ static inline void zf_set_timer(unsigned short new, unsigned char n)
static void zf_timer_off(void)
{
unsigned int ctrl_reg = 0;
unsigned long flags;
/* stop internal ping */
del_timer(&zf_timer);
del_timer_sync(&zf_timer);
spin_lock_irqsave(&zf_port_lock, flags);
/* stop watchdog timer */
ctrl_reg = zf_get_control();
ctrl_reg |= (ENABLE_WD1|ENABLE_WD2); /* disable wd1 and wd2 */
ctrl_reg &= ~(ENABLE_WD1|ENABLE_WD2);
zf_set_control(ctrl_reg);
spin_unlock_irqrestore(&zf_port_lock, flags);
printk(PFX ": Watchdog timer is now disabled\n");
printk(KERN_INFO PFX ": Watchdog timer is now disabled\n");
}
......@@ -229,6 +233,9 @@ static void zf_timer_off(void)
static void zf_timer_on(void)
{
unsigned int ctrl_reg = 0;
unsigned long flags;
spin_lock_irqsave(&zf_port_lock, flags);
zf_writeb(PULSE_LEN, 0xff);
......@@ -246,15 +253,17 @@ static void zf_timer_on(void)
ctrl_reg = zf_get_control();
ctrl_reg |= (ENABLE_WD1|zf_action);
zf_set_control(ctrl_reg);
spin_unlock_irqrestore(&zf_port_lock, flags);
printk(PFX ": Watchdog timer is now enabled\n");
printk(KERN_INFO PFX ": Watchdog timer is now enabled\n");
}
static void zf_ping(unsigned long data)
{
unsigned int ctrl_reg = 0;
unsigned long flags;
zf_writeb(COUNTER_2, 0xff);
if(time_before(jiffies, next_heartbeat)){
......@@ -265,6 +274,8 @@ static void zf_ping(unsigned long data)
* reset event is activated by transition from 0 to 1 on
* RESET_WD1 bit and we assume that it is already zero...
*/
spin_lock_irqsave(&zf_port_lock, flags);
ctrl_reg = zf_get_control();
ctrl_reg |= RESET_WD1;
zf_set_control(ctrl_reg);
......@@ -272,11 +283,12 @@ static void zf_ping(unsigned long data)
/* ...and nothing changes until here */
ctrl_reg &= ~(RESET_WD1);
zf_set_control(ctrl_reg);
spin_unlock_irqrestore(&zf_port_lock, flags);
zf_timer.expires = jiffies + ZF_HW_TIMEO;
add_timer(&zf_timer);
}else{
printk(PFX ": I will reset your machine\n");
printk(KERN_CRIT PFX ": I will reset your machine\n");
}
}
......@@ -396,7 +408,7 @@ static int zf_close(struct inode *inode, struct file *file)
zf_timer_off();
} else {
del_timer(&zf_timer);
printk(PFX ": device file closed unexpectedly. Will not stop the WDT!\n");
printk(KERN_ERR PFX ": device file closed unexpectedly. Will not stop the WDT!\n");
}
spin_lock(&zf_lock);
......@@ -427,9 +439,7 @@ static int zf_notify_sys(struct notifier_block *this, unsigned long code,
static struct file_operations zf_fops = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,34)
owner: THIS_MODULE,
#endif
read: zf_read,
write: zf_write,
ioctl: zf_ioctl,
......@@ -458,19 +468,19 @@ static void __init zf_show_action(int act)
{
char *str[] = { "RESET", "SMI", "NMI", "SCI" };
printk(PFX ": Watchdog using action = %s\n", str[act]);
printk(KERN_INFO PFX ": Watchdog using action = %s\n", str[act]);
}
int __init zf_init(void)
static int __init zf_init(void)
{
int ret;
printk(PFX ": MachZ ZF-Logic Watchdog driver initializing.\n");
printk(KERN_INFO PFX ": MachZ ZF-Logic Watchdog driver initializing.\n");
ret = zf_get_ZFL_version();
printk("%#x\n", ret);
if((!ret) || (ret != 0xffff)){
printk(PFX ": no ZF-Logic found\n");
printk(KERN_WARNING PFX ": no ZF-Logic found\n");
return -ENODEV;
}
......@@ -482,6 +492,7 @@ int __init zf_init(void)
zf_show_action(action);
spin_lock_init(&zf_lock);
spin_lock_init(&zf_port_lock);
ret = misc_register(&zf_miscdev);
if (ret){
......@@ -490,23 +501,13 @@ int __init zf_init(void)
goto out;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,3)
if(check_region(ZF_IOBASE, 3)){
#else
if(!request_region(ZF_IOBASE, 3, "MachZ ZFL WDT")){
#endif
printk(KERN_ERR "cannot reserve I/O ports at %d\n",
ZF_IOBASE);
ret = -EBUSY;
goto no_region;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,3)
request_region(ZF_IOBASE, 3, "MachZ ZFL WDT");
#define __exit
#endif
ret = register_reboot_notifier(&zf_notifier);
if(ret){
printk(KERN_ERR "can't register reboot notifier (err=%d)\n",
......
......@@ -2916,6 +2916,8 @@ static int moxaload320b(int cardno, unsigned char * tmp, int len)
unsigned long baseAddr;
int i;
if(len > sizeof(moxaBuff))
return -EINVAL;
if(copy_from_user(moxaBuff, tmp, len))
return -EFAULT;
baseAddr = moxaBaseAddr[cardno];
......
......@@ -16,11 +16,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <asm/hardirq.h>
#define disable(oldspl) save_flags (oldspl)
#define restore(oldspl) restore_flags (oldspl)
#define sysbrk(x) kmalloc ((x), GFP_KERNEL)
#define sysbrk(x) kmalloc ((x),in_interrupt()? GFP_ATOMIC : GFP_KERNEL)
#define sysfree(p,size) kfree ((p))
#define WBYTE(p,v) writeb(v, &p)
......
......@@ -58,6 +58,7 @@
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/miscdevice.h>
#include <linux/init.h>
#include <linux/compatmac.h>
#include <linux/generic_serial.h>
......@@ -165,7 +166,7 @@ RIOConf =
/* startuptime */ HZ*2, /* how long to wait for card to run */
/* slowcook */ 0, /* TRUE -> always use line disc. */
/* intrpolltime */ 1, /* The frequency of OUR polls */
/* breakinterval */ 25, /* x10 mS */
/* breakinterval */ 25, /* x10 mS XXX: units seem to be 1ms not 10! -- REW*/
/* timer */ 10, /* mS */
/* RtaLoadBase */ 0x7000,
/* HostLoadBase */ 0x7C00,
......@@ -203,11 +204,8 @@ static int rio_fw_ioctl (struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
static int rio_init_drivers(void);
void my_hd (void *addr, int len);
static struct tty_driver rio_driver, rio_callout_driver;
static struct tty_driver rio_driver2, rio_callout_driver2;
......@@ -248,14 +246,12 @@ int rio_probe_addrs[]= {0xc0000, 0xd0000, 0xe0000};
long rio_irqmask = -1;
#ifndef TWO_ZERO
#ifdef MODULE
MODULE_AUTHOR("Rogier Wolff <R.E.Wolff@bitwizard.nl>, Patrick van de Lageweg <patrick@bitwizard.nl>");
MODULE_DESCRIPTION("RIO driver");
MODULE_PARM(rio_poll, "i");
MODULE_PARM(rio_debug, "i");
MODULE_PARM(rio_irqmask, "i");
#endif
#endif
static struct real_driver rio_real_driver = {
rio_disable_tx_interrupts,
......@@ -383,8 +379,8 @@ int rio_minor (kdev_t device)
int rio_ismodem (kdev_t device)
{
return (MAJOR (device) != RIO_NORMAL_MAJOR0) &&
(MAJOR (device) != RIO_NORMAL_MAJOR1);
return (MAJOR (device) == RIO_NORMAL_MAJOR0) ||
(MAJOR (device) == RIO_NORMAL_MAJOR1);
}
......@@ -455,7 +451,6 @@ static void rio_interrupt (int irq, void *ptr, struct pt_regs *regs)
func_enter ();
HostP = (struct Host*)ptr; /* &p->RIOHosts[(long)ptr]; */
rio_dprintk (RIO_DEBUG_IFLOW, "rio: enter rio_interrupt (%d/%d)\n",
irq, HostP->Ivec);
......@@ -624,8 +619,12 @@ static int rio_chars_in_buffer (void * ptr)
/* Nothing special here... */
static void rio_shutdown_port (void * ptr)
{
struct Port *PortP;
func_enter();
PortP = (struct Port *)ptr;
PortP->gs.tty = NULL;
#if 0
port->gs.flags &= ~ GS_ACTIVE;
if (!port->gs.tty) {
......@@ -654,8 +653,14 @@ static void rio_shutdown_port (void * ptr)
exit minicom. I expect an "oops". -- REW */
static void rio_hungup (void *ptr)
{
func_enter ();
struct Port *PortP;
func_enter();
PortP = (struct Port *)ptr;
PortP->gs.tty = NULL;
rio_dec_mod_count ();
func_exit ();
}
......@@ -679,9 +684,8 @@ static void rio_close (void *ptr)
PortP->gs.count = 0;
}
PortP->gs.tty = NULL;
rio_dec_mod_count ();
func_exit ();
}
......@@ -700,24 +704,28 @@ static int rio_fw_ioctl (struct inode *inode, struct file *filp,
return rc;
}
extern int RIOShortCommand(struct rio_info *p, struct Port *PortP,
int command, int len, int arg);
static int rio_ioctl (struct tty_struct * tty, struct file * filp,
unsigned int cmd, unsigned long arg)
{
#if 0
int rc;
struct rio_port *port = tty->driver_data;
struct Port *PortP;
int ival;
/* func_enter2(); */
func_enter();
PortP = (struct Port *)tty->driver_data;
rc = 0;
switch (cmd) {
#if 0
case TIOCGSOFTCAR:
rc = Put_user(((tty->termios->c_cflag & CLOCAL) ? 1 : 0),
(unsigned int *) arg);
break;
#endif
case TIOCSSOFTCAR:
if ((rc = verify_area(VERIFY_READ, (void *) arg,
sizeof(int))) == 0) {
......@@ -730,13 +738,39 @@ static int rio_ioctl (struct tty_struct * tty, struct file * filp,
case TIOCGSERIAL:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg,
sizeof(struct serial_struct))) == 0)
gs_getserial(&port->gs, (struct serial_struct *) arg);
gs_getserial(&PortP->gs, (struct serial_struct *) arg);
break;
case TCSBRK:
if ( PortP->State & RIO_DELETED ) {
rio_dprintk (RIO_DEBUG_TTY, "BREAK on deleted RTA\n");
rc = -EIO;
} else {
if (RIOShortCommand(p, PortP, SBREAK, 2, 250) == RIO_FAIL) {
rio_dprintk (RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n");
rc = -EIO;
}
}
break;
case TCSBRKP:
if ( PortP->State & RIO_DELETED ) {
rio_dprintk (RIO_DEBUG_TTY, "BREAK on deleted RTA\n");
rc = -EIO;
} else {
int l;
l = arg?arg*100:250;
if (l > 255) l = 255;
if (RIOShortCommand(p, PortP, SBREAK, 2, arg?arg*100:250) == RIO_FAIL) {
rio_dprintk (RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n");
rc = -EIO;
}
}
break;
case TIOCSSERIAL:
if ((rc = verify_area(VERIFY_READ, (void *) arg,
sizeof(struct serial_struct))) == 0)
rc = gs_setserial(&port->gs, (struct serial_struct *) arg);
rc = gs_setserial(&PortP->gs, (struct serial_struct *) arg);
break;
#if 0
case TIOCMGET:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg,
sizeof(unsigned int))) == 0) {
......@@ -768,17 +802,13 @@ static int rio_ioctl (struct tty_struct * tty, struct file * filp,
((ival & TIOCM_RTS) ? 1 : 0));
}
break;
#endif
default:
rc = -ENOIOCTLCMD;
break;
}
/* func_exit(); */
func_exit();
return rc;
#else
return -ENOIOCTLCMD;
#endif
}
......@@ -1029,17 +1059,15 @@ static int rio_init_datastructures (void)
free4:kfree (rio_termios);
free3:kfree (p->RIOPortp);
free2:kfree (p->RIOHosts);
free1:kfree (p);
free0:
if (p) {
rio_dprintk (RIO_DEBUG_INIT, "Not enough memory! %p %p %p %p %p\n",
free1:
rio_dprintk (RIO_DEBUG_INIT, "Not enough memory! %p %p %p %p %p\n",
p, p->RIOHosts, p->RIOPortp, rio_termios, rio_termios);
}
kfree(p);
free0:
return -ENOMEM;
}
#ifdef MODULE
static void rio_release_drivers(void)
static void __exit rio_release_drivers(void)
{
func_enter();
tty_unregister_driver (&rio_callout_driver2);
......@@ -1048,7 +1076,6 @@ static void rio_release_drivers(void)
tty_unregister_driver (&rio_driver);
func_exit();
}
#endif
#ifdef TWO_ZERO
#define PDEV unsigned char pci_bus, unsigned pci_fun
......@@ -1101,11 +1128,7 @@ void fix_rio_pci (PDEV)
#endif
#ifdef MODULE
#define rio_init init_module
#endif
int rio_init(void)
static int __init rio_init(void)
{
int found = 0;
int i;
......@@ -1255,6 +1278,7 @@ int rio_init(void)
hp->Type = RIO_PCI;
hp->Copy = rio_pcicopy;
hp->Mode = RIO_PCI_BOOT_FROM_RAM;
hp->HostLock = SPIN_LOCK_UNLOCKED;
rio_dprintk (RIO_DEBUG_PROBE, "Ivec: %x\n", hp->Ivec);
rio_dprintk (RIO_DEBUG_PROBE, "Mode: %x\n", hp->Mode);
......@@ -1310,6 +1334,7 @@ int rio_init(void)
* Moreover, the ISA card will work with the
* special PCI copy anyway. -- REW */
hp->Mode = 0;
hp->HostLock = SPIN_LOCK_UNLOCKED;
vpdp = get_VPD_PROM (hp);
rio_dprintk (RIO_DEBUG_PROBE, "Got VPD ROM\n");
......@@ -1388,8 +1413,7 @@ int rio_init(void)
}
#ifdef MODULE
void cleanup_module(void)
static void __exit rio_exit (void)
{
int i;
struct Host *hp;
......@@ -1424,9 +1448,9 @@ void cleanup_module(void)
func_exit();
}
#endif
module_init(rio_init);
module_exit(rio_exit);
/*
* Anybody who knows why this doesn't work for me, please tell me -- REW.
......
......@@ -95,28 +95,27 @@ void rio_inc_mod_count (void);
#if 1
#define rio_spin_lock_irqsave(sem, flags) do { \
rio_dprintk (RIO_DEBUG_SPINLOCK, "spinlockirqsave: %p %s:%d\n", \
sem, __FILE__, __LINE__);\
spin_lock_irqsave(sem, flags);\
} while (0)
sem, __FILE__, __LINE__);\
spin_lock_irqsave(sem, flags);\
} while (0)
#define rio_spin_unlock_irqrestore(sem, flags) do { \
rio_dprintk (RIO_DEBUG_SPINLOCK, "spinunlockirqrestore: %p %s:%d\n",\
sem, __FILE__, __LINE__);\
spin_unlock_irqrestore(sem, flags);\
} while (0)
sem, __FILE__, __LINE__);\
spin_unlock_irqrestore(sem, flags);\
} while (0)
#define rio_spin_lock(sem) do { \
rio_dprintk (RIO_DEBUG_SPINLOCK, "spinlock: %p %s:%d\n",\
sem, __FILE__, __LINE__);\
spin_lock(sem);\
} while (0)
sem, __FILE__, __LINE__);\
spin_lock(sem);\
} while (0)
#define rio_spin_unlock(sem) do { \
rio_dprintk (RIO_DEBUG_SPINLOCK, "spinunlock: %p %s:%d\n",\
sem, __FILE__, __LINE__);\
spin_unlock(sem);\
} while (0)
sem, __FILE__, __LINE__);\
spin_unlock(sem);\
} while (0)
#else
#define rio_spin_lock_irqsave(sem, flags) \
spin_lock_irqsave(sem, flags)
......@@ -165,7 +164,7 @@ static inline void *rio_memcpy_fromio (void *dest, void *source, int n)
#define rio_memcpy_fromio memcpy_fromio
#endif
#define DEBUG
#define DEBUG 1
/*
......
......@@ -38,6 +38,7 @@ static char *_rioboot_c_sccs_ = "@(#)rioboot.c 1.3";
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/string.h>
......
......@@ -474,17 +474,18 @@ PKT *PacketP;
rio_spin_lock_irqsave(&PortP->portSem, flags);
switch( RBYTE(PktCmdP->Command) ) {
case BREAK_RECEIVED:
rio_dprintk (RIO_DEBUG_CMD, "Received a break!\n");
rio_dprintk (RIO_DEBUG_CMD, "Received a break!\n");
/* If the current line disc. is not multi-threading and
the current processor is not the default, reset rup_intr
and return FALSE to ensure that the command packet is
not freed. */
/* Call tmgr HANGUP HERE */
/* Fix this later when every thing works !!!! RAMRAJ */
gs_got_break (PortP);
break;
case COMPLETE:
rio_dprintk (RIO_DEBUG_CMD, "Command complete on phb %d host %d\n",
rio_dprintk (RIO_DEBUG_CMD, "Command complete on phb %d host %d\n",
RBYTE(PktCmdP->PhbNum), HostP-p->RIOHosts);
subCommand = 1;
switch (RBYTE(PktCmdP->SubCommand)) {
......@@ -549,6 +550,8 @@ PKT *PacketP;
*/
if (PortP->gs.tty == NULL)
break;
if (PortP->gs.tty->termios == NULL)
break;
if (!(PortP->gs.tty->termios->c_cflag & CLOCAL) &&
((PortP->State & (RIO_MOPEN|RIO_WOPEN)))) {
......@@ -623,7 +626,8 @@ RIOGetCmdBlk()
struct CmdBlk *CmdBlkP;
CmdBlkP = (struct CmdBlk *)sysbrk(sizeof(struct CmdBlk));
bzero(CmdBlkP, sizeof(struct CmdBlk));
if (CmdBlkP)
bzero(CmdBlkP, sizeof(struct CmdBlk));
return CmdBlkP;
}
......
......@@ -33,12 +33,13 @@
#ifndef __riodrvr_h
#define __riodrvr_h
#include <asm/param.h> /* for HZ */
#ifdef SCCS_LABELS
static char *_riodrvr_h_sccs_ = "@(#)riodrvr.h 1.3";
#endif
#define MEMDUMP_SIZE 32
#define HZ 100
#define MOD_DISABLE (RIO_NOREAD|RIO_NOWRITE|RIO_NOXPRINT)
......
......@@ -1446,7 +1446,7 @@ struct rio_info * p;
}
RIODefaultName(p, HostP, rup);
}
HostP->UnixRups[rup].RupLock = -1;
HostP->UnixRups[rup].RupLock = SPIN_LOCK_UNLOCKED;
}
}
}
......
......@@ -37,6 +37,8 @@ static char *_riotable_c_sccs_ = "@(#)riotable.c 1.2";
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/string.h>
......@@ -499,7 +501,7 @@ struct Map *MapP;
struct Map *HostMapP;
struct Port *PortP;
int work_done = 0;
unsigned long flags;
unsigned long lock_flags, sem_flags;
rio_dprintk (RIO_DEBUG_TABLE, "Delete entry on host %x, rta %x\n",
MapP->HostUniqueNum, MapP->RtaUniqueNum);
......@@ -507,10 +509,10 @@ struct Map *MapP;
for ( host=0; host < p->RIONumHosts; host++ ) {
HostP = &p->RIOHosts[host];
rio_spin_lock_irqsave( &HostP->HostLock, flags );
rio_spin_lock_irqsave( &HostP->HostLock, lock_flags );
if ( (HostP->Flags & RUN_STATE) != RC_RUNNING ) {
rio_spin_unlock_irqrestore(&HostP->HostLock, flags);
rio_spin_unlock_irqrestore(&HostP->HostLock, lock_flags);
continue;
}
......@@ -527,7 +529,7 @@ struct Map *MapP;
if ( HostMapP->Topology[link].Unit != ROUTE_DISCONNECT ) {
rio_dprintk (RIO_DEBUG_TABLE, "Entry is in use and cannot be deleted!\n");
p->RIOError.Error = UNIT_IS_IN_USE;
rio_spin_unlock_irqrestore( &HostP->HostLock, flags);
rio_spin_unlock_irqrestore( &HostP->HostLock, lock_flags);
return EBUSY;
}
}
......@@ -542,7 +544,7 @@ struct Map *MapP;
PortP = p->RIOPortp[port];
rio_dprintk (RIO_DEBUG_TABLE, "Unmap port\n");
rio_spin_lock_irqsave( &PortP->portSem, flags );
rio_spin_lock_irqsave( &PortP->portSem, sem_flags );
PortP->Mapped = 0;
......@@ -600,7 +602,7 @@ struct Map *MapP;
WWORD(PortP->PhbP->destination,
dest_unit + (dest_port << 8));
}
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
rio_spin_unlock_irqrestore(&PortP->portSem, sem_flags);
}
}
rio_dprintk (RIO_DEBUG_TABLE, "Entry nulled.\n");
......@@ -608,7 +610,7 @@ struct Map *MapP;
work_done++;
}
}
rio_spin_unlock_irqrestore(&HostP->HostLock, flags);
rio_spin_unlock_irqrestore(&HostP->HostLock, lock_flags);
}
/* XXXXX lock me up */
......
......@@ -96,7 +96,7 @@ static void ttyseth_pv(struct Port *, struct ttystatics *,
#endif
static void RIOClearUp(struct Port *PortP);
static int RIOShortCommand(struct rio_info *p, struct Port *PortP,
int RIOShortCommand(struct rio_info *p, struct Port *PortP,
int command, int len, int arg);
......@@ -452,8 +452,11 @@ riotopen(struct tty_struct * tty, struct file * filp)
PortP->gs.tty->termios->c_state |= WOPEN;
*/
PortP->State |= RIO_WOPEN;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
if (RIODelay (PortP, HUNDRED_MS) == RIO_FAIL)
#if 0
if ( sleep((caddr_t)&tp->tm.c_canqo, TTIPRI|PCATCH))
#endif
{
/*
** ACTION: verify that this is a good thing
......@@ -471,7 +474,6 @@ riotopen(struct tty_struct * tty, struct file * filp)
func_exit ();
return -EINTR;
}
#endif
}
PortP->State &= ~RIO_WOPEN;
}
......@@ -527,8 +529,10 @@ riotclose(void *ptr)
#endif
struct Port *PortP =ptr; /* pointer to the port structure */
int deleted = 0;
int try = 25;
int repeat_this = 0xff;
int try = -1; /* Disable the timeouts by setting them to -1 */
int repeat_this = -1; /* Congrats to those having 15 years of
uptime! (You get to break the driver.) */
long end_time;
struct tty_struct * tty;
unsigned long flags;
int Modem;
......@@ -541,6 +545,12 @@ riotclose(void *ptr)
/* tp = PortP->TtyP;*/ /* Get tty */
tty = PortP->gs.tty;
rio_dprintk (RIO_DEBUG_TTY, "TTY is at address 0x%x\n",(int)tty);
if (PortP->gs.closing_wait)
end_time = jiffies + PortP->gs.closing_wait;
else
end_time = jiffies + MAX_SCHEDULE_TIMEOUT;
Modem = rio_ismodem(tty->device);
#if 0
/* What F.CKING cache? Even then, a higly idle multiprocessor,
......@@ -573,7 +583,8 @@ riotclose(void *ptr)
** clear the open bits for this device
*/
PortP->State &= (Modem ? ~RIO_MOPEN : ~RIO_LOPEN);
PortP->State &= ~RIO_CARR_ON;
PortP->ModemState &= ~MSVR1_CD;
/*
** If the device was open as both a Modem and a tty line
** then we need to wimp out here, as the port has not really
......@@ -605,7 +616,6 @@ riotclose(void *ptr)
*/
rio_dprintk (RIO_DEBUG_TTY, "Timeout 1 starts\n");
#if 0
if (!deleted)
while ( (PortP->InUse != NOT_INUSE) && !p->RIOHalted &&
(PortP->TxBufferIn != PortP->TxBufferOut) ) {
......@@ -626,7 +636,7 @@ riotclose(void *ptr)
}
rio_spin_lock_irqsave(&PortP->portSem, flags);
}
#endif
PortP->TxBufferIn = PortP->TxBufferOut = 0;
repeat_this = 0xff;
......@@ -662,7 +672,7 @@ riotclose(void *ptr)
if (!deleted)
while (try && (PortP->PortState & PORT_ISOPEN)) {
try--;
if (try == 0) {
if (time_after (jiffies, end_time)) {
rio_dprintk (RIO_DEBUG_TTY, "Run out of tries - force the bugger shut!\n" );
RIOPreemptiveCmd(p, PortP,FCLOSE);
break;
......@@ -674,7 +684,11 @@ riotclose(void *ptr)
RIOClearUp( PortP );
goto close_end;
}
RIODelay_ni(PortP, HUNDRED_MS);
if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) {
rio_dprintk (RIO_DEBUG_TTY, "RTA EINTR in delay \n");
RIOPreemptiveCmd(p, PortP,FCLOSE);
break;
}
}
rio_spin_lock_irqsave(&PortP->portSem, flags);
rio_dprintk (RIO_DEBUG_TTY, "Close: try was %d on completion\n", try );
......@@ -779,7 +793,7 @@ struct Port *PortP;
** Other values of len aren't allowed, and will cause
** a panic.
*/
static int RIOShortCommand(struct rio_info *p, struct Port *PortP,
int RIOShortCommand(struct rio_info *p, struct Port *PortP,
int command, int len, int arg)
{
PKT *PacketP;
......
This diff is collapsed.
/* drivers/char/ser_a2232.h */
/* $Id: ser_a2232.h,v 0.4 2000/01/25 12:00:00 ehaase Exp $ */
/* Linux serial driver for the Amiga A2232 board */
/* This driver is MAINTAINED. Before applying any changes, please contact
* the author.
*/
/* Copyright (c) 2000-2001 Enver Haase <ehaase@inf.fu-berlin.de>
* alias The A2232 driver project <A2232@gmx.net>
* All rights reserved.
*
* 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 Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef _SER_A2232_H_
#define _SER_A2232_H_
/*
How many boards are to be supported at maximum;
"up to five A2232 Multiport Serial Cards may be installed in a
single Amiga 2000" states the A2232 User's Guide. If you have
more slots available, you might want to change the value below.
*/
#define MAX_A2232_BOARDS 5
#ifndef A2232_NORMAL_MAJOR
/* This allows overriding on the compiler commandline, or in a "major.h"
include or something like that */
#define A2232_NORMAL_MAJOR 224 /* /dev/ttyY* */
#define A2232_CALLOUT_MAJOR 225 /* /dev/cuy* */
#endif
/* Some magic is always good - Who knows :) */
#define A2232_MAGIC 0x000a2232
/* for the tty_struct subtype field */
#define A2232_TTY_SUBTYPE_NORMAL 1
#define A2232_TTY_SUBTYPE_CALLOUT 2
/* A2232 port structure to keep track of the
status of every single line used */
struct a2232_port{
struct gs_port gs;
unsigned int which_a2232;
unsigned int which_port_on_a2232;
short disable_rx;
short throttle_input;
short cd_status;
};
#define NUMLINES 7 /* number of lines per board */
#define A2232_IOBUFLEN 256 /* number of bytes per buffer */
#define A2232_IOBUFLENMASK 0xff /* mask for maximum number of bytes */
#define A2232_UNKNOWN 0 /* crystal not known */
#define A2232_NORMAL 1 /* normal A2232 (1.8432 MHz oscillator) */
#define A2232_TURBO 2 /* turbo A2232 (3.6864 MHz oscillator) */
struct a2232common {
char Crystal; /* normal (1) or turbo (2) board? */
u_char Pad_a;
u_char TimerH; /* timer value after speed check */
u_char TimerL;
u_char CDHead; /* head pointer for CD message queue */
u_char CDTail; /* tail pointer for CD message queue */
u_char CDStatus;
u_char Pad_b;
};
struct a2232status {
u_char InHead; /* input queue head */
u_char InTail; /* input queue tail */
u_char OutDisable; /* disables output */
u_char OutHead; /* output queue head */
u_char OutTail; /* output queue tail */
u_char OutCtrl; /* soft flow control character to send */
u_char OutFlush; /* flushes output buffer */
u_char Setup; /* causes reconfiguration */
u_char Param; /* parameter byte - see A2232PARAM */
u_char Command; /* command byte - see A2232CMD */
u_char SoftFlow; /* enables xon/xoff flow control */
/* private 65EC02 fields: */
u_char XonOff; /* stores XON/XOFF enable/disable */
};
#define A2232_MEMPAD1 \
(0x0200 - NUMLINES * sizeof(struct a2232status) - \
sizeof(struct a2232common))
#define A2232_MEMPAD2 (0x2000 - NUMLINES * A2232_IOBUFLEN - A2232_IOBUFLEN)
struct a2232memory {
struct a2232status Status[NUMLINES]; /* 0x0000-0x006f status areas */
struct a2232common Common; /* 0x0070-0x0077 common flags */
u_char Dummy1[A2232_MEMPAD1]; /* 0x00XX-0x01ff */
u_char OutBuf[NUMLINES][A2232_IOBUFLEN];/* 0x0200-0x08ff output bufs */
u_char InBuf[NUMLINES][A2232_IOBUFLEN]; /* 0x0900-0x0fff input bufs */
u_char InCtl[NUMLINES][A2232_IOBUFLEN]; /* 0x1000-0x16ff control data */
u_char CDBuf[A2232_IOBUFLEN]; /* 0x1700-0x17ff CD event buffer */
u_char Dummy2[A2232_MEMPAD2]; /* 0x1800-0x2fff */
u_char Code[0x1000]; /* 0x3000-0x3fff code area */
u_short InterruptAck; /* 0x4000 intr ack */
u_char Dummy3[0x3ffe]; /* 0x4002-0x7fff */
u_short Enable6502Reset; /* 0x8000 Stop board, */
/* 6502 RESET line held low */
u_char Dummy4[0x3ffe]; /* 0x8002-0xbfff */
u_short ResetBoard; /* 0xc000 reset board & run, */
/* 6502 RESET line held high */
};
#undef A2232_MEMPAD1
#undef A2232_MEMPAD2
#define A2232INCTL_CHAR 0 /* corresponding byte in InBuf is a character */
#define A2232INCTL_EVENT 1 /* corresponding byte in InBuf is an event */
#define A2232EVENT_Break 1 /* break set */
#define A2232EVENT_CarrierOn 2 /* carrier raised */
#define A2232EVENT_CarrierOff 3 /* carrier dropped */
#define A2232EVENT_Sync 4 /* don't know, defined in 2232.ax */
#define A2232CMD_Enable 0x1 /* enable/DTR bit */
#define A2232CMD_Close 0x2 /* close the device */
#define A2232CMD_Open 0xb /* open the device */
#define A2232CMD_CMask 0xf /* command mask */
#define A2232CMD_RTSOff 0x0 /* turn off RTS */
#define A2232CMD_RTSOn 0x8 /* turn on RTS */
#define A2232CMD_Break 0xd /* transmit a break */
#define A2232CMD_RTSMask 0xc /* mask for RTS stuff */
#define A2232CMD_NoParity 0x00 /* don't use parity */
#define A2232CMD_OddParity 0x20 /* odd parity */
#define A2232CMD_EvenParity 0x60 /* even parity */
#define A2232CMD_ParityMask 0xe0 /* parity mask */
#define A2232PARAM_B115200 0x0 /* baud rates */
#define A2232PARAM_B50 0x1
#define A2232PARAM_B75 0x2
#define A2232PARAM_B110 0x3
#define A2232PARAM_B134 0x4
#define A2232PARAM_B150 0x5
#define A2232PARAM_B300 0x6
#define A2232PARAM_B600 0x7
#define A2232PARAM_B1200 0x8
#define A2232PARAM_B1800 0x9
#define A2232PARAM_B2400 0xa
#define A2232PARAM_B3600 0xb
#define A2232PARAM_B4800 0xc
#define A2232PARAM_B7200 0xd
#define A2232PARAM_B9600 0xe
#define A2232PARAM_B19200 0xf
#define A2232PARAM_BaudMask 0xf /* baud rate mask */
#define A2232PARAM_RcvBaud 0x10 /* enable receive baud rate */
#define A2232PARAM_8Bit 0x00 /* numbers of bits */
#define A2232PARAM_7Bit 0x20
#define A2232PARAM_6Bit 0x40
#define A2232PARAM_5Bit 0x60
#define A2232PARAM_BitMask 0x60 /* numbers of bits mask */
/* Standard speeds tables, -1 means unavailable, -2 means 0 baud: switch off line */
#define A2232_BAUD_TABLE_NOAVAIL -1
#define A2232_BAUD_TABLE_NUM_RATES (18)
static int a2232_baud_table[A2232_BAUD_TABLE_NUM_RATES*3] = {
//Baud //Normal //Turbo
50, A2232PARAM_B50, A2232_BAUD_TABLE_NOAVAIL,
75, A2232PARAM_B75, A2232_BAUD_TABLE_NOAVAIL,
110, A2232PARAM_B110, A2232_BAUD_TABLE_NOAVAIL,
134, A2232PARAM_B134, A2232_BAUD_TABLE_NOAVAIL,
150, A2232PARAM_B150, A2232PARAM_B75,
200, A2232_BAUD_TABLE_NOAVAIL, A2232_BAUD_TABLE_NOAVAIL,
300, A2232PARAM_B300, A2232PARAM_B150,
600, A2232PARAM_B600, A2232PARAM_B300,
1200, A2232PARAM_B1200, A2232PARAM_B600,
1800, A2232PARAM_B1800, A2232_BAUD_TABLE_NOAVAIL,
2400, A2232PARAM_B2400, A2232PARAM_B1200,
4800, A2232PARAM_B4800, A2232PARAM_B2400,
9600, A2232PARAM_B9600, A2232PARAM_B4800,
19200, A2232PARAM_B19200, A2232PARAM_B9600,
38400, A2232_BAUD_TABLE_NOAVAIL, A2232PARAM_B19200,
57600, A2232_BAUD_TABLE_NOAVAIL, A2232_BAUD_TABLE_NOAVAIL,
#ifdef A2232_SPEEDHACK
115200, A2232PARAM_B115200, A2232_BAUD_TABLE_NOAVAIL,
230400, A2232_BAUD_TABLE_NOAVAIL, A2232PARAM_B115200
#else
115200, A2232_BAUD_TABLE_NOAVAIL, A2232_BAUD_TABLE_NOAVAIL,
230400, A2232_BAUD_TABLE_NOAVAIL, A2232_BAUD_TABLE_NOAVAIL
#endif
};
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -918,7 +918,6 @@ static int sx_set_real_termios (void *ptr)
SP_DCEN);
sx_write_channel_byte (port, hi_break,
I_OTHER(port->gs.tty) ? 0:
(I_IGNBRK(port->gs.tty)?BR_IGN:0 |
I_BRKINT(port->gs.tty)?BR_INT:0));
......@@ -1140,9 +1139,7 @@ static inline void sx_check_modem_signals (struct sx_port *port)
sx_dprintk (SX_DEBUG_MODEMSIGNALS, "got a break.\n");
sx_write_channel_byte (port, hi_state, hi_state);
if (port->gs.flags & ASYNC_SAK) {
do_SAK (port->gs.tty);
}
gs_got_break (port);
}
if (hi_state & ST_DCD) {
hi_state &= ~ST_DCD;
......
This diff is collapsed.
......@@ -1454,7 +1454,7 @@ char *idetape_command_key_verbose (byte idetape_command_key)
case IDETAPE_WRITE_FILEMARK_CMD: return("WRITE_FILEMARK_CMD");
case IDETAPE_SPACE_CMD: return("SPACE_CMD");
case IDETAPE_INQUIRY_CMD: return("INQUIRY_CMD");
case IDETAPE_ERASE_CMD: return("ERASE_CMD")
case IDETAPE_ERASE_CMD: return("ERASE_CMD");
case IDETAPE_MODE_SENSE_CMD: return("MODE_SENSE_CMD");
case IDETAPE_MODE_SELECT_CMD: return("MODE_SELECT_CMD");
case IDETAPE_LOAD_UNLOAD_CMD: return("LOAD_UNLOAD_CMD");
......
......@@ -21,6 +21,13 @@ if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate ' QuickCam Colour Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_CQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
fi
fi
if [ "$CONFIG_PARPORT" != "n" ]; then
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
if [ "$CONFIG_PARPORT_1284" != "n" ]; then
dep_tristate ' Winbond W9966CF Webcam Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_W9966 $CONFIG_VIDEO_DEV $CONFIG_PARPORT
fi
fi
fi
dep_tristate ' CPiA Video For Linux' CONFIG_VIDEO_CPIA $CONFIG_VIDEO_DEV
if [ "$CONFIG_VIDEO_CPIA" != "n" ]; then
if [ "$CONFIG_PARPORT_1284" != "n" ]; then
......@@ -39,7 +46,9 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
dep_tristate ' Stradis 4:2:2 MPEG-2 video driver (EXPERIMENTAL)' CONFIG_VIDEO_STRADIS $CONFIG_VIDEO_DEV $CONFIG_PCI
fi
dep_tristate ' Zoran ZR36057/36060 Video For Linux' CONFIG_VIDEO_ZORAN $CONFIG_VIDEO_DEV $CONFIG_PCI $CONFIG_I2C
dep_tristate ' Include support for Iomega Buz' CONFIG_VIDEO_BUZ $CONFIG_VIDEO_ZORAN
dep_tristate ' Zoran ZR36120/36125 Video For Linux' CONFIG_VIDEO_ZR36120 $CONFIG_VIDEO_DEV $CONFIG_PCI $CONFIG_I2C
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
dep_tristate ' Sony Vaio Picturebook Motion Eye Video For Linux' CONFIG_VIDEO_MEYE $CONFIG_VIDEO_DEV $CONFIG_PCI $CONFIG_SONYPI
fi
endmenu
......@@ -38,12 +38,13 @@ obj-$(CONFIG_VIDEO_BT848) += bttv.o msp3400.o tvaudio.o \
tda7432.o tda9875.o tuner.o
obj-$(CONFIG_SOUND_TVMIXER) += tvmixer.o
obj-$(CONFIG_VIDEO_ZR36120) += zoran.o i2c-old.o tuner.o saa7110.o saa7111.o saa7185.o
obj-$(CONFIG_VIDEO_ZR36120) += zoran.o
obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o i2c-old.o
obj-$(CONFIG_VIDEO_SAA5249) += saa5249.o i2c-old.o
obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
obj-$(CONFIG_VIDEO_ZORAN) += buz.o i2c-old.o saa7110.o saa7111.o saa7185.o
obj-$(CONFIG_VIDEO_W9966) += w9966.o
obj-$(CONFIG_VIDEO_ZORAN) += zr36067.o i2c-old.o saa7110.o saa7111.o saa7185.o adv7175.o bt819.o bt856.o
obj-$(CONFIG_VIDEO_LML33) += bt856.o bt819.o
obj-$(CONFIG_VIDEO_PMS) += pms.o
obj-$(CONFIG_VIDEO_PLANB) += planb.o
......@@ -52,6 +53,7 @@ obj-$(CONFIG_VIDEO_STRADIS) += stradis.o
obj-$(CONFIG_VIDEO_CPIA) += cpia.o
obj-$(CONFIG_VIDEO_CPIA_PP) += cpia_pp.o
obj-$(CONFIG_VIDEO_CPIA_USB) += cpia_usb.o
obj-$(CONFIG_VIDEO_MEYE) += meye.o
obj-$(CONFIG_TUNER_3036) += tuner-3036.o
# Extract lists of the multi-part drivers.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
zr36060.h - zr36060 register offsets
zr36060.h - zr36060 register offsets
Copyright (C) 1998 Dave Perks <dperks@ibm.net>
Copyright (C) 1998 Dave Perks <dperks@ibm.net>
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 Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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 Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _ZR36060_H_
#define _ZR36060_H_
......
......@@ -2731,7 +2731,7 @@ static int ace_change_mtu(struct net_device *dev, int new_mtu)
struct ace_private *ap = dev->priv;
struct ace_regs *regs = ap->regs;
if ((new_mtu < 68) || (new_mtu > ACE_JUMBO_MTU))
if (new_mtu > ACE_JUMBO_MTU)
return -EINVAL;
writel(new_mtu + ETH_HLEN + 4, &regs->IfMtu);
......
......@@ -1144,7 +1144,7 @@ static int arlan_change_mtu(struct net_device *dev, int new_mtu)
struct arlan_conf_stru *conf = ((struct arlan_private *) dev->priv)->Conf;
ARLAN_DEBUG_ENTRY("arlan_change_mtu");
if ((new_mtu < 68) || (new_mtu > 2032))
if (new_mtu > 2032)
return -EINVAL;
dev->mtu = new_mtu;
if (new_mtu < 256)
......
This diff is collapsed.
This diff is collapsed.
......@@ -127,8 +127,8 @@
#define DMFE_TXTH_1K 0xC000 /* TX TH 1K byte */
#define DMFE_TIMER_WUT (jiffies + HZ * 1)/* timer wakeup time : 1 second */
#define DMFE_TX_TIMEOUT (HZ * 1.5) /* tx packet time-out time 1.5 s" */
#define DMFE_TX_KICK (HZ * 0.5) /* tx packet Kick-out time 0.5 s" */
#define DMFE_TX_TIMEOUT ((3*HZ)/2) /* tx packet time-out time 1.5 s" */
#define DMFE_TX_KICK (HZ/2) /* tx packet Kick-out time 0.5 s" */
#define DMFE_DBUG(dbug_now, msg, value) if (dmfe_debug || (dbug_now)) printk(KERN_ERR "<DMFE>: %s %lx\n", (msg), (long) (value))
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -795,6 +795,8 @@ static struct cardbus_override_struct {
{ PD(TI,1251B), &ti_ops },
{ PD(TI,1410), &ti_ops },
{ PD(TI,1420), &ti_ops },
{ PD(TI,4410), &ti_ops },
{ PD(TI,4451), &ti_ops },
{ PD(RICOH,RL5C465), &ricoh_ops },
{ PD(RICOH,RL5C466), &ricoh_ops },
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment