Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
12436c30
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
12436c30
编写于
5月 15, 2006
作者:
T
Tejun Heo
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'irq-pio'
Conflicts: drivers/scsi/libata-core.c include/linux/libata.h
上级
88ce7550
7894eaf2
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
550 addition
and
348 deletion
+550
-348
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+495
-308
drivers/scsi/libata-eh.c
drivers/scsi/libata-eh.c
+1
-1
drivers/scsi/pdc_adma.c
drivers/scsi/pdc_adma.c
+4
-4
drivers/scsi/sata_mv.c
drivers/scsi/sata_mv.c
+3
-3
drivers/scsi/sata_nv.c
drivers/scsi/sata_nv.c
+2
-2
drivers/scsi/sata_promise.c
drivers/scsi/sata_promise.c
+4
-3
drivers/scsi/sata_qstor.c
drivers/scsi/sata_qstor.c
+5
-6
drivers/scsi/sata_sx4.c
drivers/scsi/sata_sx4.c
+3
-3
drivers/scsi/sata_vsc.c
drivers/scsi/sata_vsc.c
+11
-4
include/linux/ata.h
include/linux/ata.h
+12
-0
include/linux/libata.h
include/linux/libata.h
+10
-14
未找到文件。
drivers/scsi/libata-core.c
浏览文件 @
12436c30
此差异已折叠。
点击以展开。
drivers/scsi/libata-eh.c
浏览文件 @
12436c30
...
...
@@ -350,7 +350,7 @@ static void ata_qc_timeout(struct ata_queued_cmd *qc)
qc
->
tf
.
command
,
drv_stat
,
host_stat
);
/* complete taskfile transaction */
qc
->
err_mask
|=
ac_err_mask
(
drv_stat
)
;
qc
->
err_mask
|=
AC_ERR_TIMEOUT
;
break
;
}
...
...
drivers/scsi/pdc_adma.c
浏览文件 @
12436c30
...
...
@@ -455,13 +455,13 @@ static inline unsigned int adma_intr_pkt(struct ata_host_set *host_set)
continue
;
handled
=
1
;
adma_enter_reg_mode
(
ap
);
if
(
ap
->
flags
&
(
ATA_FLAG_DISABLED
|
ATA_FLAG_NOINTR
)
)
if
(
ap
->
flags
&
ATA_FLAG_DISABLED
)
continue
;
pp
=
ap
->
private_data
;
if
(
!
pp
||
pp
->
state
!=
adma_state_pkt
)
continue
;
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
if
(
qc
&&
(
!
(
qc
->
tf
.
ctl
&
ATA_NIEN
)))
{
if
(
qc
&&
(
!
(
qc
->
tf
.
flags
&
ATA_TFLAG_POLLING
)))
{
if
((
status
&
(
aPERR
|
aPSD
|
aUIRQ
)))
qc
->
err_mask
|=
AC_ERR_OTHER
;
else
if
(
pp
->
pkt
[
0
]
!=
cDONE
)
...
...
@@ -480,13 +480,13 @@ static inline unsigned int adma_intr_mmio(struct ata_host_set *host_set)
for
(
port_no
=
0
;
port_no
<
host_set
->
n_ports
;
++
port_no
)
{
struct
ata_port
*
ap
;
ap
=
host_set
->
ports
[
port_no
];
if
(
ap
&&
(
!
(
ap
->
flags
&
(
ATA_FLAG_DISABLED
|
ATA_FLAG_NOINTR
)
)))
{
if
(
ap
&&
(
!
(
ap
->
flags
&
ATA_FLAG_DISABLED
)))
{
struct
ata_queued_cmd
*
qc
;
struct
adma_port_priv
*
pp
=
ap
->
private_data
;
if
(
!
pp
||
pp
->
state
!=
adma_state_mmio
)
continue
;
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
if
(
qc
&&
(
!
(
qc
->
tf
.
ctl
&
ATA_NIEN
)))
{
if
(
qc
&&
(
!
(
qc
->
tf
.
flags
&
ATA_TFLAG_POLLING
)))
{
/* check main status, clearing INTRQ */
u8
status
=
ata_check_status
(
ap
);
...
...
drivers/scsi/sata_mv.c
浏览文件 @
12436c30
...
...
@@ -87,7 +87,7 @@ enum {
MV_FLAG_IRQ_COALESCE
=
(
1
<<
29
),
/* IRQ coalescing capability */
MV_COMMON_FLAGS
=
(
ATA_FLAG_SATA
|
ATA_FLAG_NO_LEGACY
|
ATA_FLAG_SATA_RESET
|
ATA_FLAG_MMIO
|
ATA_FLAG_
NO_ATAPI
),
ATA_FLAG_
PIO_POLLING
),
MV_6XXX_FLAGS
=
MV_FLAG_IRQ_COALESCE
,
CRQB_FLAG_READ
=
(
1
<<
0
),
...
...
@@ -1396,7 +1396,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
}
}
if
(
ap
->
flags
&
(
ATA_FLAG_DISABLED
|
ATA_FLAG_NOINTR
))
if
(
ap
&&
(
ap
->
flags
&
ATA_FLAG_DISABLED
))
continue
;
err_mask
=
ac_err_mask
(
ata_status
);
...
...
@@ -1417,7 +1417,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
VPRINTK
(
"port %u IRQ found for qc, "
"ata_status 0x%x
\n
"
,
port
,
ata_status
);
/* mark qc status appropriately */
if
(
!
(
qc
->
tf
.
ctl
&
ATA_NIEN
))
{
if
(
!
(
qc
->
tf
.
flags
&
ATA_TFLAG_POLLING
))
{
qc
->
err_mask
|=
err_mask
;
ata_qc_complete
(
qc
);
}
...
...
drivers/scsi/sata_nv.c
浏览文件 @
12436c30
...
...
@@ -279,11 +279,11 @@ static irqreturn_t nv_interrupt (int irq, void *dev_instance,
ap
=
host_set
->
ports
[
i
];
if
(
ap
&&
!
(
ap
->
flags
&
(
ATA_FLAG_DISABLED
|
ATA_FLAG_NOINTR
)
))
{
!
(
ap
->
flags
&
ATA_FLAG_DISABLED
))
{
struct
ata_queued_cmd
*
qc
;
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
if
(
qc
&&
(
!
(
qc
->
tf
.
ctl
&
ATA_NIEN
)))
if
(
qc
&&
(
!
(
qc
->
tf
.
flags
&
ATA_TFLAG_POLLING
)))
handled
+=
ata_host_intr
(
ap
,
qc
);
else
// No request pending? Clear interrupt status
...
...
drivers/scsi/sata_promise.c
浏览文件 @
12436c30
...
...
@@ -76,7 +76,8 @@ enum {
PDC_RESET
=
(
1
<<
11
),
/* HDMA reset */
PDC_COMMON_FLAGS
=
ATA_FLAG_NO_LEGACY
|
ATA_FLAG_SRST
|
ATA_FLAG_MMIO
|
ATA_FLAG_NO_ATAPI
,
ATA_FLAG_MMIO
|
ATA_FLAG_NO_ATAPI
|
ATA_FLAG_PIO_POLLING
,
};
...
...
@@ -534,11 +535,11 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r
ap
=
host_set
->
ports
[
i
];
tmp
=
mask
&
(
1
<<
(
i
+
1
));
if
(
tmp
&&
ap
&&
!
(
ap
->
flags
&
(
ATA_FLAG_DISABLED
|
ATA_FLAG_NOINTR
)
))
{
!
(
ap
->
flags
&
ATA_FLAG_DISABLED
))
{
struct
ata_queued_cmd
*
qc
;
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
if
(
qc
&&
(
!
(
qc
->
tf
.
ctl
&
ATA_NIEN
)))
if
(
qc
&&
(
!
(
qc
->
tf
.
flags
&
ATA_TFLAG_POLLING
)))
handled
+=
pdc_host_intr
(
ap
,
qc
);
}
}
...
...
drivers/scsi/sata_qstor.c
浏览文件 @
12436c30
...
...
@@ -175,7 +175,7 @@ static const struct ata_port_info qs_port_info[] = {
.
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_NO_LEGACY
|
ATA_FLAG_SATA_RESET
|
//FIXME ATA_FLAG_SRST |
ATA_FLAG_MMIO
,
ATA_FLAG_MMIO
|
ATA_FLAG_PIO_POLLING
,
.
pio_mask
=
0x10
,
/* pio4 */
.
udma_mask
=
0x7f
,
/* udma0-6 */
.
port_ops
=
&
qs_ata_ops
,
...
...
@@ -394,14 +394,13 @@ static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set)
DPRINTK
(
"SFF=%08x%08x: sCHAN=%u sHST=%d sDST=%02x
\n
"
,
sff1
,
sff0
,
port_no
,
sHST
,
sDST
);
handled
=
1
;
if
(
ap
&&
!
(
ap
->
flags
&
(
ATA_FLAG_DISABLED
|
ATA_FLAG_NOINTR
)))
{
if
(
ap
&&
!
(
ap
->
flags
&
ATA_FLAG_DISABLED
))
{
struct
ata_queued_cmd
*
qc
;
struct
qs_port_priv
*
pp
=
ap
->
private_data
;
if
(
!
pp
||
pp
->
state
!=
qs_state_pkt
)
continue
;
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
if
(
qc
&&
(
!
(
qc
->
tf
.
ctl
&
ATA_NIEN
)))
{
if
(
qc
&&
(
!
(
qc
->
tf
.
flags
&
ATA_TFLAG_POLLING
)))
{
switch
(
sHST
)
{
case
0
:
/* successful CPB */
case
3
:
/* device error */
...
...
@@ -428,13 +427,13 @@ static inline unsigned int qs_intr_mmio(struct ata_host_set *host_set)
struct
ata_port
*
ap
;
ap
=
host_set
->
ports
[
port_no
];
if
(
ap
&&
!
(
ap
->
flags
&
(
ATA_FLAG_DISABLED
|
ATA_FLAG_NOINTR
)
))
{
!
(
ap
->
flags
&
ATA_FLAG_DISABLED
))
{
struct
ata_queued_cmd
*
qc
;
struct
qs_port_priv
*
pp
=
ap
->
private_data
;
if
(
!
pp
||
pp
->
state
!=
qs_state_mmio
)
continue
;
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
if
(
qc
&&
(
!
(
qc
->
tf
.
ctl
&
ATA_NIEN
)))
{
if
(
qc
&&
(
!
(
qc
->
tf
.
flags
&
ATA_TFLAG_POLLING
)))
{
/* check main status, clearing INTRQ */
u8
status
=
ata_check_status
(
ap
);
...
...
drivers/scsi/sata_sx4.c
浏览文件 @
12436c30
...
...
@@ -218,7 +218,7 @@ static const struct ata_port_info pdc_port_info[] = {
.
sht
=
&
pdc_sata_sht
,
.
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_NO_LEGACY
|
ATA_FLAG_SRST
|
ATA_FLAG_MMIO
|
ATA_FLAG_
NO_ATAPI
,
ATA_FLAG_
PIO_POLLING
,
.
pio_mask
=
0x1f
,
/* pio0-4 */
.
mwdma_mask
=
0x07
,
/* mwdma0-2 */
.
udma_mask
=
0x7f
,
/* udma0-6 ; FIXME */
...
...
@@ -833,11 +833,11 @@ static irqreturn_t pdc20621_interrupt (int irq, void *dev_instance, struct pt_re
tmp
=
mask
&
(
1
<<
i
);
VPRINTK
(
"seq %u, port_no %u, ap %p, tmp %x
\n
"
,
i
,
port_no
,
ap
,
tmp
);
if
(
tmp
&&
ap
&&
!
(
ap
->
flags
&
(
ATA_FLAG_DISABLED
|
ATA_FLAG_NOINTR
)
))
{
!
(
ap
->
flags
&
ATA_FLAG_DISABLED
))
{
struct
ata_queued_cmd
*
qc
;
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
if
(
qc
&&
(
!
(
qc
->
tf
.
ctl
&
ATA_NIEN
)))
if
(
qc
&&
(
!
(
qc
->
tf
.
flags
&
ATA_TFLAG_POLLING
)))
handled
+=
pdc20621_host_intr
(
ap
,
qc
,
(
i
>
4
),
mmio_base
);
}
...
...
drivers/scsi/sata_vsc.c
浏览文件 @
12436c30
...
...
@@ -221,14 +221,21 @@ static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance,
ap
=
host_set
->
ports
[
i
];
if
(
ap
&&
!
(
ap
->
flags
&
(
ATA_FLAG_DISABLED
|
ATA_FLAG_NOINTR
)))
{
if
(
is_vsc_sata_int_err
(
i
,
int_status
))
{
u32
err_status
;
printk
(
KERN_DEBUG
"%s: ignoring interrupt(s)
\n
"
,
__FUNCTION__
);
err_status
=
ap
?
vsc_sata_scr_read
(
ap
,
SCR_ERROR
)
:
0
;
vsc_sata_scr_write
(
ap
,
SCR_ERROR
,
err_status
);
handled
++
;
}
if
(
ap
&&
!
(
ap
->
flags
&
ATA_FLAG_DISABLED
))
{
struct
ata_queued_cmd
*
qc
;
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
if
(
qc
&&
(
!
(
qc
->
tf
.
ctl
&
ATA_NIEN
)))
{
if
(
qc
&&
(
!
(
qc
->
tf
.
flags
&
ATA_TFLAG_POLLING
)))
handled
+=
ata_host_intr
(
ap
,
qc
);
}
else
if
(
is_vsc_sata_int_err
(
i
,
int_status
))
{
else
if
(
is_vsc_sata_int_err
(
i
,
int_status
))
{
/*
* On some chips (i.e. Intel 31244), an error
* interrupt will sneak in at initialization
...
...
include/linux/ata.h
浏览文件 @
12436c30
...
...
@@ -212,6 +212,7 @@ enum {
ATA_TFLAG_WRITE
=
(
1
<<
3
),
/* data dir: host->dev==1 (write) */
ATA_TFLAG_LBA
=
(
1
<<
4
),
/* enable LBA */
ATA_TFLAG_FUA
=
(
1
<<
5
),
/* enable FUA */
ATA_TFLAG_POLLING
=
(
1
<<
6
),
/* set nIEN to 1 and use polling */
};
enum
ata_tf_protocols
{
...
...
@@ -285,6 +286,8 @@ struct ata_taskfile {
((u64) (id)[(n) + 1] << 16) | \
((u64) (id)[(n) + 0]) )
#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20)
static
inline
unsigned
int
ata_id_major_version
(
const
u16
*
id
)
{
unsigned
int
mver
;
...
...
@@ -324,6 +327,15 @@ static inline int is_atapi_taskfile(const struct ata_taskfile *tf)
(
tf
->
protocol
==
ATA_PROT_ATAPI_DMA
);
}
static
inline
int
is_multi_taskfile
(
struct
ata_taskfile
*
tf
)
{
return
(
tf
->
command
==
ATA_CMD_READ_MULTI
)
||
(
tf
->
command
==
ATA_CMD_WRITE_MULTI
)
||
(
tf
->
command
==
ATA_CMD_READ_MULTI_EXT
)
||
(
tf
->
command
==
ATA_CMD_WRITE_MULTI_EXT
)
||
(
tf
->
command
==
ATA_CMD_WRITE_MULTI_FUA_EXT
);
}
static
inline
int
ata_ok
(
u8
status
)
{
return
((
status
&
(
ATA_BUSY
|
ATA_DRDY
|
ATA_DF
|
ATA_DRQ
|
ATA_ERR
))
...
...
include/linux/libata.h
浏览文件 @
12436c30
...
...
@@ -124,6 +124,7 @@ enum {
/* struct ata_device stuff */
ATA_DFLAG_LBA
=
(
1
<<
0
),
/* device supports LBA */
ATA_DFLAG_LBA48
=
(
1
<<
1
),
/* device supports LBA48 */
ATA_DFLAG_CDB_INTR
=
(
1
<<
2
),
/* device asserts INTRQ when ready for CDB */
ATA_DFLAG_CFG_MASK
=
(
1
<<
8
)
-
1
,
ATA_DFLAG_PIO
=
(
1
<<
8
),
/* device currently in PIO mode */
...
...
@@ -147,9 +148,9 @@ enum {
ATA_FLAG_PIO_DMA
=
(
1
<<
7
),
/* PIO cmds via DMA */
ATA_FLAG_PIO_LBA48
=
(
1
<<
8
),
/* Host DMA engine is LBA28 only */
ATA_FLAG_IRQ_MASK
=
(
1
<<
9
),
/* Mask IRQ in PIO xfers */
ATA_FLAG_PIO_POLLING
=
(
1
<<
10
),
/* use polling PIO if LLD
* doesn't handle PIO interrupts */
ATA_FLAG_NOINTR
=
(
1
<<
13
),
/* FIXME: Remove this once
* proper HSM is in place. */
ATA_FLAG_DEBUGMSG
=
(
1
<<
14
),
ATA_FLAG_FLUSH_PORT_TASK
=
(
1
<<
15
),
/* flush port task */
...
...
@@ -178,11 +179,8 @@ enum {
ATA_HOST_SIMPLEX
=
(
1
<<
0
),
/* Host is simplex, one DMA channel per host_set only */
/* various lengths of time */
ATA_TMOUT_PIO
=
30
*
HZ
,
ATA_TMOUT_BOOT
=
30
*
HZ
,
/* heuristic */
ATA_TMOUT_BOOT_QUICK
=
7
*
HZ
,
/* heuristic */
ATA_TMOUT_CDB
=
30
*
HZ
,
ATA_TMOUT_CDB_QUICK
=
5
*
HZ
,
ATA_TMOUT_INTERNAL
=
30
*
HZ
,
ATA_TMOUT_INTERNAL_QUICK
=
5
*
HZ
,
...
...
@@ -252,14 +250,13 @@ enum {
};
enum
hsm_task_states
{
HSM_ST_UNKNOWN
,
HSM_ST_IDLE
,
HSM_ST_POLL
,
HSM_ST_TMOUT
,
HSM_ST
,
HSM_ST_LAST
,
HSM_ST_LAST_POLL
,
HSM_ST_ERR
,
HSM_ST_UNKNOWN
,
/* state unknown */
HSM_ST_IDLE
,
/* no command on going */
HSM_ST
,
/* (waiting the device to) transfer data */
HSM_ST_LAST
,
/* (waiting the device to) complete command */
HSM_ST_ERR
,
/* error */
HSM_ST_FIRST
,
/* (waiting the device to)
write CDB or first data block */
};
enum
ata_completion_errors
{
...
...
@@ -485,7 +482,6 @@ struct ata_port {
struct
work_struct
port_task
;
unsigned
int
hsm_task_state
;
unsigned
long
pio_task_timeout
;
u32
msg_enable
;
struct
list_head
eh_done_q
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录