Commit 07e73e00 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.120pre2

parent ed651326
......@@ -212,12 +212,14 @@ S: Nexus Electronics Ltd
S: 10 St Barnabas Road, Cambridge CB1 2BY
S: United Kingdom
N: Thomas Bogendoerfer
N: Thomas Bogendrfer
E: tsbogend@alpha.franken.de
D: PCnet32 driver
D: PCnet32 driver, SONIC driver, JAZZ_ESP driver
D: newport abscon driver, g364 framebuffer driver
D: strace for Linux/Alpha
S: Baumgartenweg 5
S: 91452 Wilhermsdorf
D: Linux/MIPS hacker
S: Schafhofstr. 40
S: 90556 Cadolzburg
S: Germany
N: Bill Bogstad
......@@ -1445,14 +1447,11 @@ S: USA
N: Eric S. Raymond
E: esr@thyrsus.com
W: http://www.ccil.org/~esr/home.html
D: ncurses library co-maintainer
W: http://www.tuxedo.org/~esr/
D: terminfo master file maintainer
D: Distributions HOWTO editor
D: Instigator, FHS standard
D: Keeper of the Jargon File and curator of the Retrocomputing Museum
D: Author, Emacs VC and GUD modes
S: 22 South Warren Avenue
D: Editor: Installation HOWTO, Distributions HOWTO, XFree86 HOWTO
D: Author: fetchmail, Emacs VC mode, Emacs GUD mode
S: 6 Karen Drive
S: Malvern, Pennsylvania 19355
S: USA
......
Sun Jul 2 01:38:33 EST 1995
See also: http://www-uk.hpl.hp.com/people/jt/Linux/Wavelan.html
1. At present the driver autoprobes for a WaveLAN card only at I/O address
0x390. The version of the card that I use (NCR) supports four I/O addresses
(selectable via a pair of DIP switches). If you want the driver to
......
Driver
------
Informations about Audio Excel DSP 16 driver can be found in the source
file lowlevel/aedsp16.c
Please, read the head of the source before using it. It contain useful
informations.
Configuration
-------------
The Audio Excel configuration, is now done with the standard Linux setup.
You have to configure the sound card (Sound Blaster or Microsoft Sound System)
and, if you want it, the Roland MPU-401 (do not use the Sound Blaster MPU-401,
SB-MPU401) in the main driver menu. Activate the lowlevel drivers then select
the Audio Excel hardware that you want to initialize. Check the IRQ/DMA/MIRQ
of the Audio Excel initialization: it must be the same as the SBPRO (or MSS)
setup. If the parameters are different, correct it.
I you own a Gallant's audio card based on SC-6600, activate the SC-6600 support.
If you want to change the configuration of the sound board, be sure to
check off all the configuration items before re-configure it.
Module parameters
-----------------
To use this driver as a module, you must configure some module parameters, to
set up I/O addresses, IRQ lines and DMA channels. Some parameters are
mandatory while some others are optional. Here a list of parameters you can
use with this module:
Name Description
==== ===========
MANDATORY
io I/O base address (0x220 or 0x240)
irq irq line (5, 7, 9, 10 or 11)
dma dma channel (0, 1 or 3)
OPTIONAL
mss_base I/O base address for activate MSS mode (default SBPRO)
(0x530 or 0xE80)
mpu_base I/O base address for activate MPU-401 mode
(0x300, 0x310, 0x320 or 0x330)
mpu_irq MPU-401 irq line (5, 7, 9, 10 or 0)
The /etc/conf.modules will have lines like this:
options opl3 io=0x388
options ad1848 io=0x530 irq=11 dma=3
options aedsp16 io=0x220 irq=11 dma=3 mss_base=0x530
Where the aedsp16 options are the options for this driver while opl3 and
ad1848 are the corresponding options for the MSS and OPL3 modules.
Loading MSS and OPL3 needs to pre load the aedsp16 module to set up correctly
the sound card. Installation dependancies must be written in the conf.modules
file:
pre-install ad1848 modprobe aedsp16
pre-install opl3 modprobe aedsp16
Then you must load the sound modules stack in this order:
sound -> aedsp16 -> [ ad1848, opl3 ]
With the above configuration, loading ad1848 or opl3 modules, will
automatically load all the sound stack.
Sound cards supported
---------------------
This driver supports the SC-6000 and SC-6600 based Gallant's sound card.
It don't support the Audio Excel DSP 16 III (try the SC-6600 code).
I'm working on the III version of the card: if someone have useful
informations about it, please let me know.
For all the non-supported audio cards, you have to boot MS-DOS (or WIN95)
activating the audio card with the MS-DOS device driver, then you have to
<ctrl>-<alt>-<del> and boot Linux.
Follow these steps:
1) Compile Linux kernel with standard sound driver, using the emulation
you want, with the parameters of your audio card,
e.g. Microsoft Sound System irq10 dma3
2) Install your new kernel as the default boot kernel.
3) Boot MS-DOS and configure the audio card with the boot time device
driver, for MSS irq10 dma3 in our example.
4) <ctrl>-<alt>-<del> and boot Linux. This will mantain the DOS configuration
and will boot the new kernel with sound driver. The sound driver will find
the audio card and will recognize and attach it.
Reports on User successes
-------------------------
> Date: Mon, 29 Jul 1996 08:35:40 +0100
> From: Mr S J Greenaway <sjg95@unixfe.rl.ac.uk>
> To: riccardo@cdc8g5.cdc.polimi.it (Riccardo Facchetti)
> Subject: Re: Audio Excel DSP 16 initialization code
>
> Just to let you know got my Audio Excel (emulating a MSS) working
> with my original SB16, thanks for the driver!
Last revised: 20 August 1998
Riccardo Facchetti
fizban@tin.it
......@@ -504,7 +504,7 @@ W: http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html
S: Maintained
PCNET32 NETWORK DRIVER
P: Thomas Bogendoerfer
P: Thomas Bogendrfer
M: tsbogend@alpha.franken.de
L: linux-net@vger.rutgers.edu
S: Maintained
......@@ -563,6 +563,12 @@ M: torvalds@transmeta.com
L: linux-smp@vger.rutgers.edu
S: Maintained
SONIC NETWORK DRIVER
P: Thomas Bogendoerfer
M: tsbogend@alpha.franken.de
L: linux-net@vger.rutgers.edu
S: Maintained
SOUND
P: Alan Cox
M: alan@redhat.com
......
......@@ -921,9 +921,10 @@ static int __init timer_irq_works(void)
static inline void self_IPI(unsigned int irq)
{
irq_desc_t *desc = irq_desc + irq;
unsigned int status = desc->status;
if (desc->events && !desc->ipi) {
desc->ipi = 1;
if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
desc->status = status | IRQ_REPLAY;
send_IPI(APIC_DEST_SELF, IO_APIC_VECTOR(irq));
}
}
......@@ -960,6 +961,7 @@ static void do_edge_ioapic_IRQ(unsigned int irq, int cpu, struct pt_regs * regs)
{
irq_desc_t *desc = irq_desc + irq;
struct irqaction * action;
unsigned int status;
spin_lock(&irq_controller_lock);
......@@ -968,19 +970,19 @@ static void do_edge_ioapic_IRQ(unsigned int irq, int cpu, struct pt_regs * regs)
* and do not need to be masked.
*/
ack_APIC_irq();
desc->ipi = 0;
desc->events = 1;
status = desc->status & ~IRQ_REPLAY;
status |= IRQ_PENDING;
/*
* If the IRQ is disabled for whatever reason, we cannot
* use the action we have.
*/
action = NULL;
if (!(desc->status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
action = desc->action;
desc->status = IRQ_INPROGRESS;
desc->events = 0;
status &= ~IRQ_PENDING;
}
desc->status = status | IRQ_INPROGRESS;
spin_unlock(&irq_controller_lock);
/*
......@@ -996,18 +998,15 @@ static void do_edge_ioapic_IRQ(unsigned int irq, int cpu, struct pt_regs * regs)
* pending events.
*/
for (;;) {
int pending;
handle_IRQ_event(irq, regs);
spin_lock(&irq_controller_lock);
pending = desc->events;
desc->events = 0;
if (!pending)
if (!(desc->status & IRQ_PENDING))
break;
desc->status &= ~IRQ_PENDING;
spin_unlock(&irq_controller_lock);
}
desc->status &= IRQ_DISABLED;
desc->status &= ~IRQ_INPROGRESS;
spin_unlock(&irq_controller_lock);
irq_exit(cpu, irq);
......@@ -1018,6 +1017,7 @@ static void do_level_ioapic_IRQ(unsigned int irq, int cpu,
{
irq_desc_t *desc = irq_desc + irq;
struct irqaction * action;
unsigned int status;
spin_lock(&irq_controller_lock);
/*
......@@ -1029,18 +1029,17 @@ static void do_level_ioapic_IRQ(unsigned int irq, int cpu,
* So this all has to be within the spinlock.
*/
mask_IO_APIC_irq(irq);
desc->ipi = 0;
status = desc->status & ~IRQ_REPLAY;
/*
* If the IRQ is disabled for whatever reason, we must
* not enter the IRQ action.
*/
action = NULL;
if (!(desc->status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
action = desc->action;
desc->status = IRQ_INPROGRESS;
}
desc->status = status | IRQ_INPROGRESS;
ack_APIC_irq();
spin_unlock(&irq_controller_lock);
......@@ -1055,7 +1054,7 @@ static void do_level_ioapic_IRQ(unsigned int irq, int cpu,
spin_lock(&irq_controller_lock);
desc->status &= ~IRQ_INPROGRESS;
if (!desc->status)
if (!(desc->status & IRQ_DISABLED))
unmask_IO_APIC_irq(irq);
spin_unlock(&irq_controller_lock);
......
......@@ -105,8 +105,8 @@ static struct hw_interrupt_type i8259A_irq_type = {
};
irq_desc_t irq_desc[NR_IRQS] = {
[0 ... 15] = { 0, 0, 0, &i8259A_irq_type, }, /* default to standard ISA IRQs */
[16 ... 63] = { 0, 0, 0, &no_irq_type, }, /* 'high' PCI IRQs filled in on demand */
[0 ... 15] = { 0, &i8259A_irq_type, }, /* default to standard ISA IRQs */
[16 ... 63] = { 0, &no_irq_type, }, /* 'high' PCI IRQs filled in on demand */
};
int irq_vector[NR_IRQS] = { IRQ0_TRAP_VECTOR , 0 };
......@@ -663,7 +663,8 @@ static void do_8259A_IRQ(unsigned int irq, int cpu, struct pt_regs * regs)
if (handle_IRQ_event(irq, regs)) {
spin_lock(&irq_controller_lock);
if (!(irq_desc[irq].status &= IRQ_DISABLED))
irq_desc[irq].status &= ~IRQ_INPROGRESS;
if (!(irq_desc[irq].status & IRQ_DISABLED))
enable_8259A_irq(irq);
spin_unlock(&irq_controller_lock);
}
......@@ -683,10 +684,6 @@ void disable_irq(unsigned int irq)
unsigned long flags;
spin_lock_irqsave(&irq_controller_lock, flags);
/*
* At this point we may actually have a pending interrupt being active
* on another CPU. So don't touch the IRQ_INPROGRESS bit..
*/
irq_desc[irq].status |= IRQ_DISABLED;
irq_desc[irq].handler->disable(irq);
spin_unlock_irqrestore(&irq_controller_lock, flags);
......@@ -793,6 +790,7 @@ int setup_x86_irq(unsigned int irq, struct irqaction * new)
*p = new;
if (!shared) {
irq_desc[irq].status = 0;
#ifdef __SMP__
if (IO_APIC_IRQ(irq)) {
/*
......@@ -803,11 +801,10 @@ int setup_x86_irq(unsigned int irq, struct irqaction * new)
if (irq < 16) {
disable_8259A_irq(irq);
if (i8259A_irq_pending(irq))
irq_desc[irq].events = 1;
irq_desc[irq].status = IRQ_PENDING;
}
}
#endif
irq_desc[irq].status = 0;
irq_desc[irq].handler->enable(irq);
}
spin_unlock_irqrestore(&irq_controller_lock,flags);
......@@ -863,8 +860,10 @@ void free_irq(unsigned int irq, void *dev_id)
/* Found it - now free it */
*p = action->next;
kfree(action);
if (!irq_desc[irq].action)
if (!irq_desc[irq].action) {
irq_desc[irq].status |= IRQ_DISABLED;
irq_desc[irq].handler->disable(irq);
}
goto out;
}
printk("Trying to free free IRQ%d\n",irq);
......@@ -891,7 +890,7 @@ unsigned long probe_irq_on (void)
spin_lock_irq(&irq_controller_lock);
for (i = NR_IRQS-1; i > 0; i--) {
if (!irq_desc[i].action) {
irq_desc[i].status = 0;
irq_desc[i].status &= ~IRQ_INPROGRESS;
irq_desc[i].handler->enable(i);
irqs |= (1 << i);
}
......@@ -948,10 +947,9 @@ __initfunc(void init_IRQ(void))
outb_p(LATCH & 0xff , 0x40); /* LSB */
outb(LATCH >> 8 , 0x40); /* MSB */
for (i=0; i<NR_IRQS; i++) {
irq_desc[i].events = 0;
irq_desc[i].status = 0;
}
for (i=0; i<NR_IRQS; i++)
irq_desc[i].status = IRQ_DISABLED;
/*
* 16 old-style INTA-cycle interrupt gates:
*/
......
......@@ -16,12 +16,12 @@ struct hw_interrupt_type {
/*
* Status: reason for being disabled: somebody has
* done a "disable_irq()" or we must not re-enter the
* already executing irq..
* IRQ line status.
*/
#define IRQ_INPROGRESS 1
#define IRQ_DISABLED 2
#define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */
#define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */
#define IRQ_PENDING 4 /* IRQ pending - replay on enable */
#define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */
/*
* This is the "IRQ descriptor", which contains various information
......@@ -32,8 +32,6 @@ struct hw_interrupt_type {
*/
typedef struct {
unsigned int status; /* IRQ status - IRQ_INPROGRESS, IRQ_DISABLED */
unsigned int events; /* Do we have any pending events? */
unsigned int ipi; /* Have we sent off the pending IPI? */
struct hw_interrupt_type *handler; /* handle/enable/disable functions */
struct irqaction *action; /* IRQ action list */
unsigned int unused[3];
......
......@@ -371,7 +371,7 @@ __initfunc(static int smp_read_mpc(struct mp_config_table *mpc))
/*
* we use the first one only currently
*/
if (!ioapics)
if (ioapics == 1)
mp_ioapic_addr = m->mpc_apicaddr;
}
mpt+=sizeof(*m);
......
......@@ -38,8 +38,12 @@ static int pmac_ide_dmaproc(ide_dma_action_t func, ide_drive_t *drive);
static int pmac_ide_build_dmatable(ide_drive_t *drive, int wr);
#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
__initfunc(void
pmac_ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base, int *irq))
/*
* N.B. this can't be an initfunc, because the media-bay task can
* call ide_[un]register at any time.
*/
void
pmac_ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base, int *irq)
{
int i;
......
......@@ -1657,7 +1657,7 @@ void ide_unregister (unsigned int index)
ide_drive_t *drive, *d;
ide_hwif_t *hwif, *g;
ide_hwgroup_t *hwgroup;
int irq_count = 0, unit;
int irq_count = 0, unit, i;
unsigned long flags;
if (index >= MAX_HWIFS)
......@@ -1704,8 +1704,8 @@ void ide_unregister (unsigned int index)
* the hwgroup if we were the only member
*/
d = hwgroup->drive;
for (index = 0; index < MAX_DRIVES; ++index) {
drive = &hwif->drives[index];
for (i = 0; i < MAX_DRIVES; ++i) {
drive = &hwif->drives[i];
if (!drive->present)
continue;
while (hwgroup->drive->next != drive)
......
......@@ -61,13 +61,20 @@ static int requests_out;
static int nbd_open(struct inode *inode, struct file *file)
{
int dev;
struct nbd_device *nbdev;
if (!inode)
return -EINVAL;
dev = MINOR(inode->i_rdev);
if (dev >= MAX_NBD)
return -ENODEV;
nbdev = &nbd_dev[dev];
nbd_dev[dev].refcnt++;
if (!(nbdev->flags & NBD_INITIALISED)) {
nbdev->queue_lock = MUTEX;
nbdev->flags |= NBD_INITIALISED;
}
MOD_INC_USE_COUNT;
return 0;
}
......@@ -82,6 +89,7 @@ static int nbd_xmit(int send, struct socket *sock, char *buf, int size)
struct msghdr msg;
struct iovec iov;
unsigned long flags;
sigset_t oldset;
oldfs = get_fs();
set_fs(get_ds());
......@@ -94,8 +102,6 @@ static int nbd_xmit(int send, struct socket *sock, char *buf, int size)
do {
sigset_t oldset;
iov.iov_base = buf;
iov.iov_len = size;
msg.msg_name = NULL;
......@@ -209,16 +215,18 @@ void nbd_do_it(struct nbd_device *lo)
req = nbd_read_stat(lo);
if (!req)
return;
down (&lo->queue_lock);
#ifdef PARANOIA
if (req != lo->tail) {
printk(KERN_ALERT "NBD: I have problem...\n");
}
if (lo != &nbd_dev[MINOR(req->rq_dev)]) {
printk(KERN_ALERT "NBD: request corrupted!\n");
continue;
goto next;
}
if (lo->magic != LO_MAGIC) {
printk(KERN_ALERT "NBD: nbd_dev[] corrupted: Not enough magic\n");
up (&lo->queue_lock);
return;
}
#endif
......@@ -231,6 +239,8 @@ void nbd_do_it(struct nbd_device *lo)
lo->head = NULL;
}
lo->tail = lo->tail->next;
next:
up (&lo->queue_lock);
}
}
......@@ -291,7 +301,7 @@ static void do_nbd_request(void)
lo = &nbd_dev[dev];
if (!lo->file)
FAIL("Request when not-ready.");
if ((req->cmd == WRITE) && (lo->flags && NBD_READ_ONLY))
if ((req->cmd == WRITE) && (lo->flags & NBD_READ_ONLY))
FAIL("Write on read-only");
#ifdef PARANOIA
if (lo->magic != LO_MAGIC)
......@@ -301,6 +311,9 @@ static void do_nbd_request(void)
req->errors = 0;
CURRENT = CURRENT->next;
req->next = NULL;
spin_unlock_irq(&io_request_lock);
down (&lo->queue_lock);
if (lo->head == NULL) {
lo->head = req;
lo->tail = req;
......@@ -309,8 +322,8 @@ static void do_nbd_request(void)
lo->head = req;
}
spin_unlock_irq(&io_request_lock);
nbd_send_req(lo->sock, req); /* Why does this block? */
up (&lo->queue_lock);
spin_lock_irq(&io_request_lock);
continue;
......
......@@ -969,7 +969,7 @@ static struct file_operations floppy_fops = {
NULL, /* mmap */
floppy_open, /* open */
NULL, /* flush */
floppy_release, /* release *
floppy_release, /* release */
block_fsync, /* fsync */
NULL, /* fasync */
floppy_check_change, /* check_media_change */
......
......@@ -85,7 +85,7 @@ static unsigned int remap[BTTV_MAX]; /* remap Bt848 */
static unsigned int radio[BTTV_MAX];
static unsigned int card[BTTV_MAX] = { 0, 0,
0, 0 };
static unsigned int pll[BTTV_MAX] = { 0, 0, 0, 0 };
static unsigned int pll[BTTV_MAX] = { 0, 0, 0, 0 };
static int bttv_num; /* number of Bt848s in use */
static struct bttv bttvs[BTTV_MAX];
......@@ -545,30 +545,25 @@ static int set_pll(struct bttv *btv)
int i;
unsigned long tv;
if (!btv->pll)
if (!btv->pll.pll_crystal)
return 0;
if ((btread(BT848_IFORM)&BT848_IFORM_XT0))
if ((btread(BT848_IFORM)&btv->pll.pll_crystal))
{
/* printk ("switching PLL off\n");*/
btwrite(0x00,BT848_TGCTRL);
btwrite(0x00,BT848_PLL_XCI);
btv->pll&=~2;
btv->pll.pll_crystal&=~2;
return 0;
}
/* do not set pll again if already active */
if (btv->pll&2)
if (btv->pll.pll_crystal&2)
return 1;
/* printk ("setting PLL for PAL/SECAM\n");*/
set_pll_freq(btv, 28636363, 35468950);
/*
btwrite(0x00,BT848_TGCTRL);
btwrite(0xf9,BT848_PLL_F_LO);
btwrite(0xdc,BT848_PLL_F_HI);
btwrite(14|BT848_PLL_X,BT848_PLL_XCI);
*/
set_pll_freq(btv, btv->pll.pll_ifreq, btv->pll.pll_ofreq);
/*
* Let other people run while the PLL stabilizes
*/
......@@ -587,7 +582,7 @@ static int set_pll(struct bttv *btv)
else
{
btwrite(0x08,BT848_TGCTRL);
btv->pll|=2;
btv->pll.pll_crystal|=2;
return 1;
}
udelay(10000);
......@@ -1179,7 +1174,7 @@ static void set_freq(struct bttv *btv, unsigned short freq)
audio(btv, AUDIO_MUTE);
udelay(AUDIO_MUTE_DELAY);
if (radio[btv->nr])
if (btv->radio)
{
if (btv->have_tuner)
i2c_control_device(&(btv->i2c), I2C_DRIVERID_TUNER,
......@@ -1831,12 +1826,22 @@ static int bttv_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
return -EFAULT;
break;
case BTTV_FIELDNR:
case BTTV_FIELDNR:
if(copy_to_user((void *) arg, (void *) &btv->last_field,
sizeof(btv->last_field)))
return -EFAULT;
break;
case BTTV_PLLSET: {
struct bttv_pll_info p;
if(copy_from_user(&p , (void *) arg, sizeof(btv->pll)))
return -EFAULT;
btv->pll.pll_ifreq = p.pll_ifreq;
btv->pll.pll_ofreq = p.pll_ofreq;
btv->pll.pll_crystal = p.pll_crystal;
break;
}
case VIDIOCMCAPTURE:
{
struct video_mmap vm;
......@@ -2902,12 +2907,16 @@ int configure_bt848(struct pci_dev *dev, int bttv_num)
printk("irq: %d, ",btv->irq);
printk("memory: 0x%08x.\n", btv->bt848_adr);
btv->pll=0;
btv->pll.pll_ifreq=0;
btv->pll.pll_ifreq=0;
btv->pll.pll_crystal=0;
if(pll[btv->nr])
if (!(btv->id==848 && btv->revision==0x11))
{
printk(KERN_INFO "bttv%d: internal PLL, single crystal operation enabled\n",bttv_num);
btv->pll=1;
btv->pll.pll_ofreq=28636363;
btv->pll.pll_ifreq=35468950;
btv->pll.pll_crystal=BT848_IFORM_XT1;
}
btv->bt848_mem=ioremap(btv->bt848_adr, 0x1000);
......@@ -3088,3 +3097,4 @@ void cleanup_module(void)
* tab-width: 8
* End:
*/
......@@ -57,6 +57,12 @@ struct bttv_window
};
struct bttv_pll_info {
unsigned int pll_ifreq; /* PLL input frequency */
unsigned int pll_ofreq; /* PLL output frequency */
unsigned int pll_crystal; /* Crystal used for input */
};
struct bttv
{
struct video_device video_dev;
......@@ -130,14 +136,13 @@ struct bttv
int grab;
int grabcount;
int pll;
struct bttv_pll_info pll;
unsigned int Fsc;
unsigned int field;
unsigned int last_field; /* number of last grabbed field */
int i2c_command;
int triton1;
};
#endif
/*The following should be done in more portable way. It depends on define
......@@ -161,6 +166,7 @@ struct bttv
#define BTTV_WRITEE _IOR('v', BASE_VIDIOCPRIVATE+1, char [256])
#define BTTV_GRAB _IOR('v' , BASE_VIDIOCPRIVATE+2, struct gbuf)
#define BTTV_FIELDNR _IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int)
#define BTTV_PLLSET _IOW('v' , BASE_VIDIOCPRIVATE+3, struct bttv_pll_info)
#define BTTV_UNKNOWN 0x00
......
......@@ -62,34 +62,41 @@ unsigned char pckbd_sysrq_xlate[128] =
__initfunc(static int kbd_wait_for_input(void))
{
int status, data;
unsigned long start = jiffies;
long timeout = KBD_INIT_TIMEOUT;
int retval = -1;
do {
status = inb(KBD_STATUS_REG);
/*
* Wait for input data to become available. This bit will
* then be cleared by the following read of the DATA
* register.
*/
if (!(status & KBD_STAT_OBF))
goto in_loop;
for (;;) {
unsigned char status, data;
if (--timeout < 0)
break;
mdelay(1);
in_loop:
status = inb(KBD_STATUS_REG);
/*
* Wait for input data to become available. This bit will
* then be cleared by the following read of the DATA
* register.
*/
if (!(status & KBD_STAT_OBF))
continue;
data = inb(KBD_DATA_REG);
/*
* Check to see if a timeout error has occurred. This means
* that transmission was started but did not complete in the
* normal time cycle. PERR is set when a parity error occurred
* in the last transmission.
*/
if (status & (KBD_STAT_GTO | KBD_STAT_PERR)) {
/*
* Check to see if a timeout error has occurred. This means
* that transmission was started but did not complete in the
* normal time cycle. PERR is set when a parity error occurred
* in the last transmission.
*/
if (status & (KBD_STAT_GTO | KBD_STAT_PERR))
continue;
}
return (data & 0xff);
} while (jiffies - start < KBD_INIT_TIMEOUT);
return -1; /* timed-out if fell through to here... */
retval = data;
break;
}
return retval;
}
__initfunc(static void kbd_write(int address, int data))
......@@ -144,14 +151,14 @@ __initfunc(static char *initialize_kbd2(void))
* Set up to try again if the keyboard asks for RESEND.
*/
do {
do {
kbd_write(KBD_DATA_REG, KBD_CMD_RESET);
status = kbd_wait_for_input();
if (status == KBD_REPLY_ACK)
status = kbd_wait_for_input();
if (status == KBD_REPLY_ACK)
break;
else if (status != KBD_REPLY_RESEND)
else if (status != KBD_REPLY_RESEND)
return "Keyboard reset failed, no ACK";
} while (1);
} while (1);
if (kbd_wait_for_input() != KBD_REPLY_POR)
return "Keyboard reset failed, no POR";
......@@ -174,9 +181,9 @@ __initfunc(static char *initialize_kbd2(void))
kbd_write(KBD_CNTL_REG, KBD_CCMD_WRITE_MODE);
kbd_write(KBD_DATA_REG, KBD_MODE_KBD_INT
| KBD_MODE_SYS
| KBD_MODE_DISABLE_MOUSE
| KBD_MODE_KCC);
| KBD_MODE_SYS
| KBD_MODE_DISABLE_MOUSE
| KBD_MODE_KCC);
/* ibm powerpc portables need this to use scan-code set 1 -- Cort */
kbd_write(KBD_CNTL_REG, KBD_CCMD_READ_MODE);
......@@ -439,7 +446,7 @@ static int do_acknowledge(unsigned char scancode)
int pckbd_pretranslate(unsigned char scancode, char raw_mode)
{
if (scancode == 0xff) {
/* in scancode mode 1, my ESC key generates 0xff */
/* in scancode mode 1, my ESC key generates 0xff */
/* the calculator keys on a FOCUS 9000 generate 0xff */
#ifndef KBD_IS_FOCUS_9000
#ifdef KBD_REPORT_ERR
......
......@@ -15,7 +15,7 @@
#define KBD_REPORT_TIMEOUTS /* Report keyboard timeouts */
#undef KBD_IS_FOCUS_9000 /* We have the brain-damaged FOCUS-9000 keyboard */
#define KBD_INIT_TIMEOUT HZ /* Timeout in jiffies for initializing the keyboard */
#define KBD_INIT_TIMEOUT 1000 /* Timeout in ms for initializing the keyboard */
#define KBC_TIMEOUT 250 /* Timeout in ms for sending to keyboard controller */
#define KBD_TIMEOUT 1000 /* Timeout in ms for keyboard command acknowledge */
......
......@@ -255,20 +255,6 @@ static void pms_brightness(short brightness)
}
}
static void pms_hstart(short start)
{
switch(decoder)
{
case PHILIPS1:
i2c_write(0x8A, 0x05, start);
i2c_write(0x8A, 0x18, start);
break;
case PHILIPS2:
i2c_write(0x42, 0x05, start);
i2c_write(0x42, 0x18, start);
break;
}
}
static void pms_format(short format)
{
......@@ -303,6 +289,29 @@ static void pms_format(short format)
}
}
#ifdef FOR_FUTURE_EXPANSION
/*
* These features of the PMS card are not currently exposes. They
* could become a private v4l ioctl for PMSCONFIG or somesuch if
* people need it. We also don't yet use the PMS interrupt.
*/
static void pms_hstart(short start)
{
switch(decoder)
{
case PHILIPS1:
i2c_write(0x8A, 0x05, start);
i2c_write(0x8A, 0x18, start);
break;
case PHILIPS2:
i2c_write(0x42, 0x05, start);
i2c_write(0x42, 0x18, start);
break;
}
}
/*
* Bandpass filters
*/
......@@ -347,14 +356,6 @@ static void pms_vertnoise(short noise)
i2c_andor(0x42, 0x10, 0xFC, noise&3);
}
static void pms_secamcross(short cross)
{
if(decoder==PHILIPS2)
i2c_andor(0x8A, 0x0F, 0xDF, (cross&1)<<5);
else if(decoder==PHILIPS1)
i2c_andor(0x42, 0x0F, 0xDF, (cross&1)<<5);
}
static void pms_forcecolour(short colour)
{
if(decoder==PHILIPS2)
......@@ -409,20 +410,6 @@ static void pms_killcolour(short colour)
}
}
static void pms_swsense(short sense)
{
if(decoder==PHILIPS2)
{
i2c_write(0x8A, 0x0A, sense);
i2c_write(0x8A, 0x0B, sense);
}
else if(decoder==PHILIPS1)
{
i2c_write(0x42, 0x0A, sense);
i2c_write(0x42, 0x0B, sense);
}
}
static void pms_chromagain(short chroma)
{
if(decoder==PHILIPS2)
......@@ -446,6 +433,38 @@ static void pms_spacialcomph(short data)
mvv_write(0x3A, data);
}
static void pms_vstart(short start)
{
mvv_write(0x16, start);
mvv_write(0x17, (start>>8)&0x01);
}
#endif
static void pms_secamcross(short cross)
{
if(decoder==PHILIPS2)
i2c_andor(0x8A, 0x0F, 0xDF, (cross&1)<<5);
else if(decoder==PHILIPS1)
i2c_andor(0x42, 0x0F, 0xDF, (cross&1)<<5);
}
static void pms_swsense(short sense)
{
if(decoder==PHILIPS2)
{
i2c_write(0x8A, 0x0A, sense);
i2c_write(0x8A, 0x0B, sense);
}
else if(decoder==PHILIPS1)
{
i2c_write(0x42, 0x0A, sense);
i2c_write(0x42, 0x0B, sense);
}
}
static void pms_framerate(short frr)
{
int fps=(standard==1)?30:25;
......@@ -586,11 +605,6 @@ static void pms_resolution(short width, short height)
mvv_write(0x33, MVVMEMORYWIDTH);
}
static void pms_vstart(short start)
{
mvv_write(0x16, start);
mvv_write(0x17, (start>>8)&0x01);
}
/*
* Set Input
......
......@@ -172,6 +172,9 @@ static int saa5249_attach(struct i2c_device *device)
kfree(vd);
return -ENOMEM;
}
memset(t, 0, sizeof(*t));
for (pgbuf = 0; pgbuf < NUM_DAUS; pgbuf++)
{
memset(t->vdau[pgbuf].pgbuf, ' ', sizeof(t->vdau[0].pgbuf));
......@@ -680,6 +683,7 @@ static struct video_device saa_template=
saa5249_release,
saa5249_read,
saa5249_write,
NULL, /* poll */
saa5249_ioctl,
NULL,
NULL,
......
......@@ -399,11 +399,21 @@
from report & fix by <paubert@iram.es>.
Fix probe bug with EISA & PCI cards present from
report by <eirik@netcom.com>.
0.541 24-Aug-98 Fix compiler problems associated with i386-string
ops from multiple bug reports and temporary fix
from <paubert@iram.es>.
Fix pci_probe() to correctly emulate the old
pcibios_find_class() function.
Add an_exception() for old ZYNX346 and fix compile
warning on PPC & SPARC, from <ecd@skynet.be>.
Fix lastPCI to correctly work with compiled in
kernels and modules from bug report by
<Zlatko.Calusic@CARNet.hr> et al.
=========================================================================
*/
static const char *version = "de4x5.c:V0.540 1998/7/5 davies@maniac.ultranet.com\n";
static const char *version = "de4x5.c:V0.541 1998/8/24 davies@maniac.ultranet.com\n";
#include <linux/config.h>
#include <linux/module.h>
......@@ -954,6 +964,7 @@ static void SetMulticastFilter(struct device *dev);
static int get_hw_addr(struct device *dev);
static void srom_repair(struct device *dev, int card);
static int test_bad_enet(struct device *dev, int status);
static int an_exception(struct bus_type *lp);
#if !defined(__sparc_v9__) && !defined(__powerpc__)
static void eisa_probe(struct device *dev, u_long iobase);
#endif
......@@ -1013,6 +1024,7 @@ static int num_de4x5s = 0;
static int cfrv = 0, useSROM = 0;
static int lastPCI = -1;
static struct device *lastModule = NULL;
static struct pci_dev *pdev = NULL;
/*
** List the SROM infoleaf functions and chipsets
......@@ -2103,7 +2115,6 @@ pci_probe(struct device *dev, u_long ioaddr))
u_int irq = 0, device, class = DE4X5_CLASS_CODE;
u_long iobase = 0; /* Clear upper 32 bits in Alphas */
struct bus_type *lp = &bus;
struct pci_dev *pdev = NULL;
if (lastPCI == NO_MORE_PCI) return;
......@@ -2123,7 +2134,7 @@ pci_probe(struct device *dev, u_long ioaddr))
dnum = 0;
}
for (index=lastPCI+1; (pdev=pci_find_class(class, pdev))!=NULL; index++) {
for (index=lastPCI+1;(pdev = pci_find_class(class, pdev))!=NULL;index++) {
dev_num = PCI_SLOT(pdev->devfn);
pb = pdev->bus->number;
if ((pbus || dnum) && ((pbus != pb) || (dnum != dev_num))) continue;
......@@ -2185,10 +2196,8 @@ pci_probe(struct device *dev, u_long ioaddr))
dev->irq = irq;
if ((status = de4x5_hw_init(dev, iobase)) == 0) {
num_de4x5s++;
if (loading_module) {
link_modules(lastModule, dev);
lastPCI = index;
}
lastPCI = index;
if (loading_module) link_modules(lastModule, dev);
return;
}
} else if (ioaddr != 0) {
......@@ -2209,27 +2218,26 @@ pci_probe(struct device *dev, u_long ioaddr))
** For single port cards this is a time waster...
*/
__initfunc(static void
srom_search(struct pci_dev *pdev))
srom_search(struct pci_dev *dev))
{
u_char pb;
u_short vendor, status;
u_int irq = 0, device, class = DE4X5_CLASS_CODE;
u_int irq = 0, device;
u_long iobase = 0; /* Clear upper 32 bits in Alphas */
int i, j;
struct bus_type *lp = &bus;
while ((pdev = pci_find_class(class, pdev))!= NULL) {
if (lp->bus_num != pdev->bus->number) return;
pb = pdev->bus->number;
vendor = pdev->vendor;
device = pdev->device << 8;
for (; (dev=dev->sibling)!= NULL;) {
pb = dev->bus->number;
vendor = dev->vendor;
device = dev->device << 8;
if (!(is_DC21040 || is_DC21041 || is_DC21140 || is_DC2114x)) continue;
/* Get the chip configuration revision register */
pcibios_read_config_dword(pb, pdev->devfn, PCI_REVISION_ID, &cfrv);
pcibios_read_config_dword(pb, dev->devfn, PCI_REVISION_ID, &cfrv);
/* Set the device number information */
lp->device = PCI_SLOT(pdev->devfn);
lp->device = PCI_SLOT(dev->devfn);
lp->bus_num = pb;
/* Set the chipset information */
......@@ -2237,14 +2245,14 @@ srom_search(struct pci_dev *pdev))
lp->chipset = device;
/* Get the board I/O address (64 bits on sparc64) */
iobase = pdev->base_address[0] & CBIO_MASK;
iobase = dev->base_address[0] & CBIO_MASK;
/* Fetch the IRQ to be used */
irq = pdev->irq;
irq = dev->irq;
if ((irq == 0) || (irq == 0xff) || ((int)irq == -1)) continue;
/* Check if I/O accesses are enabled */
pcibios_read_config_word(pb, pdev->devfn, PCI_COMMAND, &status);
pcibios_read_config_word(pb, dev->devfn, PCI_COMMAND, &status);
if (!(status & PCI_COMMAND_IO)) continue;
/* Search for a valid SROM attached to this DECchip */
......@@ -4204,7 +4212,9 @@ test_bad_enet(struct device *dev, int status)
if (dev->dev_addr[i] != 0) break;
}
for (i=0; i<ETH_ALEN; i++) last.addr[i] = dev->dev_addr[i];
dev->irq = last.irq;
if (!an_exception(lp)) {
dev->irq = last.irq;
}
status = 0;
}
......@@ -4218,6 +4228,20 @@ test_bad_enet(struct device *dev, int status)
return status;
}
/*
** List of board exceptions with correctly wired IRQs
*/
static int
an_exception(struct bus_type *lp)
{
if ((*(u_short *)lp->srom.sub_vendor_id == 0x00c0) &&
(*(u_short *)lp->srom.sub_system_id == 0x95e0)) {
return -1;
}
return 0;
}
/*
** SROM Read
*/
......@@ -5788,14 +5812,12 @@ static int
count_adapters(void)
{
int i, j=0;
char name[DE4X5_STRLEN];
u_char pb, dev_fn;
u_short vendor;
u_int class = DE4X5_CLASS_CODE;
u_int device;
struct pci_dev *pdev;
#if !defined(__sparc_v9__) && !defined(__powerpc__)
char name[DE4X5_STRLEN];
u_long iobase = 0x1000;
for (i=1; i<MAX_EISA_SLOTS; i++, iobase+=EISA_SLOT_INC) {
......@@ -5804,13 +5826,7 @@ count_adapters(void)
#endif
if (!pcibios_present()) return j;
for (i=0;
(pcibios_find_class(class, i, &pb, &dev_fn)!= PCIBIOS_DEVICE_NOT_FOUND);
i++) {
for (pdev = pci_devices; pdev; pdev = pdev->next) {
if ((pdev->bus->number==pb) && (pdev->devfn==dev_fn)) break;
}
for (i=0; (pdev=pci_find_class(class, pdev))!= NULL; i++) {
vendor = pdev->vendor;
device = pdev->device << 8;
if (is_DC21040 || is_DC21041 || is_DC21140 || is_DC2114x) j++;
......
......@@ -13,7 +13,7 @@
* This driver is for PCnet32 and PCnetPCI based ethercards
*/
static const char *version = "pcnet32.c:v1.00 30.5.98 tsbogend@alpha.franken.de\n";
static const char *version = "pcnet32.c:v1.01 29.8.98 tsbogend@alpha.franken.de\n";
#include <linux/config.h>
#include <linux/module.h>
......@@ -98,6 +98,9 @@ static const int rx_copybreak = 200;
* back port to 2.0.x
* v1.00: added some stuff from Donald Becker's 2.0.34 version
* added support for byte counters in net_dev_stats
* v1.01: do ring dumps, only when debugging the driver
* increased the transmit timeout
*
*/
......@@ -573,15 +576,14 @@ pcnet32_start_xmit(struct sk_buff *skb, struct device *dev)
/* Transmitter timeout, serious problems. */
if (dev->tbusy) {
int tickssofar = jiffies - dev->trans_start;
if (tickssofar < 20)
if (tickssofar < HZ/2)
return 1;
outw(0, ioaddr+PCNET32_ADDR);
printk("%s: transmit timed out, status %4.4x, resetting.\n",
dev->name, inw(ioaddr+PCNET32_DATA));
outw(0x0004, ioaddr+PCNET32_DATA);
lp->stats.tx_errors++;
#ifndef final_version
{
if (pcnet32_debug > 2) {
int i;
printk(" Ring data dump: dirty_tx %d cur_tx %d%s cur_rx %d.",
lp->dirty_tx, lp->cur_tx, lp->tx_full ? " (full)" : "",
......@@ -596,7 +598,6 @@ pcnet32_start_xmit(struct sk_buff *skb, struct device *dev)
lp->tx_ring[i].misc, (unsigned)lp->tx_ring[i].status);
printk("\n");
}
#endif
pcnet32_restart(dev, 0x0042);
dev->tbusy = 0;
......
......@@ -6,9 +6,6 @@
*/
#include <linux/tasks.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <linux/parport.h>
#include <linux/delay.h>
#include <linux/errno.h>
......@@ -21,7 +18,10 @@
#include <linux/lp.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/uaccess.h>
#undef DEBUG_PROBE
static inline int read_nibble(struct parport *port)
......
......@@ -92,7 +92,7 @@ static void *my_realloc(void *buf, int oldsize, int size)
get_user(target, (unsigned char*)&((addr)[offs]))
#define GET_SHORT_FROM_USER(target,addr,offs) \
get_user(target, (unsigned short*)&((addr)[offs]))
#ifdef AWE_OSS38
#ifdef AWE_OSS38_AND_IM_A_BANANA
#define IOCTL_TO_USER(target,offs,source,count) \
memcpy(target, (source)+(offs), count)
#define IO_WRITE_CHECK(cmd) (_SIOC_DIR(cmd) & _IOC_WRITE)
......
......@@ -159,6 +159,7 @@ static const struct file_operations hpfs_file_ops =
NULL, /* ioctl - default */
generic_file_mmap, /* mmap */
NULL, /* no special open is needed */
NULL, /* flush */
NULL, /* release */
file_fsync, /* fsync */
};
......@@ -203,6 +204,7 @@ static const struct file_operations hpfs_dir_ops =
NULL, /* ioctl - default */
NULL, /* mmap */
NULL, /* no special open code */
NULL, /* flush */
NULL, /* no special release code */
file_fsync, /* fsync */
};
......
......@@ -295,7 +295,7 @@ static int parse_options(char *options, struct iso9660_options * popt)
{
char *this_char,*value;
popt->map = 'a';
popt->map = 'n';
popt->rock = 'y';
popt->joliet = 'y';
popt->cruft = 'n';
......
......@@ -160,7 +160,8 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry, unsigned long *ino)
dpnt = de->name;
if (dir->i_sb->u.isofs_sb.s_rock ||
dir->i_sb->u.isofs_sb.s_joliet_level) {
dir->i_sb->u.isofs_sb.s_joliet_level ||
dir->i_sb->u.isofs_sb.s_mapping == 'a') {
if (! page) {
page = (unsigned char *)
__get_free_page(GFP_KERNEL);
......
......@@ -12,6 +12,7 @@
#ifdef MAJOR_NR
#include <linux/locks.h>
#include <asm/semaphore.h>
#define LOCAL_END_REQUEST
......@@ -42,11 +43,13 @@ struct nbd_device {
int harderror; /* Code of hard error */
#define NBD_READ_ONLY 0x0001
#define NBD_WRITE_NOCHK 0x0002
#define NBD_INITIALISED 0x0004
struct socket * sock;
struct file * file; /* If == NULL, device is not ready, yet */
int magic; /* FIXME: not if debugging is off */
struct request *head; /* Requests are added here... */
struct request *tail;
struct semaphore queue_lock;
};
/* This now IS in some kind of include file... */
......
......@@ -126,7 +126,7 @@ function readln () {
else
echo -n "$1"
[ -z "$3" ] && echo -n "(NEW) "
IFS='@' read ans </dev/tty || exit 1
IFS='@' read ans || exit 1
[ -z "$ans" ] && ans=$2
fi
}
......
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