Commit 6efb5cad authored by Linus Torvalds's avatar Linus Torvalds

Import 2.2.6pre3

parent 97b454c2
......@@ -395,7 +395,7 @@ IRDA SUBSYSTEM
P: Dag Brattli
M: Dag Brattli <dagb@cs.uit.no>
L: linux-irda@list.uit.no
W: http://www.cs.uit.no/~dagb/irda/
W: http://www.cs.uit.no/linux-irda/
S: Maintained
ISDN SUBSYSTEM
......
......@@ -405,15 +405,16 @@ void _memcpy_fromio(void * to, unsigned long from, long count)
* Copy data from "real" memory space to IO memory space.
* This needs to be optimized.
*/
void _memcpy_toio(unsigned long to, void * from, long count)
void _memcpy_toio(unsigned long to, const void * from, long count)
{
/* Optimize co-aligned transfers. Everything else gets handled
a byte at a time. */
/* FIXME -- align FROM. */
if (count >= 8 && (to & 7) == ((long)from & 7)) {
count -= 8;
do {
writeq(*(u64 *)from, to);
writeq(*(const u64 *)from, to);
count -= 8;
to += 8;
from += 8;
......@@ -424,7 +425,7 @@ void _memcpy_toio(unsigned long to, void * from, long count)
if (count >= 4 && (to & 3) == ((long)from & 3)) {
count -= 4;
do {
writel(*(u32 *)from, to);
writel(*(const u32 *)from, to);
count -= 4;
to += 4;
from += 4;
......@@ -435,7 +436,7 @@ void _memcpy_toio(unsigned long to, void * from, long count)
if (count >= 2 && (to & 1) == ((long)from & 1)) {
count -= 2;
do {
writew(*(u16 *)from, to);
writew(*(const u16 *)from, to);
count -= 2;
to += 2;
from += 2;
......@@ -444,7 +445,7 @@ void _memcpy_toio(unsigned long to, void * from, long count)
}
while (count > 0) {
writeb(*(u8 *) from, to);
writeb(*(const u8 *) from, to);
count--;
to++;
from++;
......
......@@ -922,7 +922,7 @@ static void __init construct_default_ISA_mptable(void)
mp_irqs[pos].mpc_irqtype = mp_INT;
mp_irqs[pos].mpc_irqflag = 0; /* default */
mp_irqs[pos].mpc_srcbus = bus_type;
mp_irqs[pos].mpc_srcbus = 0;
mp_irqs[pos].mpc_srcbusirq = i;
mp_irqs[pos].mpc_dstapic = 0;
mp_irqs[pos].mpc_dstirq = i;
......@@ -1183,13 +1183,23 @@ static inline void init_IO_APIC_traps(void)
*/
if (i < 16)
disable_8259A_irq(i);
} else
} else {
if (!IO_APIC_IRQ(i))
continue;
/*
* we have no business changing low ISA
* IRQs.
* Hmm.. We don't have an entry for this,
* so default to an old-fashioned 8259
* interrupt if we can..
*/
if (IO_APIC_IRQ(i))
irq_desc[i].handler = &no_irq_type;
if (i < 16) {
make_8259A_irq(i);
continue;
}
/* Strange. Oh, well.. */
irq_desc[i].handler = &no_irq_type;
}
}
init_IRQ_SMP();
}
......
......@@ -151,10 +151,7 @@ irq_desc_t irq_desc[NR_IRQS] = { [0 ... NR_IRQS-1] = { 0, &no_irq_type, }};
*/
static unsigned int cached_irq_mask = 0xffff;
#define __byte(x,y) (((unsigned char *)&(y))[x])
#define __word(x,y) (((unsigned short *)&(y))[x])
#define __long(x,y) (((unsigned int *)&(y))[x])
#define __byte(x,y) (((unsigned char *)&(y))[x])
#define cached_21 (__byte(0,cached_irq_mask))
#define cached_A1 (__byte(1,cached_irq_mask))
......@@ -207,7 +204,7 @@ int i8259A_irq_pending(unsigned int irq)
void make_8259A_irq(unsigned int irq)
{
disable_irq(irq);
__long(0,io_apic_irqs) &= ~(1<<irq);
io_apic_irqs &= ~(1<<irq);
irq_desc[irq].handler = &i8259A_irq_type;
enable_irq(irq);
}
......
This diff is collapsed.
......@@ -123,6 +123,7 @@ if [ "$CONFIG_VIDEO_DEV" != "n" ]; then
if [ "$CONFIG_RADIO_AZTECH" = "y" ]; then
hex ' Aztech/Packard Bell I/O port (0x350 or 0x358)' CONFIG_RADIO_AZTECH_PORT 350
fi
dep_tristate 'ADS Cadet AM/FM Tuner' CONFIG_RADIO_CADET $CONFIG_VIDEO_DEV
dep_tristate 'Miro PCM20 Radio' CONFIG_RADIO_MIROPCM20 $CONFIG_VIDEO_DEV
dep_tristate 'GemTek Radio Card support' CONFIG_RADIO_GEMTEK $CONFIG_VIDEO_DEV
if [ "$CONFIG_RADIO_GEMTEK" = "y" ]; then
......
......@@ -401,6 +401,14 @@ else
endif
endif
ifeq ($(CONFIG_RADIO_CADET),y)
L_OBJS += radio-cadet.o
else
ifeq ($(CONFIG_RADIO_CADET),m)
M_OBJS += radio-cadet.o
endif
endif
ifeq ($(CONFIG_RADIO_MIROPCM20),y)
L_OBJS += radio-miropcm20.o
else
......@@ -459,6 +467,7 @@ else
ALL_SUB_DIRS += hfmodem
MOD_SUB_DIRS += hfmodem
endif
endif
include $(TOPDIR)/Rules.make
......
......@@ -235,6 +235,7 @@ static int rt_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
v.rangehigh=(108*16000);
v.flags=VIDEO_TUNER_LOW;
v.mode=VIDEO_MODE_AUTO;
strcpy(v.name, "FM");
v.signal=0xFFFF*rt_getsigstr(rt);
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
......
......@@ -186,6 +186,7 @@ static int az_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
v.signal=0xFFFF*az_getsigstr(az);
if(az_getstereo(az))
v.flags|=VIDEO_TUNER_STEREO_ON;
strcpy(v.name, "FM");
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
......
/* cadet.c - A video4linux driver for the ADS Cadet AM/FM Radio Card
*
* by Fred Gleason <fredg@wava.com>
* Version 0.1.2
*
* (Loosely) based on code for the Aztech radio card by
*
* Russell Kroll (rkroll@exploits.org)
* Quay Ly
* Donald Song
* Jason Lewis (jlewis@twilight.vtc.vsc.edu)
* Scott McGrath (smcgrath@twilight.vtc.vsc.edu)
* William McGrath (wmcgrath@twilight.vtc.vsc.edu)
*
*/
#include <linux/module.h> /* Modules */
#include <linux/init.h> /* Initdata */
#include <linux/ioport.h> /* check_region, request_region */
#include <linux/delay.h> /* udelay */
#include <asm/io.h> /* outb, outb_p */
#include <asm/uaccess.h> /* copy to/from user */
#include <linux/videodev.h> /* kernel radio structs */
#include <linux/config.h> /* CONFIG_RADIO_CADET_PORT */
#ifndef CONFIG_RADIO_CADET_PORT
#define CONFIG_RADIO_CADET_PORT 0x330
#endif
static int io=CONFIG_RADIO_CADET_PORT;
static int users=0;
static int curtuner=0;
static int cadet_getstereo(void)
{
if(curtuner!=0) { /* Only FM has stereo capability! */
return 0;
}
outb(7,io); /* Select tuner control */
if((inb(io+1)&0x40)==0) {
return 1; /* Stereo pilot detected */
}
else {
return 0; /* Mono */
}
}
static unsigned cadet_getfreq(void)
{
int curvol,i;
unsigned freq=0,test,fifo=0;
/*
* Prepare for read
*/
outb(7,io); /* Select tuner control */
curvol=inb(io+1); /* Save current volume/mute setting */
outb(0x00,io+1); /* Ensure WRITE-ENABLE is LOW */
/*
* Read the shift register
*/
for(i=0;i<25;i++) {
fifo=(fifo<<1)|((inb(io+1)>>7)&0x01);
if(i<24) {
outb(0x01,io+1);
outb(0x00,io+1);
}
}
/*
* Restore volume/mute setting
*/
outb(curvol,io+1);
/*
* Convert to actual frequency
*/
if(curtuner==0) { /* FM */
test=12500;
for(i=0;i<14;i++) {
if((fifo&0x01)!=0) {
freq+=test;
}
test=test<<1;
fifo=fifo>>1;
}
freq-=10700000; /* IF frequency is 10.7 MHz */
freq=(freq*16)/1000000; /* Make it 1/16 MHz */
}
if(curtuner==1) { /* AM */
freq=((fifo&0x7fff)-2010)*16;
}
return freq;
}
static void cadet_setfreq(unsigned freq)
{
unsigned fifo;
int i,test;
int curvol;
/*
* Formulate a fifo command
*/
fifo=0;
if(curtuner==0) { /* FM */
test=102400;
freq=(freq*1000)/16; /* Make it kHz */
freq+=10700; /* IF is 10700 kHz */
for(i=0;i<14;i++) {
fifo=fifo<<1;
if(freq>=test) {
fifo|=0x01;
freq-=test;
}
test=test>>1;
}
}
if(curtuner==1) { /* AM */
fifo=(freq/16)+2010; /* Make it kHz */
fifo|=0x100000; /* Select AM Band */
}
/*
* Save current volume/mute setting
*/
curvol=inb(io+1);
/*
* Write the shift register
*/
test=0;
test=(fifo>>23)&0x02; /* Align data for SDO */
test|=0x1c; /* SDM=1, SWE=1, SEN=1, SCK=0 */
outb(7,io); /* Select tuner control */
outb(test,io+1); /* Initialize for write */
for(i=0;i<25;i++) {
test|=0x01; /* Toggle SCK High */
outb(test,io+1);
test&=0xfe; /* Toggle SCK Low */
outb(test,io+1);
fifo=fifo<<1; /* Prepare the next bit */
test=0x1c|((fifo>>23)&0x02);
outb(test,io+1);
}
/*
* Restore volume/mute setting
*/
outb(curvol,io+1);
}
static int cadet_getvol(void)
{
outb(7,io); /* Select tuner control */
if((inb(io+1)&0x20)!=0) {
return 0xffff;
}
else {
return 0;
}
}
static void cadet_setvol(int vol)
{
outb(7,io); /* Select tuner control */
if(vol>0) {
outb(0x20,io+1);
}
else {
outb(0x00,io+1);
}
}
static int cadet_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
{
unsigned freq;
switch(cmd)
{
case VIDIOCGCAP:
{
struct video_capability v;
v.type=VID_TYPE_TUNER;
v.channels=2;
v.audios=1;
/* No we don't do pictures */
v.maxwidth=0;
v.maxheight=0;
v.minwidth=0;
v.minheight=0;
strcpy(v.name, "ADS Cadet");
if(copy_to_user(arg,&v,sizeof(v)))
return -EFAULT;
return 0;
}
case VIDIOCGTUNER:
{
struct video_tuner v;
if(copy_from_user(&v, arg,sizeof(v))!=0) {
return -EFAULT;
}
if((v.tuner<0)||(v.tuner>1)) {
return -EINVAL;
}
switch(v.tuner) {
case 0:
strcpy(v.name,"FM");
v.rangelow=1400; /* 87.5 MHz */
v.rangehigh=1728; /* 108.0 MHz */
v.flags=0;
v.mode=0;
v.mode|=VIDEO_MODE_AUTO;
v.signal=0xFFFF;
if(cadet_getstereo()==1) {
v.flags|=VIDEO_TUNER_STEREO_ON;
}
if(copy_to_user(arg,&v, sizeof(v))) {
return -EFAULT;
}
break;
case 1:
strcpy(v.name,"AM");
v.rangelow=8320; /* 520 kHz */
v.rangehigh=26400; /* 1650 kHz */
v.flags=0;
v.flags|=VIDEO_TUNER_LOW;
v.mode=0;
v.mode|=VIDEO_MODE_AUTO;
v.signal=0xFFFF;
if(copy_to_user(arg,&v, sizeof(v))) {
return -EFAULT;
}
break;
}
return 0;
}
case VIDIOCSTUNER:
{
struct video_tuner v;
if(copy_from_user(&v, arg, sizeof(v))) {
return -EFAULT;
}
if((v.tuner<0)||(v.tuner>1)) {
return -EINVAL;
}
curtuner=v.tuner;
return 0;
}
case VIDIOCGFREQ:
freq=cadet_getfreq();
if(copy_to_user(arg, &freq, sizeof(freq)))
return -EFAULT;
return 0;
case VIDIOCSFREQ:
if(copy_from_user(&freq, arg,sizeof(freq)))
return -EFAULT;
if((curtuner==0)&&((freq<1400)||(freq>1728))) {
return -EINVAL;
}
if((curtuner==1)&&((freq<8320)||(freq>26400))) {
return -EINVAL;
}
cadet_setfreq(freq);
return 0;
case VIDIOCGAUDIO:
{
struct video_audio v;
memset(&v,0, sizeof(v));
v.flags=VIDEO_AUDIO_MUTABLE|VIDEO_AUDIO_VOLUME;
if(cadet_getstereo()==0) {
v.mode=VIDEO_SOUND_MONO;
}
else {
v.mode=VIDEO_SOUND_STEREO;
}
v.volume=cadet_getvol();
v.step=0xffff;
strcpy(v.name, "Radio");
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
}
case VIDIOCSAUDIO:
{
struct video_audio v;
if(copy_from_user(&v, arg, sizeof(v)))
return -EFAULT;
if(v.audio)
return -EINVAL;
cadet_setvol(v.volume);
if(v.flags&VIDEO_AUDIO_MUTE)
cadet_setvol(0);
else
cadet_setvol(0xffff);
return 0;
}
default:
return -ENOIOCTLCMD;
}
}
static int cadet_open(struct video_device *dev, int flags)
{
if(users)
return -EBUSY;
users++;
MOD_INC_USE_COUNT;
return 0;
}
static void cadet_close(struct video_device *dev)
{
users--;
MOD_DEC_USE_COUNT;
}
static struct video_device cadet_radio=
{
"Cadet radio",
VID_TYPE_TUNER,
VID_HARDWARE_CADET,
cadet_open,
cadet_close,
NULL, /* Can't read (no capture ability) */
NULL, /* Can't write */
NULL, /* No poll */
cadet_ioctl,
NULL,
NULL
};
__initfunc(int cadet_init(struct video_init *v))
{
#ifndef MODULE
if(cadet_probe()<0) {
return EINVAL;
}
#endif
if(video_register_device(&cadet_radio,VFL_TYPE_RADIO)==-1)
return -EINVAL;
request_region(io,2,"cadet");
printk(KERN_INFO "ADS Cadet Radio Card at %x\n",io);
return 0;
}
static int cadet_probe(void)
{
static int iovals[8]={0x330,0x332,0x334,0x336,0x338,0x33a,0x33c,0x33e};
int i;
for(i=0;i<8;i++) {
io=iovals[i];
if(check_region(io,2)) {
return -1;
}
cadet_setfreq(1410);
if(cadet_getfreq()==1410) {
return io;
}
}
return -1;
}
#ifdef MODULE
MODULE_AUTHOR("Fred Gleason, Russell Kroll, Quay Lu, Donald Song, Jason Lewis, Scott McGrath, William McGrath");
MODULE_DESCRIPTION("A driver for the ADS Cadet AM/FM/RDS radio card.");
MODULE_PARM(io, "i");
MODULE_PARM_DESC(io, "I/O address of Cadet card (0x330,0x332,0x334,0x336,0x338,0x33a,0x33c,0x33e)");
EXPORT_NO_SYMBOLS;
int init_module(void)
{
if(io==-1)
{
printk(KERN_ERR "You must set an I/O address with io=0x???\n");
return -EINVAL;
}
return cadet_init(NULL);
}
void cleanup_module(void)
{
video_unregister_device(&cadet_radio);
release_region(io,2);
}
#endif
......@@ -160,6 +160,7 @@ static int gemtek_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
v.flags=VIDEO_TUNER_LOW;
v.mode=VIDEO_MODE_AUTO;
v.signal=0xFFFF*gemtek_getsigstr(rt);
strcpy(v.name, "FM");
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
......
......@@ -118,6 +118,7 @@ static int pcm20_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
v.flags=0;
v.mode=VIDEO_MODE_AUTO;
v.signal=0xFFFF*pcm20_getsigstr(pcm20);
strcpy(v.name, "FM");
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
......
......@@ -130,6 +130,7 @@ static int rt_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
v.flags=VIDEO_TUNER_LOW;
v.mode=VIDEO_MODE_AUTO;
v.signal=0xFFFF*rt_getsigstr(rt);
strcpy(v.name, "FM");
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
......
......@@ -158,6 +158,7 @@ static int fmi_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
v.flags=fmi->flags;
v.mode=VIDEO_MODE_AUTO;
v.signal = fmi_getsigstr(fmi);
strcpy(v.name, "FM");
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
......
......@@ -195,7 +195,8 @@ static int typhoon_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
v.rangehigh = 1080 * 1600;
v.flags = VIDEO_TUNER_LOW;
v.mode = VIDEO_MODE_AUTO;
v.signal = 0; /* We can't get the signal strength */
v.signal = 0xFFFF; /* We can't get the signal strength */
strcpy(v.tuner, "FM");
if (copy_to_user(arg, &v, sizeof(v)))
return -EFAULT;
return 0;
......
......@@ -223,14 +223,11 @@ static int zol_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
case VIDIOCGTUNER:
{
struct video_tuner v;
/*
if (copy_from_user(&v, arg, sizeof(v)))
return -EFAULT;
if (v.tuner)
return -EINVAL;
*/
v.tuner = 0;
strcpy(v.name, "Zoltrix Radio");
strcpy(v.name, "FM");
v.rangelow = (int) (88.0 * 16000);
v.rangehigh = (int) (108.0 * 16000);
v.flags = zol_is_stereo(zol)
......
......@@ -75,6 +75,9 @@ extern int gemtek_init(struct video_init *);
#ifdef CONFIG_RADIO_TYPHOON
extern int typhoon_init(struct video_init *);
#endif
#ifdef CONFIG_RADIO_CADET
extern int cadet_init(struct video_init *);
#endif
#ifdef CONFIG_VIDEO_PMS
extern int init_pms_cards(struct video_init *);
#endif
......@@ -111,6 +114,9 @@ static struct video_init video_init_list[]={
#ifdef CONFIG_RADIO_MIROPCM20
{"PCM20", pcm20_init},
#endif
#ifdef CONFIG_RADIO_CADET
{"Cadet", cadet_init},
#endif
#ifdef CONFIG_RADIO_GEMTEK
{"GemTek", gemtek_init},
#endif
......@@ -430,6 +436,12 @@ void cleanup_module(void)
unregister_chrdev(VIDEO_MAJOR, "video_capture");
}
#endif
#if LINUX_VERSION_CODE >= 0x020100
......
......@@ -1073,7 +1073,7 @@ SUB_DIRS += irda
MOD_IN_SUB_DIRS += irda
else
ifeq ($(CONFIG_IRDA),m)
MOD_SUB_DIRS += irda
MOD_IN_SUB_DIRS += irda
endif
endif
......
......@@ -10,7 +10,7 @@ ALL_SUB_DIRS := $(SUB_DIRS)
L_TARGET := irda_drivers.a
L_OBJS :=
M_OBJS :=
MOD_LIST_NAME := IRDA_MODULES
MOD_LIST_NAME := IRDA_DRIVERS_MODULES
ifeq ($(CONFIG_IRTTY_SIR),y)
L_OBJS += irtty.o
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Dec 9 21:18:38 1997
* Modified at: Tue Feb 9 13:08:25 1999
* Modified at: Tue Apr 6 21:35:25 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
* Sources: slip.c by Laurence Culhane, <loz@holmes.demon.co.uk>
* Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
......@@ -33,7 +33,6 @@
#include <linux/init.h>
#include <net/irda/irda.h>
#include <net/irda/irmod.h>
#include <net/irda/irtty.h>
#include <net/irda/wrapper.h>
#include <net/irda/irlap.h>
......@@ -191,7 +190,6 @@ static int irtty_open( struct tty_struct *tty)
/*
* Initialize driver
*/
/* self->idev.flags |= SIR_MODE | IO_PIO; */
self->idev.rx_buff.state = OUTSIDE_FRAME;
/*
......@@ -207,7 +205,7 @@ static int irtty_open( struct tty_struct *tty)
IR_115200;
self->idev.qos.min_turn_time.bits = 0x03;
self->idev.flags = IFF_SIR | IFF_PIO;
irda_qos_bits_to_value( &self->idev.qos);
irda_qos_bits_to_value(&self->idev.qos);
/* Specify which buffer allocation policy we need */
self->idev.rx_buff.flags = GFP_KERNEL;
......@@ -230,7 +228,7 @@ static int irtty_open( struct tty_struct *tty)
self->idev.netdev.stop = irtty_net_close;
/* Open the IrDA device */
irda_device_open( &self->idev, name, self);
irda_device_open(&self->idev, name, self);
MOD_INC_USE_COUNT;
......@@ -244,20 +242,20 @@ static int irtty_open( struct tty_struct *tty)
* and then restoring the TTY line discipline to what it was before it got
* hooked to IrDA (which usually is TTY again).
*/
static void irtty_close( struct tty_struct *tty)
static void irtty_close(struct tty_struct *tty)
{
struct irtty_cb *self = (struct irtty_cb *) tty->disc_data;
/* First make sure we're connected. */
ASSERT( self != NULL, return;);
ASSERT( self->magic == IRTTY_MAGIC, return;);
ASSERT(self != NULL, return;);
ASSERT(self->magic == IRTTY_MAGIC, return;);
/* We are not using any dongle anymore! */
if ( self->dongle_q)
self->dongle_q->dongle->close( &self->idev);
if (self->dongle_q)
self->dongle_q->dongle->close(&self->idev);
/* Remove driver */
irda_device_close( &self->idev);
irda_device_close(&self->idev);
/* Stop tty */
tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
......@@ -266,11 +264,10 @@ static void irtty_close( struct tty_struct *tty)
self->tty = NULL;
self->magic = 0;
/* hashbin_remove( irtty, 0, self->name); */
self = hashbin_remove( irtty, (int) self, NULL);
self = hashbin_remove(irtty, (int) self, NULL);
if ( self != NULL)
kfree( self);
if (self != NULL)
kfree(self);
MOD_DEC_USE_COUNT;
}
......@@ -579,7 +576,7 @@ static void irtty_write_wakeup( struct tty_struct *tty)
* Now serial buffer is almost free & we can start
* transmission of another packet
*/
DEBUG( 4, __FUNCTION__ "(), finished with frame!\n");
DEBUG(5, __FUNCTION__ "(), finished with frame!\n");
tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
......@@ -649,8 +646,8 @@ int irtty_register_dongle( struct dongle *dongle)
memset( new, 0, sizeof( struct dongle_q));
new->dongle = dongle;
/* Insert IrDA compressor into hashbin */
hashbin_insert( dongles, (QUEUE *) new, dongle->type, NULL);
/* Insert IrDA dongle into hashbin */
hashbin_insert(dongles, (QUEUE *) new, dongle->type, NULL);
return 0;
}
......@@ -668,11 +665,20 @@ void irtty_unregister_dongle( struct dongle *dongle)
}
/*
* Function irtty_set_dtr_rts (tty, dtr, rts)
*
* This function can be used by dongles etc. to set or reset the status
* of the dtr and rts lines
*/
void irtty_set_dtr_rts(struct tty_struct *tty, int dtr, int rts)
{
mm_segment_t fs;
int arg = TIOCM_OUT2;
int arg = 0;
#ifdef TIOCM_OUT2 /* Not defined for ARM */
arg = TIOCM_OUT2;
#endif
if (rts)
arg |= TIOCM_RTS;
if (dtr)
......@@ -747,8 +753,7 @@ MODULE_DESCRIPTION("IrDA TTY device driver");
*/
int init_module(void)
{
irtty_init();
return(0);
return irtty_init();
}
/*
......
......@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sat Nov 7 21:43:15 1998
* Modified at: Tue Feb 9 13:29:40 1999
* Modified at: Sat Apr 3 15:54:47 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998 Dag Brattli <dagb@cs.uit.no>
......@@ -132,7 +132,7 @@ __initfunc(int pc87108_init(void))
for ( i=0; (io[i] < 2000) && (i < 4); i++) {
int ioaddr = io[i];
if (check_region(ioaddr, CHIP_IO_EXTENT))
if (check_region(ioaddr, CHIP_IO_EXTENT) < 0)
continue;
if (pc87108_open( i, io[i], io2[i], irq[i], dma[i]) == 0)
return 0;
......@@ -151,11 +151,11 @@ static void pc87108_cleanup(void)
{
int i;
DEBUG( 4, __FUNCTION__ "()\n");
DEBUG(4, __FUNCTION__ "()\n");
for ( i=0; i < 4; i++) {
if ( dev_self[i])
pc87108_close( &(dev_self[i]->idev));
for (i=0; i < 4; i++) {
if (dev_self[i])
pc87108_close(&(dev_self[i]->idev));
}
}
#endif /* MODULE */
......@@ -233,7 +233,6 @@ static int pc87108_open( int i, unsigned int iobase, unsigned int board_addr,
idev->tx_buff.truesize = 4000;
/* Initialize callbacks */
idev->hard_xmit = pc87108_hard_xmit;
idev->change_speed = pc87108_change_speed;
idev->wait_until_sent = pc87108_wait_until_sent;
idev->is_receiving = pc87108_is_receiving;
......@@ -671,7 +670,7 @@ static void pc87108_change_speed( struct irda_device *idev, int speed)
/* Set appropriate speed mode */
switch_bank(iobase, BANK0);
outb( mcr|MCR_TX_DFR, iobase+MCR);
outb(mcr | MCR_TX_DFR, iobase+MCR);
/* Give some hits to the transceiver */
pc87108_change_dongle_speed( iobase, speed, idev->io.dongle_id);
......@@ -805,8 +804,8 @@ static void pc87108_dma_write( struct irda_device *idev, int iobase)
switch_bank(iobase, BANK0);
outb( inb( iobase+MCR) & ~MCR_DMA_EN, iobase+MCR);
setup_dma( idev->io.dma, idev->tx_buff.data, idev->tx_buff.len,
DMA_MODE_WRITE);
setup_dma(idev->io.dma, idev->tx_buff.data, idev->tx_buff.len,
DMA_MODE_WRITE);
/* idev->media_busy = TRUE; */
idev->io.direction = IO_XMIT;
......@@ -920,29 +919,29 @@ static void pc87108_dma_xmit_complete( struct irda_device *idev)
* if it starts to receive a frame.
*
*/
static int pc87108_dma_receive( struct irda_device *idev)
static int pc87108_dma_receive(struct irda_device *idev)
{
struct pc87108 *self;
int iobase;
__u8 bsr;
ASSERT( idev != NULL, return -1;);
ASSERT( idev->magic == IRDA_DEVICE_MAGIC, return -1;);
ASSERT(idev != NULL, return -1;);
ASSERT(idev->magic == IRDA_DEVICE_MAGIC, return -1;);
DEBUG( 4, __FUNCTION__ "\n");
DEBUG(4, __FUNCTION__ "\n");
self = idev->priv;
iobase= idev->io.iobase;
iobase = idev->io.iobase;
/* Save current bank */
bsr = inb( iobase+BSR);
bsr = inb(iobase+BSR);
/* Disable DMA */
switch_bank( iobase, BANK0);
outb( inb(iobase+MCR) & ~MCR_DMA_EN, iobase+MCR);
switch_bank(iobase, BANK0);
outb(inb(iobase+MCR) & ~MCR_DMA_EN, iobase+MCR);
setup_dma( idev->io.dma, idev->rx_buff.data, idev->rx_buff.truesize,
DMA_MODE_READ);
setup_dma(idev->io.dma, idev->rx_buff.data,
idev->rx_buff.truesize, DMA_MODE_READ);
/* driver->media_busy = FALSE; */
idev->io.direction = IO_RECV;
......@@ -950,22 +949,22 @@ static int pc87108_dma_receive( struct irda_device *idev)
idev->rx_buff.offset = 0;
/* Reset Rx FIFO. This will also flush the ST_FIFO */
outb( FCR_RXTH|FCR_TXTH|FCR_RXSR|FCR_FIFO_EN, iobase+FCR);
outb(FCR_RXTH|FCR_TXTH|FCR_RXSR|FCR_FIFO_EN, iobase+FCR);
self->st_fifo.len = self->st_fifo.tail = self->st_fifo.head = 0;
/* Choose DMA Rx, DMA Fairness, and Advanced mode */
switch_bank(iobase, BANK2);
outb(( inb( iobase+ECR1) & ~ECR1_DMASWP)|ECR1_DMANF|ECR1_EXT_SL,
iobase+ECR1);
outb((inb( iobase+ECR1) & ~ECR1_DMASWP)|ECR1_DMANF|ECR1_EXT_SL,
iobase+ECR1);
/* enable DMA */
switch_bank(iobase, BANK0);
outb( inb( iobase+MCR)|MCR_DMA_EN, iobase+MCR);
outb(inb(iobase+MCR)|MCR_DMA_EN, iobase+MCR);
/* Restore bank register */
outb( bsr, iobase+BSR);
outb(bsr, iobase+BSR);
DEBUG( 4, __FUNCTION__ "(), done!\n");
DEBUG(4, __FUNCTION__ "(), done!\n");
return 0;
}
......@@ -1481,9 +1480,7 @@ static int pc87108_net_close(struct device *dev)
*/
int init_module(void)
{
pc87108_init();
return(0);
return pc87108_init();
}
/*
......@@ -1496,6 +1493,5 @@ void cleanup_module(void)
{
pc87108_cleanup();
}
#endif
#endif /* MODULE */
......@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Wed Oct 21 20:02:35 1998
* Modified at: Tue Feb 9 15:36:55 1999
* Modified at: Mon Feb 15 14:13:17 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998 Dag Brattli, All Rights Reserved.
......
This diff is collapsed.
This diff is collapsed.
......@@ -569,10 +569,6 @@ static __inline__ void run_main(void)
if (!main_running) {
main_running = 1;
NCR5380_main();
/*
* main_running is cleared in NCR5380_main once it can't do
* more work, and NCR5380_main exits with interrupts disabled.
*/
}
restore_flags(flags);
}
......@@ -702,7 +698,9 @@ void NCR5380_timer_fn(unsigned long surplus_to_requirements)
}
restore_flags(flags);
spin_lock_irqsave(&io_request_lock, flags);
run_main();
spin_unlock_irqrestore(&io_request_lock, flags);
}
#endif /* def USLEEP */
......@@ -1266,6 +1264,7 @@ static void NCR5380_main(void) {
struct Scsi_Host *instance;
struct NCR5380_hostdata *hostdata;
int done;
unsigned long flags;
/*
* We run (with interrupts disabled) until we're sure that none of
......@@ -1279,14 +1278,16 @@ static void NCR5380_main(void) {
* this should prevent any race conditions.
*/
spin_unlock_irq(&io_request_lock);
save_flags(flags);
do {
cli(); /* Freeze request queues */
done = 1;
for (instance = first_instance; instance &&
instance->hostt == the_template; instance = instance->next) {
unsigned long flags;
hostdata = (struct NCR5380_hostdata *) instance->hostdata;
save_flags(flags);
cli();
#ifdef USLEEP
if (!hostdata->connected && !hostdata->selecting) {
......@@ -1365,8 +1366,6 @@ static void NCR5380_main(void) {
TAG_NEXT)) {
break;
} else {
unsigned long flags;
save_flags(flags);
cli();
LIST(tmp, hostdata->issue_queue);
tmp->host_scribble = (unsigned char *)
......@@ -1393,14 +1392,12 @@ static void NCR5380_main(void) {
}
else
{
unsigned long flags;
/* RvC: device failed, so we wait a long time
this is needed for Mustek scanners, that
do not respond to commands immediately
after a scan */
printk(KERN_DEBUG "scsi%d: device %d did not respond in time\n",
instance->host_no, tmp->target);
save_flags(flags);
cli();
LIST(tmp, hostdata->issue_queue);
tmp->host_scribble = (unsigned char *) hostdata->issue_queue;
......@@ -1434,7 +1431,8 @@ static void NCR5380_main(void) {
break;
} /* for instance */
} while (!done);
cli();
spin_lock_irq(&io_request_lock);
/* cli();*/
main_running = 0;
}
......
This diff is collapsed.
/*+M*************************************************************************
* Perceptive Solutions, Inc. PCI-2000 device driver proc support for Linux.
/****************************************************************************
* Perceptive Solutions, Inc. PCI-2000 device driver for Linux.
*
* Copyright (c) 1997 Perceptive Solutions, Inc.
* pci2000.h - Linux Host Driver for PCI-2000 IntelliCache SCSI Adapters
*
* 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, or (at your option)
* any later version.
* Copyright (c) 1997-1999 Perceptive Solutions, Inc.
* All Rights Reserved.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that redistributions of source
* code retain the above copyright notice and this comment without
* modification.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
* Technical updates and product information at:
* http://www.psidisk.com
*
* Please send questions, comments, bug reports to:
* tech@psidisk.com Technical Support
*
* File Name: pci2000.h
*
* Description: Header file for the SCSI driver for the PCI-2000
* interface card.
*
*-M*************************************************************************/
****************************************************************************/
#ifndef _PCI2000_H
#define _PCI2000_H
......@@ -33,6 +27,11 @@
#ifndef PSI_EIDE_SCSIOP
#define PSI_EIDE_SCSIOP 1
#ifndef LINUX_VERSION_CODE
#include <linux/version.h>
#endif
#define LINUXVERSION(v,p,s) (((v)<<16) + ((p)<<8) + (s))
/************************************************/
/* definition of standard data types */
/************************************************/
......@@ -194,6 +193,7 @@ int Pci2000_Command (Scsi_Cmnd *SCpnt);
int Pci2000_QueueCommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *));
int Pci2000_Abort (Scsi_Cmnd *SCpnt);
int Pci2000_Reset (Scsi_Cmnd *SCpnt, unsigned int flags);
int Pci2000_Release (struct Scsi_Host *pshost);
int Pci2000_BiosParam (Disk *disk, kdev_t dev, int geom[]);
#ifndef NULL
......@@ -202,12 +202,43 @@ int Pci2000_BiosParam (Disk *disk, kdev_t dev, int geom[]);
extern struct proc_dir_entry Proc_Scsi_Pci2000;
#if LINUX_VERSION_CODE >= LINUXVERSION(2,1,75)
#define PCI2000 { \
next: NULL, \
module: NULL, \
proc_dir: &Proc_Scsi_Pci2000, \
proc_info: NULL, /* let's not bloat the kernel */ \
name: "PCI-2000 SCSI Intelligent Disk Controller",\
detect: Pci2000_Detect, \
release: Pci2000_Release, \
info: NULL, /* let's not bloat the kernel */ \
command: Pci2000_Command, \
queuecommand: Pci2000_QueueCommand, \
eh_strategy_handler: NULL, \
eh_abort_handler: NULL, \
eh_device_reset_handler: NULL, \
eh_bus_reset_handler: NULL, \
eh_host_reset_handler: NULL, \
abort: Pci2000_Abort, \
reset: Pci2000_Reset, \
slave_attach: NULL, \
bios_param: Pci2000_BiosParam, \
can_queue: 16, \
this_id: -1, \
sg_tablesize: 16, \
cmd_per_lun: 1, \
present: 0, \
unchecked_isa_dma: 0, \
use_clustering: DISABLE_CLUSTERING, \
use_new_eh_code: 0 \
}
#else
#define PCI2000 { NULL, NULL, \
&Proc_Scsi_Pci2000,/* proc_dir_entry */ \
NULL, \
"PCI-2000 SCSI Intelligent Disk Controller",\
Pci2000_Detect, \
NULL, \
Pci2000_Release, \
NULL, \
Pci2000_Command, \
Pci2000_QueueCommand, \
......@@ -222,5 +253,6 @@ extern struct proc_dir_entry Proc_Scsi_Pci2000;
0, \
0, \
DISABLE_CLUSTERING }
#endif
#endif
This diff is collapsed.
/*+M*************************************************************************
* Perceptive Solutions, Inc. PCI-2000 device driver proc support for Linux.
/****************************************************************************
* Perceptive Solutions, Inc. PCI-2220I device driver for Linux.
*
* Copyright (c) 1999 Perceptive Solutions, Inc.
* pci2220i.h - Linux Host Driver for PCI-2220i EIDE Adapters
*
* 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, or (at your option)
* any later version.
* Copyright (c) 1997-1999 Perceptive Solutions, Inc.
* All Rights Reserved.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that redistributions of source
* code retain the above copyright notice and this comment without
* modification.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
* Technical updates and product information at:
* http://www.psidisk.com
*
* Please send questions, comments, bug reports to:
* tech@psidisk.com Technical Support
*
* File Name: pci2220i.h
*
* Description: Header file for the SCSI driver for the PCI2220I
* EIDE interface card.
*
*-M*************************************************************************/
****************************************************************************/
#ifndef _PCI2220I_H
#define _PCI2220I_H
#ifndef PSI_EIDE_SCSIOP
#define PSI_EIDE_SCSIOP 1
#ifndef LINUX_VERSION_CODE
#include <linux/version.h>
#endif
#define LINUXVERSION(v,p,s) (((v)<<16) + ((p)<<8) + (s))
/************************************************/
/* Some defines that we like */
/************************************************/
......@@ -281,10 +282,11 @@ typedef struct _IDENTIFY_DATA
// function prototypes
int Pci2220i_Detect (Scsi_Host_Template *tpnt);
int Pci2220i_Command (Scsi_Cmnd *SCpnt);
int Pci2220i_Command (Scsi_Cmnd *SCpnt);
int Pci2220i_QueueCommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *));
int Pci2220i_Abort (Scsi_Cmnd *SCpnt);
int Pci2220i_Reset (Scsi_Cmnd *SCpnt, unsigned int flags);
int Pci2220i_Release (struct Scsi_Host *pshost);
int Pci2220i_BiosParam (Disk *disk, kdev_t dev, int geom[]);
#ifndef NULL
......@@ -293,12 +295,43 @@ int Pci2220i_BiosParam (Disk *disk, kdev_t dev, int geom[]);
extern struct proc_dir_entry Proc_Scsi_Pci2220i;
#if LINUX_VERSION_CODE >= LINUXVERSION(2,1,75)
#define PCI2220I { \
next: NULL, \
module: NULL, \
proc_dir: &Proc_Scsi_Pci2220i, \
proc_info: NULL, /* let's not bloat the kernel */\
name: "PCI-2220I EIDE Disk Controller", \
detect: Pci2220i_Detect, \
release: Pci2220i_Release, \
info: NULL, /* let's not bloat the kernel */\
command: Pci2220i_Command, \
queuecommand: Pci2220i_QueueCommand, \
eh_strategy_handler: NULL, \
eh_abort_handler: NULL, \
eh_device_reset_handler: NULL, \
eh_bus_reset_handler: NULL, \
eh_host_reset_handler: NULL, \
abort: Pci2220i_Abort, \
reset: Pci2220i_Reset, \
slave_attach: NULL, \
bios_param: Pci2220i_BiosParam, \
can_queue: 1, \
this_id: -1, \
sg_tablesize: SG_NONE, \
cmd_per_lun: 1, \
present: 0, \
unchecked_isa_dma: 0, \
use_clustering: DISABLE_CLUSTERING, \
use_new_eh_code: 0 \
}
#else
#define PCI2220I { NULL, NULL, \
&Proc_Scsi_Pci2220i,/* proc_dir_entry */\
NULL, \
"PCI-2220I EIDE Disk Controller", \
Pci2220i_Detect, \
NULL, \
Pci2220i_Release, \
NULL, \
Pci2220i_Command, \
Pci2220i_QueueCommand, \
......@@ -313,4 +346,6 @@ extern struct proc_dir_entry Proc_Scsi_Pci2220i;
0, \
0, \
DISABLE_CLUSTERING }
#endif
#endif
......@@ -129,7 +129,7 @@ static int WriteData (PADAPTER240I padapter)
outsw (pports[PORT_DATA], padapter->buffer, (USHORT)padapter->ide.ide.ide[2] * 256);
return 0;
}
} while ( timer > jiffies ); // test for timeout
} while ( time_after(timer, jiffies) ); // test for timeout
padapter->ide.ide.ides.cmd = 0; // null out the command byte
return 1;
......@@ -169,7 +169,7 @@ static UCHAR IdeCmd (PADAPTER240I padapter)
return 0;
}
} while ( timer > jiffies ); // test for timeout
} while ( time_after(timer, jiffies) ); // test for timeout
padapter->ide.ide.ides.cmd = 0; // null out the command byte
return status;
......@@ -264,7 +264,7 @@ static void Irq_Handler (int irq, void *dev_id, struct pt_regs *regs)
UCHAR status;
int z;
DEB(printk ("\npsi240i recieved interrupt\n"));
DEB(printk ("\npsi240i received interrupt\n"));
shost = PsiHost[irq - 10];
if ( !shost )
......
/*+M*************************************************************************
* Perceptive Solutions, Inc. PCI-2000 device driver proc support for Linux.
/****************************************************************************
* Perceptive Solutions, Inc. PCI-2220I device driver for Linux.
*
* Copyright (c) 1999 Perceptive Solutions, Inc.
* psi_dalei.h - Linux Host Driver for PCI-2220i EIDE Adapters
*
* 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, or (at your option)
* any later version.
* Copyright (c) 1997-1999 Perceptive Solutions, Inc.
* All Rights Reserved.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that redistributions of source
* code retain the above copyright notice and this comment without
* modification.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
* Technical updates and product information at:
* http://www.psidisk.com
*
* Please send questions, comments, bug reports to:
* tech@psidisk.com Technical Support
*
* File Name: psi_dale.h
*
* Description: This file contains the interface defines and
* error codes.
*
*-M*************************************************************************/
****************************************************************************/
/************************************************/
/* Dale PCI setup */
......
/*+M*************************************************************************
* Perceptive Solutions, Inc. PCI-2000 device driver proc support for Linux.
/****************************************************************************
* Perceptive Solutions, Inc. PCI-2000 device driver for Linux.
*
* Copyright (c) 1997 Perceptive Solutions, Inc.
* psi_roy.h - Linux Host Driver for PCI-2000 IntelliCache SCSI Adapters
*
* 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, or (at your option)
* any later version.
* Copyright (c) 1997-1999 Perceptive Solutions, Inc.
* All Rights Reserved.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that redistributions of source
* code retain the above copyright notice and this comment without
* modification.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
* Technical updates and product information at:
* http://www.psidisk.com
*
* Please send questions, comments, bug reports to:
* tech@psidisk.com Technical Support
*
* File Name: psi_roy.h
*
* Description: This file contains the host interface command and
* error codes.
*
*-M*************************************************************************/
****************************************************************************/
#ifndef ROY_HOST
#define ROY_HOST
......
This diff is collapsed.
This diff is collapsed.
......@@ -366,7 +366,6 @@ fat_read_super(struct super_block *sb, void *data, int silent)
fat32 = 1;
MSDOS_SB(sb)->fat_length= CF_LE_W(b->fat32_length)*sector_mult;
MSDOS_SB(sb)->root_cluster = CF_LE_L(b->root_cluster);
CF_LE_W(b->info_sector), logical_sector_size);
/* MC - if info_sector is 0, don't multiply by 0 */
if(CF_LE_W(b->info_sector) == 0) {
......
......@@ -528,15 +528,6 @@ void clean_inode(struct inode *inode)
sema_init(&inode->i_sem, 1);
}
/*
* This gets called with I_LOCK held: it needs
* to read the inode and then unlock it
*/
static inline void read_inode(struct inode *inode, struct super_block *sb)
{
sb->s_op->read_inode(inode);
}
/*
* This is called by things like the networking layer
* etc that want to get an inode without any inode
......@@ -606,7 +597,7 @@ static struct inode * get_new_inode(struct super_block *sb, unsigned long ino, s
spin_unlock(&inode_lock);
clean_inode(inode);
read_inode(inode, sb);
sb->s_op->read_inode(inode);
/*
* This is special! We do not need the spinlock
......
......@@ -195,8 +195,8 @@ static struct super_block *minix_read_super(struct super_block *s, void *data,
s->u.minix_sb.s_ms = ms;
s->u.minix_sb.s_sbh = bh;
s->u.minix_sb.s_mount_state = ms->s_state;
s->s_blocksize = 1024;
s->s_blocksize_bits = 10;
s->s_blocksize = BLOCK_SIZE;
s->s_blocksize_bits = BLOCK_SIZE_BITS;
s->u.minix_sb.s_ninodes = ms->s_ninodes;
s->u.minix_sb.s_nzones = ms->s_nzones;
s->u.minix_sb.s_imap_blocks = ms->s_imap_blocks;
......
......@@ -1032,17 +1032,13 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
int error;
error = may_delete(dir, dentry, 0);
if (error)
goto exit_lock;
if (!dir->i_op || !dir->i_op->unlink)
goto exit_lock;
DQUOT_INIT(dir);
error = dir->i_op->unlink(dir, dentry);
exit_lock:
if (!error) {
error = -EPERM;
if (dir->i_op && dir->i_op->unlink) {
DQUOT_INIT(dir);
error = dir->i_op->unlink(dir, dentry);
}
}
return error;
}
......
......@@ -287,7 +287,7 @@ static inline void iounmap(void *addr)
* String version of IO memory access ops:
*/
extern void _memcpy_fromio(void *, unsigned long, long);
extern void _memcpy_toio(unsigned long, void *, long);
extern void _memcpy_toio(unsigned long, const void *, long);
extern void _memset_c_io(unsigned long, unsigned long, long);
#define memcpy_fromio(to,from,len) \
......
......@@ -50,7 +50,7 @@ waking_non_zero(struct semaphore *sem)
* 0 go to sleep
* -EINTR interrupted
*
* We must undo the sem->count down_interruptible increment
* We must undo the sem->count down_interruptible decrement
* simultaneously and atomicly with the sem->waking adjustment,
* otherwise we can race with wake_one_more.
*
......
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.
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.
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.
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.
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.
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.
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.
dep_tristate 'IrOBEX protocol' CONFIG_IROBEX $CONFIG_IRDA
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.
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