Commit a631fa30 authored by Nathan Scott's avatar Nathan Scott

Merge bk://linux.bkbits.net/linux-2.5

into oss.sgi.com:/oss4/bitkeeper/xfs-linux-2.6
parents f34a152b e469d3c2
Release Date : Thu Dec 9 19:02:14 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
Current Version : 2.20.4.1 (scsi module), 2.20.2.3 (cmm module)
Older Version : 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
i. Fix a bug in kioc's dma buffer deallocation
Release Date : Thu Nov 4 18:24:56 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
Current Version : 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
......
......@@ -2495,6 +2495,13 @@ M: johnpol@2ka.mipt.ru
L: sensors@stimpy.netroedge.com
S: Maintained
W83L51xD SD/MMC CARD INTERFACE DRIVER
P: Pierre Ossman
M: drzeus-wbsd@drzeus.cx
L: wbsd-devel@list.drzeus.cx
W: http://projects.drzeus.cx/wbsd
S: Maintained
W83L785TS HARDWARE MONITOR DRIVER
P: Jean Delvare
M: khali@linux-fr.org
......
This diff is collapsed.
......@@ -1657,6 +1657,8 @@ __stubs_end:
ENTRY(__trap_init)
stmfd sp!, {r4 - r6, lr}
mov r0, #0xff000000
orr r0, r0, #0x00ff0000 @ high vectors position
adr r1, .LCvectors @ set up the vectors
ldmia r1, {r1, r2, r3, r4, r5, r6, ip, lr}
stmia r0, {r1, r2, r3, r4, r5, r6, ip, lr}
......
......@@ -46,32 +46,16 @@
#include <asm/system.h>
#include <asm/uaccess.h>
#define FIQ_VECTOR (vectors_base() + 0x1c)
static unsigned long no_fiq_insn;
static inline void unprotect_page_0(void)
{
modify_domain(DOMAIN_USER, DOMAIN_MANAGER);
}
static inline void protect_page_0(void)
{
modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
}
/* Default reacquire function
* - we always relinquish FIQ control
* - we always reacquire FIQ control
*/
static int fiq_def_op(void *ref, int relinquish)
{
if (!relinquish) {
unprotect_page_0();
*(unsigned long *)FIQ_VECTOR = no_fiq_insn;
protect_page_0();
flush_icache_range(FIQ_VECTOR, FIQ_VECTOR + 4);
}
if (!relinquish)
set_fiq_handler(&no_fiq_insn, sizeof(no_fiq_insn));
return 0;
}
......@@ -93,12 +77,10 @@ int show_fiq_list(struct seq_file *p, void *v)
void set_fiq_handler(void *start, unsigned int length)
{
unprotect_page_0();
memcpy((void *)FIQ_VECTOR, start, length);
protect_page_0();
flush_icache_range(FIQ_VECTOR, FIQ_VECTOR + length);
memcpy((void *)0xffff001c, start, length);
flush_icache_range(0xffff001c, 0xffff001c + length);
if (!vectors_high())
flush_icache_range(0x1c, 0x1c + length);
}
/*
......@@ -198,6 +180,5 @@ EXPORT_SYMBOL(disable_fiq);
void __init init_FIQ(void)
{
no_fiq_insn = *(unsigned long *)FIQ_VECTOR;
set_fs(get_fs());
no_fiq_insn = *(unsigned long *)0xffff001c;
}
......@@ -51,6 +51,13 @@ asmlinkage int sys_pipe(unsigned long __user *fildes)
return error;
}
/*
* This is the lowest virtual address we can permit any user space
* mapping to be mapped at. This is particularly important for
* non-high vector CPUs.
*/
#define MIN_MAP_ADDR (PAGE_SIZE)
/* common code for old and new mmaps */
inline long do_mmap2(
unsigned long addr, unsigned long len,
......@@ -62,11 +69,7 @@ inline long do_mmap2(
flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
/*
* If we are doing a fixed mapping, and address < PAGE_SIZE,
* then deny it.
*/
if (flags & MAP_FIXED && addr < PAGE_SIZE && vectors_base() == 0)
if (flags & MAP_FIXED && addr < MIN_MAP_ADDR)
goto out;
error = -EBADF;
......@@ -119,12 +122,7 @@ sys_arm_mremap(unsigned long addr, unsigned long old_len,
{
unsigned long ret = -EINVAL;
/*
* If we are doing a fixed mapping, and address < PAGE_SIZE,
* then deny it.
*/
if (flags & MREMAP_FIXED && new_addr < PAGE_SIZE &&
vectors_base() == 0)
if (flags & MREMAP_FIXED && new_addr < MIN_MAP_ADDR)
goto out;
down_write(&current->mm->mmap_sem);
......
......@@ -328,20 +328,11 @@ asmlinkage void do_unexp_fiq (struct pt_regs *regs)
*/
asmlinkage void bad_mode(struct pt_regs *regs, int reason, int proc_mode)
{
unsigned int vectors = vectors_base();
console_verbose();
printk(KERN_CRIT "Bad mode in %s handler detected: mode %s\n",
handler[reason], processor_modes[proc_mode]);
/*
* Dump out the vectors and stub routines. Maybe a better solution
* would be to dump them out only if we detect that they are corrupted.
*/
dump_mem(KERN_CRIT "Vectors: ", vectors, vectors + 0x40);
dump_mem(KERN_CRIT "Stubs: ", vectors + 0x200, vectors + 0x4b8);
die("Oops - bad mode", regs, 0);
local_irq_disable();
panic("bad mode");
......@@ -537,7 +528,7 @@ EXPORT_SYMBOL(__bug);
void __readwrite_bug(const char *fn)
{
printk("%s called, but not implemented", fn);
printk("%s called, but not implemented\n", fn);
BUG();
}
EXPORT_SYMBOL(__readwrite_bug);
......@@ -575,13 +566,9 @@ EXPORT_SYMBOL(abort);
void __init trap_init(void)
{
extern void __trap_init(unsigned long);
unsigned long base = vectors_base();
__trap_init(base);
flush_icache_range(base, base + PAGE_SIZE);
if (base != 0)
printk(KERN_DEBUG "Relocating machine vectors to 0x%08lx\n",
base);
extern void __trap_init(void);
__trap_init();
flush_icache_range(0xffff0000, 0xffff0000 + PAGE_SIZE);
modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
}
......@@ -243,7 +243,7 @@ struct clk s3c24xx_dclk1 = {
};
struct clk s3c24xx_clkout0 = {
.name = "clkout1",
.name = "clkout0",
.id = -1,
};
......
......@@ -11,6 +11,8 @@
#include <linux/string.h>
#include <linux/pm.h>
#include <linux/device.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <asm/irq.h>
#include <asm/hardware.h>
......@@ -18,6 +20,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#include <asm/mach/map.h>
#include <asm/mach/serial_sa1100.h>
#include <asm/arch/simpad.h>
......@@ -83,6 +86,45 @@ static struct sa1100_port_fns simpad_port_fns __initdata = {
.pm = simpad_uart_pm,
};
static struct mtd_partition simpad_partitions[] = {
{
.name = "SIMpad boot firmware",
.size = 0x00080000,
.offset = 0,
.mask_flags = MTD_WRITEABLE,
}, {
.name = "SIMpad kernel",
.size = 0x0010000,
.offset = MTDPART_OFS_APPEND,
}, {
.name = "SIMpad root jffs2",
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND,
}
};
static struct flash_platform_data simpad_flash_data = {
.map_name = "cfi_probe",
.parts = simpad_partitions,
.nr_parts = ARRAY_SIZE(simpad_partitions),
};
static struct resource simpad_flash_resources [] = {
{
.start = SA1100_CS0_PHYS,
.end = SA1100_CS0_PHYS + SZ_16M -1,
.flags = IORESOURCE_MEM,
}, {
.start = SA1100_CS1_PHYS,
.end = SA1100_CS1_PHYS + SZ_16M -1,
.flags = IORESOURCE_MEM,
}
};
static void __init simpad_map_io(void)
{
sa1100_map_io();
......@@ -113,84 +155,9 @@ static void __init simpad_map_io(void)
PCFR = 0;
PSDR = 0;
}
#ifdef CONFIG_PROC_FS
static char* name[]={
"VCC_5V_EN",
"VCC_3V_EN",
"EN1",
"EN0",
"DISPLAY_ON",
"PCMCIA_BUFF_DIS",
"MQ_RESET",
"PCMCIA_RESET",
"DECT_POWER_ON",
"IRDA_SD",
"RS232_ON",
"SD_MEDIAQ",
"LED2_ON",
"IRDA_MODE",
"ENABLE_5V",
"RESET_SIMCARD"
};
static int proc_cs3_read(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
char *p = page;
int len, i;
p += sprintf(p, "Chipselect3 : %x\n", (uint)cs3_shadow);
for (i = 0; i <= 15; i++) {
if(cs3_shadow & (1<<i)) {
p += sprintf(p, "%s\t: TRUE \n",name[i]);
} else
p += sprintf(p, "%s\t: FALSE \n",name[i]);
}
len = (p - page) - off;
if (len < 0)
len = 0;
*eof = (len <= count) ? 1 : 0;
*start = page + off;
return len;
}
static int proc_cs3_write(struct file * file, const char * buffer,
size_t count, loff_t *ppos)
{
unsigned long newRegValue;
char *endp;
newRegValue = simple_strtoul(buffer,&endp,0);
set_cs3( newRegValue );
return (count+endp-buffer);
}
#endif
static int __init cs3_init(void)
{
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_cs3 = create_proc_entry("CS3", 0, 0);
if (proc_cs3)
{
proc_cs3->read_proc = proc_cs3_read;
proc_cs3->write_proc = (void*)proc_cs3_write;
}
#endif
return 0;
sa11x0_set_flash_data(&simpad_flash_data, simpad_flash_resources,
ARRAY_SIZE(simpad_flash_resources));
}
arch_initcall(cs3_init);
static void simpad_power_off(void)
{
......
......@@ -15,6 +15,7 @@
#include <asm/pgtable.h>
#include <asm/shmparam.h>
#include <asm/tlbflush.h>
#include <asm/cacheflush.h>
#if SHMLBA > 16384
#error FIX ME
......
......@@ -158,7 +158,7 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
init_pgd = pgd_offset_k(0);
if (vectors_base() == 0) {
if (!vectors_high()) {
/*
* This lock is here just to satisfy pmd_alloc and pte_lock
*/
......@@ -317,12 +317,18 @@ static struct mem_types mem_types[] __initdata = {
.prot_sect = PMD_TYPE_SECT | PMD_SECT_MINICACHE,
.domain = DOMAIN_KERNEL,
},
[MT_VECTORS] = {
[MT_LOW_VECTORS] = {
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
L_PTE_EXEC,
.prot_l1 = PMD_TYPE_TABLE,
.domain = DOMAIN_USER,
},
[MT_HIGH_VECTORS] = {
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
L_PTE_USER | L_PTE_EXEC,
.prot_l1 = PMD_TYPE_TABLE,
.domain = DOMAIN_USER,
},
[MT_MEMORY] = {
.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
.domain = DOMAIN_KERNEL,
......@@ -357,13 +363,12 @@ static void __init build_mem_type_table(void)
}
if (cpu_arch <= CPU_ARCH_ARMv5) {
mem_types[MT_DEVICE].prot_l1 |= PMD_BIT4;
mem_types[MT_DEVICE].prot_sect |= PMD_BIT4;
mem_types[MT_CACHECLEAN].prot_sect |= PMD_BIT4;
mem_types[MT_MINICLEAN].prot_sect |= PMD_BIT4;
mem_types[MT_VECTORS].prot_l1 |= PMD_BIT4;
mem_types[MT_MEMORY].prot_sect |= PMD_BIT4;
mem_types[MT_ROM].prot_sect |= PMD_BIT4;
for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
if (mem_types[i].prot_l1)
mem_types[i].prot_l1 |= PMD_BIT4;
if (mem_types[i].prot_sect)
mem_types[i].prot_sect |= PMD_BIT4;
}
}
/*
......@@ -387,13 +392,16 @@ static void __init build_mem_type_table(void)
cp = &cache_policies[cachepolicy];
if (cpu_arch >= CPU_ARCH_ARMv5) {
mem_types[MT_VECTORS].prot_pte |= cp->pte & PTE_CACHEABLE;
mem_types[MT_LOW_VECTORS].prot_pte |= cp->pte & PTE_CACHEABLE;
mem_types[MT_HIGH_VECTORS].prot_pte |= cp->pte & PTE_CACHEABLE;
} else {
mem_types[MT_VECTORS].prot_pte |= cp->pte;
mem_types[MT_LOW_VECTORS].prot_pte |= cp->pte;
mem_types[MT_HIGH_VECTORS].prot_pte |= cp->pte;
mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1);
}
mem_types[MT_VECTORS].prot_l1 |= ecc_mask;
mem_types[MT_LOW_VECTORS].prot_l1 |= ecc_mask;
mem_types[MT_HIGH_VECTORS].prot_l1 |= ecc_mask;
mem_types[MT_MEMORY].prot_sect |= ecc_mask | cp->pmd;
mem_types[MT_ROM].prot_sect |= cp->pmd;
......@@ -420,6 +428,8 @@ static void __init build_mem_type_table(void)
ecc_mask ? "en" : "dis", cp->policy);
}
#define vectors_base() (vectors_high() ? 0xffff0000 : 0)
/*
* Create the page directory entries and any necessary
* page tables for the mapping specified by `md'. We
......@@ -587,16 +597,22 @@ void __init memtable_init(struct meminfo *mi)
} while (address != 0);
/*
* Create a mapping for the machine vectors at virtual address 0
* or 0xffff0000. We should always try the high mapping.
* Create a mapping for the machine vectors at the high-vectors
* location (0xffff0000). If we aren't using high-vectors, also
* create a mapping at the low-vectors virtual address.
*/
init_maps->physical = virt_to_phys(init_maps);
init_maps->virtual = vectors_base();
init_maps->virtual = 0xffff0000;
init_maps->length = PAGE_SIZE;
init_maps->type = MT_VECTORS;
init_maps->type = MT_HIGH_VECTORS;
create_mapping(init_maps);
if (!vectors_high()) {
init_maps->virtual = 0;
init_maps->type = MT_LOW_VECTORS;
create_mapping(init_maps);
}
flush_cache_all();
flush_tlb_all();
}
......
......@@ -201,6 +201,11 @@ __v6_setup:
mov r10, #0x1f @ domains 0, 1 = manager
mcr p15, 0, r10, c3, c0, 0 @ load domain access register
mrc p15, 0, r0, c1, c0, 0 @ read control register
#ifdef CONFIG_VFP
mrc p15, 0, r10, c1, c0, 2
orr r10, r10, #(3 << 20)
mcr p15, 0, r10, c1, c0, 2 @ Enable full access to VFP
#endif
ldr r10, cr1_clear @ get mask for bits to clear
bic r0, r0, r10 @ clear bits them
ldr r10, cr1_set @ get mask for bits to set
......
......@@ -357,7 +357,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
#endif
/* Are we from a system call? */
if (regs->orig_rax >= 0) {
if ((long)regs->orig_rax >= 0) {
/* If so, check system call restarting.. */
switch (regs->rax) {
case -ERESTART_RESTARTBLOCK:
......@@ -442,7 +442,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
no_signal:
/* Did we come from a system call? */
if (regs->orig_rax >= 0) {
if ((long)regs->orig_rax >= 0) {
/* Restart the system call - no handlers present */
long res = regs->rax;
if (res == -ERESTARTNOHAND ||
......
......@@ -54,4 +54,6 @@ source "sound/Kconfig"
source "drivers/usb/Kconfig"
source "drivers/mmc/Kconfig"
endmenu
......@@ -192,7 +192,7 @@ config MOXA_INTELLIO
config MOXA_SMARTIO
tristate "Moxa SmartIO support"
depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP
depends on SERIAL_NONSTANDARD
help
Say Y here if you have a Moxa SmartIO multiport serial card.
......
This diff is collapsed.
This diff is collapsed.
......@@ -49,4 +49,15 @@ config MMC_PXA
If unsure, say N.
config MMC_WBSD
tristate "Winbond W83L51xD SD/MMC Card Interface support"
depends on MMC
help
This selects the Winbond(R) W83L51xD Secure digital and
Multimedia card Interface.
If you have a machine with a integrated W83L518D or W83L519D
SD/MMC card reader, say Y or M here.
If unsure, say N.
endmenu
......@@ -17,5 +17,6 @@ obj-$(CONFIG_MMC_BLOCK) += mmc_block.o
#
obj-$(CONFIG_MMC_ARMMMCI) += mmci.o
obj-$(CONFIG_MMC_PXA) += pxamci.o
obj-$(CONFIG_MMC_WBSD) += wbsd.o
mmc_core-y := mmc.o mmc_queue.o mmc_sysfs.o
......@@ -122,7 +122,7 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
unsigned int nob = data->blocks;
unsigned int timeout;
u32 dcmd;
int i, len;
int i;
host->data = data;
......@@ -375,15 +375,14 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
if (CLOCKRATE / clk > ios->clock)
clk <<= 1;
host->clkrt = fls(clk) - 1;
pxa_set_cken(CKEN12_MMC, 1);
/*
* we write clkrt on the next command
*/
} else if (readl(host->base + MMC_STAT) & STAT_CLK_EN) {
/*
* Ensure that the clock is off.
*/
writel(STOP_CLOCK, host->base + MMC_STRPCL);
} else {
pxamci_stop_clock(host);
pxa_set_cken(CKEN12_MMC, 0);
}
if (host->power_mode != ios->power_mode) {
......@@ -505,8 +504,6 @@ static int pxamci_probe(struct device *dev)
if (host->pdata && host->pdata->init)
host->pdata->init(dev, pxamci_detect_irq, mmc);
pxa_set_cken(CKEN12_MMC, 1);
mmc_add_host(mmc);
return 0;
......@@ -545,8 +542,6 @@ static int pxamci_remove(struct device *dev)
END_CMD_RES|PRG_DONE|DATA_TRAN_DONE,
host->base + MMC_I_MASK);
pxa_set_cken(CKEN12_MMC, 0);
DRCMRRXMMC = 0;
DRCMRTXMMC = 0;
......@@ -555,8 +550,6 @@ static int pxamci_remove(struct device *dev)
iounmap(host->base);
dma_free_coherent(dev, PAGE_SIZE, host->sg_cpu, host->sg_dma);
pxa_set_cken(CKEN12_MMC, 0);
release_resource(host->res);
mmc_free_host(mmc);
......
This diff is collapsed.
/*
* linux/drivers/mmc/wbsd.h
*
* Copyright (C) 2004 Pierre Ossman, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
const int config_ports[] = { 0x2E, 0x4E };
const int unlock_codes[] = { 0x83, 0x87 };
const int valid_ids[] = {
0x7112,
};
#define LOCK_CODE 0xAA
#define WBSD_CONF_SWRST 0x02
#define WBSD_CONF_DEVICE 0x07
#define WBSD_CONF_ID_HI 0x20
#define WBSD_CONF_ID_LO 0x21
#define WBSD_CONF_POWER 0x22
#define WBSD_CONF_PME 0x23
#define WBSD_CONF_PMES 0x24
#define WBSD_CONF_ENABLE 0x30
#define WBSD_CONF_PORT_HI 0x60
#define WBSD_CONF_PORT_LO 0x61
#define WBSD_CONF_IRQ 0x70
#define WBSD_CONF_DRQ 0x74
#define WBSD_CONF_PINS 0xF0
#define DEVICE_SD 0x03
#define WBSD_CMDR 0x00
#define WBSD_DFR 0x01
#define WBSD_EIR 0x02
#define WBSD_ISR 0x03
#define WBSD_FSR 0x04
#define WBSD_IDXR 0x05
#define WBSD_DATAR 0x06
#define WBSD_CSR 0x07
#define WBSD_EINT_CARD 0x40
#define WBSD_EINT_FIFO_THRE 0x20
#define WBSD_EINT_CCRC 0x10
#define WBSD_EINT_TIMEOUT 0x08
#define WBSD_EINT_PROGEND 0x04
#define WBSD_EINT_CRC 0x02
#define WBSD_EINT_TC 0x01
#define WBSD_INT_PENDING 0x80
#define WBSD_INT_CARD 0x40
#define WBSD_INT_FIFO_THRE 0x20
#define WBSD_INT_CRC 0x10
#define WBSD_INT_TIMEOUT 0x08
#define WBSD_INT_PROGEND 0x04
#define WBSD_INT_BUSYEND 0x02
#define WBSD_INT_TC 0x01
#define WBSD_FIFO_EMPTY 0x80
#define WBSD_FIFO_FULL 0x40
#define WBSD_FIFO_EMTHRE 0x20
#define WBSD_FIFO_FUTHRE 0x10
#define WBSD_FIFO_SZMASK 0x0F
#define WBSD_MSLED 0x20
#define WBSD_POWER_N 0x10
#define WBSD_WRPT 0x04
#define WBSD_CARDPRESENT 0x01
#define WBSD_IDX_CLK 0x01
#define WBSD_IDX_PBSMSB 0x02
#define WBSD_IDX_TAAC 0x03
#define WBSD_IDX_NSAC 0x04
#define WBSD_IDX_PBSLSB 0x05
#define WBSD_IDX_SETUP 0x06
#define WBSD_IDX_DMA 0x07
#define WBSD_IDX_FIFOEN 0x08
#define WBSD_IDX_STATUS 0x10
#define WBSD_IDX_RSPLEN 0x1E
#define WBSD_IDX_RESP0 0x1F
#define WBSD_IDX_RESP1 0x20
#define WBSD_IDX_RESP2 0x21
#define WBSD_IDX_RESP3 0x22
#define WBSD_IDX_RESP4 0x23
#define WBSD_IDX_RESP5 0x24
#define WBSD_IDX_RESP6 0x25
#define WBSD_IDX_RESP7 0x26
#define WBSD_IDX_RESP8 0x27
#define WBSD_IDX_RESP9 0x28
#define WBSD_IDX_RESP10 0x29
#define WBSD_IDX_RESP11 0x2A
#define WBSD_IDX_RESP12 0x2B
#define WBSD_IDX_RESP13 0x2C
#define WBSD_IDX_RESP14 0x2D
#define WBSD_IDX_RESP15 0x2E
#define WBSD_IDX_RESP16 0x2F
#define WBSD_IDX_CRCSTATUS 0x30
#define WBSD_IDX_ISR 0x3F
#define WBSD_CLK_375K 0x00
#define WBSD_CLK_12M 0x01
#define WBSD_CLK_16M 0x02
#define WBSD_CLK_24M 0x03
#define WBSD_DAT3_H 0x08
#define WBSD_FIFO_RESET 0x04
#define WBSD_SOFT_RESET 0x02
#define WBSD_INC_INDEX 0x01
#define WBSD_DMA_SINGLE 0x02
#define WBSD_DMA_ENABLE 0x01
#define WBSD_FIFOEN_EMPTY 0x20
#define WBSD_FIFOEN_FULL 0x10
#define WBSD_FIFO_THREMASK 0x0F
#define WBSD_BUSY 0x20
#define WBSD_CARDTRAFFIC 0x04
#define WBSD_SENDCMD 0x02
#define WBSD_RECVRES 0x01
#define WBSD_RSP_SHORT 0x00
#define WBSD_RSP_LONG 0x01
#define WBSD_CRC_MASK 0x1F
#define WBSD_CRC_OK 0x05 /* S010E (00101) */
#define WBSD_CRC_FAIL 0x0B /* S101E (01011) */
/* 64kB / 512 */
#define NR_SG 128
struct wbsd_host
{
struct mmc_host* mmc; /* MMC structure */
spinlock_t lock; /* Mutex */
struct mmc_request* mrq; /* Current request */
struct scatterlist sg[NR_SG]; /* SG list */
struct scatterlist* cur_sg; /* Current SG entry */
unsigned int num_sg; /* Number of entries left */
unsigned int offset; /* Offset into current entry */
unsigned int remain; /* Data left in curren entry */
int size; /* Total size of transfer */
char* dma_buffer; /* ISA DMA buffer */
dma_addr_t dma_addr; /* Physical address for same */
int firsterr; /* See fifo functions */
u8 clk; /* Current clock speed */
int config; /* Config port */
u8 unlock_code; /* Code to unlock config */
int chip_id; /* ID of controller */
int base; /* I/O port base */
int irq; /* Interrupt */
int dma; /* DMA channel */
struct tasklet_struct card_tasklet; /* Tasklet structures */
struct tasklet_struct fifo_tasklet;
struct tasklet_struct crc_tasklet;
struct tasklet_struct timeout_tasklet;
struct tasklet_struct finish_tasklet;
struct tasklet_struct block_tasklet;
};
......@@ -663,10 +663,9 @@ static void __devexit aac_remove_one(struct pci_dev *pdev)
kfree(aac->fibs);
list_del(&aac->entry);
scsi_host_put(shost);
pci_disable_device(pdev);
list_del(&aac->entry);
}
static struct pci_driver aac_pci_driver = {
......
......@@ -1140,6 +1140,10 @@ static struct scsi_host_template imm_template = {
.use_clustering = ENABLE_CLUSTERING,
.can_queue = 1,
.slave_alloc = imm_adjust_queue,
.unchecked_isa_dma = 1, /* imm cannot deal with highmem, so
* this is an easy trick to ensure
* all io pages for this host reside
* in low memory */
};
/***************************************************************************
......
......@@ -142,7 +142,7 @@ typedef struct uioc {
caddr_t buf_vaddr;
dma_addr_t buf_paddr;
uint8_t pool_index;
int8_t pool_index;
uint8_t free_buf;
uint8_t timedout;
......
......@@ -10,7 +10,7 @@
* 2 of the License, or (at your option) any later version.
*
* FILE : megaraid_mm.c
* Version : v2.20.2.2 (Nov 04 2004)
* Version : v2.20.2.3 (Dec 09 2004)
*
* Common management module
*/
......@@ -614,23 +614,27 @@ mraid_mm_dealloc_kioc(mraid_mmadp_t *adp, uioc_t *kioc)
mm_dmapool_t *pool;
unsigned long flags;
pool = &adp->dma_pool_list[kioc->pool_index];
if (kioc->pool_index != -1) {
pool = &adp->dma_pool_list[kioc->pool_index];
/* This routine may be called in non-isr context also */
spin_lock_irqsave(&pool->lock, flags);
/*
* While attaching the dma buffer, if we didn't get the required
* buffer from the pool, we would have allocated it at the run time
* and set the free_buf flag. We must free that buffer. Otherwise,
* just mark that the buffer is not in use
*/
if (kioc->free_buf == 1)
pci_pool_free(pool->handle, kioc->buf_vaddr, kioc->buf_paddr);
else
pool->in_use = 0;
/* This routine may be called in non-isr context also */
spin_lock_irqsave(&pool->lock, flags);
spin_unlock_irqrestore(&pool->lock, flags);
/*
* While attaching the dma buffer, if we didn't get the
* required buffer from the pool, we would have allocated
* it at the run time and set the free_buf flag. We must
* free that buffer. Otherwise, just mark that the buffer is
* not in use
*/
if (kioc->free_buf == 1)
pci_pool_free(pool->handle, kioc->buf_vaddr,
kioc->buf_paddr);
else
pool->in_use = 0;
spin_unlock_irqrestore(&pool->lock, flags);
}
/* Return the kioc to the free pool */
spin_lock_irqsave(&adp->kioc_pool_lock, flags);
......
......@@ -29,10 +29,9 @@
#include "megaraid_ioctl.h"
#define LSI_COMMON_MOD_VERSION "2.20.2.2"
#define LSI_COMMON_MOD_VERSION "2.20.2.3"
#define LSI_COMMON_MOD_EXT_VERSION \
"(Release Date: Thu Nov 4 17:46:29 EST 2004)"
"(Release Date: Thu Dec 9 19:02:14 EST 2004)"
#define LSI_DBGLVL dbglevel
......
......@@ -47,8 +47,6 @@
/* Local Prototypes. */
static inline uint32_t qla2x00_to_handle(uint16_t, uint16_t, uint16_t);
static inline uint16_t qla2x00_handle_to_idx(uint32_t);
static inline uint16_t qla2x00_handle_to_iter(uint32_t);
static inline uint16_t qla2x00_handle_to_type(uint32_t);
static inline uint32_t qla2x00_iodesc_to_handle(struct io_descriptor *);
static inline struct io_descriptor *qla2x00_handle_to_iodesc(scsi_qla_host_t *,
uint32_t);
......@@ -129,30 +127,6 @@ qla2x00_handle_to_idx(uint32_t handle)
return ((uint16_t)(((handle) >> HDL_INDEX_SHIFT) & HDL_INDEX_MASK));
}
/**
* qla2x00_handle_to_type() - Retrive the descriptor type for a given handle.
* @handle: descriptor handle
*
* Returns the descriptor type specified by the @handle.
*/
static inline uint16_t
qla2x00_handle_to_type(uint32_t handle)
{
return ((uint16_t)(((handle) >> HDL_TYPE_SHIFT) & HDL_TYPE_MASK));
}
/**
* qla2x00_handle_to_iter() - Retrive the rolling signature for a given handle.
* @handle: descriptor handle
*
* Returns the signature specified by the @handle.
*/
static inline uint16_t
qla2x00_handle_to_iter(uint32_t handle)
{
return ((uint16_t)(((handle) >> HDL_ITER_SHIFT) & HDL_ITER_MASK));
}
/**
* qla2x00_iodesc_to_handle() - Convert an IO descriptor to a unique handle.
* @iodesc: io descriptor
......
......@@ -218,10 +218,18 @@ static struct ata_port_operations nv_ops = {
.host_stop = nv_host_stop,
};
/* FIXME: The hardware provides the necessary SATA PHY controls
* to support ATA_FLAG_SATA_RESET. However, it is currently
* necessary to disable that flag, to solve misdetection problems.
* See http://bugme.osdl.org/show_bug.cgi?id=3352 for more info.
*
* This problem really needs to be investigated further. But in the
* meantime, we avoid ATA_FLAG_SATA_RESET to get people working.
*/
static struct ata_port_info nv_port_info = {
.sht = &nv_sht,
.host_flags = ATA_FLAG_SATA |
ATA_FLAG_SATA_RESET |
/* ATA_FLAG_SATA_RESET | */
ATA_FLAG_SRST |
ATA_FLAG_NO_LEGACY,
.pio_mask = NV_PIO_MASK,
......
......@@ -198,8 +198,8 @@ static struct scsi_disk *scsi_disk_get(struct gendisk *disk)
static void scsi_disk_put(struct scsi_disk *sdkp)
{
down(&sd_ref_sem);
scsi_device_put(sdkp->device);
kref_put(&sdkp->kref, scsi_disk_release);
scsi_device_put(sdkp->device);
up(&sd_ref_sem);
}
......
......@@ -156,8 +156,8 @@ static inline struct scsi_cd *scsi_cd_get(struct gendisk *disk)
static inline void scsi_cd_put(struct scsi_cd *cd)
{
down(&sr_ref_sem);
scsi_device_put(cd->device);
kref_put(&cd->kref, sr_kref_release);
scsi_device_put(cd->device);
up(&sr_ref_sem);
}
......
......@@ -111,7 +111,7 @@ static int udsl_print_packet(const unsigned char *data, int len);
#define DRIVER_AUTHOR "Johan Verrept, Duncan Sands <duncan.sands@free.fr>"
#define DRIVER_VERSION "1.8"
#define DRIVER_DESC "Alcatel SpeedTouch USB driver version " DRIVER_VERSION
#define DRIVER_DESC "Generic USB ATM/DSL I/O, version " DRIVER_VERSION
static unsigned int num_rcv_urbs = UDSL_DEFAULT_RCV_URBS;
static unsigned int num_snd_urbs = UDSL_DEFAULT_SND_URBS;
......@@ -386,10 +386,6 @@ static unsigned int udsl_write_cells(struct udsl_instance_data *instance,
if (!(ctrl->num_cells -= ne) || !(howmany -= ne))
goto out;
if (instance->snd_padding) {
memset(target, 0, instance->snd_padding);
target += instance->snd_padding;
}
udsl_fill_cell_header(target, ctrl->atm_data.vcc);
target += ATM_CELL_HEADER;
memcpy(target, skb->data, skb->len);
......@@ -404,6 +400,10 @@ static unsigned int udsl_write_cells(struct udsl_instance_data *instance,
goto out;
}
if (instance->snd_padding) {
memset(target, 0, instance->snd_padding);
target += instance->snd_padding;
}
udsl_fill_cell_header(target, ctrl->atm_data.vcc);
target += ATM_CELL_HEADER;
memset(target, 0, ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER);
......
......@@ -122,7 +122,7 @@ static int ehci_hub_resume (struct usb_hcd *hcd)
writel (temp, &ehci->regs->port_status [i]);
}
i = HCS_N_PORTS (ehci->hcs_params);
msleep (20);
mdelay (20);
while (i--) {
temp = readl (&ehci->regs->port_status [i]);
if ((temp & PORT_SUSPEND) == 0)
......
......@@ -1121,7 +1121,7 @@ static inline void stop_urb(struct urb *urb)
{
if (urb && urb->status == -EINPROGRESS) {
urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(urb);
usb_kill_urb(urb);
}
}
......
......@@ -21,9 +21,10 @@ struct meminfo;
#define MT_DEVICE 0
#define MT_CACHECLEAN 1
#define MT_MINICLEAN 2
#define MT_VECTORS 3
#define MT_MEMORY 4
#define MT_ROM 5
#define MT_LOW_VECTORS 3
#define MT_HIGH_VECTORS 4
#define MT_MEMORY 5
#define MT_ROM 6
extern void create_memmap_holes(struct meminfo *);
extern void memtable_init(struct meminfo *);
......
......@@ -128,9 +128,9 @@ extern unsigned long cr_alignment; /* defined in entry-armv.S */
extern unsigned int user_debug;
#if __LINUX_ARM_ARCH__ >= 4
#define vectors_base() ((cr_alignment & CR_V) ? 0xffff0000 : 0)
#define vectors_high() (cr_alignment & CR_V)
#else
#define vectors_base() (0)
#define vectors_high() (0)
#endif
#define mb() __asm__ __volatile__ ("" : : : "memory")
......
......@@ -1799,8 +1799,21 @@
#define PCI_DEVICE_ID_APPLICOM_PCI2000PFB 0x0003
#define PCI_VENDOR_ID_MOXA 0x1393
#define PCI_DEVICE_ID_MOXA_RC7000 0x0001
#define PCI_DEVICE_ID_MOXA_CP102 0x1020
#define PCI_DEVICE_ID_MOXA_CP102UL 0x1021
#define PCI_DEVICE_ID_MOXA_CP102U 0x1022
#define PCI_DEVICE_ID_MOXA_C104 0x1040
#define PCI_DEVICE_ID_MOXA_CP104U 0x1041
#define PCI_DEVICE_ID_MOXA_CP104JU 0x1042
#define PCI_DEVICE_ID_MOXA_CT114 0x1140
#define PCI_DEVICE_ID_MOXA_CP114 0x1141
#define PCI_DEVICE_ID_MOXA_CP118U 0x1180
#define PCI_DEVICE_ID_MOXA_CP132 0x1320
#define PCI_DEVICE_ID_MOXA_CP132U 0x1321
#define PCI_DEVICE_ID_MOXA_CP134U 0x1340
#define PCI_DEVICE_ID_MOXA_C168 0x1680
#define PCI_DEVICE_ID_MOXA_CP168U 0x1681
#define PCI_DEVICE_ID_MOXA_CP204J 0x2040
#define PCI_DEVICE_ID_MOXA_C218 0x2180
#define PCI_DEVICE_ID_MOXA_C320 0x3200
......
......@@ -10,10 +10,6 @@
* 2004-06-01 Fix CLOCK_REALTIME clock/timer TIMER_ABSTIME bug.
* Copyright (C) 2004 Boris Hu
*
* 2004-07-27 Provide POSIX compliant clocks
* CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
* by Christoph Lameter
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
......@@ -193,8 +189,6 @@ static int do_posix_gettime(struct k_clock *clock, struct timespec *tp);
static u64 do_posix_clock_monotonic_gettime_parts(
struct timespec *tp, struct timespec *mo);
int do_posix_clock_monotonic_gettime(struct timespec *tp);
static int do_posix_clock_process_gettime(struct timespec *tp);
static int do_posix_clock_thread_gettime(struct timespec *tp);
static struct k_itimer *lock_timer(timer_t timer_id, unsigned long *flags);
static inline void unlock_timer(struct k_itimer *timr, unsigned long flags)
......@@ -215,25 +209,9 @@ static __init int init_posix_timers(void)
.clock_get = do_posix_clock_monotonic_gettime,
.clock_set = do_posix_clock_nosettime
};
struct k_clock clock_thread = {.res = CLOCK_REALTIME_RES,
.abs_struct = NULL,
.clock_get = do_posix_clock_thread_gettime,
.clock_set = do_posix_clock_nosettime,
.timer_create = do_posix_clock_notimer_create,
.nsleep = do_posix_clock_nonanosleep
};
struct k_clock clock_process = {.res = CLOCK_REALTIME_RES,
.abs_struct = NULL,
.clock_get = do_posix_clock_process_gettime,
.clock_set = do_posix_clock_nosettime,
.timer_create = do_posix_clock_notimer_create,
.nsleep = do_posix_clock_nonanosleep
};
register_posix_clock(CLOCK_REALTIME, &clock_realtime);
register_posix_clock(CLOCK_MONOTONIC, &clock_monotonic);
register_posix_clock(CLOCK_PROCESS_CPUTIME_ID, &clock_process);
register_posix_clock(CLOCK_THREAD_CPUTIME_ID, &clock_thread);
posix_timers_cache = kmem_cache_create("posix_timers_cache",
sizeof (struct k_itimer), 0, 0, NULL, NULL);
......@@ -1220,69 +1198,18 @@ int do_posix_clock_nosettime(struct timespec *tp)
return -EINVAL;
}
int do_posix_clock_notimer_create(struct k_itimer *timer) {
return -EINVAL;
}
int do_posix_clock_nonanosleep(int which_lock, int flags,struct timespec * t) {
/* Single Unix specficiation says to return ENOTSUP but we do not have that */
return -EINVAL;
}
static unsigned long process_ticks(task_t *p) {
unsigned long ticks;
task_t *t;
spin_lock(&p->sighand->siglock);
/* The signal structure is shared between all threads */
ticks = p->signal->utime + p->signal->stime;
/* Add up the cpu time for all the still running threads of this process */
t = p;
do {
ticks += t->utime + t->stime;
t = next_thread(t);
} while (t != p);
spin_unlock(&p->sighand->siglock);
return ticks;
}
static inline unsigned long thread_ticks(task_t *p) {
return p->utime + current->stime;
}
/*
* Single Unix Specification V3:
*
* Implementations shall also support the special clockid_t value
* CLOCK_THREAD_CPUTIME_ID, which represents the CPU-time clock of the calling
* thread when invoking one of the clock_*() or timer_*() functions. For these
* clock IDs, the values returned by clock_gettime() and specified by
* clock_settime() shall represent the amount of execution time of the thread
* associated with the clock.
*/
static int do_posix_clock_thread_gettime(struct timespec *tp)
int do_posix_clock_notimer_create(struct k_itimer *timer)
{
jiffies_to_timespec(thread_ticks(current), tp);
return 0;
return -EINVAL;
}
/*
* Single Unix Specification V3:
*
* Implementations shall also support the special clockid_t value
* CLOCK_PROCESS_CPUTIME_ID, which represents the CPU-time clock of the
* calling process when invoking one of the clock_*() or timer_*() functions.
* For these clock IDs, the values returned by clock_gettime() and specified
* by clock_settime() represent the amount of execution time of the process
* associated with the clock.
*/
static int do_posix_clock_process_gettime(struct timespec *tp)
int do_posix_clock_nonanosleep(int which_clock, int flags, struct timespec *t)
{
jiffies_to_timespec(process_ticks(current), tp);
return 0;
#ifndef ENOTSUP
return -EOPNOTSUPP; /* aka ENOTSUP in userland for POSIX */
#else /* parisc does define it separately. */
return -ENOTSUP;
#endif
}
asmlinkage long
......@@ -1290,10 +1217,6 @@ sys_clock_settime(clockid_t which_clock, const struct timespec __user *tp)
{
struct timespec new_tp;
/* Cannot set process specific clocks */
if (which_clock<0)
return -EINVAL;
if ((unsigned) which_clock >= MAX_CLOCKS ||
!posix_clocks[which_clock].res)
return -EINVAL;
......@@ -1307,29 +1230,6 @@ sys_clock_settime(clockid_t which_clock, const struct timespec __user *tp)
static int do_clock_gettime(clockid_t which_clock, struct timespec *tp)
{
/* Process process specific clocks */
if (which_clock < 0) {
task_t *t;
int pid = -which_clock;
if (pid < PID_MAX_LIMIT) {
if ((t = find_task_by_pid(pid))) {
jiffies_to_timespec(process_ticks(t), tp);
return 0;
}
return -EINVAL;
}
if (pid < 2*PID_MAX_LIMIT) {
if ((t = find_task_by_pid(pid - PID_MAX_LIMIT))) {
jiffies_to_timespec(thread_ticks(t), tp);
return 0;
}
return -EINVAL;
}
/* More process specific clocks could follow here */
return -EINVAL;
}
if ((unsigned) which_clock >= MAX_CLOCKS ||
!posix_clocks[which_clock].res)
return -EINVAL;
......@@ -1356,9 +1256,6 @@ sys_clock_getres(clockid_t which_clock, struct timespec __user *tp)
{
struct timespec rtn_tp;
/* All process clocks have the resolution of CLOCK_PROCESS_CPUTIME_ID */
if (which_clock < 0 ) which_clock = CLOCK_PROCESS_CPUTIME_ID;
if ((unsigned) which_clock >= MAX_CLOCKS ||
!posix_clocks[which_clock].res)
return -EINVAL;
......
......@@ -395,6 +395,9 @@ int page_referenced(struct page *page, int is_locked, int ignore_token)
{
int referenced = 0;
if (!swap_token_default_timeout)
ignore_token = 1;
if (page_test_and_clear_young(page))
referenced++;
......
......@@ -19,7 +19,10 @@ unsigned long swap_token_check;
struct mm_struct * swap_token_mm = &init_mm;
#define SWAP_TOKEN_CHECK_INTERVAL (HZ * 2)
#define SWAP_TOKEN_TIMEOUT (HZ * 300)
#define SWAP_TOKEN_TIMEOUT 0
/*
* Currently disabled; Needs further code to work at HZ * 300.
*/
unsigned long swap_token_default_timeout = SWAP_TOKEN_TIMEOUT;
/*
......
......@@ -3029,7 +3029,7 @@ void tcp_parse_options(struct sk_buff *skb, struct tcp_opt *tp, int estab)
if(tp->snd_wscale > 14) {
if(net_ratelimit())
printk(KERN_INFO "tcp_parse_options: Illegal window "
"scaling value %d >14 received.",
"scaling value %d >14 received.\n",
tp->snd_wscale);
tp->snd_wscale = 14;
}
......
......@@ -418,6 +418,7 @@ int tcf_action_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,
int tcf_action_copy_stats (struct sk_buff *skb,struct tc_action *a)
{
int err;
struct gnet_dump d;
struct tcf_act_hdr *h = a->priv;
......@@ -428,7 +429,14 @@ int tcf_action_copy_stats (struct sk_buff *skb,struct tc_action *a)
if (NULL == h)
goto errout;
if (gnet_stats_start_copy(skb, TCA_ACT_STATS, h->stats_lock, &d) < 0)
if (a->type == TCA_OLD_COMPAT)
err = gnet_stats_start_copy_compat(skb, TCA_ACT_STATS,
TCA_STATS, TCA_XSTATS, h->stats_lock, &d);
else
err = gnet_stats_start_copy(skb, TCA_ACT_STATS,
h->stats_lock, &d);
if (err < 0)
goto errout;
if (NULL != a->ops && NULL != a->ops->get_stats)
......
......@@ -160,7 +160,8 @@ static int tcindex_init(struct tcf_proto *tp)
}
static int tcindex_delete(struct tcf_proto *tp, unsigned long arg)
static int
__tcindex_delete(struct tcf_proto *tp, unsigned long arg, int lock)
{
struct tcindex_data *p = PRIV(tp);
struct tcindex_filter_result *r = (struct tcindex_filter_result *) arg;
......@@ -182,9 +183,11 @@ static int tcindex_delete(struct tcf_proto *tp, unsigned long arg)
found:
f = *walk;
tcf_tree_lock(tp);
if (lock)
tcf_tree_lock(tp);
*walk = f->next;
tcf_tree_unlock(tp);
if (lock)
tcf_tree_unlock(tp);
}
tcf_unbind_filter(tp, &r->res);
#ifdef CONFIG_NET_CLS_POLICE
......@@ -195,6 +198,10 @@ static int tcindex_delete(struct tcf_proto *tp, unsigned long arg)
return 0;
}
static int tcindex_delete(struct tcf_proto *tp, unsigned long arg)
{
return __tcindex_delete(tp, arg, 1);
}
/*
* There are no parameters for tcindex_init, so we overload tcindex_change
......@@ -384,7 +391,7 @@ static void tcindex_walk(struct tcf_proto *tp, struct tcf_walker *walker)
static int tcindex_destroy_element(struct tcf_proto *tp,
unsigned long arg, struct tcf_walker *walker)
{
return tcindex_delete(tp,arg);
return __tcindex_delete(tp, arg, 0);
}
......
......@@ -25,11 +25,14 @@
#include <sound/pcm.h>
#define SND_PCM_FORMAT_UNKNOWN (-1)
/* NOTE: "signed" prefix must be given below since the default char is
* unsigned on some architectures!
*/
struct pcm_format_data {
char width; /* bit width */
char phys; /* physical bit width */
char le; /* 0 = big-endian, 1 = little-endian, -1 = others */
char signd; /* 0 = unsigned, 1 = signed, -1 = others */
unsigned char width; /* bit width */
unsigned char phys; /* physical bit width */
signed char le; /* 0 = big-endian, 1 = little-endian, -1 = others */
signed char signd; /* 0 = unsigned, 1 = signed, -1 = others */
unsigned char silence[8]; /* silence data to fill */
};
......
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