git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
fc4
/
fc.c
diff --git
a/drivers/fc4/fc.c
b/drivers/fc4/fc.c
index
1a159e8
..
22b62b3
100644
(file)
--- a/
drivers/fc4/fc.c
+++ b/
drivers/fc4/fc.c
@@
-70,9
+70,9
@@
#define FCP_CMND(SCpnt) ((fcp_cmnd *)&(SCpnt->SCp))
#define FC_SCMND(SCpnt) ((fc_channel *)(SCpnt->device->host->hostdata[0]))
#define FCP_CMND(SCpnt) ((fcp_cmnd *)&(SCpnt->SCp))
#define FC_SCMND(SCpnt) ((fc_channel *)(SCpnt->device->host->hostdata[0]))
-#define SC_FCMND(fcmnd)
((Scsi_Cmnd *)((long)fcmnd - (long)&(((Scsi_C
mnd *)0)->SCp)))
+#define SC_FCMND(fcmnd)
((struct scsi_cmnd *)((long)fcmnd - (long)&(((struct scsi_c
mnd *)0)->SCp)))
-static int fcp_scsi_queue_it(fc_channel *,
Scsi_C
mnd *, fcp_cmnd *, int);
+static int fcp_scsi_queue_it(fc_channel *,
struct scsi_c
mnd *, fcp_cmnd *, int);
void fcp_queue_empty(fc_channel *);
static void fcp_scsi_insert_queue (fc_channel *fc, fcp_cmnd *fcmd)
void fcp_queue_empty(fc_channel *);
static void fcp_scsi_insert_queue (fc_channel *fc, fcp_cmnd *fcmd)
@@
-266,7
+266,7
@@
static void fcp_report_map_done(fc_channel *fc, int i, int status)
printk ("FC: Bad magic from REPORT_AL_MAP on %s - %08x\n", fc->name, p->magic);
fc->state = FC_STATE_OFFLINE;
} else {
printk ("FC: Bad magic from REPORT_AL_MAP on %s - %08x\n", fc->name, p->magic);
fc->state = FC_STATE_OFFLINE;
} else {
- fc->posmap =
(fcp_posmap *)
kzalloc(sizeof(fcp_posmap)+p->len, GFP_KERNEL);
+ fc->posmap = kzalloc(sizeof(fcp_posmap)+p->len, GFP_KERNEL);
if (!fc->posmap) {
printk("FC: Not enough memory, offlining channel\n");
fc->state = FC_STATE_OFFLINE;
if (!fc->posmap) {
printk("FC: Not enough memory, offlining channel\n");
fc->state = FC_STATE_OFFLINE;
@@
-355,7
+355,7
@@
void fcp_register(fc_channel *fc, u8 type, int unregister)
for (i = fc->can_queue; i < fc->scsi_bitmap_end; i++)
set_bit (i, fc->scsi_bitmap);
fc->scsi_free = fc->can_queue;
for (i = fc->can_queue; i < fc->scsi_bitmap_end; i++)
set_bit (i, fc->scsi_bitmap);
fc->scsi_free = fc->can_queue;
- fc->cmd_slots =
(fcp_cmnd **)
kzalloc(slots * sizeof(fcp_cmnd*), GFP_KERNEL);
+ fc->cmd_slots = kzalloc(slots * sizeof(fcp_cmnd*), GFP_KERNEL);
fc->abort_count = 0;
} else {
fc->scsi_name[0] = 0;
fc->abort_count = 0;
} else {
fc->scsi_name[0] = 0;
@@
-378,14
+378,14
@@
void fcp_register(fc_channel *fc, u8 type, int unregister)
printk ("FC: %segistering unknown type %02x\n", unregister ? "Unr" : "R", type);
}
printk ("FC: %segistering unknown type %02x\n", unregister ? "Unr" : "R", type);
}
-static void fcp_scsi_done(
Scsi_C
mnd *SCpnt);
+static void fcp_scsi_done(
struct scsi_c
mnd *SCpnt);
static inline void fcp_scsi_receive(fc_channel *fc, int token, int status, fc_hdr *fch)
{
fcp_cmnd *fcmd;
fcp_rsp *rsp;
int host_status;
static inline void fcp_scsi_receive(fc_channel *fc, int token, int status, fc_hdr *fch)
{
fcp_cmnd *fcmd;
fcp_rsp *rsp;
int host_status;
-
Scsi_C
mnd *SCpnt;
+
struct scsi_c
mnd *SCpnt;
int sense_len;
int rsp_status;
int sense_len;
int rsp_status;
@@
-757,13
+757,14
@@
void fcp_release(fc_channel *fcchain, int count) /* count must > 0 */
}
}
-static void fcp_scsi_done
(Scsi_C
mnd *SCpnt)
+static void fcp_scsi_done
(struct scsi_c
mnd *SCpnt)
{
if (FCP_CMND(SCpnt)->done)
FCP_CMND(SCpnt)->done(SCpnt);
}
{
if (FCP_CMND(SCpnt)->done)
FCP_CMND(SCpnt)->done(SCpnt);
}
-static int fcp_scsi_queue_it(fc_channel *fc, Scsi_Cmnd *SCpnt, fcp_cmnd *fcmd, int prepare)
+static int fcp_scsi_queue_it(fc_channel *fc, struct scsi_cmnd *SCpnt,
+ fcp_cmnd *fcmd, int prepare)
{
long i;
fcp_cmd *cmd;
{
long i;
fcp_cmd *cmd;
@@
-837,7
+838,8
@@
static int fcp_scsi_queue_it(fc_channel *fc, Scsi_Cmnd *SCpnt, fcp_cmnd *fcmd, i
return 0;
}
return 0;
}
-int fcp_scsi_queuecommand(Scsi_Cmnd *SCpnt, void (* done)(Scsi_Cmnd *))
+int fcp_scsi_queuecommand(struct scsi_cmnd *SCpnt,
+ void (* done)(struct scsi_cmnd *))
{
fcp_cmnd *fcmd = FCP_CMND(SCpnt);
fc_channel *fc = FC_SCMND(SCpnt);
{
fcp_cmnd *fcmd = FCP_CMND(SCpnt);
fc_channel *fc = FC_SCMND(SCpnt);
@@
-873,7
+875,7
@@
void fcp_queue_empty(fc_channel *fc)
}
}
}
}
-int fcp_scsi_abort(
Scsi_C
mnd *SCpnt)
+int fcp_scsi_abort(
struct scsi_c
mnd *SCpnt)
{
/* Internal bookkeeping only. Lose 1 cmd_slots slot. */
fcp_cmnd *fcmd = FCP_CMND(SCpnt);
{
/* Internal bookkeeping only. Lose 1 cmd_slots slot. */
fcp_cmnd *fcmd = FCP_CMND(SCpnt);
@@
-910,7
+912,7
@@
int fcp_scsi_abort(Scsi_Cmnd *SCpnt)
}
#if 0
}
#if 0
-void fcp_scsi_reset_done(
Scsi_C
mnd *SCpnt)
+void fcp_scsi_reset_done(
struct scsi_c
mnd *SCpnt)
{
fc_channel *fc = FC_SCMND(SCpnt);
{
fc_channel *fc = FC_SCMND(SCpnt);
@@
-921,7
+923,7
@@
void fcp_scsi_reset_done(Scsi_Cmnd *SCpnt)
#define FCP_RESET_TIMEOUT (2*HZ)
#define FCP_RESET_TIMEOUT (2*HZ)
-int fcp_scsi_dev_reset(
Scsi_C
mnd *SCpnt)
+int fcp_scsi_dev_reset(
struct scsi_c
mnd *SCpnt)
{
#if 0 /* broken junk, but if davem wants to compile this driver, let him.. */
unsigned long flags;
{
#if 0 /* broken junk, but if davem wants to compile this driver, let him.. */
unsigned long flags;
@@
-931,7
+933,7
@@
int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
DECLARE_MUTEX_LOCKED(sem);
if (!fc->rst_pkt) {
DECLARE_MUTEX_LOCKED(sem);
if (!fc->rst_pkt) {
- fc->rst_pkt =
(Scsi_Cmnd *)
kmalloc(sizeof(SCpnt), GFP_KERNEL);
+ fc->rst_pkt = kmalloc(sizeof(SCpnt), GFP_KERNEL);
if (!fc->rst_pkt) return FAILED;
fcmd = FCP_CMND(fc->rst_pkt);
if (!fc->rst_pkt) return FAILED;
fcmd = FCP_CMND(fc->rst_pkt);
@@
-974,7
+976,6
@@
int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
*/
fc->rst_pkt->device->host->eh_action = &sem;
*/
fc->rst_pkt->device->host->eh_action = &sem;
- fc->rst_pkt->request->rq_status = RQ_SCSI_BUSY;
fc->rst_pkt->done = fcp_scsi_reset_done;
fc->rst_pkt->done = fcp_scsi_reset_done;
@@
-1000,7
+1001,7
@@
int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
return SUCCESS;
}
return SUCCESS;
}
-static int __fcp_scsi_host_reset(
Scsi_C
mnd *SCpnt)
+static int __fcp_scsi_host_reset(
struct scsi_c
mnd *SCpnt)
{
fc_channel *fc = FC_SCMND(SCpnt);
fcp_cmnd *fcmd = FCP_CMND(SCpnt);
{
fc_channel *fc = FC_SCMND(SCpnt);
fcp_cmnd *fcmd = FCP_CMND(SCpnt);
@@
-1021,7
+1022,7
@@
static int __fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
else return FAILED;
}
else return FAILED;
}
-int fcp_scsi_host_reset(
Scsi_C
mnd *SCpnt)
+int fcp_scsi_host_reset(
struct scsi_c
mnd *SCpnt)
{
unsigned long flags;
int rc;
{
unsigned long flags;
int rc;
@@
-1106,7
+1107,7
@@
int fc_do_plogi(fc_channel *fc, unsigned char alpa, fc_wwn *node, fc_wwn *nport)
logi *l;
int status;
logi *l;
int status;
- l =
(logi *)
kzalloc(2 * sizeof(logi), GFP_KERNEL);
+ l = kzalloc(2 * sizeof(logi), GFP_KERNEL);
if (!l) return -ENOMEM;
l->code = LS_PLOGI;
memcpy (&l->nport_wwn, &fc->wwn_nport, sizeof(fc_wwn));
if (!l) return -ENOMEM;
l->code = LS_PLOGI;
memcpy (&l->nport_wwn, &fc->wwn_nport, sizeof(fc_wwn));
@@
-1140,7
+1141,7
@@
int fc_do_prli(fc_channel *fc, unsigned char alpa)
prli *p;
int status;
prli *p;
int status;
- p =
(prli *)
kzalloc(2 * sizeof(prli), GFP_KERNEL);
+ p = kzalloc(2 * sizeof(prli), GFP_KERNEL);
if (!p) return -ENOMEM;
p->code = LS_PRLI;
p->params[0] = 0x08002000;
if (!p) return -ENOMEM;
p->code = LS_PRLI;
p->params[0] = 0x08002000;