Commit 311aec01 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.24

parent 6a65e6e3
......@@ -5368,6 +5368,15 @@ CONFIG_PPP_ASYNC
into and removed from the running kernel). If you want to compile
it as a module, say M here and read Documentation/modules.txt.
CONFIG_PPP_SYNC_TTY
Say Y (or M) here if you want to be able to use PPP over synchronous
(HDLC) tty devices, such as the SyncLink adapter. These devices
are often used for high-speed leased lines like T1/E1.
This code is also available as a module (code which can be inserted
into and removed from the running kernel). If you want to compile
it as a module, say M here and read Documentation/modules.txt.
PPP Deflate compression
CONFIG_PPP_DEFLATE
Support for the Deflate compression method for PPP, which uses the
......@@ -10387,7 +10396,7 @@ CONFIG_SOUND
I'm told that even without a sound card, you can make your computer
say more than an occasional beep, by programming the PC speaker.
Kernel patches and supporting utilities to do that are in the pcsp
package, available at http://www.imladris.demon.co.uk/pcsp/ .
package, available at ftp://ftp.infradead.org/pub/pcsp/.
OSS sound modules
CONFIG_SOUND_OSS
......@@ -10922,6 +10931,23 @@ CONFIG_SOUND_WAVEARTIST
Say Y here to include support for the Rockwell WaveArtist sound
system. This driver is mainly for the NetWinder.
VIA 82Cxxx Audio Codec
CONFIG_SOUND_VIA82CXXX
Say Y here to include support for the audio codec found on
VIA 82Cxxx-based chips. Typically these are built into a motherboard.
DO NOT select SoundBlaster or Adlib with this driver, unless you have
a SoundBlaster or Adlib card in addition to your VIA audio chip.
NeoMagic 256AV/256ZX sound chipsets
CONFIG_SOUND_NM256
Say M here to include audio support for the NeoMagic 256AV/256ZX
chipsets. These are the audio chipsets found in the Sony Z505S/SX/DX,
some Sony F-series, and the Dell Latitude CPi and CPt laptops. It includes
support for an AC97-compatible mixer and an apparently proprietary sound
engine.
See Documentation/sound/NM256 for further information.
Are you using a crosscompiler
CONFIG_CROSSCOMPILE
Say Y here if you are compiling the kernel on a different
......@@ -11329,7 +11355,7 @@ CONFIG_SCSI_SUNESP
This is the driver for the Sun ESP SCSI host adapter. The ESP
chipset is present in most SPARC-based computers.
SPARC /dev/openprom compatibility driver
SPARC /dev/openprom compatibility driver (EXPERIMENTAL)
CONFIG_SUN_OPENPROMIO
This driver provides user programs with an interface to the SPARC
PROM device tree. The driver implements a SunOS-compatible
......@@ -11427,7 +11453,7 @@ CONFIG_M68060
If you anticipate running this kernel on a computer with a MC68060
processor, say Y. Otherwise, say N.
Math emulation support
Math emulation support (EXPERIMENTAL)
CONFIG_M68KFPU_EMU
At some point in the future, this will cause floating-point math
instructions to be emulated by the kernel on machines that lack a
......@@ -11486,7 +11512,7 @@ CONFIG_ZORRO
Note that even if you say N here, you can still use your expansion
cards. If in doubt, say Y.
Amiga 1200/600 PCMCIA support
Amiga 1200/600 PCMCIA support (EXPERIMENTAL)
CONFIG_AMIGA_PCMCIA
Include support in the kernel for pcmcia on Amiga 1200 and Amiga
600. If you intend to use pcmcia cards say Y; otherwise say N.
......@@ -11618,7 +11644,7 @@ CONFIG_BLZ1230_SCSI
1260 accelerator, and the optional SCSI module, say Y. Otherwise,
say N.
Blizzard PowerUP 603e+ SCSI support
Blizzard PowerUP 603e+ SCSI support (EXPERIMENTAL)
CONFIG_BLZ603EPLUS_SCSI
If you have an Amiga 1200 with a Phase5 Blizzard PowerUP 603e+
accelerator, say Y. Otherwise, say N.
......@@ -11802,7 +11828,7 @@ CONFIG_ATARI_MIDI
want). If you want to compile it as a module, say M here and read
Documentation/modules.txt.
Atari DSP56k Digital Signal Processor support
Atari DSP56k Digital Signal Processor support (EXPERIMENTAL)
CONFIG_ATARI_DSP56K
If you want to be able to use the DSP56001 in Falcons, say Y. This
driver is still experimental, and if you don't know what it is, or
......@@ -12414,7 +12440,7 @@ CONFIG_TEXT_SECTIONS
enabled. Say Y unless you experience problems that you suspect may
be caused by this.
Disable pgtable cache
Disable pgtable cache (EXPERIMENTAL)
CONFIG_NO_PGT_CACHE
Normally the kernel maintains a `quicklist' of preallocated
pagetable structures in order to increase performance. On machines
......@@ -12437,7 +12463,7 @@ CONFIG_CMDLINE
time by entering them here. As a minimum, you should specify the
memory size and the root device (e.g., mem=64M root=/dev/nfs)
Hardware alignment trap
Hardware alignment trap (EXPERIMENTAL)
CONFIG_ALIGNMENT_TRAP
ARM processors can not fetch/store information which is not
naturally aligned on the bus, i.e., a 4 byte fetch must start at an
......@@ -12543,7 +12569,7 @@ CONFIG_IRDA_COMPRESSION
If you say Y here, you also need to say Y or M to a compression
protocol below.
IrLAP Deflate Compression Protocol
IrLAP Deflate Compression Protocol (EXPERIMENTAL)
CONFIG_IRDA_DEFLATE
Say Y here if you want to build support for the Deflate compression
protocol. The deflate compression (GZIP) is exactly
......@@ -12747,6 +12773,13 @@ CONFIG_BVME6000_SCSI
SCSI controller chip. Almost everyone using one of these boards
will want to say Y to this question.
Simple 53c710 SCSI support (Compaq, NCR machines)
CONFIG_SCSI_SIM710
This is a driver for the NCR53C710 chip commonly found in Compaq and
NCR machines. If you are looking for 53C710 support for an Amiga or
some 680x0 based VME card then you probably want the other NCR53C710
driver.
MVME16x Ethernet support
CONFIG_MVME16x_NET
This is the driver for the Ethernet interface on the Motorola
......
......@@ -331,7 +331,7 @@ endif
modules: $(patsubst %, _mod_%, $(SUBDIRS))
$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h
$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
modules_install:
......
......@@ -115,6 +115,7 @@ CONFIG_BLK_DEV_PIIX=y
# CONFIG_BLK_DEV_MD is not set
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_DEV_DAC960 is not set
CONFIG_PARIDE_PARPORT=y
# CONFIG_PARIDE is not set
CONFIG_BLK_DEV_IDE_MODES=y
......
......@@ -338,70 +338,6 @@ void show_regs(struct pt_regs * regs)
printk("CR0: %08lx CR2: %08lx CR3: %08lx\n", cr0, cr2, cr3);
}
/*
* Allocation and freeing of basic task resources.
*
* NOTE! The task struct and the stack go together
*
* The task structure is a two-page thing, and as such
* not reliable to allocate using the basic page alloc
* functions. We have a small cache of structures for
* when the allocations fail..
*
* This extra buffer essentially acts to make for less
* "jitter" in the allocations..
*
* On SMP we don't do this right now because:
* - we aren't holding any locks when called, and we might
* as well just depend on the generic memory management
* to do proper locking for us instead of complicating it
* here.
* - if you use SMP you have a beefy enough machine that
* this shouldn't matter..
*/
#ifndef __SMP__
#define EXTRA_TASK_STRUCT 16
static struct task_struct * task_struct_stack[EXTRA_TASK_STRUCT];
static int task_struct_stack_ptr = -1;
#endif
struct task_struct * alloc_task_struct(void)
{
#ifndef EXTRA_TASK_STRUCT
return (struct task_struct *) __get_free_pages(GFP_KERNEL,1);
#else
int index;
struct task_struct *ret;
index = task_struct_stack_ptr;
if (index >= EXTRA_TASK_STRUCT/2)
goto use_cache;
ret = (struct task_struct *) __get_free_pages(GFP_KERNEL,1);
if (!ret) {
index = task_struct_stack_ptr;
if (index >= 0) {
use_cache:
ret = task_struct_stack[index];
task_struct_stack_ptr = index-1;
}
}
return ret;
#endif
}
void free_task_struct(struct task_struct *p)
{
#ifdef EXTRA_TASK_STRUCT
int index = task_struct_stack_ptr+1;
if (index < EXTRA_TASK_STRUCT) {
task_struct_stack[index] = p;
task_struct_stack_ptr = index;
} else
#endif
free_pages((unsigned long) p, 1);
}
/*
* No need to lock the MM as we are the last user
*/
......@@ -419,19 +355,6 @@ void release_segments(struct mm_struct *mm)
}
}
void forget_segments(void)
{
/* forget local segments */
__asm__ __volatile__("movl %w0,%%fs ; movl %w0,%%gs"
: /* no outputs */
: "r" (0));
/*
* Load the LDT entry of init_task.
*/
load_LDT(&init_mm);
}
/*
* Create a kernel thread
*/
......
......@@ -200,6 +200,9 @@ if [ "$CONFIG_BLK_DEV_RAM" = "y" ]; then
bool ' Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD
fi
tristate 'XT hard disk support' CONFIG_BLK_DEV_XD
if [ "$CONFIG_PCI" = "y" ]; then
tristate 'Mylex DAC960/DAC1100 PCI RAID Controller support' CONFIG_BLK_DEV_DAC960
fi
# PARIDE doesn't need PARPORT, but if PARPORT is configured as a module,
# PARIDE must also be a module. The bogus CONFIG_PARIDE_PARPORT option
......
......@@ -19,8 +19,8 @@
*/
#define DAC960_DriverVersion "2.2.4"
#define DAC960_DriverDate "23 August 1999"
#define DAC960_DriverVersion "2.3.4"
#define DAC960_DriverDate "23 September 1999"
#include <linux/version.h>
......@@ -256,7 +256,7 @@ static void DAC960_QueueCommand(DAC960_Command_T *Command)
static boolean DAC960_ExecuteCommand(DAC960_Command_T *Command)
{
DAC960_Controller_T *Controller = Command->Controller;
Semaphore_T Semaphore = MUTEX_LOCKED;
DECLARE_MUTEX_LOCKED(Semaphore);
unsigned long ProcessorFlags;
Command->Semaphore = &Semaphore;
DAC960_AcquireControllerLock(Controller, &ProcessorFlags);
......@@ -475,8 +475,8 @@ static void DAC960_DetectControllers(DAC960_ControllerType_T ControllerType)
unsigned char Device = DeviceFunction >> 3;
unsigned char Function = DeviceFunction & 0x7;
unsigned int IRQ_Channel = PCI_Device->irq;
unsigned long BaseAddress0 = PCI_Device->base_address[0];
unsigned long BaseAddress1 = PCI_Device->base_address[1];
unsigned long BaseAddress0 = PCI_Device->resource[0].start;
unsigned long BaseAddress1 = PCI_Device->resource[1].start;
unsigned short SubsystemVendorID, SubsystemDeviceID;
int CommandIdentifier;
pci_read_config_word(PCI_Device, PCI_SUBSYSTEM_VENDOR_ID,
......@@ -825,7 +825,7 @@ static boolean DAC960_ReadDeviceConfiguration(DAC960_Controller_T *Controller)
&Controller->InquiryStandardData[Channel][TargetID];
InquiryStandardData->PeripheralDeviceType = 0x1F;
Semaphore = &Semaphores[Channel];
*Semaphore = MUTEX_LOCKED;
init_MUTEX_LOCKED(Semaphore);
DCDB = &DCDBs[Channel];
DAC960_ClearCommand(Command);
Command->CommandType = DAC960_ImmediateCommand;
......
......@@ -156,6 +156,7 @@
#ifdef LOCAL_HEADERS
#include "serial_local.h"
#else
#include <linux/serialP.h>
#include <linux/serial.h>
#include <linux/serial_reg.h>
#include <asm/serial.h>
......
......@@ -2584,7 +2584,9 @@ void unregister_serial(int line)
* ------------------------------------------------------------
*/
#ifdef CONFIG_SERIAL_CONSOLE
#ifdef CONFIG_SERIAL
#error Cannot build serial console with macserial and serial drivers
#endif
/*
* Print a string to the serial port trying not to disturb
......@@ -2843,7 +2845,7 @@ static struct console sercons = {
/*
* Register console.
*/
long __init serial_console_init(long kmem_start, long kmem_end)
void __init serial_console_init(void)
{
register_console(&sercons);
return kmem_start;
......
......@@ -29,6 +29,7 @@
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/spinlock.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <asm/uaccess.h>
......
......@@ -118,6 +118,7 @@ static const char StripVersion[] = "1.3-STUART.CHESHIRE";
#include <linux/if_arp.h>
#include <linux/if_strip.h>
#include <linux/proc_fs.h>
#include <linux/serialP.h>
#include <linux/serial.h>
#include <net/arp.h>
......
......@@ -14,9 +14,8 @@
* [ Open Host Controller Interface driver for USB. ]
* [ (C) Copyright 1999 Linus Torvalds (uhci.c) ]
* [ (C) Copyright 1999 Gregory P. Smith <greg@electricrain.com> ]
* [ _Log: ohci-hcd.c,v _
* [ Revision 1.1 1999/04/05 08:32:30 greg ]
*
* v4.3 1999/10/27 multiple HCs, bulk_request
* v4.2 1999/09/05 ISO API alpha, new dev alloc, neg Error-codes
* v4.1 1999/08/27 Randy Dunlap's - ISO API first impl.
* v4.0 1999/08/18
......@@ -48,6 +47,7 @@
#include <linux/errno.h>
#include <linux/timer.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <asm/io.h>
#include <asm/irq.h>
......@@ -61,6 +61,7 @@
static int handle_apm_event(apm_event_t event);
static int apm_resume = 0;
#endif
static LIST_HEAD(ohci_hcd_list);
static int ohci_link_ed(struct ohci * ohci, struct usb_ohci_ed *ed);
static int sohci_kill_isoc (struct usb_isoc_desc *id);
......@@ -85,10 +86,11 @@ OHCI_DEBUG(printk("******* dev: devnum: %4x, slow: %4x, maxpacketsize: %4x\n",us
**** Interface functions
***********************************************/
static int sohci_blocking_handler(void * ohci_in, struct usb_ohci_ed *ed, void * data, int data_len, int status, __OHCI_BAG lw0, __OHCI_BAG lw1)
static int sohci_blocking_handler(void * ohci_in, struct usb_ohci_td *td, void * data, int data_len, int dlen, int status, __OHCI_BAG lw0, __OHCI_BAG lw1)
{
struct usb_ohci_ed *ed = td->ed;
if(lw0 != NULL) {
if(USB_ST_CRC < 0 && (status == USB_ST_DATAUNDERRUN || status == USB_ST_NOERROR))
if(0 < 0 && (status == USB_ST_DATAUNDERRUN || status == USB_ST_NOERROR))
((struct ohci_state * )lw0)->status = data_len;
else
((struct ohci_state * )lw0)->status = status;
......@@ -107,9 +109,9 @@ static int sohci_blocking_handler(void * ohci_in, struct usb_ohci_ed *ed, void *
return 0;
}
static int sohci_int_handler(void * ohci_in, struct usb_ohci_ed *ed, void * data, int data_len, int status, __OHCI_BAG lw0, __OHCI_BAG lw1)
static int sohci_int_handler(void * ohci_in, struct usb_ohci_td *td, void * data, int data_len, int dlen, int status, __OHCI_BAG lw0, __OHCI_BAG lw1)
{
struct usb_ohci_ed *ed = td->ed;
struct ohci * ohci = ohci_in;
usb_device_irq handler=(void *) lw0;
void *dev_id = (void *) lw1;
......@@ -127,9 +129,30 @@ static int sohci_int_handler(void * ohci_in, struct usb_ohci_ed *ed, void * data
return 0;
}
static int sohci_iso_handler(void * ohci_in, struct usb_ohci_ed *ed, void * data, int data_len, int status, __OHCI_BAG lw0, __OHCI_BAG lw1) {
static int sohci_ret_handler(void * ohci_in, struct usb_ohci_td *td, void * data, int data_len, int dlen, int status, __OHCI_BAG lw0, __OHCI_BAG lw1)
{
struct usb_ohci_ed *ed = td->ed;
struct ohci * ohci = ohci_in;
usb_device_irq handler=(void *) lw0;
void *dev_id = (void *) lw1;
int ret;
OHCI_DEBUG({ int i; printk("USB HC RET <<<: %x: data(%d):", ed->hwINFO, data_len);)
OHCI_DEBUG( for(i=0; i < data_len; i++ ) printk(" %02x", ((__u8 *) data)[i]);)
OHCI_DEBUG( printk(" ret_status: %x\n", status); })
ret = handler(status, data, data_len, dev_id);
if(ret == 0) return 0; /* 0 .. do not requeue */
if(status > 0) return -1; /* error occured do not requeue ? */
ohci_trans_req(ohci, ed, 0, NULL, data, dlen, (__OHCI_BAG) handler, (__OHCI_BAG) dev_id, td->type & 0x7, sohci_ret_handler); /* requeue int request */
return 0;
}
static int sohci_iso_handler(void * ohci_in, struct usb_ohci_td *td, void * data, int data_len, int dlen, int status, __OHCI_BAG lw0, __OHCI_BAG lw1) {
// struct ohci * ohci = ohci_in;
struct usb_ohci_ed *ed = td->ed;
unsigned int ix = (unsigned int) lw0;
struct usb_isoc_desc * id = (struct usb_isoc_desc *) lw1;
struct usb_ohci_td **tdp = id->td;
......@@ -311,7 +334,7 @@ static void * sohci_request_bulk(struct usb_device *usb_dev, unsigned int pipe,
OHCI_DEBUG( printk("USB HC BULK_RQ>>>: %x \n", ed->hwINFO);)
ohci_trans_req(ohci, ed, 0, NULL, data, len, (__OHCI_BAG) handler, (__OHCI_BAG) dev_id, (usb_pipeout(pipe))?BULK_OUT:BULK_IN, sohci_int_handler);
ohci_trans_req(ohci, ed, 0, NULL, data, len, (__OHCI_BAG) handler, (__OHCI_BAG) dev_id, (usb_pipeout(pipe))?BULK_OUT:BULK_IN, sohci_ret_handler);
if (ED_STATE(ed) != ED_OPER) ohci_link_ed(ohci, ed);
return ed;
......@@ -482,7 +505,7 @@ static int sohci_kill_isoc(struct usb_isoc_desc *id) {
struct usb_ohci_ed *ed = NULL;
struct usb_ohci_td **td = id->td;
int i;
printk("KILL_ISOC***:\n");
for (i = 0; i < id->frame_count; i++) {
if(td[i]) {
td[i]->type |= DEL;
......@@ -490,22 +513,17 @@ printk("KILL_ISOC***:\n");
}
}
if(ed) usb_ohci_rm_ep(id->usb_dev, ed, NULL, NULL, NULL, TD_RM);
printk(": end KILL_ISOC***: %p\n", ed);
id->start_frame = -1;
return 0;
}
static void sohci_free_isoc(struct usb_isoc_desc *id) {
printk("FREE_ISOC***\n");
wait_ms(2000);
if(id->start_frame >= 0) sohci_kill_isoc(id);
printk("FREE_ISOC2***\n");
wait_ms(2000);
kfree(id->td);
kfree(id);
printk("FREE_ISOC3***\n");
wait_ms(2000);
}
struct usb_operations sohci_device_operations = {
......@@ -772,17 +790,14 @@ struct usb_ohci_ed *usb_ohci_add_ep(struct usb_device * usb_dev, struct usb_hcd_
// struct ohci * ohci = usb_dev->bus->hcpriv;
struct usb_ohci_td * td;
struct usb_ohci_ed * ed, *ed1;
struct usb_ohci_ed * ed;
int ed_state, ed_state1;
int ed_state;
spin_lock(&usb_ed_lock);
ed = ohci_find_ep(usb_dev, hcd_ed);
ed1 = ((void *) ed) + 0x40; ed_state1 = ED_STATE(ed1);
OHCI_DEBUG(printk("++++ USB HC add 60 ed1 %x: %x :state: %x\n", ed1->hwINFO, (unsigned int ) ed1, ed_state1); )
ed_state = ED_STATE(ed); /* store state of ed */
OHCI_DEBUG(printk("USB HC add ed %x: %x :state: %x\n", ed->hwINFO, (unsigned int ) ed, ed_state); )
if (ed_state == ED_NEW) {
......@@ -1139,7 +1154,8 @@ static int usb_ohci_done_list(struct ohci * ohci, struct usb_ohci_td * td_list)
struct usb_ohci_td * td_list_next = NULL;
int cc;
int i;
int i;
int dlen = 0;
while(td_list) {
td_list_next = td_list->next_dl_td;
......@@ -1156,8 +1172,9 @@ static int usb_ohci_done_list(struct ohci * ohci, struct usb_ohci_td * td_list)
}
else {
if(td_list->hwBE != 0) {
dlen = (bus_to_virt(td_list->hwBE) - td_list->buffer_start + 1);
if(td_list->hwCBP == 0)
td_list->ed->len += (bus_to_virt(td_list->hwBE) - td_list->buffer_start + 1);
td_list->ed->len += dlen;
else
td_list->ed->len += (bus_to_virt(td_list->hwCBP) - td_list->buffer_start);
}
......@@ -1170,9 +1187,10 @@ static int usb_ohci_done_list(struct ohci * ohci, struct usb_ohci_td * td_list)
if((td_list->type & SEND) && (ED_STATE(td_list->ed) != ED_STOP) && (td_list->handler)) { /* send the reply */
td_list->handler((void *) ohci,
td_list->ed,
td_list,
td_list->ed->buffer_start,
td_list->ed->len,
dlen,
cc,
td_list->lw0,
td_list->lw1);
......@@ -1227,7 +1245,7 @@ void reset_hc(struct ohci *ohci) {
udelay(1);
}
}
static struct ohci *__ohci;
/*
* Start an OHCI controller, set the BUS operational
......@@ -1353,7 +1371,7 @@ static struct ohci *alloc_ohci(void* mem_base)
ohci->irq = -1;
ohci->regs = mem_base;
ohci->hc_area = hc_area;
__ohci = ohci;
/*
* for load ballancing of the interrupt branches
*/
......@@ -1395,7 +1413,7 @@ static void release_ohci(struct ohci *ohci)
/* disconnect all devices */
if(ohci->bus->root_hub) usb_disconnect(&ohci->bus->root_hub);
reset_hc(__ohci);
reset_hc(ohci);
writel(OHCI_USB_RESET, &ohci->regs->control);
wait_ms(10);
......@@ -1428,6 +1446,9 @@ static int found_ohci(int irq, void* mem_base)
return -ENOMEM;
}
INIT_LIST_HEAD(&ohci->ohci_hcd_list);
list_add(&ohci->ohci_hcd_list, &ohci_hcd_list);
reset_hc(ohci);
writel(OHCI_USB_RESET, &ohci->regs->control);
wait_ms(10);
......@@ -1438,6 +1459,7 @@ static int found_ohci(int irq, void* mem_base)
start_hc(ohci);
return 0;
}
printk(KERN_ERR "USB HC (ohci-hcd): request interrupt %d failed\n", irq);
release_ohci(ohci);
return -EBUSY;
}
......@@ -1445,7 +1467,8 @@ static int found_ohci(int irq, void* mem_base)
static int start_ohci(struct pci_dev *dev)
{
unsigned int mem_base = dev->resource[0].start;
pci_set_master(dev);
mem_base = (unsigned int) ioremap_nocache(mem_base, 4096);
if (!mem_base) {
......@@ -1488,17 +1511,18 @@ static int handle_apm_event(apm_event_t event)
int ohci_hcd_init(void)
{
int ret = -ENODEV;
struct pci_dev *dev = NULL;
while((dev = pci_find_class(PCI_CLASS_SERIAL_USB_OHCI, dev))) {
if (start_ohci(dev) < 0) return -ENODEV;
if (start_ohci(dev) >= 0) ret = 0;
}
#ifdef CONFIG_APM
apm_register_callback(&handle_apm_event);
#endif
return 0;
return ret;
}
#ifdef MODULE
......@@ -1509,10 +1533,17 @@ int init_module(void)
void cleanup_module(void)
{
struct ohci *ohci;
# ifdef CONFIG_APM
apm_unregister_callback(&handle_apm_event);
# endif
release_ohci(__ohci);
while(!list_empty(&ohci_hcd_list)) {
ohci = list_entry(ohci_hcd_list.next, struct ohci, ohci_hcd_list);
list_del(ohci->ohci_hcd_list);
INIT_LIST_HEAD(ohci->ohci_hcd_list);
release_ohci(ohci);
}
}
#endif //MODULE
......@@ -48,10 +48,11 @@
#include <linux/list.h>
#include <asm/io.h>
struct usb_ohci_ed;
struct usb_ohci_td;
/* for ED and TD structures */
typedef void * __OHCI_BAG;
typedef int (*f_handler )(void * ohci, struct usb_ohci_ed *ed, void *data, int data_len, int status, __OHCI_BAG lw0, __OHCI_BAG lw1);
typedef int (*f_handler )(void * ohci, struct usb_ohci_td *td, void *data, int data_len, int dlen, int status, __OHCI_BAG lw0, __OHCI_BAG lw1);
......@@ -309,7 +310,9 @@ struct ohci {
int irq;
struct ohci_regs *regs; /* OHCI controller's memory */
struct ohci_hc_area *hc_area; /* hcca, int ed-tree, ohci itself .. */
struct list_head ohci_hcd_list; /* list of all ohci_hcd */
int ohci_int_load[32]; /* load of the 32 Interrupt Chains (for load ballancing)*/
struct usb_ohci_ed * ed_rm_list; /* list of all endpoints to be removed */
struct usb_ohci_ed * ed_bulktail; /* last endpoint of bulk list */
......
......@@ -407,8 +407,8 @@ extern inline unsigned long thread_saved_pc(struct thread_struct *t)
}
#define THREAD_SIZE (2*PAGE_SIZE)
extern struct task_struct * alloc_task_struct(void);
extern void free_task_struct(struct task_struct *);
#define alloc_task_struct() ((struct task_struct *) __get_free_pages(GFP_KERNEL,1))
#define free_task_struct(p) free_pages((unsigned long) (p), 1)
#define init_task (init_task_union.task)
#define init_stack (init_task_union.stack)
......
......@@ -15,7 +15,9 @@
*
* Split into 2 CPU specific files by Alan Cox to keep #ifdef noise down.
*
* 99/9/15 Proper reg args for newer gcc/egcs - Petkan (petkan@spct.net)
* 1999/10/5 Proper register args for newer GCCs and minor bugs
* fixed - Petko Manolov (petkan@spct.net)
* 1999/10/14 3DNow memscpy() added - Petkan
*/
#define __HAVE_ARCH_STRCPY
......@@ -103,7 +105,7 @@ __asm__ __volatile__(
"incl %1\n\t"
"testb %b0,%b0\n\t"
"jne 2b\n"
"3:\txorl %0,%0\n\t"
"3:\txorb %0,%0\n\t"
"movb %b0,(%1)\n\t"
:"=q" (dummy), "=r" (tmp), "=r" (src), "=r" (count)
:"1" (tmp), "2" (src), "3" (count)
......@@ -254,6 +256,7 @@ __asm__ __volatile__(
return __res-cs;
}
#if 0
#define __HAVE_ARCH_STRPBRK
extern inline char * strpbrk(const char * cs,const char * ct)
{
......@@ -261,7 +264,7 @@ int d0, d1;
register char * __res;
__asm__ __volatile__(
"cld\n\t"
"movl %4,%%edi\n\t"
"movl %6,%%edi\n\t"
"repne\n\t"
"scasb\n\t"
"notl %%ecx\n\t"
......@@ -270,7 +273,7 @@ __asm__ __volatile__(
"1:\tlodsb\n\t"
"testb %%al,%%al\n\t"
"je 2f\n\t"
"movl %4,%%edi\n\t"
"movl %6,%%edi\n\t"
"movl %%edx,%%ecx\n\t"
"repne\n\t"
"scasb\n\t"
......@@ -284,7 +287,9 @@ __asm__ __volatile__(
:"dx", "di");
return __res;
}
#endif
#if 0
#define __HAVE_ARCH_STRSTR
extern inline char * strstr(const char * cs,const char * ct)
{
......@@ -292,13 +297,13 @@ int d0, d1;
register char * __res;
__asm__ __volatile__(
"cld\n\t" \
"movl %4,%%edi\n\t"
"movl %6,%%edi\n\t"
"repne\n\t"
"scasb\n\t"
"notl %%ecx\n\t"
"decl %%ecx\n\t" /* NOTE! This also sets Z if searchstring='' */
"movl %%ecx,%%edx\n"
"1:\tmovl %4,%%edi\n\t"
"1:\tmovl %6,%%edi\n\t"
"movl %%esi,%%eax\n\t"
"movl %%edx,%%ecx\n\t"
"repe\n\t"
......@@ -315,6 +320,7 @@ __asm__ __volatile__(
:"dx", "di");
return __res;
}
#endif
#define __HAVE_ARCH_STRLEN
extern inline size_t strlen(const char * s)
......@@ -343,7 +349,7 @@ extern inline size_t strnlen(const char * s, size_t count)
int d0;
register int __res;
__asm__ __volatile__(
"movl %1,%0\n\t"
"movl %3,%0\n\t"
"jmp 2f\n"
"1:\tcmpb $0,(%0)\n\t"
"je 3f\n\t"
......@@ -351,13 +357,14 @@ __asm__ __volatile__(
"2:\tdecl %2\n\t"
"cmpl $-1,%2\n\t"
"jne 1b\n"
"3:\tsubl %1,%0"
"3:\tsubl %3,%0"
:"=a" (__res), "=&d" (d0)
:"1" (count), "c" (s));
return __res;
}
/* end of additional stuff */
#if 0
#define __HAVE_ARCH_STRTOK
extern inline char * strtok(char * s,const char * ct)
{
......@@ -418,19 +425,7 @@ __asm__ __volatile__(
:"ax","cx","dx","di","memory");
return __res;
}
#define __memcpy_c(d,s,count) \
((count%4==0) ? \
__memcpy_by4((d),(s),(count)) : \
((count%2==0) ? \
__memcpy_by2((d),(s),(count)) : \
__memcpy_g((d),(s),(count))))
#define __HAVE_ARCH_MEMCPY
#define memcpy(d,s,count) \
(__builtin_constant_p(count) ? \
__memcpy_c((d),(s),(count)) : \
__memcpy_g((d),(s),(count)))
#endif
/*
* These ought to get tweaked to do some cache priming.
......@@ -494,6 +489,63 @@ __asm__ __volatile__ (
return (to);
}
#define __memcpy_c(d,s,count) \
((count%4==0) ? \
__memcpy_by4((d),(s),(count)) : \
((count%2==0) ? \
__memcpy_by2((d),(s),(count)) : \
__memcpy_g((d),(s),(count))))
#define __memcpy(d,s,count) \
(__builtin_constant_p(count) ? \
__memcpy_c((d),(s),(count)) : \
__memcpy_g((d),(s),(count)))
#define __HAVE_ARCH_MEMCPY
#include <linux/config.h>
#ifdef CONFIG_X86_USE_3DNOW
#include <linux/spinlock.h>
#include <asm/system.h>
#include <asm/ptrace.h>
#include <linux/smp.h>
#include <linux/interrupt.h>
#include <asm/mmx.h>
/*
** This CPU favours 3DNow strongly (eg AMD K6-II, K6-III, Athlon)
*/
extern inline void * __constant_memcpy3d(void * to, const void * from, size_t len)
{
if(len<512 || in_interrupt())
return __memcpy_c(to, from, len);
return _mmx_memcpy(to, from, len);
}
extern __inline__ void *__memcpy3d(void *to, const void *from, size_t len)
{
if(len<512 || in_interrupt())
return __memcpy_g(to, from, len);
return _mmx_memcpy(to, from, len);
}
#define memcpy(d, s, count) \
(__builtin_constant_p(count) ? \
__constant_memcpy3d((d),(s),(count)) : \
__memcpy3d((d),(s),(count)))
#else /* CONFIG_X86_USE_3DNOW */
/*
** Generic routines
*/
#define memcpy(d, s, count) __memcpy(d, s, count)
#endif /* CONFIG_X86_USE_3DNOW */
#define __HAVE_ARCH_MEMMOVE
extern inline void * memmove(void * dest,const void * src, size_t n)
......
......@@ -53,6 +53,7 @@ struct termio {
#define N_IRDA 11 /* Linux IR - http://www.cs.uit.no/~dagb/irda/irda.html */
#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
#define N_HDLC 13 /* synchronous HDLC */
#define N_SYNC_PPP 14 /* synchronous PPP */
#ifdef __KERNEL__
......
......@@ -23,9 +23,6 @@
#include <linux/termios.h>
#include <linux/tqueue.h>
#include <linux/wait.h>
#ifdef CONFIG_PCI
#include <linux/pci.h>
#endif
/*
* Counters of the input lines (CTS, DSR, RI, CD) interrupts
......@@ -151,6 +148,7 @@ struct rs_multiport_struct {
/*
* Structures and definitions for PCI support
*/
struct pci_dev;
struct pci_board {
unsigned short vendor;
unsigned short device;
......
......@@ -23,7 +23,6 @@
#include <linux/tqueue.h>
#include <linux/tty_driver.h>
#include <linux/tty_ldisc.h>
#include <linux/serialP.h>
#include <asm/system.h>
......
......@@ -352,7 +352,7 @@ void mmput(struct mm_struct *mm)
void mm_release(void)
{
struct task_struct *tsk = current;
forget_segments();
/* notify parent sleeping on vfork() */
if (tsk->flags & PF_VFORK) {
tsk->flags &= ~PF_VFORK;
......
......@@ -247,6 +247,7 @@ EXPORT_SYMBOL(tq_disk);
EXPORT_SYMBOL(init_buffer);
EXPORT_SYMBOL(refile_buffer);
EXPORT_SYMBOL(max_sectors);
EXPORT_SYMBOL(max_segments);
EXPORT_SYMBOL(max_readahead);
EXPORT_SYMBOL(file_moveto);
......
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