Commit d24028e9 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.42pre1

parent 6fb70b47
......@@ -287,6 +287,13 @@ N: Erik Inge Bols
E: knan@mo.himolde.no
D: Misc kernel hacks
N: Andreas E. Bombe
E: andreas.bombe@munich.netsurf.de
W: http://home.pages.de/~andreas.bombe/
P: 1024/04880A44 72E5 7031 4414 2EB6 F6B4 4CBD 1181 7032 0488 0A44
D: IEEE 1394 subsystem rewrite and maintainer
D: Texas Instruments PCILynx IEEE 1394 driver
N: Zoltn Bszrmnyi
E: zboszor@mail.externet.hu
D: MTRR emulation with Cyrix style ARR registers, Athlon MTRR support
......@@ -1306,6 +1313,14 @@ S: Post Office Box 371
S: North Little Rock, Arkansas 72115
S: USA
N: Stephan Linz
E: linz@mazet.de
E: Stephan.Linz@gmx.de
W: http://www.crosswinds.net/~tuxer
D: PCILynx patch to work with 1394a PHY and without local RAM
S: (ask for current address)
S: Germany
N: Siegfried "Frieder" Loeffler (dg1sek)
E: floeff@tunix.mathematik.uni-stuttgart.de, fl@LF.net
W: http://www.mathematik.uni-stuttgart.de/~floeff
......@@ -1702,6 +1717,13 @@ S: Demonstratsii 8-382
S: Tula 300000
S: Russia
N: Gordon Peters
E: GordPeters@smarttech.com
D: Isochronous receive for IEEE 1394 driver (OHCI module).
D: Bugfixes for the aforementioned.
S: Calgary, Alberta
S: Canada
N: Johnnie Peters
E: jpeters@phx.mcd.mot.com
D: Motorola PowerPC changes for PReP
......@@ -1736,6 +1758,12 @@ S: M"ullerstr. 69
S: 13349 Berlin
S: Germany
N: Emanuel Pirker
E: epirker@edu.uni-klu.ac.at
D: AIC5800 IEEE 1394, RAW I/O on 1394
D: Starter of Linux1394 effort
S: ask per mail for current address
N: Ken Pizzini
E: ken@halcyon.com
D: CDROM driver "sonycd535" (Sony CDU-535/531)
......@@ -1852,6 +1880,13 @@ S: 21 Rue Carnot
S: 95170 Deuil La Barre
S: France
N: Sebastien Rougeaux
E: Sebastien.Rougeaux@syseng.anu.edu.au
D: IEEE 1394 OHCI module
S: Research School of Information Science and Engineering
S: The Australian National University, ACT 0200
S: Australia
N: Alessandro Rubini
E: rubini@ipvvis.unipv.it
D: the gpm mouse server and kernel support for it
......
This diff is collapsed.
......@@ -456,6 +456,41 @@ M: Gadi Oxman <gadio@netvision.net.il>
L: linux-kernel@vger.rutgers.edu
S: Maintained
IEEE 1394 SUBSYSTEM
P: Andreas Bombe
M: andreas.bombe@munich.netsurf.de
L: linux1394-devel@eclipt.uni-klu.ac.at
W: http://eclipt.uni-klu.ac.at/ieee1394
S: Maintained
IEEE 1394 AIC5800 DRIVER
P: Emanuel Pirker
M: epirker@edu.uni-klu.ac.at
L: linux1394-devel@eclipt.uni-klu.ac.at
W: http://eclipt.uni-klu.ac.at/ieee1394
S: Maintained
IEEE 1394 OHCI DRIVER
P: Sebastien Rougeaux
M: sebastien.rougeaux@anu.edu.au
L: linux1394-devel@eclipt.uni-klu.ac.at
W: http://eclipt.uni-klu.ac.at/ieee1394
S: Maintained
IEEE 1394 PCILYNX DRIVER
P: Andreas Bombe
M: andreas.bombe@munich.netsurf.de
L: linux1394-devel@eclipt.uni-klu.ac.at
W: http://eclipt.uni-klu.ac.at/ieee1394
S: Maintained
IEEE 1394 RAW I/O DRIVER
P: Andreas Bombe
M: andreas.bombe@munich.netsurf.de
L: linux1394-devel@eclipt.uni-klu.ac.at
W: http://eclipt.uni-klu.ac.at/ieee1394
S: Maintained
INTEL APIC/IOAPIC, LOWLEVEL X86 SMP SUPPORT
P: Ingo Molnar
M: mingo@redhat.com
......@@ -936,6 +971,12 @@ L: linux-net@vger.rutgers.edu
L: linux-tr@linuxtr.net
S: Maintained
TRIDENT 4DWAVE/SIS 7018 PCI AUDIO CORE
P: Ollie Lho
M: ollie@sis.com.tw
L: linux-kernel@vger.rutgers.edu
S: Supported
TMS380 TOKEN-RING NETWORK DRIVER
P: Adam Fritzler
M: mid@auk.cx
......
VERSION = 2
PATCHLEVEL = 3
SUBLEVEL = 41
SUBLEVEL = 42
EXTRAVERSION =
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
......
......@@ -22,7 +22,7 @@ choice 'Processor family' \
586/K5/5x86/6x86 CONFIG_M586 \
Pentium/TSC CONFIG_M586TSC \
PPro/6x86MX CONFIG_M686 \
K6/II/II CONFIG_MK6 \
K6/II/III CONFIG_MK6 \
Athlon CONFIG_MK7" PPro
#
# Define implied options from the CPU selection here
......
......@@ -364,7 +364,7 @@ void amiga_do_irq_list(int irq, struct pt_regs *fp, struct irq_server *server)
intena = ami_intena_vals[irq];
custom.intreq = intena;
/* serve first fast handlers - there can only be one of these */
/* serve fast handler if present - there can only be one of these */
node = ami_irq_list[irq];
/*
......@@ -392,7 +392,11 @@ void amiga_do_irq_list(int irq, struct pt_regs *fp, struct irq_server *server)
*/
custom.intena = intena;
save_flags(flags);
#if 0 /* def CPU_M68060_ONLY */
sti();
#else
restore_flags((flags & ~0x0700) | (fp->sr & 0x0700));
#endif
slow_nodes = node;
for (;;) {
......
......@@ -311,10 +311,6 @@ void atari_init_midi_port( int cflag )
void __init atari_debug_init(void)
{
#ifdef CONFIG_KGDB
/* the m68k_debug_device is used by the GDB stub, do nothing here */
return;
#endif
if (!strcmp( m68k_debug_device, "ser" )) {
/* defaults to ser2 for a Falcon and ser1 otherwise */
strcpy( m68k_debug_device, MACH_IS_FALCON ? "ser2" : "ser1" );
......
......@@ -132,6 +132,7 @@ void __init config_bvme6000(void)
bvme6000_set_vectors();
#endif
mach_max_dma_address = 0xffffffff;
mach_sched_init = bvme6000_sched_init;
mach_keyb_init = bvme6000_keyb_init;
mach_kbdrate = bvme6000_kbdrate;
......
......@@ -37,6 +37,7 @@
#include <linux/ptrace.h>
#include <linux/unistd.h>
#include <linux/stddef.h>
#include <linux/highuid.h>
#include <asm/setup.h>
#include <asm/uaccess.h>
......@@ -1048,6 +1049,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
info.si_code = SI_USER;
info.si_pid = current->p_pptr->pid;
info.si_uid = current->p_pptr->uid;
info.si_uid16 = high2lowuid(current->p_pptr->uid);
}
/* If the (new) signal is now blocked, requeue it. */
......
......@@ -37,9 +37,6 @@
#include <asm/pgtable.h>
#include <asm/machdep.h>
#include <asm/siginfo.h>
#ifdef CONFIG_KGDB
#include <asm/kgdb.h>
#endif
/* assembler routines */
asmlinkage void system_call(void);
......@@ -766,11 +763,6 @@ int kstack_depth_to_print = 48;
static void dump_stack(struct frame *fp)
{
#ifdef CONFIG_KGDB
/* This will never return to here, if kgdb has been initialized. And if
* it returns from there, then to where the error happened... */
enter_kgdb( &fp->ptregs );
#else
unsigned long *stack, *endstack, addr, module_start, module_end;
extern char _start, _etext;
int i;
......@@ -868,15 +860,10 @@ static void dump_stack(struct frame *fp)
for (i = 0; i < 10; i++)
printk("%04x ", 0xffff & ((short *) fp->ptregs.pc)[i]);
printk ("\n");
#endif
}
void bad_super_trap (struct frame *fp)
{
#ifdef CONFIG_KGDB
/* Save the register dump if we'll enter kgdb anyways */
if (!kgdb_initialized) {
#endif
console_verbose();
if (fp->ptregs.vector < 4*sizeof(vec_names)/sizeof(vec_names[0]))
printk ("*** %s *** FORMAT=%X\n",
......@@ -906,9 +893,6 @@ void bad_super_trap (struct frame *fp)
fp->ptregs.pc);
}
printk ("Current process id is %d\n", current->pid);
#ifdef CONFIG_KGDB
}
#endif
die_if_kernel("BAD KERNEL TRAP", &fp->ptregs, 0);
}
......@@ -1037,10 +1021,6 @@ void die_if_kernel (char *str, struct pt_regs *fp, int nr)
if (!(fp->sr & PS_S))
return;
#ifdef CONFIG_KGDB
/* Save the register dump if we'll enter kgdb anyways */
if (!kgdb_initialized) {
#endif
console_verbose();
printk("%s: %08x\n",str,nr);
printk("PC: [<%08lx>]\nSR: %04x SP: %p a2: %08lx\n",
......@@ -1052,9 +1032,6 @@ void die_if_kernel (char *str, struct pt_regs *fp, int nr)
printk("Process %s (pid: %d, stackpage=%08lx)\n",
current->comm, current->pid, PAGE_SIZE+(unsigned long)current);
#ifdef CONFIG_KGDB
}
#endif
dump_stack((struct frame *)fp);
do_exit(SIGSEGV);
}
......
......@@ -397,10 +397,6 @@ void mac_init_sccb_port( int cflag )
void __init mac_debug_init(void)
{
#ifdef CONFIG_KGDB
/* the m68k_debug_device is used by the GDB stub, do nothing here */
return;
#endif
#ifdef DEBUG_SERIAL
if ( !strcmp( m68k_debug_device, "ser" )
|| !strcmp( m68k_debug_device, "ser1" )) {
......
......@@ -101,6 +101,7 @@ static int mvme147_get_hardware_list(char *buffer)
void __init config_mvme147(void)
{
mach_max_dma_address = 0x01000000;
mach_sched_init = mvme147_sched_init;
mach_keyb_init = mvme147_keyb_init;
mach_kbdrate = mvme147_kbdrate;
......
......@@ -145,6 +145,7 @@ void __init config_mvme16x(void)
p_bdid p = &mvme_bdid;
char id[40];
mach_max_dma_address = 0xffffffff;
mach_sched_init = mvme16x_sched_init;
mach_keyb_init = mvme16x_keyb_init;
mach_kbdrate = mvme16x_kbdrate;
......
......@@ -241,10 +241,6 @@ static int floppy_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long param);
static int floppy_open(struct inode *inode, struct file *filp);
static int floppy_release(struct inode *inode, struct file *filp);
static ssize_t floppy_read(struct file *filp, char *buf,
size_t count, loff_t *ppos);
static ssize_t floppy_write(struct file *filp, const char *buf,
size_t count, loff_t *ppos);
static int floppy_check_change(kdev_t dev);
static int floppy_revalidate(kdev_t dev);
static int swim3_add_device(struct device_node *swims);
......@@ -988,42 +984,6 @@ static int floppy_revalidate(kdev_t dev)
return ret;
}
static ssize_t floppy_read(struct file *filp, char *buf,
size_t count, loff_t *ppos)
{
struct inode *inode = filp->f_dentry->d_inode;
struct floppy_state *fs;
int devnum = MINOR(inode->i_rdev);
if (devnum >= floppy_count)
return -ENODEV;
fs = &floppy_states[devnum];
if (fs->ejected)
return -ENXIO;
return block_read(filp, buf, count, ppos);
}
static ssize_t floppy_write(struct file * filp, const char * buf,
size_t count, loff_t *ppos)
{
struct inode * inode = filp->f_dentry->d_inode;
struct floppy_state *fs;
int devnum = MINOR(inode->i_rdev);
if (devnum >= floppy_count)
return -ENODEV;
check_disk_change(inode->i_rdev);
fs = &floppy_states[devnum];
if (fs->ejected)
return -ENXIO;
if (fs->write_prot < 0)
fs->write_prot = swim3_readbit(fs, WRITE_PROT);
if (fs->write_prot)
return -EROFS;
return block_write(filp, buf, count, ppos);
}
static void floppy_off(unsigned int nr)
{
}
......
......@@ -102,10 +102,6 @@ static void swimiop_receive(struct iop_msg *, struct pt_regs *);
static void swimiop_status_update(int, struct swim_drvstatus *);
static int swimiop_eject(struct floppy_state *fs);
static ssize_t floppy_read(struct file *filp, char *buf,
size_t count, loff_t *ppos);
static ssize_t floppy_write(struct file *filp, const char *buf,
size_t count, loff_t *ppos);
static int floppy_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long param);
static int floppy_open(struct inode *inode, struct file *filp);
......@@ -338,40 +334,6 @@ static int swimiop_eject(struct floppy_state *fs)
return cmd->error;
}
static ssize_t floppy_read(struct file *filp, char *buf,
size_t count, loff_t *ppos)
{
struct inode *inode = filp->f_dentry->d_inode;
struct floppy_state *fs;
int devnum = MINOR(inode->i_rdev);
if (devnum >= floppy_count)
return -ENODEV;
fs = &floppy_states[devnum];
if (fs->ejected)
return -ENXIO;
return block_read(filp, buf, count, ppos);
}
static ssize_t floppy_write(struct file * filp, const char * buf,
size_t count, loff_t *ppos)
{
struct inode * inode = filp->f_dentry->d_inode;
struct floppy_state *fs;
int devnum = MINOR(inode->i_rdev);
if (devnum >= floppy_count)
return -ENODEV;
check_disk_change(inode->i_rdev);
fs = &floppy_states[devnum];
if (fs->ejected)
return -ENXIO;
if (fs->write_prot)
return -EROFS;
return block_write(filp, buf, count, ppos);
}
static struct floppy_struct floppy_type =
{ 2880,18,2,80,0,0x1B,0x00,0xCF,0x6C,NULL }; /* 7 1.44MB 3.5" */
......
......@@ -232,7 +232,6 @@ void agp_free_memory(agp_memory * curr)
}
if (curr->type != 0) {
agp_bridge.free_by_type(curr);
MOD_DEC_USE_COUNT;
return;
}
if (curr->page_count != 0) {
......@@ -260,15 +259,23 @@ agp_memory *agp_allocate_memory(size_t page_count, u32 type)
agp_bridge.max_memory_agp) {
return NULL;
}
if (type != 0) {
new = agp_bridge.alloc_by_type(page_count, type);
return new;
}
/* We always increase the module count, since free auto-decrements
* it
*/
MOD_INC_USE_COUNT;
scratch_pages = (page_count + ENTRIES_PER_PAGE - 1) / ENTRIES_PER_PAGE;
new = agp_create_memory(scratch_pages);
if (new == NULL) {
MOD_DEC_USE_COUNT;
return NULL;
}
for (i = 0; i < page_count; i++) {
......@@ -286,7 +293,6 @@ agp_memory *agp_allocate_memory(size_t page_count, u32 type)
new->page_count++;
}
MOD_INC_USE_COUNT;
return new;
}
......@@ -781,11 +787,13 @@ static aper_size_info_fixed intel_i810_sizes[] =
};
#define AGP_DCACHE_MEMORY 1
#define AGP_PHYS_MEMORY 2
static gatt_mask intel_i810_masks[] =
{
{I810_PTE_VALID, 0},
{(I810_PTE_VALID | I810_PTE_LOCAL), AGP_DCACHE_MEMORY}
{(I810_PTE_VALID | I810_PTE_LOCAL), AGP_DCACHE_MEMORY},
{I810_PTE_VALID, 0}
};
static struct _intel_i810_private {
......@@ -896,7 +904,7 @@ static int intel_i810_insert_entries(agp_memory * mem, off_t pg_start,
if ((type == AGP_DCACHE_MEMORY) &&
(mem->type == AGP_DCACHE_MEMORY)) {
/* special insert */
CACHE_FLUSH();
for (i = pg_start;
i < (pg_start + mem->page_count); i++) {
OUTREG32(intel_i810_private.registers,
......@@ -904,20 +912,24 @@ static int intel_i810_insert_entries(agp_memory * mem, off_t pg_start,
(i * 4096) | I810_PTE_LOCAL |
I810_PTE_VALID);
}
CACHE_FLUSH();
agp_bridge.tlb_flush(mem);
return 0;
}
if((type == AGP_PHYS_MEMORY) &&
(mem->type == AGP_PHYS_MEMORY)) {
goto insert;
}
return -EINVAL;
}
if (mem->is_flushed == FALSE) {
insert:
CACHE_FLUSH();
mem->is_flushed = TRUE;
}
for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
OUTREG32(intel_i810_private.registers,
I810_PTE_BASE + (j * 4), mem->memory[i]);
}
CACHE_FLUSH();
agp_bridge.tlb_flush(mem);
return 0;
......@@ -955,15 +967,55 @@ static agp_memory *intel_i810_alloc_by_type(size_t pg_count, int type)
new->page_count = pg_count;
new->num_scratch_pages = 0;
vfree(new->memory);
MOD_INC_USE_COUNT;
return new;
}
if(type == AGP_PHYS_MEMORY) {
/* The I810 requires a physical address to program
* it's mouse pointer into hardware. However the
* Xserver still writes to it through the agp
* aperture
*/
if (pg_count != 1) {
return NULL;
}
new = agp_create_memory(1);
if (new == NULL) {
return NULL;
}
MOD_INC_USE_COUNT;
new->memory[0] = agp_alloc_page();
if (new->memory[0] == 0) {
/* Free this structure */
agp_free_memory(new);
return NULL;
}
new->memory[0] =
agp_bridge.mask_memory(
virt_to_phys((void *) new->memory[0]),
type);
new->page_count = 1;
new->num_scratch_pages = 1;
new->type = AGP_PHYS_MEMORY;
new->physical = virt_to_phys((void *) new->memory[0]);
return new;
}
return NULL;
}
static void intel_i810_free_by_type(agp_memory * curr)
{
agp_free_key(curr->key);
if(curr->type == AGP_PHYS_MEMORY) {
agp_destroy_page((unsigned long)
phys_to_virt(curr->memory[0]));
vfree(curr->memory);
}
kfree(curr);
MOD_DEC_USE_COUNT;
}
static unsigned long intel_i810_mask_memory(unsigned long addr, int type)
......@@ -1916,7 +1968,7 @@ static struct agp_max_table maxes_table[9] =
static int agp_find_max(void)
{
long memory, t, index, result;
long memory, index, result;
memory = virt_to_phys(high_memory) >> 20;
index = 1;
......@@ -1926,11 +1978,10 @@ static int agp_find_max(void)
index++;
}
t = (memory - maxes_table[index - 1].mem) /
(maxes_table[index].mem - maxes_table[index - 1].mem);
result = maxes_table[index - 1].agp +
(t * (maxes_table[index].agp - maxes_table[index - 1].agp));
( (memory - maxes_table[index - 1].mem) *
(maxes_table[index].agp - maxes_table[index - 1].agp)) /
(maxes_table[index].mem - maxes_table[index - 1].mem);
printk(KERN_INFO "agpgart: Maximum main memory to use "
"for agp memory: %ldM\n", result);
......
......@@ -298,7 +298,7 @@ static agp_memory *agp_allocate_memory_wrap(size_t pg_count, u32 type)
agp_memory *memory;
memory = agp_allocate_memory(pg_count, type);
printk("memory : %p\n", memory);
if (memory == NULL) {
return NULL;
}
......@@ -911,6 +911,7 @@ static int agpioc_allocate_wrap(agp_file_private * priv, unsigned long arg)
return -ENOMEM;
}
alloc.key = memory->key;
alloc.physical = memory->physical;
if (copy_to_user((void *) arg, &alloc, sizeof(agp_allocate))) {
agp_free_memory_wrap(memory);
......
......@@ -103,10 +103,6 @@ static inline int copy_from_user(void *to,const void *from, int c)
#include "generic_serial.h"
#ifndef MODULE
extern void my_hd (unsigned char *ptr, int n);
#endif
static char * tmp_buf;
static DECLARE_MUTEX(tmp_buf_sem);
......@@ -119,8 +115,8 @@ int gs_debug = 0;
#define gs_dprintk(f, str...) /* nothing */
#endif
#define func_enter() gs_dprintk (SX_DEBUG_FLOW, "gs: enter " __FUNCTION__ "\n")
#define func_exit() gs_dprintk (SX_DEBUG_FLOW, "gs: exit " __FUNCTION__ "\n")
#define func_enter() gs_dprintk (GS_DEBUG_FLOW, "gs: enter " __FUNCTION__ "\n")
#define func_exit() gs_dprintk (GS_DEBUG_FLOW, "gs: exit " __FUNCTION__ "\n")
......@@ -856,7 +852,6 @@ void gs_set_termios (struct tty_struct * tty,
if (gs_debug & GS_DEBUG_TERMIOS) {
gs_dprintk (GS_DEBUG_TERMIOS, "termios structure (%p):\n", tiosp);
my_hd ((unsigned char *)tiosp, sizeof (struct termios));
}
#if 0
......
......@@ -12,6 +12,8 @@
#ifndef GENERIC_SERIAL_H
#define GENERIC_SERIAL_H
#define RS_EVENT_WRITE_WAKEUP 0
struct real_driver {
void (*disable_tx_interrupts) (void *);
void (*enable_tx_interrupts) (void *);
......@@ -75,6 +77,7 @@ struct gs_port {
#define GS_DEBUG_TERMIOS 0x00000004
#define GS_DEBUG_STUFF 0x00000008
#define GS_DEBUG_CLOSE 0x00000010
#define GS_DEBUG_FLOW 0x00000020
void gs_put_char(struct tty_struct *tty, unsigned char ch);
......
This diff is collapsed.
......@@ -43,6 +43,7 @@
#include <linux/tty.h>
#include <linux/interrupt.h>
#include <linux/serial.h>
#include <linux/serialP.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
......@@ -57,6 +58,8 @@
#include <asm/segment.h>
#include <asm/bitops.h>
#include <asm/mvme16xhw.h>
#include <asm/bootinfo.h>
#include <asm/setup.h>
#include <linux/types.h>
#include <linux/kernel.h>
......@@ -144,7 +147,7 @@ static struct termios *serial_termios_locked[NR_PORTS];
* memory if large numbers of serial ports are open.
*/
static unsigned char *tmp_buf = 0;
static struct semaphore tmp_buf_sem = MUTEX;
DECLARE_MUTEX(tmp_buf_sem);
/*
* This is used to look up the divisor speeds and the timeouts
......@@ -2501,8 +2504,8 @@ scrn[1] = '\0';
info->tqueue.data = info;
info->callout_termios =cy_callout_driver.init_termios;
info->normal_termios = cy_serial_driver.init_termios;
info->open_wait = 0;
info->close_wait = 0;
init_waitqueue_head(&info->open_wait);
init_waitqueue_head(&info->close_wait);
/* info->session */
/* info->pgrp */
/*** !!!!!!!! this may expose new bugs !!!!!!!!! *********/
......@@ -2728,7 +2731,7 @@ void console_setup(char *str, int *ints)
* that serial167_init() doesn't leave the chip non-functional.
*/
void serial167_write(struct console *co, const char *str, unsigned count)
void serial167_console_write(struct console *co, const char *str, unsigned count)
{
volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
unsigned long flags;
......@@ -2788,6 +2791,95 @@ void serial167_write(struct console *co, const char *str, unsigned count)
restore_flags(flags);
}
/* This is a hack; if there are multiple chars waiting in the chip we
* discard all but the last one, and return that. The cd2401 is not really
* designed to be driven in polled mode.
*/
int serial167_console_wait_key(struct console *co)
{
volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
unsigned long flags;
volatile u_char sink;
u_char ier;
int port;
int keypress = 0;
save_flags(flags); cli();
/* Ensure receiver is enabled! */
port = 0;
base_addr[CyCAR] = (u_char)port;
while (base_addr[CyCCR])
;
base_addr[CyCCR] = CyENB_RCVR;
ier = base_addr[CyIER];
base_addr[CyIER] = CyRxData;
while (!keypress) {
if (pcc2chip[PccSCCRICR] & 0x20)
{
/* We have an Rx int. Acknowledge it */
sink = pcc2chip[PccRPIACKR];
if ((base_addr[CyLICR] >> 2) == port) {
int cnt = base_addr[CyRFOC];
while (cnt-- > 0)
{
keypress = base_addr[CyRDR];
}
base_addr[CyREOIR] = 0;
}
else
base_addr[CyREOIR] = CyNOTRANS;
}
}
base_addr[CyIER] = ier;
restore_flags(flags);
return keypress;
}
static kdev_t serial167_console_device(struct console *c)
{
return MKDEV(TTY_MAJOR, 64 + c->index);
}
static int __init serial167_console_setup(struct console *co, char *options)
{
return 0;
}
static struct console sercons = {
"ttyS",
serial167_console_write,
NULL,
serial167_console_device,
serial167_console_wait_key,
NULL,
serial167_console_setup,
CON_PRINTBUFFER,
-1,
0,
NULL
};
void __init serial167_console_init(void)
{
if (vme_brdtype == VME_TYPE_MVME166 ||
vme_brdtype == VME_TYPE_MVME167 ||
vme_brdtype == VME_TYPE_MVME177) {
mvme167_serial_console_setup(0);
register_console(&sercons);
}
}
#ifdef CONFIG_REMOTE_DEBUG
void putDebugChar (int c)
{
......
......@@ -128,6 +128,14 @@ static int tty_fasync(int fd, struct file * filp, int on);
#ifdef CONFIG_SX
extern int sx_init (void);
#endif
#if defined(CONFIG_MVME162_SCC) || defined(CONFIG_BVME6000_SCC) || defined(CONFIG_MVME147_SCC)
extern int vme_scc_init (void);
extern long vme_scc_console_init(void);
#endif
#ifdef CONFIG_SERIAL167
extern int serial167_init(void);
extern long serial167_console_init(void);
#endif
#ifdef CONFIG_8xx
extern console_8xx_init(void);
extern int rs_8xx_init(void);
......@@ -2090,9 +2098,15 @@ void __init console_init(void)
#ifdef CONFIG_SERIAL_CONSOLE
#ifdef CONFIG_8xx
console_8xx_init();
#else
#elif defined(CONFIG_SERIAL)
serial_console_init();
#endif /* CONFIG_8xx */
#if defined(CONFIG_MVME162_SCC) || defined(CONFIG_BVME6000_SCC) || defined(CONFIG_MVME147_SCC)
vme_scc_console_init();
#endif
#if defined(CONFIG_SERIAL167)
serial167_console_init();
#endif
#endif
}
......@@ -2176,6 +2190,9 @@ void __init tty_init(void)
#ifdef CONFIG_SERIAL
rs_init();
#endif
#if defined(CONFIG_MVME162_SCC) || defined(CONFIG_BVME6000_SCC) || defined(CONFIG_MVME147_SCC)
vme_scc_init();
#endif
#ifdef CONFIG_COMPUTONE
ip2_init();
#endif
......@@ -2185,7 +2202,7 @@ void __init tty_init(void)
#ifdef CONFIG_ROCKETPORT
rp_init();
#endif
#ifdef CONFIG_MVME16x
#ifdef CONFIG_SERIAL167
serial167_init();
#endif
#ifdef CONFIG_CYCLADES
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -22,7 +22,7 @@
/* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi> and even
Frodo Looijaard <frodol@dds.nl> */
/* $Id: i2c-elektor.c,v 1.13 1999/12/21 23:45:58 frodo Exp $ */
/* $Id: i2c-elektor.c,v 1.16 2000/01/24 02:06:33 mds Exp $ */
#include <linux/kernel.h>
#include <linux/ioport.h>
......@@ -30,24 +30,10 @@
#include <linux/delay.h>
#include <linux/malloc.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE >= 0x020135
#include <linux/init.h>
#else
#define __init
#endif
#include <asm/irq.h>
#include <asm/io.h>
/* 2.0.0 kernel compatibility */
#if LINUX_VERSION_CODE < 0x020100
#define MODULE_AUTHOR(noone)
#define MODULE_DESCRIPTION(none)
#define MODULE_PARM(no,param)
#define MODULE_PARM_DESC(no,description)
#define EXPORT_SYMBOL(noexport)
#define EXPORT_NO_SYMBOLS
#endif
#include <linux/i2c.h>
#include <linux/i2c-algo-pcf.h>
#include <linux/i2c-elektor.h>
......@@ -89,7 +75,8 @@ static void pcf_isa_setbyte(void *data, int ctl, int val)
{
if (ctl) {
if (gpi.pi_irq > 0) {
DEB3(printk("i2c-elektor.o: Write control 0x%x\n", val|I2C_PCF_ENI));
DEB3(printk("i2c-elektor.o: Write control 0x%x\n",
val|I2C_PCF_ENI));
outb(val | I2C_PCF_ENI, CTRL);
} else {
DEB3(printk("i2c-elektor.o: Write control 0x%x\n", val));
......@@ -128,15 +115,6 @@ static int pcf_isa_getclock(void *data)
#if LINUX_VERSION_CODE < 0x02017f
static void schedule_timeout(int j)
{
current->state = TASK_INTERRUPTIBLE;
current->timeout = jiffies + j;
schedule();
}
#endif
#if 0
static void pcf_isa_sleep(unsigned long timeout)
{
......@@ -152,28 +130,17 @@ static void pcf_isa_waitforpin(void) {
if (gpi.pi_irq > 0) {
cli();
if (pcf_pending == 0) {
#if LINUX_VERSION_CODE < 0x02017f
current->timeout = jiffies + timeout * HZ;
interruptible_sleep_on(&pcf_wait);
#else
interruptible_sleep_on_timeout(&pcf_wait, timeout*HZ );
#endif
}
else
} else
pcf_pending = 0;
sti();
#if LINUX_VERSION_CODE < 0x02017f
current->timeout = 0;
#endif
}
else {
} else {
udelay(100);
}
}
static void pcf_isa_handler(int this_irq, void *dev_id, struct pt_regs *regs) {
pcf_pending = 1;
wake_up_interruptible(&pcf_wait);
}
......@@ -187,11 +154,11 @@ static int pcf_isa_init(void)
request_region(gpi.pi_base, 2, "i2c (isa bus adapter)");
}
if (gpi.pi_irq > 0) {
if (request_irq(gpi.pi_irq, pcf_isa_handler, 0, "PCF8584", 0) < 0) {
if (request_irq(gpi.pi_irq, pcf_isa_handler, 0, "PCF8584", 0)
< 0) {
printk("i2c-elektor.o: Request irq%d failed\n", gpi.pi_irq);
gpi.pi_irq = 0;
}
else
} else
enable_irq(gpi.pi_irq);
}
return 0;
......
......@@ -21,7 +21,7 @@
/* With some changes from Frodo Looijaard <frodol@dds.nl> */
/* $Id: i2c-pcf8584.h,v 1.2 1999/12/21 23:45:58 frodo Exp $ */
/* $Id: i2c-pcf8584.h,v 1.3 2000/01/18 23:54:07 frodo Exp $ */
#ifndef I2C_PCF8584_H
#define I2C_PCF8584_H 1
......@@ -57,7 +57,7 @@
#define I2C_PCF_CLK3 0x00
#define I2C_PCF_CLK443 0x10
#define I2C_PCF_CLK6 0x14
#define I2C_PCF_CLK8 0x18
#define I2C_PCF_CLK 0x18
#define I2C_PCF_CLK12 0x1c
/* ----- transmission frequencies ------------------------------------- */
......
......@@ -39,6 +39,7 @@ EXPORT_SYMBOL(hpsb_make_readqpacket);
EXPORT_SYMBOL(hpsb_make_readbpacket);
EXPORT_SYMBOL(hpsb_make_writeqpacket);
EXPORT_SYMBOL(hpsb_make_writebpacket);
EXPORT_SYMBOL(hpsb_make_lockpacket);
EXPORT_SYMBOL(hpsb_read);
EXPORT_SYMBOL(hpsb_write);
EXPORT_SYMBOL(hpsb_lock);
......
......@@ -329,6 +329,30 @@ struct hpsb_packet *hpsb_make_writebpacket(struct hpsb_host *host,
return p;
}
struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node,
u64 addr, int extcode)
{
struct hpsb_packet *p;
p = alloc_hpsb_packet(8);
if (!p) return NULL;
p->host = host;
p->tlabel = get_tlabel(host, node, 1);
p->node_id = node;
switch (extcode) {
case EXTCODE_FETCH_ADD:
case EXTCODE_LITTLE_ADD:
fill_async_lock(p, addr, extcode, 4);
break;
default:
fill_async_lock(p, addr, extcode, 8);
break;
}
return p;
}
/*
* FIXME - these functions should probably read from / write to user space to
......
......@@ -39,6 +39,9 @@ struct hpsb_packet *hpsb_make_writeqpacket(struct hpsb_host *host,
struct hpsb_packet *hpsb_make_writebpacket(struct hpsb_host *host,
nodeid_t node, u64 addr,
size_t length);
struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node,
u64 addr, int extcode);
/*
* hpsb_packet_success - Make sense of the ack and reply codes and
......
This diff is collapsed.
......@@ -20,8 +20,14 @@
#define MAX_OHCI1394_CARDS 4
#define AR_RESP_BUF_SIZE 4096
#define AR_RESP_PRG_SIZE 256
#define OHCI1394_MAX_AT_REQ_RETRIES 1
#define OHCI1394_MAX_AT_RESP_RETRIES 1
#define OHCI1394_MAX_PHYS_RESP_RETRIES 4
#define AR_RESP_NUM_DESC 4 /* number of AR resp descriptors */
#define AR_RESP_BUF_SIZE 4096 /* size of AR resp buffers */
#define AR_RESP_SPLIT_PACKET_BUF_SIZE 256 /* split packet buffer */
#define AR_RESP_TOTAL_BUF_SIZE (AR_RESP_BUF_SIZE * AR_RESP_NUM_DESC)
#define AT_REQ_PRG_SIZE 256
#define IR_RECV_BUF_SIZE 4096 /* 4096 bytes/buffer */
......@@ -49,8 +55,18 @@ struct ti_ohci {
quadlet_t *csr_config_rom; /* buffer for csr config rom */
/* asynchronous receive */
struct dma_cmd *AR_resp_prg;
quadlet_t *AR_resp_buf;
struct dma_cmd **AR_resp_prg;
quadlet_t **AR_resp_buf;
unsigned int AR_resp_buf_bh_ind;
unsigned int AR_resp_buf_bh_offset;
unsigned int AR_resp_buf_th_ind;
unsigned int AR_resp_buf_th_offset;
int AR_resp_bytes_left;
quadlet_t *AR_resp_spb;
spinlock_t AR_resp_lock;
/* async receive task */
struct tq_struct AR_resp_pdl_task;
/* asynchronous transmit */
struct dma_cmd *AT_req_prg;
......
......@@ -495,8 +495,8 @@ static int handle_local_request(struct file_info *fi,
if (req->req.length == 8) {
req->req.error = highlevel_lock(fi->host, req->data,
addr, req->data[0],
req->data[1],
addr, req->data[1],
req->data[0],
req->req.misc);
req->req.length = 4;
} else {
......@@ -567,6 +567,32 @@ static int handle_remote_request(struct file_info *fi,
break;
case RAW1394_REQ_LOCK:
if ((req->req.misc != EXTCODE_FETCH_ADD)
&& (req->req.misc != EXTCODE_LITTLE_ADD)) {
if (req->req.length != 4) {
req->req.error = RAW1394_ERROR_INVALID_ARG;
break;
}
} else {
if (req->req.length != 8) {
req->req.error = RAW1394_ERROR_INVALID_ARG;
break;
}
}
packet = hpsb_make_lockpacket(fi->host, node, addr,
req->req.misc);
if (!packet) return -ENOMEM;
if (copy_from_user(packet->data, req->req.sendb,
req->req.length)) {
req->req.error = RAW1394_ERROR_MEMFAULT;
break;
}
req->req.length = 4;
break;
case RAW1394_REQ_LOCK64:
default:
req->req.error = RAW1394_ERROR_STATE_ORDER;
......
......@@ -115,7 +115,7 @@ obj-$(CONFIG_NET) += Space.o setup.o net_init.o loopback.o
obj-$(CONFIG_SEEQ8005) += seeq8005.o
obj-$(CONFIG_ETHERTAP) += ethertap.o
obj-$(CONFIG_NET_SB1000) += sb1000.o
obj-$(CONFIG_DAYNAPORT) += daynaport.o 8390.o
obj-$(CONFIG_MAC8390) += daynaport.o 8390.o
obj-$(CONFIG_APNE) += apne.o 8390.o
obj-$(CONFIG_PCMCIA_PCNET) += 8390.o
obj-$(CONFIG_SHAPER) += shaper.o
......@@ -247,6 +247,8 @@ obj-$(CONFIG_IPDDP) += ipddp.o
obj-$(CONFIG_RCPCI) += rcpci.o
obj-$(CONFIG_MACE) += mace.o
obj-$(CONFIG_MACSONIC) += macsonic.o
obj-$(CONFIG_MACMACE) += macmace.o
obj-$(CONFIG_MAC89x0) += mac89x0.o
obj-$(CONFIG_BMAC) += bmac.o
obj-$(CONFIG_NCR885E) += ncr885e.o
obj-$(CONFIG_ADAPTEC_STARFIRE) += starfire.o
......
......@@ -105,7 +105,13 @@ extern int dec_lance_probe(struct net_device *);
extern int mvme147lance_probe(struct net_device *dev);
extern int tc515_probe(struct net_device *dev);
extern int lance_probe(struct net_device *dev);
extern int mac_onboard_sonic_probe(struct net_device *dev);
extern int mace68k_probe(struct net_device *dev);
extern int macsonic_probe(struct net_device *dev);
extern int mac8390_probe(struct net_device *dev);
extern int mac89x0_probe(struct net_device *dev);
/* Gigabit Ethernet adapters */
extern int yellowfin_probe(struct net_device *dev);
/* Detachable devices ("pocket adaptors") */
extern int atp_init(struct net_device *);
......@@ -355,8 +361,17 @@ struct devprobe m68k_probes[] __initdata = {
#ifdef CONFIG_MVME147_NET /* MVME147 internal Ethernet */
{mvme147lance_probe, 0},
#endif
#ifdef CONFIG_MACSONIC /* Mac 68k Quadra builtin Ethernet */
{mac_onboard_sonic_probe, 0},
#ifdef CONFIG_MACMACE /* Mac 68k Quadra AV builtin Ethernet */
{mace68k_probe, 0},
#endif
#ifdef CONFIG_MACSONIC /* Mac SONIC-based Ethernet of all sorts */
{macsonic_probe, 0},
#endif
#ifdef CONFIG_MAC8390 /* NuBus NS8390-based cards */
{mac8390_probe, 0},
#endif
#ifdef CONFIG_MAC89x0
{mac89x0_probe, 0},
#endif
{NULL, 0},
};
......
......@@ -77,6 +77,12 @@
#define ADD_MASK 0x3000 /* Mask it use of the ADD_PORT register */
#define ADD_SIG 0x3000 /* Expected ID signature */
/* On Macs, we only need use the ISA I/O stuff until we do MEMORY_ON */
#ifdef CONFIG_MAC
#define LCSLOTBASE 0xfee00000
#define MMIOBASE 0x40000
#endif
#define CHIP_EISA_ID_SIG 0x630E /* Product ID Code for Crystal Chip (CS8900 spec 4.3) */
#ifdef IBMEIPKT
......
This diff is collapsed.
......@@ -6,10 +6,12 @@ dep_tristate 'IrTTY (uses Linux serial driver)' CONFIG_IRTTY_SIR $CONFIG_IRDA
dep_tristate 'IrPORT (IrDA serial driver)' CONFIG_IRPORT_SIR $CONFIG_IRDA
comment 'FIR device drivers'
dep_tristate 'NSC PC87108/PC97338' CONFIG_NSC_FIR $CONFIG_IRDA
dep_tristate 'NSC PC87108/PC87338' CONFIG_NSC_FIR $CONFIG_IRDA
dep_tristate 'Winbond W83977AF (IR)' CONFIG_WINBOND_FIR $CONFIG_IRDA
dep_tristate 'Toshiba Type-O IR Port' CONFIG_TOSHIBA_FIR $CONFIG_IRDA
dep_tristate 'SMC IrCC' CONFIG_SMC_IRCC_FIR $CONFIG_IRDA
if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
dep_tristate 'SMC IrCC (Experimental)' CONFIG_SMC_IRCC_FIR $CONFIG_IRDA
fi
comment 'Dongle support'
bool 'Serial dongle support' CONFIG_DONGLE
......@@ -19,9 +21,7 @@ if [ "$CONFIG_DONGLE" != "n" ]; then
dep_tristate ' Tekram IrMate 210B dongle' CONFIG_TEKRAM_DONGLE $CONFIG_IRDA
dep_tristate ' Greenwich GIrBIL dongle' CONFIG_GIRBIL_DONGLE $CONFIG_IRDA
dep_tristate ' Parallax LiteLink dongle' CONFIG_LITELINK_DONGLE $CONFIG_IRDA
dep_tristate ' Adaptec Airport 1000/2000 dongle' CONFIG_AIRPORT_DONGLE $CONFIG_IRDA
dep_tristate ' Old Belkin dongle' CONFIG_OLD_BELKIN_DONGLE $CONFIG_IRDA
fi
endmenu
......@@ -29,10 +29,10 @@ else
endif
ifeq ($(CONFIG_NSC_FIR),y)
L_OBJS += nsc_fir.o
L_OBJS += nsc-ircc.o
else
ifeq ($(CONFIG_NSC_FIR),m)
M_OBJS += nsc_fir.o
M_OBJS += nsc-ircc.o
endif
endif
......@@ -118,14 +118,6 @@ else
endif
endif
ifeq ($(CONFIG_AIRPORT_DONGLE),y)
L_OBJS += airport.o
else
ifeq ($(CONFIG_AIRPORT_DONGLE),m)
M_OBJS += airport.o
endif
endif
ifeq ($(CONFIG_OLD_BELKIN_DONGLE),y)
L_OBJS += old_belkin.o
else
......
/*********************************************************************
*
* Filename: airport.c
* Version: 0.2
* Description: Implementation for the Adaptec Airport 1000 and 2000
* dongles
* Status: Experimental.
* Author: Fons Botman <budely@tref.nl>
* Created at: Wed May 19 23:14:34 CEST 1999
* Based on: actisys.c by Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Fons Botman, 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.
*
* Neither Fons Botman nor anyone else admit liability nor
* provide warranty for any of this software. This material is
* provided "AS-IS" and at no charge.
*
********************************************************************/
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/tty.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <net/irda/irda.h>
#include <net/irda/irmod.h>
#include <net/irda/irda_device.h>
static int airport_reset_wrapper(struct irda_task *task);
static void airport_open(dongle_t *self, struct qos_info *qos);
static void airport_close(dongle_t *self);
static int airport_change_speed_wrapper(struct irda_task *task);
static struct dongle_reg dongle = {
Q_NULL,
IRDA_AIRPORT_DONGLE,
airport_open,
airport_close,
airport_reset_wrapper,
airport_change_speed_wrapper,
};
int __init airport_init(void)
{
int ret;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
ret = irda_device_register_dongle(&dongle);
if (ret < 0)
return ret;
return 0;
}
void airport_cleanup(void)
{
IRDA_DEBUG(2, __FUNCTION__ "()\n");
irda_device_unregister_dongle(&dongle);
}
static void airport_open(dongle_t *self, struct qos_info *qos)
{
qos->baud_rate.bits &=
IR_2400|IR_9600|IR_19200|IR_38400|IR_57600|IR_115200;
/* May need 1ms */
qos->min_turn_time.bits = 0x07;
MOD_INC_USE_COUNT;
}
static void airport_close(dongle_t *self)
{
IRDA_DEBUG(2, __FUNCTION__ "()\n");
/* Power off dongle */
self->set_dtr_rts(self->dev, FALSE, FALSE);
MOD_DEC_USE_COUNT;
}
static void airport_set_command_mode(dongle_t *self)
{
IRDA_DEBUG(2, __FUNCTION__ "()\n");
self->set_dtr_rts(self->dev, FALSE, TRUE);
}
static void airport_set_normal_mode(dongle_t *self)
{
IRDA_DEBUG(2, __FUNCTION__ "()\n");
self->set_dtr_rts(self->dev, TRUE, TRUE);
}
void airport_write_char(dongle_t *self, unsigned char c)
{
int actual;
IRDA_DEBUG(2, __FUNCTION__ "(,0x%x)\n", c & 0xff);
actual = self->write(self->dev, &c, 1);
ASSERT(actual == 1, return;);
}
#define JIFFIES_TO_MSECS(j) ((j)*1000/HZ)
static int airport_waitfor_char(dongle_t *self, unsigned char c)
{
__u8 buf[100];
int i, found = FALSE;
int before;
int len;
IRDA_DEBUG(2, __FUNCTION__ "(,0x%x)\n", c);
/* Sleep approx. 10 ms */
before = jiffies;
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(MSECS_TO_JIFFIES(20));
IRDA_DEBUG(4, __FUNCTION__ " waited %ldms\n",
JIFFIES_TO_MSECS(jiffies - before));
len = self->read(self->dev, buf, 100);
for (i = 0; !found && i < len; i++ ) {
/* IRDA_DEBUG(6, __FUNCTION__ " 0x02x\n", idev->rx_buff.data[i]); */
found = c == buf[i];
}
IRDA_DEBUG(2, __FUNCTION__ " returns %s\n", (found ? "true" : "false"));
return found;
}
static int airport_check_command_mode(dongle_t *self)
{
int i;
int found = FALSE;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(MSECS_TO_JIFFIES(20));
airport_set_command_mode(self);
/* Loop until the time expires (200ms) or we get the magic char. */
for ( i = 0 ; i < 25 ; i++ ) {
airport_write_char(self, 0xff);
if (airport_waitfor_char(self, 0xc3)) {
found = TRUE;
break;
}
}
if (found) {
IRDA_DEBUG(2, __FUNCTION__ " OK. (%d)\n", i);
} else {
IRDA_DEBUG(0, __FUNCTION__ " FAILED!\n");
}
return found;
}
static int airport_write_register(dongle_t *self, unsigned char reg)
{
int ok = FALSE;
int i;
IRDA_DEBUG(4, __FUNCTION__ "(,0x%x)\n", reg);
airport_check_command_mode(self);
for ( i = 0 ; i < 6 ; i++ ) {
airport_write_char(self, reg);
if (!airport_waitfor_char(self, reg))
continue;
/* Now read it back */
airport_write_char(self, (reg << 4) | 0x0f);
if (airport_waitfor_char(self, reg)) {
ok = TRUE;
break;
}
}
airport_set_normal_mode(self);
if (ok) {
IRDA_DEBUG(4, __FUNCTION__ "(,0x%x) returns OK\n", reg);
} else {
IRDA_DEBUG(0, __FUNCTION__ "(,0x%x) returns False!\n", reg);
}
return ok;
}
/*
* Function airport_change_speed (self, speed)
*
* Change speed of the Airport type IrDA dongles.
*/
static void airport_change_speed(dongle_t *self, __u32 speed)
{
__u32 current_baudrate;
int baudcode;
IRDA_DEBUG(4, __FUNCTION__ "(,%d)\n", speed);
ASSERT(self != NULL, return;);
/* Find the correct baudrate code for the required baudrate */
switch (speed) {
case 2400: baudcode = 0x10; break;
case 4800: baudcode = 0x20; break;
case 9600: baudcode = 0x30; break;
case 19200: baudcode = 0x40; break;
case 38400: baudcode = 0x50; break;
case 57600: baudcode = 0x60; break;
case 115200: baudcode = 0x70; break;
default:
IRDA_DEBUG(0, __FUNCTION__ " bad baud rate: %d\n", speed);
return;
}
current_baudrate = self->speed;
IRDA_DEBUG(4, __FUNCTION__ " current baudrate: %d\n", current_baudrate);
self->set_mode(self->dev, IRDA_RAW);
/* Set the new speed in both registers */
if (airport_write_register(self, baudcode)) {
if (airport_write_register(self, baudcode|0x01)) {
/* ok */
} else {
IRDA_DEBUG(0, __FUNCTION__
" Cannot set new speed in second register\n");
}
} else {
IRDA_DEBUG(0, __FUNCTION__
" Cannot set new speed in first register\n");
}
self->set_mode(self->dev, IRDA_IRLAP);
/* How do I signal an error in these functions? */
IRDA_DEBUG(4, __FUNCTION__ " returning\n");
}
int airport_change_speed_wrapper(struct irda_task *task)
{
dongle_t *self = (dongle_t *) task->instance;
__u32 speed = (__u32) task->param;
irda_execute_as_process(self, (TODO_CALLBACK) airport_change_speed,
speed);
irda_task_next_state(task, IRDA_TASK_DONE);
return 0;
}
/*
* Function airport_reset (self)
*
* Reset the Airport type dongle. Warning, this function must only be
* called with a process context!
*
*/
static void airport_reset(dongle_t *self)
{
int ok;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
ASSERT(self != NULL, return;);
self->set_mode(self->dev, IRDA_RAW);
airport_set_normal_mode(self);
/* Sleep 2000 ms */
IRDA_DEBUG(2, __FUNCTION__ " waiting for powerup\n");
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(MSECS_TO_JIFFIES(2000));
IRDA_DEBUG(2, __FUNCTION__ " finished waiting for powerup\n");
/* set dongle speed to 9600 */
ok = TRUE;
if (ok)
ok = airport_write_register(self, 0x30);
if (!ok)
MESSAGE(__FUNCTION__ "() dongle not connected?\n");
if (ok)
ok = airport_write_register(self, 0x31);
if (ok)
ok = airport_write_register(self, 0x02);
if (ok)
ok = airport_write_register(self, 0x03);
if (ok) {
ok = airport_check_command_mode(self);
if (ok) {
airport_write_char(self, 0x04);
ok = airport_waitfor_char(self, 0x04);
}
airport_set_normal_mode(self);
}
self->set_mode(self->dev, IRDA_IRLAP);
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(MSECS_TO_JIFFIES(20));
IRDA_DEBUG(4, __FUNCTION__ " waited 20ms\n");
self->speed = 9600;
if (!ok)
MESSAGE(__FUNCTION__ "() failed.\n");
IRDA_DEBUG(2, __FUNCTION__ " returning.\n");
}
int airport_reset_wrapper(struct irda_task *task)
{
dongle_t *self = (dongle_t *) task->instance;
irda_execute_as_process(self, (TODO_CALLBACK) airport_reset, 0);
irda_task_next_state(task, IRDA_TASK_DONE);
return 0;
}
#ifdef MODULE
MODULE_AUTHOR("Fons Botman <budely@tref.nl>");
MODULE_DESCRIPTION("Adaptec Airport 1000 and 2000 dongle driver");
/*
* Function init_module (void)
*
* Initialize Airport module
*
*/
int init_module(void)
{
return airport_init();
}
/*
* Function cleanup_module (void)
*
* Cleanup Airport module
*
*/
void cleanup_module(void)
{
airport_cleanup();
}
#endif
This diff is collapsed.
......@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Dec 9 21:18:38 1997
* Modified at: Wed Jan 5 14:00:13 2000
* Modified at: Fri Jan 14 21:02:27 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
* Sources: slip.c by Laurence Culhane, <loz@holmes.demon.co.uk>
* Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
......@@ -233,6 +233,8 @@ static int irtty_open(struct tty_struct *tty)
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n");
return -ENOMEM;
}
/* dev_alloc doesn't clear the struct */
memset(((__u8*)dev)+sizeof(char*),0,sizeof(struct net_device)-sizeof(char*));
dev->priv = (void *) self;
self->netdev = dev;
......@@ -654,6 +656,7 @@ static int irtty_hard_xmit(struct sk_buff *skb, struct net_device *dev)
self->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
dev->trans_start = jiffies;
self->stats.tx_bytes += self->tx_buff.len;
if (self->tty->driver.write)
actual = self->tty->driver.write(self->tty, 0,
......@@ -663,9 +666,6 @@ static int irtty_hard_xmit(struct sk_buff *skb, struct net_device *dev)
self->tx_buff.data += actual;
self->tx_buff.len -= actual;
self->stats.tx_packets++;
self->stats.tx_bytes += self->tx_buff.len;
dev_kfree_skb(skb);
return 0;
......@@ -709,6 +709,8 @@ static void irtty_write_wakeup(struct tty_struct *tty)
self->tx_buff.data += actual;
self->tx_buff.len -= actual;
self->stats.tx_packets++;
} else {
/*
* Now serial buffer is almost free & we can start
......
This diff is collapsed.
......@@ -32,37 +32,6 @@
static char *rcsid = "$Id: toshoboe.c,v 1.91 1999/06/29 14:21:06 root Exp $";
/*
* $Log: toshoboe.c,v $
* Revision 1.9 1999/06/29 14:21:06 root
* *** empty log message ***
*
* Revision 1.8 1999/06/29 14:15:08 root
* *** empty log message ***
*
* Revision 1.7 1999/06/29 13:46:42 root
* *** empty log message ***
*
* Revision 1.6 1999/06/29 12:31:03 root
* *** empty log message ***
*
* Revision 1.5 1999/05/12 12:24:39 root
* *** empty log message ***
*
* Revision 1.4 1999/05/12 11:55:08 root
* *** empty log message ***
*
* Revision 1.3 1999/05/09 01:33:12 root
* *** empty log message ***
*
* Revision 1.2 1999/05/09 01:30:38 root
* *** empty log message ***
*
* Revision 1.1 1999/05/09 01:25:04 root
* Initial revision
*
*/
/* Define this to have only one frame in the XMIT or RECV queue */
/* Toshiba's drivers do this, but it disables back to back tansfers */
/* I think that the chip may have some problems certainly, I have */
......@@ -682,7 +651,7 @@ toshoboe_close (struct toshoboe_cb *self)
toshoboe_disablebm (self);
}
release_region (self->io.iobase, self->io.io_ext);
release_region (self->io.sir_base, self->io.sir_ext);
for (i = 0; i < TX_SLOTS; ++i)
......@@ -754,17 +723,17 @@ toshoboe_open (struct pci_dev *pci_dev)
self->pdev = pci_dev;
self->base = pci_dev->resource[0].start;
self->io.iobase = self->base;
self->io.sir_base = self->base;
self->io.irq = pci_dev->irq;
self->io.io_ext = CHIP_IO_EXTENT;
self->io.sir_ext = CHIP_IO_EXTENT;
self->io.speed = 9600;
/* Lock the port that we need */
i = check_region (self->io.iobase, self->io.io_ext);
i = check_region (self->io.sir_base, self->io.sir_ext);
if (i < 0)
{
IRDA_DEBUG (0, __FUNCTION__ "(), can't get iobase of 0x%03x\n",
self->io.iobase);
self->io.sir_base);
dev_self[i] = NULL;
kfree (self);
......@@ -864,13 +833,12 @@ toshoboe_open (struct pci_dev *pci_dev)
}
request_region (self->io.iobase, self->io.io_ext, driver_name);
request_region (self->io.sir_base, self->io.sir_ext, driver_name);
if (!(dev = dev_alloc("irda%d", &err))) {
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n");
return -ENOMEM;
}
dev->priv = (void *) self;
self->netdev = dev;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -26,7 +26,7 @@ if [ "$CONFIG_VISWS" = "y" ]; then
dep_tristate ' SGI Visual Workstation Sound' CONFIG_SOUND_VWSND $CONFIG_SOUND
fi
dep_tristate ' Trident 4DWave-DX/NX' CONFIG_SOUND_TRIDENT $CONFIG_SOUND
dep_tristate ' Trident 4DWave DX/NX or SiS 7018 PCI Audio Core' CONFIG_SOUND_TRIDENT $CONFIG_SOUND
dep_tristate ' Support for Turtle Beach MultiSound Classic, Tahiti, Monterey' CONFIG_SOUND_MSNDCLAS $CONFIG_SOUND
if [ "$CONFIG_SOUND_MSNDCLAS" = "y" -o "$CONFIG_SOUND_MSNDCLAS" = "m" ]; then
......
......@@ -25,7 +25,7 @@ endif
export-objs := ad1848.o audio_syms.o midi_syms.o mpu401.o \
msnd.o opl3.o sb_card.o sequencer_syms.o \
sound_core.o sound_syms.o uart401.o ad1816.o \
nm256_audio.o ac97.o
nm256_audio.o ac97.o ac97_codec.o
......@@ -84,7 +84,7 @@ obj-$(CONFIG_SOUND_ES1370) += es1370.o
obj-$(CONFIG_SOUND_ES1371) += es1371.o
obj-$(CONFIG_SOUND_ESSSOLO1) += esssolo1.o
obj-$(CONFIG_SOUND_MAESTRO) += maestro.o
obj-$(CONFIG_SOUND_TRIDENT) += trident.o
obj-$(CONFIG_SOUND_TRIDENT) += trident.o ac97_codec.o
# Declare multi-part drivers.
......
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.
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