Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
67846b30
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
67846b30
编写于
10月 05, 2005
作者:
J
Jeff Garzik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
libata: add ata_ratelimit(), use it in AHCI driver irq handler
上级
643736a5
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
50 addition
and
6 deletion
+50
-6
drivers/scsi/ahci.c
drivers/scsi/ahci.c
+25
-6
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+23
-0
include/linux/libata.h
include/linux/libata.h
+2
-0
未找到文件。
drivers/scsi/ahci.c
浏览文件 @
67846b30
...
@@ -672,19 +672,38 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *
...
@@ -672,19 +672,38 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *
for
(
i
=
0
;
i
<
host_set
->
n_ports
;
i
++
)
{
for
(
i
=
0
;
i
<
host_set
->
n_ports
;
i
++
)
{
struct
ata_port
*
ap
;
struct
ata_port
*
ap
;
u32
tmp
;
VPRINTK
(
"port %u
\n
"
,
i
);
if
(
!
(
irq_stat
&
(
1
<<
i
)))
continue
;
ap
=
host_set
->
ports
[
i
];
ap
=
host_set
->
ports
[
i
];
tmp
=
irq_stat
&
(
1
<<
i
);
if
(
ap
)
{
if
(
tmp
&&
ap
)
{
struct
ata_queued_cmd
*
qc
;
struct
ata_queued_cmd
*
qc
;
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
if
(
ahci_host_intr
(
ap
,
qc
))
if
(
!
ahci_host_intr
(
ap
,
qc
))
irq_ack
|=
(
1
<<
i
);
if
(
ata_ratelimit
())
{
struct
pci_dev
*
pdev
=
to_pci_dev
(
ap
->
host_set
->
dev
);
printk
(
KERN_WARNING
"ahci(%s): unhandled interrupt on port %u
\n
"
,
pci_name
(
pdev
),
i
);
}
VPRINTK
(
"port %u
\n
"
,
i
);
}
else
{
VPRINTK
(
"port %u (no irq)
\n
"
,
i
);
if
(
ata_ratelimit
())
{
struct
pci_dev
*
pdev
=
to_pci_dev
(
ap
->
host_set
->
dev
);
printk
(
KERN_WARNING
"ahci(%s): interrupt on disabled port %u
\n
"
,
pci_name
(
pdev
),
i
);
}
}
}
}
irq_ack
|=
(
1
<<
i
);
}
if
(
irq_ack
)
{
if
(
irq_ack
)
{
writel
(
irq_ack
,
mmio
+
HOST_IRQ_STAT
);
writel
(
irq_ack
,
mmio
+
HOST_IRQ_STAT
);
handled
=
1
;
handled
=
1
;
...
...
drivers/scsi/libata-core.c
浏览文件 @
67846b30
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
#include <linux/completion.h>
#include <linux/completion.h>
#include <linux/suspend.h>
#include <linux/suspend.h>
#include <linux/workqueue.h>
#include <linux/workqueue.h>
#include <linux/jiffies.h>
#include <scsi/scsi.h>
#include <scsi/scsi.h>
#include "scsi.h"
#include "scsi.h"
#include "scsi_priv.h"
#include "scsi_priv.h"
...
@@ -4688,6 +4689,27 @@ static void __exit ata_exit(void)
...
@@ -4688,6 +4689,27 @@ static void __exit ata_exit(void)
module_init
(
ata_init
);
module_init
(
ata_init
);
module_exit
(
ata_exit
);
module_exit
(
ata_exit
);
static
unsigned
long
ratelimit_time
;
static
spinlock_t
ata_ratelimit_lock
=
SPIN_LOCK_UNLOCKED
;
int
ata_ratelimit
(
void
)
{
int
rc
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
ata_ratelimit_lock
,
flags
);
if
(
time_after
(
jiffies
,
ratelimit_time
))
{
rc
=
1
;
ratelimit_time
=
jiffies
+
(
HZ
/
5
);
}
else
rc
=
0
;
spin_unlock_irqrestore
(
&
ata_ratelimit_lock
,
flags
);
return
rc
;
}
/*
/*
* libata is essentially a library of internal helper functions for
* libata is essentially a library of internal helper functions for
* low-level ATA host controller drivers. As such, the API/ABI is
* low-level ATA host controller drivers. As such, the API/ABI is
...
@@ -4729,6 +4751,7 @@ EXPORT_SYMBOL_GPL(sata_phy_reset);
...
@@ -4729,6 +4751,7 @@ EXPORT_SYMBOL_GPL(sata_phy_reset);
EXPORT_SYMBOL_GPL
(
__sata_phy_reset
);
EXPORT_SYMBOL_GPL
(
__sata_phy_reset
);
EXPORT_SYMBOL_GPL
(
ata_bus_reset
);
EXPORT_SYMBOL_GPL
(
ata_bus_reset
);
EXPORT_SYMBOL_GPL
(
ata_port_disable
);
EXPORT_SYMBOL_GPL
(
ata_port_disable
);
EXPORT_SYMBOL_GPL
(
ata_ratelimit
);
EXPORT_SYMBOL_GPL
(
ata_scsi_ioctl
);
EXPORT_SYMBOL_GPL
(
ata_scsi_ioctl
);
EXPORT_SYMBOL_GPL
(
ata_scsi_queuecmd
);
EXPORT_SYMBOL_GPL
(
ata_scsi_queuecmd
);
EXPORT_SYMBOL_GPL
(
ata_scsi_error
);
EXPORT_SYMBOL_GPL
(
ata_scsi_error
);
...
...
include/linux/libata.h
浏览文件 @
67846b30
...
@@ -410,6 +410,8 @@ extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmn
...
@@ -410,6 +410,8 @@ extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmn
extern
int
ata_scsi_error
(
struct
Scsi_Host
*
host
);
extern
int
ata_scsi_error
(
struct
Scsi_Host
*
host
);
extern
int
ata_scsi_release
(
struct
Scsi_Host
*
host
);
extern
int
ata_scsi_release
(
struct
Scsi_Host
*
host
);
extern
unsigned
int
ata_host_intr
(
struct
ata_port
*
ap
,
struct
ata_queued_cmd
*
qc
);
extern
unsigned
int
ata_host_intr
(
struct
ata_port
*
ap
,
struct
ata_queued_cmd
*
qc
);
extern
int
ata_ratelimit
(
void
);
/*
/*
* Default driver ops implementations
* Default driver ops implementations
*/
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录