Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
ffe75ef6
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看板
提交
ffe75ef6
编写于
10月 09, 2005
作者:
J
Jeff Garzik
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'upstream'
上级
9dc26323
e710245b
变更
13
展开全部
隐藏空白更改
内联
并排
Showing
13 changed file
with
2863 addition
and
577 deletion
+2863
-577
Documentation/DocBook/libata.tmpl
Documentation/DocBook/libata.tmpl
+1072
-0
drivers/scsi/ahci.c
drivers/scsi/ahci.c
+25
-6
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+259
-174
drivers/scsi/libata-scsi.c
drivers/scsi/libata-scsi.c
+494
-170
drivers/scsi/libata.h
drivers/scsi/libata.h
+6
-10
drivers/scsi/sata_mv.c
drivers/scsi/sata_mv.c
+953
-189
drivers/scsi/sata_nv.c
drivers/scsi/sata_nv.c
+8
-8
drivers/scsi/sata_promise.c
drivers/scsi/sata_promise.c
+3
-3
drivers/scsi/sata_sis.c
drivers/scsi/sata_sis.c
+1
-1
drivers/scsi/sata_uli.c
drivers/scsi/sata_uli.c
+1
-1
drivers/scsi/sata_via.c
drivers/scsi/sata_via.c
+1
-1
include/linux/ata.h
include/linux/ata.h
+17
-3
include/linux/libata.h
include/linux/libata.h
+23
-11
未找到文件。
Documentation/DocBook/libata.tmpl
浏览文件 @
ffe75ef6
此差异已折叠。
点击以展开。
drivers/scsi/ahci.c
浏览文件 @
ffe75ef6
...
...
@@ -672,17 +672,36 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *
for
(
i
=
0
;
i
<
host_set
->
n_ports
;
i
++
)
{
struct
ata_port
*
ap
;
u32
tmp
;
VPRINTK
(
"port %u
\n
"
,
i
);
if
(
!
(
irq_stat
&
(
1
<<
i
)))
continue
;
ap
=
host_set
->
ports
[
i
];
tmp
=
irq_stat
&
(
1
<<
i
);
if
(
tmp
&&
ap
)
{
if
(
ap
)
{
struct
ata_queued_cmd
*
qc
;
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
if
(
ahci_host_intr
(
ap
,
qc
))
irq_ack
|=
(
1
<<
i
);
if
(
!
ahci_host_intr
(
ap
,
qc
))
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
)
{
...
...
drivers/scsi/libata-core.c
浏览文件 @
ffe75ef6
此差异已折叠。
点击以展开。
drivers/scsi/libata-scsi.c
浏览文件 @
ffe75ef6
此差异已折叠。
点击以展开。
drivers/scsi/libata.h
浏览文件 @
ffe75ef6
...
...
@@ -39,6 +39,7 @@ struct ata_scsi_args {
/* libata-core.c */
extern
int
atapi_enabled
;
extern
int
ata_qc_complete_noop
(
struct
ata_queued_cmd
*
qc
,
u8
drv_stat
);
extern
struct
ata_queued_cmd
*
ata_qc_new_init
(
struct
ata_port
*
ap
,
struct
ata_device
*
dev
);
extern
void
ata_qc_free
(
struct
ata_queued_cmd
*
qc
);
...
...
@@ -53,6 +54,9 @@ extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);
/* libata-scsi.c */
extern
void
atapi_request_sense
(
struct
ata_port
*
ap
,
struct
ata_device
*
dev
,
struct
scsi_cmnd
*
cmd
);
extern
void
ata_scsi_scan_host
(
struct
ata_port
*
ap
);
extern
int
ata_scsi_error
(
struct
Scsi_Host
*
host
);
extern
unsigned
int
ata_scsiop_inq_std
(
struct
ata_scsi_args
*
args
,
u8
*
rbuf
,
unsigned
int
buflen
);
...
...
@@ -77,18 +81,10 @@ extern unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args, u8 *rbuf,
extern
void
ata_scsi_badcmd
(
struct
scsi_cmnd
*
cmd
,
void
(
*
done
)(
struct
scsi_cmnd
*
),
u8
asc
,
u8
ascq
);
extern
void
ata_scsi_set_sense
(
struct
scsi_cmnd
*
cmd
,
u8
sk
,
u8
asc
,
u8
ascq
);
extern
void
ata_scsi_rbuf_fill
(
struct
ata_scsi_args
*
args
,
unsigned
int
(
*
actor
)
(
struct
ata_scsi_args
*
args
,
u8
*
rbuf
,
unsigned
int
buflen
));
static
inline
void
ata_bad_scsiop
(
struct
scsi_cmnd
*
cmd
,
void
(
*
done
)(
struct
scsi_cmnd
*
))
{
ata_scsi_badcmd
(
cmd
,
done
,
0x20
,
0x00
);
}
static
inline
void
ata_bad_cdb
(
struct
scsi_cmnd
*
cmd
,
void
(
*
done
)(
struct
scsi_cmnd
*
))
{
ata_scsi_badcmd
(
cmd
,
done
,
0x24
,
0x00
);
}
#endif
/* __LIBATA_H__ */
drivers/scsi/sata_mv.c
浏览文件 @
ffe75ef6
此差异已折叠。
点击以展开。
drivers/scsi/sata_nv.c
浏览文件 @
ffe75ef6
...
...
@@ -29,6 +29,8 @@
* NV-specific details such as register offsets, SATA phy location,
* hotplug info, etc.
*
* 0.09
* - Fixed bug introduced by 0.08's MCP51 and MCP55 support.
*
* 0.08
* - Added support for MCP51 and MCP55.
...
...
@@ -132,9 +134,7 @@ enum nv_host_type
GENERIC
,
NFORCE2
,
NFORCE3
,
CK804
,
MCP51
,
MCP55
CK804
};
static
struct
pci_device_id
nv_pci_tbl
[]
=
{
...
...
@@ -153,13 +153,13 @@ static struct pci_device_id nv_pci_tbl[] = {
{
PCI_VENDOR_ID_NVIDIA
,
PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
CK804
},
{
PCI_VENDOR_ID_NVIDIA
,
PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
MCP51
},
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
GENERIC
},
{
PCI_VENDOR_ID_NVIDIA
,
PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
MCP51
},
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
GENERIC
},
{
PCI_VENDOR_ID_NVIDIA
,
PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
MCP55
},
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
GENERIC
},
{
PCI_VENDOR_ID_NVIDIA
,
PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
MCP55
},
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
GENERIC
},
{
PCI_VENDOR_ID_NVIDIA
,
PCI_ANY_ID
,
PCI_ANY_ID
,
PCI_ANY_ID
,
PCI_CLASS_STORAGE_IDE
<<
8
,
0xffff00
,
GENERIC
},
...
...
@@ -405,7 +405,7 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
rc
=
-
ENOMEM
;
ppi
=
&
nv_port_info
;
probe_ent
=
ata_pci_init_native_mode
(
pdev
,
&
ppi
);
probe_ent
=
ata_pci_init_native_mode
(
pdev
,
&
ppi
,
ATA_PORT_PRIMARY
|
ATA_PORT_SECONDARY
);
if
(
!
probe_ent
)
goto
err_out_regions
;
...
...
drivers/scsi/sata_promise.c
浏览文件 @
ffe75ef6
...
...
@@ -438,11 +438,11 @@ static inline unsigned int pdc_host_intr( struct ata_port *ap,
break
;
default:
ap
->
stats
.
idle_irq
++
;
break
;
ap
->
stats
.
idle_irq
++
;
break
;
}
return
handled
;
return
handled
;
}
static
void
pdc_irq_clear
(
struct
ata_port
*
ap
)
...
...
drivers/scsi/sata_sis.c
浏览文件 @
ffe75ef6
...
...
@@ -263,7 +263,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
goto
err_out_regions
;
ppi
=
&
sis_port_info
;
probe_ent
=
ata_pci_init_native_mode
(
pdev
,
&
ppi
);
probe_ent
=
ata_pci_init_native_mode
(
pdev
,
&
ppi
,
ATA_PORT_PRIMARY
|
ATA_PORT_SECONDARY
);
if
(
!
probe_ent
)
{
rc
=
-
ENOMEM
;
goto
err_out_regions
;
...
...
drivers/scsi/sata_uli.c
浏览文件 @
ffe75ef6
...
...
@@ -202,7 +202,7 @@ static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
goto
err_out_regions
;
ppi
=
&
uli_port_info
;
probe_ent
=
ata_pci_init_native_mode
(
pdev
,
&
ppi
);
probe_ent
=
ata_pci_init_native_mode
(
pdev
,
&
ppi
,
ATA_PORT_PRIMARY
|
ATA_PORT_SECONDARY
);
if
(
!
probe_ent
)
{
rc
=
-
ENOMEM
;
goto
err_out_regions
;
...
...
drivers/scsi/sata_via.c
浏览文件 @
ffe75ef6
...
...
@@ -212,7 +212,7 @@ static struct ata_probe_ent *vt6420_init_probe_ent(struct pci_dev *pdev)
struct
ata_probe_ent
*
probe_ent
;
struct
ata_port_info
*
ppi
=
&
svia_port_info
;
probe_ent
=
ata_pci_init_native_mode
(
pdev
,
&
ppi
);
probe_ent
=
ata_pci_init_native_mode
(
pdev
,
&
ppi
,
ATA_PORT_PRIMARY
|
ATA_PORT_SECONDARY
);
if
(
!
probe_ent
)
return
NULL
;
...
...
include/linux/ata.h
浏览文件 @
ffe75ef6
...
...
@@ -132,6 +132,7 @@ enum {
ATA_CMD_PACKET
=
0xA0
,
ATA_CMD_VERIFY
=
0x40
,
ATA_CMD_VERIFY_EXT
=
0x42
,
ATA_CMD_INIT_DEV_PARAMS
=
0x91
,
/* SETFEATURES stuff */
SETFEATURES_XFER
=
0x03
,
...
...
@@ -146,14 +147,14 @@ enum {
XFER_MW_DMA_2
=
0x22
,
XFER_MW_DMA_1
=
0x21
,
XFER_MW_DMA_0
=
0x20
,
XFER_SW_DMA_2
=
0x12
,
XFER_SW_DMA_1
=
0x11
,
XFER_SW_DMA_0
=
0x10
,
XFER_PIO_4
=
0x0C
,
XFER_PIO_3
=
0x0B
,
XFER_PIO_2
=
0x0A
,
XFER_PIO_1
=
0x09
,
XFER_PIO_0
=
0x08
,
XFER_SW_DMA_2
=
0x12
,
XFER_SW_DMA_1
=
0x11
,
XFER_SW_DMA_0
=
0x10
,
XFER_PIO_SLOW
=
0x00
,
/* ATAPI stuff */
...
...
@@ -181,6 +182,7 @@ enum {
ATA_TFLAG_ISADDR
=
(
1
<<
1
),
/* enable r/w to nsect/lba regs */
ATA_TFLAG_DEVICE
=
(
1
<<
2
),
/* enable r/w to device reg */
ATA_TFLAG_WRITE
=
(
1
<<
3
),
/* data dir: host->dev==1 (write) */
ATA_TFLAG_LBA
=
(
1
<<
4
),
/* enable LBA */
};
enum
ata_tf_protocols
{
...
...
@@ -250,6 +252,18 @@ struct ata_taskfile {
((u64) (id)[(n) + 1] << 16) | \
((u64) (id)[(n) + 0]) )
static
inline
int
ata_id_current_chs_valid
(
u16
*
id
)
{
/* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command
has not been issued to the device then the values of
id[54] to id[56] are vendor specific. */
return
(
id
[
53
]
&
0x01
)
&&
/* Current translation valid */
id
[
54
]
&&
/* cylinders in current translation */
id
[
55
]
&&
/* heads in current translation */
id
[
55
]
<=
16
&&
id
[
56
];
/* sectors in current translation */
}
static
inline
int
atapi_cdb_len
(
u16
*
dev_id
)
{
u16
tmp
=
dev_id
[
0
]
&
0x3
;
...
...
include/linux/libata.h
浏览文件 @
ffe75ef6
...
...
@@ -97,6 +97,7 @@ enum {
ATA_DFLAG_LBA48
=
(
1
<<
0
),
/* device supports LBA48 */
ATA_DFLAG_PIO
=
(
1
<<
1
),
/* device currently in PIO mode */
ATA_DFLAG_LOCK_SECTORS
=
(
1
<<
2
),
/* don't adjust max_sectors */
ATA_DFLAG_LBA
=
(
1
<<
3
),
/* device supports LBA */
ATA_DEV_UNKNOWN
=
0
,
/* unknown device */
ATA_DEV_ATA
=
1
,
/* ATA device */
...
...
@@ -154,17 +155,21 @@ enum {
ATA_SHIFT_UDMA
=
0
,
ATA_SHIFT_MWDMA
=
8
,
ATA_SHIFT_PIO
=
11
,
/* Masks for port functions */
ATA_PORT_PRIMARY
=
(
1
<<
0
),
ATA_PORT_SECONDARY
=
(
1
<<
1
),
};
enum
pio
_task_states
{
PIO
_ST_UNKNOWN
,
PIO
_ST_IDLE
,
PIO
_ST_POLL
,
PIO
_ST_TMOUT
,
PIO
_ST
,
PIO
_ST_LAST
,
PIO
_ST_LAST_POLL
,
PIO
_ST_ERR
,
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
,
};
/* forward declarations */
...
...
@@ -282,6 +287,11 @@ struct ata_device {
u8
xfer_protocol
;
/* taskfile xfer protocol */
u8
read_cmd
;
/* opcode to use on read */
u8
write_cmd
;
/* opcode to use on write */
/* for CHS addressing */
u16
cylinders
;
/* Number of cylinders */
u16
heads
;
/* Number of heads */
u16
sectors
;
/* Number of sectors per track */
};
struct
ata_port
{
...
...
@@ -319,7 +329,7 @@ struct ata_port {
struct
work_struct
packet_task
;
struct
work_struct
pio_task
;
unsigned
int
pio
_task_state
;
unsigned
int
hsm
_task_state
;
unsigned
long
pio_task_timeout
;
void
*
private_data
;
...
...
@@ -400,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_release
(
struct
Scsi_Host
*
host
);
extern
unsigned
int
ata_host_intr
(
struct
ata_port
*
ap
,
struct
ata_queued_cmd
*
qc
);
extern
int
ata_ratelimit
(
void
);
/*
* Default driver ops implementations
*/
...
...
@@ -452,7 +464,7 @@ struct pci_bits {
extern
void
ata_pci_host_stop
(
struct
ata_host_set
*
host_set
);
extern
struct
ata_probe_ent
*
ata_pci_init_native_mode
(
struct
pci_dev
*
pdev
,
struct
ata_port_info
**
port
);
ata_pci_init_native_mode
(
struct
pci_dev
*
pdev
,
struct
ata_port_info
**
port
,
int
portmask
);
extern
int
pci_test_config_bits
(
struct
pci_dev
*
pdev
,
struct
pci_bits
*
bits
);
#endif
/* CONFIG_PCI */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录