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 *))
...
@@ -467,6 +467,7 @@ int qlogicfas_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
return
0
;
return
0
;
}
}
#ifndef PCMCIA
/*
/*
* Look for qlogic card and init if found
* Look for qlogic card and init if found
*/
*/
...
@@ -561,6 +562,7 @@ struct Scsi_Host *__qlogicfas_detect(Scsi_Host_Template *host, int qbase,
...
@@ -561,6 +562,7 @@ struct Scsi_Host *__qlogicfas_detect(Scsi_Host_Template *host, int qbase,
priv
->
qbase
=
qbase
;
priv
->
qbase
=
qbase
;
priv
->
qlirq
=
qlirq
;
priv
->
qlirq
=
qlirq
;
priv
->
qinitid
=
qinitid
;
priv
->
qinitid
=
qinitid
;
priv
->
shost
=
hreg
;
sprintf
(
priv
->
qinfo
,
sprintf
(
priv
->
qinfo
,
"Qlogicfas Driver version 0.46, chip %02X at %03X, IRQ %d, TPdma:%d"
,
"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,
...
@@ -589,6 +591,7 @@ struct Scsi_Host *__qlogicfas_detect(Scsi_Host_Template *host, int qbase,
}
}
#define MAX_QLOGICFAS 8
#define MAX_QLOGICFAS 8
static
qlogicfas_priv_t
cards
;
static
int
iobase
[
MAX_QLOGICFAS
];
static
int
iobase
[
MAX_QLOGICFAS
];
static
int
irq
[
MAX_QLOGICFAS
]
=
{
[
0
...
MAX_QLOGICFAS
-
1
]
=
-
1
};
static
int
irq
[
MAX_QLOGICFAS
]
=
{
[
0
...
MAX_QLOGICFAS
-
1
]
=
-
1
};
MODULE_PARM
(
iobase
,
"1-"
__MODULE_STRING
(
MAX_QLOGICFAS
)
"i"
);
MODULE_PARM
(
iobase
,
"1-"
__MODULE_STRING
(
MAX_QLOGICFAS
)
"i"
);
...
@@ -598,14 +601,20 @@ MODULE_PARM_DESC(irq, "IRQ");
...
@@ -598,14 +601,20 @@ MODULE_PARM_DESC(irq, "IRQ");
int
__devinit
qlogicfas_detect
(
Scsi_Host_Template
*
sht
)
int
__devinit
qlogicfas_detect
(
Scsi_Host_Template
*
sht
)
{
{
struct
Scsi_Host
*
shost
;
qlogicfas_priv_t
priv
;
int
i
,
int
i
,
num
=
0
;
num
=
0
;
for
(
i
=
0
;
i
<
MAX_QLOGICFAS
;
i
++
)
{
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 */
/* no more devices */
break
;
break
;
}
}
priv
=
(
qlogicfas_priv_t
)
&
(
shost
->
hostdata
[
0
]);
priv
->
next
=
cards
;
cards
=
priv
;
num
++
;
num
++
;
}
}
...
@@ -632,6 +641,7 @@ static int qlogicfas_release(struct Scsi_Host *shost)
...
@@ -632,6 +641,7 @@ static int qlogicfas_release(struct Scsi_Host *shost)
return
0
;
return
0
;
}
}
#endif
/* ifndef PCMCIA */
/*
/*
* Return bios parameters
* Return bios parameters
...
@@ -722,8 +732,6 @@ Scsi_Host_Template qlogicfas_driver_template = {
...
@@ -722,8 +732,6 @@ Scsi_Host_Template qlogicfas_driver_template = {
.
module
=
THIS_MODULE
,
.
module
=
THIS_MODULE
,
.
name
=
qlogicfas_name
,
.
name
=
qlogicfas_name
,
.
proc_name
=
qlogicfas_name
,
.
proc_name
=
qlogicfas_name
,
.
detect
=
qlogicfas_detect
,
.
release
=
qlogicfas_release
,
.
info
=
qlogicfas_info
,
.
info
=
qlogicfas_info
,
.
queuecommand
=
qlogicfas_queuecommand
,
.
queuecommand
=
qlogicfas_queuecommand
,
.
eh_abort_handler
=
qlogicfas_abort
,
.
eh_abort_handler
=
qlogicfas_abort
,
...
@@ -739,6 +747,25 @@ Scsi_Host_Template qlogicfas_driver_template = {
...
@@ -739,6 +747,25 @@ Scsi_Host_Template qlogicfas_driver_template = {
};
};
#ifndef PCMCIA
#ifndef PCMCIA
#define driver_template qlogicfas_driver_template
static
__init
int
qlogicfas_init
(
void
)
#include "scsi_module.c"
{
#endif
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 @@
...
@@ -84,6 +84,8 @@
#define QL_INT_ACTIVE_HIGH 0
#define QL_INT_ACTIVE_HIGH 0
#endif
#endif
struct
qlogicfas_priv
;
typedef
struct
qlogicfas_priv
*
qlogicfas_priv_t
;
struct
qlogicfas_priv
{
struct
qlogicfas_priv
{
int
qbase
;
/* Port */
int
qbase
;
/* Port */
int
qinitid
;
/* initiator ID */
int
qinitid
;
/* initiator ID */
...
@@ -91,8 +93,9 @@ struct qlogicfas_priv {
...
@@ -91,8 +93,9 @@ struct qlogicfas_priv {
int
qlirq
;
/* IRQ being used */
int
qlirq
;
/* IRQ being used */
char
qinfo
[
80
];
/* description */
char
qinfo
[
80
];
/* description */
Scsi_Cmnd
*
qlcmd
;
/* current command being processed */
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
qlcfg5
;
extern
int
qlcfg6
;
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