Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
faf8ec06
Commit
faf8ec06
authored
Sep 14, 2004
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge pobox.com:/spare/repo/linux-2.6
into pobox.com:/spare/repo/libata-2.6
parents
5c5b9c24
cbda3cb1
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
361 additions
and
280 deletions
+361
-280
drivers/scsi/ata_piix.c
drivers/scsi/ata_piix.c
+12
-12
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+188
-120
drivers/scsi/sata_nv.c
drivers/scsi/sata_nv.c
+22
-44
drivers/scsi/sata_promise.c
drivers/scsi/sata_promise.c
+4
-4
drivers/scsi/sata_sil.c
drivers/scsi/sata_sil.c
+6
-6
drivers/scsi/sata_sis.c
drivers/scsi/sata_sis.c
+21
-37
drivers/scsi/sata_svw.c
drivers/scsi/sata_svw.c
+71
-3
drivers/scsi/sata_sx4.c
drivers/scsi/sata_sx4.c
+4
-4
drivers/scsi/sata_via.c
drivers/scsi/sata_via.c
+19
-34
drivers/scsi/sata_vsc.c
drivers/scsi/sata_vsc.c
+4
-4
include/linux/libata.h
include/linux/libata.h
+10
-12
No files found.
drivers/scsi/ata_piix.c
View file @
faf8ec06
...
...
@@ -125,15 +125,15 @@ static struct ata_port_operations piix_pata_ops = {
.
set_piomode
=
piix_set_piomode
,
.
set_dmamode
=
piix_set_dmamode
,
.
tf_load
=
ata_tf_load
_pio
,
.
tf_read
=
ata_tf_read
_pio
,
.
check_status
=
ata_check_status
_pio
,
.
exec_command
=
ata_exec_command
_pio
,
.
tf_load
=
ata_tf_load
,
.
tf_read
=
ata_tf_read
,
.
check_status
=
ata_check_status
,
.
exec_command
=
ata_exec_command
,
.
phy_reset
=
piix_pata_phy_reset
,
.
bmdma_setup
=
ata_bmdma_setup
_pio
,
.
bmdma_start
=
ata_bmdma_start
_pio
,
.
bmdma_setup
=
ata_bmdma_setup
,
.
bmdma_start
=
ata_bmdma_start
,
.
qc_prep
=
ata_qc_prep
,
.
qc_issue
=
ata_qc_issue_prot
,
...
...
@@ -149,15 +149,15 @@ static struct ata_port_operations piix_pata_ops = {
static
struct
ata_port_operations
piix_sata_ops
=
{
.
port_disable
=
ata_port_disable
,
.
tf_load
=
ata_tf_load
_pio
,
.
tf_read
=
ata_tf_read
_pio
,
.
check_status
=
ata_check_status
_pio
,
.
exec_command
=
ata_exec_command
_pio
,
.
tf_load
=
ata_tf_load
,
.
tf_read
=
ata_tf_read
,
.
check_status
=
ata_check_status
,
.
exec_command
=
ata_exec_command
,
.
phy_reset
=
piix_sata_phy_reset
,
.
bmdma_setup
=
ata_bmdma_setup
_pio
,
.
bmdma_start
=
ata_bmdma_start
_pio
,
.
bmdma_setup
=
ata_bmdma_setup
,
.
bmdma_start
=
ata_bmdma_start
,
.
qc_prep
=
ata_qc_prep
,
.
qc_issue
=
ata_qc_issue_prot
,
...
...
drivers/scsi/libata-core.c
View file @
faf8ec06
This diff is collapsed.
Click to expand it.
drivers/scsi/sata_nv.c
View file @
faf8ec06
...
...
@@ -50,8 +50,6 @@
#define NV_PIO_MASK 0x1f
#define NV_MWDMA_MASK 0x07
#define NV_UDMA_MASK 0x7f
#define NV_PORT0_BMDMA_REG_OFFSET 0x00
#define NV_PORT1_BMDMA_REG_OFFSET 0x08
#define NV_PORT0_SCR_REG_OFFSET 0x00
#define NV_PORT1_SCR_REG_OFFSET 0x40
...
...
@@ -187,7 +185,7 @@ static Scsi_Host_Template nv_sht = {
.
eh_strategy_handler
=
ata_scsi_error
,
.
can_queue
=
ATA_DEF_QUEUE
,
.
this_id
=
ATA_SHT_THIS_ID
,
.
sg_tablesize
=
ATA_MAX_PRD
,
.
sg_tablesize
=
LIB
ATA_MAX_PRD
,
.
max_sectors
=
ATA_MAX_SECTORS
,
.
cmd_per_lun
=
ATA_SHT_CMD_PER_LUN
,
.
emulated
=
ATA_SHT_EMULATED
,
...
...
@@ -200,13 +198,13 @@ static Scsi_Host_Template nv_sht = {
static
struct
ata_port_operations
nv_ops
=
{
.
port_disable
=
ata_port_disable
,
.
tf_load
=
ata_tf_load
_pio
,
.
tf_read
=
ata_tf_read
_pio
,
.
exec_command
=
ata_exec_command
_pio
,
.
check_status
=
ata_check_status
_pio
,
.
tf_load
=
ata_tf_load
,
.
tf_read
=
ata_tf_read
,
.
exec_command
=
ata_exec_command
,
.
check_status
=
ata_check_status
,
.
phy_reset
=
sata_phy_reset
,
.
bmdma_setup
=
ata_bmdma_setup
_pio
,
.
bmdma_start
=
ata_bmdma_start
_pio
,
.
bmdma_setup
=
ata_bmdma_setup
,
.
bmdma_start
=
ata_bmdma_start
,
.
qc_prep
=
ata_qc_prep
,
.
qc_issue
=
ata_qc_issue_prot
,
.
eng_timeout
=
ata_eng_timeout
,
...
...
@@ -219,6 +217,18 @@ static struct ata_port_operations nv_ops = {
.
host_stop
=
nv_host_stop
,
};
static
struct
ata_port_info
nv_port_info
=
{
.
sht
=
&
nv_sht
,
.
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_SATA_RESET
|
ATA_FLAG_SRST
|
ATA_FLAG_NO_LEGACY
,
.
pio_mask
=
NV_PIO_MASK
,
.
mwdma_mask
=
NV_MWDMA_MASK
,
.
udma_mask
=
NV_UDMA_MASK
,
.
port_ops
=
&
nv_ops
,
};
MODULE_AUTHOR
(
"NVIDIA"
);
MODULE_DESCRIPTION
(
"low-level driver for NVIDIA nForce SATA controller"
);
MODULE_LICENSE
(
"GPL"
);
...
...
@@ -299,6 +309,7 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
{
static
int
printed_version
=
0
;
struct
nv_host
*
host
;
struct
ata_port_info
*
ppi
;
struct
ata_probe_ent
*
probe_ent
=
NULL
;
int
rc
;
...
...
@@ -320,7 +331,8 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if
(
rc
)
goto
err_out_regions
;
probe_ent
=
kmalloc
(
sizeof
(
*
probe_ent
),
GFP_KERNEL
);
ppi
=
&
nv_port_info
;
probe_ent
=
ata_pci_init_native_mode
(
pdev
,
&
ppi
);
if
(
!
probe_ent
)
{
rc
=
-
ENOMEM
;
goto
err_out_regions
;
...
...
@@ -334,40 +346,6 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
host
->
host_desc
=
&
nv_device_tbl
[
ent
->
driver_data
];
memset
(
probe_ent
,
0
,
sizeof
(
*
probe_ent
));
INIT_LIST_HEAD
(
&
probe_ent
->
node
);
probe_ent
->
pdev
=
pdev
;
probe_ent
->
sht
=
&
nv_sht
;
probe_ent
->
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_SATA_RESET
|
ATA_FLAG_SRST
|
ATA_FLAG_NO_LEGACY
;
probe_ent
->
port_ops
=
&
nv_ops
;
probe_ent
->
n_ports
=
NV_PORTS
;
probe_ent
->
irq
=
pdev
->
irq
;
probe_ent
->
irq_flags
=
SA_SHIRQ
;
probe_ent
->
pio_mask
=
NV_PIO_MASK
;
probe_ent
->
mwdma_mask
=
NV_MWDMA_MASK
;
probe_ent
->
udma_mask
=
NV_UDMA_MASK
;
probe_ent
->
port
[
0
].
cmd_addr
=
pci_resource_start
(
pdev
,
0
);
ata_std_ports
(
&
probe_ent
->
port
[
0
]);
probe_ent
->
port
[
0
].
altstatus_addr
=
probe_ent
->
port
[
0
].
ctl_addr
=
pci_resource_start
(
pdev
,
1
)
|
ATA_PCI_CTL_OFS
;
probe_ent
->
port
[
0
].
bmdma_addr
=
pci_resource_start
(
pdev
,
4
)
|
NV_PORT0_BMDMA_REG_OFFSET
;
probe_ent
->
port
[
1
].
cmd_addr
=
pci_resource_start
(
pdev
,
2
);
ata_std_ports
(
&
probe_ent
->
port
[
1
]);
probe_ent
->
port
[
1
].
altstatus_addr
=
probe_ent
->
port
[
1
].
ctl_addr
=
pci_resource_start
(
pdev
,
3
)
|
ATA_PCI_CTL_OFS
;
probe_ent
->
port
[
1
].
bmdma_addr
=
pci_resource_start
(
pdev
,
4
)
|
NV_PORT1_BMDMA_REG_OFFSET
;
probe_ent
->
private_data
=
host
;
if
(
host
->
host_desc
->
host_flags
&
NV_HOST_FLAGS_SCR_MMIO
)
{
...
...
drivers/scsi/sata_promise.c
View file @
faf8ec06
...
...
@@ -107,8 +107,8 @@ static Scsi_Host_Template pdc_sata_sht = {
static
struct
ata_port_operations
pdc_sata_ops
=
{
.
port_disable
=
ata_port_disable
,
.
tf_load
=
pdc_tf_load_mmio
,
.
tf_read
=
ata_tf_read
_mmio
,
.
check_status
=
ata_check_status
_mmio
,
.
tf_read
=
ata_tf_read
,
.
check_status
=
ata_check_status
,
.
exec_command
=
pdc_exec_command_mmio
,
.
phy_reset
=
pdc_phy_reset
,
.
qc_prep
=
pdc_qc_prep
,
...
...
@@ -468,7 +468,7 @@ static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf)
{
WARN_ON
(
tf
->
protocol
==
ATA_PROT_DMA
||
tf
->
protocol
==
ATA_PROT_NODATA
);
ata_tf_load
_mmio
(
ap
,
tf
);
ata_tf_load
(
ap
,
tf
);
}
...
...
@@ -476,7 +476,7 @@ static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf)
{
WARN_ON
(
tf
->
protocol
==
ATA_PROT_DMA
||
tf
->
protocol
==
ATA_PROT_NODATA
);
ata_exec_command
_mmio
(
ap
,
tf
);
ata_exec_command
(
ap
,
tf
);
}
...
...
drivers/scsi/sata_sil.c
View file @
faf8ec06
...
...
@@ -125,14 +125,14 @@ static Scsi_Host_Template sil_sht = {
static
struct
ata_port_operations
sil_ops
=
{
.
port_disable
=
ata_port_disable
,
.
dev_config
=
sil_dev_config
,
.
tf_load
=
ata_tf_load
_mmio
,
.
tf_read
=
ata_tf_read
_mmio
,
.
check_status
=
ata_check_status
_mmio
,
.
exec_command
=
ata_exec_command
_mmio
,
.
tf_load
=
ata_tf_load
,
.
tf_read
=
ata_tf_read
,
.
check_status
=
ata_check_status
,
.
exec_command
=
ata_exec_command
,
.
phy_reset
=
sata_phy_reset
,
.
post_set_mode
=
sil_post_set_mode
,
.
bmdma_setup
=
ata_bmdma_setup
_mmio
,
.
bmdma_start
=
ata_bmdma_start
_mmio
,
.
bmdma_setup
=
ata_bmdma_setup
,
.
bmdma_start
=
ata_bmdma_start
,
.
qc_prep
=
ata_qc_prep
,
.
qc_issue
=
ata_qc_issue_prot
,
.
eng_timeout
=
ata_eng_timeout
,
...
...
drivers/scsi/sata_sis.c
View file @
faf8ec06
...
...
@@ -94,13 +94,13 @@ static Scsi_Host_Template sis_sht = {
static
struct
ata_port_operations
sis_ops
=
{
.
port_disable
=
ata_port_disable
,
.
tf_load
=
ata_tf_load
_pio
,
.
tf_read
=
ata_tf_read
_pio
,
.
check_status
=
ata_check_status
_pio
,
.
exec_command
=
ata_exec_command
_pio
,
.
tf_load
=
ata_tf_load
,
.
tf_read
=
ata_tf_read
,
.
check_status
=
ata_check_status
,
.
exec_command
=
ata_exec_command
,
.
phy_reset
=
sata_phy_reset
,
.
bmdma_setup
=
ata_bmdma_setup
_pio
,
.
bmdma_start
=
ata_bmdma_start
_pio
,
.
bmdma_setup
=
ata_bmdma_setup
,
.
bmdma_start
=
ata_bmdma_start
,
.
qc_prep
=
ata_qc_prep
,
.
qc_issue
=
ata_qc_issue_prot
,
.
eng_timeout
=
ata_eng_timeout
,
...
...
@@ -112,6 +112,16 @@ static struct ata_port_operations sis_ops = {
.
port_stop
=
ata_port_stop
,
};
static
struct
ata_port_info
sis_port_info
=
{
.
sht
=
&
sis_sht
,
.
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_SATA_RESET
|
ATA_FLAG_NO_LEGACY
,
.
pio_mask
=
0x1f
,
.
mwdma_mask
=
0x7
,
.
udma_mask
=
0x7f
,
.
port_ops
=
&
sis_ops
,
};
MODULE_AUTHOR
(
"Uwe Koziolek"
);
MODULE_DESCRIPTION
(
"low-level driver for Silicon Integratad Systems SATA controller"
);
...
...
@@ -185,6 +195,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
struct
ata_probe_ent
*
probe_ent
=
NULL
;
int
rc
;
u32
genctl
;
struct
ata_port_info
*
ppi
;
rc
=
pci_enable_device
(
pdev
);
if
(
rc
)
...
...
@@ -201,20 +212,13 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if
(
rc
)
goto
err_out_regions
;
probe_ent
=
kmalloc
(
sizeof
(
*
probe_ent
),
GFP_KERNEL
);
ppi
=
&
sis_port_info
;
probe_ent
=
ata_pci_init_native_mode
(
pdev
,
&
ppi
);
if
(
!
probe_ent
)
{
rc
=
-
ENOMEM
;
goto
err_out_regions
;
}
memset
(
probe_ent
,
0
,
sizeof
(
*
probe_ent
));
probe_ent
->
pdev
=
pdev
;
INIT_LIST_HEAD
(
&
probe_ent
->
node
);
probe_ent
->
sht
=
&
sis_sht
;
probe_ent
->
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_SATA_RESET
|
ATA_FLAG_NO_LEGACY
;
/* check and see if the SCRs are in IO space or PCI cfg space */
pci_read_config_dword
(
pdev
,
SIS_GENCTL
,
&
genctl
);
if
((
genctl
&
GENCTL_IOMAPPED_SCR
)
==
0
)
...
...
@@ -231,32 +235,12 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
probe_ent
->
host_flags
|=
SIS_FLAG_CFGSCR
;
}
probe_ent
->
pio_mask
=
0x1f
;
probe_ent
->
mwdma_mask
=
0x7
;
probe_ent
->
udma_mask
=
0x7f
;
probe_ent
->
port_ops
=
&
sis_ops
;
probe_ent
->
port
[
0
].
cmd_addr
=
pci_resource_start
(
pdev
,
0
);
ata_std_ports
(
&
probe_ent
->
port
[
0
]);
probe_ent
->
port
[
0
].
ctl_addr
=
pci_resource_start
(
pdev
,
1
)
|
ATA_PCI_CTL_OFS
;
probe_ent
->
port
[
0
].
bmdma_addr
=
pci_resource_start
(
pdev
,
4
);
if
(
!
(
probe_ent
->
host_flags
&
SIS_FLAG_CFGSCR
))
if
(
!
(
probe_ent
->
host_flags
&
SIS_FLAG_CFGSCR
))
{
probe_ent
->
port
[
0
].
scr_addr
=
pci_resource_start
(
pdev
,
SIS_SCR_PCI_BAR
);
probe_ent
->
port
[
1
].
cmd_addr
=
pci_resource_start
(
pdev
,
2
);
ata_std_ports
(
&
probe_ent
->
port
[
1
]);
probe_ent
->
port
[
1
].
ctl_addr
=
pci_resource_start
(
pdev
,
3
)
|
ATA_PCI_CTL_OFS
;
probe_ent
->
port
[
1
].
bmdma_addr
=
pci_resource_start
(
pdev
,
4
)
+
8
;
if
(
!
(
probe_ent
->
host_flags
&
SIS_FLAG_CFGSCR
))
probe_ent
->
port
[
1
].
scr_addr
=
pci_resource_start
(
pdev
,
SIS_SCR_PCI_BAR
)
+
64
;
probe_ent
->
n_ports
=
2
;
probe_ent
->
irq
=
pdev
->
irq
;
probe_ent
->
irq_flags
=
SA_SHIRQ
;
}
pci_set_master
(
pdev
);
pci_enable_intx
(
pdev
);
...
...
drivers/scsi/sata_svw.c
View file @
faf8ec06
...
...
@@ -148,7 +148,73 @@ static void k2_sata_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
}
}
/**
* k2_bmdma_setup_mmio - Set up PCI IDE BMDMA transaction (MMIO)
* @qc: Info associated with this ATA transaction.
*
* LOCKING:
* spin_lock_irqsave(host_set lock)
*/
void
k2_bmdma_setup_mmio
(
struct
ata_queued_cmd
*
qc
)
{
struct
ata_port
*
ap
=
qc
->
ap
;
unsigned
int
rw
=
(
qc
->
tf
.
flags
&
ATA_TFLAG_WRITE
);
u8
dmactl
;
void
*
mmio
=
(
void
*
)
ap
->
ioaddr
.
bmdma_addr
;
/* load PRD table addr. */
mb
();
/* make sure PRD table writes are visible to controller */
writel
(
ap
->
prd_dma
,
mmio
+
ATA_DMA_TABLE_OFS
);
/* specify data direction, triple-check start bit is clear */
dmactl
=
readb
(
mmio
+
ATA_DMA_CMD
);
dmactl
&=
~
(
ATA_DMA_WR
|
ATA_DMA_START
);
if
(
!
rw
)
dmactl
|=
ATA_DMA_WR
;
writeb
(
dmactl
,
mmio
+
ATA_DMA_CMD
);
/* issue r/w command if this is not a ATA DMA command*/
if
(
qc
->
tf
.
protocol
!=
ATA_PROT_DMA
)
ap
->
ops
->
exec_command
(
ap
,
&
qc
->
tf
);
}
/**
* k2_bmdma_start_mmio - Start a PCI IDE BMDMA transaction (MMIO)
* @qc: Info associated with this ATA transaction.
*
* LOCKING:
* spin_lock_irqsave(host_set lock)
*/
void
k2_bmdma_start_mmio
(
struct
ata_queued_cmd
*
qc
)
{
struct
ata_port
*
ap
=
qc
->
ap
;
void
*
mmio
=
(
void
*
)
ap
->
ioaddr
.
bmdma_addr
;
u8
dmactl
;
/* start host DMA transaction */
dmactl
=
readb
(
mmio
+
ATA_DMA_CMD
);
writeb
(
dmactl
|
ATA_DMA_START
,
mmio
+
ATA_DMA_CMD
);
/* There is a race condition in certain SATA controllers that can
be seen when the r/w command is given to the controller before the
host DMA is started. On a Read command, the controller would initiate
the command to the drive even before it sees the DMA start. When there
are very fast drives connected to the controller, or when the data request
hits in the drive cache, there is the possibility that the drive returns a part
or all of the requested data to the controller before the DMA start is issued.
In this case, the controller would become confused as to what to do with the data.
In the worst case when all the data is returned back to the controller, the
controller could hang. In other cases it could return partial data returning
in data corruption. This problem has been seen in PPC systems and can also appear
on an system with very fast disks, where the SATA controller is sitting behind a
number of bridges, and hence there is significant latency between the r/w command
and the start command. */
/* issue r/w command if the access is to ATA*/
if
(
qc
->
tf
.
protocol
==
ATA_PROT_DMA
)
ap
->
ops
->
exec_command
(
ap
,
&
qc
->
tf
);
}
static
u8
k2_stat_check_status
(
struct
ata_port
*
ap
)
{
return
readl
((
void
*
)
ap
->
ioaddr
.
status_addr
);
...
...
@@ -230,10 +296,10 @@ static struct ata_port_operations k2_sata_ops = {
.
tf_load
=
k2_sata_tf_load
,
.
tf_read
=
k2_sata_tf_read
,
.
check_status
=
k2_stat_check_status
,
.
exec_command
=
ata_exec_command
_mmio
,
.
exec_command
=
ata_exec_command
,
.
phy_reset
=
sata_phy_reset
,
.
bmdma_setup
=
ata
_bmdma_setup_mmio
,
.
bmdma_start
=
ata
_bmdma_start_mmio
,
.
bmdma_setup
=
k2
_bmdma_setup_mmio
,
.
bmdma_start
=
k2
_bmdma_start_mmio
,
.
qc_prep
=
ata_qc_prep
,
.
qc_issue
=
ata_qc_issue_prot
,
.
eng_timeout
=
ata_eng_timeout
,
...
...
@@ -373,6 +439,8 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
static
struct
pci_device_id
k2_sata_pci_tbl
[]
=
{
{
0x1166
,
0x0240
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0x1166
,
0x0241
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0x1166
,
0x0242
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
}
};
...
...
drivers/scsi/sata_sx4.c
View file @
faf8ec06
...
...
@@ -193,8 +193,8 @@ static Scsi_Host_Template pdc_sata_sht = {
static
struct
ata_port_operations
pdc_20621_ops
=
{
.
port_disable
=
ata_port_disable
,
.
tf_load
=
pdc_tf_load_mmio
,
.
tf_read
=
ata_tf_read
_mmio
,
.
check_status
=
ata_check_status
_mmio
,
.
tf_read
=
ata_tf_read
,
.
check_status
=
ata_check_status
,
.
exec_command
=
pdc_exec_command_mmio
,
.
phy_reset
=
pdc_20621_phy_reset
,
.
qc_prep
=
pdc20621_qc_prep
,
...
...
@@ -887,7 +887,7 @@ static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf)
{
WARN_ON
(
tf
->
protocol
==
ATA_PROT_DMA
||
tf
->
protocol
==
ATA_PROT_NODATA
);
ata_tf_load
_mmio
(
ap
,
tf
);
ata_tf_load
(
ap
,
tf
);
}
...
...
@@ -895,7 +895,7 @@ static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf)
{
WARN_ON
(
tf
->
protocol
==
ATA_PROT_DMA
||
tf
->
protocol
==
ATA_PROT_NODATA
);
ata_exec_command
_mmio
(
ap
,
tf
);
ata_exec_command
(
ap
,
tf
);
}
...
...
drivers/scsi/sata_via.c
View file @
faf8ec06
...
...
@@ -100,15 +100,15 @@ static Scsi_Host_Template svia_sht = {
static
struct
ata_port_operations
svia_sata_ops
=
{
.
port_disable
=
ata_port_disable
,
.
tf_load
=
ata_tf_load
_pio
,
.
tf_read
=
ata_tf_read
_pio
,
.
check_status
=
ata_check_status
_pio
,
.
exec_command
=
ata_exec_command
_pio
,
.
tf_load
=
ata_tf_load
,
.
tf_read
=
ata_tf_read
,
.
check_status
=
ata_check_status
,
.
exec_command
=
ata_exec_command
,
.
phy_reset
=
sata_phy_reset
,
.
bmdma_setup
=
ata_bmdma_setup
_pio
,
.
bmdma_start
=
ata_bmdma_start
_pio
,
.
bmdma_setup
=
ata_bmdma_setup
,
.
bmdma_start
=
ata_bmdma_start
,
.
qc_prep
=
ata_qc_prep
,
.
qc_issue
=
ata_qc_issue_prot
,
...
...
@@ -124,6 +124,15 @@ static struct ata_port_operations svia_sata_ops = {
.
port_stop
=
ata_port_stop
,
};
static
struct
ata_port_info
svia_port_info
=
{
.
sht
=
&
svia_sht
,
.
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_SRST
|
ATA_FLAG_NO_LEGACY
,
.
pio_mask
=
0x1f
,
.
mwdma_mask
=
0x07
,
.
udma_mask
=
0x7f
,
.
port_ops
=
&
svia_sata_ops
,
};
MODULE_AUTHOR
(
"Jeff Garzik"
);
MODULE_DESCRIPTION
(
"SCSI low-level driver for VIA SATA controllers"
);
MODULE_LICENSE
(
"GPL"
);
...
...
@@ -157,6 +166,7 @@ static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
static
int
printed_version
;
unsigned
int
i
;
int
rc
;
struct
ata_port_info
*
ppi
;
struct
ata_probe_ent
*
probe_ent
;
u8
tmp8
;
...
...
@@ -197,42 +207,17 @@ static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if
(
rc
)
goto
err_out_regions
;
probe_ent
=
kmalloc
(
sizeof
(
*
probe_ent
),
GFP_KERNEL
);
ppi
=
&
svia_port_info
;
probe_ent
=
ata_pci_init_native_mode
(
pdev
,
&
ppi
);
if
(
!
probe_ent
)
{
printk
(
KERN_ERR
DRV_NAME
"(%s): out of memory
\n
"
,
pci_name
(
pdev
));
rc
=
-
ENOMEM
;
goto
err_out_regions
;
}
memset
(
probe_ent
,
0
,
sizeof
(
*
probe_ent
));
INIT_LIST_HEAD
(
&
probe_ent
->
node
);
probe_ent
->
pdev
=
pdev
;
probe_ent
->
sht
=
&
svia_sht
;
probe_ent
->
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_SRST
|
ATA_FLAG_NO_LEGACY
;
probe_ent
->
port_ops
=
&
svia_sata_ops
;
probe_ent
->
n_ports
=
2
;
probe_ent
->
irq
=
pdev
->
irq
;
probe_ent
->
irq_flags
=
SA_SHIRQ
;
probe_ent
->
pio_mask
=
0x1f
;
probe_ent
->
mwdma_mask
=
0x07
;
probe_ent
->
udma_mask
=
0x7f
;
probe_ent
->
port
[
0
].
cmd_addr
=
pci_resource_start
(
pdev
,
0
);
ata_std_ports
(
&
probe_ent
->
port
[
0
]);
probe_ent
->
port
[
0
].
altstatus_addr
=
probe_ent
->
port
[
0
].
ctl_addr
=
pci_resource_start
(
pdev
,
1
)
|
ATA_PCI_CTL_OFS
;
probe_ent
->
port
[
0
].
bmdma_addr
=
pci_resource_start
(
pdev
,
4
);
probe_ent
->
port
[
0
].
scr_addr
=
svia_scr_addr
(
pci_resource_start
(
pdev
,
5
),
0
);
probe_ent
->
port
[
1
].
cmd_addr
=
pci_resource_start
(
pdev
,
2
);
ata_std_ports
(
&
probe_ent
->
port
[
1
]);
probe_ent
->
port
[
1
].
altstatus_addr
=
probe_ent
->
port
[
1
].
ctl_addr
=
pci_resource_start
(
pdev
,
3
)
|
ATA_PCI_CTL_OFS
;
probe_ent
->
port
[
1
].
bmdma_addr
=
pci_resource_start
(
pdev
,
4
)
+
8
;
probe_ent
->
port
[
1
].
scr_addr
=
svia_scr_addr
(
pci_resource_start
(
pdev
,
5
),
1
);
...
...
drivers/scsi/sata_vsc.c
View file @
faf8ec06
...
...
@@ -211,11 +211,11 @@ static struct ata_port_operations vsc_sata_ops = {
.
port_disable
=
ata_port_disable
,
.
tf_load
=
vsc_sata_tf_load
,
.
tf_read
=
vsc_sata_tf_read
,
.
exec_command
=
ata_exec_command
_mmio
,
.
check_status
=
ata_check_status
_mmio
,
.
exec_command
=
ata_exec_command
,
.
check_status
=
ata_check_status
,
.
phy_reset
=
sata_phy_reset
,
.
bmdma_setup
=
ata_bmdma_setup
_mmio
,
.
bmdma_start
=
ata_bmdma_start
_mmio
,
.
bmdma_setup
=
ata_bmdma_setup
,
.
bmdma_start
=
ata_bmdma_start
,
.
qc_prep
=
ata_qc_prep
,
.
qc_issue
=
ata_qc_issue_prot
,
.
eng_timeout
=
ata_eng_timeout
,
...
...
include/linux/libata.h
View file @
faf8ec06
...
...
@@ -379,19 +379,19 @@ extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc
/*
* Default driver ops implementations
*/
extern
void
ata_tf_load_pio
(
struct
ata_port
*
ap
,
struct
ata_taskfile
*
tf
);
extern
void
ata_tf_load_mmio
(
struct
ata_port
*
ap
,
struct
ata_taskfile
*
tf
);
extern
void
ata_tf_read_pio
(
struct
ata_port
*
ap
,
struct
ata_taskfile
*
tf
);
extern
void
ata_tf_read_mmio
(
struct
ata_port
*
ap
,
struct
ata_taskfile
*
tf
);
extern
void
ata_tf_load
(
struct
ata_port
*
ap
,
struct
ata_taskfile
*
tf
);
extern
void
ata_tf_read
(
struct
ata_port
*
ap
,
struct
ata_taskfile
*
tf
);
extern
void
ata_tf_to_fis
(
struct
ata_taskfile
*
tf
,
u8
*
fis
,
u8
pmp
);
extern
void
ata_tf_from_fis
(
u8
*
fis
,
struct
ata_taskfile
*
tf
);
extern
u8
ata_check_status_pio
(
struct
ata_port
*
ap
);
extern
u8
ata_check_status_mmio
(
struct
ata_port
*
ap
);
extern
void
ata_exec_command_pio
(
struct
ata_port
*
ap
,
struct
ata_taskfile
*
tf
);
extern
void
ata_exec_command_mmio
(
struct
ata_port
*
ap
,
struct
ata_taskfile
*
tf
);
extern
u8
ata_check_status
(
struct
ata_port
*
ap
);
extern
void
ata_exec_command
(
struct
ata_port
*
ap
,
struct
ata_taskfile
*
tf
);
extern
int
ata_port_start
(
struct
ata_port
*
ap
);
extern
void
ata_port_stop
(
struct
ata_port
*
ap
);
extern
irqreturn_t
ata_interrupt
(
int
irq
,
void
*
dev_instance
,
struct
pt_regs
*
regs
);
extern
struct
ata_probe_ent
*
ata_pci_init_native_mode
(
struct
pci_dev
*
pdev
,
struct
ata_port_info
**
port
);
extern
struct
ata_probe_ent
*
ata_pci_init_legacy_mode
(
struct
pci_dev
*
pdev
,
struct
ata_port_info
**
port
);
extern
void
ata_qc_prep
(
struct
ata_queued_cmd
*
qc
);
extern
int
ata_qc_issue_prot
(
struct
ata_queued_cmd
*
qc
);
extern
void
ata_sg_init_one
(
struct
ata_queued_cmd
*
qc
,
void
*
buf
,
...
...
@@ -400,10 +400,8 @@ extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
unsigned
int
n_elem
);
extern
void
ata_dev_id_string
(
struct
ata_device
*
dev
,
unsigned
char
*
s
,
unsigned
int
ofs
,
unsigned
int
len
);
extern
void
ata_bmdma_setup_mmio
(
struct
ata_queued_cmd
*
qc
);
extern
void
ata_bmdma_start_mmio
(
struct
ata_queued_cmd
*
qc
);
extern
void
ata_bmdma_setup_pio
(
struct
ata_queued_cmd
*
qc
);
extern
void
ata_bmdma_start_pio
(
struct
ata_queued_cmd
*
qc
);
extern
void
ata_bmdma_setup
(
struct
ata_queued_cmd
*
qc
);
extern
void
ata_bmdma_start
(
struct
ata_queued_cmd
*
qc
);
extern
void
ata_bmdma_irq_clear
(
struct
ata_port
*
ap
);
extern
int
pci_test_config_bits
(
struct
pci_dev
*
pdev
,
struct
pci_bits
*
bits
);
extern
void
ata_qc_complete
(
struct
ata_queued_cmd
*
qc
,
u8
drv_stat
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment