Commit e4da5feb authored by Sergey Shtylyov's avatar Sergey Shtylyov Committed by Martin K. Petersen

scsi: aha1542: Fix multi-line comment style

Some comments in this driver don't comply with the preferred multi-line
comment style, as reported by 'scripts/checkpatch.pl':

WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line

Fix those comments, along with the (unreported for some reason?) starts of
the multi-line comments not being /* on their own line...

Link: https://lore.kernel.org/r/08c231e5-d86f-9d0b-19ac-ad46fa0c0b58@omprussia.ruReviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarSergey Shtylyov <s.shtylyov@omprussia.ru>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 6075416c
...@@ -119,8 +119,10 @@ static int aha1542_out(unsigned int base, u8 *buf, int len) ...@@ -119,8 +119,10 @@ static int aha1542_out(unsigned int base, u8 *buf, int len)
return 0; return 0;
} }
/* Only used at boot time, so we do not need to worry about latency as much /*
here */ * Only used at boot time, so we do not need to worry about latency as much
* here
*/
static int aha1542_in(unsigned int base, u8 *buf, int len, int timeout) static int aha1542_in(unsigned int base, u8 *buf, int len, int timeout)
{ {
...@@ -142,35 +144,43 @@ static int makecode(unsigned hosterr, unsigned scsierr) ...@@ -142,35 +144,43 @@ static int makecode(unsigned hosterr, unsigned scsierr)
break; break;
case 0x11: /* Selection time out-The initiator selection or target case 0x11: /* Selection time out-The initiator selection or target
reselection was not complete within the SCSI Time out period */ * reselection was not complete within the SCSI Time out period
*/
hosterr = DID_TIME_OUT; hosterr = DID_TIME_OUT;
break; break;
case 0x12: /* Data overrun/underrun-The target attempted to transfer more data case 0x12: /* Data overrun/underrun-The target attempted to transfer more data
than was allocated by the Data Length field or the sum of the * than was allocated by the Data Length field or the sum of the
Scatter / Gather Data Length fields. */ * Scatter / Gather Data Length fields.
*/
case 0x13: /* Unexpected bus free-The target dropped the SCSI BSY at an unexpected time. */ case 0x13: /* Unexpected bus free-The target dropped the SCSI BSY at an unexpected time. */
case 0x15: /* MBO command was not 00, 01 or 02-The first byte of the CB was case 0x15: /* MBO command was not 00, 01 or 02-The first byte of the CB was
invalid. This usually indicates a software failure. */ * invalid. This usually indicates a software failure.
*/
case 0x16: /* Invalid CCB Operation Code-The first byte of the CCB was invalid. case 0x16: /* Invalid CCB Operation Code-The first byte of the CCB was invalid.
This usually indicates a software failure. */ * This usually indicates a software failure.
*/
case 0x17: /* Linked CCB does not have the same LUN-A subsequent CCB of a set case 0x17: /* Linked CCB does not have the same LUN-A subsequent CCB of a set
of linked CCB's does not specify the same logical unit number as * of linked CCB's does not specify the same logical unit number as
the first. */ * the first.
*/
case 0x18: /* Invalid Target Direction received from Host-The direction of a case 0x18: /* Invalid Target Direction received from Host-The direction of a
Target Mode CCB was invalid. */ * Target Mode CCB was invalid.
*/
case 0x19: /* Duplicate CCB Received in Target Mode-More than once CCB was case 0x19: /* Duplicate CCB Received in Target Mode-More than once CCB was
received to service data transfer between the same target LUN * received to service data transfer between the same target LUN
and initiator SCSI ID in the same direction. */ * and initiator SCSI ID in the same direction.
*/
case 0x1a: /* Invalid CCB or Segment List Parameter-A segment list with a zero case 0x1a: /* Invalid CCB or Segment List Parameter-A segment list with a zero
length segment or invalid segment list boundaries was received. * length segment or invalid segment list boundaries was received.
A CCB parameter was invalid. */ * A CCB parameter was invalid.
*/
#ifdef DEBUG #ifdef DEBUG
printk("Aha1542: %x %x\n", hosterr, scsierr); printk("Aha1542: %x %x\n", hosterr, scsierr);
#endif #endif
...@@ -178,9 +188,10 @@ static int makecode(unsigned hosterr, unsigned scsierr) ...@@ -178,9 +188,10 @@ static int makecode(unsigned hosterr, unsigned scsierr)
break; break;
case 0x14: /* Target bus phase sequence failure-An invalid bus phase or bus case 0x14: /* Target bus phase sequence failure-An invalid bus phase or bus
phase sequence was requested by the target. The host adapter * phase sequence was requested by the target. The host adapter
will generate a SCSI Reset Condition, notifying the host with * will generate a SCSI Reset Condition, notifying the host with
a SCRD interrupt */ * a SCRD interrupt
*/
hosterr = DID_RESET; hosterr = DID_RESET;
break; break;
default: default:
...@@ -216,8 +227,10 @@ static int aha1542_test_port(struct Scsi_Host *sh) ...@@ -216,8 +227,10 @@ static int aha1542_test_port(struct Scsi_Host *sh)
if (inb(INTRFLAGS(sh->io_port)) & INTRMASK) if (inb(INTRFLAGS(sh->io_port)) & INTRMASK)
return 0; return 0;
/* Perform a host adapter inquiry instead so we do not need to set /*
up the mailboxes ahead of time */ * Perform a host adapter inquiry instead so we do not need to set
* up the mailboxes ahead of time
*/
aha1542_outb(sh->io_port, CMD_INQUIRY); aha1542_outb(sh->io_port, CMD_INQUIRY);
...@@ -292,10 +305,12 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id) ...@@ -292,10 +305,12 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
while (1) { while (1) {
flag = inb(INTRFLAGS(sh->io_port)); flag = inb(INTRFLAGS(sh->io_port));
/* Check for unusual interrupts. If any of these happen, we should /*
probably do something special, but for now just printing a message * Check for unusual interrupts. If any of these happen, we should
is sufficient. A SCSI reset detected is something that we really * probably do something special, but for now just printing a message
need to deal with in some way. */ * is sufficient. A SCSI reset detected is something that we really
* need to deal with in some way.
*/
if (flag & ~MBIF) { if (flag & ~MBIF) {
if (flag & MBOA) if (flag & MBOA)
printk("MBOF "); printk("MBOF ");
...@@ -355,9 +370,11 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id) ...@@ -355,9 +370,11 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
} }
my_done = tmp_cmd->scsi_done; my_done = tmp_cmd->scsi_done;
aha1542_free_cmd(tmp_cmd); aha1542_free_cmd(tmp_cmd);
/* Fetch the sense data, and tuck it away, in the required slot. The /*
Adaptec automatically fetches it, and there is no guarantee that * Fetch the sense data, and tuck it away, in the required slot. The
we will still have it in the cdb when we come back */ * Adaptec automatically fetches it, and there is no guarantee that
* we will still have it in the cdb when we come back
*/
if (ccb[mbo].tarstat == 2) if (ccb[mbo].tarstat == 2)
memcpy(tmp_cmd->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen], memcpy(tmp_cmd->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen],
SCSI_SENSE_BUFFERSIZE); SCSI_SENSE_BUFFERSIZE);
...@@ -383,7 +400,8 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id) ...@@ -383,7 +400,8 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
#endif #endif
tmp_cmd->result = errstatus; tmp_cmd->result = errstatus;
aha1542->int_cmds[mbo] = NULL; /* This effectively frees up the mailbox slot, as aha1542->int_cmds[mbo] = NULL; /* This effectively frees up the mailbox slot, as
far as queuecommand is concerned */ * far as queuecommand is concerned
*/
my_done(tmp_cmd); my_done(tmp_cmd);
number_serviced++; number_serviced++;
}; };
...@@ -433,8 +451,10 @@ static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd) ...@@ -433,8 +451,10 @@ static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
goto out_free_chain; goto out_free_chain;
} }
/* Use the outgoing mailboxes in a round-robin fashion, because this /*
is how the host adapter will scan for them */ * Use the outgoing mailboxes in a round-robin fashion, because this
* is how the host adapter will scan for them
*/
spin_lock_irqsave(sh->host_lock, flags); spin_lock_irqsave(sh->host_lock, flags);
mbo = aha1542->aha1542_last_mbo_used + 1; mbo = aha1542->aha1542_last_mbo_used + 1;
...@@ -453,7 +473,8 @@ static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd) ...@@ -453,7 +473,8 @@ static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
panic("Unable to find empty mailbox for aha1542.\n"); panic("Unable to find empty mailbox for aha1542.\n");
aha1542->int_cmds[mbo] = cmd; /* This will effectively prevent someone else from aha1542->int_cmds[mbo] = cmd; /* This will effectively prevent someone else from
screwing with this cdb. */ * screwing with this cdb.
*/
aha1542->aha1542_last_mbo_used = mbo; aha1542->aha1542_last_mbo_used = mbo;
...@@ -565,8 +586,10 @@ static int aha1542_getconfig(struct Scsi_Host *sh) ...@@ -565,8 +586,10 @@ static int aha1542_getconfig(struct Scsi_Host *sh)
sh->dma_channel = 0; sh->dma_channel = 0;
break; break;
case 0: case 0:
/* This means that the adapter, although Adaptec 1542 compatible, doesn't use a DMA channel. /*
Currently only aware of the BusLogic BT-445S VL-Bus adapter which needs this. */ * This means that the adapter, although Adaptec 1542 compatible, doesn't use a DMA channel.
* Currently only aware of the BusLogic BT-445S VL-Bus adapter which needs this.
*/
sh->dma_channel = 0xFF; sh->dma_channel = 0xFF;
break; break;
default: default:
...@@ -600,8 +623,10 @@ static int aha1542_getconfig(struct Scsi_Host *sh) ...@@ -600,8 +623,10 @@ static int aha1542_getconfig(struct Scsi_Host *sh)
return 0; return 0;
} }
/* This function should only be called for 1542C boards - we can detect /*
the special firmware settings and unlock the board */ * This function should only be called for 1542C boards - we can detect
* the special firmware settings and unlock the board
*/
static int aha1542_mbenable(struct Scsi_Host *sh) static int aha1542_mbenable(struct Scsi_Host *sh)
{ {
...@@ -655,10 +680,11 @@ static int aha1542_query(struct Scsi_Host *sh) ...@@ -655,10 +680,11 @@ static int aha1542_query(struct Scsi_Host *sh)
aha1542->bios_translation = BIOS_TRANSLATION_6432; /* Default case */ aha1542->bios_translation = BIOS_TRANSLATION_6432; /* Default case */
/* For an AHA1740 series board, we ignore the board since there is a /*
hardware bug which can lead to wrong blocks being returned if the board * For an AHA1740 series board, we ignore the board since there is a
is operating in the 1542 emulation mode. Since there is an extended mode * hardware bug which can lead to wrong blocks being returned if the board
driver, we simply ignore the board and let the 1740 driver pick it up. * is operating in the 1542 emulation mode. Since there is an extended mode
* driver, we simply ignore the board and let the 1740 driver pick it up.
*/ */
if (inquiry_result[0] == 0x43) { if (inquiry_result[0] == 0x43) {
...@@ -666,8 +692,10 @@ static int aha1542_query(struct Scsi_Host *sh) ...@@ -666,8 +692,10 @@ static int aha1542_query(struct Scsi_Host *sh)
return 1; return 1;
}; };
/* Always call this - boards that do not support extended bios translation /*
will ignore the command, and we will set the proper default */ * Always call this - boards that do not support extended bios translation
* will ignore the command, and we will set the proper default
*/
aha1542->bios_translation = aha1542_mbenable(sh); aha1542->bios_translation = aha1542_mbenable(sh);
...@@ -877,8 +905,9 @@ static int aha1542_dev_reset(struct scsi_cmnd *cmd) ...@@ -877,8 +905,9 @@ static int aha1542_dev_reset(struct scsi_cmnd *cmd)
panic("Unable to find empty mailbox for aha1542.\n"); panic("Unable to find empty mailbox for aha1542.\n");
aha1542->int_cmds[mbo] = cmd; /* This will effectively aha1542->int_cmds[mbo] = cmd; /* This will effectively
prevent someone else from * prevent someone else from
screwing with this cdb. */ * screwing with this cdb.
*/
aha1542->aha1542_last_mbo_used = mbo; aha1542->aha1542_last_mbo_used = mbo;
...@@ -1063,8 +1092,10 @@ static int aha1542_pnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *i ...@@ -1063,8 +1092,10 @@ static int aha1542_pnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *i
io[indx] = pnp_port_start(pdev, 0); io[indx] = pnp_port_start(pdev, 0);
/* The card can be queried for its DMA, we have /*
the DMA set up that is enough */ * The card can be queried for its DMA, we have
* the DMA set up that is enough
*/
dev_info(&pdev->dev, "ISAPnP found an AHA1535 at I/O 0x%03X", io[indx]); dev_info(&pdev->dev, "ISAPnP found an AHA1535 at I/O 0x%03X", io[indx]);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment