Commit d2cf3bd5 authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/disk1/davem/BK/network-2.5

into nuts.ninka.net:/disk1/davem/BK/net-2.5
parents 887b31a4 4c774112
......@@ -12,7 +12,7 @@ DOCBOOKS := wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml \
deviceiobook.sgml procfs-guide.sgml tulip-user.sgml \
writing_usb_driver.sgml scsidrivers.sgml sis900.sgml \
kernel-api.sgml journal-api.sgml lsm.sgml usb.sgml \
gadget.sgml
gadget.sgml libata.sgml
###
# The build process is as follows (targets):
......
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN"[]>
<book id="libataDevGuide">
<bookinfo>
<title>libATA Developer's Guide</title>
<authorgroup>
<author>
<firstname>Jeff</firstname>
<surname>Garzik</surname>
</author>
</authorgroup>
<copyright>
<year>2003</year>
<holder>Jeff Garzik</holder>
</copyright>
<legalnotice>
<para>
The contents of this file are subject to the Open
Software License version 1.1 that can be found at
<ulink url="http://www.opensource.org/licenses/osl-1.1.txt">http://www.opensource.org/licenses/osl-1.1.txt</ulink> and is included herein
by reference.
</para>
<para>
Alternatively, the contents of this file may be used under the terms
of the GNU General Public License version 2 (the "GPL") as distributed
in the kernel source COPYING file, in which case the provisions of
the GPL are applicable instead of the above. If you wish to allow
the use of your version of this file only under the terms of the
GPL and not to allow others to use your version of this file under
the OSL, indicate your decision by deleting the provisions above and
replace them with the notice and other provisions required by the GPL.
If you do not delete the provisions above, a recipient may use your
version of this file under either the OSL or the GPL.
</para>
</legalnotice>
</bookinfo>
<toc></toc>
<chapter id="libataThanks">
<title>Thanks</title>
<para>
The bulk of the ATA knowledge comes thanks to long conversations with
Andre Hedrick (www.linux-ide.org).
</para>
<para>
Thanks to Alan Cox for pointing out similarities
between SATA and SCSI, and in general for motivation to hack on
libata.
</para>
<para>
libata's device detection
method, ata_pio_devchk, and in general all the early probing was
based on extensive study of Hale Landis's probe/reset code in his
ATADRVR driver (www.ata-atapi.com).
</para>
</chapter>
<chapter id="libataExt">
<title>libata Library</title>
!Edrivers/scsi/libata-core.c
!Edrivers/scsi/libata-scsi.c
</chapter>
<chapter id="libataInt">
<title>libata Internals</title>
!Idrivers/scsi/libata-core.c
!Idrivers/scsi/libata-scsi.c
</chapter>
<chapter id="PiixInt">
<title>ata_piix Internals</title>
!Idrivers/scsi/ata_piix.c
</chapter>
<chapter id="SILInt">
<title>ata_sil Internals</title>
!Idrivers/scsi/sata_sil.c
</chapter>
<chapter id="VIAInt">
<title>ata_via Internals</title>
!Idrivers/scsi/sata_via.c
</chapter>
</book>
......@@ -670,7 +670,7 @@ __80200_proc_info:
.type __80321_proc_info,#object
__80321_proc_info:
.long 0x69052420
.long 0xfffffff0
.long 0xfffff7e0
.long 0x00000c0e
b __xscale_setup
.long cpu_arch_name
......
......@@ -247,6 +247,34 @@ acpi_parse_nmi_src (
#endif /*CONFIG_X86_IO_APIC*/
#ifdef CONFIG_ACPI_BUS
/*
* Set specified PIC IRQ to level triggered mode.
*
* Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers
* for the 8259 PIC. bit[n] = 1 means irq[n] is Level, otherwise Edge.
* ECLR1 is IRQ's 0-7 (IRQ 0, 1, 2 must be 0)
* ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0)
*
* As the BIOS should have done this for us,
* print a warning if the IRQ wasn't already set to level.
*/
void acpi_pic_set_level_irq(unsigned int irq)
{
unsigned char mask = 1 << (irq & 7);
unsigned int port = 0x4d0 + (irq >> 3);
unsigned char val = inb(port);
if (!(val & mask)) {
printk(KERN_WARNING PREFIX "IRQ %d was Edge Triggered, "
"setting to Level Triggerd\n", irq);
outb(val | mask, port);
}
}
#endif /* CONFIG_ACPI_BUS */
static unsigned long __init
acpi_scan_rsdp (
......
......@@ -1138,12 +1138,13 @@ static inline int IO_APIC_irq_trigger(int irq)
return 0;
}
int irq_vector[NR_IRQS] = { FIRST_DEVICE_VECTOR , 0 };
/* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
static int __init assign_irq_vector(int irq)
{
static int current_vector = FIRST_DEVICE_VECTOR, offset = 0;
BUG_ON(irq >= NR_IRQS);
BUG_ON(irq >= NR_IRQ_VECTORS);
if (IO_APIC_VECTOR(irq) > 0)
return IO_APIC_VECTOR(irq);
next:
......
......@@ -142,6 +142,19 @@ GLOBAL_ENTRY(ia32_trace_syscall)
;;
st8 [r2]=r3 // initialize return code to -ENOSYS
br.call.sptk.few rp=invoke_syscall_trace // give parent a chance to catch syscall args
// Need to reload arguments (they may be changed by the tracing process)
adds r2=IA64_PT_REGS_R9_OFFSET+16,sp // r2 = &pt_regs.r9
adds r3=IA64_PT_REGS_R13_OFFSET+16,sp // r3 = &pt_regs.r13
;;
ld4 r33=[r2],8 // r9 == ecx
ld4 r37=[r3],16 // r13 == ebp
;;
ld4 r34=[r2],8 // r10 == edx
ld4 r36=[r3],8 // r15 == edi
;;
ld4 r32=[r2],8 // r11 == ebx
ld4 r35=[r3],8 // r14 == esi
;;
.ret2: br.call.sptk.few rp=b6 // do the syscall
.ia32_strace_check_retval:
cmp.lt p6,p0=r8,r0 // syscall failed?
......
......@@ -297,9 +297,9 @@ efi_memmap_walk (efi_freemem_callback_t callback, void *arg)
u64 start;
u64 end;
} prev, curr;
void *efi_map_start, *efi_map_end, *p, *q, *r;
void *efi_map_start, *efi_map_end, *p, *q;
efi_memory_desc_t *md, *check_md;
u64 efi_desc_size, start, end, granule_addr, first_non_wb_addr = 0;
u64 efi_desc_size, start, end, granule_addr, last_granule_addr, first_non_wb_addr = 0;
efi_map_start = __va(ia64_boot_param->efi_memmap);
efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
......@@ -312,41 +312,34 @@ efi_memmap_walk (efi_freemem_callback_t callback, void *arg)
if (!(md->attribute & EFI_MEMORY_WB))
continue;
if (md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) > first_non_wb_addr) {
/*
* Search for the next run of contiguous WB memory. Start search
* at first granule boundary covered by md.
*/
granule_addr = ((md->phys_addr + IA64_GRANULE_SIZE - 1)
& -IA64_GRANULE_SIZE);
first_non_wb_addr = granule_addr;
for (q = p; q < efi_map_end; q += efi_desc_size) {
check_md = q;
if (check_md->attribute & EFI_MEMORY_WB)
trim_bottom(check_md, granule_addr);
if (check_md->phys_addr < granule_addr)
continue;
/*
* granule_addr is the base of md's first granule.
* [granule_addr - first_non_wb_addr) is guaranteed to
* be contiguous WB memory.
*/
granule_addr = md->phys_addr & ~(IA64_GRANULE_SIZE - 1);
first_non_wb_addr = max(first_non_wb_addr, granule_addr);
if (!(check_md->attribute & EFI_MEMORY_WB))
break; /* hit a non-WB region; stop search */
if (first_non_wb_addr < md->phys_addr) {
trim_bottom(md, granule_addr + IA64_GRANULE_SIZE);
granule_addr = md->phys_addr & ~(IA64_GRANULE_SIZE - 1);
first_non_wb_addr = max(first_non_wb_addr, granule_addr);
}
if (check_md->phys_addr != first_non_wb_addr)
break; /* hit a memory hole; stop search */
for (q = p; q < efi_map_end; q += efi_desc_size) {
check_md = q;
if ((check_md->attribute & EFI_MEMORY_WB) &&
(check_md->phys_addr == first_non_wb_addr))
first_non_wb_addr += check_md->num_pages << EFI_PAGE_SHIFT;
}
/* round it down to the previous granule-boundary: */
first_non_wb_addr &= -IA64_GRANULE_SIZE;
if (!(first_non_wb_addr > granule_addr))
continue; /* couldn't find enough contiguous memory */
for (r = p; r < q; r += efi_desc_size)
trim_top(r, first_non_wb_addr);
else
break; /* non-WB or hole */
}
last_granule_addr = first_non_wb_addr & ~(IA64_GRANULE_SIZE - 1);
if (last_granule_addr < md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT))
trim_top(md, last_granule_addr);
if (is_available_memory(md)) {
if (md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) > mem_limit) {
if (md->phys_addr > mem_limit)
......
......@@ -34,13 +34,8 @@ EXPORT_SYMBOL(disable_irq_nosync);
#include <linux/interrupt.h>
EXPORT_SYMBOL(probe_irq_mask);
#include <linux/in6.h>
#include <asm/checksum.h>
/* not coded yet?? EXPORT_SYMBOL(csum_ipv6_magic); */
EXPORT_SYMBOL(csum_partial_copy_nocheck);
EXPORT_SYMBOL(csum_tcpudp_magic);
EXPORT_SYMBOL(ip_compute_csum);
EXPORT_SYMBOL(ip_fast_csum);
EXPORT_SYMBOL(ip_fast_csum); /* hand-coded assembly */
#include <asm/io.h>
EXPORT_SYMBOL(__ia64_memcpy_fromio);
......@@ -58,9 +53,11 @@ EXPORT_SYMBOL_NOVERS(__up);
EXPORT_SYMBOL(clear_page);
#ifdef CONFIG_VIRTUAL_MEM_MAP
#include <linux/bootmem.h>
#include <asm/pgtable.h>
EXPORT_SYMBOL(vmalloc_end);
EXPORT_SYMBOL(ia64_pfn_valid);
EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */
#endif
#include <asm/processor.h>
......
......@@ -379,8 +379,11 @@ inline void disable_irq_nosync(unsigned int irq)
void disable_irq(unsigned int irq)
{
irq_desc_t *desc = irq_descp(irq);
disable_irq_nosync(irq);
synchronize_irq(irq);
if (desc->action)
synchronize_irq(irq);
}
/**
......@@ -402,7 +405,7 @@ void enable_irq(unsigned int irq)
spin_lock_irqsave(&desc->lock, flags);
switch (desc->depth) {
case 1: {
unsigned int status = desc->status & ~IRQ_DISABLED;
unsigned int status = desc->status & ~(IRQ_DISABLED | IRQ_INPROGRESS);
desc->status = status;
if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
desc->status = status | IRQ_REPLAY;
......
......@@ -4225,7 +4225,7 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
ret = -EBUSY;
} else {
pfm_sessions.pfs_sys_use_dbregs++;
DPRINT(("load [%d] increased sys_use_dbreg=%lu\n", task->pid, pfm_sessions.pfs_sys_use_dbregs));
DPRINT(("load [%d] increased sys_use_dbreg=%u\n", task->pid, pfm_sessions.pfs_sys_use_dbregs));
set_dbregs = 1;
}
}
......
......@@ -93,17 +93,17 @@ default_init(struct task_struct *task, void *buf, unsigned int flags, int cpu, v
hdr->hdr_version = PFM_DEFAULT_SMPL_VERSION;
hdr->hdr_buf_size = arg->buf_size;
hdr->hdr_cur_pos = (void *)((unsigned long)buf)+sizeof(*hdr);
hdr->hdr_last_pos = (void *)((unsigned long)buf)+arg->buf_size;
hdr->hdr_cur_offs = sizeof(*hdr);
hdr->hdr_overflows = 0UL;
hdr->hdr_count = 0UL;
DPRINT(("[%d] buffer=%p buf_size=%lu hdr_size=%lu hdr_version=%u\n",
DPRINT(("[%d] buffer=%p buf_size=%lu hdr_size=%lu hdr_version=%u cur_offs=%lu\n",
task->pid,
buf,
hdr->hdr_buf_size,
sizeof(*hdr),
hdr->hdr_version));
hdr->hdr_version,
hdr->hdr_cur_offs));
return 0;
}
......@@ -125,8 +125,8 @@ default_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, struct
}
hdr = (pfm_default_smpl_hdr_t *)buf;
cur = hdr->hdr_cur_pos;
last = hdr->hdr_last_pos;
cur = buf+hdr->hdr_cur_offs;
last = buf+hdr->hdr_buf_size;
ovfl_pmd = arg->ovfl_pmd;
ovfl_notify = arg->ovfl_notify;
......@@ -191,7 +191,7 @@ default_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, struct
/*
* update position for next entry
*/
hdr->hdr_cur_pos = cur + sizeof(*ent) + (npmds << 3);
hdr->hdr_cur_offs += sizeof(*ent) + (npmds << 3);
/*
* keep same ovfl_pmds, ovfl_notify
......@@ -212,10 +212,9 @@ default_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, struct
hdr->hdr_overflows++;
/*
* if no notification is needed, then we saturate the buffer
* if no notification requested, then we saturate the buffer
*/
if (ovfl_notify == 0) {
hdr->hdr_count = 0UL;
arg->ovfl_ctrl.bits.notify_user = 0;
arg->ovfl_ctrl.bits.block_task = 0;
arg->ovfl_ctrl.bits.mask_monitoring = 1;
......@@ -236,8 +235,8 @@ default_restart(struct task_struct *task, pfm_ovfl_ctrl_t *ctrl, void *buf, stru
hdr = (pfm_default_smpl_hdr_t *)buf;
hdr->hdr_count = 0UL;
hdr->hdr_cur_pos = (void *)((unsigned long)buf)+sizeof(*hdr);
hdr->hdr_count = 0UL;
hdr->hdr_cur_offs = sizeof(*hdr);
ctrl->bits.mask_monitoring = 0;
ctrl->bits.reset_ovfl_pmds = 1; /* uses long-reset values */
......
......@@ -685,12 +685,16 @@ machine_restart (char *restart_cmd)
(*efi.reset_system)(EFI_RESET_WARM, 0, 0, 0);
}
EXPORT_SYMBOL(machine_restart);
void
machine_halt (void)
{
cpu_halt();
}
EXPORT_SYMBOL(machine_halt);
void
machine_power_off (void)
{
......@@ -698,3 +702,5 @@ machine_power_off (void)
pm_power_off();
machine_halt();
}
EXPORT_SYMBOL(machine_power_off);
......@@ -327,9 +327,11 @@ setup_arch (char **cmdline_p)
* because we don't *really* know whether there's anything there, but we hope that
* all new boxes will implement HCDP.
*/
extern unsigned char acpi_legacy_devices;
if (!efi.hcdp && acpi_legacy_devices)
setup_serial_legacy();
{
extern unsigned char acpi_legacy_devices;
if (!efi.hcdp && acpi_legacy_devices)
setup_serial_legacy();
}
#endif
#ifdef CONFIG_VT
......
/*
* Network checksum routines
*
* Copyright (C) 1999 Hewlett-Packard Co
* Copyright (C) 1999 Stephane Eranian <eranian@hpl.hp.com>
* Copyright (C) 1999, 2003 Hewlett-Packard Co
* Stephane Eranian <eranian@hpl.hp.com>
*
* Most of the code coming from arch/alpha/lib/checksum.c
*
......@@ -10,6 +10,7 @@
* in an architecture-specific manner due to speed..
*/
#include <linux/module.h>
#include <linux/string.h>
#include <asm/byteorder.h>
......@@ -40,6 +41,8 @@ csum_tcpudp_magic (unsigned long saddr, unsigned long daddr, unsigned short len,
((unsigned long) proto << 8));
}
EXPORT_SYMBOL(csum_tcpudp_magic);
unsigned int
csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr, unsigned short len,
unsigned short proto, unsigned int sum)
......@@ -84,6 +87,7 @@ csum_partial (const unsigned char * buff, int len, unsigned int sum)
return result;
}
EXPORT_SYMBOL(csum_partial);
/*
* this routine is used for miscellaneous IP-like checksums, mainly
......@@ -94,3 +98,5 @@ ip_compute_csum (unsigned char * buff, int len)
{
return ~do_csum(buff,len);
}
EXPORT_SYMBOL(ip_compute_csum);
/*
* Network Checksum & Copy routine
*
* Copyright (C) 1999 Hewlett-Packard Co
* Copyright (C) 1999 Stephane Eranian <eranian@hpl.hp.com>
* Copyright (C) 1999, 2003 Hewlett-Packard Co
* Stephane Eranian <eranian@hpl.hp.com>
*
* Most of the code has been imported from Linux/Alpha
*/
#include <linux/module.h>
#include <linux/types.h>
#include <linux/string.h>
......@@ -146,3 +147,4 @@ csum_partial_copy_nocheck(const char *src, char *dst, int len, unsigned int sum)
return do_csum_partial_copy_from_user(src, dst, len, sum, NULL);
}
EXPORT_SYMBOL(csum_partial_copy_nocheck);
......@@ -13,6 +13,7 @@
#include <linux/elf.h>
#include <linux/mm.h>
#include <linux/mmzone.h>
#include <linux/module.h>
#include <linux/personality.h>
#include <linux/reboot.h>
#include <linux/slab.h>
......@@ -43,6 +44,8 @@ unsigned long MAX_DMA_ADDRESS = PAGE_OFFSET + 0x100000000UL;
#ifdef CONFIG_VIRTUAL_MEM_MAP
unsigned long vmalloc_end = VMALLOC_END_INIT;
struct page *vmem_map;
EXPORT_SYMBOL(vmem_map);
#endif
static int pgt_cache_water[2] = { 25, 50 };
......
......@@ -11,12 +11,19 @@
*/
#include <linux/config.h>
#include <linux/cpu.h>
#include <linux/kernel.h>
#include <linux/memblk.h>
#include <linux/mm.h>
#include <linux/node.h>
#include <linux/init.h>
#include <linux/bootmem.h>
#include <asm/numa.h>
static struct memblk *sysfs_memblks;
static struct node *sysfs_nodes;
static struct cpu *sysfs_cpus;
/*
* The following structures are usually initialized by ACPI or
* similar mechanisms and describe the NUMA characteristics of the machine.
......@@ -43,3 +50,52 @@ paddr_to_nid(unsigned long paddr)
return (i < num_memblks) ? node_memblk[i].nid : (num_memblks ? -1 : 0);
}
static int __init topology_init(void)
{
int i, err = 0;
sysfs_nodes = kmalloc(sizeof(struct node) * numnodes, GFP_KERNEL);
if (!sysfs_nodes) {
err = -ENOMEM;
goto out;
}
memset(sysfs_nodes, 0, sizeof(struct node) * numnodes);
sysfs_memblks = kmalloc(sizeof(struct memblk) * num_memblks,
GFP_KERNEL);
if (!sysfs_memblks) {
kfree(sysfs_nodes);
err = -ENOMEM;
goto out;
}
memset(sysfs_memblks, 0, sizeof(struct memblk) * num_memblks);
sysfs_cpus = kmalloc(sizeof(struct cpu) * NR_CPUS, GFP_KERNEL);
if (!sysfs_cpus) {
kfree(sysfs_memblks);
kfree(sysfs_nodes);
err = -ENOMEM;
goto out;
}
memset(sysfs_cpus, 0, sizeof(struct cpu) * NR_CPUS);
for (i = 0; i < numnodes; i++)
if ((err = register_node(&sysfs_nodes[i], i, 0)))
goto out;
for (i = 0; i < num_memblks; i++)
if ((err = register_memblk(&sysfs_memblks[i], i,
&sysfs_nodes[memblk_to_node(i)])))
goto out;
for (i = 0; i < NR_CPUS; i++)
if (cpu_online(i))
if((err = register_cpu(&sysfs_cpus[i], i,
&sysfs_nodes[cpu_to_node(i)])))
goto out;
out:
return err;
}
__initcall(topology_init);
......@@ -360,7 +360,7 @@ acpi_battery_read_info (
ACPI_FUNCTION_TRACE("acpi_battery_read_info");
if (!battery)
if (!battery || (off != 0))
goto end;
if (battery->flags.present)
......@@ -459,7 +459,7 @@ acpi_battery_read_state (
ACPI_FUNCTION_TRACE("acpi_battery_read_state");
if (!battery)
if (!battery || (off != 0))
goto end;
if (battery->flags.present)
......@@ -543,7 +543,7 @@ acpi_battery_read_alarm (
ACPI_FUNCTION_TRACE("acpi_battery_read_alarm");
if (!battery)
if (!battery || (off != 0))
goto end;
if (!battery->flags.present) {
......
......@@ -39,7 +39,7 @@
#define _COMPONENT ACPI_BUS_COMPONENT
ACPI_MODULE_NAME ("acpi_bus")
extern void eisa_set_level_irq(unsigned int irq);
extern void acpi_pic_set_level_irq(unsigned int irq);
FADT_DESCRIPTOR acpi_fadt;
struct acpi_device *acpi_root;
......@@ -615,7 +615,7 @@ acpi_bus_init (void)
if (acpi_ioapic)
mp_config_ioapic_for_sci(acpi_fadt.sci_int);
else
eisa_set_level_irq(acpi_fadt.sci_int);
acpi_pic_set_level_irq(acpi_fadt.sci_int);
#endif
status = acpi_enable_subsystem(ACPI_FULL_INITIALIZATION);
......
......@@ -94,6 +94,13 @@ static struct acpi_ec *ec_ecdt;
/* External interfaces use first EC only, so remember */
static struct acpi_device *first_ec;
/*
* We use kernel thread to handle ec's gpe query, so the query may defer.
* The query need a context, which can be freed when we replace ec_ecdt
* with EC device. So defered query may have a wrong context.
* We use an indication to avoid it
*/
static int ec_device_init = 0;
/* --------------------------------------------------------------------------
Transaction Management
-------------------------------------------------------------------------- */
......@@ -393,8 +400,11 @@ acpi_ec_gpe_handler (
acpi_disable_gpe(NULL, ec->gpe_bit, ACPI_ISR);
status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
acpi_ec_gpe_query, ec);
if (!ec_device_init)
acpi_ec_gpe_query(ec); /* directly query when device didn't init */
else
status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
acpi_ec_gpe_query, ec);
}
/* --------------------------------------------------------------------------
......@@ -589,6 +599,8 @@ acpi_ec_add (
we now have the *real* EC info, so kill the makeshift one.*/
acpi_evaluate_integer(ec->handle, "_UID", NULL, &uid);
if (ec_ecdt && ec_ecdt->uid == uid) {
acpi_disable_gpe(NULL, ec_ecdt->gpe_bit, ACPI_NOT_ISR);
ec_device_init = 1;
acpi_remove_address_space_handler(ACPI_ROOT_OBJECT,
ACPI_ADR_SPACE_EC, &acpi_ec_space_handler);
......
......@@ -217,8 +217,8 @@ acpi_ev_gpe_detect (
gpe_number = (i * ACPI_GPE_REGISTER_WIDTH) + j;
int_status |= acpi_ev_gpe_dispatch (
&gpe_block->event_info[gpe_number],
gpe_number + gpe_block->register_info[gpe_number].base_gpe_number);
&gpe_block->event_info[gpe_number],
j + gpe_register_info->base_gpe_number);
}
}
}
......
......@@ -337,6 +337,9 @@ acpi_power_transition (
if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3))
return_VALUE(-EINVAL);
if ((device->power.state < ACPI_STATE_D0) || (device->power.state > ACPI_STATE_D3))
return_VALUE(-ENODEV);
cl = &device->power.states[device->power.state].resources;
tl = &device->power.states[state].resources;
......@@ -359,8 +362,6 @@ acpi_power_transition (
goto end;
}
device->power.state = state;
/*
* Then we dereference all power resources used in the current list.
*/
......@@ -370,6 +371,8 @@ acpi_power_transition (
goto end;
}
/* We shouldn't change the state till all above operations succeed */
device->power.state = state;
end:
if (result)
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
......
......@@ -416,7 +416,7 @@ acpi_ut_update_object_reference (
u32 i;
union acpi_generic_state *state_list = NULL;
union acpi_generic_state *state;
union acpi_operand_object *tmp;
ACPI_FUNCTION_TRACE_PTR ("ut_update_object_reference", object);
......@@ -448,8 +448,16 @@ acpi_ut_update_object_reference (
switch (ACPI_GET_OBJECT_TYPE (object)) {
case ACPI_TYPE_DEVICE:
acpi_ut_update_ref_count (object->device.system_notify, action);
acpi_ut_update_ref_count (object->device.device_notify, action);
tmp = object->device.system_notify;
if (tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT)
object->device.system_notify = NULL;
acpi_ut_update_ref_count (tmp, action);
tmp = object->device.device_notify;
if (tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT)
object->device.device_notify = NULL;
acpi_ut_update_ref_count (tmp, action);
break;
......@@ -470,6 +478,10 @@ acpi_ut_update_object_reference (
if (ACPI_FAILURE (status)) {
goto error_exit;
}
tmp = object->package.elements[i];
if (tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT)
object->package.elements[i] = NULL;
}
break;
......@@ -481,6 +493,10 @@ acpi_ut_update_object_reference (
if (ACPI_FAILURE (status)) {
goto error_exit;
}
tmp = object->buffer_field.buffer_obj;
if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT)
object->buffer_field.buffer_obj = NULL;
break;
......@@ -491,6 +507,10 @@ acpi_ut_update_object_reference (
if (ACPI_FAILURE (status)) {
goto error_exit;
}
tmp = object->field.region_obj;
if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT)
object->field.region_obj = NULL;
break;
......@@ -502,11 +522,19 @@ acpi_ut_update_object_reference (
goto error_exit;
}
tmp = object->bank_field.bank_obj;
if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT)
object->bank_field.bank_obj = NULL;
status = acpi_ut_create_update_state_and_push (
object->bank_field.region_obj, action, &state_list);
if (ACPI_FAILURE (status)) {
goto error_exit;
}
tmp = object->bank_field.region_obj;
if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT)
object->bank_field.region_obj = NULL;
break;
......@@ -518,11 +546,19 @@ acpi_ut_update_object_reference (
goto error_exit;
}
tmp = object->index_field.index_obj;
if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT)
object->index_field.index_obj = NULL;
status = acpi_ut_create_update_state_and_push (
object->index_field.data_obj, action, &state_list);
if (ACPI_FAILURE (status)) {
goto error_exit;
}
tmp = object->index_field.data_obj;
if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT)
object->index_field.data_obj = NULL;
break;
......
......@@ -8,7 +8,7 @@
# In the future, some of these should be built conditionally.
#
# First come modules that register themselves with the core
obj-$(CONFIG_BLK_DEV_IDEPCI) += pci/
obj-$(CONFIG_BLK_DEV_IDE) += pci/
# Core IDE code - must come before legacy
......
......@@ -797,7 +797,9 @@ static struct pci_device_id piix_pci_tbl[] = {
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_11,PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_11, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_10,PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17},
#ifndef CONFIG_SCSI_SATA
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18},
#endif /* !CONFIG_SCSI_SATA */
{ 0, },
};
......
......@@ -409,11 +409,8 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c
if( NULL != i2c_adapter ) {
memset(i2c_adapter,0,sizeof(struct i2c_adapter));
strcpy(i2c_adapter->name, dev->name);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
i2c_adapter->data = dev;
#else
i2c_set_adapdata(i2c_adapter,dev);
#endif
i2c_adapter->class = I2C_ADAP_CLASS_TV_ANALOG;
i2c_adapter->algo = &saa7146_algo;
i2c_adapter->algo_data = NULL;
i2c_adapter->id = I2C_ALGO_SAA7146;
......
......@@ -105,7 +105,7 @@ void dvb_set_crc32(u8 *data, int length)
{
u32 crc;
crc = crc32_le(~0, data, length);
crc = crc32_be(~0, data, length);
data[length] = (crc >> 24) & 0xff;
data[length+1] = (crc >> 16) & 0xff;
......@@ -116,7 +116,7 @@ void dvb_set_crc32(u8 *data, int length)
static u32 dvb_dmx_crc32 (struct dvb_demux_feed *f, const u8 *src, size_t len)
{
return (f->feed.sec.crc_val = crc32_le (f->feed.sec.crc_val, src, len));
return (f->feed.sec.crc_val = crc32_be (f->feed.sec.crc_val, src, len));
}
......
......@@ -44,12 +44,12 @@
#include "dvb_frontend.h"
#include "dvb_functions.h"
#ifndef CONFIG_TDA1004X_MC_LOCATION
#define CONFIG_TDA1004X_MC_LOCATION "/etc/dvb/tda1004x.mc"
#ifndef DVB_TDA1004X_FIRMWARE_FILE
#define DVB_TDA1004X_FIRMWARE_FILE "/etc/dvb/tda1004x.mc"
#endif
static int tda1004x_debug = 0;
static char *tda1004x_firmware = CONFIG_TDA1004X_MC_LOCATION;
static char *tda1004x_firmware = DVB_TDA1004X_FIRMWARE_FILE;
#define TDA10045H_ADDRESS 0x08
......
......@@ -4498,6 +4498,30 @@ static u8 saa7113_init_regs[] = {
0x1d, 0x00,
0x1e, 0x00,
0x41, 0x77,
0x42, 0x77,
0x43, 0x77,
0x44, 0x77,
0x45, 0x77,
0x46, 0x77,
0x47, 0x77,
0x48, 0x77,
0x49, 0x77,
0x4a, 0x77,
0x4b, 0x77,
0x4c, 0x77,
0x4d, 0x77,
0x4e, 0x77,
0x4f, 0x77,
0x50, 0x77,
0x51, 0x77,
0x52, 0x77,
0x53, 0x77,
0x54, 0x77,
0x55, 0x77,
0x56, 0x77,
0x57, 0xff,
0xff
};
......
#include <asm/types.h>
u8 Dpram [] __initdata = {
static u8 Dpram [] = {
0xe5, 0x9f, 0xf0, 0x1c, 0xe1, 0xb0, 0xf0, 0x0e,
0xe5, 0x9f, 0xf0, 0x18, 0xe2, 0x5e, 0xf0, 0x04,
0xe2, 0x5e, 0xf0, 0x08, 0xe1, 0xa0, 0x00, 0x00,
......@@ -41,7 +41,7 @@ u8 Dpram [] __initdata = {
};
u8 Root [] __initdata = {
static u8 Root [] = {
0xb4, 0x90, 0x49, 0x18, 0x1c, 0x0b, 0x4a, 0x18,
0x1a, 0x50, 0x4f, 0x18, 0x1a, 0x79, 0x10, 0x8f,
0x21, 0x00, 0x2f, 0x00, 0xdd, 0x04, 0xcb, 0x10,
......@@ -196,6 +196,7 @@ static int tda9840_detect(struct i2c_adapter *adapter, int address, int kind)
printk("tda9840.o: not enough kernel memory.\n");
return -ENOMEM;
}
memset(client, 0, sizeof(struct i2c_client));
/* fill client structure */
sprintf(client->name,"tda9840 (0x%02x)", address);
......@@ -258,9 +259,7 @@ static int tda9840_detach(struct i2c_client *client)
}
static struct i2c_driver driver = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,54)
.owner = THIS_MODULE,
#endif
.name = "tda9840 driver",
.id = I2C_DRIVERID_TDA9840,
.flags = I2C_DF_NOTIFY,
......
......@@ -70,6 +70,7 @@ static int tea6415c_detect(struct i2c_adapter *adapter, int address, int kind)
if (0 == client) {
return -ENOMEM;
}
memset(client, 0, sizeof(struct i2c_client));
/* fill client structure */
sprintf(client->name,"tea6415c (0x%02x)", address);
......@@ -207,9 +208,7 @@ static int tea6415c_command(struct i2c_client *client, unsigned int cmd, void* a
}
static struct i2c_driver driver = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,54)
.owner = THIS_MODULE,
#endif
.name = "tea6415c driver",
.id = I2C_DRIVERID_TEA6415C,
.flags = I2C_DF_NOTIFY,
......
......@@ -110,7 +110,8 @@ static int tea6420_detect(struct i2c_adapter *adapter, int address, int kind)
if (0 == client) {
return -ENOMEM;
}
memset(client, 0x0, sizeof(struct i2c_client));
/* fill client structure */
sprintf(client->name,"tea6420 (0x%02x)", address);
client->id = tea6420_id++;
......@@ -187,9 +188,7 @@ static int tea6420_command(struct i2c_client *client, unsigned int cmd, void* ar
}
static struct i2c_driver driver = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,54)
.owner = THIS_MODULE,
#endif
.name = "tea6420 driver",
.id = I2C_DRIVERID_TEA6420,
.flags = I2C_DF_NOTIFY,
......
......@@ -748,6 +748,60 @@ static void __init quirk_sis_96x_compatible(struct pci_dev *dev)
sis_96x_compatible = 1;
}
#ifdef CONFIG_SCSI_SATA
static void __init quirk_intel_ide_combined(struct pci_dev *pdev)
{
u8 prog, comb, tmp;
/*
* Narrow down to Intel SATA PCI devices.
*/
switch (pdev->device) {
/* PCI ids taken from drivers/scsi/ata_piix.c */
case 0x24d1:
case 0x24df:
case 0x25a3:
case 0x25b0:
break;
default:
/* we do not handle this PCI device */
return;
}
/*
* Read combined mode register.
*/
pci_read_config_byte(pdev, 0x90, &tmp); /* combined mode reg */
tmp &= 0x6; /* interesting bits 2:1, PATA primary/secondary */
if (tmp == 0x4) /* bits 10x */
comb = (1 << 0); /* SATA port 0, PATA port 1 */
else if (tmp == 0x6) /* bits 11x */
comb = (1 << 2); /* PATA port 0, SATA port 1 */
else
return; /* not in combined mode */
/*
* Read programming interface register.
* (Tells us if it's legacy or native mode)
*/
pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog);
/* if SATA port is in native mode, we're ok. */
if (prog & comb)
return;
/* SATA port is in legacy mode. Reserve port so that
* IDE driver does not attempt to use it. If request_region
* fails, it will be obvious at boot time, so we don't bother
* checking return values.
*/
if (comb == (1 << 0))
request_region(0x1f0, 8, "libata"); /* port 0 */
else
request_region(0x170, 8, "libata"); /* port 1 */
}
#endif /* CONFIG_SCSI_SATA */
/*
* The main table of quirks.
*
......@@ -851,6 +905,14 @@ static struct pci_fixup pci_fixups[] __devinitdata = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc },
#ifdef CONFIG_SCSI_SATA
/* Fixup BIOSes that configure Parallel ATA (PATA / IDE) and
* Serial ATA (SATA) into the same PCI ID.
*/
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
quirk_intel_ide_combined },
#endif /* CONFIG_SCSI_SATA */
{ 0 }
};
......
......@@ -403,6 +403,58 @@ config SCSI_MEGARAID
To compile this driver as a module, choose M here: the
module will be called megaraid.
config SCSI_SATA
bool "Serial ATA (SATA) support"
depends on SCSI && EXPERIMENTAL
help
This driver family supports Serial ATA host controllers
and devices.
If unsure, say N.
config SCSI_SATA_SVW
tristate "ServerWorks Frodo / Apple K2 SATA support (EXPERIMENTAL)"
depends on SCSI_SATA && PCI && EXPERIMENTAL
help
This option enables support for Broadcom/Serverworks/Apple K2
SATA support.
If unsure, say N.
config SCSI_ATA_PIIX
tristate "Intel PIIX/ICH SATA support"
depends on SCSI_SATA && PCI
help
This option enables support for ICH5 Serial ATA.
If PATA support was enabled previously, this enables
support for select Intel PIIX/ICH PATA host controllers.
If unsure, say N.
config SCSI_SATA_PROMISE
tristate "Promise SATA support"
depends on SCSI_SATA && PCI && EXPERIMENTAL
help
This option enables support for Promise Serial ATA.
If unsure, say N.
config SCSI_SATA_SIL
tristate "Silicon Image SATA support"
depends on SCSI_SATA && PCI && BROKEN
help
This option enables support for Silicon Image Serial ATA.
If unsure, say N.
config SCSI_SATA_VIA
tristate "VIA SATA support"
depends on SCSI_SATA && PCI && EXPERIMENTAL
help
This option enables support for VIA Serial ATA.
If unsure, say N.
config SCSI_BUSLOGIC
tristate "BusLogic SCSI support"
depends on (PCI || ISA) && SCSI
......
......@@ -112,6 +112,11 @@ obj-$(CONFIG_SCSI_FCAL) += fcal.o
obj-$(CONFIG_SCSI_CPQFCTS) += cpqfc.o
obj-$(CONFIG_SCSI_LASI700) += lasi700.o 53c700.o
obj-$(CONFIG_SCSI_NSP32) += nsp32.o
obj-$(CONFIG_SCSI_SATA_SVW) += libata.o sata_svw.o
obj-$(CONFIG_SCSI_ATA_PIIX) += libata.o ata_piix.o
obj-$(CONFIG_SCSI_SATA_PROMISE) += libata.o sata_promise.o
obj-$(CONFIG_SCSI_SATA_SIL) += libata.o sata_sil.o
obj-$(CONFIG_SCSI_SATA_VIA) += libata.o sata_via.o
obj-$(CONFIG_ARM) += arm/
......@@ -146,6 +151,7 @@ zalon7xx-objs := zalon.o ncr53c8xx.o
NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o
cpqfc-objs := cpqfcTSinit.o cpqfcTScontrol.o cpqfcTSi2c.o \
cpqfcTSworker.o cpqfcTStrigger.o
libata-objs := libata-core.o libata-scsi.o
# Files generated that shall be removed upon make clean
clean-files := 53c7xx_d.h 53c700_d.h \
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -51,6 +51,7 @@
#define PCIBIOS_MIN_IO 0x6000
#define PCIBIOS_MIN_MEM 0x50000000
#define PCIMEM_BASE 0xe8000000
#endif
......@@ -25,8 +25,8 @@
* Interrupt entry/exit code at both C and assembly level
*/
extern int irq_vector[NR_IRQS];
#define IO_APIC_VECTOR(irq) irq_vector[irq]
extern u8 irq_vector[NR_IRQ_VECTORS];
#define IO_APIC_VECTOR(irq) ((int)irq_vector[irq])
extern void (*interrupt[NR_IRQS])(void);
......
......@@ -78,8 +78,14 @@
*/
#ifdef CONFIG_X86_IO_APIC
#define NR_IRQS 224
# if (224 >= 32 * NR_CPUS)
# define NR_IRQ_VECTORS NR_IRQS
# else
# define NR_IRQ_VECTORS (32 * NR_CPUS)
# endif
#else
#define NR_IRQS 16
#define NR_IRQ_VECTORS NR_IRQS
#endif
#define FPU_IRQ 13
......
......@@ -36,11 +36,12 @@ typedef struct {
*/
typedef struct {
unsigned long hdr_count; /* how many valid entries */
void *hdr_cur_pos; /* current position in the buffer */
void *hdr_last_pos; /* first byte beyond buffer */
unsigned long hdr_cur_offs; /* current offset from top of buffer */
unsigned long hdr_reserved2; /* reserved for future use */
unsigned long hdr_overflows; /* how many times the buffer overflowed */
unsigned long hdr_buf_size; /* how many bytes in the buffer */
unsigned int hdr_version; /* contains perfmon version (smpl format diffs) */
unsigned int hdr_reserved1; /* for future use */
unsigned long hdr_reserved[10]; /* for future use */
......
This diff is collapsed.
......@@ -89,6 +89,7 @@ extern struct resource iomem_resource;
extern int get_resource_list(struct resource *, char *buf, int size);
extern int request_resource(struct resource *root, struct resource *new);
extern struct resource * ____request_resource(struct resource *root, struct resource *new);
extern int release_resource(struct resource *new);
extern int insert_resource(struct resource *parent, struct resource *new);
extern int allocate_resource(struct resource *root, struct resource *new,
......
This diff is collapsed.
......@@ -109,12 +109,12 @@ int __init initrd_load(void)
* in that case the ram disk is just set up here, and gets
* mounted in the normal path.
*/
if (rd_load_image("/dev/initrd") && ROOT_DEV != Root_RAM0) {
sys_unlink("/dev/initrd");
if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) {
sys_unlink("/initrd.image");
handle_initrd();
return 1;
}
}
sys_unlink("/dev/initrd");
sys_unlink("/initrd.image");
return 0;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment