diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2015-02-06 17:11:35 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-04-09 21:07:32 -0400 |
commit | bdebe2241eb49bf2308571b6158fa5635b9e708e (patch) | |
tree | e00af218b815a21dae205e3dfea311bfda7bd04c | |
parent | a13b3722a352dffa838994eb713573e2e189d928 (diff) |
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>
-rw-r--r-- | drivers/scsi/aha1542.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c index af2c69e1a697..29ddcc993423 100644 --- a/drivers/scsi/aha1542.c +++ b/drivers/scsi/aha1542.c | |||
@@ -271,7 +271,6 @@ static int aha1542_test_port(int bse, struct Scsi_Host *shpnt) | |||
271 | u8 inquiry_result[4]; | 271 | u8 inquiry_result[4]; |
272 | u8 *cmdp; | 272 | u8 *cmdp; |
273 | int len; | 273 | int len; |
274 | volatile int debug = 0; | ||
275 | 274 | ||
276 | /* Quick and dirty test for presence of the card. */ | 275 | /* Quick and dirty test for presence of the card. */ |
277 | if (inb(STATUS(bse)) == 0xff) | 276 | if (inb(STATUS(bse)) == 0xff) |
@@ -279,8 +278,6 @@ static int aha1542_test_port(int bse, struct Scsi_Host *shpnt) | |||
279 | 278 | ||
280 | /* Reset the adapter. I ought to make a hard reset, but it's not really necessary */ | 279 | /* Reset the adapter. I ought to make a hard reset, but it's not really necessary */ |
281 | 280 | ||
282 | /* DEB(printk("aha1542_test_port called \n")); */ | ||
283 | |||
284 | /* In case some other card was probing here, reset interrupts */ | 281 | /* In case some other card was probing here, reset interrupts */ |
285 | aha1542_intr_reset(bse); /* reset interrupts, so they don't block */ | 282 | aha1542_intr_reset(bse); /* reset interrupts, so they don't block */ |
286 | 283 | ||
@@ -288,23 +285,19 @@ static int aha1542_test_port(int bse, struct Scsi_Host *shpnt) | |||
288 | 285 | ||
289 | mdelay(20); /* Wait a little bit for things to settle down. */ | 286 | mdelay(20); /* Wait a little bit for things to settle down. */ |
290 | 287 | ||
291 | debug = 1; | ||
292 | /* Expect INIT and IDLE, any of the others are bad */ | 288 | /* Expect INIT and IDLE, any of the others are bad */ |
293 | if (!wait_mask(STATUS(bse), STATMASK, INIT | IDLE, STST | DIAGF | INVDCMD | DF | CDF, 0)) | 289 | if (!wait_mask(STATUS(bse), STATMASK, INIT | IDLE, STST | DIAGF | INVDCMD | DF | CDF, 0)) |
294 | return 0; | 290 | return 0; |
295 | 291 | ||
296 | debug = 2; | ||
297 | /* Shouldn't have generated any interrupts during reset */ | 292 | /* Shouldn't have generated any interrupts during reset */ |
298 | if (inb(INTRFLAGS(bse)) & INTRMASK) | 293 | if (inb(INTRFLAGS(bse)) & INTRMASK) |
299 | return 0; | 294 | return 0; |
300 | 295 | ||
301 | |||
302 | /* Perform a host adapter inquiry instead so we do not need to set | 296 | /* Perform a host adapter inquiry instead so we do not need to set |
303 | up the mailboxes ahead of time */ | 297 | up the mailboxes ahead of time */ |
304 | 298 | ||
305 | aha1542_outb(bse, CMD_INQUIRY); | 299 | aha1542_outb(bse, CMD_INQUIRY); |
306 | 300 | ||
307 | debug = 3; | ||
308 | len = 4; | 301 | len = 4; |
309 | cmdp = &inquiry_result[0]; | 302 | cmdp = &inquiry_result[0]; |
310 | 303 | ||
@@ -314,24 +307,18 @@ static int aha1542_test_port(int bse, struct Scsi_Host *shpnt) | |||
314 | *cmdp++ = inb(DATA(bse)); | 307 | *cmdp++ = inb(DATA(bse)); |
315 | } | 308 | } |
316 | 309 | ||
317 | debug = 8; | ||
318 | /* Reading port should reset DF */ | 310 | /* Reading port should reset DF */ |
319 | if (inb(STATUS(bse)) & DF) | 311 | if (inb(STATUS(bse)) & DF) |
320 | return 0; | 312 | return 0; |
321 | 313 | ||
322 | debug = 9; | ||
323 | /* When HACC, command is completed, and we're though testing */ | 314 | /* When HACC, command is completed, and we're though testing */ |
324 | if (!wait_mask(INTRFLAGS(bse), HACC, HACC, 0, 0)) | 315 | if (!wait_mask(INTRFLAGS(bse), HACC, HACC, 0, 0)) |
325 | return 0; | 316 | return 0; |
326 | /* now initialize adapter */ | ||
327 | 317 | ||
328 | debug = 10; | ||
329 | /* Clear interrupts */ | 318 | /* Clear interrupts */ |
330 | outb(IRST, CONTROL(bse)); | 319 | outb(IRST, CONTROL(bse)); |
331 | 320 | ||
332 | debug = 11; | 321 | return 1; |
333 | |||
334 | return debug; /* 1 = ok */ | ||
335 | } | 322 | } |
336 | 323 | ||
337 | static int aha1542_restart(struct Scsi_Host *shost) | 324 | static int aha1542_restart(struct Scsi_Host *shost) |