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
16ec5fe4
Commit
16ec5fe4
authored
Mar 10, 2004
by
Aristeu Sergio Rozanski Filho
Committed by
James Bottomley
Mar 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] qlogicfas: finish to convert to new scsi driver
parent
1af929c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
7 deletions
+37
-7
drivers/scsi/qlogicfas.c
drivers/scsi/qlogicfas.c
+33
-6
drivers/scsi/qlogicfas.h
drivers/scsi/qlogicfas.h
+4
-1
No files found.
drivers/scsi/qlogicfas.c
View file @
16ec5fe4
...
...
@@ -467,6 +467,7 @@ int qlogicfas_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
return
0
;
}
#ifndef PCMCIA
/*
* Look for qlogic card and init if found
*/
...
...
@@ -561,6 +562,7 @@ struct Scsi_Host *__qlogicfas_detect(Scsi_Host_Template *host, int qbase,
priv
->
qbase
=
qbase
;
priv
->
qlirq
=
qlirq
;
priv
->
qinitid
=
qinitid
;
priv
->
shost
=
hreg
;
sprintf
(
priv
->
qinfo
,
"Qlogicfas Driver version 0.46, chip %02X at %03X, IRQ %d, TPdma:%d"
,
...
...
@@ -589,6 +591,7 @@ struct Scsi_Host *__qlogicfas_detect(Scsi_Host_Template *host, int qbase,
}
#define MAX_QLOGICFAS 8
static
qlogicfas_priv_t
cards
;
static
int
iobase
[
MAX_QLOGICFAS
];
static
int
irq
[
MAX_QLOGICFAS
]
=
{
[
0
...
MAX_QLOGICFAS
-
1
]
=
-
1
};
MODULE_PARM
(
iobase
,
"1-"
__MODULE_STRING
(
MAX_QLOGICFAS
)
"i"
);
...
...
@@ -598,14 +601,20 @@ MODULE_PARM_DESC(irq, "IRQ");
int
__devinit
qlogicfas_detect
(
Scsi_Host_Template
*
sht
)
{
struct
Scsi_Host
*
shost
;
qlogicfas_priv_t
priv
;
int
i
,
num
=
0
;
for
(
i
=
0
;
i
<
MAX_QLOGICFAS
;
i
++
)
{
if
(
__qlogicfas_detect
(
sht
,
iobase
[
num
],
irq
[
num
])
==
NULL
)
{
shost
=
__qlogicfas_detect
(
sht
,
iobase
[
num
],
irq
[
num
]);
if
(
shost
==
NULL
)
{
/* no more devices */
break
;
}
priv
=
(
qlogicfas_priv_t
)
&
(
shost
->
hostdata
[
0
]);
priv
->
next
=
cards
;
cards
=
priv
;
num
++
;
}
...
...
@@ -632,6 +641,7 @@ static int qlogicfas_release(struct Scsi_Host *shost)
return
0
;
}
#endif
/* ifndef PCMCIA */
/*
* Return bios parameters
...
...
@@ -722,8 +732,6 @@ Scsi_Host_Template qlogicfas_driver_template = {
.
module
=
THIS_MODULE
,
.
name
=
qlogicfas_name
,
.
proc_name
=
qlogicfas_name
,
.
detect
=
qlogicfas_detect
,
.
release
=
qlogicfas_release
,
.
info
=
qlogicfas_info
,
.
queuecommand
=
qlogicfas_queuecommand
,
.
eh_abort_handler
=
qlogicfas_abort
,
...
...
@@ -739,6 +747,25 @@ Scsi_Host_Template qlogicfas_driver_template = {
};
#ifndef PCMCIA
#define driver_template qlogicfas_driver_template
#include "scsi_module.c"
#endif
static
__init
int
qlogicfas_init
(
void
)
{
if
(
!
qlogicfas_detect
(
&
qlogicfas_driver_template
))
{
/* no cards found */
return
-
ENODEV
;
}
return
0
;
}
static
__exit
void
qlogicfas_exit
(
void
)
{
qlogicfas_priv_t
priv
;
for
(
priv
=
cards
;
priv
!=
NULL
;
priv
=
priv
->
next
)
qlogicfas_release
(
priv
->
shost
);
}
module_init
(
qlogicfas_init
);
module_exit
(
qlogicfas_exit
);
#endif
/* ifndef PCMCIA */
drivers/scsi/qlogicfas.h
View file @
16ec5fe4
...
...
@@ -84,6 +84,8 @@
#define QL_INT_ACTIVE_HIGH 0
#endif
struct
qlogicfas_priv
;
typedef
struct
qlogicfas_priv
*
qlogicfas_priv_t
;
struct
qlogicfas_priv
{
int
qbase
;
/* Port */
int
qinitid
;
/* initiator ID */
...
...
@@ -91,8 +93,9 @@ struct qlogicfas_priv {
int
qlirq
;
/* IRQ being used */
char
qinfo
[
80
];
/* description */
Scsi_Cmnd
*
qlcmd
;
/* current command being processed */
struct
Scsi_Host
*
shost
;
/* pointer back to host */
qlogicfas_priv_t
next
;
/* next private struct */
};
typedef
struct
qlogicfas_priv
*
qlogicfas_priv_t
;
extern
int
qlcfg5
;
extern
int
qlcfg6
;
...
...
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