Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bug2833
cloud-kernel
提交
728c7763
cloud-kernel
项目概览
bug2833
/
cloud-kernel
与 Fork 源项目一致
Fork自
openanolis / cloud-kernel
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
728c7763
编写于
1月 17, 2006
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
上级
d1138cf0
a1bd9e68
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
105 addition
and
14 deletion
+105
-14
drivers/pci/quirks.c
drivers/pci/quirks.c
+4
-1
drivers/scsi/ahci.c
drivers/scsi/ahci.c
+10
-0
drivers/scsi/ata_piix.c
drivers/scsi/ata_piix.c
+3
-0
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+63
-10
drivers/scsi/sata_promise.c
drivers/scsi/sata_promise.c
+16
-0
drivers/scsi/sata_svw.c
drivers/scsi/sata_svw.c
+1
-0
include/linux/libata.h
include/linux/libata.h
+8
-3
未找到文件。
drivers/pci/quirks.c
浏览文件 @
728c7763
...
...
@@ -1142,6 +1142,9 @@ static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev)
case
0x27c4
:
ich
=
7
;
break
;
case
0x2828
:
/* ICH8M */
ich
=
8
;
break
;
default:
/* we do not handle this PCI device */
return
;
...
...
@@ -1161,7 +1164,7 @@ static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev)
else
return
;
/* not in combined mode */
}
else
{
WARN_ON
((
ich
!=
6
)
&&
(
ich
!=
7
));
WARN_ON
((
ich
!=
6
)
&&
(
ich
!=
7
)
&&
(
ich
!=
8
)
);
tmp
&=
0x3
;
/* interesting bits 1:0 */
if
(
tmp
&
(
1
<<
0
))
comb
=
(
1
<<
2
);
/* PATA port 0, SATA port 1 */
...
...
drivers/scsi/ahci.c
浏览文件 @
728c7763
...
...
@@ -276,6 +276,16 @@ static const struct pci_device_id ahci_pci_tbl[] = {
board_ahci
},
/* ESB2 */
{
PCI_VENDOR_ID_INTEL
,
0x27c6
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
board_ahci
},
/* ICH7-M DH */
{
PCI_VENDOR_ID_INTEL
,
0x2821
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
board_ahci
},
/* ICH8 */
{
PCI_VENDOR_ID_INTEL
,
0x2822
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
board_ahci
},
/* ICH8 */
{
PCI_VENDOR_ID_INTEL
,
0x2824
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
board_ahci
},
/* ICH8 */
{
PCI_VENDOR_ID_INTEL
,
0x2829
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
board_ahci
},
/* ICH8M */
{
PCI_VENDOR_ID_INTEL
,
0x282a
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
board_ahci
},
/* ICH8M */
{
}
/* terminate list */
};
...
...
drivers/scsi/ata_piix.c
浏览文件 @
728c7763
...
...
@@ -157,6 +157,9 @@ static const struct pci_device_id piix_pci_tbl[] = {
{
0x8086
,
0x27c0
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
ich6_sata_ahci
},
{
0x8086
,
0x27c4
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
ich6_sata_ahci
},
{
0x8086
,
0x2680
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
ich6_sata_ahci
},
{
0x8086
,
0x2820
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
ich6_sata_ahci
},
{
0x8086
,
0x2825
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
ich6_sata_ahci
},
{
0x8086
,
0x2828
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
ich6_sata_ahci
},
{
}
/* terminate list */
};
...
...
drivers/scsi/libata-core.c
浏览文件 @
728c7763
...
...
@@ -611,6 +611,10 @@ int ata_rwcmd_protocol(struct ata_queued_cmd *qc)
if
(
dev
->
flags
&
ATA_DFLAG_PIO
)
{
tf
->
protocol
=
ATA_PROT_PIO
;
index
=
dev
->
multi_count
?
0
:
8
;
}
else
if
(
lba48
&&
(
qc
->
ap
->
flags
&
ATA_FLAG_PIO_LBA48
))
{
/* Unable to use DMA due to host limitation */
tf
->
protocol
=
ATA_PROT_PIO
;
index
=
dev
->
multi_count
?
0
:
4
;
}
else
{
tf
->
protocol
=
ATA_PROT_DMA
;
index
=
16
;
...
...
@@ -1051,18 +1055,22 @@ static unsigned int ata_pio_modes(const struct ata_device *adev)
{
u16
modes
;
/* Usual case. Word 53 indicates word
88
is valid */
if
(
adev
->
id
[
ATA_ID_FIELD_VALID
]
&
(
1
<<
2
))
{
/* Usual case. Word 53 indicates word
64
is valid */
if
(
adev
->
id
[
ATA_ID_FIELD_VALID
]
&
(
1
<<
1
))
{
modes
=
adev
->
id
[
ATA_ID_PIO_MODES
]
&
0x03
;
modes
<<=
3
;
modes
|=
0x7
;
return
modes
;
}
/* If word
88 isn't valid then Word 51 holds the PIO timing number
for the maximum. Turn it into a mask and return it */
modes
=
(
2
<<
(
adev
->
id
[
ATA_ID_OLD_PIO_MODES
]
&
0xFF
))
-
1
;
/* If word
64 isn't valid then Word 51 high byte holds the PIO timing
number
for the maximum. Turn it into a mask and return it */
modes
=
(
2
<<
(
(
adev
->
id
[
ATA_ID_OLD_PIO_MODES
]
>>
8
)
&
0xFF
))
-
1
;
return
modes
;
/* But wait.. there's more. Design your standards by committee and
you too can get a free iordy field to process. However its the
speeds not the modes that are supported... Note drivers using the
timing API will get this right anyway */
}
struct
ata_exec_internal_arg
{
...
...
@@ -1164,6 +1172,39 @@ ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
return
AC_ERR_OTHER
;
}
/**
* ata_pio_need_iordy - check if iordy needed
* @adev: ATA device
*
* Check if the current speed of the device requires IORDY. Used
* by various controllers for chip configuration.
*/
unsigned
int
ata_pio_need_iordy
(
const
struct
ata_device
*
adev
)
{
int
pio
;
int
speed
=
adev
->
pio_mode
-
XFER_PIO_0
;
if
(
speed
<
2
)
return
0
;
if
(
speed
>
2
)
return
1
;
/* If we have no drive specific rule, then PIO 2 is non IORDY */
if
(
adev
->
id
[
ATA_ID_FIELD_VALID
]
&
2
)
{
/* EIDE */
pio
=
adev
->
id
[
ATA_ID_EIDE_PIO
];
/* Is the speed faster than the drive allows non IORDY ? */
if
(
pio
)
{
/* This is cycle times not frequency - watch the logic! */
if
(
pio
>
240
)
/* PIO2 is 240nS per cycle */
return
1
;
return
0
;
}
}
return
0
;
}
/**
* ata_dev_identify - obtain IDENTIFY x DEVICE page
* @ap: port on which device we wish to probe resides
...
...
@@ -1415,7 +1456,7 @@ void ata_dev_config(struct ata_port *ap, unsigned int i)
ap
->
udma_mask
&=
ATA_UDMA5
;
ap
->
host
->
max_sectors
=
ATA_MAX_SECTORS
;
ap
->
host
->
hostt
->
max_sectors
=
ATA_MAX_SECTORS
;
ap
->
device
->
flags
|=
ATA_DFLAG_LOCK_SECTORS
;
ap
->
device
[
i
].
flags
|=
ATA_DFLAG_LOCK_SECTORS
;
}
if
(
ap
->
ops
->
dev_config
)
...
...
@@ -3056,10 +3097,21 @@ static void ata_pio_data_xfer(struct ata_port *ap, unsigned char *buf,
static
void
ata_data_xfer
(
struct
ata_port
*
ap
,
unsigned
char
*
buf
,
unsigned
int
buflen
,
int
do_write
)
{
if
(
ap
->
flags
&
ATA_FLAG_MMIO
)
ata_mmio_data_xfer
(
ap
,
buf
,
buflen
,
do_write
);
else
ata_pio_data_xfer
(
ap
,
buf
,
buflen
,
do_write
);
/* Make the crap hardware pay the costs not the good stuff */
if
(
unlikely
(
ap
->
flags
&
ATA_FLAG_IRQ_MASK
))
{
unsigned
long
flags
;
local_irq_save
(
flags
);
if
(
ap
->
flags
&
ATA_FLAG_MMIO
)
ata_mmio_data_xfer
(
ap
,
buf
,
buflen
,
do_write
);
else
ata_pio_data_xfer
(
ap
,
buf
,
buflen
,
do_write
);
local_irq_restore
(
flags
);
}
else
{
if
(
ap
->
flags
&
ATA_FLAG_MMIO
)
ata_mmio_data_xfer
(
ap
,
buf
,
buflen
,
do_write
);
else
ata_pio_data_xfer
(
ap
,
buf
,
buflen
,
do_write
);
}
}
/**
...
...
@@ -5122,6 +5174,7 @@ EXPORT_SYMBOL_GPL(ata_dev_id_string);
EXPORT_SYMBOL_GPL
(
ata_dev_config
);
EXPORT_SYMBOL_GPL
(
ata_scsi_simulate
);
EXPORT_SYMBOL_GPL
(
ata_pio_need_iordy
);
EXPORT_SYMBOL_GPL
(
ata_timing_compute
);
EXPORT_SYMBOL_GPL
(
ata_timing_merge
);
...
...
drivers/scsi/sata_promise.c
浏览文件 @
728c7763
...
...
@@ -66,6 +66,7 @@ enum {
board_2037x
=
0
,
/* FastTrak S150 TX2plus */
board_20319
=
1
,
/* FastTrak S150 TX4 */
board_20619
=
2
,
/* FastTrak TX4000 */
board_20771
=
3
,
/* FastTrak TX2300 */
PDC_HAS_PATA
=
(
1
<<
1
),
/* PDC20375 has PATA */
...
...
@@ -190,6 +191,16 @@ static const struct ata_port_info pdc_port_info[] = {
.
udma_mask
=
0x7f
,
/* udma0-6 ; FIXME */
.
port_ops
=
&
pdc_pata_ops
,
},
/* board_20771 */
{
.
sht
=
&
pdc_ata_sht
,
.
host_flags
=
PDC_COMMON_FLAGS
|
ATA_FLAG_SATA
,
.
pio_mask
=
0x1f
,
/* pio0-4 */
.
mwdma_mask
=
0x07
,
/* mwdma0-2 */
.
udma_mask
=
0x7f
,
/* udma0-6 ; FIXME */
.
port_ops
=
&
pdc_sata_ops
,
},
};
static
const
struct
pci_device_id
pdc_ata_pci_tbl
[]
=
{
...
...
@@ -226,6 +237,8 @@ static const struct pci_device_id pdc_ata_pci_tbl[] = {
{
PCI_VENDOR_ID_PROMISE
,
0x6629
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
board_20619
},
{
PCI_VENDOR_ID_PROMISE
,
0x3570
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
board_20771
},
{
}
/* terminate list */
};
...
...
@@ -706,6 +719,9 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
case
board_2037x
:
probe_ent
->
n_ports
=
2
;
break
;
case
board_20771
:
probe_ent
->
n_ports
=
2
;
break
;
case
board_20619
:
probe_ent
->
n_ports
=
4
;
...
...
drivers/scsi/sata_svw.c
浏览文件 @
728c7763
...
...
@@ -470,6 +470,7 @@ static const struct pci_device_id k2_sata_pci_tbl[] = {
{
0x1166
,
0x0241
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
4
},
{
0x1166
,
0x0242
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
8
},
{
0x1166
,
0x024a
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
4
},
{
0x1166
,
0x024b
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
4
},
{
}
};
...
...
include/linux/libata.h
浏览文件 @
728c7763
...
...
@@ -126,16 +126,19 @@ enum {
ATA_FLAG_SUSPENDED
=
(
1
<<
12
),
/* port is suspended */
ATA_FLAG_PIO_LBA48
=
(
1
<<
13
),
/* Host DMA engine is LBA28 only */
ATA_FLAG_IRQ_MASK
=
(
1
<<
14
),
/* Mask IRQ in PIO xfers */
ATA_QCFLAG_ACTIVE
=
(
1
<<
1
),
/* cmd not yet ack'd to scsi lyer */
ATA_QCFLAG_SG
=
(
1
<<
3
),
/* have s/g table? */
ATA_QCFLAG_SINGLE
=
(
1
<<
4
),
/* no s/g, just a single buffer */
ATA_QCFLAG_DMAMAP
=
ATA_QCFLAG_SG
|
ATA_QCFLAG_SINGLE
,
/* various lengths of time */
ATA_TMOUT_EDD
=
5
*
HZ
,
/* h
ue
ristic */
ATA_TMOUT_EDD
=
5
*
HZ
,
/* h
eu
ristic */
ATA_TMOUT_PIO
=
30
*
HZ
,
ATA_TMOUT_BOOT
=
30
*
HZ
,
/* h
ue
ristic */
ATA_TMOUT_BOOT_QUICK
=
7
*
HZ
,
/* h
ue
ristic */
ATA_TMOUT_BOOT
=
30
*
HZ
,
/* h
eu
ristic */
ATA_TMOUT_BOOT_QUICK
=
7
*
HZ
,
/* h
eu
ristic */
ATA_TMOUT_CDB
=
30
*
HZ
,
ATA_TMOUT_CDB_QUICK
=
5
*
HZ
,
ATA_TMOUT_INTERNAL
=
30
*
HZ
,
...
...
@@ -499,6 +502,8 @@ extern int ata_scsi_slave_config(struct scsi_device *sdev);
/*
* Timing helpers
*/
extern
unsigned
int
ata_pio_need_iordy
(
const
struct
ata_device
*
);
extern
int
ata_timing_compute
(
struct
ata_device
*
,
unsigned
short
,
struct
ata_timing
*
,
int
,
int
);
extern
void
ata_timing_merge
(
const
struct
ata_timing
*
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录