Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
fe05f541
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
fe05f541
编写于
3月 01, 2006
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge
git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6
上级
e5cef95d
67bc6200
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
78 addition
and
25 deletion
+78
-25
drivers/char/pcmcia/cm4000_cs.c
drivers/char/pcmcia/cm4000_cs.c
+21
-3
drivers/char/pcmcia/cm4040_cs.c
drivers/char/pcmcia/cm4040_cs.c
+20
-3
drivers/ide/legacy/ide-cs.c
drivers/ide/legacy/ide-cs.c
+1
-0
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/axnet_cs.c
+1
-0
drivers/net/wireless/hostap/hostap_cs.c
drivers/net/wireless/hostap/hostap_cs.c
+4
-1
drivers/pcmcia/ds.c
drivers/pcmcia/ds.c
+22
-18
include/pcmcia/device_id.h
include/pcmcia/device_id.h
+9
-0
未找到文件。
drivers/char/pcmcia/cm4000_cs.c
浏览文件 @
fe05f541
...
...
@@ -13,11 +13,12 @@
*
* (C) 2000,2001,2002,2003,2004 Omnikey AG
*
* (C) 2005 Harald Welte <laforge@gnumonks.org>
* (C) 2005
-2006
Harald Welte <laforge@gnumonks.org>
* - Adhere to Kernel CodingStyle
* - Port to 2.6.13 "new" style PCMCIA
* - Check for copy_{from,to}_user return values
* - Use nonseekable_open()
* - add class interface for udev device creation
*
* All rights reserved. Licensed under dual BSD/GPL license.
*/
...
...
@@ -56,7 +57,7 @@ module_param(pc_debug, int, 0600);
#else
#define DEBUGP(n, rdr, x, args...)
#endif
static
char
*
version
=
"cm4000_cs.c v2.4.0gm
5
- All bugs added by Harald Welte"
;
static
char
*
version
=
"cm4000_cs.c v2.4.0gm
6
- All bugs added by Harald Welte"
;
#define T_1SEC (HZ)
#define T_10MSEC msecs_to_jiffies(10)
...
...
@@ -156,6 +157,7 @@ struct cm4000_dev {
/*queue*/
4*sizeof(wait_queue_head_t))
static
dev_link_t
*
dev_table
[
CM4000_MAX_DEV
];
static
struct
class
*
cmm_class
;
/* This table doesn't use spaces after the comma between fields and thus
* violates CodingStyle. However, I don't really think wrapping it around will
...
...
@@ -1937,6 +1939,9 @@ static int cm4000_attach(struct pcmcia_device *p_dev)
link
->
state
|=
DEV_PRESENT
|
DEV_CONFIG_PENDING
;
cm4000_config
(
link
,
i
);
class_device_create
(
cmm_class
,
NULL
,
MKDEV
(
major
,
i
),
NULL
,
"cmm%d"
,
i
);
return
0
;
}
...
...
@@ -1962,6 +1967,8 @@ static void cm4000_detach(struct pcmcia_device *p_dev)
dev_table
[
devno
]
=
NULL
;
kfree
(
dev
);
class_device_destroy
(
cmm_class
,
MKDEV
(
major
,
devno
));
return
;
}
...
...
@@ -1995,8 +2002,18 @@ static struct pcmcia_driver cm4000_driver = {
static
int
__init
cmm_init
(
void
)
{
int
rc
;
printk
(
KERN_INFO
"%s
\n
"
,
version
);
pcmcia_register_driver
(
&
cm4000_driver
);
cmm_class
=
class_create
(
THIS_MODULE
,
"cardman_4000"
);
if
(
!
cmm_class
)
return
-
1
;
rc
=
pcmcia_register_driver
(
&
cm4000_driver
);
if
(
rc
<
0
)
return
rc
;
major
=
register_chrdev
(
0
,
DEVICE_NAME
,
&
cm4000_fops
);
if
(
major
<
0
)
{
printk
(
KERN_WARNING
MODULE_NAME
...
...
@@ -2012,6 +2029,7 @@ static void __exit cmm_exit(void)
printk
(
KERN_INFO
MODULE_NAME
": unloading
\n
"
);
pcmcia_unregister_driver
(
&
cm4000_driver
);
unregister_chrdev
(
major
,
DEVICE_NAME
);
class_destroy
(
cmm_class
);
};
module_init
(
cmm_init
);
...
...
drivers/char/pcmcia/cm4040_cs.c
浏览文件 @
fe05f541
...
...
@@ -3,12 +3,13 @@
*
* (c) 2000-2004 Omnikey AG (http://www.omnikey.com/)
*
* (C) 2005 Harald Welte <laforge@gnumonks.org>
* (C) 2005
-2006
Harald Welte <laforge@gnumonks.org>
* - add support for poll()
* - driver cleanup
* - add waitqueues
* - adhere to linux kernel coding style and policies
* - support 2.6.13 "new style" pcmcia interface
* - add class interface for udev device creation
*
* The device basically is a USB CCID compliant device that has been
* attached to an I/O-Mapped FIFO.
...
...
@@ -53,7 +54,7 @@ module_param(pc_debug, int, 0600);
#endif
static
char
*
version
=
"OMNIKEY CardMan 4040 v1.1.0gm
4
- All bugs added by Harald Welte"
;
"OMNIKEY CardMan 4040 v1.1.0gm
5
- All bugs added by Harald Welte"
;
#define CCID_DRIVER_BULK_DEFAULT_TIMEOUT (150*HZ)
#define CCID_DRIVER_ASYNC_POWERUP_TIMEOUT (35*HZ)
...
...
@@ -67,6 +68,7 @@ static char *version =
static
void
reader_release
(
dev_link_t
*
link
);
static
int
major
;
static
struct
class
*
cmx_class
;
#define BS_READABLE 0x01
#define BS_WRITABLE 0x02
...
...
@@ -696,6 +698,9 @@ static int reader_attach(struct pcmcia_device *p_dev)
link
->
state
|=
DEV_PRESENT
|
DEV_CONFIG_PENDING
;
reader_config
(
link
,
i
);
class_device_create
(
cmx_class
,
NULL
,
MKDEV
(
major
,
i
),
NULL
,
"cmx%d"
,
i
);
return
0
;
}
...
...
@@ -721,6 +726,8 @@ static void reader_detach(struct pcmcia_device *p_dev)
dev_table
[
devno
]
=
NULL
;
kfree
(
dev
);
class_device_destroy
(
cmx_class
,
MKDEV
(
major
,
devno
));
return
;
}
...
...
@@ -755,8 +762,17 @@ static struct pcmcia_driver reader_driver = {
static
int
__init
cm4040_init
(
void
)
{
int
rc
;
printk
(
KERN_INFO
"%s
\n
"
,
version
);
pcmcia_register_driver
(
&
reader_driver
);
cmx_class
=
class_create
(
THIS_MODULE
,
"cardman_4040"
);
if
(
!
cmx_class
)
return
-
1
;
rc
=
pcmcia_register_driver
(
&
reader_driver
);
if
(
rc
<
0
)
return
rc
;
major
=
register_chrdev
(
0
,
DEVICE_NAME
,
&
reader_fops
);
if
(
major
<
0
)
{
printk
(
KERN_WARNING
MODULE_NAME
...
...
@@ -771,6 +787,7 @@ static void __exit cm4040_exit(void)
printk
(
KERN_INFO
MODULE_NAME
": unloading
\n
"
);
pcmcia_unregister_driver
(
&
reader_driver
);
unregister_chrdev
(
major
,
DEVICE_NAME
);
class_destroy
(
cmx_class
);
}
module_init
(
cm4040_init
);
...
...
drivers/ide/legacy/ide-cs.c
浏览文件 @
fe05f541
...
...
@@ -445,6 +445,7 @@ static struct pcmcia_device_id ide_ids[] = {
PCMCIA_DEVICE_PROD_ID12
(
"PCMCIA"
,
"PnPIDE"
,
0x281f1c5d
,
0x0c694728
),
PCMCIA_DEVICE_PROD_ID12
(
"SHUTTLE TECHNOLOGY LTD."
,
"PCCARD-IDE/ATAPI Adapter"
,
0x4a3f0ba0
,
0x322560e1
),
PCMCIA_DEVICE_PROD_ID12
(
"TOSHIBA"
,
"MK2001MPL"
,
0xb4585a1a
,
0x3489e003
),
PCMCIA_DEVICE_PROD_ID1
(
"TRANSCEND 512M "
,
0xd0909443
),
PCMCIA_DEVICE_PROD_ID12
(
"WIT"
,
"IDE16"
,
0x244e5994
,
0x3e232852
),
PCMCIA_DEVICE_PROD_ID1
(
"STI Flash"
,
0xe4a13209
),
PCMCIA_DEVICE_PROD_ID12
(
"STI"
,
"Flash 5.0"
,
0xbf2df18d
,
0x8cb57a0e
),
...
...
drivers/net/pcmcia/axnet_cs.c
浏览文件 @
fe05f541
...
...
@@ -806,6 +806,7 @@ static struct pcmcia_device_id axnet_ids[] = {
PCMCIA_DEVICE_MANF_CARD
(
0x026f
,
0x0309
),
PCMCIA_DEVICE_MANF_CARD
(
0x0274
,
0x1106
),
PCMCIA_DEVICE_MANF_CARD
(
0x8a01
,
0xc1ab
),
PCMCIA_DEVICE_PROD_ID12
(
"AmbiCom,Inc."
,
"Fast Ethernet PC Card(AMB8110)"
,
0x49b020a7
,
0x119cc9fc
),
PCMCIA_DEVICE_PROD_ID124
(
"Fast Ethernet"
,
"16-bit PC Card"
,
"AX88190"
,
0xb4be14e3
,
0x9a12eb6a
,
0xab9be5ef
),
PCMCIA_DEVICE_PROD_ID12
(
"ASIX"
,
"AX88190"
,
0x0959823b
,
0xab9be5ef
),
PCMCIA_DEVICE_PROD_ID12
(
"Billionton"
,
"LNA-100B"
,
0x552ab682
,
0xbc3b87e1
),
...
...
drivers/net/wireless/hostap/hostap_cs.c
浏览文件 @
fe05f541
...
...
@@ -877,7 +877,6 @@ static struct pcmcia_device_id hostap_cs_ids[] = {
PCMCIA_DEVICE_MANF_CARD
(
0x0101
,
0x0777
),
PCMCIA_DEVICE_MANF_CARD
(
0x0126
,
0x8000
),
PCMCIA_DEVICE_MANF_CARD
(
0x0138
,
0x0002
),
PCMCIA_DEVICE_MANF_CARD
(
0x0156
,
0x0002
),
PCMCIA_DEVICE_MANF_CARD
(
0x0250
,
0x0002
),
PCMCIA_DEVICE_MANF_CARD
(
0x026f
,
0x030b
),
PCMCIA_DEVICE_MANF_CARD
(
0x0274
,
0x1612
),
...
...
@@ -891,6 +890,10 @@ static struct pcmcia_device_id hostap_cs_ids[] = {
PCMCIA_DEVICE_MANF_CARD
(
0xd601
,
0x0002
),
PCMCIA_DEVICE_MANF_CARD
(
0xd601
,
0x0005
),
PCMCIA_DEVICE_MANF_CARD
(
0xd601
,
0x0010
),
PCMCIA_DEVICE_MANF_CARD_PROD_ID1
(
0x0156
,
0x0002
,
"INTERSIL"
,
0x74c5e40d
),
PCMCIA_DEVICE_MANF_CARD_PROD_ID1
(
0x0156
,
0x0002
,
"Intersil"
,
0x4b801a17
),
PCMCIA_MFC_DEVICE_PROD_ID12
(
0
,
"SanDisk"
,
"ConnectPlus"
,
0x7a954bd9
,
0x74be00c6
),
PCMCIA_DEVICE_PROD_ID1234
(
...
...
drivers/pcmcia/ds.c
浏览文件 @
fe05f541
...
...
@@ -352,11 +352,20 @@ static void pcmcia_release_dev(struct device *dev)
kfree
(
p_dev
);
}
static
void
pcmcia_add_pseudo_device
(
struct
pcmcia_socket
*
s
)
{
if
(
!
s
->
pcmcia_state
.
device_add_pending
)
{
s
->
pcmcia_state
.
device_add_pending
=
1
;
schedule_work
(
&
s
->
device_add
);
}
return
;
}
static
int
pcmcia_device_probe
(
struct
device
*
dev
)
{
struct
pcmcia_device
*
p_dev
;
struct
pcmcia_driver
*
p_drv
;
struct
pcmcia_device_id
*
did
;
struct
pcmcia_socket
*
s
;
int
ret
=
0
;
...
...
@@ -392,6 +401,19 @@ static int pcmcia_device_probe(struct device * dev)
}
ret
=
p_drv
->
probe
(
p_dev
);
if
(
ret
)
goto
put_module
;
/* handle pseudo multifunction devices:
* there are at most two pseudo multifunction devices.
* if we're matching against the first, schedule a
* call which will then check whether there are two
* pseudo devices, and if not, add the second one.
*/
did
=
(
struct
pcmcia_device_id
*
)
p_dev
->
dev
.
driver_data
;
if
((
did
->
match_flags
&
PCMCIA_DEV_ID_MATCH_DEVICE_NO
)
&&
(
p_dev
->
socket
->
device_count
==
1
)
&&
(
p_dev
->
device_no
==
0
))
pcmcia_add_pseudo_device
(
p_dev
->
socket
);
put_module:
if
(
ret
)
...
...
@@ -660,15 +682,6 @@ static void pcmcia_delayed_add_pseudo_device(void *data)
s
->
pcmcia_state
.
device_add_pending
=
0
;
}
static
inline
void
pcmcia_add_pseudo_device
(
struct
pcmcia_socket
*
s
)
{
if
(
!
s
->
pcmcia_state
.
device_add_pending
)
{
s
->
pcmcia_state
.
device_add_pending
=
1
;
schedule_work
(
&
s
->
device_add
);
}
return
;
}
static
int
pcmcia_requery
(
struct
device
*
dev
,
void
*
_data
)
{
struct
pcmcia_device
*
p_dev
=
to_pcmcia_dev
(
dev
);
...
...
@@ -755,15 +768,6 @@ static inline int pcmcia_devmatch(struct pcmcia_device *dev,
}
if
(
did
->
match_flags
&
PCMCIA_DEV_ID_MATCH_DEVICE_NO
)
{
/* handle pseudo multifunction devices:
* there are at most two pseudo multifunction devices.
* if we're matching against the first, schedule a
* call which will then check whether there are two
* pseudo devices, and if not, add the second one.
*/
if
(
dev
->
device_no
==
0
)
pcmcia_add_pseudo_device
(
dev
->
socket
);
if
(
dev
->
device_no
!=
did
->
device_no
)
return
0
;
}
...
...
include/pcmcia/device_id.h
浏览文件 @
fe05f541
...
...
@@ -72,6 +72,15 @@
.prod_id = { (v1), (v2), (v3), (v4) }, \
.prod_id_hash = { (vh1), (vh2), (vh3), (vh4) }, }
#define PCMCIA_DEVICE_MANF_CARD_PROD_ID1(manf, card, v1, vh1) { \
.match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
PCMCIA_DEV_ID_MATCH_CARD_ID| \
PCMCIA_DEV_ID_MATCH_PROD_ID1, \
.manf_id = (manf), \
.card_id = (card), \
.prod_id = { (v1), NULL, NULL, NULL }, \
.prod_id_hash = { (vh1), 0, 0, 0 }, }
/* multi-function devices */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录