Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
409180f6
Commit
409180f6
authored
Jul 24, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge with Alan
parents
fe65ee28
25ac0ce6
Changes
42
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
1131 additions
and
1775 deletions
+1131
-1775
drivers/block/genhd.c
drivers/block/genhd.c
+0
-4
drivers/block/paride/ppc6lnx.c
drivers/block/paride/ppc6lnx.c
+0
-1
drivers/block/umem.c
drivers/block/umem.c
+2
-2
drivers/char/epca.h
drivers/char/epca.h
+1
-1
drivers/char/specialix_io8.h
drivers/char/specialix_io8.h
+1
-1
drivers/input/serio/Config.in
drivers/input/serio/Config.in
+3
-1
drivers/media/radio/miropcm20-rds-core.c
drivers/media/radio/miropcm20-rds-core.c
+2
-1
drivers/media/video/Config.in
drivers/media/video/Config.in
+0
-1
drivers/media/video/Makefile
drivers/media/video/Makefile
+3
-5
drivers/media/video/i2c-old.c
drivers/media/video/i2c-old.c
+0
-450
drivers/media/video/i2c-parport.c
drivers/media/video/i2c-parport.c
+0
-152
drivers/message/i2o/i2o_config.c
drivers/message/i2o/i2o_config.c
+47
-39
drivers/message/i2o/i2o_core.c
drivers/message/i2o/i2o_core.c
+127
-182
drivers/message/i2o/i2o_pci.c
drivers/message/i2o/i2o_pci.c
+124
-122
drivers/message/i2o/i2o_proc.c
drivers/message/i2o/i2o_proc.c
+1
-0
drivers/net/aironet4500_card.c
drivers/net/aironet4500_card.c
+1
-0
drivers/net/aironet4500_core.c
drivers/net/aironet4500_core.c
+1
-0
drivers/net/aironet4500_proc.c
drivers/net/aironet4500_proc.c
+1
-0
drivers/net/tlan.c
drivers/net/tlan.c
+73
-43
drivers/net/tlan.h
drivers/net/tlan.h
+7
-0
drivers/net/tulip/de2104x.c
drivers/net/tulip/de2104x.c
+1
-1
drivers/net/tulip/de4x5.c
drivers/net/tulip/de4x5.c
+2
-2
drivers/net/tulip/winbond-840.c
drivers/net/tulip/winbond-840.c
+1
-1
drivers/net/wireless/Config.in
drivers/net/wireless/Config.in
+1
-1
drivers/pci/quirks.c
drivers/pci/quirks.c
+16
-0
drivers/scsi/atp870u.c
drivers/scsi/atp870u.c
+580
-708
drivers/scsi/atp870u.h
drivers/scsi/atp870u.h
+7
-14
fs/read_write.c
fs/read_write.c
+13
-7
include/linux/i2o.h
include/linux/i2o.h
+87
-20
include/linux/pci_ids.h
include/linux/pci_ids.h
+3
-0
sound/isa/ad1848/ad1848_lib.c
sound/isa/ad1848/ad1848_lib.c
+1
-0
sound/pci/Config.in
sound/pci/Config.in
+1
-0
sound/pci/ali5451/ali5451.c
sound/pci/ali5451/ali5451.c
+2
-2
sound/pci/cmipci.c
sound/pci/cmipci.c
+1
-1
sound/pci/cs4281.c
sound/pci/cs4281.c
+3
-2
sound/pci/ens1370.c
sound/pci/ens1370.c
+2
-1
sound/pci/ice1712.c
sound/pci/ice1712.c
+4
-3
sound/pci/intel8x0.c
sound/pci/intel8x0.c
+2
-1
sound/pci/maestro3.c
sound/pci/maestro3.c
+2
-1
sound/pci/nm256/nm256.c
sound/pci/nm256/nm256.c
+2
-1
sound/pci/via686.c
sound/pci/via686.c
+3
-2
sound/pci/via8233.c
sound/pci/via8233.c
+3
-2
No files found.
drivers/block/genhd.c
View file @
409180f6
...
...
@@ -177,16 +177,12 @@ struct seq_operations partitions_op = {
extern
int
blk_dev_init
(
void
);
extern
int
soc_probe
(
void
);
extern
int
atmdev_init
(
void
);
extern
int
i2o_init
(
void
);
extern
int
cpqarray_init
(
void
);
int
__init
device_init
(
void
)
{
rwlock_init
(
&
gendisk_lock
);
blk_dev_init
();
#ifdef CONFIG_I2O
i2o_init
();
#endif
#ifdef CONFIG_FC4_SOC
/* This has to be done before scsi_dev_init */
soc_probe
();
...
...
drivers/block/paride/ppc6lnx.c
View file @
409180f6
...
...
@@ -724,4 +724,3 @@ static void ppc6_close(PPC *ppc)
//***************************************************************************
MODULE_LICENSE
(
"GPL"
);
drivers/block/umem.c
View file @
409180f6
...
...
@@ -819,7 +819,7 @@ static void del_battery_timer(void)
static
int
mm_revalidate
(
kdev_t
i_rdev
)
{
int
card_number
=
DEVICE_NR
(
i_rdev
);
kdev_t
device
=
mk_
m
dev
(
MAJOR_NR
,
card_number
<<
MM_SHIFT
);
kdev_t
device
=
mk_
k
dev
(
MAJOR_NR
,
card_number
<<
MM_SHIFT
);
int
res
=
dev_lock_part
(
device
);
if
(
res
<
0
)
return
res
;
...
...
@@ -862,7 +862,7 @@ static int mm_ioctl(struct inode *i, struct file *f, unsigned int cmd, unsigned
size
=
cards
[
card_number
].
mm_size
*
(
1024
/
MM_HARDSECT
);
geo
.
heads
=
64
;
geo
.
sectors
=
32
;
geo
.
start
=
get_start_sect
(
i
node
->
i_bdev
);
geo
.
start
=
get_start_sect
(
i
->
i_bdev
);
geo
.
cylinders
=
size
/
(
geo
.
heads
*
geo
.
sectors
);
if
(
copy_to_user
((
void
*
)
arg
,
&
geo
,
sizeof
(
geo
)))
...
...
drivers/char/epca.h
View file @
409180f6
...
...
@@ -121,7 +121,7 @@ struct channel
int
close_delay
;
int
count
;
int
blocked_open
;
int
event
;
ulong
event
;
int
asyncflags
;
uint
dev
;
long
session
;
...
...
drivers/char/specialix_io8.h
View file @
409180f6
...
...
@@ -110,7 +110,7 @@ struct specialix_port {
struct
tty_struct
*
tty
;
int
count
;
int
blocked_open
;
int
event
;
ulong
event
;
int
timeout
;
int
close_delay
;
long
session
;
...
...
drivers/input/serio/Config.in
View file @
409180f6
...
...
@@ -12,7 +12,9 @@ if [ "$CONFIG_SERIO_I8042" != "n" ]; then
fi
dep_tristate ' Serial port line discipline' CONFIG_SERIO_SERPORT $CONFIG_SERIO
dep_tristate ' ct82c710 Aux port controller' CONFIG_SERIO_CT82C710 $CONFIG_SERIO
dep_tristate ' Q40 keyboard controller' CONFIG_SERIO_Q40KBD $CONFIG_SERIO
if [ "$CONFIG_Q40" = "y" ]; then
dep_tristate ' Q40 keyboard controller' CONFIG_SERIO_Q40KBD $CONFIG_SERIO
fi
dep_tristate ' Parallel port keyboard adapter' CONFIG_SERIO_PARKBD $CONFIG_SERIO $CONFIG_PARPORT
if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
...
...
drivers/media/radio/miropcm20-rds-core.c
View file @
409180f6
...
...
@@ -15,8 +15,9 @@
#define _NO_VERSION_
/* #include <linux/kernel.h> */
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <asm/semaphore.h>
...
...
drivers/media/video/Config.in
View file @
409180f6
...
...
@@ -5,7 +5,6 @@ mainmenu_option next_comment
comment 'Video For Linux'
bool ' V4L information in proc filesystem' CONFIG_VIDEO_PROC_FS
dep_tristate ' I2C on parallel port' CONFIG_I2C_PARPORT $CONFIG_PARPORT $CONFIG_I2C
comment 'Video Adapters'
if [ "$CONFIG_I2C_ALGOBIT" = "y" -o "$CONFIG_I2C_ALGOBIT" = "m" ]; then
...
...
drivers/media/video/Makefile
View file @
409180f6
...
...
@@ -5,7 +5,7 @@
# All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
export-objs
:=
i2c-old.o
videodev.o bttv-if.o cpia.o video-buf.o
export-objs
:=
videodev.o bttv-if.o cpia.o video-buf.o
bttv-objs
:=
bttv-driver.o bttv-cards.o bttv-if.o
\
bttv-risc.o bttv-vbi.o
...
...
@@ -13,21 +13,19 @@ zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o
obj-$(CONFIG_VIDEO_DEV)
+=
videodev.o
obj-$(CONFIG_BUS_I2C)
+=
i2c-old.o
obj-$(CONFIG_VIDEO_BT848)
+=
bttv.o msp3400.o tvaudio.o
\
tda7432.o tda9875.o tuner.o video-buf.o
obj-$(CONFIG_SOUND_TVMIXER)
+=
tvmixer.o
obj-$(CONFIG_VIDEO_ZR36120)
+=
zoran.o
obj-$(CONFIG_I2C_PARPORT)
+=
i2c-parport.o i2c-old.o
obj-$(CONFIG_VIDEO_SAA5249)
+=
saa5249.o i2c-old.o
obj-$(CONFIG_VIDEO_SAA5249)
+=
saa5249.o
obj-$(CONFIG_VIDEO_CQCAM)
+=
c-qcam.o
obj-$(CONFIG_VIDEO_BWQCAM)
+=
bw-qcam.o
obj-$(CONFIG_VIDEO_W9966)
+=
w9966.o
obj-$(CONFIG_VIDEO_ZORAN_BUZ)
+=
saa7111.o saa7185.o
obj-$(CONFIG_VIDEO_ZORAN_DC10)
+=
saa7110.o adv7175.o
obj-$(CONFIG_VIDEO_ZORAN_LML33)
+=
bt819.o bt856.o
obj-$(CONFIG_VIDEO_ZORAN)
+=
zr36067.o
i2c-old.o
obj-$(CONFIG_VIDEO_ZORAN)
+=
zr36067.o
obj-$(CONFIG_VIDEO_PMS)
+=
pms.o
obj-$(CONFIG_VIDEO_PLANB)
+=
planb.o
obj-$(CONFIG_VIDEO_VINO)
+=
vino.o
...
...
drivers/media/video/i2c-old.c
deleted
100644 → 0
View file @
fe65ee28
/*
* Generic i2c interface for linux
*
* (c) 1998 Gerd Knorr <kraxel@cs.tu-berlin.de>
*
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/i2c-old.h>
#define REGPRINT(x) if (verbose) (x)
#define I2C_DEBUG(x) if (i2c_debug) (x)
static
int
scan
=
0
;
static
int
verbose
=
0
;
static
int
i2c_debug
=
0
;
#if LINUX_VERSION_CODE >= 0x020117
MODULE_PARM
(
scan
,
"i"
);
MODULE_PARM
(
verbose
,
"i"
);
MODULE_PARM
(
i2c_debug
,
"i"
);
#endif
/* ----------------------------------------------------------------------- */
static
struct
i2c_bus
*
busses
[
I2C_BUS_MAX
];
static
struct
i2c_driver
*
drivers
[
I2C_DRIVER_MAX
];
static
int
bus_count
=
0
,
driver_count
=
0
;
#ifdef CONFIG_VIDEO_BUZ
extern
int
saa7111_init
(
void
);
extern
int
saa7185_init
(
void
);
#endif
#ifdef CONFIG_VIDEO_LML33
extern
int
bt819_init
(
void
);
extern
int
bt856_init
(
void
);
#endif
int
i2c_init
(
void
)
{
printk
(
KERN_INFO
"i2c: initialized%s
\n
"
,
scan
?
" (i2c bus scan enabled)"
:
""
);
/* anything to do here ? */
#ifdef CONFIG_VIDEO_BUZ
saa7111_init
();
saa7185_init
();
#endif
#ifdef CONFIG_VIDEO_LML33
bt819_init
();
bt856_init
();
#endif
return
0
;
}
/* ----------------------------------------------------------------------- */
static
void
i2c_attach_device
(
struct
i2c_bus
*
bus
,
struct
i2c_driver
*
driver
)
{
struct
i2c_device
*
device
;
int
i
,
j
,
ack
=
1
;
unsigned
char
addr
;
LOCK_FLAGS
;
/* probe for device */
LOCK_I2C_BUS
(
bus
);
for
(
addr
=
driver
->
addr_l
;
addr
<=
driver
->
addr_h
;
addr
+=
2
)
{
i2c_start
(
bus
);
ack
=
i2c_sendbyte
(
bus
,
addr
,
0
);
i2c_stop
(
bus
);
if
(
!
ack
)
break
;
}
UNLOCK_I2C_BUS
(
bus
);
if
(
ack
)
return
;
/* got answer */
for
(
i
=
0
;
i
<
I2C_DEVICE_MAX
;
i
++
)
if
(
NULL
==
driver
->
devices
[
i
])
break
;
if
(
I2C_DEVICE_MAX
==
i
)
return
;
for
(
j
=
0
;
j
<
I2C_DEVICE_MAX
;
j
++
)
if
(
NULL
==
bus
->
devices
[
j
])
break
;
if
(
I2C_DEVICE_MAX
==
j
)
return
;
if
(
NULL
==
(
device
=
kmalloc
(
sizeof
(
struct
i2c_device
),
GFP_KERNEL
)))
return
;
device
->
bus
=
bus
;
device
->
driver
=
driver
;
device
->
addr
=
addr
;
/* Attach */
if
(
driver
->
attach
(
device
)
!=
0
)
{
kfree
(
device
);
return
;
}
driver
->
devices
[
i
]
=
device
;
driver
->
devcount
++
;
bus
->
devices
[
j
]
=
device
;
bus
->
devcount
++
;
if
(
bus
->
attach_inform
)
bus
->
attach_inform
(
bus
,
driver
->
id
);
REGPRINT
(
printk
(
"i2c: device attached: %s (addr=0x%02x, bus=%s, driver=%s)
\n
"
,
device
->
name
,
addr
,
bus
->
name
,
driver
->
name
));
}
static
void
i2c_detach_device
(
struct
i2c_device
*
device
)
{
int
i
;
if
(
device
->
bus
->
detach_inform
)
device
->
bus
->
detach_inform
(
device
->
bus
,
device
->
driver
->
id
);
device
->
driver
->
detach
(
device
);
for
(
i
=
0
;
i
<
I2C_DEVICE_MAX
;
i
++
)
if
(
device
==
device
->
driver
->
devices
[
i
])
break
;
if
(
I2C_DEVICE_MAX
==
i
)
{
printk
(
KERN_WARNING
"i2c: detach_device #1: device not found: %s
\n
"
,
device
->
name
);
return
;
}
device
->
driver
->
devices
[
i
]
=
NULL
;
device
->
driver
->
devcount
--
;
for
(
i
=
0
;
i
<
I2C_DEVICE_MAX
;
i
++
)
if
(
device
==
device
->
bus
->
devices
[
i
])
break
;
if
(
I2C_DEVICE_MAX
==
i
)
{
printk
(
KERN_WARNING
"i2c: detach_device #2: device not found: %s
\n
"
,
device
->
name
);
return
;
}
device
->
bus
->
devices
[
i
]
=
NULL
;
device
->
bus
->
devcount
--
;
REGPRINT
(
printk
(
"i2c: device detached: %s (addr=0x%02x, bus=%s, driver=%s)
\n
"
,
device
->
name
,
device
->
addr
,
device
->
bus
->
name
,
device
->
driver
->
name
));
kfree
(
device
);
}
/* ----------------------------------------------------------------------- */
int
i2c_register_bus
(
struct
i2c_bus
*
bus
)
{
int
i
,
ack
;
LOCK_FLAGS
;
memset
(
bus
->
devices
,
0
,
sizeof
(
bus
->
devices
));
bus
->
devcount
=
0
;
for
(
i
=
0
;
i
<
I2C_BUS_MAX
;
i
++
)
if
(
NULL
==
busses
[
i
])
break
;
if
(
I2C_BUS_MAX
==
i
)
return
-
ENOMEM
;
busses
[
i
]
=
bus
;
bus_count
++
;
REGPRINT
(
printk
(
"i2c: bus registered: %s
\n
"
,
bus
->
name
));
MOD_INC_USE_COUNT
;
if
(
scan
)
{
/* scan whole i2c bus */
LOCK_I2C_BUS
(
bus
);
for
(
i
=
0
;
i
<
256
;
i
+=
2
)
{
i2c_start
(
bus
);
ack
=
i2c_sendbyte
(
bus
,
i
,
0
);
i2c_stop
(
bus
);
if
(
!
ack
)
{
printk
(
KERN_INFO
"i2c: scanning bus %s: found device at addr=0x%02x
\n
"
,
bus
->
name
,
i
);
}
}
UNLOCK_I2C_BUS
(
bus
);
}
/* probe available drivers */
for
(
i
=
0
;
i
<
I2C_DRIVER_MAX
;
i
++
)
if
(
drivers
[
i
])
i2c_attach_device
(
bus
,
drivers
[
i
]);
return
0
;
}
int
i2c_unregister_bus
(
struct
i2c_bus
*
bus
)
{
int
i
;
/* detach devices */
for
(
i
=
0
;
i
<
I2C_DEVICE_MAX
;
i
++
)
if
(
bus
->
devices
[
i
])
i2c_detach_device
(
bus
->
devices
[
i
]);
for
(
i
=
0
;
i
<
I2C_BUS_MAX
;
i
++
)
if
(
bus
==
busses
[
i
])
break
;
if
(
I2C_BUS_MAX
==
i
)
{
printk
(
KERN_WARNING
"i2c: unregister_bus #1: bus not found: %s
\n
"
,
bus
->
name
);
return
-
ENODEV
;
}
MOD_DEC_USE_COUNT
;
busses
[
i
]
=
NULL
;
bus_count
--
;
REGPRINT
(
printk
(
"i2c: bus unregistered: %s
\n
"
,
bus
->
name
));
return
0
;
}
/* ----------------------------------------------------------------------- */
int
i2c_register_driver
(
struct
i2c_driver
*
driver
)
{
int
i
;
memset
(
driver
->
devices
,
0
,
sizeof
(
driver
->
devices
));
driver
->
devcount
=
0
;
for
(
i
=
0
;
i
<
I2C_DRIVER_MAX
;
i
++
)
if
(
NULL
==
drivers
[
i
])
break
;
if
(
I2C_DRIVER_MAX
==
i
)
return
-
ENOMEM
;
drivers
[
i
]
=
driver
;
driver_count
++
;
MOD_INC_USE_COUNT
;
REGPRINT
(
printk
(
"i2c: driver registered: %s
\n
"
,
driver
->
name
));
/* Probe available busses */
for
(
i
=
0
;
i
<
I2C_BUS_MAX
;
i
++
)
if
(
busses
[
i
])
i2c_attach_device
(
busses
[
i
],
driver
);
return
0
;
}
int
i2c_unregister_driver
(
struct
i2c_driver
*
driver
)
{
int
i
;
/* detach devices */
for
(
i
=
0
;
i
<
I2C_DEVICE_MAX
;
i
++
)
if
(
driver
->
devices
[
i
])
i2c_detach_device
(
driver
->
devices
[
i
]);
for
(
i
=
0
;
i
<
I2C_DRIVER_MAX
;
i
++
)
if
(
driver
==
drivers
[
i
])
break
;
if
(
I2C_DRIVER_MAX
==
i
)
{
printk
(
KERN_WARNING
"i2c: unregister_driver: driver not found: %s
\n
"
,
driver
->
name
);
return
-
ENODEV
;
}
MOD_DEC_USE_COUNT
;
drivers
[
i
]
=
NULL
;
driver_count
--
;
REGPRINT
(
printk
(
"i2c: driver unregistered: %s
\n
"
,
driver
->
name
));
return
0
;
}
/* ----------------------------------------------------------------------- */
int
i2c_control_device
(
struct
i2c_bus
*
bus
,
int
id
,
unsigned
int
cmd
,
void
*
arg
)
{
int
i
;
for
(
i
=
0
;
i
<
I2C_DEVICE_MAX
;
i
++
)
if
(
bus
->
devices
[
i
]
&&
bus
->
devices
[
i
]
->
driver
->
id
==
id
)
break
;
if
(
i
==
I2C_DEVICE_MAX
)
return
-
ENODEV
;
if
(
NULL
==
bus
->
devices
[
i
]
->
driver
->
command
)
return
-
ENODEV
;
return
bus
->
devices
[
i
]
->
driver
->
command
(
bus
->
devices
[
i
],
cmd
,
arg
);
}
/* ----------------------------------------------------------------------- */
#define I2C_SET(bus,ctrl,data) (bus->i2c_setlines(bus,ctrl,data))
#define I2C_GET(bus) (bus->i2c_getdataline(bus))
void
i2c_start
(
struct
i2c_bus
*
bus
)
{
I2C_SET
(
bus
,
0
,
1
);
I2C_SET
(
bus
,
1
,
1
);
I2C_SET
(
bus
,
1
,
0
);
I2C_SET
(
bus
,
0
,
0
);
I2C_DEBUG
(
printk
(
"%s: < "
,
bus
->
name
));
}
void
i2c_stop
(
struct
i2c_bus
*
bus
)
{
I2C_SET
(
bus
,
0
,
0
);
I2C_SET
(
bus
,
1
,
0
);
I2C_SET
(
bus
,
1
,
1
);
I2C_DEBUG
(
printk
(
">
\n
"
));
}
void
i2c_one
(
struct
i2c_bus
*
bus
)
{
I2C_SET
(
bus
,
0
,
1
);
I2C_SET
(
bus
,
1
,
1
);
I2C_SET
(
bus
,
0
,
1
);
}
void
i2c_zero
(
struct
i2c_bus
*
bus
)
{
I2C_SET
(
bus
,
0
,
0
);
I2C_SET
(
bus
,
1
,
0
);
I2C_SET
(
bus
,
0
,
0
);
}
int
i2c_ack
(
struct
i2c_bus
*
bus
)
{
int
ack
;
I2C_SET
(
bus
,
0
,
1
);
I2C_SET
(
bus
,
1
,
1
);
ack
=
I2C_GET
(
bus
);
I2C_SET
(
bus
,
0
,
1
);
return
ack
;
}
int
i2c_sendbyte
(
struct
i2c_bus
*
bus
,
unsigned
char
data
,
int
wait_for_ack
)
{
int
i
,
ack
;
I2C_SET
(
bus
,
0
,
0
);
for
(
i
=
7
;
i
>=
0
;
i
--
)
(
data
&
(
1
<<
i
))
?
i2c_one
(
bus
)
:
i2c_zero
(
bus
);
if
(
wait_for_ack
)
udelay
(
wait_for_ack
);
ack
=
i2c_ack
(
bus
);
I2C_DEBUG
(
printk
(
"%02x%c "
,(
int
)
data
,
ack
?
'-'
:
'+'
));
return
ack
;
}
unsigned
char
i2c_readbyte
(
struct
i2c_bus
*
bus
,
int
last
)
{
int
i
;
unsigned
char
data
=
0
;
I2C_SET
(
bus
,
0
,
1
);
for
(
i
=
7
;
i
>=
0
;
i
--
)
{
I2C_SET
(
bus
,
1
,
1
);
if
(
I2C_GET
(
bus
))
data
|=
(
1
<<
i
);
I2C_SET
(
bus
,
0
,
1
);
}
last
?
i2c_one
(
bus
)
:
i2c_zero
(
bus
);
I2C_DEBUG
(
printk
(
"=%02x%c "
,(
int
)
data
,
last
?
'-'
:
'+'
));
return
data
;
}
/* ----------------------------------------------------------------------- */
int
i2c_read
(
struct
i2c_bus
*
bus
,
unsigned
char
addr
)
{
int
ret
;
if
(
bus
->
i2c_read
)
return
bus
->
i2c_read
(
bus
,
addr
);
i2c_start
(
bus
);
i2c_sendbyte
(
bus
,
addr
,
0
);
ret
=
i2c_readbyte
(
bus
,
1
);
i2c_stop
(
bus
);
return
ret
;
}
int
i2c_write
(
struct
i2c_bus
*
bus
,
unsigned
char
addr
,
unsigned
char
data1
,
unsigned
char
data2
,
int
both
)
{
int
ack
;
if
(
bus
->
i2c_write
)
return
bus
->
i2c_write
(
bus
,
addr
,
data1
,
data2
,
both
);
i2c_start
(
bus
);
i2c_sendbyte
(
bus
,
addr
,
0
);
ack
=
i2c_sendbyte
(
bus
,
data1
,
0
);
if
(
both
)
ack
=
i2c_sendbyte
(
bus
,
data2
,
0
);
i2c_stop
(
bus
);
return
ack
?
-
1
:
0
;
}
/* ----------------------------------------------------------------------- */
#ifdef MODULE
#if LINUX_VERSION_CODE >= 0x020100
EXPORT_SYMBOL
(
i2c_register_bus
);
EXPORT_SYMBOL
(
i2c_unregister_bus
);
EXPORT_SYMBOL
(
i2c_register_driver
);
EXPORT_SYMBOL
(
i2c_unregister_driver
);
EXPORT_SYMBOL
(
i2c_control_device
);
EXPORT_SYMBOL
(
i2c_start
);
EXPORT_SYMBOL
(
i2c_stop
);
EXPORT_SYMBOL
(
i2c_one
);
EXPORT_SYMBOL
(
i2c_zero
);
EXPORT_SYMBOL
(
i2c_ack
);
EXPORT_SYMBOL
(
i2c_sendbyte
);
EXPORT_SYMBOL
(
i2c_readbyte
);
EXPORT_SYMBOL
(
i2c_read
);
EXPORT_SYMBOL
(
i2c_write
);
#endif
int
init_module
(
void
)
{
return
i2c_init
();
}
void
cleanup_module
(
void
)
{
}
#endif
MODULE_LICENSE
(
"GPL"
);
drivers/media/video/i2c-parport.c
deleted
100644 → 0
View file @
fe65ee28
/*
* I2C driver for parallel port
*
* Author: Phil Blundell <philb@gnu.org>
*
* 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 driver implements a simple I2C protocol by bit-twiddling some
* signals on the parallel port. Since the outputs on the parallel port
* aren't open collector, three lines rather than two are used:
*
* D0 clock out
* D1 data out
* BUSY data in
*/
#include <linux/parport.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/i2c-old.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#define I2C_DELAY 10
static
int
debug
=
0
;
struct
parport_i2c_bus
{
struct
i2c_bus
i2c
;
struct
parport_i2c_bus
*
next
;
};
static
struct
parport_i2c_bus
*
bus_list
;
static
spinlock_t
bus_list_lock
=
SPIN_LOCK_UNLOCKED
;
/* software I2C functions */
static
void
i2c_setlines
(
struct
i2c_bus
*
bus
,
int
clk
,
int
data
)
{
struct
parport
*
p
=
bus
->
data
;
parport_write_data
(
p
,
(
clk
?
1
:
0
)
|
(
data
?
2
:
0
));
udelay
(
I2C_DELAY
);
}
static
int
i2c_getdataline
(
struct
i2c_bus
*
bus
)
{
struct
parport
*
p
=
bus
->
data
;
return
(
parport_read_status
(
p
)
&
PARPORT_STATUS_BUSY
)
?
0
:
1
;
}
static
struct
i2c_bus
parport_i2c_bus_template
=
{
"..."
,
I2C_BUSID_PARPORT
,
NULL
,
SPIN_LOCK_UNLOCKED
,
NULL
,
NULL
,
i2c_setlines
,
i2c_getdataline
,
NULL
,
NULL
,
};
static
void
i2c_parport_attach
(
struct
parport
*
port
)
{
struct
parport_i2c_bus
*
b
=
kmalloc
(
sizeof
(
struct
parport_i2c_bus
),
GFP_KERNEL
);
if
(
!
b
)
{
printk
(
KERN_ERR
"i2c_parport: Memory allocation failed. Not attaching.
\n
"
);
return
;
}
b
->
i2c
=
parport_i2c_bus_template
;
b
->
i2c
.
data
=
parport_get_port
(
port
);
strncpy
(
b
->
i2c
.
name
,
port
->
name
,
32
);
spin_lock
(
&
bus_list_lock
);
b
->
next
=
bus_list
;
bus_list
=
b
;
spin_unlock
(
&
bus_list_lock
);
i2c_register_bus
(
&
b
->
i2c
);
if
(
debug
)
printk
(
KERN_DEBUG
"i2c: attached to %s
\n
"
,
port
->
name
);
}
static
void
i2c_parport_detach
(
struct
parport
*
port
)
{
struct
parport_i2c_bus
*
b
,
*
old_b
=
NULL
;
spin_lock
(
&
bus_list_lock
);
b
=
bus_list
;
while
(
b
)
{
if
(
b
->
i2c
.
data
==
port
)
{
if
(
old_b
)
old_b
->
next
=
b
->
next
;
else
bus_list
=
b
->
next
;
i2c_unregister_bus
(
&
b
->
i2c
);
kfree
(
b
);
break
;
}
old_b
=
b
;
b
=
b
->
next
;
}
spin_unlock
(
&
bus_list_lock
);
if
(
debug
)
printk
(
KERN_DEBUG
"i2c: detached from %s
\n
"
,
port
->
name
);
}
static
struct
parport_driver
parport_i2c_driver
=
{
"i2c"
,
i2c_parport_attach
,
i2c_parport_detach
};
#ifdef MODULE
int
init_module
(
void
)
#else
int
__init
i2c_parport_init
(
void
)
#endif
{
printk
(
"I2C: driver for parallel port v0.1 philb@gnu.org
\n
"
);
parport_register_driver
(
&
parport_i2c_driver
);
return
0
;
}
#ifdef MODULE
MODULE_PARM
(
debug
,
"i"
);
void
cleanup_module
(
void
)
{
struct
parport_i2c_bus
*
b
=
bus_list
;
while
(
b
)
{
struct
parport_i2c_bus
*
next
=
b
->
next
;
i2c_unregister_bus
(
&
b
->
i2c
);
kfree
(
b
);
b
=
next
;
}
parport_unregister_driver
(
&
parport_i2c_driver
);
}
#endif
MODULE_LICENSE
(
"GPL"
);
drivers/message/i2o/i2o_config.c
View file @
409180f6
/*
* I2O Configuration Interface Driver
*
* (C) Copyright 1999
Red Hat Software
* (C) Copyright 1999
-2002 Red Hat
*
* Written by Alan Cox, Building Number Three Ltd
*
...
...
@@ -16,17 +16,17 @@
* - Fixed ioctl_swdl()
* Modified 10/04/1999 by Taneli Vhkangas
* - Changed ioctl_swdl(), implemented ioctl_swul() and ioctl_swdel()
* Modified 11/18/199 by Deepak Saxena
* Modified 11/18/199
9
by Deepak Saxena
* - Added event managmenet support
*
* 2.4 rewrite ported to 2.5 - Alan Cox <alan@redhat.com>
*
* 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.
*/
#error Please convert me to Documentation/DMA-mapping.txt
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/pci.h>
...
...
@@ -47,7 +47,7 @@ static void *page_buf;
static
spinlock_t
i2o_config_lock
=
SPIN_LOCK_UNLOCKED
;
struct
wait_queue
*
i2o_wait_queue
;
#define MODINC(x,y) (
x = x++ % y
)
#define MODINC(x,y) (
(x) = ((x) + 1) % (y)
)
struct
i2o_cfg_info
{
...
...
@@ -279,6 +279,13 @@ int ioctl_getiops(unsigned long arg)
if
(
c
)
{
foo
[
i
]
=
1
;
if
(
pci_set_dma_mask
(
c
->
pdev
,
0xffffffff
))
{
printk
(
KERN_WARNING
"i2o_config : No suitable DMA available on controller %d
\n
"
,
i
);
i2o_unlock_controller
(
c
);
continue
;
}
i2o_unlock_controller
(
c
);
}
else
...
...
@@ -445,11 +452,12 @@ int ioctl_html(unsigned long arg)
struct
i2o_controller
*
c
;
u8
*
res
=
NULL
;
void
*
query
=
NULL
;
dma_addr_t
query_phys
,
res_phys
;
int
ret
=
0
;
int
token
;
u32
len
;
u32
reslen
;
u32
msg
[
MSG_FRAME_SIZE
/
4
];
u32
msg
[
MSG_FRAME_SIZE
];
if
(
copy_from_user
(
&
kcmd
,
cmd
,
sizeof
(
struct
i2o_html
)))
{
...
...
@@ -475,7 +483,7 @@ int ioctl_html(unsigned long arg)
if
(
kcmd
.
qlen
)
/* Check for post data */
{
query
=
kmalloc
(
kcmd
.
qlen
,
GFP_KERNEL
);
query
=
pci_alloc_consistent
(
c
->
pdev
,
kcmd
.
qlen
,
&
query_phys
);
if
(
!
query
)
{
i2o_unlock_controller
(
c
);
...
...
@@ -485,16 +493,16 @@ int ioctl_html(unsigned long arg)
{
i2o_unlock_controller
(
c
);
printk
(
KERN_INFO
"i2o_config: could not get query
\n
"
);
kfree
(
query
);
pci_free_consistent
(
c
->
pdev
,
kcmd
.
qlen
,
query
,
query_phys
);
return
-
EFAULT
;
}
}
res
=
kmalloc
(
65536
,
GFP_KERNEL
);
res
=
pci_alloc_consistent
(
c
->
pdev
,
65536
,
&
res_phys
);
if
(
!
res
)
{
i2o_unlock_controller
(
c
);
kfree
(
query
);
pci_free_consistent
(
c
->
pdev
,
kcmd
.
qlen
,
query
,
query_phys
);
return
-
ENOMEM
;
}
...
...
@@ -503,7 +511,7 @@ int ioctl_html(unsigned long arg)
msg
[
3
]
=
0
;
msg
[
4
]
=
kcmd
.
page
;
msg
[
5
]
=
0xD0000000
|
65536
;
msg
[
6
]
=
virt_to_bus
(
res
)
;
msg
[
6
]
=
res_phys
;
if
(
!
kcmd
.
qlen
)
/* Check for post data */
msg
[
0
]
=
SEVEN_WORD_MSG_SIZE
|
SGL_OFFSET_5
;
else
...
...
@@ -511,7 +519,7 @@ int ioctl_html(unsigned long arg)
msg
[
0
]
=
NINE_WORD_MSG_SIZE
|
SGL_OFFSET_5
;
msg
[
5
]
=
0x50000000
|
65536
;
msg
[
7
]
=
0xD4000000
|
(
kcmd
.
qlen
);
msg
[
8
]
=
virt_to_bus
(
query
)
;
msg
[
8
]
=
query_phys
;
}
/*
Wait for a considerable time till the Controller
...
...
@@ -519,7 +527,7 @@ int ioctl_html(unsigned long arg)
take more time to process this request if there are
many devices connected to it.
*/
token
=
i2o_post_wait_mem
(
c
,
msg
,
9
*
4
,
400
,
query
,
res
);
token
=
i2o_post_wait_mem
(
c
,
msg
,
9
*
4
,
400
,
query
,
res
,
query_phys
,
res_phys
,
kcmd
.
qlen
,
65536
);
if
(
token
<
0
)
{
printk
(
KERN_DEBUG
"token = %#10x
\n
"
,
token
);
...
...
@@ -527,10 +535,10 @@ int ioctl_html(unsigned long arg)
if
(
token
!=
-
ETIMEDOUT
)
{
kfree
(
res
);
if
(
kcmd
.
qlen
)
kfree
(
query
);
pci_free_consistent
(
c
->
pdev
,
65536
,
res
,
res_phys
);
if
(
kcmd
.
qlen
)
pci_free_consistent
(
c
->
pdev
,
kcmd
.
qlen
,
query
,
query_phys
);
}
return
token
;
}
i2o_unlock_controller
(
c
);
...
...
@@ -542,9 +550,9 @@ int ioctl_html(unsigned long arg)
if
(
copy_to_user
(
kcmd
.
resbuf
,
res
,
len
))
ret
=
-
EFAULT
;
kfree
(
re
s
);
pci_free_consistent
(
c
->
pdev
,
65536
,
res
,
res_phy
s
);
if
(
kcmd
.
qlen
)
kfree
(
query
);
pci_free_consistent
(
c
->
pdev
,
kcmd
.
qlen
,
query
,
query_phys
);
return
ret
;
}
...
...
@@ -558,6 +566,7 @@ int ioctl_swdl(unsigned long arg)
u32
msg
[
9
];
unsigned
int
status
=
0
,
swlen
=
0
,
fragsize
=
8192
;
struct
i2o_controller
*
c
;
dma_addr_t
buffer_phys
;
if
(
copy_from_user
(
&
kxfer
,
pxfer
,
sizeof
(
struct
i2o_sw_xfer
)))
return
-
EFAULT
;
...
...
@@ -580,7 +589,7 @@ int ioctl_swdl(unsigned long arg)
if
(
!
c
)
return
-
ENXIO
;
buffer
=
kmalloc
(
fragsize
,
GFP_KERNEL
);
buffer
=
pci_alloc_consistent
(
c
->
pdev
,
fragsize
,
&
buffer_phys
);
if
(
buffer
==
NULL
)
{
i2o_unlock_controller
(
c
);
...
...
@@ -597,14 +606,14 @@ int ioctl_swdl(unsigned long arg)
msg
[
5
]
=
swlen
;
msg
[
6
]
=
kxfer
.
sw_id
;
msg
[
7
]
=
(
0xD0000000
|
fragsize
);
msg
[
8
]
=
virt_to_bus
(
buffer
)
;
msg
[
8
]
=
buffer_phys
;
// printk("i2o_config: swdl frag %d/%d (size %d)\n", curfrag, maxfrag, fragsize);
status
=
i2o_post_wait_mem
(
c
,
msg
,
sizeof
(
msg
),
60
,
buffer
,
NULL
);
status
=
i2o_post_wait_mem
(
c
,
msg
,
sizeof
(
msg
),
60
,
buffer
,
NULL
,
buffer_phys
,
0
,
fragsize
,
0
);
i2o_unlock_controller
(
c
);
if
(
status
!=
-
ETIMEDOUT
)
kfree
(
buffer
);
pci_free_consistent
(
c
->
pdev
,
fragsize
,
buffer
,
buffer_phys
);
if
(
status
!=
I2O_POST_WAIT_OK
)
{
...
...
@@ -626,6 +635,7 @@ int ioctl_swul(unsigned long arg)
u32
msg
[
9
];
unsigned
int
status
=
0
,
swlen
=
0
,
fragsize
=
8192
;
struct
i2o_controller
*
c
;
dma_addr_t
buffer_phys
;
if
(
copy_from_user
(
&
kxfer
,
pxfer
,
sizeof
(
struct
i2o_sw_xfer
)))
return
-
EFAULT
;
...
...
@@ -648,7 +658,7 @@ int ioctl_swul(unsigned long arg)
if
(
!
c
)
return
-
ENXIO
;
buffer
=
kmalloc
(
fragsize
,
GFP_KERNEL
);
buffer
=
pci_alloc_consistent
(
c
->
pdev
,
fragsize
,
&
buffer_phys
);
if
(
buffer
==
NULL
)
{
i2o_unlock_controller
(
c
);
...
...
@@ -663,22 +673,22 @@ int ioctl_swul(unsigned long arg)
msg
[
5
]
=
swlen
;
msg
[
6
]
=
kxfer
.
sw_id
;
msg
[
7
]
=
(
0xD0000000
|
fragsize
);
msg
[
8
]
=
virt_to_bus
(
buffer
)
;
msg
[
8
]
=
buffer_phys
;
// printk("i2o_config: swul frag %d/%d (size %d)\n", curfrag, maxfrag, fragsize);
status
=
i2o_post_wait_mem
(
c
,
msg
,
sizeof
(
msg
),
60
,
buffer
,
NULL
);
status
=
i2o_post_wait_mem
(
c
,
msg
,
sizeof
(
msg
),
60
,
buffer
,
NULL
,
buffer_phys
,
0
,
fragsize
,
0
);
i2o_unlock_controller
(
c
);
if
(
status
!=
I2O_POST_WAIT_OK
)
{
if
(
status
!=
-
ETIMEDOUT
)
kfree
(
buffer
);
pci_free_consistent
(
c
->
pdev
,
fragsize
,
buffer
,
buffer_phys
);
printk
(
KERN_INFO
"i2o_config: swul failed, DetailedStatus = %d
\n
"
,
status
);
return
status
;
}
__copy_to_user
(
kxfer
.
buf
,
buffer
,
fragsize
);
kfree
(
buffer
);
pci_free_consistent
(
c
->
pdev
,
fragsize
,
buffer
,
buffer_phys
);
return
0
;
}
...
...
@@ -849,6 +859,7 @@ static int cfg_release(struct inode *inode, struct file *file)
struct
i2o_cfg_info
*
p1
,
*
p2
;
unsigned
long
flags
;
lock_kernel
();
p1
=
p2
=
NULL
;
spin_lock_irqsave
(
&
i2o_config_lock
,
flags
);
...
...
@@ -871,6 +882,7 @@ static int cfg_release(struct inode *inode, struct file *file)
p1
=
p1
->
next
;
}
spin_unlock_irqrestore
(
&
i2o_config_lock
,
flags
);
unlock_kernel
();
return
0
;
}
...
...
@@ -908,11 +920,7 @@ static struct miscdevice i2o_miscdev = {
&
config_fops
};
#ifdef MODULE
int
init_module
(
void
)
#else
int
__init
i2o_config_init
(
void
)
#endif
static
int
__init
i2o_config_init
(
void
)
{
printk
(
KERN_INFO
"I2O configuration manager v 0.04.
\n
"
);
printk
(
KERN_INFO
" (C) Copyright 1999 Red Hat Software
\n
"
);
...
...
@@ -946,9 +954,7 @@ int __init i2o_config_init(void)
return
0
;
}
#ifdef MODULE
void
cleanup_module
(
void
)
static
void
i2o_config_exit
(
void
)
{
misc_deregister
(
&
i2o_miscdev
);
...
...
@@ -958,8 +964,10 @@ void cleanup_module(void)
i2o_remove_handler
(
&
cfg_handler
);
}
EXPORT_NO_SYMBOLS
;
MODULE_AUTHOR
(
"Red Hat Software"
);
MODULE_DESCRIPTION
(
"I2O Configuration"
);
MODULE_LICENSE
(
"GPL"
);
#endif
module_init
(
i2o_config_init
);
module_exit
(
i2o_config_exit
);
drivers/message/i2o/i2o_core.c
View file @
409180f6
This diff is collapsed.
Click to expand it.
drivers/message/i2o/i2o_pci.c
View file @
409180f6
This diff is collapsed.
Click to expand it.
drivers/message/i2o/i2o_proc.c
View file @
409180f6
...
...
@@ -45,6 +45,7 @@
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/tqueue.h>
#include <linux/errno.h>
#include <linux/spinlock.h>
...
...
drivers/net/aironet4500_card.c
View file @
409180f6
...
...
@@ -22,6 +22,7 @@ static const char *awc_version =
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/tqueue.h>
#include <linux/ptrace.h>
#include <linux/slab.h>
#include <linux/string.h>
...
...
drivers/net/aironet4500_core.c
View file @
409180f6
...
...
@@ -22,6 +22,7 @@
#include <linux/init.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/tqueue.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
...
...
drivers/net/aironet4500_proc.c
View file @
409180f6
...
...
@@ -17,6 +17,7 @@
#include <linux/version.h>
#include <linux/sched.h>
#include <linux/tqueue.h>
#include <linux/ptrace.h>
#include <linux/slab.h>
#include <linux/string.h>
...
...
drivers/net/tlan.c
View file @
409180f6
This diff is collapsed.
Click to expand it.
drivers/net/tlan.h
View file @
409180f6
...
...
@@ -169,15 +169,22 @@ typedef u8 TLanBuffer[TLAN_MAX_FRAME_SIZE];
typedef
struct
tlan_private_tag
{
struct
net_device
*
nextDevice
;
struct
pci_dev
*
pciDev
;
void
*
dmaStorage
;
dma_addr_t
dmaStorageDMA
;
unsigned
int
dmaSize
;
u8
*
padBuffer
;
TLanList
*
rxList
;
dma_addr_t
rxListDMA
;
u8
*
rxBuffer
;
dma_addr_t
rxBufferDMA
;
u32
rxHead
;
u32
rxTail
;
u32
rxEocCount
;
TLanList
*
txList
;
dma_addr_t
txListDMA
;
u8
*
txBuffer
;
dma_addr_t
txBufferDMA
;
u32
txHead
;
u32
txInProgress
;
u32
txTail
;
...
...
drivers/net/tulip/de2104x.c
View file @
409180f6
...
...
@@ -2178,7 +2178,7 @@ static int de_suspend (struct pci_dev *pdev, u32 state)
/* Update the error counts. */
__de_get_stats
(
de
);
synchronize_irq
();
synchronize_irq
(
dev
->
irq
);
de_clean_rings
(
de
);
de_adapter_sleep
(
de
);
...
...
drivers/net/tulip/de4x5.c
View file @
409180f6
...
...
@@ -1522,7 +1522,7 @@ de4x5_sw_reset(struct net_device *dev)
outl
(
omr
|
OMR_ST
,
DE4X5_OMR
);
/* Poll for setup frame completion (adapter interrupts are disabled now) */
sti
();
/* Ensure timer interrupts */
for
(
j
=
0
,
i
=
0
;(
i
<
500
)
&&
(
j
==
0
);
i
++
)
{
/* Upto 500ms delay */
mdelay
(
1
);
if
((
s32
)
le32_to_cpu
(
lp
->
tx_ring
[
lp
->
tx_new
].
status
)
>=
0
)
j
=
1
;
...
...
@@ -1644,7 +1644,7 @@ de4x5_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if
(
test_and_set_bit
(
MASK_INTERRUPTS
,
(
void
*
)
&
lp
->
interrupt
))
printk
(
"%s: Re-entering the interrupt handler.
\n
"
,
dev
->
name
);
synchronize_irq
();
synchronize_irq
(
dev
->
irq
);
for
(
limit
=
0
;
limit
<
8
;
limit
++
)
{
sts
=
inl
(
DE4X5_STS
);
/* Read IRQ status */
...
...
drivers/net/tulip/winbond-840.c
View file @
409180f6
...
...
@@ -1674,7 +1674,7 @@ static int w840_suspend (struct pci_dev *pdev, u32 state)
spin_unlock_irq
(
&
np
->
lock
);
spin_unlock_wait
(
&
dev
->
xmit_lock
);
synchronize_irq
();
synchronize_irq
(
dev
->
irq
);
np
->
stats
.
rx_missed_errors
+=
readl
(
ioaddr
+
RxMissed
)
&
0xffff
;
...
...
drivers/net/wireless/Config.in
View file @
409180f6
...
...
@@ -33,7 +33,7 @@ if [ "$CONFIG_PCMCIA" != "n" ]; then
# 802.11b cards
dep_tristate ' Hermes PCMCIA card support' CONFIG_PCMCIA_HERMES $CONFIG_HERMES
tristate ' Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards' CONFIG_AIRO_CS
dep_tristate ' Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards' CONFIG_AIRO_CS $CONFIG_PCMCIA
fi
# yes, this works even when no drivers are selected
...
...
drivers/pci/quirks.c
View file @
409180f6
...
...
@@ -456,11 +456,27 @@ static void __init quirk_amd_ordering(struct pci_dev *dev)
}
}
/*
* DreamWorks provided workaround for Dunord I-3000 problem
*
* This card decodes and responds to addresses not apparently
* assigned to it. We force a larger allocation to ensure that
* nothing gets put too close to it.
*/
static
void
__init
quirk_dunord
(
struct
pci_dev
*
dev
)
{
struct
resource
*
r
=
&
dev
->
resource
[
1
];
r
->
start
=
0
;
r
->
end
=
0xffffff
;
}
/*
* The main table of quirks.
*/
static
struct
pci_fixup
pci_fixups
[]
__initdata
=
{
{
PCI_FIXUP_HEADER
,
PCI_VENDOR_ID_DUNORD
,
PCI_DEVICE_ID_DUNORD_I3000
,
quirk_dunord
},
{
PCI_FIXUP_FINAL
,
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82441
,
quirk_passive_release
},
{
PCI_FIXUP_FINAL
,
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82441
,
quirk_passive_release
},
/*
...
...
drivers/scsi/atp870u.c
View file @
409180f6
This diff is collapsed.
Click to expand it.
drivers/scsi/atp870u.h
View file @
409180f6
...
...
@@ -17,14 +17,12 @@
#define MAX_CDB 12
#define MAX_SENSE 14
int
atp870u_detect
(
Scsi_Host_Template
*
);
int
atp870u_command
(
Scsi_Cmnd
*
);
int
atp870u_queuecommand
(
Scsi_Cmnd
*
,
void
(
*
done
)
(
Scsi_Cmnd
*
));
int
atp870u_abort
(
Scsi_Cmnd
*
);
int
atp870u_reset
(
Scsi_Cmnd
*
,
unsigned
int
);
int
atp870u_biosparam
(
Disk
*
,
struct
block_device
*
,
int
*
);
int
atp870u_release
(
struct
Scsi_Host
*
);
void
send_s870
(
unsigned
char
);
static
int
atp870u_detect
(
Scsi_Host_Template
*
);
static
int
atp870u_command
(
Scsi_Cmnd
*
);
static
int
atp870u_queuecommand
(
Scsi_Cmnd
*
,
void
(
*
done
)
(
Scsi_Cmnd
*
));
static
int
atp870u_abort
(
Scsi_Cmnd
*
);
static
int
atp870u_biosparam
(
Disk
*
,
struct
block_device
*
,
int
*
);
static
int
atp870u_release
(
struct
Scsi_Host
*
);
#define qcnt 32
#define ATP870U_SCATTER 128
...
...
@@ -49,12 +47,7 @@ extern int atp870u_proc_info(char *, char **, off_t, int, int, int);
command: atp870u_command, \
queuecommand: atp870u_queuecommand, \
eh_strategy_handler: NULL, \
eh_abort_handler: NULL, \
eh_device_reset_handler: NULL, \
eh_bus_reset_handler: NULL, \
eh_host_reset_handler: NULL, \
abort: atp870u_abort, \
reset: atp870u_reset, \
eh_abort_handler: atp870u_abort, \
slave_attach: NULL, \
bios_param: atp870u_biosparam, \
can_queue: qcnt,
/* max simultaneous cmds */
\
...
...
fs/read_write.c
View file @
409180f6
...
...
@@ -301,17 +301,23 @@ static ssize_t do_readv_writev(int type, struct file *file,
if
(
copy_from_user
(
iov
,
vector
,
count
*
sizeof
(
*
vector
)))
goto
out
;
/* BSD readv/writev returns EINVAL if one of the iov_len
values < 0 or tot_len overflowed a 32-bit integer. -ink */
/*
* Single unix specification:
* We should -EINVAL if an element length is not >= 0 and fitting an ssize_t
* The total length is fitting an ssize_t
*
* Be careful here because iov_len is a size_t not an ssize_t
*/
tot_len
=
0
;
ret
=
-
EINVAL
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
size_t
tmp
=
tot_len
;
int
len
=
iov
[
i
].
iov_len
;
if
(
len
<
0
)
s
s
ize_t
tmp
=
tot_len
;
ssize_t
len
=
(
ssize_t
)
iov
[
i
].
iov_len
;
if
(
len
<
0
)
/* size_t not fitting an ssize_t .. */
goto
out
;
(
u32
)
tot_len
+=
len
;
if
(
tot_len
<
tmp
||
tot_len
<
(
u32
)
len
)
tot_len
+=
len
;
if
(
tot_len
<
tmp
)
/* maths overflow on the ssize_t */
goto
out
;
}
...
...
include/linux/i2o.h
View file @
409180f6
...
...
@@ -81,9 +81,9 @@ struct i2o_device
struct
i2o_pci
{
int
irq
;
int
queue_buggy
:
3
;
/* Don't send a lot of messages */
int
short_req
:
1
;
/* Use small block sizes */
int
dpt
:
1
;
/* Don't quiesce */
int
promise
:
1
;
/* Promise controller */
#ifdef CONFIG_MTRR
int
mtrr_reg0
;
int
mtrr_reg1
;
...
...
@@ -112,9 +112,9 @@ struct i2o_controller
atomic_t
users
;
struct
i2o_device
*
devices
;
/* I2O device chain */
struct
i2o_controller
*
next
;
/* Controller chain */
volatile
u32
*
post_port
;
/* Inbout port
*/
volatile
u32
*
reply_port
;
/* Outbound port
*/
volatile
u32
*
irq_mask
;
/* Interrupt register
*/
unsigned
long
post_port
;
/* Inbout port address
*/
unsigned
long
reply_port
;
/* Outbound port address
*/
unsigned
long
irq_mask
;
/* Interrupt register address
*/
/* Dynamic LCT related data */
struct
semaphore
lct_sem
;
...
...
@@ -122,12 +122,17 @@ struct i2o_controller
int
lct_running
;
i2o_status_block
*
status_block
;
/* IOP status block */
dma_addr_t
status_block_phys
;
i2o_lct
*
lct
;
/* Logical Config Table */
dma_addr_t
lct_phys
;
i2o_lct
*
dlct
;
/* Temp LCT */
dma_addr_t
dlct_phys
;
i2o_hrt
*
hrt
;
/* HW Resource Table */
dma_addr_t
hrt_phys
;
u32
hrt_len
;
u
32
mem_offset
;
/* MFA offset */
u
32
mem_phys
;
/* MFA physical */
u
nsigned
long
mem_offset
;
/* MFA offset */
u
nsigned
long
mem_phys
;
/* MFA physical */
int
battery
:
1
;
/* Has a battery backup */
int
io_alloc
:
1
;
/* An I/O resource was allocated */
...
...
@@ -252,34 +257,34 @@ struct i2o_sys_tbl
*/
static
inline
u32
I2O_POST_READ32
(
struct
i2o_controller
*
c
)
{
return
*
c
->
post_port
;
return
readl
(
c
->
post_port
)
;
}
static
inline
void
I2O_POST_WRITE32
(
struct
i2o_controller
*
c
,
u32
V
al
)
static
inline
void
I2O_POST_WRITE32
(
struct
i2o_controller
*
c
,
u32
v
al
)
{
*
c
->
post_port
=
Val
;
writel
(
val
,
c
->
post_port
)
;
}
static
inline
u32
I2O_REPLY_READ32
(
struct
i2o_controller
*
c
)
{
return
*
c
->
reply_port
;
return
readl
(
c
->
reply_port
)
;
}
static
inline
void
I2O_REPLY_WRITE32
(
struct
i2o_controller
*
c
,
u32
V
al
)
static
inline
void
I2O_REPLY_WRITE32
(
struct
i2o_controller
*
c
,
u32
v
al
)
{
*
c
->
reply_port
=
Val
;
writel
(
val
,
c
->
reply_port
)
;
}
static
inline
u32
I2O_IRQ_READ32
(
struct
i2o_controller
*
c
)
{
return
*
c
->
irq_mask
;
return
readl
(
c
->
irq_mask
)
;
}
static
inline
void
I2O_IRQ_WRITE32
(
struct
i2o_controller
*
c
,
u32
V
al
)
static
inline
void
I2O_IRQ_WRITE32
(
struct
i2o_controller
*
c
,
u32
v
al
)
{
*
c
->
irq_mask
=
Val
;
writel
(
val
,
c
->
irq_mask
)
;
}
...
...
@@ -295,6 +300,13 @@ static inline void i2o_flush_reply(struct i2o_controller *c, u32 m)
I2O_REPLY_WRITE32
(
c
,
m
);
}
/*
* Endian handling wrapped into the macro - keeps the core code
* cleaner.
*/
#define i2o_raw_writel(val, mem) __raw_writel(cpu_to_le32(val), mem)
extern
struct
i2o_controller
*
i2o_find_controller
(
int
);
extern
void
i2o_unlock_controller
(
struct
i2o_controller
*
);
extern
struct
i2o_controller
*
i2o_controller_chain
;
...
...
@@ -313,7 +325,7 @@ extern int i2o_device_notify_off(struct i2o_device *,
extern
int
i2o_post_this
(
struct
i2o_controller
*
,
u32
*
,
int
);
extern
int
i2o_post_wait
(
struct
i2o_controller
*
,
u32
*
,
int
,
int
);
extern
int
i2o_post_wait_mem
(
struct
i2o_controller
*
,
u32
*
,
int
,
int
,
void
*
,
void
*
);
void
*
,
void
*
,
dma_addr_t
,
dma_addr_t
,
int
,
int
);
extern
int
i2o_query_scalar
(
struct
i2o_controller
*
,
int
,
int
,
int
,
void
*
,
int
);
...
...
@@ -339,6 +351,59 @@ extern int i2o_activate_controller(struct i2o_controller *);
extern
void
i2o_run_queue
(
struct
i2o_controller
*
);
extern
int
i2o_delete_controller
(
struct
i2o_controller
*
);
/*
* Cache strategies
*/
/* The NULL strategy leaves everything up to the controller. This tends to be a
* pessimal but functional choice.
*/
#define CACHE_NULL 0
/* Prefetch data when reading. We continually attempt to load the next 32 sectors
* into the controller cache.
*/
#define CACHE_PREFETCH 1
/* Prefetch data when reading. We sometimes attempt to load the next 32 sectors
* into the controller cache. When an I/O is less <= 8K we assume its probably
* not sequential and don't prefetch (default)
*/
#define CACHE_SMARTFETCH 2
/* Data is written to the cache and then out on to the disk. The I/O must be
* physically on the medium before the write is acknowledged (default without
* NVRAM)
*/
#define CACHE_WRITETHROUGH 17
/* Data is written to the cache and then out on to the disk. The controller
* is permitted to write back the cache any way it wants. (default if battery
* backed NVRAM is present). It can be useful to set this for swap regardless of
* battery state.
*/
#define CACHE_WRITEBACK 18
/* Optimise for under powered controllers, especially on RAID1 and RAID0. We
* write large I/O's directly to disk bypassing the cache to avoid the extra
* memory copy hits. Small writes are writeback cached
*/
#define CACHE_SMARTBACK 19
/* Optimise for under powered controllers, especially on RAID1 and RAID0. We
* write large I/O's directly to disk bypassing the cache to avoid the extra
* memory copy hits. Small writes are writethrough cached. Suitable for devices
* lacking battery backup
*/
#define CACHE_SMARTTHROUGH 20
/*
* Ioctl structures
*/
#define BLKI2OGRSTRAT _IOR('2', 1, int)
#define BLKI2OGWSTRAT _IOR('2', 2, int)
#define BLKI2OSRSTRAT _IOW('2', 3, int)
#define BLKI2OSWSTRAT _IOW('2', 4, int)
/*
* I2O Function codes
...
...
@@ -416,6 +481,7 @@ extern int i2o_delete_controller(struct i2o_controller *);
#define I2O_CMD_BLOCK_MUNLOCK 0x4B
#define I2O_CMD_BLOCK_MMOUNT 0x41
#define I2O_CMD_BLOCK_MEJECT 0x43
#define I2O_CMD_BLOCK_POWER 0x70
#define I2O_PRIVATE_MSG 0xFF
...
...
@@ -574,6 +640,7 @@ extern int i2o_delete_controller(struct i2o_controller *);
#define EIGHT_WORD_MSG_SIZE 0x00080000
#define NINE_WORD_MSG_SIZE 0x00090000
#define TEN_WORD_MSG_SIZE 0x000A0000
#define ELEVEN_WORD_MSG_SIZE 0x000B0000
#define I2O_MESSAGE_SIZE(x) ((x)<<16)
...
...
@@ -582,10 +649,10 @@ extern int i2o_delete_controller(struct i2o_controller *);
#define ADAPTER_TID 0
#define HOST_TID 1
#define MSG_FRAME_SIZE
128
#define MSG_FRAME_SIZE
64
/* i2o_scsi assumes >= 32 */
#define NMBR_MSG_FRAMES 128
#define MSG_POOL_SIZE
16384
#define MSG_POOL_SIZE
(MSG_FRAME_SIZE*NMBR_MSG_FRAMES*sizeof(u32))
#define I2O_POST_WAIT_OK 0
#define I2O_POST_WAIT_TIMEOUT -ETIMEDOUT
...
...
include/linux/pci_ids.h
View file @
409180f6
...
...
@@ -1612,6 +1612,9 @@
#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001
#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002
#define PCI_VENDOR_ID_DUNORD 0x5544
#define PCI_DEVICE_ID_DUNORD_I3000 0x0001
#define PCI_VENDOR_ID_GENROCO 0x5555
#define PCI_DEVICE_ID_GENROCO_HFP832 0x0003
...
...
sound/isa/ad1848/ad1848_lib.c
View file @
409180f6
...
...
@@ -26,6 +26,7 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <sound/core.h>
#include <sound/ad1848.h>
...
...
sound/pci/Config.in
View file @
409180f6
...
...
@@ -8,6 +8,7 @@ dep_tristate 'Cirrus Logic (Sound Fusion) CS4280/CS461x/CS462x/CS463x' CONFIG_SN
if [ "$CONFIG_SND_CS46XX" != "n" ]; then
bool ' Cirrus Logic (Sound Fusion) MMAP support for OSS' CONFIG_SND_CS46XX_ACCEPT_VALID
fi
dep_tristate 'Cirrus Logic (Sound Fusion) CS4281' CONFIG_SND_CS4281 $CONFIG_SND
dep_tristate 'EMU10K1 (SB Live!, E-mu APS)' CONFIG_SND_EMU10K1 $CONFIG_SND
dep_tristate 'Korg 1212 IO' CONFIG_SND_KORG1212 $CONFIG_SND
dep_tristate 'NeoMagic NM256AV/ZX' CONFIG_SND_NM256 $CONFIG_SND
...
...
sound/pci/ali5451/ali5451.c
View file @
409180f6
...
...
@@ -1968,7 +1968,7 @@ static void snd_ali_resume(struct pci_dev *dev)
static
int
snd_ali_free
(
ali_t
*
codec
)
{
snd_ali_disable_address_interrupt
(
codec
);
synchronize_irq
();
synchronize_irq
(
codec
->
irq
);
if
(
codec
->
irq
>=
0
)
free_irq
(
codec
->
irq
,
(
void
*
)
codec
);
if
(
codec
->
res_port
)
{
...
...
@@ -2116,7 +2116,7 @@ static int __devinit snd_ali_create(snd_card_t * card,
return
-
EBUSY
;
}
synchronize_irq
();
synchronize_irq
(
pci
->
irq
);
codec
->
synth
.
chmap
=
0
;
codec
->
synth
.
chcnt
=
0
;
...
...
sound/pci/cmipci.c
View file @
409180f6
...
...
@@ -2479,7 +2479,7 @@ static int snd_cmipci_free(cmipci_t *cm)
/* reset mixer */
snd_cmipci_mixer_write
(
cm
,
0
,
0
);
synchronize_irq
(
dev
->
irq
);
synchronize_irq
(
cm
->
irq
);
free_irq
(
cm
->
irq
,
(
void
*
)
cm
);
}
...
...
sound/pci/cs4281.c
View file @
409180f6
...
...
@@ -1300,7 +1300,8 @@ static int snd_cs4281_free(cs4281_t *chip)
}
#endif
snd_cs4281_proc_done
(
chip
);
synchronize_irq
();
if
(
chip
->
irq
>=
0
)
synchronize_irq
(
chip
->
irq
);
/* Mask interrupts */
snd_cs4281_pokeBA0
(
chip
,
BA0_HIMR
,
0x7fffffff
);
...
...
@@ -1603,7 +1604,7 @@ static int __devinit snd_cs4281_create(snd_card_t * card,
BA0_HISR_DMA
(
1
)
|
BA0_HISR_DMA
(
2
)
|
BA0_HISR_DMA
(
3
)));
synchronize_irq
();
synchronize_irq
(
chip
->
irq
);
if
((
err
=
snd_device_new
(
card
,
SNDRV_DEV_LOWLEVEL
,
chip
,
&
ops
))
<
0
)
{
snd_cs4281_free
(
chip
);
...
...
sound/pci/ens1370.c
View file @
409180f6
...
...
@@ -1532,6 +1532,7 @@ static int snd_ensoniq_free(ensoniq_t *ensoniq)
outl
(
0
,
ES_REG
(
ensoniq
,
CONTROL
));
/* switch everything off */
outl
(
0
,
ES_REG
(
ensoniq
,
SERIAL
));
/* clear serial interface */
#endif
if
(
ensoniq
->
irq
>=
0
)
synchronize_irq
(
ensoniq
->
irq
);
pci_set_power_state
(
ensoniq
->
pci
,
3
);
__hw_end:
...
...
sound/pci/ice1712.c
View file @
409180f6
...
...
@@ -4070,9 +4070,10 @@ static int snd_ice1712_free(ice1712_t *ice)
/* --- */
__hw_end:
snd_ice1712_proc_done
(
ice
);
synchronize_irq
();
if
(
ice
->
irq
)
if
(
ice
->
irq
)
{
synchronize_irq
(
ice
->
irq
);
free_irq
(
ice
->
irq
,
(
void
*
)
ice
);
}
if
(
ice
->
res_port
)
{
release_resource
(
ice
->
res_port
);
kfree_nocheck
(
ice
->
res_port
);
...
...
@@ -4143,7 +4144,7 @@ static int __devinit snd_ice1712_create(snd_card_t * card,
pci_write_config_word
(
ice
->
pci
,
0x40
,
0x807f
);
pci_write_config_word
(
ice
->
pci
,
0x42
,
0x0006
);
snd_ice1712_proc_init
(
ice
);
synchronize_irq
();
synchronize_irq
(
ice
->
irq
);
if
((
ice
->
res_port
=
request_region
(
ice
->
port
,
32
,
"ICE1712 - Controller"
))
==
NULL
)
{
snd_ice1712_free
(
ice
);
...
...
sound/pci/intel8x0.c
View file @
409180f6
...
...
@@ -1104,6 +1104,7 @@ static int snd_intel8x0_free(intel8x0_t *chip)
outb
(
ICH_RESETREGS
,
ICHREG
(
chip
,
PO_CR
));
outb
(
ICH_RESETREGS
,
ICHREG
(
chip
,
MC_CR
));
/* --- */
if
(
chip
->
irq
>=
0
)
synchronize_irq
(
chip
->
irq
);
__hw_end:
if
(
chip
->
bdbars
)
...
...
sound/pci/maestro3.c
View file @
409180f6
...
...
@@ -2310,7 +2310,8 @@ static int snd_m3_free(m3_t *chip)
vfree
(
chip
->
suspend_mem
);
#endif
synchronize_irq
();
if
(
chip
->
irq
>=
0
)
synchronize_irq
(
chip
->
irq
);
if
(
chip
->
iobase_res
)
{
release_resource
(
chip
->
iobase_res
);
...
...
sound/pci/nm256/nm256.c
View file @
409180f6
...
...
@@ -1346,7 +1346,8 @@ static int snd_nm256_free(nm256_t *chip)
if
(
chip
->
streams
[
SNDRV_PCM_STREAM_CAPTURE
].
running
)
snd_nm256_capture_stop
(
chip
);
synchronize_irq
();
if
(
chip
->
irq
>=
0
)
synchronize_irq
(
chip
->
irq
);
if
(
chip
->
cport
)
iounmap
((
void
*
)
chip
->
cport
);
...
...
sound/pci/via686.c
View file @
409180f6
...
...
@@ -993,7 +993,8 @@ static int snd_via686a_free(via686a_t *chip)
snd_via686a_channel_reset
(
chip
,
&
chip
->
playback_fm
);
/* --- */
__end_hw:
synchronize_irq
();
if
(
chip
->
irq
>=
0
)
synchronize_irq
(
chip
->
irq
);
if
(
chip
->
tables
)
snd_free_pci_pages
(
chip
->
pci
,
3
*
sizeof
(
unsigned
int
)
*
VIA_MAX_FRAGS
*
2
,
chip
->
tables
,
chip
->
tables_addr
);
if
(
chip
->
res_port
)
{
...
...
@@ -1055,7 +1056,7 @@ static int __devinit snd_via686a_create(snd_card_t * card,
if
(
ac97_clock
>=
8000
&&
ac97_clock
<=
48000
)
chip
->
ac97_clock
=
ac97_clock
;
pci_read_config_byte
(
pci
,
PCI_REVISION_ID
,
&
chip
->
revision
);
synchronize_irq
();
synchronize_irq
(
pci
->
irq
);
/* initialize offsets */
chip
->
playback
.
reg_offset
=
VIA_REG_PLAYBACK_STATUS
;
...
...
sound/pci/via8233.c
View file @
409180f6
...
...
@@ -759,7 +759,8 @@ static int snd_via8233_free(via8233_t *chip)
snd_via8233_channel_reset
(
chip
,
&
chip
->
capture
);
/* --- */
__end_hw:
synchronize_irq
();
if
(
chip
->
irq
)
synchronize_irq
(
chip
->
irq
);
if
(
chip
->
tables
)
snd_free_pci_pages
(
chip
->
pci
,
VIA_NUM_OF_DMA_CHANNELS
*
sizeof
(
unsigned
int
)
*
VIA_MAX_FRAGS
*
2
,
...
...
@@ -817,7 +818,7 @@ static int __devinit snd_via8233_create(snd_card_t * card,
if
(
ac97_clock
>=
8000
&&
ac97_clock
<=
48000
)
chip
->
ac97_clock
=
ac97_clock
;
pci_read_config_byte
(
pci
,
PCI_REVISION_ID
,
&
chip
->
revision
);
synchronize_irq
();
synchronize_irq
(
chip
->
irq
);
/* initialize offsets */
#if 0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment