Commit ef4333ae authored by Linus Torvalds's avatar Linus Torvalds

Merge pcnet32 conflicting updates manually

parents 8e8acb7f 86261eb9
......@@ -93,6 +93,11 @@ write_wakeup() - May be called at any point between open and close.
ldisc must be careful about setting order and to
handle unexpected calls. Must not sleep.
The driver is forbidden from calling this directly
from the ->write call from the ldisc as the ldisc
is permitted to call the driver write method from
this function. In such a situation defer it.
Locking
......
......@@ -174,14 +174,6 @@ static stlport_t stl_dummyport;
*/
static char stl_unwanted[SC26198_RXFIFOSIZE];
/*
* Keep track of what interrupts we have requested for us.
* We don't need to request an interrupt twice if it is being
* shared with another Stallion board.
*/
static int stl_gotintrs[STL_MAXBRDS];
static int stl_numintrs;
/*****************************************************************************/
static stlbrd_t *stl_brds[STL_MAXBRDS];
......@@ -504,7 +496,6 @@ static int stl_readproc(char *page, char **start, off_t off, int count, int *eof
static int stl_brdinit(stlbrd_t *brdp);
static int stl_initports(stlbrd_t *brdp, stlpanel_t *panelp);
static int stl_mapirq(int irq, char *name);
static int stl_getserial(stlport_t *portp, struct serial_struct __user *sp);
static int stl_setserial(stlport_t *portp, struct serial_struct __user *sp);
static int stl_getbrdstats(combrd_t __user *bp);
......@@ -513,11 +504,11 @@ static int stl_clrportstats(stlport_t *portp, comstats_t __user *cp);
static int stl_getportstruct(stlport_t __user *arg);
static int stl_getbrdstruct(stlbrd_t __user *arg);
static int stl_waitcarrier(stlport_t *portp, struct file *filp);
static void stl_eiointr(stlbrd_t *brdp);
static void stl_echatintr(stlbrd_t *brdp);
static void stl_echmcaintr(stlbrd_t *brdp);
static void stl_echpciintr(stlbrd_t *brdp);
static void stl_echpci64intr(stlbrd_t *brdp);
static int stl_eiointr(stlbrd_t *brdp);
static int stl_echatintr(stlbrd_t *brdp);
static int stl_echmcaintr(stlbrd_t *brdp);
static int stl_echpciintr(stlbrd_t *brdp);
static int stl_echpci64intr(stlbrd_t *brdp);
static void stl_offintr(void *private);
static void *stl_memalloc(int len);
static stlbrd_t *stl_allocbrd(void);
......@@ -807,6 +798,9 @@ static void __exit stallion_module_exit(void)
for (i = 0; (i < stl_nrbrds); i++) {
if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL)
continue;
free_irq(brdp->irq, brdp);
for (j = 0; (j < STL_MAXPANELS); j++) {
panelp = brdp->panels[j];
if (panelp == (stlpanel_t *) NULL)
......@@ -832,9 +826,6 @@ static void __exit stallion_module_exit(void)
stl_brds[i] = (stlbrd_t *) NULL;
}
for (i = 0; (i < stl_numintrs); i++)
free_irq(stl_gotintrs[i], NULL);
restore_flags(flags);
}
......@@ -1992,23 +1983,14 @@ static int stl_readproc(char *page, char **start, off_t off, int count, int *eof
static irqreturn_t stl_intr(int irq, void *dev_id, struct pt_regs *regs)
{
stlbrd_t *brdp;
int i;
int handled = 0;
stlbrd_t *brdp = (stlbrd_t *) dev_id;
#ifdef DEBUG
printk("stl_intr(irq=%d,regs=%x)\n", irq, (int) regs);
printk("stl_intr(brdp=%x,irq=%d,regs=%x)\n", (int) brdp, irq,
(int) regs);
#endif
for (i = 0; (i < stl_nrbrds); i++) {
if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL)
continue;
if (brdp->state == 0)
continue;
handled = 1;
(* brdp->isr)(brdp);
}
return IRQ_RETVAL(handled);
return IRQ_RETVAL((* brdp->isr)(brdp));
}
/*****************************************************************************/
......@@ -2017,15 +1999,19 @@ static irqreturn_t stl_intr(int irq, void *dev_id, struct pt_regs *regs)
* Interrupt service routine for EasyIO board types.
*/
static void stl_eiointr(stlbrd_t *brdp)
static int stl_eiointr(stlbrd_t *brdp)
{
stlpanel_t *panelp;
unsigned int iobase;
int handled = 0;
panelp = brdp->panels[0];
iobase = panelp->iobase;
while (inb(brdp->iostatus) & EIO_INTRPEND)
while (inb(brdp->iostatus) & EIO_INTRPEND) {
handled = 1;
(* panelp->isr)(panelp, iobase);
}
return handled;
}
/*****************************************************************************/
......@@ -2034,15 +2020,17 @@ static void stl_eiointr(stlbrd_t *brdp)
* Interrupt service routine for ECH-AT board types.
*/
static void stl_echatintr(stlbrd_t *brdp)
static int stl_echatintr(stlbrd_t *brdp)
{
stlpanel_t *panelp;
unsigned int ioaddr;
int bnknr;
int handled = 0;
outb((brdp->ioctrlval | ECH_BRDENABLE), brdp->ioctrl);
while (inb(brdp->iostatus) & ECH_INTRPEND) {
handled = 1;
for (bnknr = 0; (bnknr < brdp->nrbnks); bnknr++) {
ioaddr = brdp->bnkstataddr[bnknr];
if (inb(ioaddr) & ECH_PNLINTRPEND) {
......@@ -2053,6 +2041,8 @@ static void stl_echatintr(stlbrd_t *brdp)
}
outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl);
return handled;
}
/*****************************************************************************/
......@@ -2061,13 +2051,15 @@ static void stl_echatintr(stlbrd_t *brdp)
* Interrupt service routine for ECH-MCA board types.
*/
static void stl_echmcaintr(stlbrd_t *brdp)
static int stl_echmcaintr(stlbrd_t *brdp)
{
stlpanel_t *panelp;
unsigned int ioaddr;
int bnknr;
int handled = 0;
while (inb(brdp->iostatus) & ECH_INTRPEND) {
handled = 1;
for (bnknr = 0; (bnknr < brdp->nrbnks); bnknr++) {
ioaddr = brdp->bnkstataddr[bnknr];
if (inb(ioaddr) & ECH_PNLINTRPEND) {
......@@ -2076,6 +2068,7 @@ static void stl_echmcaintr(stlbrd_t *brdp)
}
}
}
return handled;
}
/*****************************************************************************/
......@@ -2084,11 +2077,12 @@ static void stl_echmcaintr(stlbrd_t *brdp)
* Interrupt service routine for ECH-PCI board types.
*/
static void stl_echpciintr(stlbrd_t *brdp)
static int stl_echpciintr(stlbrd_t *brdp)
{
stlpanel_t *panelp;
unsigned int ioaddr;
int bnknr, recheck;
int handled = 0;
while (1) {
recheck = 0;
......@@ -2099,11 +2093,13 @@ static void stl_echpciintr(stlbrd_t *brdp)
panelp = brdp->bnk2panel[bnknr];
(* panelp->isr)(panelp, (ioaddr & 0xfffc));
recheck++;
handled = 1;
}
}
if (! recheck)
break;
}
return handled;
}
/*****************************************************************************/
......@@ -2112,13 +2108,15 @@ static void stl_echpciintr(stlbrd_t *brdp)
* Interrupt service routine for ECH-8/64-PCI board types.
*/
static void stl_echpci64intr(stlbrd_t *brdp)
static int stl_echpci64intr(stlbrd_t *brdp)
{
stlpanel_t *panelp;
unsigned int ioaddr;
int bnknr;
int handled = 0;
while (inb(brdp->ioctrl) & 0x1) {
handled = 1;
for (bnknr = 0; (bnknr < brdp->nrbnks); bnknr++) {
ioaddr = brdp->bnkstataddr[bnknr];
if (inb(ioaddr) & ECH_PNLINTRPEND) {
......@@ -2127,6 +2125,8 @@ static void stl_echpci64intr(stlbrd_t *brdp)
}
}
}
return handled;
}
/*****************************************************************************/
......@@ -2173,39 +2173,6 @@ static void stl_offintr(void *private)
/*****************************************************************************/
/*
* Map in interrupt vector to this driver. Check that we don't
* already have this vector mapped, we might be sharing this
* interrupt across multiple boards.
*/
static int __init stl_mapirq(int irq, char *name)
{
int rc, i;
#ifdef DEBUG
printk("stl_mapirq(irq=%d,name=%s)\n", irq, name);
#endif
rc = 0;
for (i = 0; (i < stl_numintrs); i++) {
if (stl_gotintrs[i] == irq)
break;
}
if (i >= stl_numintrs) {
if (request_irq(irq, stl_intr, SA_SHIRQ, name, NULL) != 0) {
printk("STALLION: failed to register interrupt "
"routine for %s irq=%d\n", name, irq);
rc = -ENODEV;
} else {
stl_gotintrs[stl_numintrs++] = irq;
}
}
return(rc);
}
/*****************************************************************************/
/*
* Initialize all the ports on a panel.
*/
......@@ -2389,7 +2356,13 @@ static inline int stl_initeio(stlbrd_t *brdp)
brdp->nrpanels = 1;
brdp->state |= BRD_FOUND;
brdp->hwid = status;
rc = stl_mapirq(brdp->irq, name);
if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) {
printk("STALLION: failed to register interrupt "
"routine for %s irq=%d\n", name, brdp->irq);
rc = -ENODEV;
} else {
rc = 0;
}
return(rc);
}
......@@ -2594,7 +2567,14 @@ static inline int stl_initech(stlbrd_t *brdp)
outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl);
brdp->state |= BRD_FOUND;
i = stl_mapirq(brdp->irq, name);
if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) {
printk("STALLION: failed to register interrupt "
"routine for %s irq=%d\n", name, brdp->irq);
i = -ENODEV;
} else {
i = 0;
}
return(i);
}
......
......@@ -273,8 +273,8 @@ config SCSI_ACARD
tristate "ACARD SCSI support"
depends on PCI && SCSI
help
This driver supports the ACARD 870U/W SCSI host adapter.
This driver supports the ACARD SCSI host adapter.
Support Chip <ATP870 ATP876 ATP880 ATP885>
To compile this driver as a module, choose M here: the
module will be called atp870u.
......
This diff is collapsed.
......@@ -2,50 +2,64 @@
#define _ATP870U_H
#include <linux/types.h>
#include <linux/kdev_t.h>
/* I/O Port */
#define MAX_CDB 12
#define MAX_SENSE 14
#define qcnt 32
#define ATP870U_SCATTER 128
#define ATP870U_CMDLUN 1
struct atp_unit {
unsigned long ioport;
unsigned long pciport;
unsigned char last_cmd;
unsigned char in_snd;
unsigned char in_int;
unsigned char quhdu;
unsigned char quendu;
#define MAX_CDB 12
#define MAX_SENSE 14
#define qcnt 32
#define ATP870U_SCATTER 128
#define ATP870U_CMDLUN 1
#define MAX_ADAPTER 8
#define MAX_SCSI_ID 16
#define ATP870U_MAX_SECTORS 128
#define ATP885_DEVID 0x808A
#define ATP880_DEVID1 0x8080
#define ATP880_DEVID2 0x8081
//#define ED_DBGP
struct atp_unit
{
unsigned long baseport;
unsigned long ioport[2];
unsigned long pciport[2];
unsigned long irq;
unsigned char last_cmd[2];
unsigned char in_snd[2];
unsigned char in_int[2];
unsigned char quhd[2];
unsigned char quend[2];
unsigned char global_map[2];
unsigned char chip_ver;
unsigned char scam_on;
unsigned char global_map;
unsigned char chip_veru;
unsigned char host_idu;
volatile int working;
unsigned short wide_idu;
unsigned short active_idu;
unsigned short ultra_map;
unsigned short async;
unsigned short deviceid;
unsigned char ata_cdbu[16];
unsigned char sp[16];
struct scsi_cmnd *querequ[qcnt];
struct atp_id {
unsigned char dirctu;
unsigned char devspu;
unsigned char devtypeu;
unsigned long prdaddru;
unsigned long tran_lenu;
unsigned long last_lenu;
unsigned char *prd_posu;
unsigned char *prd_tableu;
dma_addr_t prd_phys;
unsigned char host_id[2];
unsigned int working[2];
unsigned short wide_id[2];
unsigned short active_id[2];
unsigned short ultra_map[2];
unsigned short async[2];
unsigned short dev_id;
unsigned char sp[2][16];
unsigned char r1f[2][16];
struct scsi_cmnd *quereq[2][qcnt];
struct atp_id
{
unsigned char dirct;
unsigned char devsp;
unsigned char devtype;
unsigned long tran_len;
unsigned long last_len;
unsigned char *prd_pos;
unsigned char *prd_table;
dma_addr_t prdaddr;
struct scsi_cmnd *curr_req;
} id[16];
struct Scsi_Host *host;
struct pci_dev *pdev;
} id[2][16];
struct Scsi_Host *host;
struct pci_dev *pdev;
unsigned int unit;
};
......
......@@ -175,3 +175,39 @@ config USB_W9968CF
To compile this driver as a module, choose M here: the
module will be called w9968cf.
config USB_PWC
tristate "USB Philips Cameras"
depends on USB && VIDEO_DEV
---help---
Say Y or M here if you want to use one of these Philips & OEM
webcams:
* Philips PCA645, PCA646
* Philips PCVC675, PCVC680, PCVC690
* Philips PCVC720/40, PCVC730, PCVC740, PCVC750
* Askey VC010
* Logitech QuickCam Pro 3000, 4000, 'Zoom', 'Notebook Pro'
and 'Orbit'/'Sphere'
* Samsung MPC-C10, MPC-C30
* Creative Webcam 5, Pro Ex
* SOTEC Afina Eye
* Visionite VCS-UC300, VCS-UM100
The PCA635, PCVC665 and PCVC720/20 are not supported by this driver
and never will be, but the 665 and 720/20 are supported by other
drivers.
See <file:Documentation/usb/philips.txt> for more information and
installation instructions.
The built-in microphone is enabled by selecting USB Audio support.
This driver uses the Video For Linux API. You must say Y or M to
"Video For Linux" (under Character Devices) to use this driver.
Information on this API and pointers to "v4l" programs may be found
at <file:Documentation/video4linux/API.html>.
To compile this driver as a module, choose M here: the
module will be called pwc.
......@@ -14,3 +14,4 @@ obj-$(CONFIG_USB_SN9C102) += sn9c102.o
obj-$(CONFIG_USB_STV680) += stv680.o
obj-$(CONFIG_USB_VICAM) += vicam.o usbvideo.o
obj-$(CONFIG_USB_W9968CF) += w9968cf.o
obj-$(CONFIG_USB_PWC) += pwc/
9.0.2
* Adding #ifdef to compile PWC before and after 2.6.5
9.0.1
9.0
8.12
* Implement motorized pan/tilt feature for Logitech QuickCam Orbit/Spere.
8.11.1
* Fix for PCVC720/40, would not be able to set videomode
* Fix for Samsung MPC models, appearantly they are based on a newer chipset
8.11
* 20 dev_hints (per request)
* Hot unplugging should be better, no more dangling pointers or memory leaks
* Added reserved Logitech webcam IDs
* Device now remembers size & fps between close()/open()
* Removed palette stuff altogether
8.10.1
* Added IDs for PCVC720K/40 and Creative Labs Webcam Pro
8.10
* Fixed ID for QuickCam Notebook pro
* Added GREALSIZE ioctl() call
* Fixed bug in case PWCX was not loaded and invalid size was set
8.9
* Merging with kernel 2.5.49
* Adding IDs for QuickCam Zoom & QuickCam Notebook
8.8
* Fixing 'leds' parameter
* Adding IDs for Logitech QuickCam Pro 4000
* Making URB init/cleanup a little nicer
8.7
* Incorporating changes in ioctl() parameter passing
* Also changes to URB mechanism
8.6
* Added ID's for Visionite VCS UM100 and UC300
* Removed YUV420-interlaced palette altogether (was confusing)
* Removed MIRROR stuff as it didn't work anyway
* Fixed a problem with the 'leds' parameter (wouldn't blink)
* Added ioctl()s for advanced features: 'extended' whitebalance ioctl()s,
CONTOUR, BACKLIGHT, FLICKER, DYNNOISE.
* VIDIOCGCAP.name now contains real camera model name instead of
'Philips xxx webcam'
* Added PROBE ioctl (see previous point & API doc)
8.5
* Adding IDs for Creative Labs Webcam 5
* Adding IDs for SOTEC CMS-001 webcam
* Solving possible hang in VIDIOCSYNC when unplugging the cam
* Forgot to return structure in VIDIOCPWCGAWB, oops
* Time interval for the LEDs are now in milliseconds
8.4
* Fixing power_save option for Vesta range
* Handling new error codes in ISOC callback
* Adding dev_hint module parameter, to specify /dev/videoX device nodes
8.3
* Adding Samsung C10 and C30 cameras
* Removing palette module parameter
* Fixed typo in ID of QuickCam 3000 Pro
* Adding LED settings (blinking while in use) for ToUCam cameras.
* Turns LED off when camera is not in use.
8.2
* Making module more silent when trace = 0
* Adding QuickCam 3000 Pro IDs
* Chrominance control for the Vesta cameras
* Hopefully fixed problems on machines with BIGMEM and > 1GB of RAM
* Included Oliver Neukem's lock_kernel() patch
* Allocates less memory for image buffers
* Adds ioctl()s for the whitebalancing
8.1
* Adding support for 750
* Adding V4L GAUDIO/SAUDIO/UNIT ioctl() calls
8.0
* 'damage control' after inclusion in 2.4.5.
* Changed wait-queue mechanism in read/mmap/poll according to the book.
* Included YUV420P palette.
* Changed interface to decompressor module.
* Cleaned up pwc structure a bit.
7.0
* Fixed bug in vcvt_420i_yuyv; extra variables on stack were misaligned.
* There is now a clear error message when an image size is selected that
is only supported using the decompressor, and the decompressor isn't
loaded.
* When the decompressor wasn't loaded, selecting large image size
would create skewed or double images.
6.3
* Introduced spinlocks for the buffer pointer manipulation; a number of
reports seem to suggest the down()/up() semaphores were the cause of
lockups, since they are not suitable for interrupt/user locking.
* Separated decompressor and core code into 2 modules.
6.2
* Non-integral image sizes are now padded with gray or black.
* Added SHUTTERSPEED ioctl().
* Fixed buglet in VIDIOCPWCSAGC; the function would always return an error,
even though the call succeeded.
* Added hotplug support for 2.4.*.
* Memory: the 645/646 uses less memory now.
6.1
* VIDIOCSPICT returns -EINVAL with invalid palettes.
* Added saturation control.
* Split decompressors from rest.
* Fixed bug that would reset the framerate to the default framerate if
the rate field was set to 0 (which is not what I intended, nl. do not
change the framerate!).
* VIDIOCPWCSCQUAL (setting compression quality) now takes effect immediately.
* Workaround for a bug in the 730 sensor.
ifneq ($(KERNELRELEASE),)
pwc-objs := pwc-if.o pwc-misc.o pwc-ctrl.o pwc-uncompress.o pwc-dec1.o pwc-dec23.o pwc-kiara.o pwc-timon.o
obj-$(CONFIG_USB_PWC) += pwc.o
else
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif
clean:
rm -f *.[oas] .*.flags *.ko .*.cmd .*.d .*.tmp *.mod.c
rm -rf .tmp_versions
This diff is collapsed.
This diff is collapsed.
/* Linux driver for Philips webcam
Decompression for chipset version 1
(C) 2004 Luc Saillard (luc@saillard.org)
NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
driver and thus may have bugs that are not present in the original version.
Please send bug reports and support requests to <luc@saillard.org>.
The decompression routines have been implemented by reverse-engineering the
Nemosoft binary pwcx module. Caveat emptor.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "pwc-dec1.h"
void pwc_dec1_init(int type, int release, void *buffer, void *table)
{
}
void pwc_dec1_exit(void)
{
}
/* Linux driver for Philips webcam
(C) 2004 Luc Saillard (luc@saillard.org)
NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
driver and thus may have bugs that are not present in the original version.
Please send bug reports and support requests to <luc@saillard.org>.
The decompression routines have been implemented by reverse-engineering the
Nemosoft binary pwcx module. Caveat emptor.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef PWC_DEC1_H
#define PWC_DEC1_H
void pwc_dec1_init(int type, int release, void *buffer, void *private_data);
void pwc_dec1_exit(void);
#endif
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.
......@@ -126,7 +126,7 @@ typedef struct stlbrd {
int nrbnks;
int irq;
int irqtype;
void (*isr)(struct stlbrd *brdp);
int (*isr)(struct stlbrd *brdp);
unsigned int ioaddr1;
unsigned int ioaddr2;
unsigned int iosize1;
......
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