Commit 8de4f87d authored by Linus Torvalds's avatar Linus Torvalds

Import 2.2.8pre7

parent 743eee7c
......@@ -267,9 +267,9 @@ C. Boot and load time configuration
ii. Hardware setup
BASE is the base address of your floppy disk controller,
IRQ and DMA give its interrupt and dma channel, respectively.
BOOL is an integer, "0" means: "NO!", any other value means:
"YES!". You don't need to specify anything if connecting your tape
IRQ and DMA give its interrupt and DMA channel, respectively.
BOOL is an integer, "0" means "no"; any other value means
"yes". You don't need to specify anything if connecting your tape
drive to the standard floppy disk controller. All of these
values have reasonable defaults. The defaults can be modified
during kernel configuration, i.e. while running "make config",
......
......@@ -18,7 +18,7 @@
Fortunately, as more and more people get to GNU/Linux, more and more
get interested in the Kernel. But reading the sources is not always
enough. It is easy to understand the code, but miss the concepts, the
philosophy and design decissions behind this code.
philosophy and design decisions behind this code.
Unfortunately, not many documents are available for beginners to
start. And, even if they exist, there was no "well-known" place which
......@@ -33,7 +33,7 @@
The papers that follow are listed in no particular order. All are
catalogued with the following fields: the document's "Title", the
"Author"/s, the "URL" where they can be found, some "Keywords"
helpfull when searching for specific topics, and a brief "Description"
helpful when searching for specific topics, and a brief "Description"
of the Document.
Enjoy!
......@@ -170,9 +170,9 @@
http://anchor.cs.binghamton.edu/courses/cs628/linux-net.html
Keywords: files, sk_buffs.
Description: A short description of files under the net/
directory. Each file has a one or two lines paragrahp
description. sk_buffs explained, too, with some beatiful
pictures. A little bit outdated.
directory. Each file has a one- or two-line paragraph to
describe it. Also, sk_buffs is explained with some
beautiful pictures. A little bit outdated.
+ Title: "Linux ioctl() Primer"
Author: Vipul Gupta.
......@@ -222,7 +222,7 @@
ftp://ftp.llp.fu-berlin.de/pub/linux/LINUX-LAB/whitepapers/dr
ivers.ps.gz
Keywords: character device drivers, I/O, signals, DMA,
accesing ports in user space, kernel environment.
accessing ports in user space, kernel environment.
Description: 68 pages paper on writing character drivers. A
little bit old (1.993, 1.994) although still useful.
......@@ -298,7 +298,7 @@
Description: The title says it all. There's a fixed kernel
section summarizing developers' work, bug fixes, new features
and versions produced during the week. Published every
thursday.
Thursday.
+ Name: CuTTiNG.eDGe.LiNuX.
URL: http://edge.linuxhq.com
......
......@@ -216,7 +216,7 @@ void (*disconnect_confirmation)(void *token, int reason);
This is called by the LAPB module when an event occurs after the device
driver has called lapb_disconnect_request (see above). The reason indicates
what has happended. In all cases the LAPB link can be regarded as being
what has happened. In all cases the LAPB link can be regarded as being
terminated. The values for reason are:
LAPB_OK The LAPB link was terminated normally.
......
......@@ -2,7 +2,7 @@ This is the README for the Gracilis Packetwin device driver, version 0.5
ALPHA for Linux 1.3.43.
These files will allow you to talk to the PackeTwin (now know as PT) and
connect through it just like a pair of TNC's. To do this you will also
connect through it just like a pair of TNCs. To do this you will also
require the AX.25 code in the kernel enabled.
There are four files in this archive; this readme, a patch file, a .c file
......
The directory ftp.inr.ac.ru:/ip-routing contains:
- iproute.c - "professional" routing table maintainance utility.
- iproute.c - "professional" routing table maintenance utility.
- rdisc.tar.gz - rdisc daemon, ported from Sun.
STRONGLY RECOMMENDED FOR ALL HOSTS.
......
......@@ -70,7 +70,16 @@ The following cards are known to work with this driver:
- Acer FX-3D
- SY-1816
- Highscreen Sound-Boostar 32 Wave 3D
- ...
- Highscreen Sound-Boostar 16
- AVM Apex Pro card
- (Aztech SC-16 3D)
- (Newcom SC-16 3D)
- (Terratec EWS64S)
Cards listed in brackets are not supported reliable. If you have such a card
you should add the extra parameter:
options=1
when loading the ad1816 module via modprobe.
Troubleshooting:
......@@ -115,4 +124,4 @@ Bugreports, bugfixes and related questions should be sent via E-Mail to:
Thorsten Knabe <tek@rbg.informatik.tu-darmstadt.de>
Last modified: 1998/11/06
Last modified: 1999/05/02
......@@ -38,7 +38,7 @@
7: Matrix Vision MV-Delta
8: Fly Video II
9: TurboTV
10: Newer Hauppage (Bt878)
10: Newer Hauppauge (Bt878)
11: Miro PCTV Pro
12: ADS Tech Channel Surfer TV (and maybe TV+FM)
13: AVerMedia TVCapture 98
......
......@@ -92,7 +92,7 @@ struct MCA_info {
* is set to zero.
*/
static struct MCA_info* mca_info = 0;
static struct MCA_info* mca_info = NULL;
/* MCA registers */
......@@ -160,7 +160,10 @@ static void mca_configure_adapter_status(int slot) {
/* id = 0x0000 usually indicates hardware failure,
* however, ZP Gu (zpg@castle.net> reports that his 9556
* has 0x0000 as id and everything still works.
* has 0x0000 as id and everything still works. There
* also seem to be an adapter with id = 0x0000; the
* NCR Parallel Bus Memory Card. Until this is confirmed,
* however, this code will stay.
*/
mca_info->slot[slot].status = MCA_ADAPTER_ERROR;
......@@ -222,7 +225,13 @@ __initfunc(void mca_init(void))
/* Allocate MCA_info structure (at address divisible by 8) */
mca_info = kmalloc(sizeof(struct MCA_info), GFP_ATOMIC);
mca_info = kmalloc(sizeof(struct MCA_info), GFP_KERNEL);
if(mca_info == NULL) {
printk("Failed to allocate memory for mca_info!");
restore_flags(flags);
return;
}
/* Make sure adapter setup is off */
......@@ -382,7 +391,7 @@ void mca_handle_nmi(void)
int mca_find_adapter(int id, int start)
{
if(mca_info == 0 || id == 0 || id == 0xffff) {
if(mca_info == NULL || id == 0xffff) {
return MCA_NOTFOUND;
}
......@@ -412,7 +421,7 @@ int mca_find_adapter(int id, int start)
int mca_find_unused_adapter(int id, int start)
{
if(mca_info == 0 || id == 0 || id == 0xffff) {
if(mca_info == NULL || id == 0xffff) {
return MCA_NOTFOUND;
}
......@@ -443,7 +452,7 @@ int mca_find_unused_adapter(int id, int start)
unsigned char mca_read_stored_pos(int slot, int reg)
{
if(slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == 0) return 0;
if(slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == NULL) return 0;
if(reg < 0 || reg >= 8) return 0;
return mca_info->slot[slot].pos[reg];
} /* mca_read_stored_pos() */
......@@ -455,7 +464,7 @@ unsigned char mca_read_pos(int slot, int reg)
unsigned int byte = 0;
unsigned long flags;
if(slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == 0) return 0;
if(slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == NULL) return 0;
if(reg < 0 || reg >= 8) return 0;
save_flags(flags);
......@@ -527,7 +536,7 @@ void mca_write_pos(int slot, int reg, unsigned char byte)
return;
if(reg < 0 || reg >= 8)
return;
if(mca_info == 0)
if(mca_info == NULL)
return;
save_flags(flags);
......@@ -554,7 +563,7 @@ void mca_write_pos(int slot, int reg, unsigned char byte)
void mca_set_adapter_name(int slot, char* name)
{
if(mca_info == 0) return;
if(mca_info == NULL) return;
if(slot >= 0 && slot < MCA_NUMADAPTERS) {
if(name != NULL) {
......@@ -570,7 +579,7 @@ void mca_set_adapter_name(int slot, char* name)
void mca_set_adapter_procfn(int slot, MCA_ProcFn procfn, void* dev)
{
if(mca_info == 0) return;
if(mca_info == NULL) return;
if(slot >= 0 && slot < MCA_NUMADAPTERS) {
mca_info->slot[slot].procfn = procfn;
......@@ -597,7 +606,7 @@ void mca_mark_as_unused(int slot)
char *mca_get_adapter_name(int slot)
{
if(mca_info == 0) return 0;
if(mca_info == NULL) return 0;
if(slot >= 0 && slot < MCA_NUMADAPTERS) {
return mca_info->slot[slot].name;
......@@ -608,7 +617,7 @@ char *mca_get_adapter_name(int slot)
int mca_isadapter(int slot)
{
if(mca_info == 0) return 0;
if(mca_info == NULL) return 0;
if(slot >= 0 && slot < MCA_NUMADAPTERS) {
return ((mca_info->slot[slot].status == MCA_ADAPTER_NORMAL)
......@@ -620,7 +629,7 @@ int mca_isadapter(int slot)
int mca_isenabled(int slot)
{
if(mca_info == 0) return 0;
if(mca_info == NULL) return 0;
if(slot >= 0 && slot < MCA_NUMADAPTERS) {
return (mca_info->slot[slot].status == MCA_ADAPTER_NORMAL);
......@@ -637,7 +646,7 @@ int get_mca_info(char *buf)
{
int i, j, len = 0;
if(MCA_bus && mca_info != 0)
if(MCA_bus && mca_info != NULL)
{
/* Format POS registers of eight MCA slots */
......@@ -676,10 +685,10 @@ int get_mca_info(char *buf)
__initfunc(void mca_do_proc_init(void))
{
int i = 0;
struct proc_dir_entry* node = 0;
int i;
struct proc_dir_entry* node = NULL;
if(mca_info == 0) return; /* Should never happen */
if(mca_info == NULL) return; /* Should never happen */
proc_register(&proc_mca, &(struct proc_dir_entry) {
PROC_MCA_REGISTERS, 3, "pos", S_IFREG|S_IRUGO,
......@@ -696,8 +705,12 @@ __initfunc(void mca_do_proc_init(void))
mca_info->slot[i].dev = 0;
if(!mca_isadapter(i)) continue;
node = kmalloc(sizeof(struct proc_dir_entry), GFP_ATOMIC);
node = kmalloc(sizeof(struct proc_dir_entry), GFP_KERNEL);
if(node == NULL) {
printk("Failed to allocate memory for MCA proc-entries!");
return;
}
if(i < MCA_MAX_SLOT_NR) {
node->low_ino = PROC_MCA_SLOT + i;
node->namelen = sprintf(mca_info->slot[i].procname,
......@@ -727,7 +740,7 @@ int mca_default_procfn(char* buf, int slot)
/* This really shouldn't happen... */
if(mca_info == 0) {
if(mca_info == NULL) {
*buf = 0;
return 0;
}
......
This diff is collapsed.
......@@ -48,6 +48,10 @@
#define CONFIG_RADIO_TYPHOON_MUTEFREQ 0
#endif
#ifndef CONFIG_PROC_FS
#undef CONFIG_RADIO_TYPHOON_PROC_FS
#endif
struct typhoon_device {
int users;
int iobase;
......
......@@ -5,15 +5,16 @@
* Due to the inconsistancy in reading from the signal flags
* it is difficult to get an accurate tuned signal.
*
* There seems to be a problem with the volume setting that I must still
* figure out.
* It seems that the card has is not linear to 0 volume. It cuts off
* at a low frequency, and it is not possible (at least I have not found)
* It seems that the card is not linear to 0 volume. It cuts off
* at a low volume, and it is not possible (at least I have not found)
* to get fine volume control over the low volume range.
*
* Some code derived from code by Romolo Manfredini
* romolo@bicnet.it
*
* 1999-05-06 - (C. van Schaik)
* - Make signal strength and stereo scans
* kinder to cpu while in delay
* 1999-01-05 - (C. van Schaik)
* - Changed tuning to 1/160Mhz accuracy
* - Added stereo support
......@@ -51,18 +52,10 @@ struct zol_device {
/* local things */
static void sleep_delay(long n)
static void sleep_delay(void)
{
/* Sleep nicely for 'n' uS */
int d = n / (1000000 / HZ);
if (!d)
udelay(n);
else {
/* Yield CPU time */
unsigned long x = jiffies;
while ((jiffies - x) <= d)
schedule();
}
/* Sleep nicely for +/- 10 mS */
schedule();
}
static int zol_setvol(struct zol_device *dev, int vol)
......@@ -79,7 +72,7 @@ static int zol_setvol(struct zol_device *dev, int vol)
}
outb(dev->curvol-1, io);
sleep_delay(10000);
sleep_delay();
inb(io + 2);
return 0;
......@@ -125,18 +118,18 @@ static int zol_setfreq(struct zol_device *dev, unsigned long freq)
while (i--) {
if ((bitmask & 0x8000000000000000ull) != 0) {
outb(0x80, io);
sleep_delay(50);
udelay(50);
outb(0x00, io);
sleep_delay(50);
udelay(50);
outb(0x80, io);
sleep_delay(50);
udelay(50);
} else {
outb(0xc0, io);
sleep_delay(50);
udelay(50);
outb(0x40, io);
sleep_delay(50);
udelay(50);
outb(0xc0, io);
sleep_delay(50);
udelay(50);
}
bitmask *= 2;
}
......@@ -144,16 +137,16 @@ static int zol_setfreq(struct zol_device *dev, unsigned long freq)
outb(0x80, io);
outb(0xc0, io);
outb(0x40, io);
sleep_delay(1000);
udelay(1000);
inb(io+2);
sleep_delay(1000);
udelay(1000);
if (dev->muted)
{
outb(0, io);
outb(0, io);
inb(io + 3);
sleep_delay(1000);
udelay(1000);
} else
zol_setvol(dev, dev->curvol);
return 0;
......@@ -167,10 +160,11 @@ int zol_getsigstr(struct zol_device *dev)
outb(0x00, io); /* This stuff I found to do nothing */
outb(dev->curvol, io);
sleep_delay(20000);
sleep_delay();
sleep_delay();
a = inb(io);
sleep_delay(1000);
sleep_delay();
b = inb(io);
if (a != b)
......@@ -188,10 +182,11 @@ int zol_is_stereo (struct zol_device *dev)
outb(0x00, io);
outb(dev->curvol, io);
sleep_delay(20000);
sleep_delay();
sleep_delay();
x1 = inb(io);
sleep_delay(1000);
sleep_delay();
x2 = inb(io);
if ((x1 == x2) && (x1 == 0xcf))
......@@ -362,7 +357,8 @@ __initfunc(int zoltrix_init(struct video_init *v))
outb(0, io);
outb(0, io);
sleep_delay(20000);
sleep_delay();
sleep_delay();
inb(io + 3);
zoltrix_unit.curvol = 0;
......
......@@ -213,7 +213,7 @@ typedef struct act2000_card {
char regname[35]; /* Name used for request_region */
} act2000_card;
extern act2000_card *cards;
extern act2000_card *actcards;
extern __inline__ void act2000_schedule_tx(act2000_card *card)
{
......
......@@ -57,7 +57,7 @@ static unsigned short isa_ports[] =
};
#define ISA_NRPORTS (sizeof(isa_ports)/sizeof(unsigned short))
act2000_card *cards = (act2000_card *) NULL;
act2000_card *actcards = (act2000_card *) NULL;
/* Parameters to be set by insmod */
static int act_bus = 0;
......@@ -589,7 +589,7 @@ act2000_logstat(struct act2000_card *card, char *str)
static inline act2000_card *
act2000_findcard(int driverid)
{
act2000_card *p = cards;
act2000_card *p = actcards;
while (p) {
if (p->myid == driverid)
......@@ -714,8 +714,8 @@ act2000_alloccard(int bus, int port, int irq, char *id)
card->bus = bus;
card->port = port;
card->irq = irq;
card->next = cards;
cards = card;
card->next = actcards;
actcards = card;
}
/*
......@@ -805,9 +805,9 @@ act2000_addcard(int bus, int port, int irq, char *id)
bus);
}
}
if (!cards)
if (!actcards)
return 1;
p = cards;
p = actcards;
while (p) {
initialized = 0;
if (!p->interface.statcallb) {
......@@ -870,9 +870,9 @@ act2000_addcard(int bus, int port, int irq, char *id)
kfree(p);
p = q->next;
} else {
cards = p->next;
actcards = p->next;
kfree(p);
p = cards;
p = actcards;
}
failed++;
}
......@@ -890,9 +890,9 @@ int
act2000_init(void)
{
printk(KERN_INFO "%s\n", DRIVERNAME);
if (!cards)
if (!actcards)
act2000_addcard(act_bus, act_port, act_irq, act_id);
if (!cards)
if (!actcards)
printk(KERN_INFO "act2000: No cards defined yet\n");
/* No symbols to export, hide all symbols */
EXPORT_NO_SYMBOLS;
......@@ -903,14 +903,14 @@ act2000_init(void)
void
cleanup_module(void)
{
act2000_card *card = cards;
act2000_card *card = actcards;
act2000_card *last;
while (card) {
unregister_card(card);
del_timer(&card->ptimer);
card = card->next;
}
card = cards;
card = actcards;
while (card) {
last = card;
card = card->next;
......
......@@ -363,8 +363,8 @@ static int eql_slave_xmit(struct sk_buff *skb, struct device *dev)
eql_schedule_slaves (eql->queue);
slave_dev = eql_best_slave_dev (eql->queue);
slave = eql_best_slave (eql->queue);
slave_dev = slave ? slave->dev : 0;
if ( slave_dev != 0 )
{
......
......@@ -456,9 +456,9 @@ static int pci_etherdev_probe(struct device *dev, struct pci_id_info pci_tbl[])
pci_tbl[chip_idx].name, pciaddr, irq);
if (pci_tbl[chip_idx].flags & PCI_USES_IO) {
if (check_region(pciaddr, pci_tbl[chip_idx].io_size))
continue;
ioaddr = pciaddr & ~3;
if (check_region(ioaddr, pci_tbl[chip_idx].io_size))
continue;
} else if ((ioaddr = (long)ioremap(pciaddr & ~0xf,
pci_tbl[chip_idx].io_size)) == 0) {
printk(KERN_INFO "Failed to map PCI address %#lx.\n",
......
This diff is collapsed.
This diff is collapsed.
#ifndef _IBMMCA_H
#define _IBMMCA_H
#ifndef LINUX_VERSION_CODE
#include <linux/version.h>
#endif
#ifndef ibmmca_header_linux_version
#define ibmmca_header_linux_version(v,p,s) (((v)<<16)+((p)<<8)+(s))
#endif
/*
* Low Level Driver for the IBM Microchannel SCSI Subsystem
* (Headerfile, see README.ibmmca for description of the IBM MCA SCSI-driver)
*/
/* Common forward declarations for all Linux-versions: */
/*services provided to the higher level of Linux SCSI driver */
int ibmmca_proc_info (char *, char **, off_t, int, int, int);
int ibmmca_detect (Scsi_Host_Template *);
int ibmmca_release (struct Scsi_Host *);
int ibmmca_command (Scsi_Cmnd *);
int ibmmca_queuecommand (Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
int ibmmca_abort (Scsi_Cmnd *);
int ibmmca_reset (Scsi_Cmnd *, unsigned int);
int ibmmca_biosparam (Disk *, kdev_t, int *);
extern int ibmmca_proc_info (char *, char **, off_t, int, int, int);
extern int ibmmca_detect (Scsi_Host_Template *);
extern int ibmmca_release (struct Scsi_Host *);
extern int ibmmca_command (Scsi_Cmnd *);
extern int ibmmca_queuecommand (Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
extern int ibmmca_abort (Scsi_Cmnd *);
extern int ibmmca_reset (Scsi_Cmnd *, unsigned int);
extern int ibmmca_biosparam (Disk *, kdev_t, int *);
/*structure for /proc filesystem */
extern struct proc_dir_entry proc_scsi_ibmmca;
/*initialization for Scsi_host_template type */
#if LINUX_VERSION_CODE >= ibmmca_header_linux_version(2,1,0)
/* Stuff for Linux >= 2.1.0: */
/*initialization for Scsi_host_template type (Linux >= 2.1.0) */
/*
* 2/8/98
* Note to maintainer of IBMMCA. Do not change this initializer back to
......@@ -28,7 +41,7 @@ extern struct proc_dir_entry proc_scsi_ibmmca;
#define IBMMCA { \
proc_dir: &proc_scsi_ibmmca, /*proc_dir*/ \
proc_info: ibmmca_proc_info, /*proc info fn*/ \
name: "IBMMCA", /*name*/ \
name: "IBM SCSI-Subsystem", /*name*/ \
detect: ibmmca_detect, /*detect fn*/ \
release: ibmmca_release, /*release fn*/ \
command: ibmmca_command, /*command fn*/ \
......@@ -40,9 +53,37 @@ extern struct proc_dir_entry proc_scsi_ibmmca;
this_id: 7, /*set by detect*/ \
sg_tablesize: 16, /*sg_tablesize*/ \
cmd_per_lun: 1, /*cmd_per_lun*/ \
unchecked_isa_dma: 0, /*32-Bit Busmaster */ \
use_clustering: ENABLE_CLUSTERING /*use_clustering*/ \
}
#endif /* _IBMMCA_H */
#else
/* Stuff for Linux < 2.1.0: */
/*initialization for Scsi_host_template type (Linux < 2.1.0) */
#define IBMMCA { \
NULL, /*next*/ \
NULL, /*usage_count*/ \
&proc_scsi_ibmmca, /*proc_dir*/ \
ibmmca_proc_info, /*proc info fn*/ \
"IBM SCSI-Subsystem", /*name*/ \
ibmmca_detect, /*detect fn*/ \
ibmmca_release, /*release fn*/ \
NULL, /*info fn*/ \
ibmmca_command, /*command fn*/ \
ibmmca_queuecommand, /*queuecommand fn*/ \
ibmmca_abort, /*abort fn*/ \
ibmmca_reset, /*reset fn*/ \
NULL, /*slave_attach fn*/ \
ibmmca_biosparam, /*bios fn*/ \
16, /*can_queue*/ \
7, /*set by detect*/ \
16, /*sg_tablesize*/ \
1, /*cmd_per_lun*/ \
0, /*present*/ \
0, /*unchecked_isa_dma*/ \
ENABLE_CLUSTERING /*use_clustering*/ \
}
#endif /* kernelversion selection */
#endif /* _IBMMCA_H */
......@@ -82,7 +82,8 @@ int sr_do_ioctl(int target, unsigned char * sr_cmd, void * buffer, unsigned bufl
switch(SCpnt->sense_buffer[2] & 0xf) {
case UNIT_ATTENTION:
scsi_CDs[target].device->changed = 1;
printk(KERN_INFO "sr%d: disc change detected.\n", target);
if (!quiet)
printk(KERN_INFO "sr%d: disc change detected.\n", target);
if (retries++ < 10)
goto retry;
err = -ENOMEDIUM;
......@@ -105,12 +106,13 @@ int sr_do_ioctl(int target, unsigned char * sr_cmd, void * buffer, unsigned bufl
spin_unlock_irqrestore(&io_request_lock, flags);
goto retry;
} else {
/* 20 secs are enouth? */
/* 20 secs are enough? */
err = -ENOMEDIUM;
break;
}
}
printk(KERN_INFO "sr%d: CDROM not ready. Make sure there is a disc in the drive.\n",target);
if (!quiet)
printk(KERN_INFO "sr%d: CDROM not ready. Make sure there is a disc in the drive.\n",target);
#ifdef DEBUG
print_sense("sr", SCpnt);
#endif
......@@ -120,9 +122,11 @@ int sr_do_ioctl(int target, unsigned char * sr_cmd, void * buffer, unsigned bufl
if (!quiet)
printk(KERN_ERR "sr%d: CDROM (ioctl) reports ILLEGAL "
"REQUEST.\n", target);
if (SCpnt->sense_buffer[12] == 0x20 &&
if ((SCpnt->sense_buffer[12] == 0x20 ||
SCpnt->sense_buffer[12] == 0x24) &&
SCpnt->sense_buffer[13] == 0x00) {
/* sense: Invalid command operation code */
/* or Invalid field in cdb */
err = -EDRIVE_CANT_DO_THIS;
} else {
err = -EINVAL;
......@@ -408,7 +412,7 @@ int sr_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, void* arg)
spin_unlock_irqrestore(&io_request_lock, flags);
if(!buffer) return -ENOMEM;
result = sr_do_ioctl(target, sr_cmd, buffer, 12, 0);
result = sr_do_ioctl(target, sr_cmd, buffer, 12, 1);
tochdr->cdth_trk0 = buffer[2];
tochdr->cdth_trk1 = buffer[3];
......
......@@ -175,7 +175,7 @@ int sr_cd_check(struct cdrom_device_info *cdi)
cmd[1] = (scsi_CDs[minor].device->lun << 5);
cmd[8] = 12;
cmd[9] = 0x40;
rc = sr_do_ioctl(minor, cmd, buffer, 12, 0);
rc = sr_do_ioctl(minor, cmd, buffer, 12, 1);
if (rc != 0)
break;
if ((buffer[0] << 8) + buffer[1] < 0x0a) {
......@@ -199,7 +199,7 @@ int sr_cd_check(struct cdrom_device_info *cdi)
cmd[0] = 0xde;
cmd[1] = (scsi_CDs[minor].device->lun << 5) | 0x03;
cmd[2] = 0xb0;
rc = sr_do_ioctl(minor, cmd, buffer, 0x16, 0);
rc = sr_do_ioctl(minor, cmd, buffer, 0x16, 1);
if (rc != 0)
break;
if (buffer[14] != 0 && buffer[14] != 0xb0) {
......@@ -223,7 +223,7 @@ int sr_cd_check(struct cdrom_device_info *cdi)
memset(cmd,0,12);
cmd[0] = 0xc7;
cmd[1] = (scsi_CDs[minor].device->lun << 5) | 3;
rc = sr_do_ioctl(minor, cmd, buffer, 4, 0);
rc = sr_do_ioctl(minor, cmd, buffer, 4, 1);
if (rc == -EINVAL) {
printk(KERN_INFO "sr%d: Hmm, seems the drive "
"doesn't support multisession CD's\n",minor);
......@@ -248,7 +248,7 @@ int sr_cd_check(struct cdrom_device_info *cdi)
cmd[1] = (scsi_CDs[minor].device->lun << 5);
cmd[8] = 0x04;
cmd[9] = 0x40;
rc = sr_do_ioctl(minor, cmd, buffer, 0x04, 0);
rc = sr_do_ioctl(minor, cmd, buffer, 0x04, 1);
if (rc != 0) {
break;
}
......@@ -263,7 +263,7 @@ int sr_cd_check(struct cdrom_device_info *cdi)
cmd[6] = rc & 0x7f; /* number of last session */
cmd[8] = 0x0c;
cmd[9] = 0x40;
rc = sr_do_ioctl(minor, cmd, buffer, 12, 0);
rc = sr_do_ioctl(minor, cmd, buffer, 12, 1);
if (rc != 0) {
break;
}
......
......@@ -32,10 +32,10 @@ Please report any bugs to: tek@rbg.informatik.tu-darmstadt.de
-------------------------------------------------------------------------------
version: 1.2
cvs: $Header: /home/tek/tmp/CVSROOT/sound21/ad1816.c,v 1.28 1999/01/16 19:01:36 tek Exp $
version: 1.3
cvs: $Header: /home/tek/CVSROOT/sound22/ad1816.c,v 1.3 1999/04/18 16:41:41 tek Exp $
status: experimental
date: 1999/01/16
date: 1999/4/18
Changes:
Oleg Drokin: Some cleanup of load/unload functions. 1998/11/24
......@@ -44,6 +44,13 @@ date: 1999/01/16
some argument checks added 1998/11/30
Thorsten Knabe: Buggy isa bridge workaround added 1999/01/16
David Moews/Thorsten Knabe: Introduced options
parameter. Added slightly modified patch from
David Moews to disable dsp audio sources by setting
bit 0 of options parameter. This seems to be
required by some Aztech/Newcom SC-16 cards. 1999/04/18
*/
#include <linux/config.h>
......@@ -100,6 +107,8 @@ static int nr_ad1816_devs = 0;
static int ad1816_clockfreq=33000;
static int options=0;
/* for backward mapping of irq to sound device */
static volatile char irq2dev[17] = {-1, -1, -1, -1, -1, -1, -1, -1,
......@@ -1091,12 +1100,14 @@ int probe_ad1816 ( struct address_info *hw_config )
int tmp;
printk("ad1816: AD1816 sounddriver Copyright (C) 1998 by Thorsten Knabe\n");
printk("ad1816: $Header: /home/tek/tmp/CVSROOT/sound21/ad1816.c,v 1.28 1999/01/16 19:01:36 tek Exp $\n");
printk("ad1816: io=0x%x, irq=%d, dma=%d, dma2=%d, isadmabug=%d\n",
printk("ad1816: $Header: /home/tek/CVSROOT/sound22/ad1816.c,v 1.3 1999/04/18 16:41:41 tek Exp $\n");
printk("ad1816: io=0x%x, irq=%d, dma=%d, dma2=%d, clockfreq=%d, options=%d isadmabug=%d\n",
hw_config->io_base,
hw_config->irq,
hw_config->dma,
hw_config->dma2,
ad1816_clockfreq,
options,
isa_dma_bridge_buggy);
if (check_region (io_base, 16)) {
......@@ -1264,7 +1275,11 @@ void attach_ad1816 (struct address_info *hw_config)
nr_ad1816_devs++;
ad_write(devc,32,0x80f0); /* sound system mode */
ad_write(devc,33,0x03f8); /* enable all audiosources for dsp */
if (options&1) {
ad_write(devc,33,0); /* disable all audiosources for dsp */
} else {
ad_write(devc,33,0x03f8); /* enable all audiosources for dsp */
}
ad_write(devc,4,0x8080); /* default values for volumes (muted)*/
ad_write(devc,5,0x8080);
ad_write(devc,6,0x8080);
......@@ -1274,7 +1289,7 @@ void attach_ad1816 (struct address_info *hw_config)
ad_write(devc,17,0x8888);
ad_write(devc,18,0x8888);
ad_write(devc,19,0xc888); /* +20db mic active */
ad_write(devc,14,0x0000); /* Master volume unmuted full power */
ad_write(devc,14,0x0000); /* Master volume unmuted */
ad_write(devc,39,0x009f); /* 3D effect on 0% phone out muted */
ad_write(devc,44,0x0080); /* everything on power, 3d enabled for d/a */
outb(0x10,devc->base+8); /* set dma mode */
......@@ -1382,6 +1397,7 @@ MODULE_PARM(irq,"i");
MODULE_PARM(dma,"i");
MODULE_PARM(dma2,"i");
MODULE_PARM(ad1816_clockfreq,"i");
MODULE_PARM(options,"i");
struct address_info cfg;
......
......@@ -11,7 +11,7 @@
* History:
*
* Rolf Fokkens (Dec 20 1998): ES188x recording level support on a per
* input basis.
* fokkensr@vertis.nl input basis.
* (Dec 24 1998): Recognition of ES1788, ES1887, ES1888,
* ES1868, ES1869 and ES1878. Could be used for
* specific handling in the future. All except
......@@ -32,6 +32,14 @@
* any applications to test it though. So why did
* I bother to create it anyway?? :) Just for
* fun.
* (May 2 1999): I tried to be too smart by "introducing"
* ess_calc_best_speed (). The idea was that two
* dividers could be used to setup a samplerate,
* ess_calc_best_speed () would choose the best.
* This works for playback, but results in
* recording problems for high samplerates. I
* fixed this by removing ess_calc_best_speed ()
* and just doing what the documentation says.
*
* This files contains ESS chip specifics. It's based on the existing ESS
* handling as it resided in sb_common.c, sb_mixer.c and sb_audio.c. This
......@@ -315,6 +323,7 @@ static int ess_calc_div (int clock, int revert, int *speedp, int *diffp)
return retval;
}
#ifdef OBSOLETE
static int ess_calc_best_speed
(int clock1, int rev1, int clock2, int rev2, int *divp, int *speedp)
{
......@@ -338,6 +347,7 @@ static int ess_calc_best_speed
return retval;
}
#endif
/*
* Depending on the audiochannel ESS devices can
......@@ -349,7 +359,7 @@ static int ess_calc_best_speed
*/
static void ess_common_speed (sb_devc *devc, int *speedp, int *divp)
{
int diff = 0, div, choice;
int diff = 0, div;
if (devc->duplex) {
/*
......@@ -357,8 +367,11 @@ static void ess_common_speed (sb_devc *devc, int *speedp, int *divp)
*/
div = 0x80 | ess_calc_div (795500, 128, speedp, &diff);
} else {
choice = ess_calc_best_speed (397700, 128, 795500, 256, &div, speedp);
if (choice == 2) div |= 0x80;
if (*speedp > 22000) {
div = 0x80 | ess_calc_div (795500, 256, speedp, &diff);
} else {
div = 0x00 | ess_calc_div (397700, 128, speedp, &diff);
}
}
*divp = div;
}
......@@ -1145,6 +1158,18 @@ FKS_test (devc);
chip = "ES1688";
};
printk ( KERN_INFO "ESS chip %s %s%s\n"
, chip
, ( esstype == ESSTYPE_DETECT || esstype == ESSTYPE_LIKE20
? "detected"
: "specified"
)
, ( esstype == ESSTYPE_LIKE20
? " (kernel 2.0 compatible)"
: ""
)
);
sprintf(name,"ESS %s AudioDrive (rev %d)", chip, ess_minor & 0x0f);
} else {
strcpy(name, "Jazz16");
......
......@@ -58,8 +58,19 @@ static void set_brk(unsigned long start, unsigned long end)
* These are the only things you should do on a core-file: use only these
* macros to write out all the necessary info.
*/
#define DUMP_WRITE(addr,nr) \
while (file->f_op->write(file,(char *)(addr),(nr),&file->f_pos) != (nr)) goto close_coredump
static int dump_write(struct file *file, const void *addr, int nr)
{
int r;
down(&file->f_dentry->d_inode->i_sem);
r = file->f_op->write(file, addr, nr, &file->f_pos) == nr;
up(&file->f_dentry->d_inode->i_sem);
return r;
}
#define DUMP_WRITE(addr, nr) \
if (!dump_write(file, (void *)(addr), (nr))) \
goto close_coredump;
#define DUMP_SEEK(offset) \
if (file->f_op->llseek) { \
......
......@@ -927,7 +927,11 @@ static int load_elf_library(int fd)
*/
static int dump_write(struct file *file, const void *addr, int nr)
{
return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
int r;
down(&file->f_dentry->d_inode->i_sem);
r = file->f_op->write(file, addr, nr, &file->f_pos) == nr;
up(&file->f_dentry->d_inode->i_sem);
return r;
}
static int dump_seek(struct file *file, off_t off)
......
......@@ -5,10 +5,7 @@ This is far from complete
Item Description
----------------------------------------------------------------------------
MAX_SOCKETS Tunable on boot, maximum sockets we will allocate
NUM_PROTO Maximum loadable address family, will need recompile
MAX_LINKS Maximum number of netlink minor devices. (1-32)
MAX_QBYTES Size of a netlink device queue (tunable)
RIF_TABLE_SIZE Token ring RIF cache size (tunable)
AARP_HASH_SIZE Size of Appletalk hash table (tunable)
AX25_DEF_T1 AX.25 parameters. These are all tunable via
......@@ -34,18 +31,9 @@ MAX_WINDOW Offered maximum window (tunable)
MAX_HEADER Largest physical header (tunable)
MAX_ADDR_LEN Largest physical address (tunable)
SOCK_ARRAY_SIZE IP socket array hash size (tunable)
ARP_RES_TIME Time we try to resolve (tunable)
ARP_DEAD_RES_TIME Time the entry stays dead (tunable)
ARP_MAX_TRIES Maximum tries (tunable)
ARP_TIMEOUT Timeout on an ARP (tunable)
ARP_CHECK_INTERVAL Check interval to refresh an arp (tunable)
ARP_CONFIRM_INTERVAL Confirm poll time (tunable)
ARP_TABLE_SIZE Hash table size for ARP (tunable)
IP_MAX_MEMBERSHIPS Largest number of groups per socket (BSD style) (tunable)
16 Hard coded constant for amount of room allowed for
cache align and faster forwarding (tunable)
IPFRAG_HIGH_THRESH Limit on fragments, we free fragments until we reach
IPFRAG_LOW_THRESH which provides some breathing space. (tunable)
IP_FRAG_TIME Time we hold a fragment for. (tunable)
PORT_MASQ_BEGIN First port reserved for masquerade (tunable)
PORT_MASQ_END Last port used for masquerade (tunable)
......
......@@ -62,7 +62,7 @@ struct irda_entry {
struct proc_dir_entry *proc_irda;
static irda_entry dir[] = {
static struct irda_entry dir[] = {
#if 0
{"lpt", irlpt_proc_read},
#endif
......
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