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
cd26b38b
Commit
cd26b38b
authored
Nov 01, 2002
by
Christoph Hellwig
Committed by
David S. Miller
Nov 01, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Cleanup scsi driver registration.
parent
f70740bb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
88 deletions
+56
-88
drivers/scsi/esp.c
drivers/scsi/esp.c
+31
-11
drivers/scsi/esp.h
drivers/scsi/esp.h
+0
-36
drivers/scsi/qlogicpti.c
drivers/scsi/qlogicpti.c
+25
-7
drivers/scsi/qlogicpti.h
drivers/scsi/qlogicpti.h
+0
-34
No files found.
drivers/scsi/esp.c
View file @
cd26b38b
...
@@ -1136,7 +1136,7 @@ static int __init detect_one_esp(Scsi_Host_Template *tpnt, struct sbus_dev *esp_
...
@@ -1136,7 +1136,7 @@ static int __init detect_one_esp(Scsi_Host_Template *tpnt, struct sbus_dev *esp_
#include <asm/sun4paddr.h>
#include <asm/sun4paddr.h>
int
__init
esp_detect
(
Scsi_Host_Template
*
tpnt
)
static
int
__init
esp_detect
(
Scsi_Host_Template
*
tpnt
)
{
{
static
struct
sbus_dev
esp_dev
;
static
struct
sbus_dev
esp_dev
;
int
esps_in_use
=
0
;
int
esps_in_use
=
0
;
...
@@ -1161,7 +1161,7 @@ int __init esp_detect(Scsi_Host_Template *tpnt)
...
@@ -1161,7 +1161,7 @@ int __init esp_detect(Scsi_Host_Template *tpnt)
#else
/* !CONFIG_SUN4 */
#else
/* !CONFIG_SUN4 */
int
__init
esp_detect
(
Scsi_Host_Template
*
tpnt
)
static
int
__init
esp_detect
(
Scsi_Host_Template
*
tpnt
)
{
{
struct
sbus_bus
*
sbus
;
struct
sbus_bus
*
sbus
;
struct
sbus_dev
*
esp_dev
,
*
sbdev_iter
;
struct
sbus_dev
*
esp_dev
,
*
sbdev_iter
;
...
@@ -1385,8 +1385,8 @@ static int esp_host_info(struct esp *esp, char *ptr, off_t offset, int len)
...
@@ -1385,8 +1385,8 @@ static int esp_host_info(struct esp *esp, char *ptr, off_t offset, int len)
}
}
/* ESP proc filesystem code. */
/* ESP proc filesystem code. */
int
esp_proc_info
(
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
static
int
esp_proc_info
(
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
hostno
,
int
inout
)
int
length
,
int
hostno
,
int
inout
)
{
{
struct
esp
*
esp
;
struct
esp
*
esp
;
...
@@ -1830,7 +1830,7 @@ static void esp_exec_cmd(struct esp *esp)
...
@@ -1830,7 +1830,7 @@ static void esp_exec_cmd(struct esp *esp)
}
}
/* Queue a SCSI command delivered from the mid-level Linux SCSI code. */
/* Queue a SCSI command delivered from the mid-level Linux SCSI code. */
int
esp_queue
(
Scsi_Cmnd
*
SCpnt
,
void
(
*
done
)(
Scsi_Cmnd
*
))
static
int
esp_queue
(
Scsi_Cmnd
*
SCpnt
,
void
(
*
done
)(
Scsi_Cmnd
*
))
{
{
struct
esp
*
esp
;
struct
esp
*
esp
;
...
@@ -1867,7 +1867,7 @@ int esp_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
...
@@ -1867,7 +1867,7 @@ int esp_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
}
}
/* Only queuing supported in this ESP driver. */
/* Only queuing supported in this ESP driver. */
int
esp_command
(
Scsi_Cmnd
*
SCpnt
)
static
int
esp_command
(
Scsi_Cmnd
*
SCpnt
)
{
{
struct
esp
*
esp
=
(
struct
esp
*
)
SCpnt
->
host
->
hostdata
;
struct
esp
*
esp
=
(
struct
esp
*
)
SCpnt
->
host
->
hostdata
;
...
@@ -1932,7 +1932,7 @@ static void esp_dump_state(struct esp *esp)
...
@@ -1932,7 +1932,7 @@ static void esp_dump_state(struct esp *esp)
}
}
/* Abort a command. */
/* Abort a command. */
int
esp_abort
(
Scsi_Cmnd
*
SCptr
)
static
int
esp_abort
(
Scsi_Cmnd
*
SCptr
)
{
{
struct
esp
*
esp
=
(
struct
esp
*
)
SCptr
->
host
->
hostdata
;
struct
esp
*
esp
=
(
struct
esp
*
)
SCptr
->
host
->
hostdata
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -2068,7 +2068,7 @@ static int esp_do_resetbus(struct esp *esp)
...
@@ -2068,7 +2068,7 @@ static int esp_do_resetbus(struct esp *esp)
/* Reset ESP chip, reset hanging bus, then kill active and
/* Reset ESP chip, reset hanging bus, then kill active and
* disconnected commands for targets without soft reset.
* disconnected commands for targets without soft reset.
*/
*/
int
esp_reset
(
Scsi_Cmnd
*
SCptr
)
static
int
esp_reset
(
Scsi_Cmnd
*
SCptr
)
{
{
struct
esp
*
esp
=
(
struct
esp
*
)
SCptr
->
host
->
hostdata
;
struct
esp
*
esp
=
(
struct
esp
*
)
SCptr
->
host
->
hostdata
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -4359,7 +4359,7 @@ static void esp_intr(int irq, void *dev_id, struct pt_regs *pregs)
...
@@ -4359,7 +4359,7 @@ static void esp_intr(int irq, void *dev_id, struct pt_regs *pregs)
spin_unlock_irqrestore
(
esp
->
ehost
->
host_lock
,
flags
);
spin_unlock_irqrestore
(
esp
->
ehost
->
host_lock
,
flags
);
}
}
void
esp_slave_detach
(
Scsi_Device
*
SDptr
)
static
void
esp_slave_detach
(
Scsi_Device
*
SDptr
)
{
{
struct
esp
*
esp
=
(
struct
esp
*
)
SDptr
->
host
->
hostdata
;
struct
esp
*
esp
=
(
struct
esp
*
)
SDptr
->
host
->
hostdata
;
esp
->
targets_present
&=
~
(
1
<<
SDptr
->
id
);
esp
->
targets_present
&=
~
(
1
<<
SDptr
->
id
);
...
@@ -4368,7 +4368,27 @@ void esp_slave_detach(Scsi_Device* SDptr)
...
@@ -4368,7 +4368,27 @@ void esp_slave_detach(Scsi_Device* SDptr)
SDptr
->
hostdata
=
NULL
;
SDptr
->
hostdata
=
NULL
;
}
}
static
Scsi_Host_Template
driver_template
=
SCSI_SPARC_ESP
;
#include "scsi_module.c"
static
Scsi_Host_Template
driver_template
=
{
.
proc_name
=
"esp"
,
.
proc_info
=
esp_proc_info
,
.
name
=
"Sun ESP 100/100a/200"
,
.
detect
=
esp_detect
,
.
slave_detach
=
esp_slave_detach
,
.
info
=
esp_info
,
.
command
=
esp_command
,
.
queuecommand
=
esp_queue
,
.
eh_abort_handler
=
esp_abort
,
.
eh_bus_reset_handler
=
esp_reset
,
.
can_queue
=
7
,
.
this_id
=
7
,
.
sg_tablesize
=
SG_ALL
,
.
cmd_per_lun
=
1
,
.
use_clustering
=
ENABLE_CLUSTERING
,
/* Sparc32's iommu code cannot handle highmem pages yet. */
#ifdef CONFIG_SPARC64
.
highmem_io
=
1
,
#endif
}
#include "scsi_module.c"
drivers/scsi/esp.h
View file @
cd26b38b
...
@@ -403,42 +403,6 @@ struct esp {
...
@@ -403,42 +403,6 @@ struct esp {
#define ESP_MHZ_TO_CYCLE(mhertz) ((1000000000) / ((mhertz) / 1000))
#define ESP_MHZ_TO_CYCLE(mhertz) ((1000000000) / ((mhertz) / 1000))
#define ESP_TICK(ccf, cycle) ((7682 * (ccf) * (cycle) / 1000))
#define ESP_TICK(ccf, cycle) ((7682 * (ccf) * (cycle) / 1000))
extern
int
esp_detect
(
struct
SHT
*
);
extern
const
char
*
esp_info
(
struct
Scsi_Host
*
);
extern
int
esp_queue
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
extern
int
esp_command
(
Scsi_Cmnd
*
);
extern
int
esp_abort
(
Scsi_Cmnd
*
);
extern
int
esp_reset
(
Scsi_Cmnd
*
);
extern
int
esp_proc_info
(
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
hostno
,
int
inout
);
extern
void
esp_slave_detach
(
Scsi_Device
*
SDptr
);
#ifdef CONFIG_SPARC64
#define ESP_HIGHMEM_IO 1
#else
/* Sparc32's iommu code cannot handle highmem pages yet. */
#define ESP_HIGHMEM_IO 0
#endif
#define SCSI_SPARC_ESP { \
.proc_name = "esp", \
.proc_info = &esp_proc_info, \
.name = "Sun ESP 100/100a/200", \
.detect = esp_detect, \
.slave_detach = esp_slave_detach, \
.info = esp_info, \
.command = esp_command, \
.queuecommand = esp_queue, \
.eh_abort_handler = esp_abort, \
.eh_bus_reset_handler = esp_reset, \
.can_queue = 7, \
.this_id = 7, \
.sg_tablesize = SG_ALL, \
.cmd_per_lun = 1, \
.use_clustering = ENABLE_CLUSTERING, \
.highmem_io = ESP_HIGHMEM_IO, \
}
/* For our interrupt engine. */
/* For our interrupt engine. */
#define for_each_esp(esp) \
#define for_each_esp(esp) \
for((esp) = espchain; (esp); (esp) = (esp)->next)
for((esp) = espchain; (esp); (esp) = (esp)->next)
...
...
drivers/scsi/qlogicpti.c
View file @
cd26b38b
...
@@ -807,7 +807,7 @@ static int __init qpti_map_queues(struct qlogicpti *qpti)
...
@@ -807,7 +807,7 @@ static int __init qpti_map_queues(struct qlogicpti *qpti)
}
}
/* Detect all PTI Qlogic ISP's in the machine. */
/* Detect all PTI Qlogic ISP's in the machine. */
int
__init
qlogicpti_detect
(
Scsi_Host_Template
*
tpnt
)
static
int
__init
qlogicpti_detect
(
Scsi_Host_Template
*
tpnt
)
{
{
struct
qlogicpti
*
qpti
;
struct
qlogicpti
*
qpti
;
struct
Scsi_Host
*
qpti_host
;
struct
Scsi_Host
*
qpti_host
;
...
@@ -946,7 +946,7 @@ int __init qlogicpti_detect(Scsi_Host_Template *tpnt)
...
@@ -946,7 +946,7 @@ int __init qlogicpti_detect(Scsi_Host_Template *tpnt)
return
nqptis
;
return
nqptis
;
}
}
int
qlogicpti_release
(
struct
Scsi_Host
*
host
)
staticstatic
int
qlogicpti_release
(
struct
Scsi_Host
*
host
)
{
{
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
...
@@ -1164,7 +1164,8 @@ static void ourdone(Scsi_Cmnd *Cmnd)
...
@@ -1164,7 +1164,8 @@ static void ourdone(Scsi_Cmnd *Cmnd)
done
(
Cmnd
);
done
(
Cmnd
);
}
}
int
qlogicpti_queuecommand_slow
(
Scsi_Cmnd
*
Cmnd
,
void
(
*
done
)(
Scsi_Cmnd
*
))
static
int
qlogicpti_queuecommand_slow
(
Scsi_Cmnd
*
Cmnd
,
void
(
*
done
)(
Scsi_Cmnd
*
))
{
{
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
host
->
hostdata
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
host
->
hostdata
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -1240,7 +1241,7 @@ int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *))
...
@@ -1240,7 +1241,7 @@ int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *))
*
*
* "This code must fly." -davem
* "This code must fly." -davem
*/
*/
int
qlogicpti_queuecommand
(
Scsi_Cmnd
*
Cmnd
,
void
(
*
done
)(
Scsi_Cmnd
*
))
static
int
qlogicpti_queuecommand
(
Scsi_Cmnd
*
Cmnd
,
void
(
*
done
)(
Scsi_Cmnd
*
))
{
{
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
...
@@ -1461,7 +1462,7 @@ static void qpti_intr(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -1461,7 +1462,7 @@ static void qpti_intr(int irq, void *dev_id, struct pt_regs *regs)
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
}
}
int
qlogicpti_abort
(
Scsi_Cmnd
*
Cmnd
)
static
int
qlogicpti_abort
(
Scsi_Cmnd
*
Cmnd
)
{
{
u_short
param
[
6
];
u_short
param
[
6
];
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
...
@@ -1503,7 +1504,7 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd)
...
@@ -1503,7 +1504,7 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd)
return
return_status
;
return
return_status
;
}
}
int
qlogicpti_reset
(
Scsi_Cmnd
*
Cmnd
)
static
int
qlogicpti_reset
(
Scsi_Cmnd
*
Cmnd
)
{
{
u_short
param
[
6
];
u_short
param
[
6
];
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
...
@@ -1532,6 +1533,23 @@ int qlogicpti_reset(Scsi_Cmnd *Cmnd)
...
@@ -1532,6 +1533,23 @@ int qlogicpti_reset(Scsi_Cmnd *Cmnd)
return
return_status
;
return
return_status
;
}
}
static
Scsi_Host_Template
driver_template
=
QLOGICPTI
;
static
Scsi_Host_Template
driver_template
=
{
.
detect
=
qlogicpti_detect
,
.
release
=
qlogicpti_release
,
.
info
=
qlogicpti_info
,
.
queuecommand
=
qlogicpti_queuecommand_slow
,
.
eh_abort_handler
=
qlogicpti_abort
,
.
eh_bus_reset_handler
=
qlogicpti_reset
,
.
can_queue
=
QLOGICPTI_REQ_QUEUE_LEN
,
.
this_id
=
7
,
.
sg_tablesize
=
QLOGICPTI_MAX_SG
(
QLOGICPTI_REQ_QUEUE_LEN
),
.
cmd_per_lun
=
1
,
.
use_clustering
=
ENABLE_CLUSTERING
,
/* Sparc32's iommu code cannot handle highmem pages yet. */
#ifdef CONFIG_SPARC64
.
highmem_io
=
1
,
#endif
};
#include "scsi_module.c"
#include "scsi_module.c"
drivers/scsi/qlogicpti.h
View file @
cd26b38b
...
@@ -47,18 +47,6 @@
...
@@ -47,18 +47,6 @@
#define QLOGICPTI_REQ_QUEUE_LEN 255
/* must be power of two - 1 */
#define QLOGICPTI_REQ_QUEUE_LEN 255
/* must be power of two - 1 */
#define QLOGICPTI_MAX_SG(ql) (4 + ((ql) > 0) ? 7*((ql) - 1) : 0)
#define QLOGICPTI_MAX_SG(ql) (4 + ((ql) > 0) ? 7*((ql) - 1) : 0)
#ifndef NULL
#define NULL (0)
#endif
int
qlogicpti_detect
(
Scsi_Host_Template
*
);
int
qlogicpti_release
(
struct
Scsi_Host
*
);
const
char
*
qlogicpti_info
(
struct
Scsi_Host
*
);
int
qlogicpti_queuecommand
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
int
qlogicpti_queuecommand_slow
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
int
qlogicpti_abort
(
Scsi_Cmnd
*
);
int
qlogicpti_reset
(
Scsi_Cmnd
*
);
/* mailbox command complete status codes */
/* mailbox command complete status codes */
#define MBOX_COMMAND_COMPLETE 0x4000
#define MBOX_COMMAND_COMPLETE 0x4000
#define INVALID_COMMAND 0x4001
#define INVALID_COMMAND 0x4001
...
@@ -514,28 +502,6 @@ struct qlogicpti {
...
@@ -514,28 +502,6 @@ struct qlogicpti {
#define HCCTRL_B1ENAB 0x0008
/* Breakpoint 1 enable */
#define HCCTRL_B1ENAB 0x0008
/* Breakpoint 1 enable */
#define HCCTRL_B0ENAB 0x0004
/* Breakpoint 0 enable */
#define HCCTRL_B0ENAB 0x0004
/* Breakpoint 0 enable */
#ifdef CONFIG_SPARC64
#define QLOGICPTI_HIGHMEM_IO 1
#else
/* Sparc32's iommu code cannot handle highmem pages yet. */
#define QLOGICPTI_HIGHMEM_IO 0
#endif
#define QLOGICPTI { \
.detect = qlogicpti_detect, \
.release = qlogicpti_release, \
.info = qlogicpti_info, \
.queuecommand = qlogicpti_queuecommand_slow, \
.eh_abort_handler = qlogicpti_abort, \
.eh_bus_reset_handler = qlogicpti_reset, \
.can_queue = QLOGICPTI_REQ_QUEUE_LEN, \
.this_id = 7, \
.sg_tablesize = QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN), \
.cmd_per_lun = 1, \
.use_clustering = ENABLE_CLUSTERING, \
.highmem_io = QLOGICPTI_HIGHMEM_IO, \
}
/* For our interrupt engine. */
/* For our interrupt engine. */
#define for_each_qlogicpti(qp) \
#define for_each_qlogicpti(qp) \
for((qp) = qptichain; (qp); (qp) = (qp)->next)
for((qp) = qptichain; (qp); (qp) = (qp)->next)
...
...
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