mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
aha1542: remove useless code from aha1542_test_port
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
This commit is contained in:
parent
a13b3722a3
commit
bdebe2241e
1 changed files with 1 additions and 14 deletions
|
@ -271,7 +271,6 @@ static int aha1542_test_port(int bse, struct Scsi_Host *shpnt)
|
||||||
u8 inquiry_result[4];
|
u8 inquiry_result[4];
|
||||||
u8 *cmdp;
|
u8 *cmdp;
|
||||||
int len;
|
int len;
|
||||||
volatile int debug = 0;
|
|
||||||
|
|
||||||
/* Quick and dirty test for presence of the card. */
|
/* Quick and dirty test for presence of the card. */
|
||||||
if (inb(STATUS(bse)) == 0xff)
|
if (inb(STATUS(bse)) == 0xff)
|
||||||
|
@ -279,8 +278,6 @@ static int aha1542_test_port(int bse, struct Scsi_Host *shpnt)
|
||||||
|
|
||||||
/* Reset the adapter. I ought to make a hard reset, but it's not really necessary */
|
/* Reset the adapter. I ought to make a hard reset, but it's not really necessary */
|
||||||
|
|
||||||
/* DEB(printk("aha1542_test_port called \n")); */
|
|
||||||
|
|
||||||
/* In case some other card was probing here, reset interrupts */
|
/* In case some other card was probing here, reset interrupts */
|
||||||
aha1542_intr_reset(bse); /* reset interrupts, so they don't block */
|
aha1542_intr_reset(bse); /* reset interrupts, so they don't block */
|
||||||
|
|
||||||
|
@ -288,23 +285,19 @@ static int aha1542_test_port(int bse, struct Scsi_Host *shpnt)
|
||||||
|
|
||||||
mdelay(20); /* Wait a little bit for things to settle down. */
|
mdelay(20); /* Wait a little bit for things to settle down. */
|
||||||
|
|
||||||
debug = 1;
|
|
||||||
/* Expect INIT and IDLE, any of the others are bad */
|
/* Expect INIT and IDLE, any of the others are bad */
|
||||||
if (!wait_mask(STATUS(bse), STATMASK, INIT | IDLE, STST | DIAGF | INVDCMD | DF | CDF, 0))
|
if (!wait_mask(STATUS(bse), STATMASK, INIT | IDLE, STST | DIAGF | INVDCMD | DF | CDF, 0))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
debug = 2;
|
|
||||||
/* Shouldn't have generated any interrupts during reset */
|
/* Shouldn't have generated any interrupts during reset */
|
||||||
if (inb(INTRFLAGS(bse)) & INTRMASK)
|
if (inb(INTRFLAGS(bse)) & INTRMASK)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
/* Perform a host adapter inquiry instead so we do not need to set
|
/* Perform a host adapter inquiry instead so we do not need to set
|
||||||
up the mailboxes ahead of time */
|
up the mailboxes ahead of time */
|
||||||
|
|
||||||
aha1542_outb(bse, CMD_INQUIRY);
|
aha1542_outb(bse, CMD_INQUIRY);
|
||||||
|
|
||||||
debug = 3;
|
|
||||||
len = 4;
|
len = 4;
|
||||||
cmdp = &inquiry_result[0];
|
cmdp = &inquiry_result[0];
|
||||||
|
|
||||||
|
@ -314,24 +307,18 @@ static int aha1542_test_port(int bse, struct Scsi_Host *shpnt)
|
||||||
*cmdp++ = inb(DATA(bse));
|
*cmdp++ = inb(DATA(bse));
|
||||||
}
|
}
|
||||||
|
|
||||||
debug = 8;
|
|
||||||
/* Reading port should reset DF */
|
/* Reading port should reset DF */
|
||||||
if (inb(STATUS(bse)) & DF)
|
if (inb(STATUS(bse)) & DF)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
debug = 9;
|
|
||||||
/* When HACC, command is completed, and we're though testing */
|
/* When HACC, command is completed, and we're though testing */
|
||||||
if (!wait_mask(INTRFLAGS(bse), HACC, HACC, 0, 0))
|
if (!wait_mask(INTRFLAGS(bse), HACC, HACC, 0, 0))
|
||||||
return 0;
|
return 0;
|
||||||
/* now initialize adapter */
|
|
||||||
|
|
||||||
debug = 10;
|
|
||||||
/* Clear interrupts */
|
/* Clear interrupts */
|
||||||
outb(IRST, CONTROL(bse));
|
outb(IRST, CONTROL(bse));
|
||||||
|
|
||||||
debug = 11;
|
return 1;
|
||||||
|
|
||||||
return debug; /* 1 = ok */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int aha1542_restart(struct Scsi_Host *shost)
|
static int aha1542_restart(struct Scsi_Host *shost)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue