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
26e3689c
Commit
26e3689c
authored
Apr 24, 2003
by
James Bottomley
Committed by
James Bottomley
Apr 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert Megaraid to irqreturn_t
parent
28e9fb93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
drivers/scsi/megaraid.c
drivers/scsi/megaraid.c
+16
-8
drivers/scsi/megaraid.h
drivers/scsi/megaraid.h
+2
-2
No files found.
drivers/scsi/megaraid.c
View file @
26e3689c
...
@@ -1739,7 +1739,7 @@ issue_scb_block(adapter_t *adapter, u_char *raw_mbox)
...
@@ -1739,7 +1739,7 @@ issue_scb_block(adapter_t *adapter, u_char *raw_mbox)
* Find out if our device is interrupting. If yes, acknowledge the interrupt
* Find out if our device is interrupting. If yes, acknowledge the interrupt
* and service the completed commands.
* and service the completed commands.
*/
*/
static
void
static
irqreturn_t
megaraid_isr_iomapped
(
int
irq
,
void
*
devp
,
struct
pt_regs
*
regs
)
megaraid_isr_iomapped
(
int
irq
,
void
*
devp
,
struct
pt_regs
*
regs
)
{
{
adapter_t
*
adapter
=
devp
;
adapter_t
*
adapter
=
devp
;
...
@@ -1748,6 +1748,7 @@ megaraid_isr_iomapped(int irq, void *devp, struct pt_regs *regs)
...
@@ -1748,6 +1748,7 @@ megaraid_isr_iomapped(int irq, void *devp, struct pt_regs *regs)
u8
nstatus
;
u8
nstatus
;
u8
completed
[
MAX_FIRMWARE_STATUS
];
u8
completed
[
MAX_FIRMWARE_STATUS
];
u8
byte
;
u8
byte
;
int
handled
=
0
;
/*
/*
...
@@ -1762,8 +1763,7 @@ megaraid_isr_iomapped(int irq, void *devp, struct pt_regs *regs)
...
@@ -1762,8 +1763,7 @@ megaraid_isr_iomapped(int irq, void *devp, struct pt_regs *regs)
/*
/*
* No more pending commands
* No more pending commands
*/
*/
spin_unlock_irqrestore
(
&
adapter
->
lock
,
flags
);
goto
out_unlock
;
return
;
}
}
set_irq_state
(
adapter
,
byte
);
set_irq_state
(
adapter
,
byte
);
...
@@ -1788,6 +1788,8 @@ megaraid_isr_iomapped(int irq, void *devp, struct pt_regs *regs)
...
@@ -1788,6 +1788,8 @@ megaraid_isr_iomapped(int irq, void *devp, struct pt_regs *regs)
mega_rundoneq
(
adapter
);
mega_rundoneq
(
adapter
);
handled
=
1
;
/* Loop through any pending requests */
/* Loop through any pending requests */
if
(
atomic_read
(
&
adapter
->
quiescent
)
==
0
)
{
if
(
atomic_read
(
&
adapter
->
quiescent
)
==
0
)
{
mega_runpendq
(
adapter
);
mega_runpendq
(
adapter
);
...
@@ -1795,9 +1797,11 @@ megaraid_isr_iomapped(int irq, void *devp, struct pt_regs *regs)
...
@@ -1795,9 +1797,11 @@ megaraid_isr_iomapped(int irq, void *devp, struct pt_regs *regs)
}
while
(
1
);
}
while
(
1
);
out_unlock:
spin_unlock_irqrestore
(
&
adapter
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
adapter
->
lock
,
flags
);
return
;
return
IRQ_RETVAL
(
handled
)
;
}
}
...
@@ -1811,7 +1815,7 @@ megaraid_isr_iomapped(int irq, void *devp, struct pt_regs *regs)
...
@@ -1811,7 +1815,7 @@ megaraid_isr_iomapped(int irq, void *devp, struct pt_regs *regs)
* Find out if our device is interrupting. If yes, acknowledge the interrupt
* Find out if our device is interrupting. If yes, acknowledge the interrupt
* and service the completed commands.
* and service the completed commands.
*/
*/
static
void
static
irqreturn_t
megaraid_isr_memmapped
(
int
irq
,
void
*
devp
,
struct
pt_regs
*
regs
)
megaraid_isr_memmapped
(
int
irq
,
void
*
devp
,
struct
pt_regs
*
regs
)
{
{
adapter_t
*
adapter
=
devp
;
adapter_t
*
adapter
=
devp
;
...
@@ -1820,6 +1824,7 @@ megaraid_isr_memmapped(int irq, void *devp, struct pt_regs *regs)
...
@@ -1820,6 +1824,7 @@ megaraid_isr_memmapped(int irq, void *devp, struct pt_regs *regs)
u32
dword
=
0
;
u32
dword
=
0
;
u8
nstatus
;
u8
nstatus
;
u8
completed
[
MAX_FIRMWARE_STATUS
];
u8
completed
[
MAX_FIRMWARE_STATUS
];
int
handled
=
0
;
/*
/*
...
@@ -1834,8 +1839,7 @@ megaraid_isr_memmapped(int irq, void *devp, struct pt_regs *regs)
...
@@ -1834,8 +1839,7 @@ megaraid_isr_memmapped(int irq, void *devp, struct pt_regs *regs)
/*
/*
* No more pending commands
* No more pending commands
*/
*/
spin_unlock_irqrestore
(
&
adapter
->
lock
,
flags
);
goto
out_unlock
;
return
;
}
}
WROUTDOOR
(
adapter
,
0x10001234
);
WROUTDOOR
(
adapter
,
0x10001234
);
...
@@ -1857,6 +1861,8 @@ megaraid_isr_memmapped(int irq, void *devp, struct pt_regs *regs)
...
@@ -1857,6 +1861,8 @@ megaraid_isr_memmapped(int irq, void *devp, struct pt_regs *regs)
/* Acknowledge interrupt */
/* Acknowledge interrupt */
WRINDOOR
(
adapter
,
0x2
);
WRINDOOR
(
adapter
,
0x2
);
handled
=
1
;
while
(
RDINDOOR
(
adapter
)
&
0x02
)
cpu_relax
();
while
(
RDINDOOR
(
adapter
)
&
0x02
)
cpu_relax
();
mega_cmd_done
(
adapter
,
completed
,
nstatus
,
status
);
mega_cmd_done
(
adapter
,
completed
,
nstatus
,
status
);
...
@@ -1870,9 +1876,11 @@ megaraid_isr_memmapped(int irq, void *devp, struct pt_regs *regs)
...
@@ -1870,9 +1876,11 @@ megaraid_isr_memmapped(int irq, void *devp, struct pt_regs *regs)
}
while
(
1
);
}
while
(
1
);
out_unlock:
spin_unlock_irqrestore
(
&
adapter
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
adapter
->
lock
,
flags
);
return
;
return
IRQ_RETVAL
(
handled
)
;
}
}
/**
/**
* mega_cmd_done()
* mega_cmd_done()
...
...
drivers/scsi/megaraid.h
View file @
26e3689c
...
@@ -1022,8 +1022,8 @@ static void __mega_runpendq(adapter_t *);
...
@@ -1022,8 +1022,8 @@ static void __mega_runpendq(adapter_t *);
static
inline
void
mega_runpendq
(
adapter_t
*
);
static
inline
void
mega_runpendq
(
adapter_t
*
);
static
int
issue_scb_block
(
adapter_t
*
,
u_char
*
);
static
int
issue_scb_block
(
adapter_t
*
,
u_char
*
);
static
void
megaraid_isr_memmapped
(
int
,
void
*
,
struct
pt_regs
*
);
static
irqreturn_t
megaraid_isr_memmapped
(
int
,
void
*
,
struct
pt_regs
*
);
static
void
megaraid_isr_iomapped
(
int
,
void
*
,
struct
pt_regs
*
);
static
irqreturn_t
megaraid_isr_iomapped
(
int
,
void
*
,
struct
pt_regs
*
);
static
void
mega_free_scb
(
adapter_t
*
,
scb_t
*
);
static
void
mega_free_scb
(
adapter_t
*
,
scb_t
*
);
...
...
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