Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
8a6d498e
Commit
8a6d498e
authored
Jan 17, 2006
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'debug'
parents
a1bd9e68
bfd60579
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
7 deletions
+45
-7
include/linux/libata.h
include/linux/libata.h
+45
-7
No files found.
include/linux/libata.h
View file @
8a6d498e
...
@@ -35,7 +35,8 @@
...
@@ -35,7 +35,8 @@
#include <linux/workqueue.h>
#include <linux/workqueue.h>
/*
/*
* compile-time options
* compile-time options: to be removed as soon as all the drivers are
* converted to the new debugging mechanism
*/
*/
#undef ATA_DEBUG
/* debugging output */
#undef ATA_DEBUG
/* debugging output */
#undef ATA_VERBOSE_DEBUG
/* yet more debugging output */
#undef ATA_VERBOSE_DEBUG
/* yet more debugging output */
...
@@ -71,6 +72,38 @@
...
@@ -71,6 +72,38 @@
}
}
#endif
#endif
/* NEW: debug levels */
#define HAVE_LIBATA_MSG 1
enum
{
ATA_MSG_DRV
=
0x0001
,
ATA_MSG_INFO
=
0x0002
,
ATA_MSG_PROBE
=
0x0004
,
ATA_MSG_WARN
=
0x0008
,
ATA_MSG_MALLOC
=
0x0010
,
ATA_MSG_CTL
=
0x0020
,
ATA_MSG_INTR
=
0x0040
,
ATA_MSG_ERR
=
0x0080
,
};
#define ata_msg_drv(p) ((p)->msg_enable & ATA_MSG_DRV)
#define ata_msg_info(p) ((p)->msg_enable & ATA_MSG_INFO)
#define ata_msg_probe(p) ((p)->msg_enable & ATA_MSG_PROBE)
#define ata_msg_warn(p) ((p)->msg_enable & ATA_MSG_WARN)
#define ata_msg_malloc(p) ((p)->msg_enable & ATA_MSG_MALLOC)
#define ata_msg_ctl(p) ((p)->msg_enable & ATA_MSG_CTL)
#define ata_msg_intr(p) ((p)->msg_enable & ATA_MSG_INTR)
#define ata_msg_err(p) ((p)->msg_enable & ATA_MSG_ERR)
static
inline
u32
ata_msg_init
(
int
dval
,
int
default_msg_enable_bits
)
{
if
(
dval
<
0
||
dval
>=
(
sizeof
(
u32
)
*
8
))
return
default_msg_enable_bits
;
/* should be 0x1 - only driver info msgs */
if
(
!
dval
)
return
0
;
return
(
1
<<
dval
)
-
1
;
}
/* defines only for the constants which don't work well as enums */
/* defines only for the constants which don't work well as enums */
#define ATA_TAG_POISON 0xfafbfcfdU
#define ATA_TAG_POISON 0xfafbfcfdU
...
@@ -359,6 +392,8 @@ struct ata_port {
...
@@ -359,6 +392,8 @@ struct ata_port {
unsigned
int
hsm_task_state
;
unsigned
int
hsm_task_state
;
unsigned
long
pio_task_timeout
;
unsigned
long
pio_task_timeout
;
u32
msg_enable
;
void
*
private_data
;
void
*
private_data
;
};
};
...
@@ -645,8 +680,8 @@ static inline u8 ata_wait_idle(struct ata_port *ap)
...
@@ -645,8 +680,8 @@ static inline u8 ata_wait_idle(struct ata_port *ap)
if
(
status
&
(
ATA_BUSY
|
ATA_DRQ
))
{
if
(
status
&
(
ATA_BUSY
|
ATA_DRQ
))
{
unsigned
long
l
=
ap
->
ioaddr
.
status_addr
;
unsigned
long
l
=
ap
->
ioaddr
.
status_addr
;
printk
(
KERN_WARNING
if
(
ata_msg_warn
(
ap
))
"ATA: abnormal status 0x%X on port 0x%lX
\n
"
,
printk
(
KERN_WARNING
"ATA: abnormal status 0x%X on port 0x%lX
\n
"
,
status
,
l
);
status
,
l
);
}
}
...
@@ -739,7 +774,8 @@ static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq)
...
@@ -739,7 +774,8 @@ static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq)
status
=
ata_busy_wait
(
ap
,
bits
,
1000
);
status
=
ata_busy_wait
(
ap
,
bits
,
1000
);
if
(
status
&
bits
)
if
(
status
&
bits
)
DPRINTK
(
"abnormal status 0x%X
\n
"
,
status
);
if
(
ata_msg_err
(
ap
))
printk
(
KERN_ERR
"abnormal status 0x%X
\n
"
,
status
);
/* get controller status; clear intr, err bits */
/* get controller status; clear intr, err bits */
if
(
ap
->
flags
&
ATA_FLAG_MMIO
)
{
if
(
ap
->
flags
&
ATA_FLAG_MMIO
)
{
...
@@ -757,7 +793,9 @@ static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq)
...
@@ -757,7 +793,9 @@ static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq)
post_stat
=
inb
(
ap
->
ioaddr
.
bmdma_addr
+
ATA_DMA_STATUS
);
post_stat
=
inb
(
ap
->
ioaddr
.
bmdma_addr
+
ATA_DMA_STATUS
);
}
}
VPRINTK
(
"irq ack: host_stat 0x%X, new host_stat 0x%X, drv_stat 0x%X
\n
"
,
if
(
ata_msg_intr
(
ap
))
printk
(
KERN_INFO
"%s: irq ack: host_stat 0x%X, new host_stat 0x%X, drv_stat 0x%X
\n
"
,
__FUNCTION__
,
host_stat
,
post_stat
,
status
);
host_stat
,
post_stat
,
status
);
return
status
;
return
status
;
...
...
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