Commit b01a10a3 authored by Linus Torvalds's avatar Linus Torvalds

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

into home.osdl.org:/home/torvalds/v2.5/linux
parents 427125c8 cd522168
...@@ -168,14 +168,14 @@ sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) ...@@ -168,14 +168,14 @@ sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
{ {
unsigned int stat0, stat1, i; unsigned int stat0, stat1, i;
stat0 = INTSTATCLR0; stat0 = sa1111_readl(desc->data + SA1111_INTSTATCLR0);
stat1 = INTSTATCLR1; stat1 = sa1111_readl(desc->data + SA1111_INTSTATCLR1);
INTSTATCLR0 = stat0; sa1111_writel(stat0, desc->data + SA1111_INTSTATCLR0);
desc->chip->ack(irq); desc->chip->ack(irq);
INTSTATCLR1 = stat1; sa1111_writel(stat1, desc->data + SA1111_INTSTATCLR1);
if (stat0 == 0 && stat1 == 0) { if (stat0 == 0 && stat1 == 0) {
do_bad_IRQ(irq, desc, regs); do_bad_IRQ(irq, desc, regs);
...@@ -203,12 +203,22 @@ static void sa1111_ack_irq(unsigned int irq) ...@@ -203,12 +203,22 @@ static void sa1111_ack_irq(unsigned int irq)
static void sa1111_mask_lowirq(unsigned int irq) static void sa1111_mask_lowirq(unsigned int irq)
{ {
INTEN0 &= ~SA1111_IRQMASK_LO(irq); void *mapbase = get_irq_chipdata(irq);
unsigned long ie0;
ie0 = sa1111_readl(mapbase + SA1111_INTEN0);
ie0 &= ~SA1111_IRQMASK_LO(irq);
writel(ie0, mapbase + SA1111_INTEN0);
} }
static void sa1111_unmask_lowirq(unsigned int irq) static void sa1111_unmask_lowirq(unsigned int irq)
{ {
INTEN0 |= SA1111_IRQMASK_LO(irq); void *mapbase = get_irq_chipdata(irq);
unsigned long ie0;
ie0 = sa1111_readl(mapbase + SA1111_INTEN0);
ie0 |= SA1111_IRQMASK_LO(irq);
sa1111_writel(ie0, mapbase + SA1111_INTEN0);
} }
/* /*
...@@ -221,12 +231,15 @@ static void sa1111_unmask_lowirq(unsigned int irq) ...@@ -221,12 +231,15 @@ static void sa1111_unmask_lowirq(unsigned int irq)
static int sa1111_retrigger_lowirq(unsigned int irq) static int sa1111_retrigger_lowirq(unsigned int irq)
{ {
unsigned int mask = SA1111_IRQMASK_LO(irq); unsigned int mask = SA1111_IRQMASK_LO(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ip0;
int i; int i;
ip0 = sa1111_readl(mapbase + SA1111_INTPOL0);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
INTPOL0 ^= mask; sa1111_writel(ip0 ^ mask, mapbase + SA1111_INTPOL0);
INTPOL0 ^= mask; sa1111_writel(ip0, mapbase + SA1111_INTPOL0);
if (INTSTATCLR1 & mask) if (sa1111_readl(mapbase + SA1111_INTSTATCLR1) & mask)
break; break;
} }
...@@ -239,6 +252,8 @@ static int sa1111_retrigger_lowirq(unsigned int irq) ...@@ -239,6 +252,8 @@ static int sa1111_retrigger_lowirq(unsigned int irq)
static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) static int sa1111_type_lowirq(unsigned int irq, unsigned int flags)
{ {
unsigned int mask = SA1111_IRQMASK_LO(irq); unsigned int mask = SA1111_IRQMASK_LO(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ip0;
if (flags == IRQT_PROBE) if (flags == IRQT_PROBE)
return 0; return 0;
...@@ -246,11 +261,13 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) ...@@ -246,11 +261,13 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags)
if ((!(flags & __IRQT_RISEDGE) ^ !(flags & __IRQT_FALEDGE)) == 0) if ((!(flags & __IRQT_RISEDGE) ^ !(flags & __IRQT_FALEDGE)) == 0)
return -EINVAL; return -EINVAL;
ip0 = sa1111_readl(mapbase + SA1111_INTPOL0);
if (flags & __IRQT_RISEDGE) if (flags & __IRQT_RISEDGE)
INTPOL0 &= ~mask; ip0 &= ~mask;
else else
INTPOL0 |= mask; ip0 |= mask;
WAKE_POL0 = INTPOL0; sa1111_writel(ip0, mapbase + SA1111_INTPOL0);
sa1111_writel(ip0, mapbase + SA1111_WAKEPOL0);
return 0; return 0;
} }
...@@ -258,11 +275,15 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) ...@@ -258,11 +275,15 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags)
static int sa1111_wake_lowirq(unsigned int irq, unsigned int on) static int sa1111_wake_lowirq(unsigned int irq, unsigned int on)
{ {
unsigned int mask = SA1111_IRQMASK_LO(irq); unsigned int mask = SA1111_IRQMASK_LO(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long we0;
we0 = sa1111_readl(mapbase + SA1111_WAKEEN0);
if (on) if (on)
WAKE_EN0 |= mask; we0 |= mask;
else else
WAKE_EN0 &= ~mask; we0 &= ~mask;
sa1111_writel(we0, mapbase + SA1111_WAKEEN0);
return 0; return 0;
} }
...@@ -278,12 +299,22 @@ static struct irqchip sa1111_low_chip = { ...@@ -278,12 +299,22 @@ static struct irqchip sa1111_low_chip = {
static void sa1111_mask_highirq(unsigned int irq) static void sa1111_mask_highirq(unsigned int irq)
{ {
INTEN1 &= ~SA1111_IRQMASK_HI(irq); void *mapbase = get_irq_chipdata(irq);
unsigned long ie1;
ie1 = sa1111_readl(mapbase + SA1111_INTEN1);
ie1 &= ~SA1111_IRQMASK_HI(irq);
sa1111_writel(ie1, mapbase + SA1111_INTEN1);
} }
static void sa1111_unmask_highirq(unsigned int irq) static void sa1111_unmask_highirq(unsigned int irq)
{ {
INTEN1 |= SA1111_IRQMASK_HI(irq); void *mapbase = get_irq_chipdata(irq);
unsigned long ie1;
ie1 = sa1111_readl(mapbase + SA1111_INTEN1);
ie1 |= SA1111_IRQMASK_HI(irq);
sa1111_writel(ie1, mapbase + SA1111_INTEN1);
} }
/* /*
...@@ -296,12 +327,15 @@ static void sa1111_unmask_highirq(unsigned int irq) ...@@ -296,12 +327,15 @@ static void sa1111_unmask_highirq(unsigned int irq)
static int sa1111_retrigger_highirq(unsigned int irq) static int sa1111_retrigger_highirq(unsigned int irq)
{ {
unsigned int mask = SA1111_IRQMASK_HI(irq); unsigned int mask = SA1111_IRQMASK_HI(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ip1;
int i; int i;
ip1 = sa1111_readl(mapbase + SA1111_INTPOL1);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
INTPOL1 ^= mask; sa1111_writel(ip1 ^ mask, mapbase + SA1111_INTPOL1);
INTPOL1 ^= mask; sa1111_writel(ip1, mapbase + SA1111_INTPOL1);
if (INTSTATCLR1 & mask) if (sa1111_readl(mapbase + SA1111_INTSTATCLR1) & mask)
break; break;
} }
...@@ -314,6 +348,8 @@ static int sa1111_retrigger_highirq(unsigned int irq) ...@@ -314,6 +348,8 @@ static int sa1111_retrigger_highirq(unsigned int irq)
static int sa1111_type_highirq(unsigned int irq, unsigned int flags) static int sa1111_type_highirq(unsigned int irq, unsigned int flags)
{ {
unsigned int mask = SA1111_IRQMASK_HI(irq); unsigned int mask = SA1111_IRQMASK_HI(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ip1;
if (flags == IRQT_PROBE) if (flags == IRQT_PROBE)
return 0; return 0;
...@@ -321,11 +357,13 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags) ...@@ -321,11 +357,13 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags)
if ((!(flags & __IRQT_RISEDGE) ^ !(flags & __IRQT_FALEDGE)) == 0) if ((!(flags & __IRQT_RISEDGE) ^ !(flags & __IRQT_FALEDGE)) == 0)
return -EINVAL; return -EINVAL;
ip1 = sa1111_readl(mapbase + SA1111_INTPOL1);
if (flags & __IRQT_RISEDGE) if (flags & __IRQT_RISEDGE)
INTPOL1 &= ~mask; ip1 &= ~mask;
else else
INTPOL1 |= mask; ip1 |= mask;
WAKE_POL1 = INTPOL1; sa1111_writel(ip1, mapbase + SA1111_INTPOL1);
sa1111_writel(ip1, mapbase + SA1111_WAKEPOL1);
return 0; return 0;
} }
...@@ -333,11 +371,15 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags) ...@@ -333,11 +371,15 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags)
static int sa1111_wake_highirq(unsigned int irq, unsigned int on) static int sa1111_wake_highirq(unsigned int irq, unsigned int on)
{ {
unsigned int mask = SA1111_IRQMASK_HI(irq); unsigned int mask = SA1111_IRQMASK_HI(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long we1;
we1 = sa1111_readl(mapbase + SA1111_WAKEEN1);
if (on) if (on)
WAKE_EN1 |= mask; we1 |= mask;
else else
WAKE_EN1 &= ~mask; we1 &= ~mask;
sa1111_writel(we1, mapbase + SA1111_WAKEEN1);
return 0; return 0;
} }
...@@ -381,12 +423,14 @@ static void __init sa1111_init_irq(struct sa1111_dev *sadev) ...@@ -381,12 +423,14 @@ static void __init sa1111_init_irq(struct sa1111_dev *sadev)
for (irq = IRQ_GPAIN0; irq <= SSPROR; irq++) { for (irq = IRQ_GPAIN0; irq <= SSPROR; irq++) {
set_irq_chip(irq, &sa1111_low_chip); set_irq_chip(irq, &sa1111_low_chip);
set_irq_chipdata(irq, sadev->mapbase);
set_irq_handler(irq, do_edge_IRQ); set_irq_handler(irq, do_edge_IRQ);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
} }
for (irq = AUDXMTDMADONEA; irq <= IRQ_S1_BVD1_STSCHG; irq++) { for (irq = AUDXMTDMADONEA; irq <= IRQ_S1_BVD1_STSCHG; irq++) {
set_irq_chip(irq, &sa1111_high_chip); set_irq_chip(irq, &sa1111_high_chip);
set_irq_chipdata(irq, sadev->mapbase);
set_irq_handler(irq, do_edge_IRQ); set_irq_handler(irq, do_edge_IRQ);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
} }
...@@ -395,6 +439,7 @@ static void __init sa1111_init_irq(struct sa1111_dev *sadev) ...@@ -395,6 +439,7 @@ static void __init sa1111_init_irq(struct sa1111_dev *sadev)
* Register SA1111 interrupt * Register SA1111 interrupt
*/ */
set_irq_type(sadev->irq[0], IRQT_RISING); set_irq_type(sadev->irq[0], IRQT_RISING);
set_irq_data(sadev->irq[0], sadev->mapbase);
set_irq_chained_handler(sadev->irq[0], sa1111_irq_handler); set_irq_chained_handler(sadev->irq[0], sa1111_irq_handler);
} }
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
*/ */
/* init funcs */ /* init funcs */
static void __init get_hackkit_scr(void);
static int __init hackkit_init(void); static int __init hackkit_init(void);
static void __init hackkit_init_irq(void); static void __init hackkit_init_irq(void);
static void __init hackkit_map_io(void); static void __init hackkit_map_io(void);
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/hardware/ssp.h> #include <asm/hardware/ssp.h>
static void ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
unsigned int status = Ser4SSSR; unsigned int status = Ser4SSSR;
...@@ -32,6 +32,8 @@ static void ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -32,6 +32,8 @@ static void ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
} }
Ser4SSSR = SSSR_ROR; Ser4SSSR = SSSR_ROR;
return status ? IRQ_HANDLED : IRQ_NONE;
} }
/** /**
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# To add an entry into this database, please see Documentation/arm/README, # To add an entry into this database, please see Documentation/arm/README,
# or contact rmk@arm.linux.org.uk # or contact rmk@arm.linux.org.uk
# #
# Last update: Thu Jun 19 18:42:39 2003 # Last update: Sun Aug 3 16:26:10 2003
# #
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
# #
...@@ -228,7 +228,7 @@ csb226 ARCH_CSB226 CSB226 216 ...@@ -228,7 +228,7 @@ csb226 ARCH_CSB226 CSB226 216
arnold SA1100_ARNOLD ARNOLD 217 arnold SA1100_ARNOLD ARNOLD 217
psiboard SA1100_PSIBOARD PSIBOARD 218 psiboard SA1100_PSIBOARD PSIBOARD 218
jz8028 ARCH_JZ8028 JZ8028 219 jz8028 ARCH_JZ8028 JZ8028 219
h5400 ARCH_IPAQ3 IPAQ3 220 h5400 ARCH_H5400 H5400 220
forte SA1100_FORTE FORTE 221 forte SA1100_FORTE FORTE 221
acam SA1100_ACAM ACAM 222 acam SA1100_ACAM ACAM 222
abox SA1100_ABOX ABOX 223 abox SA1100_ABOX ABOX 223
...@@ -300,7 +300,7 @@ wep_ep250 ARCH_WEP_EP250 WEP_EP250 288 ...@@ -300,7 +300,7 @@ wep_ep250 ARCH_WEP_EP250 WEP_EP250 288
inhandelf3 ARCH_INHANDELF3 INHANDELF3 289 inhandelf3 ARCH_INHANDELF3 INHANDELF3 289
adi_coyote ARCH_ADI_COYOTE ADI_COYOTE 290 adi_coyote ARCH_ADI_COYOTE ADI_COYOTE 290
iyonix ARCH_IYONIX IYONIX 291 iyonix ARCH_IYONIX IYONIX 291
damicam_sa1110 ARCH_DAMICAM_SA1110 DAMICAM_SA1110 292 damicam1 ARCH_DAMICAM_SA1110 DAMICAM_SA1110 292
meg03 ARCH_MEG03 MEG03 293 meg03 ARCH_MEG03 MEG03 293
pxa_whitechapel ARCH_PXA_WHITECHAPEL PXA_WHITECHAPEL 294 pxa_whitechapel ARCH_PXA_WHITECHAPEL PXA_WHITECHAPEL 294
nwsc ARCH_NWSC NWSC 295 nwsc ARCH_NWSC NWSC 295
...@@ -355,3 +355,15 @@ niop ARCH_NIOP NIOP 343 ...@@ -355,3 +355,15 @@ niop ARCH_NIOP NIOP 343
dm310 ARCH_DM310 DM310 344 dm310 ARCH_DM310 DM310 344
seedpxa_c2 ARCH_SEEDPXA_C2 SEEDPXA_C2 345 seedpxa_c2 ARCH_SEEDPXA_C2 SEEDPXA_C2 345
ixp4xx_mguardpci ARCH_IXP4XX_MGUARD_PCI IXP4XX_MGUARD_PCI 346 ixp4xx_mguardpci ARCH_IXP4XX_MGUARD_PCI IXP4XX_MGUARD_PCI 346
h1940 ARCH_H1940 H1940 347
scorpio ARCH_SCORPIO SCORPIO 348
viva ARCH_VIVA VIVA 349
pxa_xcard ARCH_PXA_XCARD PXA_XCARD 350
csb335 ARCH_CSB335 CSB335 351
ixrd425 ARCH_IXRD425 IXRD425 352
iq80315 ARCH_IQ80315 IQ80315 353
nmp7312 ARCH_NMP7312 NMP7312 354
cx861xx ARCH_CX861XX CX861XX 355
ixp2000 ARCH_IXP2000 IXP2000 356
xda SA1100_XDA XDA 357
csir_ims ARCH_CSIR_IMS CSIR_IMS 358
...@@ -15,6 +15,8 @@ unsigned long acpi_wakeup_address = 0; ...@@ -15,6 +15,8 @@ unsigned long acpi_wakeup_address = 0;
unsigned long acpi_video_flags; unsigned long acpi_video_flags;
extern char wakeup_start, wakeup_end; extern char wakeup_start, wakeup_end;
extern void zap_low_mappings(void);
extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
static void init_low_mapping(pgd_t *pgd, int pgd_limit) static void init_low_mapping(pgd_t *pgd, int pgd_limit)
......
...@@ -444,13 +444,6 @@ static __init int reset_videomode_after_s3(struct dmi_blacklist *d) ...@@ -444,13 +444,6 @@ static __init int reset_videomode_after_s3(struct dmi_blacklist *d)
acpi_video_flags |= 2; acpi_video_flags |= 2;
return 0; return 0;
} }
static __init int reset_videobios_after_s3(struct dmi_blacklist *d)
{
extern long acpi_video_flags;
acpi_video_flags |= 1;
return 0;
}
#endif #endif
/* /*
......
...@@ -21,6 +21,8 @@ ACPI_MODULE_NAME ("sleep") ...@@ -21,6 +21,8 @@ ACPI_MODULE_NAME ("sleep")
u8 sleep_states[ACPI_S_STATE_COUNT]; u8 sleep_states[ACPI_S_STATE_COUNT];
extern void do_suspend_lowlevel_s4bios(int);
/** /**
* acpi_system_restore_state - OS-specific restoration of state * acpi_system_restore_state - OS-specific restoration of state
* @state: sleep state we're exiting * @state: sleep state we're exiting
......
...@@ -237,7 +237,7 @@ static const char *arxescsi_info(struct Scsi_Host *host) ...@@ -237,7 +237,7 @@ static const char *arxescsi_info(struct Scsi_Host *host)
*/ */
static int static int
arxescsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, arxescsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length,
int host_no, int inout) int inout)
{ {
struct arxescsi_info *info; struct arxescsi_info *info;
char *p = buffer; char *p = buffer;
...@@ -264,7 +264,7 @@ static Scsi_Host_Template arxescsi_template = { ...@@ -264,7 +264,7 @@ static Scsi_Host_Template arxescsi_template = {
.proc_info = arxescsi_proc_info, .proc_info = arxescsi_proc_info,
.name = "ARXE SCSI card", .name = "ARXE SCSI card",
.info = arxescsi_info, .info = arxescsi_info,
.queuecommand = fas216_queue_command, .queuecommand = fas216_noqueue_command,
.eh_host_reset_handler = fas216_eh_host_reset, .eh_host_reset_handler = fas216_eh_host_reset,
.eh_bus_reset_handler = fas216_eh_bus_reset, .eh_bus_reset_handler = fas216_eh_bus_reset,
.eh_device_reset_handler = fas216_eh_device_reset, .eh_device_reset_handler = fas216_eh_device_reset,
......
...@@ -444,10 +444,11 @@ int eesoxscsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_ ...@@ -444,10 +444,11 @@ int eesoxscsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_
p += sprintf(p, "Term : o%s\n", p += sprintf(p, "Term : o%s\n",
info->control & EESOX_TERM_ENABLE ? "n" : "ff"); info->control & EESOX_TERM_ENABLE ? "n" : "ff");
pos += fas216_print_stats(&info->info, buffer + pos);
p += fas216_print_stats(&info->info, p); p += fas216_print_stats(&info->info, p);
p += fas216_print_devices(&info->info, p); p += fas216_print_devices(&info->info, p);
*start = buffer + offset;
pos = p - buffer - offset;
if (pos > length) if (pos > length)
pos = length; pos = length;
......
...@@ -225,7 +225,8 @@ static void fas216_dumpinfo(FAS216_Info *info) ...@@ -225,7 +225,8 @@ static void fas216_dumpinfo(FAS216_Info *info)
printk(" dma={ transfer_type=%X setup=%p pseudo=%p stop=%p }\n", printk(" dma={ transfer_type=%X setup=%p pseudo=%p stop=%p }\n",
info->dma.transfer_type, info->dma.setup, info->dma.transfer_type, info->dma.setup,
info->dma.pseudo, info->dma.stop); info->dma.pseudo, info->dma.stop);
printk(" magic_end=%lX }\n", info->magic_end); printk(" internal_done=%X magic_end=%lX }\n",
info->internal_done, info->magic_end);
} }
#ifdef CHECK_STRUCTURE #ifdef CHECK_STRUCTURE
...@@ -2252,6 +2253,75 @@ int fas216_queue_command(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) ...@@ -2252,6 +2253,75 @@ int fas216_queue_command(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
return result; return result;
} }
/**
* fas216_internal_done - trigger restart of a waiting thread in fas216_noqueue_command
* @SCpnt: Command to wake
*
* Trigger restart of a waiting thread in fas216_command
*/
static void fas216_internal_done(Scsi_Cmnd *SCpnt)
{
FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata;
fas216_checkmagic(info);
info->internal_done = 1;
}
/**
* fas216_noqueue_command - process a command for the adapter.
* @SCpnt: Command to queue
*
* Queue a command for adapter to process.
* Returns: scsi result code.
* Notes: io_request_lock is held, interrupts are disabled.
*/
int fas216_noqueue_command(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
{
FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata;
fas216_checkmagic(info);
/*
* We should only be using this if we don't have an interrupt.
* Provide some "incentive" to use the queueing code.
*/
BUG_ON(info->scsi.irq != NO_IRQ);
info->internal_done = 0;
fas216_queue_command(SCpnt, fas216_internal_done);
/*
* This wastes time, since we can't return until the command is
* complete. We can't sleep either since we may get re-entered!
* However, we must re-enable interrupts, or else we'll be
* waiting forever.
*/
spin_unlock_irq(info->host->host_lock);
while (!info->internal_done) {
/*
* If we don't have an IRQ, then we must poll the card for
* it's interrupt, and use that to call this driver's
* interrupt routine. That way, we keep the command
* progressing. Maybe we can add some inteligence here
* and go to sleep if we know that the device is going
* to be some time (eg, disconnected).
*/
if (fas216_readb(info, REG_STAT) & STAT_INT) {
spin_lock_irq(info->host->host_lock);
fas216_intr(info);
spin_unlock_irq(info->host->host_lock);
}
}
spin_lock_irq(info->host->host_lock);
done(SCpnt);
return 0;
}
/* /*
* Error handler timeout function. Indicate that we timed out, * Error handler timeout function. Indicate that we timed out,
* and wake up any error handler process so it can continue. * and wake up any error handler process so it can continue.
...@@ -2962,7 +3032,7 @@ int fas216_print_devices(FAS216_Info *info, char *buffer) ...@@ -2962,7 +3032,7 @@ int fas216_print_devices(FAS216_Info *info, char *buffer)
EXPORT_SYMBOL(fas216_init); EXPORT_SYMBOL(fas216_init);
EXPORT_SYMBOL(fas216_add); EXPORT_SYMBOL(fas216_add);
EXPORT_SYMBOL(fas216_queue_command); EXPORT_SYMBOL(fas216_queue_command);
EXPORT_SYMBOL(fas216_command); EXPORT_SYMBOL(fas216_noqueue_command);
EXPORT_SYMBOL(fas216_intr); EXPORT_SYMBOL(fas216_intr);
EXPORT_SYMBOL(fas216_remove); EXPORT_SYMBOL(fas216_remove);
EXPORT_SYMBOL(fas216_release); EXPORT_SYMBOL(fas216_release);
......
...@@ -310,6 +310,7 @@ typedef struct { ...@@ -310,6 +310,7 @@ typedef struct {
} dma; } dma;
/* miscellaneous */ /* miscellaneous */
int internal_done; /* flag to indicate request done */
unsigned long magic_end; unsigned long magic_end;
} FAS216_Info; } FAS216_Info;
...@@ -335,6 +336,14 @@ extern int fas216_add (struct Scsi_Host *instance, struct device *dev); ...@@ -335,6 +336,14 @@ extern int fas216_add (struct Scsi_Host *instance, struct device *dev);
*/ */
extern int fas216_queue_command (Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); extern int fas216_queue_command (Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
/* Function: int fas216_noqueue_command (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
* Purpose : queue a command for adapter to process, and process it to completion.
* Params : SCpnt - Command to queue
* done - done function to call once command is complete
* Returns : 0 - success, else error
*/
extern int fas216_noqueue_command (Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
/* Function: irqreturn_t fas216_intr (FAS216_Info *info) /* Function: irqreturn_t fas216_intr (FAS216_Info *info)
* Purpose : handle interrupts from the interface to progress a command * Purpose : handle interrupts from the interface to progress a command
* Params : info - interface to service * Params : info - interface to service
......
...@@ -70,8 +70,11 @@ static int check_vfsmnt(struct vfsmount *mnt, struct dentry *dentry) ...@@ -70,8 +70,11 @@ static int check_vfsmnt(struct vfsmount *mnt, struct dentry *dentry)
int ret = dentry->d_mounted; int ret = dentry->d_mounted;
struct vfsmount *vfs = lookup_mnt(mnt, dentry); struct vfsmount *vfs = lookup_mnt(mnt, dentry);
if (vfs && is_vfsmnt_tree_busy(vfs)) if (vfs) {
mntput(vfs);
if (is_vfsmnt_tree_busy(vfs))
ret--; ret--;
}
DPRINTK(("check_vfsmnt: ret=%d\n", ret)); DPRINTK(("check_vfsmnt: ret=%d\n", ret));
return ret; return ret;
} }
......
...@@ -995,11 +995,8 @@ struct flags { ...@@ -995,11 +995,8 @@ struct flags {
{ NFSEXP_ALLSQUASH, {"all_squash", ""}}, { NFSEXP_ALLSQUASH, {"all_squash", ""}},
{ NFSEXP_ASYNC, {"async", "sync"}}, { NFSEXP_ASYNC, {"async", "sync"}},
{ NFSEXP_GATHERED_WRITES, {"wdelay", "no_wdelay"}}, { NFSEXP_GATHERED_WRITES, {"wdelay", "no_wdelay"}},
{ NFSEXP_UIDMAP, {"uidmap", ""}},
{ NFSEXP_KERBEROS, { "kerberos", ""}},
{ NFSEXP_SUNSECURE, { "sunsecure", ""}},
{ NFSEXP_NOHIDE, {"nohide", ""}}, { NFSEXP_NOHIDE, {"nohide", ""}},
{ NFSEXP_CROSSMNT, {"crossmnt", ""}}, { NFSEXP_CROSSMOUNT, {"crossmnt", ""}},
{ NFSEXP_NOSUBTREECHECK, {"no_subtree_check", ""}}, { NFSEXP_NOSUBTREECHECK, {"no_subtree_check", ""}},
{ NFSEXP_NOAUTHNLM, {"insecure_locks", ""}}, { NFSEXP_NOAUTHNLM, {"insecure_locks", ""}},
#ifdef MSNFS #ifdef MSNFS
......
...@@ -446,7 +446,7 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p, ...@@ -446,7 +446,7 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p,
*/ */
svc_take_page(rqstp); svc_take_page(rqstp);
len = ntohl(*p++); len = ntohl(*p++);
if (len <= 0 || len > NFS3_MAXPATHLEN) if (len <= 0 || len > NFS3_MAXPATHLEN || len >= PAGE_SIZE)
return 0; return 0;
args->tname = new = page_address(rqstp->rq_respages[rqstp->rq_resused-1]); args->tname = new = page_address(rqstp->rq_respages[rqstp->rq_resused-1]);
args->tlen = len; args->tlen = len;
...@@ -454,7 +454,7 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p, ...@@ -454,7 +454,7 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p,
old = (char*)p; old = (char*)p;
vec = &rqstp->rq_arg.head[0]; vec = &rqstp->rq_arg.head[0];
avail = vec->iov_len - (old - (char*)vec->iov_base); avail = vec->iov_len - (old - (char*)vec->iov_base);
while (len > 0 && *old && avail) { while (len && avail && *old) {
*new++ = *old++; *new++ = *old++;
len--; len--;
avail--; avail--;
...@@ -465,7 +465,7 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p, ...@@ -465,7 +465,7 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p,
if (avail > PAGE_SIZE) avail = PAGE_SIZE; if (avail > PAGE_SIZE) avail = PAGE_SIZE;
old = page_address(rqstp->rq_arg.pages[0]); old = page_address(rqstp->rq_arg.pages[0]);
} }
while (len > 0 && *old && avail) { while (len && avail && *old) {
*new++ = *old++; *new++ = *old++;
len--; len--;
avail--; avail--;
......
...@@ -880,7 +880,7 @@ nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write) ...@@ -880,7 +880,7 @@ nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write)
v++; v++;
write->wr_vec[v].iov_base = page_address(argp->pagelist[0]); write->wr_vec[v].iov_base = page_address(argp->pagelist[0]);
argp->pagelist++; argp->pagelist++;
if (len >= PAGE_SIZE) { if (argp->pagelen >= PAGE_SIZE) {
write->wr_vec[v].iov_len = PAGE_SIZE; write->wr_vec[v].iov_len = PAGE_SIZE;
argp->pagelen -= PAGE_SIZE; argp->pagelen -= PAGE_SIZE;
} else { } else {
...@@ -934,17 +934,36 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp) ...@@ -934,17 +934,36 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
op = &argp->ops[i]; op = &argp->ops[i];
/* /*
* Before reading the opcode, we test for the 4-byte buffer * We can't use READ_BUF() here because we need to handle
* overrun explicitly, instead of using READ_BUF(). This is * a missing opcode as an OP_WRITE + 1. So we need to check
* because we want a missing opcode to be treated as opcode * to see if we're truly at the end of our buffer or if there
* OP_WRITE+1, instead of a failed XDR. * is another page we need to flip to.
*/ */
if (argp->p == argp->end) { if (argp->p == argp->end) {
if (argp->pagelen < 4) {
/* There isn't an opcode still on the wire */
op->opnum = OP_WRITE + 1; op->opnum = OP_WRITE + 1;
op->status = nfserr_bad_xdr; op->status = nfserr_bad_xdr;
argp->opcnt = i+1; argp->opcnt = i+1;
break; break;
} }
/*
* False alarm. We just hit a page boundary, but there
* is still data available. Move pointer across page
* boundary. *snip from READ_BUF*
*/
argp->p = page_address(argp->pagelist[0]);
argp->pagelist++;
if (argp->pagelen < PAGE_SIZE) {
argp->end = p + (argp->pagelen>>2);
argp->pagelen = 0;
} else {
argp->end = p + (PAGE_SIZE>>2);
argp->pagelen -= PAGE_SIZE;
}
}
op->opnum = ntohl(*argp->p++); op->opnum = ntohl(*argp->p++);
switch (op->opnum) { switch (op->opnum) {
......
...@@ -99,7 +99,7 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp, ...@@ -99,7 +99,7 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
mntput(mnt); mntput(mnt);
goto out; goto out;
} }
if (exp2 && ((exp->ex_flags & NFSEXP_CROSSMNT) || EX_NOHIDE(exp2))) { if (exp2 && ((exp->ex_flags & NFSEXP_CROSSMOUNT) || EX_NOHIDE(exp2))) {
/* successfully crossed mount point */ /* successfully crossed mount point */
exp_put(exp); exp_put(exp);
*expp = exp2; *expp = exp2;
......
...@@ -65,6 +65,7 @@ void __init proc_root_init(void) ...@@ -65,6 +65,7 @@ void __init proc_root_init(void)
#endif #endif
proc_root_fs = proc_mkdir("fs", 0); proc_root_fs = proc_mkdir("fs", 0);
proc_root_driver = proc_mkdir("driver", 0); proc_root_driver = proc_mkdir("driver", 0);
proc_mkdir("fs/nfsd", 0); /* somewhere for the nfsd filesystem to be mounted */
#if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE) #if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
/* just give it a mountpoint */ /* just give it a mountpoint */
proc_mkdir("openprom", 0); proc_mkdir("openprom", 0);
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
struct platform_device; struct platform_device;
extern int platform_add_devices(struct platform_device *, int); extern int platform_add_devices(struct platform_device **, int);
extern int platform_add_device(struct platform_device *); extern int platform_add_device(struct platform_device *);
#endif #endif
......
...@@ -429,22 +429,6 @@ ...@@ -429,22 +429,6 @@
#define SA1111_WAKEPOL0 0x0034 #define SA1111_WAKEPOL0 0x0034
#define SA1111_WAKEPOL1 0x0038 #define SA1111_WAKEPOL1 0x0038
#define INTTEST0 __CCREG(SA1111_INTC + SA1111_INTTEST0)
#define INTTEST1 __CCREG(SA1111_INTC + SA1111_INTTEST1)
#define INTEN0 __CCREG(SA1111_INTC + SA1111_INTEN0)
#define INTEN1 __CCREG(SA1111_INTC + SA1111_INTEN1)
#define INTPOL0 __CCREG(SA1111_INTC + SA1111_INTPOL0)
#define INTPOL1 __CCREG(SA1111_INTC + SA1111_INTPOL1)
#define INTTSTSEL __CCREG(SA1111_INTC + SA1111_INTTSTSEL)
#define INTSTATCLR0 __CCREG(SA1111_INTC + SA1111_INTSTATCLR0)
#define INTSTATCLR1 __CCREG(SA1111_INTC + SA1111_INTSTATCLR1)
#define INTSET0 __CCREG(SA1111_INTC + SA1111_INTSET0)
#define INTSET1 __CCREG(SA1111_INTC + SA1111_INTSET1)
#define WAKE_EN0 __CCREG(SA1111_INTC + SA1111_WAKEEN0)
#define WAKE_EN1 __CCREG(SA1111_INTC + SA1111_WAKEEN1)
#define WAKE_POL0 __CCREG(SA1111_INTC + SA1111_WAKEPOL0)
#define WAKE_POL1 __CCREG(SA1111_INTC + SA1111_WAKEPOL1)
/* /*
* PS/2 Trackpad and Mouse Interfaces * PS/2 Trackpad and Mouse Interfaces
* *
......
#include <asm-generic/local.h>
...@@ -54,6 +54,8 @@ struct irqdesc { ...@@ -54,6 +54,8 @@ struct irqdesc {
struct irqchip *chip; struct irqchip *chip;
struct irqaction *action; struct irqaction *action;
struct list_head pend; struct list_head pend;
void *chipdata;
void *data;
unsigned int disable_depth; unsigned int disable_depth;
unsigned int triggered: 1; /* IRQ has occurred */ unsigned int triggered: 1; /* IRQ has occurred */
...@@ -88,6 +90,9 @@ void __set_irq_handler(unsigned int irq, irq_handler_t, int); ...@@ -88,6 +90,9 @@ void __set_irq_handler(unsigned int irq, irq_handler_t, int);
*/ */
#define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0) #define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0)
#define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) #define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1)
#define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0)
#define set_irq_chipdata(irq,d) do { irq_desc[irq].chipdata = d; } while (0)
#define get_irq_chipdata(irq) (irq_desc[irq].chipdata)
void set_irq_chip(unsigned int irq, struct irqchip *); void set_irq_chip(unsigned int irq, struct irqchip *);
void set_irq_flags(unsigned int irq, unsigned int flags); void set_irq_flags(unsigned int irq, unsigned int flags);
......
...@@ -32,16 +32,15 @@ ...@@ -32,16 +32,15 @@
#define NFSEXP_ALLSQUASH 0x0008 #define NFSEXP_ALLSQUASH 0x0008
#define NFSEXP_ASYNC 0x0010 #define NFSEXP_ASYNC 0x0010
#define NFSEXP_GATHERED_WRITES 0x0020 #define NFSEXP_GATHERED_WRITES 0x0020
#define NFSEXP_UIDMAP 0x0040 /* 40 80 100 currently unused */
#define NFSEXP_KERBEROS 0x0080 /* not available */
#define NFSEXP_SUNSECURE 0x0100
#define NFSEXP_NOHIDE 0x0200 #define NFSEXP_NOHIDE 0x0200
#define NFSEXP_NOSUBTREECHECK 0x0400 #define NFSEXP_NOSUBTREECHECK 0x0400
#define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ #define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */
#define NFSEXP_MSNFS 0x1000 /* do silly things that MS clients expect */ #define NFSEXP_MSNFS 0x1000 /* do silly things that MS clients expect */
#define NFSEXP_FSID 0x2000 #define NFSEXP_FSID 0x2000
#define NFSEXP_CROSSMNT 0x4000 #define NFSEXP_CROSSMOUNT 0x4000
#define NFSEXP_ALLFLAGS 0x7FFF #define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */
#define NFSEXP_ALLFLAGS 0xFE3F
#ifdef __KERNEL__ #ifdef __KERNEL__
...@@ -75,7 +74,6 @@ struct svc_expkey { ...@@ -75,7 +74,6 @@ struct svc_expkey {
#define EX_ISSYNC(exp) (!((exp)->ex_flags & NFSEXP_ASYNC)) #define EX_ISSYNC(exp) (!((exp)->ex_flags & NFSEXP_ASYNC))
#define EX_RDONLY(exp) ((exp)->ex_flags & NFSEXP_READONLY) #define EX_RDONLY(exp) ((exp)->ex_flags & NFSEXP_READONLY)
#define EX_NOHIDE(exp) ((exp)->ex_flags & NFSEXP_NOHIDE) #define EX_NOHIDE(exp) ((exp)->ex_flags & NFSEXP_NOHIDE)
#define EX_SUNSECURE(exp) ((exp)->ex_flags & NFSEXP_SUNSECURE)
#define EX_WGATHER(exp) ((exp)->ex_flags & NFSEXP_GATHERED_WRITES) #define EX_WGATHER(exp) ((exp)->ex_flags & NFSEXP_GATHERED_WRITES)
......
...@@ -173,7 +173,7 @@ RTN *FNAME ARGS \ ...@@ -173,7 +173,7 @@ RTN *FNAME ARGS \
if (set && !INPLACE && test_bit(CACHE_VALID, &tmp->MEMBER.flags) && !new) \ if (set && !INPLACE && test_bit(CACHE_VALID, &tmp->MEMBER.flags) && !new) \
break; \ break; \
\ \
atomic_inc(&tmp->MEMBER.refcnt); \ cache_get(&tmp->MEMBER); \
if (set) { \ if (set) { \
if (!INPLACE && test_bit(CACHE_VALID, &tmp->MEMBER.flags))\ if (!INPLACE && test_bit(CACHE_VALID, &tmp->MEMBER.flags))\
{ /* need to swap in new */ \ { /* need to swap in new */ \
...@@ -221,7 +221,7 @@ RTN *FNAME ARGS \ ...@@ -221,7 +221,7 @@ RTN *FNAME ARGS \
new = kmalloc(sizeof(*new), GFP_KERNEL); \ new = kmalloc(sizeof(*new), GFP_KERNEL); \
if (new) { \ if (new) { \
cache_init(&new->MEMBER); \ cache_init(&new->MEMBER); \
atomic_inc(&new->MEMBER.refcnt); \ cache_get(&new->MEMBER); \
INIT; \ INIT; \
tmp = new; \ tmp = new; \
goto retry; \ goto retry; \
......
...@@ -738,7 +738,9 @@ cache_ioctl(struct inode *ino, struct file *filp, ...@@ -738,7 +738,9 @@ cache_ioctl(struct inode *ino, struct file *filp,
static int static int
cache_open(struct inode *inode, struct file *filp) cache_open(struct inode *inode, struct file *filp)
{ {
struct cache_reader *rp; struct cache_reader *rp = NULL;
if (filp->f_mode & FMODE_READ) {
struct cache_detail *cd = PDE(inode)->data; struct cache_detail *cd = PDE(inode)->data;
rp = kmalloc(sizeof(*rp), GFP_KERNEL); rp = kmalloc(sizeof(*rp), GFP_KERNEL);
...@@ -751,6 +753,7 @@ cache_open(struct inode *inode, struct file *filp) ...@@ -751,6 +753,7 @@ cache_open(struct inode *inode, struct file *filp)
spin_lock(&queue_lock); spin_lock(&queue_lock);
list_add(&rp->q.list, &cd->queue); list_add(&rp->q.list, &cd->queue);
spin_unlock(&queue_lock); spin_unlock(&queue_lock);
}
filp->private_data = rp; filp->private_data = rp;
return 0; return 0;
} }
...@@ -761,6 +764,7 @@ cache_release(struct inode *inode, struct file *filp) ...@@ -761,6 +764,7 @@ cache_release(struct inode *inode, struct file *filp)
struct cache_reader *rp = filp->private_data; struct cache_reader *rp = filp->private_data;
struct cache_detail *cd = PDE(inode)->data; struct cache_detail *cd = PDE(inode)->data;
if (rp) {
spin_lock(&queue_lock); spin_lock(&queue_lock);
if (rp->offset) { if (rp->offset) {
struct cache_queue *cq; struct cache_queue *cq;
...@@ -784,6 +788,7 @@ cache_release(struct inode *inode, struct file *filp) ...@@ -784,6 +788,7 @@ cache_release(struct inode *inode, struct file *filp)
cd->last_close = get_seconds(); cd->last_close = get_seconds();
atomic_dec(&cd->readers); atomic_dec(&cd->readers);
}
return 0; return 0;
} }
......
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