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
846ca6b2
Commit
846ca6b2
authored
Nov 25, 2002
by
Alan Cox
Committed by
Linus Torvalds
Nov 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] bring i2o back into sync, clean up oddments
parent
898249f3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
25 deletions
+44
-25
drivers/message/i2o/i2o_block.c
drivers/message/i2o/i2o_block.c
+1
-3
drivers/message/i2o/i2o_core.c
drivers/message/i2o/i2o_core.c
+3
-0
drivers/message/i2o/i2o_scsi.c
drivers/message/i2o/i2o_scsi.c
+40
-22
No files found.
drivers/message/i2o/i2o_block.c
View file @
846ca6b2
...
...
@@ -1669,7 +1669,6 @@ static int i2o_block_init(void)
if
(
i2o_install_handler
(
&
i2o_block_handler
)
<
0
)
{
unregister_blkdev
(
MAJOR_NR
,
"i2o_block"
);
blk_cleanup_queue
(
BLK_DEFAULT_QUEUE
(
MAJOR_NR
));
printk
(
KERN_ERR
"i2o_block: unable to register OSM.
\n
"
);
return
-
EINVAL
;
}
...
...
@@ -1682,8 +1681,7 @@ static int i2o_block_init(void)
evt_pid
=
kernel_thread
(
i2ob_evt
,
NULL
,
CLONE_SIGHAND
);
if
(
evt_pid
<
0
)
{
printk
(
KERN_ERR
"i2o_block: Could not initialize event thread. Aborting
\n
"
);
printk
(
KERN_ERR
"i2o_block: Could not initialize event thread. Aborting
\n
"
);
i2o_remove_handler
(
&
i2o_block_handler
);
return
0
;
}
...
...
drivers/message/i2o/i2o_core.c
View file @
846ca6b2
...
...
@@ -3344,6 +3344,9 @@ void i2o_report_status(const char *severity, const char *str, u32 *msg)
u16
detailed_status
=
msg
[
4
]
&
0xFFFF
;
struct
i2o_handler
*
h
=
i2o_handlers
[
msg
[
2
]
&
(
MAX_I2O_MODULES
-
1
)];
if
(
cmd
==
I2O_CMD_UTIL_EVT_REGISTER
)
return
;
// No status in this reply
printk
(
"%s%s: "
,
severity
,
str
);
if
(
cmd
<
0x1F
)
// Utility cmd
...
...
drivers/message/i2o/i2o_scsi.c
View file @
846ca6b2
...
...
@@ -57,7 +57,6 @@
#include <linux/i2o.h>
#include "../../scsi/scsi.h"
#include "../../scsi/hosts.h"
#include "../../scsi/sd.h"
#if BITS_PER_LONG == 64
#error FIXME: driver does not support 64-bit platforms
...
...
@@ -918,6 +917,7 @@ int i2o_scsi_abort(Scsi_Cmnd * SCpnt)
unsigned
long
msg
;
u32
m
;
int
tid
;
unsigned
long
timeout
;
printk
(
KERN_WARNING
"i2o_scsi: Aborting command block.
\n
"
);
...
...
@@ -931,20 +931,20 @@ int i2o_scsi_abort(Scsi_Cmnd * SCpnt)
}
c
=
hostdata
->
controller
;
/*
* Obtain an I2O message. Right now we _have_ to obtain one
* until the scsi layer stuff is cleaned up.
*
* FIXME: we are in error context so we could sleep retry
* a bit and then bail in the improved scsi layer.
*/
spin_unlock_irq
(
host
->
host_lock
);
timeout
=
jiffies
+
2
*
HZ
;
do
{
mb
();
m
=
le32_to_cpu
(
I2O_POST_READ32
(
c
));
if
(
m
!=
0xFFFFFFFF
)
break
;
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
1
);
mb
();
}
while
(
m
==
0xFFFFFFFF
);
while
(
time_before
(
jiffies
,
timeout
));
msg
=
c
->
mem_offset
+
m
;
i2o_raw_writel
(
FIVE_WORD_MSG_SIZE
,
msg
);
...
...
@@ -955,6 +955,8 @@ int i2o_scsi_abort(Scsi_Cmnd * SCpnt)
wmb
();
i2o_post_message
(
c
,
m
);
wmb
();
spin_lock_irq
(
host
->
host_lock
);
return
SUCCESS
;
}
...
...
@@ -977,14 +979,20 @@ static int i2o_scsi_bus_reset(Scsi_Cmnd * SCpnt)
struct
i2o_scsi_host
*
hostdata
;
u32
m
;
unsigned
long
msg
;
unsigned
long
timeout
;
/*
* Find the TID for the bus
*/
printk
(
KERN_WARNING
"i2o_scsi: Attempting to reset the bus.
\n
"
);
host
=
SCpnt
->
host
;
spin_unlock_irq
(
host
->
host_lock
);
printk
(
KERN_WARNING
"i2o_scsi: Attempting to reset the bus.
\n
"
);
hostdata
=
(
struct
i2o_scsi_host
*
)
host
->
hostdata
;
tid
=
hostdata
->
bus_task
;
c
=
hostdata
->
controller
;
...
...
@@ -995,14 +1003,18 @@ static int i2o_scsi_bus_reset(Scsi_Cmnd * SCpnt)
* possibly ?
*/
timeout
=
jiffies
+
2
*
HZ
;
do
{
m
=
le32_to_cpu
(
I2O_POST_READ32
(
c
));
if
(
m
!=
0xFFFFFFFF
)
break
;
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
1
);
mb
();
}
while
(
time_before
(
jiffies
,
timeout
));
/*
* No free messages, try again next time - no big deal
*/
if
(
m
==
0xFFFFFFFF
)
return
SCSI_RESET_PUNT
;
msg
=
c
->
mem_offset
+
m
;
i2o_raw_writel
(
FOUR_WORD_MSG_SIZE
|
SGL_OFFSET_0
,
msg
);
...
...
@@ -1012,7 +1024,12 @@ static int i2o_scsi_bus_reset(Scsi_Cmnd * SCpnt)
/* Now store unit,tid so we can tie the completion back to a specific device */
__raw_writel
(
c
->
unit
<<
16
|
tid
,
msg
+
12
);
wmb
();
/* We want the command to complete after we return */
spin_lock_irq
(
host
->
host_lock
);
i2o_post_message
(
c
,
m
);
/* Should we wait for the reset to complete ? */
return
SUCCESS
;
}
...
...
@@ -1044,8 +1061,9 @@ static int i2o_scsi_device_reset(Scsi_Cmnd * SCpnt)
/**
* i2o_scsi_bios_param - Invent disk geometry
* @
disk:
device
* @
sdev: scsi
device
* @dev: block layer device
* @capacity: size in sectors
* @ip: geometry array
*
* This is anyones guess quite frankly. We use the same rules everyone
...
...
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