aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2015-02-06 17:11:44 -0500
committerJames Bottomley <JBottomley@Odin.com>2015-04-09 21:08:21 -0400
commit55b28f9fc033f9af090a58ea97063ca51552a2a6 (patch)
tree57469ca123bfd2b0b2f2d5f110aadb853a012c79
parentcad2fc72cfc092ed3448a0235f59fe003f4f85c3 (diff)
aha1524: Use struct scsi_cmnd
Use struct scsi_cmnd instead of Scsi_Cmnd and also rename the variables to get rid of SC prefix Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
-rw-r--r--drivers/scsi/aha1542.c150
1 files changed, 75 insertions, 75 deletions
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index dbe46591a5e2..dcc493de68e7 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -86,7 +86,7 @@ struct aha1542_hostdata {
86 int bios_translation; /* Mapping bios uses - for compatibility */ 86 int bios_translation; /* Mapping bios uses - for compatibility */
87 int aha1542_last_mbi_used; 87 int aha1542_last_mbi_used;
88 int aha1542_last_mbo_used; 88 int aha1542_last_mbo_used;
89 Scsi_Cmnd *SCint[AHA1542_MAILBOXES]; 89 struct scsi_cmnd *int_cmds[AHA1542_MAILBOXES];
90 struct mailbox mb[2 * AHA1542_MAILBOXES]; 90 struct mailbox mb[2 * AHA1542_MAILBOXES];
91 struct ccb ccb[AHA1542_MAILBOXES]; 91 struct ccb ccb[AHA1542_MAILBOXES];
92}; 92};
@@ -296,11 +296,11 @@ static int aha1542_test_port(int bse, struct Scsi_Host *shpnt)
296static void aha1542_intr_handle(struct Scsi_Host *shost) 296static void aha1542_intr_handle(struct Scsi_Host *shost)
297{ 297{
298 struct aha1542_hostdata *aha1542 = shost_priv(shost); 298 struct aha1542_hostdata *aha1542 = shost_priv(shost);
299 void (*my_done) (Scsi_Cmnd *) = NULL; 299 void (*my_done)(struct scsi_cmnd *) = NULL;
300 int errstatus, mbi, mbo, mbistatus; 300 int errstatus, mbi, mbo, mbistatus;
301 int number_serviced; 301 int number_serviced;
302 unsigned long flags; 302 unsigned long flags;
303 Scsi_Cmnd *SCtmp; 303 struct scsi_cmnd *tmp_cmd;
304 int flag; 304 int flag;
305 struct mailbox *mb = aha1542->mb; 305 struct mailbox *mb = aha1542->mb;
306 struct ccb *ccb = aha1542->ccb; 306 struct ccb *ccb = aha1542->ccb;
@@ -383,22 +383,22 @@ static void aha1542_intr_handle(struct Scsi_Host *shost)
383 printk(KERN_DEBUG "...done %d %d\n", mbo, mbi); 383 printk(KERN_DEBUG "...done %d %d\n", mbo, mbi);
384#endif 384#endif
385 385
386 SCtmp = aha1542->SCint[mbo]; 386 tmp_cmd = aha1542->int_cmds[mbo];
387 387
388 if (!SCtmp || !SCtmp->scsi_done) { 388 if (!tmp_cmd || !tmp_cmd->scsi_done) {
389 printk(KERN_WARNING "aha1542_intr_handle: Unexpected interrupt\n"); 389 printk(KERN_WARNING "aha1542_intr_handle: Unexpected interrupt\n");
390 printk(KERN_WARNING "tarstat=%x, hastat=%x idlun=%x ccb#=%d \n", ccb[mbo].tarstat, 390 printk(KERN_WARNING "tarstat=%x, hastat=%x idlun=%x ccb#=%d \n", ccb[mbo].tarstat,
391 ccb[mbo].hastat, ccb[mbo].idlun, mbo); 391 ccb[mbo].hastat, ccb[mbo].idlun, mbo);
392 return; 392 return;
393 } 393 }
394 my_done = SCtmp->scsi_done; 394 my_done = tmp_cmd->scsi_done;
395 kfree(SCtmp->host_scribble); 395 kfree(tmp_cmd->host_scribble);
396 SCtmp->host_scribble = NULL; 396 tmp_cmd->host_scribble = NULL;
397 /* Fetch the sense data, and tuck it away, in the required slot. The 397 /* Fetch the sense data, and tuck it away, in the required slot. The
398 Adaptec automatically fetches it, and there is no guarantee that 398 Adaptec automatically fetches it, and there is no guarantee that
399 we will still have it in the cdb when we come back */ 399 we will still have it in the cdb when we come back */
400 if (ccb[mbo].tarstat == 2) 400 if (ccb[mbo].tarstat == 2)
401 memcpy(SCtmp->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen], 401 memcpy(tmp_cmd->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen],
402 SCSI_SENSE_BUFFERSIZE); 402 SCSI_SENSE_BUFFERSIZE);
403 403
404 404
@@ -435,10 +435,10 @@ static void aha1542_intr_handle(struct Scsi_Host *shost)
435 */ 435 */
436 } 436 }
437 DEB(if (errstatus) printk("aha1542_intr_handle: returning %6x\n", errstatus)); 437 DEB(if (errstatus) printk("aha1542_intr_handle: returning %6x\n", errstatus));
438 SCtmp->result = errstatus; 438 tmp_cmd->result = errstatus;
439 aha1542->SCint[mbo] = NULL; /* This effectively frees up the mailbox slot, as 439 aha1542->int_cmds[mbo] = NULL; /* This effectively frees up the mailbox slot, as
440 far as queuecommand is concerned */ 440 far as queuecommand is concerned */
441 my_done(SCtmp); 441 my_done(tmp_cmd);
442 number_serviced++; 442 number_serviced++;
443 }; 443 };
444} 444}
@@ -455,14 +455,14 @@ static irqreturn_t do_aha1542_intr_handle(int dummy, void *dev_id)
455 return IRQ_HANDLED; 455 return IRQ_HANDLED;
456} 456}
457 457
458static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *)) 458static int aha1542_queuecommand_lck(struct scsi_cmnd *cmd, void (*done) (struct scsi_cmnd *))
459{ 459{
460 struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); 460 struct aha1542_hostdata *aha1542 = shost_priv(cmd->device->host);
461 u8 direction; 461 u8 direction;
462 u8 target = SCpnt->device->id; 462 u8 target = cmd->device->id;
463 u8 lun = SCpnt->device->lun; 463 u8 lun = cmd->device->lun;
464 unsigned long flags; 464 unsigned long flags;
465 int bufflen = scsi_bufflen(SCpnt); 465 int bufflen = scsi_bufflen(cmd);
466 int mbo; 466 int mbo;
467 struct mailbox *mb = aha1542->mb; 467 struct mailbox *mb = aha1542->mb;
468 struct ccb *ccb = aha1542->ccb; 468 struct ccb *ccb = aha1542->ccb;
@@ -470,33 +470,33 @@ static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *
470 DEB(int i); 470 DEB(int i);
471 471
472 DEB(if (target > 1) { 472 DEB(if (target > 1) {
473 SCpnt->result = DID_TIME_OUT << 16; 473 cmd->result = DID_TIME_OUT << 16;
474 done(SCpnt); return 0; 474 done(cmd); return 0;
475 } 475 }
476 ); 476 );
477 477
478 if (*SCpnt->cmnd == REQUEST_SENSE) { 478 if (*cmd->cmnd == REQUEST_SENSE) {
479 /* Don't do the command - we have the sense data already */ 479 /* Don't do the command - we have the sense data already */
480 SCpnt->result = 0; 480 cmd->result = 0;
481 done(SCpnt); 481 done(cmd);
482 return 0; 482 return 0;
483 } 483 }
484#ifdef DEBUG 484#ifdef DEBUG
485 if (*SCpnt->cmnd == READ_10 || *SCpnt->cmnd == WRITE_10) 485 if (*cmd->cmnd == READ_10 || *cmd->cmnd == WRITE_10)
486 i = xscsi2int(SCpnt->cmnd + 2); 486 i = xscsi2int(cmd->cmnd + 2);
487 else if (*SCpnt->cmnd == READ_6 || *SCpnt->cmnd == WRITE_6) 487 else if (*cmd->cmnd == READ_6 || *cmd->cmnd == WRITE_6)
488 i = scsi2int(SCpnt->cmnd + 2); 488 i = scsi2int(cmd->cmnd + 2);
489 else 489 else
490 i = -1; 490 i = -1;
491 if (done) 491 if (done)
492 printk(KERN_DEBUG "aha1542_queuecommand: dev %d cmd %02x pos %d len %d ", target, *SCpnt->cmnd, i, bufflen); 492 printk(KERN_DEBUG "aha1542_queuecommand: dev %d cmd %02x pos %d len %d ", target, *cmd->cmnd, i, bufflen);
493 else 493 else
494 printk(KERN_DEBUG "aha1542_command: dev %d cmd %02x pos %d len %d ", target, *SCpnt->cmnd, i, bufflen); 494 printk(KERN_DEBUG "aha1542_command: dev %d cmd %02x pos %d len %d ", target, *cmd->cmnd, i, bufflen);
495 printk(KERN_DEBUG "aha1542_queuecommand: dumping scsi cmd:"); 495 printk(KERN_DEBUG "aha1542_queuecommand: dumping scsi cmd:");
496 for (i = 0; i < SCpnt->cmd_len; i++) 496 for (i = 0; i < cmd->cmd_len; i++)
497 printk("%02x ", SCpnt->cmnd[i]); 497 printk("%02x ", cmd->cmnd[i]);
498 printk("\n"); 498 printk("\n");
499 if (*SCpnt->cmnd == WRITE_10 || *SCpnt->cmnd == WRITE_6) 499 if (*cmd->cmnd == WRITE_10 || *cmd->cmnd == WRITE_6)
500 return 0; /* we are still testing, so *don't* write */ 500 return 0; /* we are still testing, so *don't* write */
501#endif 501#endif
502 /* Use the outgoing mailboxes in a round-robin fashion, because this 502 /* Use the outgoing mailboxes in a round-robin fashion, because this
@@ -508,17 +508,17 @@ static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *
508 mbo = 0; 508 mbo = 0;
509 509
510 do { 510 do {
511 if (mb[mbo].status == 0 && aha1542->SCint[mbo] == NULL) 511 if (mb[mbo].status == 0 && aha1542->int_cmds[mbo] == NULL)
512 break; 512 break;
513 mbo++; 513 mbo++;
514 if (mbo >= AHA1542_MAILBOXES) 514 if (mbo >= AHA1542_MAILBOXES)
515 mbo = 0; 515 mbo = 0;
516 } while (mbo != aha1542->aha1542_last_mbo_used); 516 } while (mbo != aha1542->aha1542_last_mbo_used);
517 517
518 if (mb[mbo].status || aha1542->SCint[mbo]) 518 if (mb[mbo].status || aha1542->int_cmds[mbo])
519 panic("Unable to find empty mailbox for aha1542.\n"); 519 panic("Unable to find empty mailbox for aha1542.\n");
520 520
521 aha1542->SCint[mbo] = SCpnt; /* This will effectively prevent someone else from 521 aha1542->int_cmds[mbo] = cmd; /* This will effectively prevent someone else from
522 screwing with this cdb. */ 522 screwing with this cdb. */
523 523
524 aha1542->aha1542_last_mbo_used = mbo; 524 aha1542->aha1542_last_mbo_used = mbo;
@@ -532,15 +532,15 @@ static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *
532 532
533 memset(&ccb[mbo], 0, sizeof(struct ccb)); 533 memset(&ccb[mbo], 0, sizeof(struct ccb));
534 534
535 ccb[mbo].cdblen = SCpnt->cmd_len; 535 ccb[mbo].cdblen = cmd->cmd_len;
536 536
537 direction = 0; 537 direction = 0;
538 if (*SCpnt->cmnd == READ_10 || *SCpnt->cmnd == READ_6) 538 if (*cmd->cmnd == READ_10 || *cmd->cmnd == READ_6)
539 direction = 8; 539 direction = 8;
540 else if (*SCpnt->cmnd == WRITE_10 || *SCpnt->cmnd == WRITE_6) 540 else if (*cmd->cmnd == WRITE_10 || *cmd->cmnd == WRITE_6)
541 direction = 16; 541 direction = 16;
542 542
543 memcpy(ccb[mbo].cdb, SCpnt->cmnd, ccb[mbo].cdblen); 543 memcpy(ccb[mbo].cdb, cmd->cmnd, ccb[mbo].cdblen);
544 544
545 if (bufflen) { 545 if (bufflen) {
546 struct scatterlist *sg; 546 struct scatterlist *sg;
@@ -548,17 +548,17 @@ static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *
548#ifdef DEBUG 548#ifdef DEBUG
549 unsigned char *ptr; 549 unsigned char *ptr;
550#endif 550#endif
551 int i, sg_count = scsi_sg_count(SCpnt); 551 int i, sg_count = scsi_sg_count(cmd);
552 ccb[mbo].op = 2; /* SCSI Initiator Command w/scatter-gather */ 552 ccb[mbo].op = 2; /* SCSI Initiator Command w/scatter-gather */
553 SCpnt->host_scribble = kmalloc(sizeof(*cptr)*sg_count, 553 cmd->host_scribble = kmalloc(sizeof(*cptr)*sg_count,
554 GFP_KERNEL | GFP_DMA); 554 GFP_KERNEL | GFP_DMA);
555 cptr = (struct chain *) SCpnt->host_scribble; 555 cptr = (struct chain *) cmd->host_scribble;
556 if (cptr == NULL) { 556 if (cptr == NULL) {
557 /* free the claimed mailbox slot */ 557 /* free the claimed mailbox slot */
558 aha1542->SCint[mbo] = NULL; 558 aha1542->int_cmds[mbo] = NULL;
559 return SCSI_MLQUEUE_HOST_BUSY; 559 return SCSI_MLQUEUE_HOST_BUSY;
560 } 560 }
561 scsi_for_each_sg(SCpnt, sg, sg_count, i) { 561 scsi_for_each_sg(cmd, sg, sg_count, i) {
562 any2scsi(cptr[i].dataptr, isa_page_to_bus(sg_page(sg)) 562 any2scsi(cptr[i].dataptr, isa_page_to_bus(sg_page(sg))
563 + sg->offset); 563 + sg->offset);
564 any2scsi(cptr[i].datalen, sg->length); 564 any2scsi(cptr[i].datalen, sg->length);
@@ -573,7 +573,7 @@ static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *
573#endif 573#endif
574 } else { 574 } else {
575 ccb[mbo].op = 0; /* SCSI Initiator Command */ 575 ccb[mbo].op = 0; /* SCSI Initiator Command */
576 SCpnt->host_scribble = NULL; 576 cmd->host_scribble = NULL;
577 any2scsi(ccb[mbo].datalen, 0); 577 any2scsi(ccb[mbo].datalen, 0);
578 any2scsi(ccb[mbo].dataptr, 0); 578 any2scsi(ccb[mbo].dataptr, 0);
579 }; 579 };
@@ -593,9 +593,9 @@ static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *
593 593
594 if (done) { 594 if (done) {
595 DEB(printk("aha1542_queuecommand: now waiting for interrupt ")); 595 DEB(printk("aha1542_queuecommand: now waiting for interrupt "));
596 SCpnt->scsi_done = done; 596 cmd->scsi_done = done;
597 mb[mbo].status = 1; 597 mb[mbo].status = 1;
598 aha1542_outb(SCpnt->device->host->io_port, CMD_START_SCSI); 598 aha1542_outb(cmd->device->host->io_port, CMD_START_SCSI);
599 } else 599 } else
600 printk("aha1542_queuecommand: done can't be NULL\n"); 600 printk("aha1542_queuecommand: done can't be NULL\n");
601 601
@@ -908,13 +908,13 @@ static int aha1542_release(struct Scsi_Host *shost)
908 * This is a device reset. This is handled by sending a special command 908 * This is a device reset. This is handled by sending a special command
909 * to the device. 909 * to the device.
910 */ 910 */
911static int aha1542_dev_reset(Scsi_Cmnd * SCpnt) 911static int aha1542_dev_reset(struct scsi_cmnd *cmd)
912{ 912{
913 struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); 913 struct aha1542_hostdata *aha1542 = shost_priv(cmd->device->host);
914 unsigned long flags; 914 unsigned long flags;
915 struct mailbox *mb = aha1542->mb; 915 struct mailbox *mb = aha1542->mb;
916 u8 target = SCpnt->device->id; 916 u8 target = cmd->device->id;
917 u8 lun = SCpnt->device->lun; 917 u8 lun = cmd->device->lun;
918 int mbo; 918 int mbo;
919 struct ccb *ccb = aha1542->ccb; 919 struct ccb *ccb = aha1542->ccb;
920 920
@@ -924,17 +924,17 @@ static int aha1542_dev_reset(Scsi_Cmnd * SCpnt)
924 mbo = 0; 924 mbo = 0;
925 925
926 do { 926 do {
927 if (mb[mbo].status == 0 && aha1542->SCint[mbo] == NULL) 927 if (mb[mbo].status == 0 && aha1542->int_cmds[mbo] == NULL)
928 break; 928 break;
929 mbo++; 929 mbo++;
930 if (mbo >= AHA1542_MAILBOXES) 930 if (mbo >= AHA1542_MAILBOXES)
931 mbo = 0; 931 mbo = 0;
932 } while (mbo != aha1542->aha1542_last_mbo_used); 932 } while (mbo != aha1542->aha1542_last_mbo_used);
933 933
934 if (mb[mbo].status || aha1542->SCint[mbo]) 934 if (mb[mbo].status || aha1542->int_cmds[mbo])
935 panic("Unable to find empty mailbox for aha1542.\n"); 935 panic("Unable to find empty mailbox for aha1542.\n");
936 936
937 aha1542->SCint[mbo] = SCpnt; /* This will effectively 937 aha1542->int_cmds[mbo] = cmd; /* This will effectively
938 prevent someone else from 938 prevent someone else from
939 screwing with this cdb. */ 939 screwing with this cdb. */
940 940
@@ -956,17 +956,17 @@ static int aha1542_dev_reset(Scsi_Cmnd * SCpnt)
956 * Now tell the 1542 to flush all pending commands for this 956 * Now tell the 1542 to flush all pending commands for this
957 * target 957 * target
958 */ 958 */
959 aha1542_outb(SCpnt->device->host->io_port, CMD_START_SCSI); 959 aha1542_outb(cmd->device->host->io_port, CMD_START_SCSI);
960 960
961 scmd_printk(KERN_WARNING, SCpnt, 961 scmd_printk(KERN_WARNING, cmd,
962 "Trying device reset for target\n"); 962 "Trying device reset for target\n");
963 963
964 return SUCCESS; 964 return SUCCESS;
965} 965}
966 966
967static int aha1542_reset(Scsi_Cmnd *SCpnt, u8 reset_cmd) 967static int aha1542_reset(struct scsi_cmnd *cmd, u8 reset_cmd)
968{ 968{
969 struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); 969 struct aha1542_hostdata *aha1542 = shost_priv(cmd->device->host);
970 int i; 970 int i;
971 971
972 /* 972 /*
@@ -975,7 +975,7 @@ static int aha1542_reset(Scsi_Cmnd *SCpnt, u8 reset_cmd)
975 * we do this? Try this first, and we can add that later 975 * we do this? Try this first, and we can add that later
976 * if it turns out to be useful. 976 * if it turns out to be useful.
977 */ 977 */
978 outb(reset_cmd, CONTROL(SCpnt->device->host->io_port)); 978 outb(reset_cmd, CONTROL(cmd->device->host->io_port));
979 979
980 /* 980 /*
981 * Wait for the thing to settle down a bit. Unfortunately 981 * Wait for the thing to settle down a bit. Unfortunately
@@ -985,11 +985,11 @@ static int aha1542_reset(Scsi_Cmnd *SCpnt, u8 reset_cmd)
985 * we are pretty desperate anyways. 985 * we are pretty desperate anyways.
986 */ 986 */
987 ssleep(4); 987 ssleep(4);
988 spin_lock_irq(SCpnt->device->host->host_lock); 988 spin_lock_irq(cmd->device->host->host_lock);
989 989
990 if (!wait_mask(STATUS(SCpnt->device->host->io_port), 990 if (!wait_mask(STATUS(cmd->device->host->io_port),
991 STATMASK, INIT | IDLE, STST | DIAGF | INVDCMD | DF | CDF, 0)) { 991 STATMASK, INIT | IDLE, STST | DIAGF | INVDCMD | DF | CDF, 0)) {
992 spin_unlock_irq(SCpnt->device->host->host_lock); 992 spin_unlock_irq(cmd->device->host->host_lock);
993 return FAILED; 993 return FAILED;
994 } 994 }
995 /* 995 /*
@@ -997,21 +997,21 @@ static int aha1542_reset(Scsi_Cmnd *SCpnt, u8 reset_cmd)
997 * us again after host reset. 997 * us again after host reset.
998 */ 998 */
999 if (reset_cmd & HRST) 999 if (reset_cmd & HRST)
1000 setup_mailboxes(SCpnt->device->host->io_port, SCpnt->device->host); 1000 setup_mailboxes(cmd->device->host->io_port, cmd->device->host);
1001 /* 1001 /*
1002 * Now try to pick up the pieces. For all pending commands, 1002 * Now try to pick up the pieces. For all pending commands,
1003 * free any internal data structures, and basically clear things 1003 * free any internal data structures, and basically clear things
1004 * out. We do not try and restart any commands or anything - 1004 * out. We do not try and restart any commands or anything -
1005 * the strategy handler takes care of that crap. 1005 * the strategy handler takes care of that crap.
1006 */ 1006 */
1007 printk(KERN_WARNING "Sent BUS RESET to scsi host %d\n", SCpnt->device->host->host_no); 1007 printk(KERN_WARNING "Sent BUS RESET to scsi host %d\n", cmd->device->host->host_no);
1008 1008
1009 for (i = 0; i < AHA1542_MAILBOXES; i++) { 1009 for (i = 0; i < AHA1542_MAILBOXES; i++) {
1010 if (aha1542->SCint[i] != NULL) { 1010 if (aha1542->int_cmds[i] != NULL) {
1011 Scsi_Cmnd *SCtmp; 1011 struct scsi_cmnd *tmp_cmd;
1012 SCtmp = aha1542->SCint[i]; 1012 tmp_cmd = aha1542->int_cmds[i];
1013 1013
1014 if (SCtmp->device->soft_reset) { 1014 if (tmp_cmd->device->soft_reset) {
1015 /* 1015 /*
1016 * If this device implements the soft reset option, 1016 * If this device implements the soft reset option,
1017 * then it is still holding onto the command, and 1017 * then it is still holding onto the command, and
@@ -1020,25 +1020,25 @@ static int aha1542_reset(Scsi_Cmnd *SCpnt, u8 reset_cmd)
1020 */ 1020 */
1021 continue; 1021 continue;
1022 } 1022 }
1023 kfree(SCtmp->host_scribble); 1023 kfree(tmp_cmd->host_scribble);
1024 SCtmp->host_scribble = NULL; 1024 tmp_cmd->host_scribble = NULL;
1025 aha1542->SCint[i] = NULL; 1025 aha1542->int_cmds[i] = NULL;
1026 aha1542->mb[i].status = 0; 1026 aha1542->mb[i].status = 0;
1027 } 1027 }
1028 } 1028 }
1029 1029
1030 spin_unlock_irq(SCpnt->device->host->host_lock); 1030 spin_unlock_irq(cmd->device->host->host_lock);
1031 return SUCCESS; 1031 return SUCCESS;
1032} 1032}
1033 1033
1034static int aha1542_bus_reset(Scsi_Cmnd *SCpnt) 1034static int aha1542_bus_reset(struct scsi_cmnd *cmd)
1035{ 1035{
1036 return aha1542_reset(SCpnt, SCRST); 1036 return aha1542_reset(cmd, SCRST);
1037} 1037}
1038 1038
1039static int aha1542_host_reset(Scsi_Cmnd *SCpnt) 1039static int aha1542_host_reset(struct scsi_cmnd *cmd)
1040{ 1040{
1041 return aha1542_reset(SCpnt, HRST | SCRST); 1041 return aha1542_reset(cmd, HRST | SCRST);
1042} 1042}
1043 1043
1044static int aha1542_biosparam(struct scsi_device *sdev, 1044static int aha1542_biosparam(struct scsi_device *sdev,