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
Kirill Smelkov
linux
Commits
55cca65e
Commit
55cca65e
authored
Mar 21, 2006
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[libata sata_vsc, sata_svw] Convert #define'd constants to enums
Also, bump sata_vsc version.
parent
c962990a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
73 deletions
+78
-73
drivers/scsi/sata_svw.c
drivers/scsi/sata_svw.c
+29
-27
drivers/scsi/sata_vsc.c
drivers/scsi/sata_vsc.c
+49
-46
No files found.
drivers/scsi/sata_svw.c
View file @
55cca65e
...
@@ -56,33 +56,35 @@
...
@@ -56,33 +56,35 @@
#define DRV_NAME "sata_svw"
#define DRV_NAME "sata_svw"
#define DRV_VERSION "1.07"
#define DRV_VERSION "1.07"
/* Taskfile registers offsets */
enum
{
#define K2_SATA_TF_CMD_OFFSET 0x00
/* Taskfile registers offsets */
#define K2_SATA_TF_DATA_OFFSET 0x00
K2_SATA_TF_CMD_OFFSET
=
0x00
,
#define K2_SATA_TF_ERROR_OFFSET 0x04
K2_SATA_TF_DATA_OFFSET
=
0x00
,
#define K2_SATA_TF_NSECT_OFFSET 0x08
K2_SATA_TF_ERROR_OFFSET
=
0x04
,
#define K2_SATA_TF_LBAL_OFFSET 0x0c
K2_SATA_TF_NSECT_OFFSET
=
0x08
,
#define K2_SATA_TF_LBAM_OFFSET 0x10
K2_SATA_TF_LBAL_OFFSET
=
0x0c
,
#define K2_SATA_TF_LBAH_OFFSET 0x14
K2_SATA_TF_LBAM_OFFSET
=
0x10
,
#define K2_SATA_TF_DEVICE_OFFSET 0x18
K2_SATA_TF_LBAH_OFFSET
=
0x14
,
#define K2_SATA_TF_CMDSTAT_OFFSET 0x1c
K2_SATA_TF_DEVICE_OFFSET
=
0x18
,
#define K2_SATA_TF_CTL_OFFSET 0x20
K2_SATA_TF_CMDSTAT_OFFSET
=
0x1c
,
K2_SATA_TF_CTL_OFFSET
=
0x20
,
/* DMA base */
#define K2_SATA_DMA_CMD_OFFSET 0x30
/* DMA base */
K2_SATA_DMA_CMD_OFFSET
=
0x30
,
/* SCRs base */
#define K2_SATA_SCR_STATUS_OFFSET 0x40
/* SCRs base */
#define K2_SATA_SCR_ERROR_OFFSET 0x44
K2_SATA_SCR_STATUS_OFFSET
=
0x40
,
#define K2_SATA_SCR_CONTROL_OFFSET 0x48
K2_SATA_SCR_ERROR_OFFSET
=
0x44
,
K2_SATA_SCR_CONTROL_OFFSET
=
0x48
,
/* Others */
#define K2_SATA_SICR1_OFFSET 0x80
/* Others */
#define K2_SATA_SICR2_OFFSET 0x84
K2_SATA_SICR1_OFFSET
=
0x80
,
#define K2_SATA_SIM_OFFSET 0x88
K2_SATA_SICR2_OFFSET
=
0x84
,
K2_SATA_SIM_OFFSET
=
0x88
,
/* Port stride */
#define K2_SATA_PORT_OFFSET 0x100
/* Port stride */
K2_SATA_PORT_OFFSET
=
0x100
,
};
static
u8
k2_stat_check_status
(
struct
ata_port
*
ap
);
static
u8
k2_stat_check_status
(
struct
ata_port
*
ap
);
...
...
drivers/scsi/sata_vsc.c
View file @
55cca65e
...
@@ -47,52 +47,55 @@
...
@@ -47,52 +47,55 @@
#include <linux/libata.h>
#include <linux/libata.h>
#define DRV_NAME "sata_vsc"
#define DRV_NAME "sata_vsc"
#define DRV_VERSION "1.1"
#define DRV_VERSION "1.2"
/* Interrupt register offsets (from chip base address) */
enum
{
#define VSC_SATA_INT_STAT_OFFSET 0x00
/* Interrupt register offsets (from chip base address) */
#define VSC_SATA_INT_MASK_OFFSET 0x04
VSC_SATA_INT_STAT_OFFSET
=
0x00
,
VSC_SATA_INT_MASK_OFFSET
=
0x04
,
/* Taskfile registers offsets */
#define VSC_SATA_TF_CMD_OFFSET 0x00
/* Taskfile registers offsets */
#define VSC_SATA_TF_DATA_OFFSET 0x00
VSC_SATA_TF_CMD_OFFSET
=
0x00
,
#define VSC_SATA_TF_ERROR_OFFSET 0x04
VSC_SATA_TF_DATA_OFFSET
=
0x00
,
#define VSC_SATA_TF_FEATURE_OFFSET 0x06
VSC_SATA_TF_ERROR_OFFSET
=
0x04
,
#define VSC_SATA_TF_NSECT_OFFSET 0x08
VSC_SATA_TF_FEATURE_OFFSET
=
0x06
,
#define VSC_SATA_TF_LBAL_OFFSET 0x0c
VSC_SATA_TF_NSECT_OFFSET
=
0x08
,
#define VSC_SATA_TF_LBAM_OFFSET 0x10
VSC_SATA_TF_LBAL_OFFSET
=
0x0c
,
#define VSC_SATA_TF_LBAH_OFFSET 0x14
VSC_SATA_TF_LBAM_OFFSET
=
0x10
,
#define VSC_SATA_TF_DEVICE_OFFSET 0x18
VSC_SATA_TF_LBAH_OFFSET
=
0x14
,
#define VSC_SATA_TF_STATUS_OFFSET 0x1c
VSC_SATA_TF_DEVICE_OFFSET
=
0x18
,
#define VSC_SATA_TF_COMMAND_OFFSET 0x1d
VSC_SATA_TF_STATUS_OFFSET
=
0x1c
,
#define VSC_SATA_TF_ALTSTATUS_OFFSET 0x28
VSC_SATA_TF_COMMAND_OFFSET
=
0x1d
,
#define VSC_SATA_TF_CTL_OFFSET 0x29
VSC_SATA_TF_ALTSTATUS_OFFSET
=
0x28
,
VSC_SATA_TF_CTL_OFFSET
=
0x29
,
/* DMA base */
#define VSC_SATA_UP_DESCRIPTOR_OFFSET 0x64
/* DMA base */
#define VSC_SATA_UP_DATA_BUFFER_OFFSET 0x6C
VSC_SATA_UP_DESCRIPTOR_OFFSET
=
0x64
,
#define VSC_SATA_DMA_CMD_OFFSET 0x70
VSC_SATA_UP_DATA_BUFFER_OFFSET
=
0x6C
,
VSC_SATA_DMA_CMD_OFFSET
=
0x70
,
/* SCRs base */
#define VSC_SATA_SCR_STATUS_OFFSET 0x100
/* SCRs base */
#define VSC_SATA_SCR_ERROR_OFFSET 0x104
VSC_SATA_SCR_STATUS_OFFSET
=
0x100
,
#define VSC_SATA_SCR_CONTROL_OFFSET 0x108
VSC_SATA_SCR_ERROR_OFFSET
=
0x104
,
VSC_SATA_SCR_CONTROL_OFFSET
=
0x108
,
/* Port stride */
#define VSC_SATA_PORT_OFFSET 0x200
/* Port stride */
VSC_SATA_PORT_OFFSET
=
0x200
,
/* Error interrupt status bit offsets */
#define VSC_SATA_INT_ERROR_CRC 0x40
/* Error interrupt status bit offsets */
#define VSC_SATA_INT_ERROR_T 0x20
VSC_SATA_INT_ERROR_CRC
=
0x40
,
#define VSC_SATA_INT_ERROR_P 0x10
VSC_SATA_INT_ERROR_T
=
0x20
,
#define VSC_SATA_INT_ERROR_R 0x8
VSC_SATA_INT_ERROR_P
=
0x10
,
#define VSC_SATA_INT_ERROR_E 0x4
VSC_SATA_INT_ERROR_R
=
0x8
,
#define VSC_SATA_INT_ERROR_M 0x2
VSC_SATA_INT_ERROR_E
=
0x4
,
#define VSC_SATA_INT_PHY_CHANGE 0x1
VSC_SATA_INT_ERROR_M
=
0x2
,
#define VSC_SATA_INT_ERROR (VSC_SATA_INT_ERROR_CRC | VSC_SATA_INT_ERROR_T | \
VSC_SATA_INT_PHY_CHANGE
=
0x1
,
VSC_SATA_INT_ERROR_P | VSC_SATA_INT_ERROR_R | \
VSC_SATA_INT_ERROR
=
(
VSC_SATA_INT_ERROR_CRC
|
VSC_SATA_INT_ERROR_T
|
\
VSC_SATA_INT_ERROR_E | VSC_SATA_INT_ERROR_M | \
VSC_SATA_INT_ERROR_P
|
VSC_SATA_INT_ERROR_R
|
\
VSC_SATA_INT_PHY_CHANGE)
VSC_SATA_INT_ERROR_E
|
VSC_SATA_INT_ERROR_M
|
\
VSC_SATA_INT_PHY_CHANGE
),
};
#define is_vsc_sata_int_err(port_idx, int_status) \
#define is_vsc_sata_int_err(port_idx, int_status) \
(int_status & (VSC_SATA_INT_ERROR << (8 * port_idx)))
(int_status & (VSC_SATA_INT_ERROR << (8 * port_idx)))
...
...
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