scsi: aic7xxx: aic79xx: Whitespace cleanup
Link: https://lore.kernel.org/r/20210113090500.129644-7-hare@suse.de Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
bcd5c59f21
commit
7662d92374
@ -211,7 +211,7 @@ typedef enum {
|
||||
*/
|
||||
typedef enum {
|
||||
AHD_FENONE = 0x00000,
|
||||
AHD_WIDE = 0x00001,/* Wide Channel */
|
||||
AHD_WIDE = 0x00001,/* Wide Channel */
|
||||
AHD_AIC79XXB_SLOWCRC = 0x00002,/* SLOWCRC bit should be set */
|
||||
AHD_MULTI_FUNC = 0x00100,/* Multi-Function/Channel Device */
|
||||
AHD_TARGETMODE = 0x01000,/* Has tested target mode support */
|
||||
@ -608,9 +608,9 @@ struct scb {
|
||||
struct ahd_softc *ahd_softc;
|
||||
scb_flag flags;
|
||||
struct scb_platform_data *platform_data;
|
||||
struct map_node *hscb_map;
|
||||
struct map_node *sg_map;
|
||||
struct map_node *sense_map;
|
||||
struct map_node *hscb_map;
|
||||
struct map_node *sg_map;
|
||||
struct map_node *sense_map;
|
||||
void *sg_list;
|
||||
uint8_t *sense_data;
|
||||
dma_addr_t sg_list_busaddr;
|
||||
@ -810,8 +810,8 @@ struct ahd_tmode_tstate {
|
||||
* to parity errors in each phase table.
|
||||
*/
|
||||
struct ahd_phase_table_entry {
|
||||
uint8_t phase;
|
||||
uint8_t mesg_out; /* Message response to parity errors */
|
||||
uint8_t phase;
|
||||
uint8_t mesg_out; /* Message response to parity errors */
|
||||
const char *phasemsg;
|
||||
};
|
||||
|
||||
@ -941,7 +941,7 @@ struct vpd_config {
|
||||
#define FLX_ROMSTAT_EE_2MBx8 0x2
|
||||
#define FLX_ROMSTAT_EE_4MBx8 0x3
|
||||
#define FLX_ROMSTAT_EE_16MBx8 0x4
|
||||
#define CURSENSE_ENB 0x1
|
||||
#define CURSENSE_ENB 0x1
|
||||
#define FLXADDR_FLEXSTAT 0x2
|
||||
#define FLX_FSTAT_BUSY 0x1
|
||||
#define FLXADDR_CURRENT_STAT 0x4
|
||||
@ -1051,8 +1051,8 @@ struct ahd_completion
|
||||
};
|
||||
|
||||
struct ahd_softc {
|
||||
bus_space_tag_t tags[2];
|
||||
bus_space_handle_t bshs[2];
|
||||
bus_space_tag_t tags[2];
|
||||
bus_space_handle_t bshs[2];
|
||||
struct scb_data scb_data;
|
||||
|
||||
struct hardware_scb *next_queued_hscb;
|
||||
@ -1243,7 +1243,7 @@ struct ahd_softc {
|
||||
u_int int_coalescing_threshold;
|
||||
u_int int_coalescing_stop_threshold;
|
||||
|
||||
uint16_t user_discenable;/* Disconnection allowed */
|
||||
uint16_t user_discenable;/* Disconnection allowed */
|
||||
uint16_t user_tagenable;/* Tagged Queuing allowed */
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ static const char *const ahd_chip_names[] =
|
||||
* Hardware error codes.
|
||||
*/
|
||||
struct ahd_hard_error_entry {
|
||||
uint8_t errno;
|
||||
uint8_t errno;
|
||||
const char *errmesg;
|
||||
};
|
||||
|
||||
@ -113,7 +113,7 @@ static void ahd_free_tstate(struct ahd_softc *ahd,
|
||||
u_int scsi_id, char channel, int force);
|
||||
#endif
|
||||
static void ahd_devlimited_syncrate(struct ahd_softc *ahd,
|
||||
struct ahd_initiator_tinfo *,
|
||||
struct ahd_initiator_tinfo *,
|
||||
u_int *period,
|
||||
u_int *ppr_options,
|
||||
role_t role);
|
||||
@ -268,7 +268,7 @@ static void ahd_run_tqinfifo(struct ahd_softc *ahd, int paused);
|
||||
static void ahd_handle_hwerrint(struct ahd_softc *ahd);
|
||||
static void ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat);
|
||||
static void ahd_handle_scsiint(struct ahd_softc *ahd,
|
||||
u_int intstat);
|
||||
u_int intstat);
|
||||
|
||||
/************************ Sequencer Execution Control *************************/
|
||||
void
|
||||
@ -2094,8 +2094,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
|
||||
ahd->msg_type =
|
||||
MSG_TYPE_TARGET_MSGOUT;
|
||||
ahd->msgin_index = 0;
|
||||
}
|
||||
else
|
||||
} else
|
||||
ahd_setup_target_msgin(ahd,
|
||||
&devinfo,
|
||||
scb);
|
||||
@ -2701,7 +2700,7 @@ ahd_handle_transmission_error(struct ahd_softc *ahd)
|
||||
silent = FALSE;
|
||||
if (lqistat1 == 0
|
||||
|| (lqistat1 & LQICRCI_NLQ) != 0) {
|
||||
if ((lqistat1 & (LQICRCI_NLQ|LQIOVERI_NLQ)) != 0)
|
||||
if ((lqistat1 & (LQICRCI_NLQ|LQIOVERI_NLQ)) != 0)
|
||||
ahd_set_active_fifo(ahd);
|
||||
scbid = ahd_get_scbptr(ahd);
|
||||
scb = ahd_lookup_scb(ahd, scbid);
|
||||
@ -3446,7 +3445,6 @@ ahd_clear_critical_section(struct ahd_softc *ahd)
|
||||
|
||||
cs = ahd->critical_sections;
|
||||
for (i = 0; i < ahd->num_critical_sections; i++, cs++) {
|
||||
|
||||
if (cs->begin < seqaddr && cs->end >= seqaddr)
|
||||
break;
|
||||
}
|
||||
@ -3472,8 +3470,8 @@ ahd_clear_critical_section(struct ahd_softc *ahd)
|
||||
if (stepping == FALSE) {
|
||||
|
||||
first_instr = seqaddr;
|
||||
ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
|
||||
simode0 = ahd_inb(ahd, SIMODE0);
|
||||
ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
|
||||
simode0 = ahd_inb(ahd, SIMODE0);
|
||||
simode3 = ahd_inb(ahd, SIMODE3);
|
||||
lqimode0 = ahd_inb(ahd, LQIMODE0);
|
||||
lqimode1 = ahd_inb(ahd, LQIMODE1);
|
||||
@ -3515,7 +3513,7 @@ ahd_clear_critical_section(struct ahd_softc *ahd)
|
||||
ahd_outb(ahd, LQOMODE1, lqomode1);
|
||||
ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
|
||||
ahd_outb(ahd, SEQCTL0, ahd_inb(ahd, SEQCTL0) & ~STEP);
|
||||
ahd_outb(ahd, SIMODE1, simode1);
|
||||
ahd_outb(ahd, SIMODE1, simode1);
|
||||
/*
|
||||
* SCSIINT seems to glitch occasionally when
|
||||
* the interrupt masks are restored. Clear SCSIINT
|
||||
@ -3553,7 +3551,7 @@ ahd_clear_intstat(struct ahd_softc *ahd)
|
||||
ahd_outb(ahd, CLRSINT1, CLRSELTIMEO|CLRATNO|CLRSCSIRSTI
|
||||
|CLRBUSFREE|CLRSCSIPERR|CLRREQINIT);
|
||||
ahd_outb(ahd, CLRSINT0, CLRSELDO|CLRSELDI|CLRSELINGO
|
||||
|CLRIOERR|CLROVERRUN);
|
||||
|CLRIOERR|CLROVERRUN);
|
||||
ahd_outb(ahd, CLRINT, CLRSCSIINT);
|
||||
}
|
||||
|
||||
@ -5607,7 +5605,7 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
|
||||
*/
|
||||
ahd_outb(ahd, SCB_CONTROL,
|
||||
ahd_inb_scbram(ahd, SCB_CONTROL) & mask);
|
||||
scb->hscb->control &= mask;
|
||||
scb->hscb->control &= mask;
|
||||
ahd_set_transaction_tag(scb, /*enabled*/FALSE,
|
||||
/*type*/MSG_SIMPLE_TASK);
|
||||
ahd_outb(ahd, MSG_OUT, MSG_IDENTIFYFLAG);
|
||||
@ -9380,7 +9378,7 @@ ahd_loadseq(struct ahd_softc *ahd)
|
||||
if (begin_set[cs_count] == TRUE
|
||||
&& end_set[cs_count] == FALSE) {
|
||||
cs_table[cs_count].end = downloaded;
|
||||
end_set[cs_count] = TRUE;
|
||||
end_set[cs_count] = TRUE;
|
||||
cs_count++;
|
||||
}
|
||||
continue;
|
||||
@ -9768,7 +9766,6 @@ ahd_dump_card_state(struct ahd_softc *ahd)
|
||||
}
|
||||
printk("\n");
|
||||
|
||||
|
||||
printk("Sequencer DMA-Up and Complete list: ");
|
||||
scb_index = ahd_inw(ahd, COMPLETE_DMA_SCB_HEAD);
|
||||
i = 0;
|
||||
@ -10106,7 +10103,7 @@ ahd_acquire_seeprom(struct ahd_softc *ahd)
|
||||
|
||||
error = ahd_read_flexport(ahd, FLXADDR_ROMSTAT_CURSENSECTL, &seetype);
|
||||
if (error != 0
|
||||
|| ((seetype & FLX_ROMSTAT_SEECFG) == FLX_ROMSTAT_SEE_NONE))
|
||||
|| ((seetype & FLX_ROMSTAT_SEECFG) == FLX_ROMSTAT_SEE_NONE))
|
||||
return (0);
|
||||
return (1);
|
||||
#endif
|
||||
@ -10248,7 +10245,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb)
|
||||
our_id = ahd->our_id;
|
||||
if (ccb->ccb_h.target_id != our_id) {
|
||||
if ((ahd->features & AHD_MULTI_TID) != 0
|
||||
&& (ahd->flags & AHD_INITIATORROLE) != 0) {
|
||||
&& (ahd->flags & AHD_INITIATORROLE) != 0) {
|
||||
/*
|
||||
* Only allow additional targets if
|
||||
* the initiator role is disabled.
|
||||
|
@ -344,7 +344,7 @@ struct ahd_platform_data {
|
||||
|
||||
spinlock_t spin_lock;
|
||||
struct completion *eh_done;
|
||||
struct Scsi_Host *host; /* pointer to scsi host */
|
||||
struct Scsi_Host *host; /* pointer to scsi host */
|
||||
#define AHD_LINUX_NOIRQ ((uint32_t)~0)
|
||||
uint32_t irq; /* IRQ for this adapter */
|
||||
uint32_t bios_address;
|
||||
@ -655,9 +655,9 @@ static inline void
|
||||
ahd_freeze_scb(struct scb *scb)
|
||||
{
|
||||
if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) {
|
||||
scb->io_ctx->result |= CAM_DEV_QFRZN << 16;
|
||||
scb->platform_data->dev->qfrozen++;
|
||||
}
|
||||
scb->io_ctx->result |= CAM_DEV_QFRZN << 16;
|
||||
scb->platform_data->dev->qfrozen++;
|
||||
}
|
||||
}
|
||||
|
||||
void ahd_platform_set_tags(struct ahd_softc *ahd, struct scsi_device *sdev,
|
||||
|
@ -45,8 +45,8 @@
|
||||
|
||||
/* Define the macro locally since it's different for different class of chips.
|
||||
*/
|
||||
#define ID(x) \
|
||||
ID2C(x), \
|
||||
#define ID(x) \
|
||||
ID2C(x), \
|
||||
ID2C(IDIROC(x))
|
||||
|
||||
static const struct pci_device_id ahd_linux_pci_id_table[] = {
|
||||
|
@ -100,17 +100,17 @@ ahd_format_transinfo(struct seq_file *m, struct ahd_transinfo *tinfo)
|
||||
seq_puts(m, "Renegotiation Pending\n");
|
||||
return;
|
||||
}
|
||||
speed = 3300;
|
||||
freq = 0;
|
||||
speed = 3300;
|
||||
freq = 0;
|
||||
if (tinfo->offset != 0) {
|
||||
freq = ahd_calc_syncsrate(tinfo->period);
|
||||
speed = freq;
|
||||
}
|
||||
speed *= (0x01 << tinfo->width);
|
||||
mb = speed / 1000;
|
||||
if (mb > 0)
|
||||
mb = speed / 1000;
|
||||
if (mb > 0)
|
||||
seq_printf(m, "%d.%03dMB/s transfers", mb, speed % 1000);
|
||||
else
|
||||
else
|
||||
seq_printf(m, "%dKB/s transfers", speed);
|
||||
|
||||
if (freq != 0) {
|
||||
@ -242,7 +242,8 @@ ahd_proc_write_seeprom(struct Scsi_Host *shost, char *buffer, int length)
|
||||
u_int start_addr;
|
||||
|
||||
if (ahd->seep_config == NULL) {
|
||||
ahd->seep_config = kmalloc(sizeof(*ahd->seep_config), GFP_ATOMIC);
|
||||
ahd->seep_config = kmalloc(sizeof(*ahd->seep_config),
|
||||
GFP_ATOMIC);
|
||||
if (ahd->seep_config == NULL) {
|
||||
printk("aic79xx: Unable to allocate serial "
|
||||
"eeprom buffer. Write failing\n");
|
||||
|
@ -73,8 +73,8 @@
|
||||
* add other 93Cx6 functions.
|
||||
*/
|
||||
struct seeprom_cmd {
|
||||
uint8_t len;
|
||||
uint8_t bits[11];
|
||||
uint8_t len;
|
||||
uint8_t bits[11];
|
||||
};
|
||||
|
||||
/* Short opcodes for the c46 */
|
||||
|
@ -66,7 +66,7 @@ static const char *const ahc_chip_names[] = {
|
||||
* Hardware error codes.
|
||||
*/
|
||||
struct ahc_hard_error_entry {
|
||||
uint8_t errno;
|
||||
uint8_t errno;
|
||||
const char *errmesg;
|
||||
};
|
||||
|
||||
@ -142,7 +142,7 @@ static void ahc_free_tstate(struct ahc_softc *ahc,
|
||||
#endif
|
||||
static const struct ahc_syncrate*
|
||||
ahc_devlimited_syncrate(struct ahc_softc *ahc,
|
||||
struct ahc_initiator_tinfo *,
|
||||
struct ahc_initiator_tinfo *,
|
||||
u_int *period,
|
||||
u_int *ppr_options,
|
||||
role_t role);
|
||||
@ -1118,7 +1118,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
|
||||
* phases occur.
|
||||
*/
|
||||
if (ahc_get_residual(scb)
|
||||
== ahc_get_transfer_length(scb)) {
|
||||
== ahc_get_transfer_length(scb)) {
|
||||
ahc_update_neg_request(ahc, &devinfo,
|
||||
tstate, targ_info,
|
||||
AHC_NEG_IF_NON_ASYNC);
|
||||
@ -1286,8 +1286,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
|
||||
ahc->msg_type =
|
||||
MSG_TYPE_TARGET_MSGOUT;
|
||||
ahc->msgin_index = 0;
|
||||
}
|
||||
else
|
||||
} else
|
||||
ahc_setup_target_msgin(ahc,
|
||||
&devinfo,
|
||||
scb);
|
||||
@ -1391,7 +1390,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
|
||||
printk("data overrun detected %s."
|
||||
" Tag == 0x%x.\n",
|
||||
ahc_phase_table[i].phasemsg,
|
||||
scb->hscb->tag);
|
||||
scb->hscb->tag);
|
||||
ahc_print_path(ahc, scb);
|
||||
printk("%s seen Data Phase. Length = %ld. NumSGs = %d.\n",
|
||||
ahc_inb(ahc, SEQ_FLAGS) & DPHASE ? "Have" : "Haven't",
|
||||
@ -1402,7 +1401,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
|
||||
printk("sg[%d] - Addr 0x%x%x : Length %d\n",
|
||||
i,
|
||||
(ahc_le32toh(scb->sg_list[i].len) >> 24
|
||||
& SG_HIGH_ADDR_BITS),
|
||||
& SG_HIGH_ADDR_BITS),
|
||||
ahc_le32toh(scb->sg_list[i].addr),
|
||||
ahc_le32toh(scb->sg_list[i].len)
|
||||
& AHC_SG_LEN_MASK);
|
||||
@ -1549,7 +1548,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat)
|
||||
if (status == 0 && status0 == 0) {
|
||||
if ((ahc->features & AHC_TWIN) != 0) {
|
||||
/* Try the other channel */
|
||||
ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) ^ SELBUSB);
|
||||
ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) ^ SELBUSB);
|
||||
status = ahc_inb(ahc, SSTAT1)
|
||||
& (SELTO|SCSIRSTI|BUSFREE|SCSIPERR);
|
||||
intr_channel = (cur_channel == 'A') ? 'B' : 'A';
|
||||
@ -1595,7 +1594,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat)
|
||||
printk("%s: Someone reset channel %c\n",
|
||||
ahc_name(ahc), intr_channel);
|
||||
if (intr_channel != cur_channel)
|
||||
ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) ^ SELBUSB);
|
||||
ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) ^ SELBUSB);
|
||||
ahc_reset_channel(ahc, intr_channel, /*Initiate Reset*/FALSE);
|
||||
} else if ((status & SCSIPERR) != 0) {
|
||||
/*
|
||||
@ -1994,7 +1993,6 @@ ahc_clear_critical_section(struct ahc_softc *ahc)
|
||||
seqaddr -= 1;
|
||||
cs = ahc->critical_sections;
|
||||
for (i = 0; i < ahc->num_critical_sections; i++, cs++) {
|
||||
|
||||
if (cs->begin < seqaddr && cs->end >= seqaddr)
|
||||
break;
|
||||
}
|
||||
@ -2064,7 +2062,7 @@ ahc_clear_intstat(struct ahc_softc *ahc)
|
||||
CLRREQINIT);
|
||||
ahc_flush_device_writes(ahc);
|
||||
ahc_outb(ahc, CLRSINT0, CLRSELDO|CLRSELDI|CLRSELINGO);
|
||||
ahc_flush_device_writes(ahc);
|
||||
ahc_flush_device_writes(ahc);
|
||||
ahc_outb(ahc, CLRINT, CLRSCSIINT);
|
||||
ahc_flush_device_writes(ahc);
|
||||
}
|
||||
@ -2101,7 +2099,7 @@ ahc_print_scb(struct scb *scb)
|
||||
printk("sg[%d] - Addr 0x%x%x : Length %d\n",
|
||||
i,
|
||||
(ahc_le32toh(scb->sg_list[i].len) >> 24
|
||||
& SG_HIGH_ADDR_BITS),
|
||||
& SG_HIGH_ADDR_BITS),
|
||||
ahc_le32toh(scb->sg_list[i].addr),
|
||||
ahc_le32toh(scb->sg_list[i].len));
|
||||
}
|
||||
@ -2655,9 +2653,9 @@ ahc_set_tags(struct ahc_softc *ahc, struct scsi_cmnd *cmd,
|
||||
{
|
||||
struct scsi_device *sdev = cmd->device;
|
||||
|
||||
ahc_platform_set_tags(ahc, sdev, devinfo, alg);
|
||||
ahc_send_async(ahc, devinfo->channel, devinfo->target,
|
||||
devinfo->lun, AC_TRANSFER_NEG);
|
||||
ahc_platform_set_tags(ahc, sdev, devinfo, alg);
|
||||
ahc_send_async(ahc, devinfo->channel, devinfo->target,
|
||||
devinfo->lun, AC_TRANSFER_NEG);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2756,9 +2754,9 @@ ahc_fetch_devinfo(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
|
||||
role = ROLE_INITIATOR;
|
||||
|
||||
if (role == ROLE_TARGET
|
||||
&& (ahc->features & AHC_MULTI_TID) != 0
|
||||
&& (ahc_inb(ahc, SEQ_FLAGS)
|
||||
& (CMDPHASE_PENDING|TARG_CMD_PENDING|NO_DISCONNECT)) != 0) {
|
||||
&& (ahc->features & AHC_MULTI_TID) != 0
|
||||
&& (ahc_inb(ahc, SEQ_FLAGS)
|
||||
& (CMDPHASE_PENDING|TARG_CMD_PENDING|NO_DISCONNECT)) != 0) {
|
||||
/* We were selected, so pull our id from TARGIDIN */
|
||||
our_id = ahc_inb(ahc, TARGIDIN) & OID;
|
||||
} else if ((ahc->features & AHC_ULTRA2) != 0)
|
||||
@ -5004,7 +5002,7 @@ ahc_controller_info(struct ahc_softc *ahc, char *buf)
|
||||
len = sprintf(buf, "%s: ", ahc_chip_names[ahc->chip & AHC_CHIPID_MASK]);
|
||||
buf += len;
|
||||
if ((ahc->features & AHC_TWIN) != 0)
|
||||
len = sprintf(buf, "Twin Channel, A SCSI Id=%d, "
|
||||
len = sprintf(buf, "Twin Channel, A SCSI Id=%d, "
|
||||
"B SCSI Id=%d, primary %c, ",
|
||||
ahc->our_id, ahc->our_id_b,
|
||||
(ahc->flags & AHC_PRIMARY_CHANNEL) + 'A');
|
||||
@ -5494,7 +5492,7 @@ ahc_init(struct ahc_softc *ahc)
|
||||
&& (ultraenb & mask) != 0) {
|
||||
/* Treat 10MHz as a non-ultra speed */
|
||||
scsirate &= ~SXFR;
|
||||
ultraenb &= ~mask;
|
||||
ultraenb &= ~mask;
|
||||
}
|
||||
tinfo->user.period =
|
||||
ahc_find_period(ahc, scsirate,
|
||||
@ -5989,7 +5987,6 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel,
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
prev = next;
|
||||
next = ahc_inb(ahc, SCB_NEXT);
|
||||
}
|
||||
@ -6857,7 +6854,7 @@ ahc_loadseq(struct ahc_softc *ahc)
|
||||
if (begin_set[cs_count] == TRUE
|
||||
&& end_set[cs_count] == FALSE) {
|
||||
cs_table[cs_count].end = downloaded;
|
||||
end_set[cs_count] = TRUE;
|
||||
end_set[cs_count] = TRUE;
|
||||
cs_count++;
|
||||
}
|
||||
continue;
|
||||
@ -7085,7 +7082,6 @@ ahc_print_register(const ahc_reg_parse_entry_t *table, u_int num_entries,
|
||||
printed_mask == 0 ? ":(" : "|",
|
||||
table[entry].name);
|
||||
printed_mask |= table[entry].mask;
|
||||
|
||||
break;
|
||||
}
|
||||
if (entry >= num_entries)
|
||||
@ -7376,7 +7372,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
|
||||
if ((ahc->features & AHC_MULTIROLE) != 0) {
|
||||
|
||||
if ((ahc->features & AHC_MULTI_TID) != 0
|
||||
&& (ahc->flags & AHC_INITIATORROLE) != 0) {
|
||||
&& (ahc->flags & AHC_INITIATORROLE) != 0) {
|
||||
/*
|
||||
* Only allow additional targets if
|
||||
* the initiator role is disabled.
|
||||
@ -7527,7 +7523,6 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
|
||||
targid_mask |= target_mask;
|
||||
ahc_outb(ahc, TARGID, targid_mask);
|
||||
ahc_outb(ahc, TARGID+1, (targid_mask >> 8));
|
||||
|
||||
ahc_update_scsiid(ahc, targid_mask);
|
||||
} else {
|
||||
u_int our_id;
|
||||
@ -7651,7 +7646,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
|
||||
targid_mask &= ~target_mask;
|
||||
ahc_outb(ahc, TARGID, targid_mask);
|
||||
ahc_outb(ahc, TARGID+1,
|
||||
(targid_mask >> 8));
|
||||
(targid_mask >> 8));
|
||||
ahc_update_scsiid(ahc, targid_mask);
|
||||
}
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ ahc_insb(struct ahc_softc * ahc, long port, uint8_t *array, int count)
|
||||
static void ahc_linux_unmap_scb(struct ahc_softc*, struct scb*);
|
||||
|
||||
static int ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
|
||||
struct ahc_dma_seg *sg,
|
||||
struct ahc_dma_seg *sg,
|
||||
dma_addr_t addr, bus_size_t len);
|
||||
|
||||
static void
|
||||
@ -1219,8 +1219,8 @@ ahc_platform_free(struct ahc_softc *ahc)
|
||||
starget = ahc->platform_data->starget[i];
|
||||
if (starget != NULL) {
|
||||
ahc->platform_data->starget[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ahc->platform_data->irq != AHC_LINUX_NOIRQ)
|
||||
free_irq(ahc->platform_data->irq, ahc);
|
||||
@ -1647,22 +1647,22 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
|
||||
spi_display_xfer_agreement(starget);
|
||||
break;
|
||||
}
|
||||
case AC_SENT_BDR:
|
||||
case AC_SENT_BDR:
|
||||
{
|
||||
WARN_ON(lun != CAM_LUN_WILDCARD);
|
||||
scsi_report_device_reset(ahc->platform_data->host,
|
||||
channel - 'A', target);
|
||||
break;
|
||||
}
|
||||
case AC_BUS_RESET:
|
||||
case AC_BUS_RESET:
|
||||
if (ahc->platform_data->host != NULL) {
|
||||
scsi_report_bus_reset(ahc->platform_data->host,
|
||||
channel - 'A');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
panic("ahc_send_async: Unexpected async event");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
panic("ahc_send_async: Unexpected async event");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2108,7 +2108,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
|
||||
|
||||
/* Any SCB for this device will do for a target reset */
|
||||
LIST_FOREACH(pending_scb, &ahc->pending_scbs, pending_links) {
|
||||
if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd),
|
||||
if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd),
|
||||
scmd_channel(cmd) + 'A',
|
||||
CAM_LUN_WILDCARD,
|
||||
SCB_LIST_NULL, ROLE_INITIATOR))
|
||||
@ -2361,7 +2361,8 @@ static void ahc_linux_set_period(struct scsi_target *starget, int period)
|
||||
ppr_options &= MSG_EXT_PPR_QAS_REQ;
|
||||
}
|
||||
|
||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
|
||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,
|
||||
AHC_SYNCRATE_DT);
|
||||
ahc_lock(ahc, &flags);
|
||||
ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset,
|
||||
ppr_options, AHC_TRANS_GOAL, FALSE);
|
||||
@ -2386,7 +2387,8 @@ static void ahc_linux_set_offset(struct scsi_target *starget, int offset)
|
||||
ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
|
||||
starget->channel + 'A', ROLE_INITIATOR);
|
||||
if (offset != 0) {
|
||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
|
||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,
|
||||
AHC_SYNCRATE_DT);
|
||||
period = tinfo->goal.period;
|
||||
ppr_options = tinfo->goal.ppr_options;
|
||||
}
|
||||
@ -2422,7 +2424,8 @@ static void ahc_linux_set_dt(struct scsi_target *starget, int dt)
|
||||
|
||||
ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
|
||||
starget->channel + 'A', ROLE_INITIATOR);
|
||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT);
|
||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,
|
||||
AHC_SYNCRATE_DT);
|
||||
ahc_lock(ahc, &flags);
|
||||
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
|
||||
ppr_options, AHC_TRANS_GOAL, FALSE);
|
||||
@ -2455,7 +2458,8 @@ static void ahc_linux_set_qas(struct scsi_target *starget, int qas)
|
||||
|
||||
ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
|
||||
starget->channel + 'A', ROLE_INITIATOR);
|
||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
|
||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,
|
||||
AHC_SYNCRATE_DT);
|
||||
ahc_lock(ahc, &flags);
|
||||
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
|
||||
ppr_options, AHC_TRANS_GOAL, FALSE);
|
||||
@ -2483,7 +2487,8 @@ static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
|
||||
|
||||
ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
|
||||
starget->channel + 'A', ROLE_INITIATOR);
|
||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
|
||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,
|
||||
AHC_SYNCRATE_DT);
|
||||
ahc_lock(ahc, &flags);
|
||||
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
|
||||
ppr_options, AHC_TRANS_GOAL, FALSE);
|
||||
|
@ -356,11 +356,11 @@ struct ahc_platform_data {
|
||||
spinlock_t spin_lock;
|
||||
u_int qfrozen;
|
||||
struct completion *eh_done;
|
||||
struct Scsi_Host *host; /* pointer to scsi host */
|
||||
struct Scsi_Host *host; /* pointer to scsi host */
|
||||
#define AHC_LINUX_NOIRQ ((uint32_t)~0)
|
||||
uint32_t irq; /* IRQ for this adapter */
|
||||
uint32_t bios_address;
|
||||
resource_size_t mem_busaddr; /* Mem Base Addr */
|
||||
resource_size_t mem_busaddr; /* Mem Base Addr */
|
||||
};
|
||||
|
||||
void ahc_delay(long);
|
||||
@ -671,9 +671,9 @@ static inline void
|
||||
ahc_freeze_scb(struct scb *scb)
|
||||
{
|
||||
if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) {
|
||||
scb->io_ctx->result |= CAM_DEV_QFRZN << 16;
|
||||
scb->platform_data->dev->qfrozen++;
|
||||
}
|
||||
scb->io_ctx->result |= CAM_DEV_QFRZN << 16;
|
||||
scb->platform_data->dev->qfrozen++;
|
||||
}
|
||||
}
|
||||
|
||||
void ahc_platform_set_tags(struct ahc_softc *ahc, struct scsi_device *sdev,
|
||||
|
@ -97,17 +97,17 @@ ahc_format_transinfo(struct seq_file *m, struct ahc_transinfo *tinfo)
|
||||
u_int freq;
|
||||
u_int mb;
|
||||
|
||||
speed = 3300;
|
||||
freq = 0;
|
||||
speed = 3300;
|
||||
freq = 0;
|
||||
if (tinfo->offset != 0) {
|
||||
freq = ahc_calc_syncsrate(tinfo->period);
|
||||
speed = freq;
|
||||
}
|
||||
speed *= (0x01 << tinfo->width);
|
||||
mb = speed / 1000;
|
||||
if (mb > 0)
|
||||
mb = speed / 1000;
|
||||
if (mb > 0)
|
||||
seq_printf(m, "%d.%03dMB/s transfers", mb, speed % 1000);
|
||||
else
|
||||
else
|
||||
seq_printf(m, "%dKB/s transfers", speed);
|
||||
|
||||
if (freq != 0) {
|
||||
@ -255,7 +255,8 @@ ahc_proc_write_seeprom(struct Scsi_Host *shost, char *buffer, int length)
|
||||
u_int start_addr;
|
||||
|
||||
if (ahc->seep_config == NULL) {
|
||||
ahc->seep_config = kmalloc(sizeof(*ahc->seep_config), GFP_ATOMIC);
|
||||
ahc->seep_config = kmalloc(sizeof(*ahc->seep_config),
|
||||
GFP_ATOMIC);
|
||||
if (ahc->seep_config == NULL) {
|
||||
printk("aic7xxx: Unable to allocate serial "
|
||||
"eeprom buffer. Write failing\n");
|
||||
|
Loading…
Reference in New Issue
Block a user