svn commit: r365105 - in head/sys/dev/aic7xxx: . aicasm
Mateusz Guzik
mjg at FreeBSD.org
Tue Sep 1 21:37:18 UTC 2020
Author: mjg
Date: Tue Sep 1 21:37:14 2020
New Revision: 365105
URL: https://svnweb.freebsd.org/changeset/base/365105
Log:
aic7xxx: clean up empty lines in .c and .h files
Modified:
head/sys/dev/aic7xxx/ahc_isa.c
head/sys/dev/aic7xxx/ahc_pci.c
head/sys/dev/aic7xxx/ahd_pci.c
head/sys/dev/aic7xxx/aic7770.c
head/sys/dev/aic7xxx/aic79xx.c
head/sys/dev/aic7xxx/aic79xx_inline.h
head/sys/dev/aic7xxx/aic79xx_osm.c
head/sys/dev/aic7xxx/aic79xx_osm.h
head/sys/dev/aic7xxx/aic79xx_pci.c
head/sys/dev/aic7xxx/aic79xx_reg.h
head/sys/dev/aic7xxx/aic79xx_reg_print.c
head/sys/dev/aic7xxx/aic7xxx.c
head/sys/dev/aic7xxx/aic7xxx_inline.h
head/sys/dev/aic7xxx/aic7xxx_osm.c
head/sys/dev/aic7xxx/aic7xxx_pci.c
head/sys/dev/aic7xxx/aic7xxx_reg.h
head/sys/dev/aic7xxx/aic7xxx_reg_print.c
head/sys/dev/aic7xxx/aic_osm_lib.c
head/sys/dev/aic7xxx/aic_osm_lib.h
head/sys/dev/aic7xxx/aicasm/aicasm.c
head/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
Modified: head/sys/dev/aic7xxx/ahc_isa.c
==============================================================================
--- head/sys/dev/aic7xxx/ahc_isa.c Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/ahc_isa.c Tue Sep 1 21:37:14 2020 (r365105)
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include <sys/limits.h> /* For CHAR_BIT*/
#include <isa/isavar.h> /* For ISA attach glue */
-
static struct aic7770_identity *ahc_isa_find_device(bus_space_tag_t tag,
bus_space_handle_t bsh);
static void ahc_isa_identify(driver_t *driver,
Modified: head/sys/dev/aic7xxx/ahc_pci.c
==============================================================================
--- head/sys/dev/aic7xxx/ahc_pci.c Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/ahc_pci.c Tue Sep 1 21:37:14 2020 (r365105)
@@ -165,7 +165,6 @@ ahc_pci_map_registers(struct ahc_softc *ahc)
}
if (allow_memio != 0) {
-
regs_type = SYS_RES_MEMORY;
regs_id = AHC_PCI_MEMADDR;
regs = bus_alloc_resource_any(ahc->dev_softc, regs_type,
Modified: head/sys/dev/aic7xxx/ahd_pci.c
==============================================================================
--- head/sys/dev/aic7xxx/ahd_pci.c Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/ahd_pci.c Tue Sep 1 21:37:14 2020 (r365105)
@@ -165,7 +165,6 @@ ahd_pci_map_registers(struct ahd_softc *ahd)
if ((ahd->bugs & AHD_PCIX_MMAPIO_BUG) == 0
&& allow_memio != 0) {
-
regs_type = SYS_RES_MEMORY;
regs_id = AHD_PCI_MEMADDR;
regs = bus_alloc_resource_any(ahd->dev_softc, regs_type,
Modified: head/sys/dev/aic7xxx/aic7770.c
==============================================================================
--- head/sys/dev/aic7xxx/aic7770.c Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/aic7770.c Tue Sep 1 21:37:14 2020 (r365105)
@@ -323,7 +323,6 @@ aha2840_load_seeprom(struct ahc_softc *ahc)
/*start_addr*/0, sizeof(*sc)/2);
if (have_seeprom) {
-
if (ahc_verify_cksum(sc) == 0) {
if(bootverbose)
printf ("checksum error\n");
Modified: head/sys/dev/aic7xxx/aic79xx.c
==============================================================================
--- head/sys/dev/aic7xxx/aic79xx.c Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/aic79xx.c Tue Sep 1 21:37:14 2020 (r365105)
@@ -487,7 +487,6 @@ rescan_fifos:
* if this if for an SCB in the qinfifo.
*/
while (((ccscbctl = ahd_inb(ahd, CCSCBCTL)) & (CCARREN|CCSCBEN)) != 0) {
-
if ((ccscbctl & (CCSCBDIR|CCARREN)) == (CCSCBDIR|CCARREN)) {
if ((ccscbctl & ARRDONE) != 0)
break;
@@ -542,7 +541,6 @@ rescan_fifos:
scbid = ahd_inw(ahd, COMPLETE_ON_QFREEZE_HEAD);
while (!SCBID_IS_NULL(scbid)) {
-
ahd_set_scbptr(ahd, scbid);
next_scbid = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
scb = ahd_lookup_scb(ahd, scbid);
@@ -560,7 +558,6 @@ rescan_fifos:
scbid = ahd_inw(ahd, COMPLETE_SCB_HEAD);
while (!SCBID_IS_NULL(scbid)) {
-
ahd_set_scbptr(ahd, scbid);
next_scbid = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
scb = ahd_lookup_scb(ahd, scbid);
@@ -762,7 +759,6 @@ ahd_run_data_fifo(struct ahd_softc *ahd, struct scb *s
*/
if ((ahd_inb(ahd, DFSTATUS) & PRELOAD_AVAIL) != 0
&& (ahd_inb(ahd, DFCNTRL) & HDMAENACK) != 0) {
-
/*
* Determine the offset of the next S/G
* element to load.
@@ -819,7 +815,6 @@ ahd_run_data_fifo(struct ahd_softc *ahd, struct scb *s
ahd_outb(ahd, DFCNTRL, dfcntrl);
}
} else if ((ahd_inb(ahd, SG_CACHE_SHADOW) & LAST_SEG_DONE) != 0) {
-
/*
* Transfer completed to the end of SG list
* and has flushed to the host.
@@ -1582,24 +1577,20 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intsta
ahd_setup_iocell_workaround(ahd);
ahd_unpause(ahd);
} else if ((status0 & OVERRUN) != 0) {
-
printf("%s: SCSI offset overrun detected. Resetting bus.\n",
ahd_name(ahd));
AHD_CORRECTABLE_ERROR(ahd);
ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE);
} else if ((status & SCSIRSTI) != 0) {
-
printf("%s: Someone reset channel A\n", ahd_name(ahd));
ahd_reset_channel(ahd, 'A', /*Initiate Reset*/FALSE);
AHD_UNCORRECTABLE_ERROR(ahd);
} else if ((status & SCSIPERR) != 0) {
-
/* Make sure the sequencer is in a safe location. */
ahd_clear_critical_section(ahd);
ahd_handle_transmission_error(ahd);
} else if (lqostat0 != 0) {
-
printf("%s: lqostat0 == 0x%x!\n", ahd_name(ahd), lqostat0);
ahd_outb(ahd, CLRLQOINT0, lqostat0);
if ((ahd->bugs & AHD_CLRLQO_AUTOCLR_BUG) != 0)
@@ -1666,7 +1657,6 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intsta
ahd_iocell_first_selection(ahd);
ahd_unpause(ahd);
} else if ((status0 & (SELDI|SELDO)) != 0) {
-
ahd_iocell_first_selection(ahd);
ahd_unpause(ahd);
} else if (status3 != 0) {
@@ -1675,7 +1665,6 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intsta
AHD_CORRECTABLE_ERROR(ahd);
ahd_outb(ahd, CLRSINT3, status3);
} else if ((lqistat1 & (LQIPHASE_LQ|LQIPHASE_NLQ)) != 0) {
-
/* Make sure the sequencer is in a safe location. */
ahd_clear_critical_section(ahd);
@@ -1852,7 +1841,7 @@ ahd_handle_transmission_error(struct ahd_softc *ahd)
perrdiag = ahd_inb(ahd, PERRDIAG);
msg_out = MSG_INITIATOR_DET_ERR;
ahd_outb(ahd, CLRSINT1, CLRSCSIPERR);
-
+
/*
* Try to find the SCB associated with this error.
*/
@@ -1980,7 +1969,7 @@ ahd_handle_transmission_error(struct ahd_softc *ahd)
ahd_lookup_phase_entry(curphase)->phasemsg);
ahd_inb(ahd, SCSIDAT);
}
-
+
if (curphase == P_MESGIN)
msg_out = MSG_PARITY_ERROR;
}
@@ -2106,7 +2095,6 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int bu
waiting_h = ahd_inw(ahd, WAITING_TID_HEAD);
saved_scbptr = ahd_get_scbptr(ahd);
if (waiting_h != scbid) {
-
ahd_outw(ahd, WAITING_TID_HEAD, scbid);
waiting_t = ahd_inw(ahd, WAITING_TID_TAIL);
if (waiting_t == waiting_h) {
@@ -2378,7 +2366,6 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd)
} else if ((ahd->msg_flags & MSG_FLAG_EXPECT_IDE_BUSFREE) != 0
&& ahd_sent_msg(ahd, AHDMSG_1B,
MSG_INITIATOR_DET_ERR, TRUE)) {
-
#ifdef AHD_DEBUG
if ((ahd_debug & AHD_SHOW_MESSAGES) != 0)
printf("Expected IDE Busfree\n");
@@ -2387,7 +2374,6 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd)
} else if ((ahd->msg_flags & MSG_FLAG_EXPECT_QASREJ_BUSFREE)
&& ahd_sent_msg(ahd, AHDMSG_1B,
MSG_MESSAGE_REJECT, TRUE)) {
-
#ifdef AHD_DEBUG
if ((ahd_debug & AHD_SHOW_MESSAGES) != 0)
printf("Expected QAS Reject Busfree\n");
@@ -2404,7 +2390,6 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd)
if (printerror != 0
&& (lastphase == P_MESGIN || lastphase == P_MESGOUT)
&& ((ahd->msg_flags & MSG_FLAG_EXPECT_PPR_BUSFREE) != 0)) {
-
ahd_freeze_devq(ahd, scb);
aic_set_transaction_status(scb, CAM_REQUEUE_REQ);
aic_freeze_scb(scb);
@@ -2477,7 +2462,6 @@ ahd_handle_proto_violation(struct ahd_softc *ahd)
curphase = ahd_inb(ahd, SCSISIGI) & PHASE_MASK;
lastphase = ahd_inb(ahd, LASTPHASE);
if ((seq_flags & NOT_IDENTIFIED) != 0) {
-
/*
* The reconnecting target either did not send an
* identify message, or did, but we didn't find an SCB
@@ -2650,7 +2634,6 @@ ahd_clear_critical_section(struct ahd_softc *ahd)
seqaddr);
#endif
if (stepping == FALSE) {
-
first_instr = seqaddr;
ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
simode0 = ahd_inb(ahd, SIMODE0);
@@ -3116,7 +3099,6 @@ ahd_set_syncrate(struct ahd_softc *ahd, struct ahd_dev
&& (old_period != period
|| old_offset != offset
|| old_ppr != ppr_options)) {
-
update_needed++;
tinfo->curr.period = period;
@@ -3241,7 +3223,6 @@ ahd_set_width(struct ahd_softc *ahd, struct ahd_devinf
oldwidth = tinfo->curr.width;
if ((type & AHD_TRANS_CUR) != 0 && oldwidth != width) {
-
update_needed++;
tinfo->curr.width = width;
@@ -3307,7 +3288,6 @@ ahd_update_neg_table(struct ahd_softc *ahd, struct ahd
if (period == 0)
period = AHD_SYNCRATE_ASYNC;
if (period == AHD_SYNCRATE_160) {
-
if ((ahd->bugs & AHD_PACED_NEGTABLE_BUG) != 0) {
/*
* When the SPI4 spec was finalized, PACE transfers
@@ -3564,7 +3544,6 @@ ahd_scb_devinfo(struct ahd_softc *ahd, struct ahd_devi
SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahd, scb), role);
}
-
/************************ Message Phase Processing ****************************/
/*
* When an initiator transaction with the MK_MESSAGE flag either reconnects
@@ -3641,7 +3620,6 @@ ahd_setup_initiator_msgout(struct ahd_softc *ahd, stru
*/
ahd_outb(ahd, SCSISEQ0, 0);
} else if ((scb->flags & SCB_ABORT) != 0) {
-
if ((scb->hscb->control & TAG_ENB) != 0) {
ahd->msgout_buf[ahd->msgout_index++] = MSG_ABORT_TAG;
} else {
@@ -3772,7 +3750,6 @@ ahd_build_transfer_msg(struct ahd_softc *ahd, struct a
* messages that WDTR comes first.
*/
if (doppr || (dosync && !dowide)) {
-
offset = tinfo->goal.offset;
ahd_validate_offset(ahd, tinfo, period, &offset,
doppr ? tinfo->goal.width
@@ -4110,7 +4087,6 @@ reswitch:
msgout_request = FALSE;
if (msgout_request) {
-
/*
* Change gears and see if
* this messages is of interest to
@@ -4254,7 +4230,6 @@ ahd_sent_msg(struct ahd_softc *ahd, ahd_msgtype type,
end_index = index + 1 + ahd->msgout_buf[index + 1];
if (ahd->msgout_buf[index+2] == msgval
&& type == AHDMSG_EXT) {
-
if (full) {
if (ahd->msgout_index > end_index)
found = TRUE;
@@ -4264,7 +4239,6 @@ ahd_sent_msg(struct ahd_softc *ahd, ahd_msgtype type,
index = end_index;
} else if (ahd->msgout_buf[index] >= MSG_SIMPLE_TASK
&& ahd->msgout_buf[index] <= MSG_IGN_WIDE_RESIDUE) {
-
/* Skip tag type and tag id or residue param*/
index += 2;
} else {
@@ -4495,7 +4469,6 @@ ahd_parse_msg(struct ahd_softc *ahd, struct ahd_devinf
AHD_TRANS_ACTIVE|AHD_TRANS_GOAL,
/*paused*/TRUE);
if (sending_reply == FALSE && reject == FALSE) {
-
/*
* We will always have an SDTR to send.
*/
@@ -4768,7 +4741,6 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ah
ahd->msgout_index = 0;
response = 1;
} else if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_WDTR, /*full*/FALSE)) {
-
/* note 8bit xfers */
printf("(%s:%c:%d:%d): refuses WIDE negotiation. Using "
"8bit transfers\n", ahd_name(ahd),
@@ -4784,7 +4756,6 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ah
* sync rate before sending our WDTR.
*/
if (tinfo->goal.offset != tinfo->curr.offset) {
-
/* Start the sync negotiation */
ahd->msgout_index = 0;
ahd->msgout_len = 0;
@@ -4947,7 +4918,6 @@ ahd_handle_ign_wide_residue(struct ahd_softc *ahd, str
sglen = aic_le32toh(sg->len) & AHD_SG_LEN_MASK;
if (sg != scb->sg_list
&& sglen < (data_cnt & AHD_SG_LEN_MASK)) {
-
sg--;
sglen = aic_le32toh(sg->len);
/*
@@ -4980,7 +4950,6 @@ ahd_handle_ign_wide_residue(struct ahd_softc *ahd, str
sglen = aic_le32toh(sg->len) & AHD_SG_LEN_MASK;
if (sg != scb->sg_list
&& sglen < (data_cnt & AHD_SG_LEN_MASK)) {
-
sg--;
sglen = aic_le32toh(sg->len);
/*
@@ -5021,7 +4990,6 @@ ahd_handle_ign_wide_residue(struct ahd_softc *ahd, str
}
}
-
/*
* Reinitialize the data pointers for the active transfer
* based on its current residual.
@@ -5161,7 +5129,7 @@ ahd_handle_devreset(struct ahd_softc *ahd, struct ahd_
ahd_set_syncrate(ahd, devinfo, /*period*/0, /*offset*/0,
/*ppr_options*/0, AHD_TRANS_CUR,
/*paused*/TRUE);
-
+
if (status != CAM_SEL_TIMEOUT)
ahd_send_async(ahd, devinfo->channel, devinfo->target,
lun, AC_SENT_BDR, NULL);
@@ -5503,7 +5471,7 @@ ahd_reset(struct ahd_softc *ahd, int reinit)
u_int sxfrctl1;
int wait;
uint32_t cmd;
-
+
/*
* Preserve the value of the SXFRCTL1 register for all channels.
* It contains settings that affect termination and we don't want
@@ -5978,7 +5946,6 @@ look_again:
}
}
if ((scb = LIST_FIRST(&ahd->scb_data.any_dev_free_scb_list)) == NULL) {
-
if (tries++ != 0)
return (NULL);
if (ahd_alloc_scbs(ahd) == 0)
@@ -6010,14 +5977,12 @@ ahd_free_scb(struct ahd_softc *ahd, struct scb *scb)
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = NULL;
if (scb->col_scb == NULL) {
-
/*
* No collision possible. Just free normally.
*/
LIST_INSERT_HEAD(&ahd->scb_data.any_dev_free_scb_list,
scb, links.le);
} else if ((scb->col_scb->flags & SCB_ON_COL_LIST) != 0) {
-
/*
* The SCB we might have collided with is on
* a free collision list. Put both SCBs on
@@ -6031,7 +5996,6 @@ ahd_free_scb(struct ahd_softc *ahd, struct scb *scb)
} else if ((scb->col_scb->flags
& (SCB_PACKETIZED|SCB_ACTIVE)) == SCB_ACTIVE
&& (scb->col_scb->hscb->control & TAG_ENB) != 0) {
-
/*
* The SCB we might collide with on the next allocation
* is still active in a non-packetized, tagged, context.
@@ -7156,7 +7120,6 @@ ahd_pause_and_flushwork(struct ahd_softc *ahd)
ahd_outw(ahd, KERNEL_QFREEZE_COUNT, ahd->qfreeze_cnt);
ahd_outb(ahd, SEQ_FLAGS2, ahd_inb(ahd, SEQ_FLAGS2) | SELECTOUT_QFROZEN);
do {
-
ahd_unpause(ahd);
/*
* Give the sequencer some time to service
@@ -7317,7 +7280,7 @@ ahd_freeze_devq(struct ahd_softc *ahd, struct scb *scb
target = SCB_GET_TARGET(ahd, scb);
lun = SCB_GET_LUN(scb);
channel = SCB_GET_CHANNEL(ahd, scb);
-
+
ahd_search_qinfifo(ahd, target, channel, lun,
/*tag*/SCB_LIST_NULL, ROLE_UNKNOWN,
CAM_REQUEUE_REQ, SEARCH_COMPLETE);
@@ -7586,7 +7549,6 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target,
if (mk_msg_scb != NULL
&& ahd_match_scb(ahd, mk_msg_scb, target, channel,
lun, tag, role)) {
-
/*
* We found an scb that needs to be acted on.
*/
@@ -7630,7 +7592,6 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target,
&& SCBID_IS_NULL(tid_head)
&& ahd_match_scb(ahd, scb, target, channel, CAM_LUN_WILDCARD,
SCB_LIST_NULL, ROLE_UNKNOWN)) {
-
/*
* When removing the last SCB for a target
* queue with a pending MK_MESSAGE scb, we
@@ -7730,7 +7691,6 @@ ahd_stitch_tid_list(struct ahd_softc *ahd, u_int tid_p
AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
if (SCBID_IS_NULL(tid_cur)) {
-
/* Bypass current TID list */
if (SCBID_IS_NULL(tid_prev)) {
ahd_outw(ahd, WAITING_TID_HEAD, tid_next);
@@ -7741,7 +7701,6 @@ ahd_stitch_tid_list(struct ahd_softc *ahd, u_int tid_p
if (SCBID_IS_NULL(tid_next))
ahd_outw(ahd, WAITING_TID_TAIL, tid_prev);
} else {
-
/* Stitch through tid_cur */
if (SCBID_IS_NULL(tid_prev)) {
ahd_outw(ahd, WAITING_TID_HEAD, tid_cur);
@@ -8029,7 +7988,6 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel,
*/
max_scsiid = (ahd->features & AHD_WIDE) ? 15 : 7;
for (target = 0; target <= max_scsiid; target++) {
-
if (ahd->enabled_targets[target] == NULL)
continue;
for (initiator = 0; initiator <= max_scsiid; initiator++) {
@@ -8091,14 +8049,13 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel,
return (found);
}
-
#define AHD_RESET_POLL_MS 1
static void
ahd_reset_poll(void *arg)
{
struct ahd_softc *ahd = (struct ahd_softc *)arg;
u_int scsiseq1;
-
+
ahd_lock(ahd);
ahd_pause(ahd);
ahd_update_modes(ahd);
@@ -8128,7 +8085,7 @@ ahd_stat_timer(void *arg)
{
struct ahd_softc *ahd = (struct ahd_softc *)arg;
int enint_coal;
-
+
ahd_lock(ahd);
enint_coal = ahd->hs_mailbox & ENINT_COALESCE;
if (ahd->cmdcmplt_total > ahd->int_coalescing_threshold)
@@ -8238,7 +8195,6 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct s
if (scsi_4btoul(siu->pkt_failures_length) < 4) {
printf("Unable to parse pkt_failures\n");
} else {
-
switch (SIU_PKTFAIL_CODE(siu)) {
case SIU_PFC_NONE:
printf("No packet failure found\n");
@@ -8750,7 +8706,6 @@ ahd_loadseq(struct ahd_softc *ahd)
ahd->num_critical_sections = cs_count;
if (cs_count != 0) {
-
cs_count *= sizeof(struct cs);
ahd->critical_sections = malloc(cs_count, M_DEVBUF, M_NOWAIT);
if (ahd->critical_sections == NULL)
@@ -8779,9 +8734,7 @@ ahd_check_patch(struct ahd_softc *ahd, struct patch **
cur_patch = *start_patch;
while (cur_patch < last_patch && start_instr == cur_patch->begin) {
-
if (cur_patch->patch_func(ahd) == 0) {
-
/* Start rejecting code */
*skip_addr = start_instr + cur_patch->skip_instr;
cur_patch += cur_patch->skip_patch;
@@ -8815,7 +8768,6 @@ ahd_resolve_seqaddr(struct ahd_softc *ahd, u_int addre
skip_addr = 0;
for (i = 0; i < address;) {
-
ahd_check_patch(ahd, &cur_patch, i, &skip_addr);
if (skip_addr > i) {
@@ -9138,7 +9090,6 @@ ahd_dump_card_state(struct ahd_softc *ahd)
}
printf("\n");
-
printf("Sequencer DMA-Up and Complete list: ");
scb_index = ahd_inw(ahd, COMPLETE_DMA_SCB_HEAD);
i = 0;
@@ -9289,7 +9240,6 @@ ahd_dump_scbs(struct ahd_softc *ahd)
ahd_restore_modes(ahd, saved_modes);
}
-
/*************************** Timeout Handling *********************************/
void
ahd_timeout(struct scb *scb)
@@ -9403,9 +9353,7 @@ bus_reset:
scb->flags &= ~SCB_TIMEDOUT;
if (active_scb != NULL) {
-
if (active_scb != scb) {
-
/*
* If the active SCB is not us, assume that
* the active SCB has a longer timeout than
@@ -9448,7 +9396,6 @@ bus_reset:
SCB_GET_TAG(scb),
ROLE_INITIATOR, /*status*/0,
SEARCH_COUNT) > 0) {
-
/*
* We haven't even gone out on the bus
* yet, so the timeout must be due to
@@ -9527,14 +9474,13 @@ bus_reset:
break;
}
}
-
+
/*
* Any remaining SCBs were not the "culprit", so remove
* them from the timeout list. The timer for these commands
* will be reset once the recovery SCB completes.
*/
while ((scb = LIST_FIRST(&ahd->timedout_scbs)) != NULL) {
-
LIST_REMOVE(scb, timedout_links);
scb->flags &= ~SCB_TIMEDOUT;
}
@@ -9617,7 +9563,6 @@ ahd_read_seeprom(struct ahd_softc *ahd, uint16_t *buf,
AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
end_addr = start_addr + count;
for (cur_addr = start_addr; cur_addr < end_addr; cur_addr++) {
-
ahd_outb(ahd, SEEADR, cur_addr);
ahd_outb(ahd, SEECTL, SEEOP_READ | SEESTART);
@@ -10160,7 +10105,6 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_si
}
}
} else {
-
ahd->black_hole = NULL;
/*
@@ -10245,7 +10189,6 @@ ahd_run_tqinfifo(struct ahd_softc *ahd, int paused)
ahd_sync_tqinfifo(ahd, BUS_DMASYNC_POSTREAD);
while ((cmd = &ahd->targetcmds[ahd->tqinfifonext])->cmd_valid != 0) {
-
/*
* Only advance through the queue if we
* have the resources to process the command.
@@ -10364,7 +10307,7 @@ ahd_handle_target_cmd(struct ahd_softc *ahd, struct ta
printf("Reserved or VU command code type encountered\n");
break;
}
-
+
memcpy(atio->cdb_io.cdb_bytes, byte, atio->cdb_len);
atio->ccb_h.status |= CAM_CDB_RECVD;
Modified: head/sys/dev/aic7xxx/aic79xx_inline.h
==============================================================================
--- head/sys/dev/aic7xxx/aic79xx_inline.h Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/aic79xx_inline.h Tue Sep 1 21:37:14 2020 (r365105)
@@ -969,7 +969,6 @@ ahd_intr(struct ahd_softc *ahd)
} else if ((intstat & (PCIINT|SPLTINT)) != 0) {
ahd->bus_intr(ahd);
} else {
-
if ((intstat & SEQINT) != 0)
ahd_handle_seqint(ahd, intstat);
Modified: head/sys/dev/aic7xxx/aic79xx_osm.c
==============================================================================
--- head/sys/dev/aic7xxx/aic79xx_osm.c Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/aic79xx_osm.c Tue Sep 1 21:37:14 2020 (r365105)
@@ -257,7 +257,7 @@ ahd_attach(struct ahd_softc *ahd)
sim = NULL;
goto fail;
}
-
+
if (xpt_create_path(&path, /*periph*/NULL,
cam_sim_path(sim), CAM_TARGET_WILDCARD,
CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
@@ -287,7 +287,6 @@ fail:
ahd_intr_enable(ahd, TRUE);
}
-
return (count);
}
@@ -349,7 +348,6 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
ccb_path = ccb->ccb_h.path;
if (ahd->pending_device != NULL
&& xpt_path_comp(ahd->pending_device->path, ccb_path) == 0) {
-
if ((ccb->ccb_h.flags & CAM_SEND_STATUS) != 0) {
ahd->pending_device = NULL;
} else {
@@ -385,7 +383,6 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
*/
LIST_FOREACH(list_scb,
&ahd->pending_scbs, pending_links) {
-
aic_scb_timer_reset(list_scb,
aic_get_timeout(scb));
}
@@ -461,12 +458,12 @@ ahd_action(struct cam_sim *sim, union ccb *ccb)
u_int our_id;
CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("ahd_action\n"));
-
+
ahd = (struct ahd_softc *)cam_sim_softc(sim);
target_id = ccb->ccb_h.target_id;
our_id = SIM_SCSI_ID(ahd, sim);
-
+
switch (ccb->ccb_h.func_code) {
/* Common cases first */
#ifdef AHD_TARGET_MODE
@@ -491,7 +488,6 @@ ahd_action(struct cam_sim *sim, union ccb *ccb)
}
}
if (ccb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO) {
-
SLIST_INSERT_HEAD(&lstate->accept_tios, &ccb->ccb_h,
sim_links.sle);
ccb->ccb_h.status = CAM_REQ_INPROG;
@@ -541,7 +537,6 @@ ahd_action(struct cam_sim *sim, union ccb *ccb)
ccb->ccb_h.target_lun);
}
if ((scb = ahd_get_scb(ahd, col_idx)) == NULL) {
-
xpt_freeze_simq(sim, /*count*/1);
ahd->flags |= AHD_RESOURCE_SHORTAGE;
ccb->ccb_h.status = CAM_REQUEUE_REQ;
@@ -721,7 +716,6 @@ ahd_action(struct cam_sim *sim, union ccb *ccb)
}
}
-
static void
ahd_set_tran_settings(struct ahd_softc *ahd, int our_id, char channel,
struct ccb_trans_settings *cts)
@@ -764,14 +758,14 @@ ahd_set_tran_settings(struct ahd_softc *ahd, int our_i
cts->ccb_h.status = CAM_REQ_INVALID;
return;
}
-
+
if ((spi->valid & CTS_SPI_VALID_DISC) != 0) {
if ((spi->flags & CTS_SPI_FLAGS_DISC_ENB) != 0)
*discenable |= devinfo.target_mask;
else
*discenable &= ~devinfo.target_mask;
}
-
+
if ((scsi->valid & CTS_SCSI_VALID_TQ) != 0) {
if ((scsi->flags & CTS_SCSI_FLAGS_TAG_ENB) != 0)
*tagenable |= devinfo.target_mask;
@@ -858,12 +852,12 @@ ahd_get_tran_settings(struct ahd_softc *ahd, int our_i
targ_info = ahd_fetch_transinfo(ahd, devinfo.channel,
devinfo.our_scsiid,
devinfo.target, &tstate);
-
+
if (cts->type == CTS_TYPE_CURRENT_SETTINGS)
tinfo = &targ_info->curr;
else
tinfo = &targ_info->user;
-
+
scsi->flags &= ~CTS_SCSI_FLAGS_TAG_ENB;
spi->flags &= ~CTS_SPI_FLAGS_DISC_ENB;
if (cts->type == CTS_TYPE_USER_SETTINGS) {
@@ -886,7 +880,7 @@ ahd_get_tran_settings(struct ahd_softc *ahd, int our_i
spi->sync_offset = tinfo->offset;
spi->bus_width = tinfo->width;
spi->ppr_options = tinfo->ppr_options;
-
+
cts->protocol = PROTO_SCSI;
cts->transport = XPORT_SPI;
spi->valid = CTS_SPI_VALID_SYNC_RATE
@@ -973,7 +967,6 @@ ahd_execute_scb(void *arg, bus_dma_segment_t *dm_segs,
/* Copy the segments into our SG list */
for (i = nsegments, sg = scb->sg_list; i > 0; i--) {
-
sg = ahd_sg_setup(ahd, scb, sg, dm_segs->ds_addr,
dm_segs->ds_len,
/*last*/i == 1);
@@ -1072,19 +1065,17 @@ ahd_setup_data(struct ahd_softc *ahd, struct cam_sim *
struct hardware_scb *hscb;
struct ccb_hdr *ccb_h;
int error;
-
+
hscb = scb->hscb;
ccb_h = &csio->ccb_h;
-
+
csio->resid = 0;
csio->sense_resid = 0;
if (ccb_h->func_code == XPT_SCSI_IO) {
hscb->cdb_len = csio->cdb_len;
if ((ccb_h->flags & CAM_CDB_POINTER) != 0) {
-
if (hscb->cdb_len > MAX_CDB_LEN
&& (ccb_h->flags & CAM_CDB_PHYS) == 0) {
-
/*
* Should CAM start to support CDB sizes
* greater than 16 bytes, we could use
@@ -1109,7 +1100,6 @@ ahd_setup_data(struct ahd_softc *ahd, struct cam_sim *
}
} else {
if (hscb->cdb_len > MAX_CDB_LEN) {
-
aic_set_transaction_status(scb,
CAM_REQ_INVALID);
ahd_free_scb(ahd, scb);
@@ -1240,7 +1230,7 @@ ahd_send_async(struct ahd_softc *ahd, char channel, u_
case AC_TRANSFER_NEG:
{
struct ccb_trans_settings_scsi *scsi;
-
+
cts.type = CTS_TYPE_CURRENT_SETTINGS;
scsi = &cts.proto_specific.scsi;
cts.ccb_h.path = path;
@@ -1440,7 +1430,7 @@ DB_COMMAND(ahd_in, ahd_ddb_in)
{
int c;
int size;
-
+
if (ahd_ddb_softc == NULL) {
db_error("Must set unit with ahd_sunit first!\n");
return;
@@ -1487,7 +1477,7 @@ DB_FUNC(ahd_out, ahd_ddb_out, db_cmd_table, CS_MORE, N
db_expr_t old_value;
db_expr_t new_value;
int size;
-
+
if (ahd_ddb_softc == NULL) {
db_error("Must set unit with ahd_sunit first!\n");
return;
@@ -1508,7 +1498,7 @@ DB_FUNC(ahd_out, ahd_ddb_out, db_cmd_table, CS_MORE, N
db_error("Unknown size\n");
return;
}
-
+
while (db_expression(&new_value)) {
switch (size) {
default:
@@ -1543,7 +1533,6 @@ DB_COMMAND(ahd_dump, ahd_ddb_dump)
}
#endif
-
DECLARE_MODULE(ahd, ahd_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE);
MODULE_DEPEND(ahd, cam, 1, 1, 1);
Modified: head/sys/dev/aic7xxx/aic79xx_osm.h
==============================================================================
--- head/sys/dev/aic7xxx/aic79xx_osm.h Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/aic79xx_osm.h Tue Sep 1 21:37:14 2020 (r365105)
@@ -257,7 +257,6 @@ void ahd_sysctl(struct ahd_softc *ahd);
int ahd_detach(device_t);
#define ahd_platform_init(arg)
-
/****************************** Interrupts ************************************/
void ahd_platform_intr(void *);
static __inline void ahd_platform_flushwork(struct ahd_softc *ahd);
Modified: head/sys/dev/aic7xxx/aic79xx_pci.c
==============================================================================
--- head/sys/dev/aic7xxx/aic79xx_pci.c Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/aic79xx_pci.c Tue Sep 1 21:37:14 2020 (r365105)
@@ -404,7 +404,7 @@ ahd_pci_config(struct ahd_softc *ahd, struct ahd_pci_i
aic_pci_write_config(ahd->dev_softc, DEVCONFIG,
devconfig, /*bytes*/4);
}
-
+
/* Ensure busmastering is enabled */
command = aic_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/2);
command |= PCIM_CMD_BUSMASTEREN;
@@ -529,7 +529,6 @@ ahd_pci_test_register_access(struct ahd_softc *ahd)
fail:
if ((ahd_inb(ahd, INTSTAT) & PCIINT) != 0) {
-
ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
targpcistat = ahd_inb(ahd, TARGPCISTAT);
@@ -699,7 +698,7 @@ ahd_configure_termination(struct ahd_softc *ahd, u_int
printf("%s: STPWLEVEL is %s\n",
ahd_name(ahd), (devconfig & STPWLEVEL) ? "on" : "off");
aic_pci_write_config(ahd->dev_softc, DEVCONFIG, devconfig, /*bytes*/4);
-
+
/* Make sure current sensing is off. */
if ((ahd->flags & AHD_CURRENT_SENSING) != 0) {
(void)ahd_write_flexport(ahd, FLXADDR_ROMSTAT_CURSENSECTL, 0);
@@ -836,7 +835,7 @@ ahd_pci_intr(struct ahd_softc *ahd)
u_int intstat;
u_int i;
u_int reg;
-
+
intstat = ahd_inb(ahd, INTSTAT);
if ((intstat & SPLTINT) != 0)
@@ -850,7 +849,6 @@ ahd_pci_intr(struct ahd_softc *ahd)
ahd_dump_card_state(ahd);
ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
for (i = 0, reg = DF0PCISTAT; i < 8; i++, reg++) {
-
if (i == 5)
continue;
pci_status[i] = ahd_inb(ahd, reg);
@@ -860,12 +858,11 @@ ahd_pci_intr(struct ahd_softc *ahd)
for (i = 0; i < 8; i++) {
u_int bit;
-
+
if (i == 5)
continue;
for (bit = 0; bit < 8; bit++) {
-
if ((pci_status[i] & (0x1 << bit)) != 0) {
static const char *s;
@@ -926,7 +923,6 @@ ahd_pci_split_intr(struct ahd_softc *ahd, u_int intsta
u_int bit;
for (bit = 0; bit < 8; bit++) {
-
if ((split_status[i] & (0x1 << bit)) != 0) {
static const char *s;
Modified: head/sys/dev/aic7xxx/aic79xx_reg.h
==============================================================================
--- head/sys/dev/aic7xxx/aic79xx_reg.h Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/aic79xx_reg.h Tue Sep 1 21:37:14 2020 (r365105)
@@ -2380,7 +2380,6 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
ahd_print_register(NULL, 0, "SCB_DISCONNECTED_LISTS", 0x1b8, regvalue, cur_col, wrap)
#endif
-
#define MODE_PTR 0x00
#define DST_MODE 0x70
#define SRC_MODE 0x07
@@ -3749,7 +3748,6 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define SCB_DISCONNECTED_LISTS 0x1b8
-
#define STATUS_QUEUE_FULL 0x28
#define WRTBIASCTL_HP_DEFAULT 0x00
#define NUMDSPS 0x14
@@ -3808,7 +3806,6 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define AHD_SLEWRATE_SHIFT 0x03
#define B_CURRFIFO_0 0x02
-
/* Downloaded Constant Definitions */
#define SG_SIZEOF 0x04
#define CACHELINE_MASK 0x07
@@ -3819,7 +3816,6 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define SG_PREFETCH_CNT_LIMIT 0x01
#define PKT_OVERRUN_BUFOFFSET 0x05
#define DOWNLOAD_CONST_COUNT 0x08
-
/* Exported Labels */
#define LABEL_seq_isr 0x28f
Modified: head/sys/dev/aic7xxx/aic79xx_reg_print.c
==============================================================================
--- head/sys/dev/aic7xxx/aic79xx_reg_print.c Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/aic79xx_reg_print.c Tue Sep 1 21:37:14 2020 (r365105)
@@ -3671,4 +3671,3 @@ ahd_scb_disconnected_lists_print(u_int regvalue, u_int
return (ahd_print_register(NULL, 0, "SCB_DISCONNECTED_LISTS",
0x1b8, regvalue, cur_col, wrap));
}
-
Modified: head/sys/dev/aic7xxx/aic7xxx.c
==============================================================================
--- head/sys/dev/aic7xxx/aic7xxx.c Tue Sep 1 21:36:40 2020 (r365104)
+++ head/sys/dev/aic7xxx/aic7xxx.c Tue Sep 1 21:37:14 2020 (r365105)
@@ -319,7 +319,6 @@ ahc_run_qoutfifo(struct ahc_softc *ahc)
ahc_sync_qoutfifo(ahc, BUS_DMASYNC_POSTREAD);
while (ahc->qoutfifo[ahc->qoutfifonext] != SCB_LIST_NULL) {
-
scb_index = ahc->qoutfifo[ahc->qoutfifonext];
if ((ahc->qoutfifonext & 0x03) == 0x03) {
u_int modnext;
@@ -421,7 +420,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat
{
struct scb *scb;
struct ahc_devinfo devinfo;
-
+
ahc_fetch_devinfo(ahc, &devinfo);
/*
@@ -760,7 +759,6 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat
*/
if ((intstat & SCSIINT) == 0
&& (ahc_inb(ahc, SSTAT1) & SCSIPERR) != 0) {
-
if ((ahc->features & AHC_DT) == 0) {
u_int curphase;
@@ -845,7 +843,6 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat
aic_get_transfer_length(scb), scb->sg_count);
if (scb->sg_count > 0) {
for (i = 0; i < scb->sg_count; i++) {
-
printf("sg[%d] - Addr 0x%x%x : Length %d\n",
i,
(aic_le32toh(scb->sg_list[i].len) >> 24
@@ -1471,7 +1468,6 @@ ahc_clear_critical_section(struct ahc_softc *ahc)
steps++;
if (stepping == FALSE) {
-
/*
* Disable all interrupt sources so that the
* sequencer will not be stuck by a pausing
@@ -1717,11 +1713,10 @@ ahc_find_syncrate(struct ahc_softc *ahc, u_int *period
if ((*ppr_options & MSG_EXT_PPR_DT_REQ) == 0
&& maxsync < AHC_SYNCRATE_ULTRA2)
maxsync = AHC_SYNCRATE_ULTRA2;
-
+
for (syncrate = &ahc_syncrates[maxsync];
syncrate->rate != NULL;
syncrate++) {
-
/*
* The Ultra2 table doesn't go as low
* as for the Fast/Ultra cards.
@@ -1783,7 +1778,6 @@ ahc_find_period(struct ahc_softc *ahc, u_int scsirate,
syncrate = &ahc_syncrates[maxsync];
while (syncrate->rate != NULL) {
-
if ((ahc->features & AHC_ULTRA2) != 0) {
if (syncrate->sxfr_u2 == 0)
break;
@@ -1955,7 +1949,6 @@ ahc_set_syncrate(struct ahc_softc *ahc, struct ahc_dev
update_needed++;
scsirate = tinfo->scsirate;
if ((ahc->features & AHC_ULTRA2) != 0) {
-
scsirate &= ~(SXFR_ULTRA2|SINGLE_EDGE|ENABLE_CRC);
if (syncrate != NULL) {
scsirate |= syncrate->sxfr_u2;
@@ -1965,7 +1958,6 @@ ahc_set_syncrate(struct ahc_softc *ahc, struct ahc_dev
scsirate |= SINGLE_EDGE;
}
} else {
-
scsirate &= ~(SXFR|SOFS);
/*
* Ensure Ultra mode is set properly for
@@ -2268,7 +2260,6 @@ ahc_scb_devinfo(struct ahc_softc *ahc, struct ahc_devi
SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahc, scb), role);
}
-
/************************ Message Phase Processing ****************************/
static void
ahc_assert_atn(struct ahc_softc *ahc)
@@ -2450,7 +2441,6 @@ ahc_build_transfer_msg(struct ahc_softc *ahc, struct a
* messages that WDTR comes first.
*/
if (doppr || (dosync && !dowide)) {
-
offset = tinfo->goal.offset;
ahc_validate_offset(ahc, tinfo, rate, &offset,
doppr ? tinfo->goal.width
@@ -2577,7 +2567,6 @@ ahc_handle_proto_violation(struct ahc_softc *ahc)
curphase = ahc_inb(ahc, SCSISIGI) & PHASE_MASK;
lastphase = ahc_inb(ahc, LASTPHASE);
if ((seq_flags & NOT_IDENTIFIED) != 0) {
-
/*
* The reconnecting target either did not send an
* identify message, or did, but we didn't find an SCB
@@ -2848,7 +2837,6 @@ reswitch:
*/
if ((ahc_inb(ahc, SCSISIGI) & ATNI) != 0
&& ahc->msgout_index > 0) {
-
/*
* Change gears and see if this messages is
* of interest to us or should be passed back
@@ -3047,7 +3035,6 @@ ahc_sent_msg(struct ahc_softc *ahc, ahc_msgtype type,
end_index = index + 1 + ahc->msgout_buf[index + 1];
if (ahc->msgout_buf[index+2] == msgval
&& type == AHCMSG_EXT) {
-
if (full) {
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-all
mailing list