Commit edbfecf9 authored by Kumar Gala's avatar Kumar Gala

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

into blarg.somerset.sps.mot.com:/local0/bk/linux-2.5
parents f438e605 c8931e4d
...@@ -77,7 +77,10 @@ curr_min[1-n] Current min or hysteresis value. ...@@ -77,7 +77,10 @@ curr_min[1-n] Current min or hysteresis value.
curr_input[1-n] Current input value curr_input[1-n] Current input value
Fixed point XXXXX, divide by 1000 to get Amps. Fixed point XXXXX, divide by 1000 to get Amps.
Read only. Read only.
eeprom Raw EEPROM data in binary form.
Read only.
fan_min[1-3] Fan minimum value fan_min[1-3] Fan minimum value
Integer value indicating RPM Integer value indicating RPM
Read/Write. Read/Write.
......
...@@ -449,7 +449,8 @@ Module parameters ...@@ -449,7 +449,8 @@ Module parameters
pcm_substreams_c - capture channels (1-8, default=0) pcm_substreams_c - capture channels (1-8, default=0)
clock - clock (0 = auto-detection) clock - clock (0 = auto-detection)
use_pm - support the power-management (0 = off, 1 = on, use_pm - support the power-management (0 = off, 1 = on,
2 = auto) 2 = auto (default))
enable_mpu - enable MPU401 (0 = off, 1 = on, 2 = auto (default))
Module supports up to 8 cards and autoprobe. Module supports up to 8 cards and autoprobe.
...@@ -992,7 +993,7 @@ Module parameters ...@@ -992,7 +993,7 @@ Module parameters
[VIA686A/686B only] [VIA686A/686B only]
ac97_clock - AC'97 codec clock base (default 48000Hz) ac97_clock - AC'97 codec clock base (default 48000Hz)
dxs_support - support DXS channels, dxs_support - support DXS channels,
0 = auto (default), 1 = enable, 2 = disable, 0 = auto (defalut), 1 = enable, 2 = disable,
3 = 48k only 3 = 48k only
[VIA8233/C,8235 only] [VIA8233/C,8235 only]
...@@ -1005,13 +1006,15 @@ Module parameters ...@@ -1005,13 +1006,15 @@ Module parameters
assigned under 15. You might also upgrade your BIOS. assigned under 15. You might also upgrade your BIOS.
Note: VIA8233/5 (not VIA8233A) can support DXS (direct sound) Note: VIA8233/5 (not VIA8233A) can support DXS (direct sound)
channels as the first PCM. With this device, up to 4 channels as the first PCM. On these channels, up to 4
streams can be played at the same time. On some motherboards, streams can be played at the same time.
these channels don't work properly due to the bug of BIOS. As default (dxs_support = 0), 48k fixed rate is chosen since
If you experience that the playback on this PCM is noisy, the output is often noisy except for 48k on some mother
try to specify dxs_support option to 2 or 3. In most cases boards due to the bug of BIOS.
dxs_support=3 would suffice, so you can keep the multi-play Please try once dxs_support=1 and if it works on other
capability. sample rates, please let us know the PCI subsystem
vendor/device id's (output of "lspci -nv").
If it doesn't work, use dxs_support=3 or dxs_support=2.
Note: for the MPU401 on VIA823x, use snd-mpu401 driver Note: for the MPU401 on VIA823x, use snd-mpu401 driver
additonally. The mpu_port option is for VIA686 chips only. additonally. The mpu_port option is for VIA686 chips only.
......
...@@ -152,6 +152,9 @@ available: ...@@ -152,6 +152,9 @@ available:
direct don't use plugins direct don't use plugins
block force block open mode block force block open mode
non-block force non-block open mode non-block force non-block open mode
whole-frag write only whole fragments (optimization affecting
playback only)
no-silence do not fill silence ahead to avoid clicks
The disable option is useful when one stream direction (playback or The disable option is useful when one stream direction (playback or
capture) is not handled correctly by the application although the capture) is not handled correctly by the application although the
...@@ -185,6 +188,12 @@ for OSS devices, define like the following: ...@@ -185,6 +188,12 @@ for OSS devices, define like the following:
options snd-pcm-oss nonblock_open=1 options snd-pcm-oss nonblock_open=1
The whole-frag and no-silence commands have been added recently.
Both commands are for optimization use only. The former command
specifies to invoke the write transfer only when the whole fragment is
filled. The latter stops writing the silence data ahead
automatically. Both are disabled as default.
You can check the currently defined configuration by reading the proc You can check the currently defined configuration by reading the proc
file. The read image can be sent to the proc file again, hence you file. The read image can be sent to the proc file again, hence you
can save the current configuration can save the current configuration
......
...@@ -376,6 +376,11 @@ void blk_queue_hardsect_size(request_queue_t *q, unsigned short size) ...@@ -376,6 +376,11 @@ void blk_queue_hardsect_size(request_queue_t *q, unsigned short size)
q->hardsect_size = size; q->hardsect_size = size;
} }
/*
* Returns the minimum that is _not_ zero, unless both are zero.
*/
#define min_not_zero(l, r) (l == 0) ? r : ((r == 0) ? l : min(l, r))
/** /**
* blk_queue_stack_limits - inherit underlying queue limits for stacked drivers * blk_queue_stack_limits - inherit underlying queue limits for stacked drivers
* @t: the stacking driver (top) * @t: the stacking driver (top)
...@@ -383,7 +388,9 @@ void blk_queue_hardsect_size(request_queue_t *q, unsigned short size) ...@@ -383,7 +388,9 @@ void blk_queue_hardsect_size(request_queue_t *q, unsigned short size)
**/ **/
void blk_queue_stack_limits(request_queue_t *t, request_queue_t *b) void blk_queue_stack_limits(request_queue_t *t, request_queue_t *b)
{ {
t->max_sectors = min(t->max_sectors,b->max_sectors); /* zero is "infinity" */
t->max_sectors = min_not_zero(t->max_sectors,b->max_sectors);
t->max_phys_segments = min(t->max_phys_segments,b->max_phys_segments); t->max_phys_segments = min(t->max_phys_segments,b->max_phys_segments);
t->max_hw_segments = min(t->max_hw_segments,b->max_hw_segments); t->max_hw_segments = min(t->max_hw_segments,b->max_hw_segments);
t->max_segment_size = min(t->max_segment_size,b->max_segment_size); t->max_segment_size = min(t->max_segment_size,b->max_segment_size);
......
...@@ -75,9 +75,9 @@ config DRM_MGA ...@@ -75,9 +75,9 @@ config DRM_MGA
config DRM_SIS config DRM_SIS
tristate "SiS video cards" tristate "SiS video cards"
depends on DRM && AGP && FB_SIS depends on DRM && AGP
help help
Choose this option if you have a SiS 630 or compatibel video Choose this option if you have a SiS 630 or compatibel video
chipset. If M is selected the module will be called sis. AGP chipset. If M is selected the module will be called sis. AGP
and SiS FB support is required for this driver to work. support is required for this driver to work.
...@@ -551,7 +551,7 @@ typedef struct drm_device_dma { ...@@ -551,7 +551,7 @@ typedef struct drm_device_dma {
*/ */
typedef struct drm_agp_mem { typedef struct drm_agp_mem {
unsigned long handle; /**< handle */ unsigned long handle; /**< handle */
struct agp_memory *memory; DRM_AGP_MEM *memory;
unsigned long bound; /**< address */ unsigned long bound; /**< address */
int pages; int pages;
struct drm_agp_mem *prev; /**< previous entry */ struct drm_agp_mem *prev; /**< previous entry */
...@@ -564,7 +564,7 @@ typedef struct drm_agp_mem { ...@@ -564,7 +564,7 @@ typedef struct drm_agp_mem {
* \sa DRM(agp_init)() and drm_device::agp. * \sa DRM(agp_init)() and drm_device::agp.
*/ */
typedef struct drm_agp_head { typedef struct drm_agp_head {
struct agp_kern_info agp_info; /**< AGP device information */ DRM_AGP_KERN agp_info; /**< AGP device information */
drm_agp_mem_t *memory; /**< memory entries */ drm_agp_mem_t *memory; /**< memory entries */
unsigned long mode; /**< AGP mode */ unsigned long mode; /**< AGP mode */
int enabled; /**< whether the AGP bus as been enabled */ int enabled; /**< whether the AGP bus as been enabled */
...@@ -797,10 +797,10 @@ extern void *DRM(ioremap_nocache)(unsigned long offset, unsigned long size, ...@@ -797,10 +797,10 @@ extern void *DRM(ioremap_nocache)(unsigned long offset, unsigned long size,
extern void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev); extern void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev);
#if __REALLY_HAVE_AGP #if __REALLY_HAVE_AGP
extern struct agp_memory *DRM(alloc_agp)(int pages, u32 type); extern DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type);
extern int DRM(free_agp)(struct agp_memory *handle, int pages); extern int DRM(free_agp)(DRM_AGP_MEM *handle, int pages);
extern int DRM(bind_agp)(struct agp_memory *handle, unsigned int start); extern int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start);
extern int DRM(unbind_agp)(struct agp_memory *handle); extern int DRM(unbind_agp)(DRM_AGP_MEM *handle);
#endif #endif
/* Misc. IOCTL support (drm_ioctl.h) */ /* Misc. IOCTL support (drm_ioctl.h) */
...@@ -905,8 +905,7 @@ extern int DRM(control)( struct inode *inode, struct file *filp, ...@@ -905,8 +905,7 @@ extern int DRM(control)( struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg ); unsigned int cmd, unsigned long arg );
extern int DRM(irq_install)( drm_device_t *dev, int irq ); extern int DRM(irq_install)( drm_device_t *dev, int irq );
extern int DRM(irq_uninstall)( drm_device_t *dev ); extern int DRM(irq_uninstall)( drm_device_t *dev );
extern irqreturn_t DRM(dma_service)( int irq, void *device, extern irqreturn_t DRM(dma_service)( DRM_IRQ_ARGS );
struct pt_regs *regs );
extern void DRM(driver_irq_preinstall)( drm_device_t *dev ); extern void DRM(driver_irq_preinstall)( drm_device_t *dev );
extern void DRM(driver_irq_postinstall)( drm_device_t *dev ); extern void DRM(driver_irq_postinstall)( drm_device_t *dev );
extern void DRM(driver_irq_uninstall)( drm_device_t *dev ); extern void DRM(driver_irq_uninstall)( drm_device_t *dev );
...@@ -944,10 +943,10 @@ extern int DRM(agp_unbind)(struct inode *inode, struct file *filp, ...@@ -944,10 +943,10 @@ extern int DRM(agp_unbind)(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int DRM(agp_bind)(struct inode *inode, struct file *filp, extern int DRM(agp_bind)(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern struct agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type); extern DRM_AGP_MEM *DRM(agp_allocate_memory)(size_t pages, u32 type);
extern int DRM(agp_free_memory)(struct agp_memory *handle); extern int DRM(agp_free_memory)(DRM_AGP_MEM *handle);
extern int DRM(agp_bind_memory)(struct agp_memory *handle, off_t start); extern int DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start);
extern int DRM(agp_unbind_memory)(struct agp_memory *handle); extern int DRM(agp_unbind_memory)(DRM_AGP_MEM *handle);
#endif #endif
/* Stub support (drm_stub.h) */ /* Stub support (drm_stub.h) */
......
...@@ -62,7 +62,7 @@ int DRM(agp_info)(struct inode *inode, struct file *filp, ...@@ -62,7 +62,7 @@ int DRM(agp_info)(struct inode *inode, struct file *filp,
{ {
drm_file_t *priv = filp->private_data; drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev; drm_device_t *dev = priv->dev;
struct agp_kern_info *kern; DRM_AGP_KERN *kern;
drm_agp_info_t info; drm_agp_info_t info;
if (!dev->agp || !dev->agp->acquired || !drm_agp->copy_info) if (!dev->agp || !dev->agp->acquired || !drm_agp->copy_info)
...@@ -198,7 +198,7 @@ int DRM(agp_alloc)(struct inode *inode, struct file *filp, ...@@ -198,7 +198,7 @@ int DRM(agp_alloc)(struct inode *inode, struct file *filp,
drm_device_t *dev = priv->dev; drm_device_t *dev = priv->dev;
drm_agp_buffer_t request; drm_agp_buffer_t request;
drm_agp_mem_t *entry; drm_agp_mem_t *entry;
struct agp_memory *memory; DRM_AGP_MEM *memory;
unsigned long pages; unsigned long pages;
u32 type; u32 type;
...@@ -429,7 +429,7 @@ void DRM(agp_uninit)(void) ...@@ -429,7 +429,7 @@ void DRM(agp_uninit)(void)
} }
/** Calls drm_agp->allocate_memory() */ /** Calls drm_agp->allocate_memory() */
struct agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type) DRM_AGP_MEM *DRM(agp_allocate_memory)(size_t pages, u32 type)
{ {
if (!drm_agp->allocate_memory) if (!drm_agp->allocate_memory)
return NULL; return NULL;
...@@ -437,7 +437,7 @@ struct agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type) ...@@ -437,7 +437,7 @@ struct agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type)
} }
/** Calls drm_agp->free_memory() */ /** Calls drm_agp->free_memory() */
int DRM(agp_free_memory)(struct agp_memory *handle) int DRM(agp_free_memory)(DRM_AGP_MEM *handle)
{ {
if (!handle || !drm_agp->free_memory) if (!handle || !drm_agp->free_memory)
return 0; return 0;
...@@ -446,7 +446,7 @@ int DRM(agp_free_memory)(struct agp_memory *handle) ...@@ -446,7 +446,7 @@ int DRM(agp_free_memory)(struct agp_memory *handle)
} }
/** Calls drm_agp->bind_memory() */ /** Calls drm_agp->bind_memory() */
int DRM(agp_bind_memory)(struct agp_memory *handle, off_t start) int DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start)
{ {
if (!handle || !drm_agp->bind_memory) if (!handle || !drm_agp->bind_memory)
return -EINVAL; return -EINVAL;
...@@ -454,7 +454,7 @@ int DRM(agp_bind_memory)(struct agp_memory *handle, off_t start) ...@@ -454,7 +454,7 @@ int DRM(agp_bind_memory)(struct agp_memory *handle, off_t start)
} }
/** Calls drm_agp->unbind_memory() */ /** Calls drm_agp->unbind_memory() */
int DRM(agp_unbind_memory)(struct agp_memory *handle) int DRM(agp_unbind_memory)(DRM_AGP_MEM *handle)
{ {
if (!handle || !drm_agp->unbind_memory) if (!handle || !drm_agp->unbind_memory)
return -EINVAL; return -EINVAL;
......
...@@ -333,25 +333,25 @@ void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev) ...@@ -333,25 +333,25 @@ void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev)
#if __REALLY_HAVE_AGP #if __REALLY_HAVE_AGP
/** Wrapper around agp_allocate_memory() */ /** Wrapper around agp_allocate_memory() */
struct agp_memory *DRM(alloc_agp)(int pages, u32 type) DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type)
{ {
return DRM(agp_allocate_memory)(pages, type); return DRM(agp_allocate_memory)(pages, type);
} }
/** Wrapper around agp_free_memory() */ /** Wrapper around agp_free_memory() */
int DRM(free_agp)(struct agp_memory *handle, int pages) int DRM(free_agp)(DRM_AGP_MEM *handle, int pages)
{ {
return DRM(agp_free_memory)(handle) ? 0 : -EINVAL; return DRM(agp_free_memory)(handle) ? 0 : -EINVAL;
} }
/** Wrapper around agp_bind_memory() */ /** Wrapper around agp_bind_memory() */
int DRM(bind_agp)(struct agp_memory *handle, unsigned int start) int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start)
{ {
return DRM(agp_bind_memory)(handle, start); return DRM(agp_bind_memory)(handle, start);
} }
/** Wrapper around agp_unbind_memory() */ /** Wrapper around agp_unbind_memory() */
int DRM(unbind_agp)(struct agp_memory *handle) int DRM(unbind_agp)(DRM_AGP_MEM *handle)
{ {
return DRM(agp_unbind_memory)(handle); return DRM(agp_unbind_memory)(handle);
} }
......
...@@ -353,9 +353,9 @@ void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev) ...@@ -353,9 +353,9 @@ void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev)
#if __REALLY_HAVE_AGP #if __REALLY_HAVE_AGP
agp_memory *DRM(alloc_agp)(int pages, u32 type) DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type)
{ {
agp_memory *handle; DRM_AGP_MEM *handle;
if (!pages) { if (!pages) {
DRM_MEM_ERROR(DRM_MEM_TOTALAGP, "Allocating 0 pages\n"); DRM_MEM_ERROR(DRM_MEM_TOTALAGP, "Allocating 0 pages\n");
...@@ -376,7 +376,7 @@ agp_memory *DRM(alloc_agp)(int pages, u32 type) ...@@ -376,7 +376,7 @@ agp_memory *DRM(alloc_agp)(int pages, u32 type)
return NULL; return NULL;
} }
int DRM(free_agp)(agp_memory *handle, int pages) int DRM(free_agp)(DRM_AGP_MEM *handle, int pages)
{ {
int alloc_count; int alloc_count;
int free_count; int free_count;
...@@ -405,7 +405,7 @@ int DRM(free_agp)(agp_memory *handle, int pages) ...@@ -405,7 +405,7 @@ int DRM(free_agp)(agp_memory *handle, int pages)
return retval; return retval;
} }
int DRM(bind_agp)(agp_memory *handle, unsigned int start) int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start)
{ {
int retcode = -EINVAL; int retcode = -EINVAL;
...@@ -429,7 +429,7 @@ int DRM(bind_agp)(agp_memory *handle, unsigned int start) ...@@ -429,7 +429,7 @@ int DRM(bind_agp)(agp_memory *handle, unsigned int start)
return retcode; return retcode;
} }
int DRM(unbind_agp)(agp_memory *handle) int DRM(unbind_agp)(DRM_AGP_MEM *handle)
{ {
int alloc_count; int alloc_count;
int free_count; int free_count;
......
...@@ -32,9 +32,14 @@ ...@@ -32,9 +32,14 @@
/** DRM device local declaration */ /** DRM device local declaration */
#define DRM_DEVICE drm_file_t *priv = filp->private_data; \ #define DRM_DEVICE drm_file_t *priv = filp->private_data; \
drm_device_t *dev = priv->dev drm_device_t *dev = priv->dev
/** IRQ handler arguments */ /** IRQ handler arguments and return type and values */
#define DRM_IRQ_ARGS int irq, void *arg, struct pt_regs *regs #define DRM_IRQ_ARGS int irq, void *arg, struct pt_regs *regs
/** AGP types */
#define DRM_AGP_MEM struct agp_memory
#define DRM_AGP_KERN struct agp_kern_info
/** Task queue handler arguments */ /** Task queue handler arguments */
#define DRM_TASKQUEUE_ARGS void *arg #define DRM_TASKQUEUE_ARGS void *arg
......
...@@ -116,13 +116,14 @@ static inline int gamma_dma_is_ready(drm_device_t *dev) ...@@ -116,13 +116,14 @@ static inline int gamma_dma_is_ready(drm_device_t *dev)
return (!GAMMA_READ(GAMMA_DMACOUNT)); return (!GAMMA_READ(GAMMA_DMACOUNT));
} }
irqreturn_t gamma_dma_service(int irq, void *device, struct pt_regs *regs) irqreturn_t gamma_dma_service( DRM_IRQ_ARGS )
{ {
drm_device_t *dev = (drm_device_t *)device; drm_device_t *dev = (drm_device_t *)arg;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_gamma_private_t *dev_priv = drm_gamma_private_t *dev_priv =
(drm_gamma_private_t *)dev->dev_private; (drm_gamma_private_t *)dev->dev_private;
/* FIXME: should check whether we're actually interested in the interrupt? */
atomic_inc(&dev->counts[6]); /* _DRM_STAT_IRQ */ atomic_inc(&dev->counts[6]); /* _DRM_STAT_IRQ */
while (GAMMA_READ(GAMMA_INFIFOSPACE) < 3) while (GAMMA_READ(GAMMA_INFIFOSPACE) < 3)
...@@ -141,7 +142,7 @@ irqreturn_t gamma_dma_service(int irq, void *device, struct pt_regs *regs) ...@@ -141,7 +142,7 @@ irqreturn_t gamma_dma_service(int irq, void *device, struct pt_regs *regs)
} }
clear_bit(0, &dev->dma_flag); clear_bit(0, &dev->dma_flag);
/* Dispatch new buffer */ /* Dispatch new buffer */
schedule_work(&dev->work); schedule_work(&dev->work);
} }
return IRQ_HANDLED; return IRQ_HANDLED;
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
#include <linux/delay.h> #include <linux/delay.h>
irqreturn_t DRM(dma_service)(int irq, void *device, struct pt_regs *regs) irqreturn_t DRM(dma_service)( DRM_IRQ_ARGS )
{ {
drm_device_t *dev = (drm_device_t *)device; drm_device_t *dev = (drm_device_t *)arg;
drm_i830_private_t *dev_priv = (drm_i830_private_t *)dev->dev_private; drm_i830_private_t *dev_priv = (drm_i830_private_t *)dev->dev_private;
u16 temp; u16 temp;
......
...@@ -33,7 +33,11 @@ ...@@ -33,7 +33,11 @@
* Name it sisdrv_##x as there's a conflict with sis_free/malloc in the kernel * Name it sisdrv_##x as there's a conflict with sis_free/malloc in the kernel
* that's used for fb devices * that's used for fb devices
*/ */
#ifdef __linux__
#define DRM(x) sisdrv_##x #define DRM(x) sisdrv_##x
#else
#define DRM(x) sis_##x
#endif
/* General customization: /* General customization:
*/ */
...@@ -42,28 +46,21 @@ ...@@ -42,28 +46,21 @@
#define __HAVE_MTRR 1 #define __HAVE_MTRR 1
#define __HAVE_CTX_BITMAP 1 #define __HAVE_CTX_BITMAP 1
#define DRIVER_AUTHOR "SIS" #define DRIVER_AUTHOR "SIS"
#define DRIVER_NAME "sis" #define DRIVER_NAME "sis"
#define DRIVER_DESC "SIS 300/630/540" #define DRIVER_DESC "SIS 300/630/540"
#define DRIVER_DATE "20010503" #define DRIVER_DATE "20030826"
#define DRIVER_MAJOR 1 #define DRIVER_MAJOR 1
#define DRIVER_MINOR 0 #define DRIVER_MINOR 1
#define DRIVER_PATCHLEVEL 0 #define DRIVER_PATCHLEVEL 0
#define DRIVER_IOCTLS \ #define DRIVER_IOCTLS \
[DRM_IOCTL_NR(SIS_IOCTL_FB_ALLOC)] = { sis_fb_alloc, 1, 0 }, \ [DRM_IOCTL_NR(DRM_IOCTL_SIS_FB_ALLOC)] = { sis_fb_alloc, 1, 0 }, \
[DRM_IOCTL_NR(SIS_IOCTL_FB_FREE)] = { sis_fb_free, 1, 0 }, \ [DRM_IOCTL_NR(DRM_IOCTL_SIS_FB_FREE)] = { sis_fb_free, 1, 0 }, \
/* AGP Memory Management */ \ [DRM_IOCTL_NR(DRM_IOCTL_SIS_AGP_INIT)] = { sis_ioctl_agp_init, 1, 1 }, \
[DRM_IOCTL_NR(SIS_IOCTL_AGP_INIT)] = { sisp_agp_init, 1, 0 }, \ [DRM_IOCTL_NR(DRM_IOCTL_SIS_AGP_ALLOC)] = { sis_ioctl_agp_alloc, 1, 0 }, \
[DRM_IOCTL_NR(SIS_IOCTL_AGP_ALLOC)] = { sisp_agp_alloc, 1, 0 }, \ [DRM_IOCTL_NR(DRM_IOCTL_SIS_AGP_FREE)] = { sis_ioctl_agp_free, 1, 0 }, \
[DRM_IOCTL_NR(SIS_IOCTL_AGP_FREE)] = { sisp_agp_free, 1, 0 } [DRM_IOCTL_NR(DRM_IOCTL_SIS_FB_INIT)] = { sis_fb_init, 1, 1 }
#if 0 /* these don't appear to be defined */
/* SIS Stereo */
[DRM_IOCTL_NR(DRM_IOCTL_CONTROL)] = { sis_control, 1, 1 },
[DRM_IOCTL_NR(SIS_IOCTL_FLIP)] = { sis_flip, 1, 1 },
[DRM_IOCTL_NR(SIS_IOCTL_FLIP_INIT)] = { sis_flip_init, 1, 1 },
[DRM_IOCTL_NR(SIS_IOCTL_FLIP_FINAL)] = { sis_flip_final, 1, 1 }
#endif
#define __HAVE_COUNTERS 5 #define __HAVE_COUNTERS 5
......
#ifndef _sis_drm_public_h_ #ifndef __SIS_DRM_H__
#define _sis_drm_public_h_ #define __SIS_DRM_H__
/* SiS specific ioctls */ /* SiS specific ioctls */
#define SIS_IOCTL_FB_ALLOC DRM_IOWR(0x44, drm_sis_mem_t) #define DRM_IOCTL_SIS_FB_ALLOC DRM_IOWR(0x44, drm_sis_mem_t)
#define SIS_IOCTL_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t) #define DRM_IOCTL_SIS_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t)
#define SIS_IOCTL_AGP_INIT DRM_IOWR(0x53, drm_sis_agp_t) #define DRM_IOCTL_SIS_AGP_INIT DRM_IOWR(0x53, drm_sis_agp_t)
#define SIS_IOCTL_AGP_ALLOC DRM_IOWR(0x54, drm_sis_mem_t) #define DRM_IOCTL_SIS_AGP_ALLOC DRM_IOWR(0x54, drm_sis_mem_t)
#define SIS_IOCTL_AGP_FREE DRM_IOW( 0x55, drm_sis_mem_t) #define DRM_IOCTL_SIS_AGP_FREE DRM_IOW( 0x55, drm_sis_mem_t)
#define SIS_IOCTL_FLIP DRM_IOW( 0x48, drm_sis_flip_t) #define DRM_IOCTL_SIS_FB_INIT DRM_IOW( 0x56, drm_sis_fb_t)
#define SIS_IOCTL_FLIP_INIT DRM_IO( 0x49) /*
#define SIS_IOCTL_FLIP_FINAL DRM_IO( 0x50) #define DRM_IOCTL_SIS_FLIP DRM_IOW( 0x48, drm_sis_flip_t)
#define DRM_IOCTL_SIS_FLIP_INIT DRM_IO( 0x49)
#define DRM_IOCTL_SIS_FLIP_FINAL DRM_IO( 0x50)
*/
typedef struct { typedef struct {
int context; int context;
unsigned int offset; unsigned int offset;
unsigned int size; unsigned int size;
unsigned int free; unsigned long free;
} drm_sis_mem_t; } drm_sis_mem_t;
typedef struct { typedef struct {
unsigned int offset, size; unsigned int offset, size;
} drm_sis_agp_t; } drm_sis_agp_t;
typedef struct { typedef struct {
unsigned int left, right; unsigned int offset, size;
} drm_sis_flip_t; } drm_sis_fb_t;
#ifdef __KERNEL__ #endif /* __SIS_DRM_H__ */
int sis_fb_alloc(struct inode *inode, struct file *filp, unsigned int cmd,
unsigned long arg);
int sis_fb_free(struct inode *inode, struct file *filp, unsigned int cmd,
unsigned long arg);
int sisp_agp_init(struct inode *inode, struct file *filp, unsigned int cmd,
unsigned long arg);
int sisp_agp_alloc(struct inode *inode, struct file *filp, unsigned int cmd,
unsigned long arg);
int sisp_agp_free(struct inode *inode, struct file *filp, unsigned int cmd,
unsigned long arg);
#endif
#endif
...@@ -28,18 +28,20 @@ ...@@ -28,18 +28,20 @@
#ifndef _SIS_DRV_H_ #ifndef _SIS_DRV_H_
#define _SIS_DRV_H_ #define _SIS_DRV_H_
#include "sis_ds.h"
typedef struct drm_sis_private { typedef struct drm_sis_private {
drm_map_t *buffers; drm_map_t *buffers;
} drm_sis_private_t;
/* Stereo ? - this was never committed */ memHeap_t *AGPHeap;
memHeap_t *FBHeap;
} drm_sis_private_t;
int sis_flip(struct inode *inode, struct file *filp, unsigned int cmd, extern int sis_fb_alloc( DRM_IOCTL_ARGS );
unsigned long arg); extern int sis_fb_free( DRM_IOCTL_ARGS );
int sis_flip_init(struct inode *inode, struct file *filp, unsigned int cmd, extern int sis_ioctl_agp_init( DRM_IOCTL_ARGS );
unsigned long arg); extern int sis_ioctl_agp_alloc( DRM_IOCTL_ARGS );
int sis_flip_final(struct inode *inode, struct file *filp, unsigned int cmd, extern int sis_ioctl_agp_free( DRM_IOCTL_ARGS );
unsigned long arg); extern int sis_fb_init( DRM_IOCTL_ARGS );
void flip_final(void);
#endif #endif
This diff is collapsed.
...@@ -28,27 +28,25 @@ ...@@ -28,27 +28,25 @@
* *
*/ */
#ifndef _sis_ds_h_ #ifndef __SIS_DS_H__
#define _sis_ds_h_ #define __SIS_DS_H__
/* Set Data Structure */ /* Set Data Structure */
#define SET_SIZE 5000 #define SET_SIZE 5000
#define MALLOC(s) kmalloc(s, GFP_KERNEL)
#define FREE(s) kfree(s)
typedef unsigned int ITEM_TYPE; typedef unsigned int ITEM_TYPE;
typedef struct { typedef struct {
ITEM_TYPE val; ITEM_TYPE val;
int alloc_next, free_next; int alloc_next, free_next;
} list_item_t; } list_item_t;
typedef struct { typedef struct {
int alloc; int alloc;
int free; int free;
int trace; int trace;
list_item_t list[SET_SIZE]; list_item_t list[SET_SIZE];
} set_t; } set_t;
set_t *setInit(void); set_t *setInit(void);
...@@ -58,8 +56,6 @@ int setFirst(set_t *set, ITEM_TYPE *item); ...@@ -58,8 +56,6 @@ int setFirst(set_t *set, ITEM_TYPE *item);
int setNext(set_t *set, ITEM_TYPE *item); int setNext(set_t *set, ITEM_TYPE *item);
int setDestroy(set_t *set); int setDestroy(set_t *set);
#endif
/* /*
* GLX Hardware Device Driver common code * GLX Hardware Device Driver common code
* Copyright (C) 1999 Keith Whitwell * Copyright (C) 1999 Keith Whitwell
...@@ -84,16 +80,13 @@ int setDestroy(set_t *set); ...@@ -84,16 +80,13 @@ int setDestroy(set_t *set);
* *
*/ */
#ifndef MM_INC
#define MM_INC
struct mem_block_t { struct mem_block_t {
struct mem_block_t *next; struct mem_block_t *next;
struct mem_block_t *heap; struct mem_block_t *heap;
int ofs,size; int ofs,size;
int align; int align;
int free:1; int free:1;
int reserved:1; int reserved:1;
}; };
typedef struct mem_block_t TMemBlock; typedef struct mem_block_t TMemBlock;
typedef struct mem_block_t *PMemBlock; typedef struct mem_block_t *PMemBlock;
...@@ -102,13 +95,19 @@ typedef struct mem_block_t *PMemBlock; ...@@ -102,13 +95,19 @@ typedef struct mem_block_t *PMemBlock;
typedef struct mem_block_t memHeap_t; typedef struct mem_block_t memHeap_t;
static __inline__ int mmBlockSize(PMemBlock b) static __inline__ int mmBlockSize(PMemBlock b)
{ return b->size; } {
return b->size;
}
static __inline__ int mmOffset(PMemBlock b) static __inline__ int mmOffset(PMemBlock b)
{ return b->ofs; } {
return b->ofs;
}
static __inline__ void mmMarkReserved(PMemBlock b) static __inline__ void mmMarkReserved(PMemBlock b)
{ b->reserved = 1; } {
b->reserved = 1;
}
/* /*
* input: total size in bytes * input: total size in bytes
...@@ -116,13 +115,10 @@ static __inline__ void mmMarkReserved(PMemBlock b) ...@@ -116,13 +115,10 @@ static __inline__ void mmMarkReserved(PMemBlock b)
*/ */
memHeap_t *mmInit( int ofs, int size ); memHeap_t *mmInit( int ofs, int size );
memHeap_t *mmAddRange( memHeap_t *heap, memHeap_t *mmAddRange( memHeap_t *heap,
int ofs, int ofs,
int size ); int size );
/* /*
* Allocate 'size' bytes with 2^align2 bytes alignment, * Allocate 'size' bytes with 2^align2 bytes alignment,
* restrict the search to free memory after 'startSearch' * restrict the search to free memory after 'startSearch'
...@@ -133,14 +129,19 @@ memHeap_t *mmAddRange( memHeap_t *heap, ...@@ -133,14 +129,19 @@ memHeap_t *mmAddRange( memHeap_t *heap,
* startSearch = linear offset from start of heap to begin search * startSearch = linear offset from start of heap to begin search
* return: pointer to the allocated block, 0 if error * return: pointer to the allocated block, 0 if error
*/ */
PMemBlock mmAllocMem( memHeap_t *heap, int size, int align2, int startSearch ); PMemBlock mmAllocMem( memHeap_t *heap, int size, int align2, int startSearch );
/*
* Returns 1 if the block 'b' is part of the heap 'heap'
*/
int mmBlockInHeap( PMemBlock heap, PMemBlock b );
/* /*
* Free block starts at offset * Free block starts at offset
* input: pointer to a block * input: pointer to a block
* return: 0 if OK, -1 if error * return: 0 if OK, -1 if error
*/ */
int mmFreeMem( PMemBlock b ); int mmFreeMem( PMemBlock b );
/* /*
* Reserve 'size' bytes block start at offset * Reserve 'size' bytes block start at offset
...@@ -160,4 +161,4 @@ void mmDestroy( memHeap_t *mmInit ); ...@@ -160,4 +161,4 @@ void mmDestroy( memHeap_t *mmInit );
/* For debuging purpose. */ /* For debuging purpose. */
void mmDumpMemInfo( memHeap_t *mmInit ); void mmDumpMemInfo( memHeap_t *mmInit );
#endif #endif /* __SIS_DS_H__ */
This diff is collapsed.
...@@ -37,43 +37,7 @@ config I2C_CHARDEV ...@@ -37,43 +37,7 @@ config I2C_CHARDEV
This support is also available as a module. If so, the module This support is also available as a module. If so, the module
will be called i2c-dev. will be called i2c-dev.
config I2C_ALGOBIT source drivers/i2c/algos/Kconfig
tristate "I2C bit-banging interfaces"
depends on I2C
help
This allows you to use a range of I2C adapters called bit-banging
adapters. Say Y if you own an I2C adapter belonging to this class
and then say Y to the specific driver for you adapter below.
This support is also available as a module. If so, the module
will be called i2c-algo-bit.
config I2C_ALGOPCF
tristate "I2C PCF 8584 interfaces"
depends on I2C
help
This allows you to use a range of I2C adapters called PCF adapters.
Say Y if you own an I2C adapter belonging to this class and then say
Y to the specific driver for you adapter below.
This support is also available as a module. If so, the module
will be called i2c-algo-pcf.
config I2C_ALGOITE
tristate "ITE I2C Algorithm"
depends on MIPS_ITE8172 && I2C
help
This supports the use of the ITE8172 I2C interface found on some MIPS
systems. Say Y if you have one of these. You should also say Y for
the ITE I2C peripheral driver support below.
This support is also available as a module. If so, the module
will be called i2c-algo-ite.
config I2C_ALGO8XX
tristate "MPC8xx CPM I2C interface"
depends on 8xx && I2C
source drivers/i2c/busses/Kconfig source drivers/i2c/busses/Kconfig
source drivers/i2c/chips/Kconfig source drivers/i2c/chips/Kconfig
......
...@@ -5,7 +5,4 @@ ...@@ -5,7 +5,4 @@
obj-$(CONFIG_I2C) += i2c-core.o obj-$(CONFIG_I2C) += i2c-core.o
obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o
obj-$(CONFIG_I2C_SENSOR) += i2c-sensor.o obj-$(CONFIG_I2C_SENSOR) += i2c-sensor.o
obj-$(CONFIG_I2C_ALGOBIT) += i2c-algo-bit.o obj-y += busses/ chips/ algos/
obj-$(CONFIG_I2C_ALGOPCF) += i2c-algo-pcf.o
obj-$(CONFIG_I2C_ALGOITE) += i2c-algo-ite.o
obj-y += busses/ chips/
#
# Character device configuration
#
menu "I2C Algorithms"
config I2C_ALGOBIT
tristate "I2C bit-banging interfaces"
depends on I2C
help
This allows you to use a range of I2C adapters called bit-banging
adapters. Say Y if you own an I2C adapter belonging to this class
and then say Y to the specific driver for you adapter below.
This support is also available as a module. If so, the module
will be called i2c-algo-bit.
config I2C_ALGOPCF
tristate "I2C PCF 8584 interfaces"
depends on I2C
help
This allows you to use a range of I2C adapters called PCF adapters.
Say Y if you own an I2C adapter belonging to this class and then say
Y to the specific driver for you adapter below.
This support is also available as a module. If so, the module
will be called i2c-algo-pcf.
config I2C_ALGOITE
tristate "ITE I2C Algorithm"
depends on MIPS_ITE8172 && I2C
help
This supports the use of the ITE8172 I2C interface found on some MIPS
systems. Say Y if you have one of these. You should also say Y for
the ITE I2C peripheral driver support below.
This support is also available as a module. If so, the module
will be called i2c-algo-ite.
config I2C_ALGO8XX
tristate "MPC8xx CPM I2C interface"
depends on 8xx && I2C
endmenu
#
# Makefile for the i2c algorithms
#
obj-$(CONFIG_I2C_ALGOBIT) += i2c-algo-bit.o
obj-$(CONFIG_I2C_ALGOPCF) += i2c-algo-pcf.o
obj-$(CONFIG_I2C_ALGOITE) += i2c-algo-ite.o
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-algo-ite.h> #include <linux/i2c-algo-ite.h>
#include "i2c-ite.h" #include "i2c-algo-ite.h"
#define PM_DSR IT8172_PCI_IO_BASE + IT_PM_DSR #define PM_DSR IT8172_PCI_IO_BASE + IT_PM_DSR
#define PM_IBSR IT8172_PCI_IO_BASE + IT_PM_DSR + 0x04 #define PM_IBSR IT8172_PCI_IO_BASE + IT_PM_DSR + 0x04
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-algo-pcf.h> #include <linux/i2c-algo-pcf.h>
#include "i2c-pcf8584.h" #include "i2c-algo-pcf.h"
/* ----- global defines ----------------------------------------------- */ /* ----- global defines ----------------------------------------------- */
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "../i2c-pcf8584.h" #include "../algos/i2c-algo-pcf.h"
#define DEFAULT_BASE 0x330 #define DEFAULT_BASE 0x330
......
...@@ -21,6 +21,18 @@ config SENSORS_ADM1021 ...@@ -21,6 +21,18 @@ config SENSORS_ADM1021
This driver can also be built as a module. If so, the module This driver can also be built as a module. If so, the module
will be called adm1021. will be called adm1021.
config SENSORS_EEPROM
tristate "EEPROM (DIMM) reader"
depends on I2C && EXPERIMENTAL
select I2C_SENSOR
help
If you say yes here you get read-only access to the EEPROM data
available on modern memory DIMMs, and which could theoretically
also be available on other devices.
This driver can also be built as a module. If so, the module
will be called eeprom.
config SENSORS_IT87 config SENSORS_IT87
tristate "National Semiconductors IT87 and compatibles" tristate "National Semiconductors IT87 and compatibles"
depends on I2C && EXPERIMENTAL depends on I2C && EXPERIMENTAL
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
obj-$(CONFIG_SENSORS_W83781D) += w83781d.o obj-$(CONFIG_SENSORS_W83781D) += w83781d.o
obj-$(CONFIG_SENSORS_ADM1021) += adm1021.o obj-$(CONFIG_SENSORS_ADM1021) += adm1021.o
obj-$(CONFIG_SENSORS_EEPROM) += eeprom.o
obj-$(CONFIG_SENSORS_IT87) += it87.o obj-$(CONFIG_SENSORS_IT87) += it87.o
obj-$(CONFIG_SENSORS_LM75) += lm75.o obj-$(CONFIG_SENSORS_LM75) += lm75.o
obj-$(CONFIG_SENSORS_LM78) += lm78.o obj-$(CONFIG_SENSORS_LM78) += lm78.o
......
/*
eeprom.c - Part of lm_sensors, Linux kernel modules for hardware
monitoring
Copyright (C) 1998, 1999 Frodo Looijaard <frodol@dds.nl> and
Philip Edelbrock <phil@netroedge.com>
Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com>
Copyright (C) 2003 IBM Corp.
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.
*/
/* #define DEBUG */
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/i2c-sensor.h>
/* Addresses to scan */
static unsigned short normal_i2c[] = { I2C_CLIENT_END };
static unsigned short normal_i2c_range[] = { 0x50, 0x57, I2C_CLIENT_END };
static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END };
/* Insmod parameters */
SENSORS_INSMOD_1(eeprom);
static int checksum = 0;
MODULE_PARM(checksum, "i");
MODULE_PARM_DESC(checksum, "Only accept eeproms whose checksum is correct");
/* EEPROM registers */
#define EEPROM_REG_CHECKSUM 0x3f
/* Size of EEPROM in bytes */
#define EEPROM_SIZE 256
/* possible types of eeprom devices */
enum eeprom_nature {
UNKNOWN,
VAIO,
};
/* Each client has this additional data */
struct eeprom_data {
struct semaphore update_lock;
char valid; /* !=0 if following fields are valid */
unsigned long last_updated; /* In jiffies */
u8 data[EEPROM_SIZE]; /* Register values */
};
static int eeprom_attach_adapter(struct i2c_adapter *adapter);
static int eeprom_detect(struct i2c_adapter *adapter, int address, int kind);
static int eeprom_detach_client(struct i2c_client *client);
/* This is the driver that will be inserted */
static struct i2c_driver eeprom_driver = {
.owner = THIS_MODULE,
.name = "eeprom",
.id = I2C_DRIVERID_EEPROM,
.flags = I2C_DF_NOTIFY,
.attach_adapter = eeprom_attach_adapter,
.detach_client = eeprom_detach_client,
};
static int eeprom_id = 0;
static void eeprom_update_client(struct i2c_client *client)
{
struct eeprom_data *data = i2c_get_clientdata(client);
int i, j;
down(&data->update_lock);
if ((jiffies - data->last_updated > 300 * HZ) |
(jiffies < data->last_updated) || !data->valid) {
dev_dbg(&client->dev, "Starting eeprom update\n");
if (i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_I2C_BLOCK)) {
for (i=0; i < EEPROM_SIZE; i += I2C_SMBUS_I2C_BLOCK_MAX)
if (i2c_smbus_read_i2c_block_data(client, i, data->data + i) != I2C_SMBUS_I2C_BLOCK_MAX)
goto exit;
} else {
if (i2c_smbus_write_byte(client, 0)) {
dev_dbg(&client->dev, "eeprom read start has failed!\n");
goto exit;
}
for (i = 0; i < EEPROM_SIZE; i++) {
j = i2c_smbus_read_byte(client);
if (j < 0)
goto exit;
data->data[i] = (u8) j;
}
}
data->last_updated = jiffies;
data->valid = 1;
}
exit:
up(&data->update_lock);
}
static ssize_t eeprom_read(struct kobject *kobj, char *buf, loff_t off, size_t count)
{
struct i2c_client *client = to_i2c_client(container_of(kobj, struct device, kobj));
struct eeprom_data *data = i2c_get_clientdata(client);
eeprom_update_client(client);
if (off > EEPROM_SIZE)
return 0;
if (off + count > EEPROM_SIZE)
count = EEPROM_SIZE - off;
memcpy(buf, &data->data[off], count);
return count;
}
static struct bin_attribute eeprom_attr = {
.attr = {
.name = "eeprom",
.mode = S_IRUGO,
},
.size = EEPROM_SIZE,
.read = eeprom_read,
};
static int eeprom_attach_adapter(struct i2c_adapter *adapter)
{
return i2c_detect(adapter, &addr_data, eeprom_detect);
}
/* This function is called by i2c_detect */
int eeprom_detect(struct i2c_adapter *adapter, int address, int kind)
{
int i, cs;
struct i2c_client *new_client;
struct eeprom_data *data;
enum eeprom_nature nature = UNKNOWN;
int err = 0;
/* Make sure we aren't probing the ISA bus!! This is just a safety check
at this moment; i2c_detect really won't call us. */
#ifdef DEBUG
if (i2c_is_isa_adapter(adapter)) {
dev_dbg(&adapter->dev, " eeprom_detect called for an ISA bus adapter?!?\n");
return 0;
}
#endif
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
goto exit;
/* OK. For now, we presume we have a valid client. We now create the
client structure, even though we cannot fill it completely yet.
But it allows us to access eeprom_{read,write}_value. */
if (!(new_client = kmalloc(sizeof(struct i2c_client) +
sizeof(struct eeprom_data),
GFP_KERNEL))) {
err = -ENOMEM;
goto exit;
}
memset(new_client, 0x00, sizeof(struct i2c_client) +
sizeof(struct eeprom_data));
data = (struct eeprom_data *) (new_client + 1);
memset(data, 0xff, EEPROM_SIZE);
i2c_set_clientdata(new_client, data);
new_client->addr = address;
new_client->adapter = adapter;
new_client->driver = &eeprom_driver;
new_client->flags = 0;
/* Now, we do the remaining detection. It is not there, unless you force
the checksum to work out. */
if (checksum) {
/* prevent 24RF08 corruption */
i2c_smbus_write_quick(new_client, 0);
cs = 0;
for (i = 0; i <= 0x3e; i++)
cs += i2c_smbus_read_byte_data(new_client, i);
cs &= 0xff;
if (i2c_smbus_read_byte_data (new_client, EEPROM_REG_CHECKSUM) != cs)
goto exit_kfree;
}
/* Detect the Vaio nature of EEPROMs.
We use the "PCG-" prefix as the signature. */
if (address == 0x57) {
if (i2c_smbus_read_byte_data(new_client, 0x80) == 'P' &&
i2c_smbus_read_byte_data(new_client, 0x81) == 'C' &&
i2c_smbus_read_byte_data(new_client, 0x82) == 'G' &&
i2c_smbus_read_byte_data(new_client, 0x83) == '-')
nature = VAIO;
}
/* If this is a VIAO, then we only allow root to read from this file,
as BIOS passwords can be present here in plaintext */
switch (nature) {
case VAIO:
eeprom_attr.attr.mode = S_IRUSR;
break;
default:
eeprom_attr.attr.mode = S_IRUGO;
}
/* Fill in the remaining client fields */
strncpy(new_client->name, "eeprom", I2C_NAME_SIZE);
new_client->id = eeprom_id++;
data->valid = 0;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
goto exit_kfree;
/* create the sysfs eeprom file */
sysfs_create_bin_file(&new_client->dev.kobj, &eeprom_attr);
return 0;
exit_kfree:
kfree(new_client);
exit:
return err;
}
static int eeprom_detach_client(struct i2c_client *client)
{
int err;
err = i2c_detach_client(client);
if (err) {
dev_err(&client->dev, "Client deregistration failed, client not detached.\n");
return err;
}
kfree(client);
return 0;
}
static int __init eeprom_init(void)
{
return i2c_add_driver(&eeprom_driver);
}
static void __exit eeprom_exit(void)
{
i2c_del_driver(&eeprom_driver);
}
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and "
"Philip Edelbrock <phil@netroedge.com> and "
"Greg Kroah-Hartman <greg@kroah.com>");
MODULE_DESCRIPTION("I2C EEPROM driver");
MODULE_LICENSE("GPL");
module_init(eeprom_init);
module_exit(eeprom_exit);
...@@ -50,10 +50,7 @@ int i2c_detect(struct i2c_adapter *adapter, ...@@ -50,10 +50,7 @@ int i2c_detect(struct i2c_adapter *adapter,
return -1; return -1;
for (addr = 0x00; addr <= (is_isa ? 0xffff : 0x7f); addr++) { for (addr = 0x00; addr <= (is_isa ? 0xffff : 0x7f); addr++) {
void *region_used = request_region(addr, 1, "foo"); if (!is_isa && i2c_check_addr(adapter, addr))
release_region(addr, 1);
if ((is_isa && (region_used == NULL)) ||
(!is_isa && i2c_check_addr(adapter, addr)))
continue; continue;
/* If it is in one of the force entries, we don't do any /* If it is in one of the force entries, we don't do any
......
...@@ -269,9 +269,10 @@ int __init ultramca_probe(struct device *gen_dev) ...@@ -269,9 +269,10 @@ int __init ultramca_probe(struct device *gen_dev)
goto err_unregister_netdev; goto err_unregister_netdev;
} }
rc = request_region(ioaddr, ULTRA_IO_EXTENT, dev->name); if (!request_region(ioaddr, ULTRA_IO_EXTENT, dev->name)) {
if (rc) rc = -ENODEV;
goto err_unregister_netdev; goto err_unregister_netdev;
}
reg4 = inb(ioaddr + 4) & 0x7f; reg4 = inb(ioaddr + 4) & 0x7f;
outb(reg4, ioaddr + 4); outb(reg4, ioaddr + 4);
......
...@@ -35,7 +35,6 @@ obj-$(CONFIG_USB_SE401) += media/ ...@@ -35,7 +35,6 @@ obj-$(CONFIG_USB_SE401) += media/
obj-$(CONFIG_USB_STV680) += media/ obj-$(CONFIG_USB_STV680) += media/
obj-$(CONFIG_USB_VICAM) += media/ obj-$(CONFIG_USB_VICAM) += media/
obj-$(CONFIG_USB_AX8817X) += net/
obj-$(CONFIG_USB_CATC) += net/ obj-$(CONFIG_USB_CATC) += net/
obj-$(CONFIG_USB_KAWETH) += net/ obj-$(CONFIG_USB_KAWETH) += net/
obj-$(CONFIG_USB_PEGASUS) += net/ obj-$(CONFIG_USB_PEGASUS) += net/
......
obj-$(CONFIG_USB_AX8817X) += crc32.o
obj-$(CONFIG_USB_CATC) += crc32.o obj-$(CONFIG_USB_CATC) += crc32.o
obj-$(CONFIG_USB_SPEEDTOUCH) += crc32.o obj-$(CONFIG_USB_SPEEDTOUCH) += crc32.o
obj-$(CONFIG_USB_USBNET) += crc32.o obj-$(CONFIG_USB_USBNET) += crc32.o
...@@ -1750,7 +1750,7 @@ static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s ...@@ -1750,7 +1750,7 @@ static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s
return 0; return 0;
error_end: error_end:
if ( mdevs != NULL && devices > 0 ) { if ( mdevs != NULL ) {
for ( i=0 ; i<devices ; i++ ) { for ( i=0 ; i<devices ; i++ ) {
if ( mdevs[i] != NULL ) { if ( mdevs[i] != NULL ) {
unregister_sound_midi( mdevs[i]->dev_midi ); unregister_sound_midi( mdevs[i]->dev_midi );
......
...@@ -237,9 +237,6 @@ int usb_parse_configuration(struct usb_host_config *config, char *buffer, int si ...@@ -237,9 +237,6 @@ int usb_parse_configuration(struct usb_host_config *config, char *buffer, int si
memset(interface, 0, sizeof(struct usb_interface)); memset(interface, 0, sizeof(struct usb_interface));
interface->dev.release = usb_release_intf; interface->dev.release = usb_release_intf;
device_initialize(&interface->dev); device_initialize(&interface->dev);
/* put happens in usb_destroy_configuration */
get_device(&interface->dev);
} }
/* Go through the descriptors, checking their length and counting the /* Go through the descriptors, checking their length and counting the
......
...@@ -23,22 +23,44 @@ ...@@ -23,22 +23,44 @@
#include "usb.h" #include "usb.h"
/* Active configuration fields */ /* Active configuration fields */
#define usb_actconfig_attr(field, format_string) \ #define usb_actconfig_show(field, format_string) \
static ssize_t \ static ssize_t \
show_##field (struct device *dev, char *buf) \ show_##field (struct device *dev, char *buf) \
{ \ { \
struct usb_device *udev; \ struct usb_device *udev; \
\ \
udev = to_usb_device (dev); \ udev = to_usb_device (dev); \
if (udev->actconfig) \
return sprintf (buf, format_string, udev->actconfig->desc.field); \ return sprintf (buf, format_string, udev->actconfig->desc.field); \
else return 0; \
} \ } \
#define usb_actconfig_attr(field, format_string) \
usb_actconfig_show(field,format_string) \
static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL); static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
usb_actconfig_attr (bNumInterfaces, "%2d\n") usb_actconfig_attr (bNumInterfaces, "%2d\n")
usb_actconfig_attr (bConfigurationValue, "%2d\n")
usb_actconfig_attr (bmAttributes, "%2x\n") usb_actconfig_attr (bmAttributes, "%2x\n")
usb_actconfig_attr (bMaxPower, "%3dmA\n") usb_actconfig_attr (bMaxPower, "%3dmA\n")
/* configuration value is always present, and r/w */
usb_actconfig_show(bConfigurationValue,"%u\n");
static ssize_t
set_bConfigurationValue (struct device *dev, const char *buf, size_t count)
{
struct usb_device *udev = udev = to_usb_device (dev);
int config, value;
if (sscanf (buf, "%u", &config) != 1 || config > 255)
return -EINVAL;
value = usb_set_configuration (udev, config);
return (value < 0) ? value : count;
}
static DEVICE_ATTR(bConfigurationValue, S_IRUGO | S_IWUSR,
show_bConfigurationValue, set_bConfigurationValue);
/* String fields */ /* String fields */
static ssize_t show_product (struct device *dev, char *buf) static ssize_t show_product (struct device *dev, char *buf)
{ {
......
...@@ -273,17 +273,17 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state) ...@@ -273,17 +273,17 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state)
int retval = 0; int retval = 0;
hcd = pci_get_drvdata(dev); hcd = pci_get_drvdata(dev);
dev_dbg (hcd->controller, "suspend D%d --> D%d\n",
dev->current_state, state);
switch (hcd->state) { switch (hcd->state) {
case USB_STATE_HALT: case USB_STATE_HALT:
dev_dbg (hcd->controller, "halted; hcd not suspended\n"); dev_dbg (hcd->controller, "halted; hcd not suspended\n");
break; break;
case USB_STATE_SUSPENDED: case USB_STATE_SUSPENDED:
dev_dbg (hcd->controller, "suspend D%d --> D%d\n", dev_dbg (hcd->controller, "hcd already suspended\n");
dev->current_state, state);
break; break;
default: default:
dev_dbg (hcd->controller, "suspend to state %d\n", state);
/* remote wakeup needs hub->suspend() cooperation */ /* remote wakeup needs hub->suspend() cooperation */
// pci_enable_wake (dev, 3, 1); // pci_enable_wake (dev, 3, 1);
...@@ -292,6 +292,9 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state) ...@@ -292,6 +292,9 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state)
/* driver may want to disable DMA etc */ /* driver may want to disable DMA etc */
hcd->state = USB_STATE_QUIESCING; hcd->state = USB_STATE_QUIESCING;
retval = hcd->driver->suspend (hcd, state); retval = hcd->driver->suspend (hcd, state);
if (retval)
dev_dbg (hcd->controller, "suspend fail, retval %d\n",
retval);
} }
pci_set_power_state (dev, state); pci_set_power_state (dev, state);
...@@ -311,6 +314,9 @@ int usb_hcd_pci_resume (struct pci_dev *dev) ...@@ -311,6 +314,9 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
int retval; int retval;
hcd = pci_get_drvdata(dev); hcd = pci_get_drvdata(dev);
dev_dbg (hcd->controller, "resume from state D%d\n",
dev->current_state);
if (hcd->state != USB_STATE_SUSPENDED) { if (hcd->state != USB_STATE_SUSPENDED) {
dev_dbg (hcd->controller, "can't resume, not suspended!\n"); dev_dbg (hcd->controller, "can't resume, not suspended!\n");
return -EL3HLT; return -EL3HLT;
......
...@@ -781,18 +781,40 @@ void usb_disable_interface(struct usb_device *dev, struct usb_interface *intf) ...@@ -781,18 +781,40 @@ void usb_disable_interface(struct usb_device *dev, struct usb_interface *intf)
* @skip_ep0: 0 to disable endpoint 0, 1 to skip it. * @skip_ep0: 0 to disable endpoint 0, 1 to skip it.
* *
* Disables all the device's endpoints, potentially including endpoint 0. * Disables all the device's endpoints, potentially including endpoint 0.
* Deallocates hcd/hardware state for the endpoints ... and nukes all * Deallocates hcd/hardware state for the endpoints (nuking all or most
* pending urbs. * pending urbs) and usbcore state for the interfaces, so that usbcore
* must usb_set_configuration() before any interfaces could be used.
*/ */
void usb_disable_device(struct usb_device *dev, int skip_ep0) void usb_disable_device(struct usb_device *dev, int skip_ep0)
{ {
int i; int i;
dbg("nuking URBs for device %s", dev->dev.bus_id); dev_dbg(&dev->dev, "%s nuking %s URBs\n", __FUNCTION__,
skip_ep0 ? "non-ep0" : "all");
for (i = skip_ep0; i < 16; ++i) { for (i = skip_ep0; i < 16; ++i) {
usb_disable_endpoint(dev, i); usb_disable_endpoint(dev, i);
usb_disable_endpoint(dev, i + USB_DIR_IN); usb_disable_endpoint(dev, i + USB_DIR_IN);
} }
dev->toggle[0] = dev->toggle[1] = 0;
dev->halted[0] = dev->halted[1] = 0;
/* getting rid of interfaces will disconnect
* any drivers bound to them (a key side effect)
*/
if (dev->actconfig) {
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
struct usb_interface *interface;
/* remove this interface */
interface = dev->actconfig->interface[i];
dev_dbg (&dev->dev, "unregistering interface %s\n",
interface->dev.bus_id);
device_del(&interface->dev);
}
dev->actconfig = 0;
if (dev->state == USB_STATE_CONFIGURED)
dev->state = USB_STATE_ADDRESS;
}
} }
...@@ -979,6 +1001,9 @@ int usb_reset_configuration(struct usb_device *dev) ...@@ -979,6 +1001,9 @@ int usb_reset_configuration(struct usb_device *dev)
int i, retval; int i, retval;
struct usb_host_config *config; struct usb_host_config *config;
/* dev->serialize guards all config changes */
down(&dev->serialize);
for (i = 1; i < 16; ++i) { for (i = 1; i < 16; ++i) {
usb_disable_endpoint(dev, i); usb_disable_endpoint(dev, i);
usb_disable_endpoint(dev, i + USB_DIR_IN); usb_disable_endpoint(dev, i + USB_DIR_IN);
...@@ -989,8 +1014,10 @@ int usb_reset_configuration(struct usb_device *dev) ...@@ -989,8 +1014,10 @@ int usb_reset_configuration(struct usb_device *dev)
USB_REQ_SET_CONFIGURATION, 0, USB_REQ_SET_CONFIGURATION, 0,
config->desc.bConfigurationValue, 0, config->desc.bConfigurationValue, 0,
NULL, 0, HZ * USB_CTRL_SET_TIMEOUT); NULL, 0, HZ * USB_CTRL_SET_TIMEOUT);
if (retval < 0) if (retval < 0) {
return retval; dev->state = USB_STATE_ADDRESS;
goto done;
}
dev->toggle[0] = dev->toggle[1] = 0; dev->toggle[0] = dev->toggle[1] = 0;
dev->halted[0] = dev->halted[1] = 0; dev->halted[0] = dev->halted[1] = 0;
...@@ -1002,7 +1029,9 @@ int usb_reset_configuration(struct usb_device *dev) ...@@ -1002,7 +1029,9 @@ int usb_reset_configuration(struct usb_device *dev)
intf->act_altsetting = 0; intf->act_altsetting = 0;
usb_enable_interface(dev, intf); usb_enable_interface(dev, intf);
} }
return 0; done:
up(&dev->serialize);
return (retval < 0) ? retval : 0;
} }
/** /**
...@@ -1012,72 +1041,105 @@ int usb_reset_configuration(struct usb_device *dev) ...@@ -1012,72 +1041,105 @@ int usb_reset_configuration(struct usb_device *dev)
* Context: !in_interrupt () * Context: !in_interrupt ()
* *
* This is used to enable non-default device modes. Not all devices * This is used to enable non-default device modes. Not all devices
* support this kind of configurability. By default, configuration * use this kind of configurability; many devices only have one
* zero is selected after enumeration; many devices only have a single
* configuration. * configuration.
* *
* USB devices may support one or more configurations, which affect * USB device configurations may affect Linux interoperability,
* power consumption and the functionality available. For example, * power consumption and the functionality available. For example,
* the default configuration is limited to using 100mA of bus power, * the default configuration is limited to using 100mA of bus power,
* so that when certain device functionality requires more power, * so that when certain device functionality requires more power,
* and the device is bus powered, that functionality will be in some * and the device is bus powered, that functionality should be in some
* non-default device configuration. Other device modes may also be * non-default device configuration. Other device modes may also be
* reflected as configuration options, such as whether two ISDN * reflected as configuration options, such as whether two ISDN
* channels are presented as independent 64Kb/s interfaces or as one * channels are available independently; and choosing between open
* bonded 128Kb/s interface. * standard device protocols (like CDC) or proprietary ones.
* *
* Note that USB has an additional level of device configurability, * Note that USB has an additional level of device configurability,
* associated with interfaces. That configurability is accessed using * associated with interfaces. That configurability is accessed using
* usb_set_interface(). * usb_set_interface().
* *
* This call is synchronous, and may not be used in an interrupt context. * This call is synchronous. The calling context must be able to sleep,
* and must not hold the driver model lock for USB; usb device driver
* probe() methods may not use this routine.
* *
* Returns zero on success, or else the status code returned by the * Returns zero on success, or else the status code returned by the
* underlying usb_control_msg() call. * underlying call that failed. On succesful completion, each interface
* in the original device configuration has been destroyed, and each one
* in the new configuration has been probed by all relevant usb device
* drivers currently known to the kernel.
*/ */
int usb_set_configuration(struct usb_device *dev, int configuration) int usb_set_configuration(struct usb_device *dev, int configuration)
{ {
int i, ret; int i, ret;
struct usb_host_config *cp = NULL; struct usb_host_config *cp = NULL;
/* dev->serialize guards all config changes */
down(&dev->serialize);
for (i=0; i<dev->descriptor.bNumConfigurations; i++) { for (i=0; i<dev->descriptor.bNumConfigurations; i++) {
if (dev->config[i].desc.bConfigurationValue == configuration) { if (dev->config[i].desc.bConfigurationValue == configuration) {
cp = &dev->config[i]; cp = &dev->config[i];
break; break;
} }
} }
if ((!cp && configuration != 0) || (cp && configuration == 0)) { if ((!cp && configuration != 0)) {
warn("selecting invalid configuration %d", configuration); ret = -EINVAL;
return -EINVAL; goto out;
} }
if (cp && configuration == 0)
dev_warn(&dev->dev, "config 0 descriptor??\n");
/* if it's already configured, clear out old state first. */ /* if it's already configured, clear out old state first.
* getting rid of old interfaces means unbinding their drivers.
*/
if (dev->state != USB_STATE_ADDRESS) if (dev->state != USB_STATE_ADDRESS)
usb_disable_device (dev, 1); // Skip ep0 usb_disable_device (dev, 1); // Skip ep0
dev->toggle[0] = dev->toggle[1] = 0;
dev->halted[0] = dev->halted[1] = 0;
dev->state = USB_STATE_ADDRESS;
if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
USB_REQ_SET_CONFIGURATION, 0, configuration, 0, USB_REQ_SET_CONFIGURATION, 0, configuration, 0,
NULL, 0, HZ * USB_CTRL_SET_TIMEOUT)) < 0) NULL, 0, HZ * USB_CTRL_SET_TIMEOUT)) < 0)
return ret; goto out;
if (configuration)
dev->state = USB_STATE_CONFIGURED;
dev->actconfig = cp;
/* reset more hc/hcd interface/endpoint state */ dev->actconfig = cp;
for (i = 0; i < cp->desc.bNumInterfaces; ++i) { if (!configuration)
struct usb_interface *intf = cp->interface[i]; dev->state = USB_STATE_ADDRESS;
else {
dev->state = USB_STATE_CONFIGURED;
intf->act_altsetting = 0; /* re-initialize hc/hcd/usbcore interface/endpoint state.
usb_enable_interface(dev, intf); * this triggers binding of drivers to interfaces; and
* maybe probe() calls will choose different altsettings.
*/
for (i = 0; i < cp->desc.bNumInterfaces; ++i) {
struct usb_interface *intf = cp->interface[i];
struct usb_interface_descriptor *desc;
intf->act_altsetting = 0;
desc = &intf->altsetting [0].desc;
usb_enable_interface(dev, intf);
intf->dev.parent = &dev->dev;
intf->dev.driver = NULL;
intf->dev.bus = &usb_bus_type;
intf->dev.dma_mask = dev->dev.dma_mask;
sprintf (&intf->dev.bus_id[0], "%d-%s:%d.%d",
dev->bus->busnum, dev->devpath,
configuration,
desc->bInterfaceNumber);
dev_dbg (&dev->dev,
"registering %s (config #%d, interface %d)\n",
intf->dev.bus_id, configuration,
desc->bInterfaceNumber);
device_add (&intf->dev);
usb_create_driverfs_intf_files (intf);
}
} }
return 0; out:
up(&dev->serialize);
return ret;
} }
/** /**
* usb_string - returns ISO 8859-1 version of a string descriptor * usb_string - returns ISO 8859-1 version of a string descriptor
* @dev: the device whose string descriptor is being retrieved * @dev: the device whose string descriptor is being retrieved
......
...@@ -898,6 +898,7 @@ void usb_disconnect(struct usb_device **pdev) ...@@ -898,6 +898,7 @@ void usb_disconnect(struct usb_device **pdev)
* this device will fail. * this device will fail.
*/ */
dev->state = USB_STATE_NOTATTACHED; dev->state = USB_STATE_NOTATTACHED;
down(&dev->serialize);
dev_info (&dev->dev, "USB disconnect, address %d\n", dev->devnum); dev_info (&dev->dev, "USB disconnect, address %d\n", dev->devnum);
...@@ -908,32 +909,19 @@ void usb_disconnect(struct usb_device **pdev) ...@@ -908,32 +909,19 @@ void usb_disconnect(struct usb_device **pdev)
usb_disconnect(child); usb_disconnect(child);
} }
/* deallocate hcd/hardware state ... and nuke all pending urbs */ /* deallocate hcd/hardware state ... nuking all pending urbs and
* cleaning up all state associated with the current configuration
*/
usb_disable_device(dev, 0); usb_disable_device(dev, 0);
/* disconnect() drivers from interfaces (a key side effect) */
dev_dbg (&dev->dev, "unregistering interfaces\n");
if (dev->actconfig) {
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
struct usb_interface *interface;
/* remove this interface */
interface = dev->actconfig->interface[i];
device_unregister(&interface->dev);
}
}
dev_dbg (&dev->dev, "unregistering device\n"); dev_dbg (&dev->dev, "unregistering device\n");
/* Free the device number and remove the /proc/bus/usb entry */ /* Free the device number and remove the /proc/bus/usb entry */
if (dev->devnum > 0) { if (dev->devnum > 0) {
clear_bit(dev->devnum, dev->bus->devmap.devicemap); clear_bit(dev->devnum, dev->bus->devmap.devicemap);
usbfs_remove_device(dev); usbfs_remove_device(dev);
} }
up(&dev->serialize);
device_unregister(&dev->dev); device_unregister(&dev->dev);
/* Decrement the reference count, it'll auto free everything when */
/* it hits 0 which could very well be now */
usb_put_dev(dev);
} }
/** /**
...@@ -1017,7 +1005,6 @@ int usb_new_device(struct usb_device *dev, struct device *parent) ...@@ -1017,7 +1005,6 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
dev->dev.driver = &usb_generic_driver; dev->dev.driver = &usb_generic_driver;
dev->dev.bus = &usb_bus_type; dev->dev.bus = &usb_bus_type;
dev->dev.driver_data = &usb_generic_driver_data; dev->dev.driver_data = &usb_generic_driver_data;
usb_get_dev(dev);
if (dev->dev.bus_id[0] == 0) if (dev->dev.bus_id[0] == 0)
sprintf (&dev->dev.bus_id[0], "%d-%s", sprintf (&dev->dev.bus_id[0], "%d-%s",
dev->bus->busnum, dev->devpath); dev->bus->busnum, dev->devpath);
...@@ -1090,27 +1077,12 @@ int usb_new_device(struct usb_device *dev, struct device *parent) ...@@ -1090,27 +1077,12 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
err = usb_get_configuration(dev); err = usb_get_configuration(dev);
if (err < 0) { if (err < 0) {
dev_err(&dev->dev, "unable to get device %d configuration (error=%d)\n", dev_err(&dev->dev, "can't read configurations, error %d\n",
dev->devnum, err); err);
goto fail;
}
/* choose and set the configuration here */
if (dev->descriptor.bNumConfigurations != 1) {
dev_info(&dev->dev,
"configuration #%d chosen from %d choices\n",
dev->config[0].desc.bConfigurationValue,
dev->descriptor.bNumConfigurations);
}
err = usb_set_configuration(dev, dev->config[0].desc.bConfigurationValue);
if (err) {
dev_err(&dev->dev, "failed to set device %d default configuration (error=%d)\n",
dev->devnum, err);
goto fail; goto fail;
} }
/* USB device state == configured ... tell the world! */ /* Tell the world! */
dev_dbg(&dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n", dev_dbg(&dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n",
dev->descriptor.iManufacturer, dev->descriptor.iProduct, dev->descriptor.iSerialNumber); dev->descriptor.iManufacturer, dev->descriptor.iProduct, dev->descriptor.iSerialNumber);
...@@ -1123,30 +1095,32 @@ int usb_new_device(struct usb_device *dev, struct device *parent) ...@@ -1123,30 +1095,32 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
usb_show_string(dev, "SerialNumber", dev->descriptor.iSerialNumber); usb_show_string(dev, "SerialNumber", dev->descriptor.iSerialNumber);
#endif #endif
/* put into sysfs, with device and config specific files */ /* put device-specific files into sysfs */
err = device_add (&dev->dev); err = device_add (&dev->dev);
if (err) if (err) {
dev_err(&dev->dev, "can't device_add, error %d\n", err);
goto fail; goto fail;
}
usb_create_driverfs_dev_files (dev); usb_create_driverfs_dev_files (dev);
/* Register all of the interfaces for this device with the driver core. /* choose and set the configuration. that registers the interfaces
* Remember, interfaces get bound to drivers, not devices. */ * with the driver core, and lets usb device drivers bind to them.
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { */
struct usb_interface *interface = dev->actconfig->interface[i]; if (dev->descriptor.bNumConfigurations != 1) {
struct usb_interface_descriptor *desc; dev_info(&dev->dev,
"configuration #%d chosen from %d choices\n",
desc = &interface->altsetting [interface->act_altsetting].desc; dev->config[0].desc.bConfigurationValue,
interface->dev.parent = &dev->dev; dev->descriptor.bNumConfigurations);
interface->dev.driver = NULL;
interface->dev.bus = &usb_bus_type;
interface->dev.dma_mask = parent->dma_mask;
sprintf (&interface->dev.bus_id[0], "%d-%s:%d",
dev->bus->busnum, dev->devpath,
desc->bInterfaceNumber);
dev_dbg (&dev->dev, "%s - registering interface %s\n", __FUNCTION__, interface->dev.bus_id);
device_add (&interface->dev);
usb_create_driverfs_intf_files (interface);
} }
err = usb_set_configuration(dev,
dev->config[0].desc.bConfigurationValue);
if (err) {
dev_err(&dev->dev, "can't set config #%d, error %d\n",
dev->config[0].desc.bConfigurationValue, err);
goto fail;
}
/* USB device state == configured ... usable */
/* add a /proc/bus/usb entry */ /* add a /proc/bus/usb entry */
usbfs_add_device(dev); usbfs_add_device(dev);
...@@ -1156,7 +1130,6 @@ int usb_new_device(struct usb_device *dev, struct device *parent) ...@@ -1156,7 +1130,6 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
dev->state = USB_STATE_DEFAULT; dev->state = USB_STATE_DEFAULT;
clear_bit(dev->devnum, dev->bus->devmap.devicemap); clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1; dev->devnum = -1;
usb_put_dev(dev);
return err; return err;
} }
......
This diff is collapsed.
...@@ -354,6 +354,7 @@ static ssize_t ...@@ -354,6 +354,7 @@ static ssize_t
ep_io (struct ep_data *epdata, void *buf, unsigned len) ep_io (struct ep_data *epdata, void *buf, unsigned len)
{ {
DECLARE_COMPLETION (done); DECLARE_COMPLETION (done);
int value;
spin_lock_irq (&epdata->dev->lock); spin_lock_irq (&epdata->dev->lock);
if (likely (epdata->ep != NULL)) { if (likely (epdata->ep != NULL)) {
...@@ -363,14 +364,12 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len) ...@@ -363,14 +364,12 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)
req->complete = epio_complete; req->complete = epio_complete;
req->buf = buf; req->buf = buf;
req->length = len; req->length = len;
epdata->status = usb_ep_queue (epdata->ep, req, GFP_ATOMIC); value = usb_ep_queue (epdata->ep, req, GFP_ATOMIC);
} else } else
epdata->status = -ENODEV; value = -ENODEV;
spin_unlock_irq (&epdata->dev->lock); spin_unlock_irq (&epdata->dev->lock);
if (epdata->status == 0) { if (likely (value == 0)) {
int value;
value = wait_event_interruptible (done.wait, done.done); value = wait_event_interruptible (done.wait, done.done);
if (value != 0) { if (value != 0) {
spin_lock_irq (&epdata->dev->lock); spin_lock_irq (&epdata->dev->lock);
...@@ -378,17 +377,21 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len) ...@@ -378,17 +377,21 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)
DBG (epdata->dev, "%s i/o interrupted\n", DBG (epdata->dev, "%s i/o interrupted\n",
epdata->name); epdata->name);
usb_ep_dequeue (epdata->ep, epdata->req); usb_ep_dequeue (epdata->ep, epdata->req);
spin_unlock_irq (&epdata->dev->lock);
wait_event (done.wait, done.done); wait_event (done.wait, done.done);
if (epdata->status == 0) if (epdata->status == -ECONNRESET)
epdata->status = value; epdata->status = -EINTR;
} else { } else {
spin_unlock_irq (&epdata->dev->lock);
DBG (epdata->dev, "endpoint gone\n"); DBG (epdata->dev, "endpoint gone\n");
epdata->status = -ENODEV; epdata->status = -ENODEV;
} }
spin_unlock_irq (&epdata->dev->lock);
} }
return epdata->status;
} }
return epdata->status; return value;
} }
...@@ -424,10 +427,12 @@ ep_read (struct file *fd, char *buf, size_t len, loff_t *ptr) ...@@ -424,10 +427,12 @@ ep_read (struct file *fd, char *buf, size_t len, loff_t *ptr)
if (unlikely (!kbuf)) if (unlikely (!kbuf))
goto free1; goto free1;
VDEBUG (data->dev, "%s read %d OUT\n", data->name, len);
value = ep_io (data, kbuf, len); value = ep_io (data, kbuf, len);
VDEBUG (data->dev, "%s read %d OUT, status %d\n",
data->name, len, value);
if (value >= 0 && copy_to_user (buf, kbuf, value)) if (value >= 0 && copy_to_user (buf, kbuf, value))
value = -EFAULT; value = -EFAULT;
free1: free1:
up (&data->lock); up (&data->lock);
kfree (kbuf); kfree (kbuf);
...@@ -470,8 +475,9 @@ ep_write (struct file *fd, const char *buf, size_t len, loff_t *ptr) ...@@ -470,8 +475,9 @@ ep_write (struct file *fd, const char *buf, size_t len, loff_t *ptr)
goto free1; goto free1;
} }
VDEBUG (data->dev, "%s write %d IN\n", data->name, len);
value = ep_io (data, kbuf, len); value = ep_io (data, kbuf, len);
VDEBUG (data->dev, "%s write %d IN, status %d\n",
data->name, len, value);
free1: free1:
up (&data->lock); up (&data->lock);
kfree (kbuf); kfree (kbuf);
...@@ -1200,9 +1206,11 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) ...@@ -1200,9 +1206,11 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
if (value >= 0) if (value >= 0)
value = min (ctrl->wLength, (u16) value); value = min (ctrl->wLength, (u16) value);
break; break;
case USB_DT_STRING:
default:
goto unrecognized; goto unrecognized;
default: // all others are errors
break;
} }
break; break;
......
...@@ -1965,13 +1965,11 @@ static void reset_hc(struct uhci_hcd *uhci) ...@@ -1965,13 +1965,11 @@ static void reset_hc(struct uhci_hcd *uhci)
outw(USBCMD_GRESET, io_addr + USBCMD); outw(USBCMD_GRESET, io_addr + USBCMD);
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout((HZ*50+999) / 1000); schedule_timeout((HZ*50+999) / 1000);
set_current_state(TASK_RUNNING);
outw(0, io_addr + USBCMD); outw(0, io_addr + USBCMD);
/* Another 10ms delay */ /* Another 10ms delay */
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout((HZ*10+999) / 1000); schedule_timeout((HZ*10+999) / 1000);
set_current_state(TASK_RUNNING);
uhci->resume_detect = 0; uhci->resume_detect = 0;
} }
......
/* -*- linux-c -*- */ /* -*- linux-c -*- */
/* /*
* Driver for USB Scanners (linux-2.5) * Driver for USB Scanners (linux-2.6)
* *
* Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
* Copyright (C) 2002, 2003 Henning Meier-Geinitz * Copyright (C) 2002, 2003 Henning Meier-Geinitz
...@@ -369,6 +369,18 @@ ...@@ -369,6 +369,18 @@
* - Added vendor/product ids for Avision, Canon, HP, Microtek and Relisys scanners. * - Added vendor/product ids for Avision, Canon, HP, Microtek and Relisys scanners.
* - Clean up irq urb when not enough memory is available. * - Clean up irq urb when not enough memory is available.
* *
* 0.4.15 2003-09-22
* - Use static declarations for usb_scanner_init/usb_scanner_exit
* (Daniele Bellucci).
* - Report back return codes of usb_register and usb_usbmit_urb instead of -1 or
* -ENONMEM (Daniele Bellucci).
* - Balancing usb_register_dev/usb_deregister_dev in probe_scanner when a fail
* condition occours (Daniele Bellucci).
* - Added vendor/product ids for Canon, HP, Microtek, Mustek, Siemens, UMAX, and
* Visioneer scanners.
* - Added test for USB_CLASS_CDC_DATA which is used by some fingerprint scanners.
*
*
* TODO * TODO
* - Performance * - Performance
* - Select/poll methods * - Select/poll methods
...@@ -950,6 +962,7 @@ probe_scanner(struct usb_interface *intf, ...@@ -950,6 +962,7 @@ probe_scanner(struct usb_interface *intf,
if (interface[0].desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC && if (interface[0].desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC &&
interface[0].desc.bInterfaceClass != USB_CLASS_PER_INTERFACE && interface[0].desc.bInterfaceClass != USB_CLASS_PER_INTERFACE &&
interface[0].desc.bInterfaceClass != USB_CLASS_CDC_DATA &&
interface[0].desc.bInterfaceClass != SCN_CLASS_SCANJET) { interface[0].desc.bInterfaceClass != SCN_CLASS_SCANJET) {
dbg("probe_scanner: This interface doesn't look like a scanner (class=0x%x).", interface[0].desc.bInterfaceClass); dbg("probe_scanner: This interface doesn't look like a scanner (class=0x%x).", interface[0].desc.bInterfaceClass);
return -ENODEV; return -ENODEV;
...@@ -1043,6 +1056,7 @@ probe_scanner(struct usb_interface *intf, ...@@ -1043,6 +1056,7 @@ probe_scanner(struct usb_interface *intf,
scn->scn_irq = usb_alloc_urb(0, GFP_KERNEL); scn->scn_irq = usb_alloc_urb(0, GFP_KERNEL);
if (!scn->scn_irq) { if (!scn->scn_irq) {
usb_deregister_dev(intf, &scanner_class);
kfree(scn); kfree(scn);
up(&scn_mutex); up(&scn_mutex);
return -ENOMEM; return -ENOMEM;
...@@ -1061,11 +1075,13 @@ probe_scanner(struct usb_interface *intf, ...@@ -1061,11 +1075,13 @@ probe_scanner(struct usb_interface *intf,
// endpoint[(int)have_intr].bInterval); // endpoint[(int)have_intr].bInterval);
250); 250);
if (usb_submit_urb(scn->scn_irq, GFP_KERNEL)) { retval = usb_submit_urb(scn->scn_irq, GFP_KERNEL);
if (retval) {
err("probe_scanner(%d): Unable to allocate INT URB.", intf->minor); err("probe_scanner(%d): Unable to allocate INT URB.", intf->minor);
usb_deregister_dev(intf, &scanner_class);
kfree(scn); kfree(scn);
up(&scn_mutex); up(&scn_mutex);
return -ENOMEM; return retval;
} }
} }
...@@ -1076,6 +1092,7 @@ probe_scanner(struct usb_interface *intf, ...@@ -1076,6 +1092,7 @@ probe_scanner(struct usb_interface *intf,
if (have_intr) if (have_intr)
usb_unlink_urb(scn->scn_irq); usb_unlink_urb(scn->scn_irq);
usb_free_urb(scn->scn_irq); usb_free_urb(scn->scn_irq);
usb_deregister_dev(intf, &scanner_class);
kfree(scn); kfree(scn);
up(&scn_mutex); up(&scn_mutex);
return -ENOMEM; return -ENOMEM;
...@@ -1087,6 +1104,7 @@ probe_scanner(struct usb_interface *intf, ...@@ -1087,6 +1104,7 @@ probe_scanner(struct usb_interface *intf,
if (have_intr) if (have_intr)
usb_unlink_urb(scn->scn_irq); usb_unlink_urb(scn->scn_irq);
usb_free_urb(scn->scn_irq); usb_free_urb(scn->scn_irq);
usb_deregister_dev(intf, &scanner_class);
kfree(scn->obuf); kfree(scn->obuf);
kfree(scn); kfree(scn);
up(&scn_mutex); up(&scn_mutex);
...@@ -1169,22 +1187,25 @@ usb_driver scanner_driver = { ...@@ -1169,22 +1187,25 @@ usb_driver scanner_driver = {
.id_table = ids, .id_table = ids,
}; };
void __exit static void __exit
usb_scanner_exit(void) usb_scanner_exit(void)
{ {
usb_deregister(&scanner_driver); usb_deregister(&scanner_driver);
} }
int __init static int __init
usb_scanner_init (void) usb_scanner_init (void)
{ {
if (usb_register(&scanner_driver) < 0) int retval;
return -1; retval = usb_register(&scanner_driver);
if (retval)
goto out;
info(DRIVER_VERSION ":" DRIVER_DESC); info(DRIVER_VERSION ":" DRIVER_DESC);
if (vendor != -1 && product != -1) if (vendor != -1 && product != -1)
info("probe_scanner: User specified USB scanner -- Vendor:Product - %x:%x", vendor, product); info("probe_scanner: User specified USB scanner -- Vendor:Product - %x:%x", vendor, product);
return 0; out:
return retval;
} }
module_init(usb_scanner_init); module_init(usb_scanner_init);
......
/* /*
* Driver for USB Scanners (linux-2.5) * Driver for USB Scanners (linux-2.6)
* *
* Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
* Previously maintained by Brian Beattie * Previously maintained by Brian Beattie
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
// #define DEBUG // #define DEBUG
#define DRIVER_VERSION "0.4.14" #define DRIVER_VERSION "0.4.15"
#define DRIVER_DESC "USB Scanner Driver" #define DRIVER_DESC "USB Scanner Driver"
#include <linux/usb.h> #include <linux/usb.h>
...@@ -122,7 +122,10 @@ static struct usb_device_id scanner_device_ids [] = { ...@@ -122,7 +122,10 @@ static struct usb_device_id scanner_device_ids [] = {
{ USB_DEVICE(0x04a9, 0x220d) }, /* CanoScan N670U/N676U/LIDE 20 */ { USB_DEVICE(0x04a9, 0x220d) }, /* CanoScan N670U/N676U/LIDE 20 */
{ USB_DEVICE(0x04a9, 0x220e) }, /* CanoScan N1240U/LIDE 30 */ { USB_DEVICE(0x04a9, 0x220e) }, /* CanoScan N1240U/LIDE 30 */
{ USB_DEVICE(0x04a9, 0x220f) }, /* CanoScan 8000F */ { USB_DEVICE(0x04a9, 0x220f) }, /* CanoScan 8000F */
{ USB_DEVICE(0x04a9, 0x2210) }, /* CanoScan 9900F */
{ USB_DEVICE(0x04a9, 0x2212) }, /* CanoScan 5000F */
{ USB_DEVICE(0x04a9, 0x2213) }, /* LIDE 50 */ { USB_DEVICE(0x04a9, 0x2213) }, /* LIDE 50 */
{ USB_DEVICE(0x04a9, 0x2215) }, /* CanoScan 3000 */
{ USB_DEVICE(0x04a9, 0x3042) }, /* FS4000US */ { USB_DEVICE(0x04a9, 0x3042) }, /* FS4000US */
/* Colorado -- See Primax/Colorado below */ /* Colorado -- See Primax/Colorado below */
/* Compaq */ /* Compaq */
...@@ -158,7 +161,9 @@ static struct usb_device_id scanner_device_ids [] = { ...@@ -158,7 +161,9 @@ static struct usb_device_id scanner_device_ids [] = {
// { USB_DEVICE(0x03f0, 0x0701) }, /* ScanJet 5300C - NOT SUPPORTED - use hpusbscsi driver */ // { USB_DEVICE(0x03f0, 0x0701) }, /* ScanJet 5300C - NOT SUPPORTED - use hpusbscsi driver */
{ USB_DEVICE(0x03f0, 0x0705) }, /* ScanJet 4400C */ { USB_DEVICE(0x03f0, 0x0705) }, /* ScanJet 4400C */
// { USB_DEVICE(0x03f0, 0x0801) }, /* ScanJet 7400C - NOT SUPPORTED - use hpusbscsi driver */ // { USB_DEVICE(0x03f0, 0x0801) }, /* ScanJet 7400C - NOT SUPPORTED - use hpusbscsi driver */
{ USB_DEVICE(0x03f0, 0x0805) }, /* ScanJet 4470c */
{ USB_DEVICE(0x03f0, 0x0901) }, /* ScanJet 2300C */ { USB_DEVICE(0x03f0, 0x0901) }, /* ScanJet 2300C */
{ USB_DEVICE(0x03f0, 0x0a01) }, /* ScanJet 2400c */
{ USB_DEVICE(0x03F0, 0x1005) }, /* ScanJet 5400C */ { USB_DEVICE(0x03F0, 0x1005) }, /* ScanJet 5400C */
{ USB_DEVICE(0x03F0, 0x1105) }, /* ScanJet 5470C */ { USB_DEVICE(0x03F0, 0x1105) }, /* ScanJet 5470C */
{ USB_DEVICE(0x03f0, 0x1205) }, /* ScanJet 5550C */ { USB_DEVICE(0x03f0, 0x1205) }, /* ScanJet 5550C */
...@@ -177,9 +182,11 @@ static struct usb_device_id scanner_device_ids [] = { ...@@ -177,9 +182,11 @@ static struct usb_device_id scanner_device_ids [] = {
/* Memorex */ /* Memorex */
{ USB_DEVICE(0x0461, 0x0346) }, /* 6136u - repackaged Primax ? */ { USB_DEVICE(0x0461, 0x0346) }, /* 6136u - repackaged Primax ? */
/* Microtek */ /* Microtek */
{ USB_DEVICE(0x05da, 0x20a7) }, /* ScanMaker 5600 */
{ USB_DEVICE(0x05da, 0x20c9) }, /* ScanMaker 6700 */ { USB_DEVICE(0x05da, 0x20c9) }, /* ScanMaker 6700 */
{ USB_DEVICE(0x05da, 0x30ce) }, /* ScanMaker 3800 */ { USB_DEVICE(0x05da, 0x30ce) }, /* ScanMaker 3800 */
{ USB_DEVICE(0x05da, 0x30cf) }, /* ScanMaker 4800 */ { USB_DEVICE(0x05da, 0x30cf) }, /* ScanMaker 4800 */
{ USB_DEVICE(0x05da, 0x30d4) }, /* ScanMaker 3830 + 3840 */
{ USB_DEVICE(0x04a7, 0x0224) }, /* Scanport 3000 (actually Visioneer?)*/ { USB_DEVICE(0x04a7, 0x0224) }, /* Scanport 3000 (actually Visioneer?)*/
/* The following SCSI-over-USB Microtek devices are supported by the /* The following SCSI-over-USB Microtek devices are supported by the
microtek driver: Enable SCSI and USB Microtek in kernel config */ microtek driver: Enable SCSI and USB Microtek in kernel config */
...@@ -214,6 +221,7 @@ static struct usb_device_id scanner_device_ids [] = { ...@@ -214,6 +221,7 @@ static struct usb_device_id scanner_device_ids [] = {
{ USB_DEVICE(0x055f, 0x021e) }, /* BearPaw 1200 TA/CS */ { USB_DEVICE(0x055f, 0x021e) }, /* BearPaw 1200 TA/CS */
{ USB_DEVICE(0x055f, 0x0400) }, /* BearPaw 2400 TA PRO */ { USB_DEVICE(0x055f, 0x0400) }, /* BearPaw 2400 TA PRO */
{ USB_DEVICE(0x055f, 0x0401) }, /* P 3600 A3 Pro */ { USB_DEVICE(0x055f, 0x0401) }, /* P 3600 A3 Pro */
{ USB_DEVICE(0x055f, 0x0409) }, /* BearPaw 2448TA Pro */
{ USB_DEVICE(0x055f, 0x0873) }, /* ScanExpress 600 USB */ { USB_DEVICE(0x055f, 0x0873) }, /* ScanExpress 600 USB */
{ USB_DEVICE(0x055f, 0x1000) }, /* BearPaw 4800 TA PRO */ { USB_DEVICE(0x055f, 0x1000) }, /* BearPaw 4800 TA PRO */
// { USB_DEVICE(0x05d8, 0x4002) }, /* BearPaw 1200 CU and ScanExpress 1200 UB Plus (see Artec) */ // { USB_DEVICE(0x05d8, 0x4002) }, /* BearPaw 1200 CU and ScanExpress 1200 UB Plus (see Artec) */
...@@ -279,6 +287,9 @@ static struct usb_device_id scanner_device_ids [] = { ...@@ -279,6 +287,9 @@ static struct usb_device_id scanner_device_ids [] = {
{ USB_DEVICE(0x04b8, 0x011e) }, /* Perfection 1660 Photo */ { USB_DEVICE(0x04b8, 0x011e) }, /* Perfection 1660 Photo */
{ USB_DEVICE(0x04b8, 0x0801) }, /* Stylus CX5200 */ { USB_DEVICE(0x04b8, 0x0801) }, /* Stylus CX5200 */
{ USB_DEVICE(0x04b8, 0x0802) }, /* Stylus CX3200 */ { USB_DEVICE(0x04b8, 0x0802) }, /* Stylus CX3200 */
/* Siemens */
{ USB_DEVICE(0x0681, 0x0005) }, /* ID Mouse Professional */
{ USB_DEVICE(0x0681, 0x0010) }, /* Cherry FingerTIP ID Board - Sensor */
/* SYSCAN */ /* SYSCAN */
{ USB_DEVICE(0x0a82, 0x4600) }, /* TravelScan 460/464 */ { USB_DEVICE(0x0a82, 0x4600) }, /* TravelScan 460/464 */
/* Trust */ /* Trust */
...@@ -289,6 +300,7 @@ static struct usb_device_id scanner_device_ids [] = { ...@@ -289,6 +300,7 @@ static struct usb_device_id scanner_device_ids [] = {
{ USB_DEVICE(0x1606, 0x0010) }, /* Astra 1220U */ { USB_DEVICE(0x1606, 0x0010) }, /* Astra 1220U */
{ USB_DEVICE(0x1606, 0x0030) }, /* Astra 2000U */ { USB_DEVICE(0x1606, 0x0030) }, /* Astra 2000U */
{ USB_DEVICE(0x1606, 0x0060) }, /* Astra 3400U/3450U */ { USB_DEVICE(0x1606, 0x0060) }, /* Astra 3400U/3450U */
{ USB_DEVICE(0x1606, 0x0070) }, /* Astra 4400 */
{ USB_DEVICE(0x1606, 0x0130) }, /* Astra 2100U */ { USB_DEVICE(0x1606, 0x0130) }, /* Astra 2100U */
{ USB_DEVICE(0x1606, 0x0160) }, /* Astra 5400U */ { USB_DEVICE(0x1606, 0x0160) }, /* Astra 5400U */
{ USB_DEVICE(0x1606, 0x0230) }, /* Astra 2200U */ { USB_DEVICE(0x1606, 0x0230) }, /* Astra 2200U */
...@@ -296,7 +308,8 @@ static struct usb_device_id scanner_device_ids [] = { ...@@ -296,7 +308,8 @@ static struct usb_device_id scanner_device_ids [] = {
{ USB_DEVICE(0x04a7, 0x0211) }, /* OneTouch 7600 USB */ { USB_DEVICE(0x04a7, 0x0211) }, /* OneTouch 7600 USB */
{ USB_DEVICE(0x04a7, 0x0221) }, /* OneTouch 5300 USB */ { USB_DEVICE(0x04a7, 0x0221) }, /* OneTouch 5300 USB */
{ USB_DEVICE(0x04a7, 0x0224) }, /* OneTouch 4800 USB */ { USB_DEVICE(0x04a7, 0x0224) }, /* OneTouch 4800 USB */
{ USB_DEVICE(0x04a7, 0x0226) }, /* OneTouch 5300 USB */ { USB_DEVICE(0x04a7, 0x0226) }, /* OneTouch 5800 USB */
{ USB_DEVICE(0x04a7, 0x022c) }, /* OneTouch 9020 USB */
{ USB_DEVICE(0x04a7, 0x0231) }, /* 6100 USB */ { USB_DEVICE(0x04a7, 0x0231) }, /* 6100 USB */
{ USB_DEVICE(0x04a7, 0x0311) }, /* 6200 EPP/USB */ { USB_DEVICE(0x04a7, 0x0311) }, /* 6200 EPP/USB */
{ USB_DEVICE(0x04a7, 0x0321) }, /* OneTouch 8100 EPP/USB */ { USB_DEVICE(0x04a7, 0x0321) }, /* OneTouch 8100 EPP/USB */
......
...@@ -112,8 +112,8 @@ config USB_MOUSE ...@@ -112,8 +112,8 @@ config USB_MOUSE
depends on USB && INPUT depends on USB && INPUT
---help--- ---help---
Say Y here only if you are absolutely sure that you don't want Say Y here only if you are absolutely sure that you don't want
to use the generic HID driver for your USB keyboard and prefer to use the generic HID driver for your USB mouse and prefer
to use the keyboard in its limited Boot Protocol mode instead. to use the mouse in its limited Boot Protocol mode instead.
This is almost certainly not what you want. This is mostly This is almost certainly not what you want. This is mostly
useful for embedded applications or simple mice. useful for embedded applications or simple mice.
......
...@@ -7,25 +7,6 @@ comment "USB Network adaptors" ...@@ -7,25 +7,6 @@ comment "USB Network adaptors"
comment "Networking support is needed for USB Networking device support" comment "Networking support is needed for USB Networking device support"
depends on USB && !NET depends on USB && !NET
config USB_AX8817X_STANDALONE
tristate "USB ASIX AX8817X Ethernet device support (EXPERIMENTAL)"
depends on USB && NET && EXPERIMENTAL
---help---
Say Y if you want to use one of the following 10/100Mps USB
Ethernet devices based on the ASIX AX88172 chip. Supported
devices are:
ASIX AX88172
D-Link DUB-E100
Hawking UF200
Netgear FA120
This driver makes the adapter appear as a normal Ethernet interface,
typically on eth0, if it is the only ethernet device, or perhaps on
eth1, if you have a PCI or ISA ethernet card installed.
To compile this driver as a module, choose M here: the
module will be called ax8817x.
config USB_CATC config USB_CATC
tristate "USB CATC NetMate-based Ethernet device support (EXPERIMENTAL)" tristate "USB CATC NetMate-based Ethernet device support (EXPERIMENTAL)"
depends on USB && NET && EXPERIMENTAL depends on USB && NET && EXPERIMENTAL
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# Makefile for USB Network drivers # Makefile for USB Network drivers
# #
obj-$(CONFIG_USB_AX8817X_STANDALONE) += ax8817x.o
obj-$(CONFIG_USB_CATC) += catc.o obj-$(CONFIG_USB_CATC) += catc.o
obj-$(CONFIG_USB_KAWETH) += kaweth.o obj-$(CONFIG_USB_KAWETH) += kaweth.o
obj-$(CONFIG_USB_PEGASUS) += pegasus.o obj-$(CONFIG_USB_PEGASUS) += pegasus.o
......
...@@ -2,6 +2,5 @@ ...@@ -2,6 +2,5 @@
# Makefile for USB Network drivers which require generic MII code. # Makefile for USB Network drivers which require generic MII code.
# #
obj-$(CONFIG_USB_AX8817X) += mii.o
obj-$(CONFIG_USB_PEGASUS) += mii.o obj-$(CONFIG_USB_PEGASUS) += mii.o
obj-$(CONFIG_USB_USBNET) += mii.o obj-$(CONFIG_USB_USBNET) += mii.o
This diff is collapsed.
...@@ -594,8 +594,6 @@ static inline long cond_wait_interruptible_timeout_irqrestore( ...@@ -594,8 +594,6 @@ static inline long cond_wait_interruptible_timeout_irqrestore(
timeout = schedule_timeout(timeout); timeout = schedule_timeout(timeout);
set_current_state( TASK_RUNNING );
remove_wait_queue( q, &wait ); remove_wait_queue( q, &wait );
return( timeout ); return( timeout );
......
...@@ -17,6 +17,11 @@ ...@@ -17,6 +17,11 @@
* See http://ftdi-usb-sio.sourceforge.net for upto date testing info * See http://ftdi-usb-sio.sourceforge.net for upto date testing info
* and extra documentation * and extra documentation
* *
* (21/Sep/2003) Ian Abbott
* Added VID/PID for Omnidirectional Control Technology US101 USB to
* RS-232 adapter (also rebadged as Dick Smith Electronics XH6381).
* VID/PID supplied by Donald Gordon.
*
* (19/Aug/2003) Ian Abbott * (19/Aug/2003) Ian Abbott
* Freed urb's transfer buffer in write bulk callback. * Freed urb's transfer buffer in write bulk callback.
* Omitted some paranoid checks in write bulk callback that don't matter. * Omitted some paranoid checks in write bulk callback that don't matter.
...@@ -334,6 +339,7 @@ static struct usb_device_id id_table_8U232AM [] = { ...@@ -334,6 +339,7 @@ static struct usb_device_id id_table_8U232AM [] = {
{ USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_7_PID, 0, 0x3ff) }, { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_7_PID, 0, 0x3ff) },
{ USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_8_PID, 0, 0x3ff) }, { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_8_PID, 0, 0x3ff) },
{ USB_DEVICE_VER(IDTECH_VID, IDTECH_IDT1221U_PID, 0, 0x3ff) }, { USB_DEVICE_VER(IDTECH_VID, IDTECH_IDT1221U_PID, 0, 0x3ff) },
{ USB_DEVICE_VER(OCT_VID, OCT_US101_PID, 0, 0x3ff) },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
...@@ -406,6 +412,7 @@ static struct usb_device_id id_table_FT232BM [] = { ...@@ -406,6 +412,7 @@ static struct usb_device_id id_table_FT232BM [] = {
{ USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_7_PID, 0x400, 0xffff) }, { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_7_PID, 0x400, 0xffff) },
{ USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_8_PID, 0x400, 0xffff) }, { USB_DEVICE_VER(SEALEVEL_VID, SEALEVEL_2803_8_PID, 0x400, 0xffff) },
{ USB_DEVICE_VER(IDTECH_VID, IDTECH_IDT1221U_PID, 0x400, 0xffff) }, { USB_DEVICE_VER(IDTECH_VID, IDTECH_IDT1221U_PID, 0x400, 0xffff) },
{ USB_DEVICE_VER(OCT_VID, OCT_US101_PID, 0x400, 0xffff) },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
...@@ -491,6 +498,7 @@ static struct usb_device_id id_table_combined [] = { ...@@ -491,6 +498,7 @@ static struct usb_device_id id_table_combined [] = {
{ USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_7_PID) }, { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_7_PID) },
{ USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_8_PID) }, { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_8_PID) },
{ USB_DEVICE(IDTECH_VID, IDTECH_IDT1221U_PID) }, { USB_DEVICE(IDTECH_VID, IDTECH_IDT1221U_PID) },
{ USB_DEVICE(OCT_VID, OCT_US101_PID) },
{ USB_DEVICE_VER(FTDI_VID, FTDI_HE_TIRA1_PID, 0x400, 0xffff) }, { USB_DEVICE_VER(FTDI_VID, FTDI_HE_TIRA1_PID, 0x400, 0xffff) },
{ USB_DEVICE(FTDI_VID, FTDI_USB_UIRT_PID) }, { USB_DEVICE(FTDI_VID, FTDI_USB_UIRT_PID) },
{ } /* Terminating entry */ { } /* Terminating entry */
......
...@@ -133,6 +133,13 @@ ...@@ -133,6 +133,13 @@
#define IDTECH_VID 0x0ACD /* ID TECH Vendor ID */ #define IDTECH_VID 0x0ACD /* ID TECH Vendor ID */
#define IDTECH_IDT1221U_PID 0x0300 /* IDT1221U USB to RS-232 adapter */ #define IDTECH_IDT1221U_PID 0x0300 /* IDT1221U USB to RS-232 adapter */
/*
* Definitions for Omnidirectional Control Technology, Inc. devices
*/
#define OCT_VID 0x0B39 /* OCT vendor ID */
/* Note: OCT US101 is also rebadged as Dick Smith Electronics (NZ) XH6381 */
#define OCT_US101_PID 0x0421 /* OCT US101 USB to RS-232 */
/* Commands */ /* Commands */
#define FTDI_SIO_RESET 0 /* Reset the port */ #define FTDI_SIO_RESET 0 /* Reset the port */
#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */
......
...@@ -1019,10 +1019,10 @@ int usb_serial_probe(struct usb_interface *interface, ...@@ -1019,10 +1019,10 @@ int usb_serial_probe(struct usb_interface *interface,
retval = type->probe (serial, id_pattern); retval = type->probe (serial, id_pattern);
module_put(type->owner); module_put(type->owner);
if (retval < 0) { if (retval) {
dbg ("sub driver rejected device"); dbg ("sub driver rejected device");
kfree (serial); kfree (serial);
return -ENODEV; return retval;
} }
} }
......
...@@ -1074,7 +1074,6 @@ static int usb_stor_reset_common(struct us_data *us, ...@@ -1074,7 +1074,6 @@ static int usb_stor_reset_common(struct us_data *us,
up(&us->dev_semaphore); up(&us->dev_semaphore);
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ*6); schedule_timeout(HZ*6);
set_current_state(TASK_RUNNING);
down(&us->dev_semaphore); down(&us->dev_semaphore);
if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) { if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) {
US_DEBUGP("Reset interrupted by disconnect\n"); US_DEBUGP("Reset interrupted by disconnect\n");
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#define PROT_WRITE 0x2 /* page can be written */ #define PROT_WRITE 0x2 /* page can be written */
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#define PROT_EXEC 0x04 /* page can be executed */ #define PROT_EXEC 0x04 /* page can be executed */
/* 0x08 reserved for PROT_EXEC_NOFLUSH */ /* 0x08 reserved for PROT_EXEC_NOFLUSH */
#define PROT_SEM 0x10 /* page may be used for atomic ops */ #define PROT_SEM 0x10 /* page may be used for atomic ops */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
/* /*
* Flags for mmap * Flags for mmap
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#define PROT_WRITE 0x2 /* page can be written */ #define PROT_WRITE 0x2 /* page can be written */
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#define PROT_EXEC 0x4 /* page can be executed */ #define PROT_EXEC 0x4 /* page can be executed */
#define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_SEM 0x8 #define PROT_SEM 0x8
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
#define MAP_SHARED 0x01 /* Share changes */ #define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_PRIVATE 0x02 /* Changes are private */
......
This diff is collapsed.
...@@ -106,9 +106,10 @@ enum sndrv_hwdep_iface { ...@@ -106,9 +106,10 @@ enum sndrv_hwdep_iface {
SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */ SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */
SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */ SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */
SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */ SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */
SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */
/* Don't forget to change the following: */ /* Don't forget to change the following: */
SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_MIXART, SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_USX2Y,
}; };
struct sndrv_hwdep_info { struct sndrv_hwdep_info {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* include/version.h. Generated by configure. */ /* include/version.h. Generated automatically by configure. */
#define CONFIG_SND_VERSION "0.9.6" #define CONFIG_SND_VERSION "0.9.7"
#define CONFIG_SND_DATE " (Wed Aug 20 20:27:13 2003 UTC)" #define CONFIG_SND_DATE " (Thu Sep 25 19:16:36 2003 UTC)"
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.
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