Commit c88c0e6a authored by Linus Torvalds's avatar Linus Torvalds

Import 2.2.8pre4

parent 5f1dace7
......@@ -444,8 +444,8 @@ Real is aware of the problem and should have an updated version of the
software available shortly. In the mean time, you can always try
backing up your copy of rvplayer, and then editing it by:
dd if=/dev/zero of=rvplayer bs=1 count=1 seek=657586 conv=notrunc dd
if=/dev/zero of=rvplayer bs=1 count=1 seek=665986 conv=notrunc
dd if=/dev/zero of=rvplayer bs=1 count=1 seek=657586 conv=notrunc
dd if=/dev/zero of=rvplayer bs=1 count=1 seek=665986 conv=notrunc
If you're lucky, you'll then have sound....
......
#include <linux/config.h>
#include <linux/stddef.h>
#include <linux/init.h>
#include <linux/sched.h>
......
......@@ -137,6 +137,9 @@ if [ "$CONFIG_VIDEO_DEV" != "n" ]; then
dep_tristate 'Colour QuickCam Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_CQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
fi
dep_tristate 'Mediavision Pro Movie Studio Video For Linux' CONFIG_VIDEO_PMS $CONFIG_VIDEO_DEV
if [ "$CONFIG_PMAC" = "y" ]; then
dep_tristate 'PlanB Video-In on PowerMac' CONFIG_VIDEO_PLANB $CONFIG_VIDEO_DEV
fi
dep_tristate 'SAA5249 Teletext processor' CONFIG_VIDEO_SAA5249 $CONFIG_VIDEO_DEV
dep_tristate 'SF16FMI Radio' CONFIG_RADIO_SF16FMI $CONFIG_VIDEO_DEV
if [ "$CONFIG_RADIO_SF16FMI" = "y" ]; then
......
......@@ -354,6 +354,14 @@ else
endif
endif
ifeq ($(CONFIG_VIDEO_PLANB),y)
L_OBJS += planb.o
else
ifeq ($(CONFIG_VIDEO_PLANB),m)
M_OBJS += planb.o
endif
endif
ifeq ($(CONFIG_RADIO_AZTECH),y)
L_OBJS += radio-aztech.o
else
......
......@@ -13,6 +13,23 @@
* (fixed range check bug as a side effect)
* Printk clean up
* 9/12/98 alan@redhat.com Rough port to 2.1.x
*
*
* ***********************************************************
*
* To use this driver you also need the support package. You
* can find this in RPM format on
* ftp://ftp.linux.org.uk/pub/linux/alan
*
* You can find the original tools for this direct from Multitech
* ftp://ftp.multitech.com/ISI-Cards/
*
* Having installed the cards the module options (/etc/conf.modules)
*
* options isicom io=card1,card2,card3,card4 irq=card1,card2,card3,card4
*
* Omit those entries for boards you don't have installed.
*
*/
#include <linux/module.h>
......
This diff is collapsed.
/*
planb - PlanB frame grabber driver
PlanB is used in the 7x00/8x00 series of PowerMacintosh
Computers as video input DMA controller.
Copyright (C) 1998 Michel Lanners (mlan@cpu.lu)
Based largely on the bttv driver by Ralph Metzler (rjkm@thp.uni-koeln.de)
Additional debugging and coding by Takashi Oe (toe@unlinfo.unl.edu)
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 your option) any later version.
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.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: planb.h,v 1.13 1999/05/03 19:28:56 mlan Exp $ */
#ifndef _PLANB_H_
#define _PLANB_H_
#ifdef __KERNEL__
#include <asm/dbdma.h>
#include "saa7196.h"
#endif /* __KERNEL__ */
#define PLANB_DEVICE_NAME "Apple PlanB Video-In"
#define PLANB_REV "1.0"
#ifdef __KERNEL__
//#define PLANB_GSCANLINE /* use this if apps have the notion of */
/* grab buffer scanline */
/* This should be safe for both PAL and NTSC */
#define PLANB_MAXPIXELS 768
#define PLANB_MAXLINES 576
#define PLANB_NTSC_MAXLINES 480
/* Uncomment your preferred norm ;-) */
#define PLANB_DEF_NORM VIDEO_MODE_PAL
//#define PLANB_DEF_NORM VIDEO_MODE_NTSC
//#define PLANB_DEF_NORM VIDEO_MODE_SECAM
/* fields settings */
#define PLANB_GRAY 0x1 /* 8-bit mono? */
#define PLANB_COLOUR15 0x2 /* 16-bit mode */
#define PLANB_COLOUR32 0x4 /* 32-bit mode */
#define PLANB_CLIPMASK 0x8 /* hardware clipmasking */
/* misc. flags for PlanB DMA operation */
#define CH_SYNC 0x1 /* synchronize channels (set by ch1;
cleared by ch2) */
#define FIELD_SYNC 0x2 /* used for the start of each field
(0 -> 1 -> 0 for ch1; 0 -> 1 for ch2) */
#define EVEN_FIELD 0x0 /* even field is detected if unset */
#define DMA_ABORT 0x2 /* error or just out of sync if set */
#define ODD_FIELD 0x4 /* odd field is detected if set */
/* for capture operations */
#define MAX_GBUFFERS 2
#ifdef PLANB_GSCANLINE
#define PLANB_MAX_FBUF 0x240000 /* 576 * 1024 * 4 */
#define TAB_FACTOR (1)
#else
#define PLANB_MAX_FBUF 0x1b0000 /* 576 * 768 * 4 */
#define TAB_FACTOR (2)
#endif
#endif /* __KERNEL__ */
struct planb_saa_regs {
unsigned char addr;
unsigned char val;
};
struct planb_stat_regs {
unsigned int ch1_stat;
unsigned int ch2_stat;
unsigned char saa_stat0;
unsigned char saa_stat1;
};
struct planb_any_regs {
unsigned int offset;
unsigned int bytes;
unsigned char data[128];
};
/* planb private ioctls */
#define PLANBIOCGSAAREGS _IOWR('v', BASE_VIDIOCPRIVATE, struct planb_saa_regs) /* Read a saa7196 reg value */
#define PLANBIOCSSAAREGS _IOW('v', BASE_VIDIOCPRIVATE + 1, struct planb_saa_regs) /* Set a saa7196 reg value */
#define PLANBIOCGSTAT _IOR('v', BASE_VIDIOCPRIVATE + 2, struct planb_stat_regs) /* Read planb status */
#define PLANB_TV_MODE 1
#define PLANB_VTR_MODE 2
#define PLANBIOCGMODE _IOR('v', BASE_VIDIOCPRIVATE + 3, int) /* Get TV/VTR mode */
#define PLANBIOCSMODE _IOW('v', BASE_VIDIOCPRIVATE + 4, int) /* Set TV/VTR mode */
#ifdef PLANB_GSCANLINE
#define PLANBG_GRAB_BPL _IOR('v', BASE_VIDIOCPRIVATE + 5, int) /* # of bytes per scanline in grab buffer */
#endif
/* call wake_up_interruptible() with appropriate actions */
#define PLANB_INTR_DEBUG _IOW('v', BASE_VIDIOCPRIVATE + 20, int)
/* investigate which reg does what */
#define PLANB_INV_REGS _IOWR('v', BASE_VIDIOCPRIVATE + 21, struct planb_any_regs)
#ifdef __KERNEL__
/* Potentially useful macros */
#define PLANB_SET(x) ((x) << 16 | (x))
#define PLANB_CLR(x) ((x) << 16)
/* This represents the physical register layout */
struct planb_registers {
volatile struct dbdma_regs ch1; /* 0x00: video in */
volatile unsigned int even; /* 0x40: even field setting */
volatile unsigned int odd; /* 0x44; odd field setting */
unsigned int pad1[14]; /* empty? */
volatile struct dbdma_regs ch2; /* 0x80: clipmask out */
unsigned int pad2[16]; /* 0xc0: empty? */
volatile unsigned int reg3; /* 0x100: ???? */
volatile unsigned int intr_stat; /* 0x104: irq status */
#define PLANB_CLR_IRQ 0x00 /* clear Plan B interrupt */
#define PLANB_GEN_IRQ 0x01 /* assert Plan B interrupt */
#define PLANB_FRM_IRQ 0x02 /* end of frame */
#define PLANB_IRQ_CMD_MASK 0x00000003U /* reserve 2 lsbs for command */
unsigned int pad3[1]; /* empty? */
volatile unsigned int reg5; /* 0x10c: ??? */
unsigned int pad4[60]; /* empty? */
volatile unsigned char saa_addr; /* 0x200: SAA subadr */
char pad5[3];
volatile unsigned char saa_regval; /* SAA7196 write reg. val */
char pad6[3];
volatile unsigned char saa_status; /* SAA7196 status byte */
/* There is more unused stuff here */
};
struct planb_window {
int x, y;
ushort width, height;
ushort bpp, bpl, depth, pad;
ushort swidth, sheight;
int norm;
int interlace;
u32 color_fmt;
int chromakey;
int mode; /* used to switch between TV/VTR modes */
};
struct planb_suspend {
int overlay;
int frame;
struct dbdma_cmd cmd;
};
struct planb {
struct video_device video_dev;
struct video_picture picture; /* Current picture params */
struct video_audio audio_dev; /* Current audio params */
volatile struct planb_registers *planb_base; /* virt base of planb */
struct planb_registers *planb_base_phys; /* phys base of planb */
void *priv_space; /* Org. alloc. mem for kfree */
int user;
unsigned int tab_size;
int maxlines;
int lock;
struct wait_queue *lockq;
unsigned int irq; /* interrupt number */
volatile unsigned int intr_mask;
int overlay; /* overlay running? */
struct planb_window win;
unsigned long frame_buffer_phys; /* We need phys for DMA */
int offset; /* offset of pixel 1 */
volatile struct dbdma_cmd *ch1_cmd; /* Video In DMA cmd buffer */
volatile struct dbdma_cmd *ch2_cmd; /* Clip Out DMA cmd buffer */
volatile struct dbdma_cmd *overlay_last1;
volatile struct dbdma_cmd *overlay_last2;
unsigned long ch1_cmd_phys;
volatile unsigned char *mask; /* Clipmask buffer */
int suspend;
struct wait_queue *suspendq;
struct planb_suspend suspended;
int cmd_buff_inited; /* cmd buffer inited? */
int grabbing;
unsigned int gcount;
struct wait_queue *capq;
int last_fr;
int prev_last_fr;
unsigned char *fbuffer;
unsigned char *gbuffer[MAX_GBUFFERS];
volatile struct dbdma_cmd *cap_cmd[MAX_GBUFFERS];
volatile struct dbdma_cmd *last_cmd[MAX_GBUFFERS];
volatile struct dbdma_cmd *pre_cmd[MAX_GBUFFERS];
int need_pre_capture[MAX_GBUFFERS];
#define PLANB_DUMMY 40 /* # of command buf's allocated for pre-capture seq. */
int gwidth[MAX_GBUFFERS], gheight[MAX_GBUFFERS];
unsigned int gfmt[MAX_GBUFFERS];
int gnorm_switch[MAX_GBUFFERS];
volatile unsigned int *frame_stat;
#define GBUFFER_UNUSED 0x00U
#define GBUFFER_GRABBING 0x01U
#define GBUFFER_DONE 0x02U
#ifdef PLANB_GSCANLINE
int gbytes_per_line;
#else
#define MAX_LNUM 431 /* change this if PLANB_MAXLINES or */
/* PLANB_MAXPIXELS changes */
unsigned char *l_fr_addr[MAX_GBUFFERS];
unsigned char *l_to_addr[MAX_GBUFFERS][MAX_LNUM];
int lsize[MAX_GBUFFERS], lnum[MAX_GBUFFERS];
#endif
};
#endif /* __KERNEL__ */
#endif /* _PLANB_H_ */
/*
Definitions for the Philips SAA7196 digital video decoder,
scaler, and clock generator circuit (DESCpro), as used in
the PlanB video input of the Powermac 7x00/8x00 series.
Copyright (C) 1998 Michel Lanners (mlan@cpu.lu)
The register defines are shamelessly copied from the meteor
driver out of NetBSD (with permission),
and are copyrighted (c) 1995 Mark Tinguely and Jim Lowe
(Thanks !)
Additional debugging and coding by Takashi Oe (toe@unlinfo.unl.edu)
The default values used for PlanB are my mistakes.
*/
/* $Id: saa7196.h,v 1.5 1999/03/26 23:28:47 mlan Exp $ */
#ifndef _SAA7196_H_
#define _SAA7196_H_
#define SAA7196_NUMREGS 0x31 /* Number of registers (used)*/
#define NUM_SUPPORTED_NORM 3 /* Number of supported norms by PlanB */
/* Decoder part: */
#define SAA7196_IDEL 0x00 /* Increment delay */
#define SAA7196_HSB5 0x01 /* H-sync begin; 50 hz */
#define SAA7196_HSS5 0x02 /* H-sync stop; 50 hz */
#define SAA7196_HCB5 0x03 /* H-clamp begin; 50 hz */
#define SAA7196_HCS5 0x04 /* H-clamp stop; 50 hz */
#define SAA7196_HSP5 0x05 /* H-sync after PHI1; 50 hz */
#define SAA7196_LUMC 0x06 /* Luminance control */
#define SAA7196_HUEC 0x07 /* Hue control */
#define SAA7196_CKTQ 0x08 /* Colour Killer Threshold QAM (PAL, NTSC) */
#define SAA7196_CKTS 0x09 /* Colour Killer Threshold SECAM */
#define SAA7196_PALS 0x0a /* PAL switch sensitivity */
#define SAA7196_SECAMS 0x0b /* SECAM switch sensitivity */
#define SAA7196_CGAINC 0x0c /* Chroma gain control */
#define SAA7196_STDC 0x0d /* Standard/Mode control */
#define SAA7196_IOCC 0x0e /* I/O and Clock Control */
#define SAA7196_CTRL1 0x0f /* Control #1 */
#define SAA7196_CTRL2 0x10 /* Control #2 */
#define SAA7196_CGAINR 0x11 /* Chroma Gain Reference */
#define SAA7196_CSAT 0x12 /* Chroma Saturation */
#define SAA7196_CONT 0x13 /* Luminance Contrast */
#define SAA7196_HSB6 0x14 /* H-sync begin; 60 hz */
#define SAA7196_HSS6 0x15 /* H-sync stop; 60 hz */
#define SAA7196_HCB6 0x16 /* H-clamp begin; 60 hz */
#define SAA7196_HCS6 0x17 /* H-clamp stop; 60 hz */
#define SAA7196_HSP6 0x18 /* H-sync after PHI1; 60 hz */
#define SAA7196_BRIG 0x19 /* Luminance Brightness */
/* Scaler part: */
#define SAA7196_FMTS 0x20 /* Formats and sequence */
#define SAA7196_OUTPIX 0x21 /* Output data pixel/line */
#define SAA7196_INPIX 0x22 /* Input data pixel/line */
#define SAA7196_HWS 0x23 /* Horiz. window start */
#define SAA7196_HFILT 0x24 /* Horiz. filter */
#define SAA7196_OUTLINE 0x25 /* Output data lines/field */
#define SAA7196_INLINE 0x26 /* Input data lines/field */
#define SAA7196_VWS 0x27 /* Vertical window start */
#define SAA7196_VYP 0x28 /* AFS/vertical Y processing */
#define SAA7196_VBS 0x29 /* Vertical Bypass start */
#define SAA7196_VBCNT 0x2a /* Vertical Bypass count */
#define SAA7196_VBP 0x2b /* veritcal Bypass Polarity */
#define SAA7196_VLOW 0x2c /* Colour-keying lower V limit */
#define SAA7196_VHIGH 0x2d /* Colour-keying upper V limit */
#define SAA7196_ULOW 0x2e /* Colour-keying lower U limit */
#define SAA7196_UHIGH 0x2f /* Colour-keying upper U limit */
#define SAA7196_DPATH 0x30 /* Data path setting */
/* Initialization default values: */
unsigned char saa_regs[NUM_SUPPORTED_NORM][SAA7196_NUMREGS] = {
/* PAL, 768x576 (no scaling), composite video-in */
/* Decoder: */
{ 0x50, 0x30, 0x00, 0xe8, 0xb6, 0xe5, 0x63, 0xff,
0xfe, 0xf0, 0xfe, 0xe0, 0x20, 0x06, 0x3b, 0x98,
0x00, 0x59, 0x41, 0x45, 0x34, 0x0a, 0xf4, 0xd2,
0xe9, 0xa2,
/* Padding */
0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
/* Scaler: */
0x72, 0x80, 0x00, 0x03, 0x8d, 0x20, 0x20, 0x12,
0xa5, 0x12, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00,
0x87 },
/* NTSC, 640x480? (no scaling), composite video-in */
/* Decoder: */
{ 0x50, 0x30, 0x00, 0xe8, 0xb6, 0xe5, 0x50, 0x00,
0xf8, 0xf0, 0xfe, 0xe0, 0x00, 0x06, 0x3b, 0x98,
0x00, 0x2c, 0x3d, 0x40, 0x34, 0x0a, 0xf4, 0xd2,
0xe9, 0x98,
/* Padding */
0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
/* Scaler: */
0x72, 0x80, 0x80, 0x03, 0x89, 0xf0, 0xf0, 0x0d,
0xa0, 0x0d, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00,
0x87 },
/* SECAM, 768x576 (no scaling), composite video-in */
/* Decoder: */
{ 0x50, 0x30, 0x00, 0xe8, 0xb6, 0xe5, 0x63, 0xff,
0xfe, 0xf0, 0xfe, 0xe0, 0x20, 0x07, 0x3b, 0x98,
0x00, 0x59, 0x41, 0x45, 0x34, 0x0a, 0xf4, 0xd2,
0xe9, 0xa2,
/* Padding */
0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
/* Scaler: */
0x72, 0x80, 0x00, 0x03, 0x8d, 0x20, 0x20, 0x12,
0xa5, 0x12, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00,
0x87 }
};
#endif /* _SAA7196_H_ */
......@@ -40,6 +40,7 @@ static const char *version =
info that the casual reader might think that it documents the i82586 :-<.
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/types.h>
......
......@@ -83,6 +83,7 @@
* practice.
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
......
......@@ -1499,6 +1499,7 @@ static void tr_rx(struct device *dev)
ti->asb + offsetof(struct asb_rec, rec_buf_addr));
lan_hdr_len=readb(ti->arb + offsetof(struct arb_rec_req, lan_hdr_len));
hdr_len = lan_hdr_len + sizeof(struct trllc) + sizeof(struct iphdr);
llc=(rbuffer + offsetof(struct rec_buf, data) + lan_hdr_len);
......@@ -1525,8 +1526,10 @@ static void tr_rx(struct device *dev)
return;
}
length = ntohs(readw(ti->arb+offsetof(struct arb_rec_req, frame_len)));
if ((readb(llc + offsetof(struct trllc, dsap))==EXTENDED_SAP) &&
(readb(llc + offsetof(struct trllc, ssap))==EXTENDED_SAP)) {
(readb(llc + offsetof(struct trllc, ssap))==EXTENDED_SAP) &&
(length>=hdr_len)) {
IPv4_p = 1;
}
......@@ -1557,7 +1560,6 @@ static void tr_rx(struct device *dev)
}
#endif
length = ntohs(readw(ti->arb+offsetof(struct arb_rec_req, frame_len)));
skb_size = length-lan_hdr_len+sizeof(struct trh_hdr)+sizeof(struct trllc);
if (!(skb=dev_alloc_skb(skb_size))) {
......@@ -1577,7 +1579,6 @@ static void tr_rx(struct device *dev)
if (IPv4_p) {
/* Copy the headers without checksumming */
hdr_len = lan_hdr_len + sizeof(struct trllc) + sizeof(struct iphdr);
memcpy_fromio(data, rbufdata, hdr_len);
/* Watch for padded packets and bogons */
......
......@@ -241,6 +241,7 @@ __u16 ppp_crc16_table[256] =
0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
};
EXPORT_SYMBOL(ppp_crc16_table);
#ifdef CHECK_CHARACTERS
static __u32 paritytab[8] =
......
......@@ -881,6 +881,7 @@ static void imm_interrupt(void *data)
{
imm_struct *tmp = (imm_struct *) data;
Scsi_Cmnd *cmd = tmp->cur_cmd;
unsigned long flags;
if (!cmd) {
printk("IMM: bug in imm_interrupt\n");
......@@ -931,8 +932,10 @@ static void imm_interrupt(void *data)
if (cmd->SCp.phase > 0)
imm_pb_release(cmd->host->unique_id);
spin_lock_irqsave(&io_request_lock, flags);
tmp->cur_cmd = 0;
cmd->scsi_done(cmd);
spin_unlock_irqrestore(&io_request_lock, flags);
return;
}
......
......@@ -100,7 +100,6 @@
#define CRLFSTR "\n"
#include <linux/config.h>
#include <linux/version.h>
#ifdef MODULE
......
......@@ -741,6 +741,7 @@ static void ppa_interrupt(void *data)
{
ppa_struct *tmp = (ppa_struct *) data;
Scsi_Cmnd *cmd = tmp->cur_cmd;
unsigned long flags;
if (!cmd) {
printk("PPA: bug in ppa_interrupt\n");
......@@ -792,7 +793,10 @@ static void ppa_interrupt(void *data)
ppa_pb_release(cmd->host->unique_id);
tmp->cur_cmd = 0;
spin_lock_irqsave(&io_request_lock, flags);
cmd->scsi_done(cmd);
spin_unlock_irqrestore(&io_request_lock, flags);
return;
}
......
This diff is collapsed.
......@@ -569,24 +569,29 @@ int usb_get_report(struct usb_device *dev)
int usb_get_configuration(struct usb_device *dev)
{
unsigned int size;
unsigned int cfgno,size;
unsigned char buffer[400];
/* Get the first 8 bytes - guaranteed */
if (usb_get_descriptor(dev, USB_DT_CONFIG, 0, buffer, 8))
return -1;
/* Get the full buffer */
size = *(unsigned short *)(buffer+2);
if (size > sizeof(buffer))
{
printk(KERN_INFO "usb: truncated DT_CONFIG (want %d).\n", size);
size = sizeof(buffer);
unsigned char * bufptr;
bufptr=buffer;
for (cfgno=0;cfgno<dev->descriptor.bNumConfigurations;cfgno++) {
/* Get the first 8 bytes - guaranteed */
if (usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, bufptr, 8))
return -1;
/* Get the full buffer */
size = *(unsigned short *)(bufptr+2);
if (bufptr+size > buffer+sizeof(buffer))
{
printk(KERN_INFO "usb: truncated DT_CONFIG (want %d).\n", size);
size = buffer+sizeof(buffer)-bufptr;
}
if (usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, bufptr, size))
return -1;
/* Prepare for next configuration */
bufptr+=size;
}
if (usb_get_descriptor(dev, USB_DT_CONFIG, 0, buffer, size))
return -1;
return usb_parse_configuration(dev, buffer, size);
}
......
......@@ -72,7 +72,7 @@ static struct file_operations nfs_dir_operations = {
NULL, /* select - default */
NULL, /* ioctl - default */
NULL, /* mmap */
NULL, /* no special open is needed */
nfs_open, /* open - revalidate the inode */
NULL, /* flush */
NULL, /* no special release code */
NULL /* fsync */
......@@ -389,8 +389,11 @@ static int nfs_lookup_revalidate(struct dentry * dentry)
* If we don't have an inode, let's just assume
* a 5-second "live" time for negative dentries.
*/
if (!inode)
goto do_lookup;
if (!inode) {
if (time_after(jiffies, dentry->d_time + NFS_REVALIDATE_INTERVAL))
goto out_bad;
goto out_valid;
}
if (is_bad_inode(inode)) {
dfprintk(VFS, "nfs_lookup_validate: %s/%s has dud inode\n",
......@@ -398,27 +401,17 @@ static int nfs_lookup_revalidate(struct dentry * dentry)
goto out_bad;
}
if (_nfs_revalidate_inode(NFS_DSERVER(dentry), dentry))
goto out_bad;
if (time_before(jiffies,dentry->d_time+NFS_ATTRTIMEO(inode)))
goto out_valid;
if (IS_ROOT(dentry))
goto out_valid;
do_lookup:
/*
* Do a new lookup and check the dentry attributes.
*/
error = nfs_proc_lookup(NFS_DSERVER(parent), NFS_FH(parent),
dentry->d_name.name, &fhandle, &fattr);
if (dentry->d_inode == NULL) {
if (error == -ENOENT &&
time_before(jiffies,dentry->d_time+NFS_REVALIDATE_INTERVAL))
goto out_valid;
goto out_bad;
}
if (error)
goto out_bad;
......
......@@ -46,7 +46,7 @@ static struct file_operations nfs_file_operations = {
NULL, /* select - default */
NULL, /* ioctl - default */
nfs_file_mmap, /* mmap */
NULL, /* no special open is needed */
nfs_open, /* open - revalidate the inode */
nfs_file_flush, /* flush */
NULL, /* release */
nfs_fsync, /* fsync */
......
......@@ -695,6 +695,28 @@ nfs_revalidate(struct dentry *dentry)
return nfs_revalidate_inode(NFS_DSERVER(dentry), dentry);
}
/*
* Revalidate the file on open (this
* is separate from the path-revalidation
* that we do on any lookup).
*
* When we actually open a file, we want
* fairly strict consistency: make sure that
* we've updated the attributes within the
* last second or so..
*/
int nfs_open(struct inode *inode, struct file *filp)
{
int retval = 0;
if (time_after(jiffies, NFS_READTIME(inode) + HZ/2)) {
struct dentry *dentry = filp->f_dentry;
struct nfs_server *server = NFS_DSERVER(dentry);
retval = _nfs_revalidate_inode(server, dentry);
}
return retval;
}
/*
* This function is called whenever some part of NFS notices that
* the cached attributes have to be refreshed.
......
......@@ -190,7 +190,7 @@ extern inline void up(struct semaphore * sem)
" stl_c $28,%1\n"
" beq $28,2f\n"
" mb\n"
" ble $27,3f\n"
" ble $24,3f\n"
"4:\n"
".section .text2,\"ax\"\n"
"2: br 1b\n"
......
......@@ -11,7 +11,6 @@
#ifndef __ASMPPC_IDE_H
#define __ASMPPC_IDE_H
#include <linux/config.h>
#include <linux/sched.h>
#include <asm/processor.h>
......
......@@ -181,6 +181,7 @@ extern struct inode *nfs_fhget(struct dentry *, struct nfs_fh *,
struct nfs_fattr *);
extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *);
extern int nfs_revalidate(struct dentry *);
extern int nfs_open(struct inode *, struct file *);
extern int _nfs_revalidate_inode(struct nfs_server *, struct dentry *);
/*
......
......@@ -95,6 +95,8 @@ struct video_tuner
#define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */
#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */
#define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */
#define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */
#define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */
__u16 mode; /* PAL/NTSC/SECAM/OTHER */
#define VIDEO_MODE_PAL 0
#define VIDEO_MODE_NTSC 1
......
......@@ -12,10 +12,16 @@ Original driver (sg.h):
* Copyright (C) 1998, 1999 Douglas Gilbert
Version: 2.1.31 (990327)
Version: 2.1.32 (990501)
This version for later 2.1.x series and 2.2.x kernels
D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au)
Changes since 2.1.31 (990327)
- add ioctls SG_GET_UNDERRUN_FLAG and _SET_. Change the default
to _not_ flag underruns (affects aic7xxx driver)
- clean up logging of pointers to use %p (for 64 bit architectures)
- rework usage of get_user/copy_to_user family of kernel calls
- "disown" scsi_command blocks before releasing them
Changes since 2.1.30 (990320)
- memory tweaks: change flags on kmalloc (GFP_KERNEL to GFP_ATOMIC)
- increase max allowable mid-level pool usage
......@@ -113,7 +119,7 @@ Original driver (sg.h):
requesting 512KB) and scale them back in the face of ENOMEM errors.
N.B. Queuing up commands also ties up kernel memory.
More documentation can be found at www.netwinder.org/~dougg
More documentation can be found at www.torque.net/sg
*/
#define SG_MAX_SENSE 16 /* too little, unlikely to change in 2.2.x */
......@@ -197,6 +203,11 @@ typedef struct sg_scsi_id {
#define SG_GET_COMMAND_Q 0x2270 /* Yields 0 (queuing off) or 1 (on) */
#define SG_SET_COMMAND_Q 0x2271 /* Change queuing state with 0 or 1 */
/* Get/set whether DMA underrun will cause an error (DID_ERROR) [this only
currently applies to the [much-used] aic7xxx driver) */
#define SG_GET_UNDERRUN_FLAG 0x2280 /* Yields 0 (don't flag) or 1 (flag) */
#define SG_SET_UNDERRUN_FLAG 0x2281 /* Change flag underrun state */
#define SG_DEFAULT_TIMEOUT (60*HZ) /* HZ == 'jiffies in 1 second' */
#define SG_DEFAULT_RETRIES 1
......@@ -206,6 +217,7 @@ typedef struct sg_scsi_id {
#define SG_DEF_MERGE_FD 0 /* was 1 -> per device sequencing */
#define SG_DEF_FORCE_LOW_DMA 0 /* was 1 -> memory below 16MB on i386 */
#define SG_DEF_FORCE_PACK_ID 0
#define SG_DEF_UNDERRUN_FLAG 0
/* maximum outstanding requests, write() yields EDOM if exceeded */
#define SG_MAX_QUEUE 16
......
......@@ -354,7 +354,7 @@ static unsigned long memory_end = 0;
int rows, cols;
#ifdef CONFIG_BLK_DEV_RAM
extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */
extern int rd_doload; /* 1 = load ramdisk, 0 = don't load 2 = dual disk */
extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */
extern int rd_size; /* Size of the ramdisk(s) */
extern int rd_image_start; /* starting block # of image */
......
......@@ -174,6 +174,7 @@ rpc_make_runnable(struct rpc_task *task)
printk(KERN_ERR "RPC: task w/ running timer in rpc_make_runnable!!\n");
return;
}
task->tk_flags |= RPC_TASK_RUNNING;
if (RPC_IS_ASYNC(task)) {
int status;
status = rpc_add_wait_queue(&schedq, task);
......@@ -186,7 +187,6 @@ rpc_make_runnable(struct rpc_task *task)
} else {
wake_up(&task->tk_wait);
}
task->tk_flags |= RPC_TASK_RUNNING;
}
......@@ -447,7 +447,10 @@ __rpc_execute(struct rpc_task *task)
task->tk_pid);
if (current->pid == rpciod_pid)
printk(KERN_ERR "RPC: rpciod waiting on sync task!\n");
sleep_on(&task->tk_wait);
sti();
__wait_event(task->tk_wait, RPC_IS_RUNNING(task));
cli();
/*
* When the task received a signal, remove from
......
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