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
0b13c1f5
Commit
0b13c1f5
authored
Oct 11, 2002
by
Doug Ledford
Committed by
Linus Torvalds
Oct 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Updates for the scsi.h removal of device specific data from struct scsi_device
parent
30f7395a
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
128 additions
and
90 deletions
+128
-90
drivers/scsi/NCR53C9x.c
drivers/scsi/NCR53C9x.c
+16
-16
drivers/scsi/NCR53C9x.h
drivers/scsi/NCR53C9x.h
+1
-1
drivers/scsi/esp.c
drivers/scsi/esp.c
+97
-70
drivers/scsi/esp.h
drivers/scsi/esp.h
+14
-3
No files found.
drivers/scsi/NCR53C9x.c
View file @
0b13c1f5
...
...
@@ -869,7 +869,7 @@ static int esp_host_info(struct NCR_ESP *esp, char *ptr, off_t offset, int len)
for
(
i
=
0
;
i
<
15
;
i
++
)
{
if
(
esp
->
targets_present
&
(
1
<<
i
))
{
Scsi_Device
*
SDptr
=
esp
->
ehost
->
host_queue
;
struct
ESP
_device
*
esp_dev
;
struct
esp
_device
*
esp_dev
;
while
((
SDptr
->
host
!=
esp
->
ehost
)
&&
(
SDptr
->
id
!=
i
)
&&
...
...
@@ -1014,7 +1014,7 @@ static inline void build_sync_nego_msg(struct NCR_ESP *esp, int period, int offs
static
void
esp_exec_cmd
(
struct
NCR_ESP
*
esp
)
{
struct
ESP_regs
*
eregs
=
esp
->
eregs
;
struct
ESP
_device
*
esp_dev
;
struct
esp
_device
*
esp_dev
;
Scsi_Cmnd
*
SCptr
;
Scsi_Device
*
SDptr
;
volatile
unchar
*
cmdp
=
esp
->
esp_command
;
...
...
@@ -1043,18 +1043,18 @@ static void esp_exec_cmd(struct NCR_ESP *esp)
/*
* If esp_dev == NULL then we need to allocate a struct for our data
*/
if
(
esp_dev
==
NULL
)
{
esp_dev
=
kmalloc
(
sizeof
(
struct
ESP
_device
),
GFP_ATOMIC
);
if
(
esp_dev
==
NULL
)
{
if
(
!
esp_dev
)
{
esp_dev
=
kmalloc
(
sizeof
(
struct
esp
_device
),
GFP_ATOMIC
);
if
(
!
esp_dev
)
{
/* We're SOL. Print a message and bail */
printk
(
KERN_WARNING
"esp: no mem for
ESP
_device %d/%d
\n
"
,
printk
(
KERN_WARNING
"esp: no mem for
esp
_device %d/%d
\n
"
,
target
,
lun
);
esp
->
current_SC
=
NULL
;
SCptr
->
result
=
DID_ERROR
<<
16
;
SCptr
->
done
(
SCptr
);
return
;
}
memset
(
esp_dev
,
0
,
sizeof
(
struct
ESP
_device
));
memset
(
esp_dev
,
0
,
sizeof
(
struct
esp
_device
));
SDptr
->
hostdata
=
esp_dev
;
}
...
...
@@ -1720,7 +1720,7 @@ static inline void esp_connect(struct NCR_ESP *esp, struct ESP_regs *eregs,
Scsi_Cmnd
*
sp
)
{
Scsi_Device
*
dp
=
sp
->
device
;
struct
ESP
_device
*
esp_dev
=
dp
->
hostdata
;
struct
esp
_device
*
esp_dev
=
dp
->
hostdata
;
if
(
esp
->
prev_soff
!=
esp_dev
->
sync_max_offset
||
esp
->
prev_stp
!=
esp_dev
->
sync_min_period
||
...
...
@@ -2007,7 +2007,7 @@ static int esp_do_data_finale(struct NCR_ESP *esp,
struct
ESP_regs
*
eregs
)
{
Scsi_Cmnd
*
SCptr
=
esp
->
current_SC
;
struct
ESP
_device
*
esp_dev
=
SCptr
->
device
->
hostdata
;
struct
esp
_device
*
esp_dev
=
SCptr
->
device
->
hostdata
;
int
bogus_data
=
0
,
bytes_sent
=
0
,
fifocnt
,
ecount
=
0
;
if
(
esp
->
dma_led_off
)
...
...
@@ -2228,7 +2228,7 @@ static int esp_do_freebus(struct NCR_ESP *esp, struct ESP_regs *eregs)
esp
->
msgout_len
=
0
;
esp
->
prevmsgout
=
NOP
;
if
(
esp
->
prevmsgin
==
COMMAND_COMPLETE
)
{
struct
ESP
_device
*
esp_dev
=
SCptr
->
device
->
hostdata
;
struct
esp
_device
*
esp_dev
=
SCptr
->
device
->
hostdata
;
/* Normal end of nexus. */
if
(
esp
->
disconnected_SC
)
esp_cmd
(
esp
,
eregs
,
ESP_CMD_ESEL
);
...
...
@@ -2503,7 +2503,7 @@ static int esp_disconnect_amidst_phases(struct NCR_ESP *esp,
struct
ESP_regs
*
eregs
)
{
Scsi_Cmnd
*
sp
=
esp
->
current_SC
;
struct
ESP
_device
*
esp_dev
=
sp
->
device
->
hostdata
;
struct
esp
_device
*
esp_dev
=
sp
->
device
->
hostdata
;
/* This means real problems if we see this
* here. Unless we were actually trying
...
...
@@ -2602,7 +2602,7 @@ static int esp_do_phase_determine(struct NCR_ESP *esp,
static
int
esp_select_complete
(
struct
NCR_ESP
*
esp
,
struct
ESP_regs
*
eregs
)
{
Scsi_Cmnd
*
SCptr
=
esp
->
current_SC
;
struct
ESP
_device
*
esp_dev
=
SCptr
->
device
->
hostdata
;
struct
esp
_device
*
esp_dev
=
SCptr
->
device
->
hostdata
;
int
cmd_bytes_sent
,
fcnt
;
fcnt
=
(
esp_read
(
eregs
->
esp_fflags
)
&
ESP_FF_FBYTES
);
...
...
@@ -2931,7 +2931,7 @@ static int check_singlebyte_msg(struct NCR_ESP *esp,
case
MESSAGE_REJECT
:
ESPMISC
((
"msg reject, "
));
if
(
esp
->
prevmsgout
==
EXTENDED_MESSAGE
)
{
struct
ESP
_device
*
esp_dev
=
esp
->
current_SC
->
device
->
hostdata
;
struct
esp
_device
*
esp_dev
=
esp
->
current_SC
->
device
->
hostdata
;
/* Doesn't look like this target can
* do synchronous or WIDE transfers.
...
...
@@ -2956,7 +2956,7 @@ static int check_singlebyte_msg(struct NCR_ESP *esp,
*/
static
int
target_with_ants_in_pants
(
struct
NCR_ESP
*
esp
,
Scsi_Cmnd
*
SCptr
,
struct
ESP
_device
*
esp_dev
)
struct
esp
_device
*
esp_dev
)
{
if
(
esp_dev
->
sync
||
SCptr
->
device
->
borken
)
{
/* sorry, no can do */
...
...
@@ -3011,7 +3011,7 @@ static int check_multibyte_msg(struct NCR_ESP *esp,
struct
ESP_regs
*
eregs
)
{
Scsi_Cmnd
*
SCptr
=
esp
->
current_SC
;
struct
ESP
_device
*
esp_dev
=
SCptr
->
device
->
hostdata
;
struct
esp
_device
*
esp_dev
=
SCptr
->
device
->
hostdata
;
unchar
regval
=
0
;
int
message_out
=
0
;
...
...
@@ -3345,7 +3345,7 @@ static int esp_do_msgoutdone(struct NCR_ESP *esp,
default:
if
(
!
fcount
(
esp
,
eregs
)
&&
!
(((
struct
ESP
_device
*
)
esp
->
current_SC
->
device
->
hostdata
)
->
sync_max_offset
))
!
(((
struct
esp
_device
*
)
esp
->
current_SC
->
device
->
hostdata
)
->
sync_max_offset
))
esp_cmd
(
esp
,
eregs
,
ESP_CMD_FLUSH
);
break
;
...
...
drivers/scsi/NCR53C9x.h
View file @
0b13c1f5
...
...
@@ -286,7 +286,7 @@ enum esp_rev {
/* We allocate one of these for each scsi device and attach it to
* SDptr->hostdata for use in the driver
*/
struct
ESP
_device
{
struct
esp
_device
{
unsigned
char
sync_min_period
;
unsigned
char
sync_max_offset
;
unsigned
sync
:
1
;
...
...
drivers/scsi/esp.c
View file @
0b13c1f5
This diff is collapsed.
Click to expand it.
drivers/scsi/esp.h
View file @
0b13c1f5
...
...
@@ -64,6 +64,17 @@ enum esp_rev {
espunknown
=
0x07
};
/* We allocate one of these for each scsi device and attach it to
* SDptr->hostdata for use in the driver
*/
struct
esp_device
{
unsigned
char
sync_min_period
;
unsigned
char
sync_max_offset
;
unsigned
sync
:
1
;
unsigned
wide
:
1
;
unsigned
disconnect
:
1
;
};
/* We get one of these for each ESP probed. */
struct
esp
{
unsigned
long
eregs
;
/* ESP controller registers */
...
...
@@ -399,7 +410,7 @@ extern int esp_abort(Scsi_Cmnd *);
extern
int
esp_reset
(
Scsi_Cmnd
*
,
unsigned
int
);
extern
int
esp_proc_info
(
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
hostno
,
int
inout
);
extern
int
esp_revoke
(
Scsi_Device
*
SDptr
);
extern
void
esp_slave_detach
(
Scsi_Device
*
SDptr
);
#ifdef CONFIG_SPARC64
#define SCSI_SPARC_ESP { \
...
...
@@ -407,7 +418,7 @@ extern int esp_revoke(Scsi_Device* SDptr);
proc_info: &esp_proc_info, \
name: "Sun ESP 100/100a/200", \
detect: esp_detect, \
revoke: esp_revoke,
\
slave_detach: esp_slave_detach,
\
info: esp_info, \
command: esp_command, \
queuecommand: esp_queue, \
...
...
@@ -427,7 +438,7 @@ extern int esp_revoke(Scsi_Device* SDptr);
proc_info: &esp_proc_info, \
name: "Sun ESP 100/100a/200", \
detect: esp_detect, \
revoke: esp_revoke,
\
slave_detach: esp_slave_detach,
\
info: esp_info, \
command: esp_command, \
queuecommand: esp_queue, \
...
...
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