[SCSI] aic7xxx: Remove OS utility wrappers
This patch removes malloc(), free(), and printf() wrappers from the aic7xxx SCSI driver. I didn't use pr_debug for printf because of some 'clever' uses of printf don't compile with the pr_debug. I didn't fix the overeager uses of GFP_ATOMIC either because I wanted to keep this patch as simple as possible. [jejb:fixed up checkpatch errors and fixed up missed conversion] Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
Родитель
660bdddb52
Коммит
48813cf989
|
@ -170,7 +170,7 @@ aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io)
|
|||
case 15:
|
||||
break;
|
||||
default:
|
||||
printf("aic7770_config: invalid irq setting %d\n", intdef);
|
||||
printk("aic7770_config: invalid irq setting %d\n", intdef);
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io)
|
|||
break;
|
||||
}
|
||||
if (have_seeprom == 0) {
|
||||
free(ahc->seep_config, M_DEVBUF);
|
||||
kfree(ahc->seep_config);
|
||||
ahc->seep_config = NULL;
|
||||
}
|
||||
|
||||
|
@ -293,7 +293,7 @@ aha2840_load_seeprom(struct ahc_softc *ahc)
|
|||
sc = ahc->seep_config;
|
||||
|
||||
if (bootverbose)
|
||||
printf("%s: Reading SEEPROM...", ahc_name(ahc));
|
||||
printk("%s: Reading SEEPROM...", ahc_name(ahc));
|
||||
have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)sc,
|
||||
/*start_addr*/0, sizeof(*sc)/2);
|
||||
|
||||
|
@ -301,16 +301,16 @@ aha2840_load_seeprom(struct ahc_softc *ahc)
|
|||
|
||||
if (ahc_verify_cksum(sc) == 0) {
|
||||
if(bootverbose)
|
||||
printf ("checksum error\n");
|
||||
printk ("checksum error\n");
|
||||
have_seeprom = 0;
|
||||
} else if (bootverbose) {
|
||||
printf("done.\n");
|
||||
printk("done.\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (!have_seeprom) {
|
||||
if (bootverbose)
|
||||
printf("%s: No SEEPROM available\n", ahc_name(ahc));
|
||||
printk("%s: No SEEPROM available\n", ahc_name(ahc));
|
||||
ahc->flags |= AHC_USEDEFAULTS;
|
||||
} else {
|
||||
/*
|
||||
|
|
|
@ -85,7 +85,7 @@ aic7770_probe(struct device *dev)
|
|||
int error;
|
||||
|
||||
sprintf(buf, "ahc_eisa:%d", eisaBase >> 12);
|
||||
name = malloc(strlen(buf) + 1, M_DEVBUF, M_NOWAIT);
|
||||
name = kmalloc(strlen(buf) + 1, GFP_ATOMIC);
|
||||
if (name == NULL)
|
||||
return (ENOMEM);
|
||||
strcpy(name, buf);
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -674,7 +674,7 @@ ahd_linux_slave_alloc(struct scsi_device *sdev)
|
|||
struct ahd_linux_device *dev;
|
||||
|
||||
if (bootverbose)
|
||||
printf("%s: Slave Alloc %d\n", ahd_name(ahd), sdev->id);
|
||||
printk("%s: Slave Alloc %d\n", ahd_name(ahd), sdev->id);
|
||||
|
||||
dev = scsi_transport_device_data(sdev);
|
||||
memset(dev, 0, sizeof(*dev));
|
||||
|
@ -798,10 +798,10 @@ ahd_linux_dev_reset(struct scsi_cmnd *cmd)
|
|||
scmd_printk(KERN_INFO, cmd,
|
||||
"Attempting to queue a TARGET RESET message:");
|
||||
|
||||
printf("CDB:");
|
||||
printk("CDB:");
|
||||
for (cdb_byte = 0; cdb_byte < cmd->cmd_len; cdb_byte++)
|
||||
printf(" 0x%x", cmd->cmnd[cdb_byte]);
|
||||
printf("\n");
|
||||
printk(" 0x%x", cmd->cmnd[cdb_byte]);
|
||||
printk("\n");
|
||||
|
||||
/*
|
||||
* Determine if we currently own this command.
|
||||
|
@ -857,16 +857,16 @@ ahd_linux_dev_reset(struct scsi_cmnd *cmd)
|
|||
ahd->platform_data->eh_done = &done;
|
||||
ahd_unlock(ahd, &flags);
|
||||
|
||||
printf("%s: Device reset code sleeping\n", ahd_name(ahd));
|
||||
printk("%s: Device reset code sleeping\n", ahd_name(ahd));
|
||||
if (!wait_for_completion_timeout(&done, 5 * HZ)) {
|
||||
ahd_lock(ahd, &flags);
|
||||
ahd->platform_data->eh_done = NULL;
|
||||
ahd_unlock(ahd, &flags);
|
||||
printf("%s: Device reset timer expired (active %d)\n",
|
||||
printk("%s: Device reset timer expired (active %d)\n",
|
||||
ahd_name(ahd), dev->active);
|
||||
retval = FAILED;
|
||||
}
|
||||
printf("%s: Device reset returning 0x%x\n", ahd_name(ahd), retval);
|
||||
printk("%s: Device reset returning 0x%x\n", ahd_name(ahd), retval);
|
||||
|
||||
return (retval);
|
||||
}
|
||||
|
@ -884,7 +884,7 @@ ahd_linux_bus_reset(struct scsi_cmnd *cmd)
|
|||
ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
|
||||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_RECOVERY) != 0)
|
||||
printf("%s: Bus reset called for cmd %p\n",
|
||||
printk("%s: Bus reset called for cmd %p\n",
|
||||
ahd_name(ahd), cmd);
|
||||
#endif
|
||||
ahd_lock(ahd, &flags);
|
||||
|
@ -894,7 +894,7 @@ ahd_linux_bus_reset(struct scsi_cmnd *cmd)
|
|||
ahd_unlock(ahd, &flags);
|
||||
|
||||
if (bootverbose)
|
||||
printf("%s: SCSI bus reset delivered. "
|
||||
printk("%s: SCSI bus reset delivered. "
|
||||
"%d SCBs aborted.\n", ahd_name(ahd), found);
|
||||
|
||||
return (SUCCESS);
|
||||
|
@ -935,7 +935,7 @@ ahd_dma_tag_create(struct ahd_softc *ahd, bus_dma_tag_t parent,
|
|||
{
|
||||
bus_dma_tag_t dmat;
|
||||
|
||||
dmat = malloc(sizeof(*dmat), M_DEVBUF, M_NOWAIT);
|
||||
dmat = kmalloc(sizeof(*dmat), GFP_ATOMIC);
|
||||
if (dmat == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
|
@ -956,7 +956,7 @@ ahd_dma_tag_create(struct ahd_softc *ahd, bus_dma_tag_t parent,
|
|||
void
|
||||
ahd_dma_tag_destroy(struct ahd_softc *ahd, bus_dma_tag_t dmat)
|
||||
{
|
||||
free(dmat, M_DEVBUF);
|
||||
kfree(dmat);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1019,7 +1019,7 @@ ahd_linux_setup_iocell_info(u_long index, int instance, int targ, int32_t value)
|
|||
iocell_info = (uint8_t*)&aic79xx_iocell_info[instance];
|
||||
iocell_info[index] = value & 0xFFFF;
|
||||
if (bootverbose)
|
||||
printf("iocell[%d:%ld] = %d\n", instance, index, value);
|
||||
printk("iocell[%d:%ld] = %d\n", instance, index, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1029,7 +1029,7 @@ ahd_linux_setup_tag_info_global(char *p)
|
|||
int tags, i, j;
|
||||
|
||||
tags = simple_strtoul(p + 1, NULL, 0) & 0xff;
|
||||
printf("Setting Global Tags= %d\n", tags);
|
||||
printk("Setting Global Tags= %d\n", tags);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(aic79xx_tag_info); i++) {
|
||||
for (j = 0; j < AHD_NUM_TARGETS; j++) {
|
||||
|
@ -1047,7 +1047,7 @@ ahd_linux_setup_tag_info(u_long arg, int instance, int targ, int32_t value)
|
|||
&& (targ < AHD_NUM_TARGETS)) {
|
||||
aic79xx_tag_info[instance].tag_commands[targ] = value & 0x1FF;
|
||||
if (bootverbose)
|
||||
printf("tag_info[%d:%d] = %d\n", instance, targ, value);
|
||||
printk("tag_info[%d:%d] = %d\n", instance, targ, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ ahd_parse_brace_option(char *opt_name, char *opt_arg, char *end, int depth,
|
|||
if (targ == -1)
|
||||
targ = 0;
|
||||
} else {
|
||||
printf("Malformed Option %s\n",
|
||||
printk("Malformed Option %s\n",
|
||||
opt_name);
|
||||
done = TRUE;
|
||||
}
|
||||
|
@ -1246,7 +1246,7 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa
|
|||
ahd_set_unit(ahd, ahd_linux_unit++);
|
||||
ahd_unlock(ahd, &s);
|
||||
sprintf(buf, "scsi%d", host->host_no);
|
||||
new_name = malloc(strlen(buf) + 1, M_DEVBUF, M_NOWAIT);
|
||||
new_name = kmalloc(strlen(buf) + 1, GFP_ATOMIC);
|
||||
if (new_name != NULL) {
|
||||
strcpy(new_name, buf);
|
||||
ahd_set_name(ahd, new_name);
|
||||
|
@ -1322,7 +1322,7 @@ int
|
|||
ahd_platform_alloc(struct ahd_softc *ahd, void *platform_arg)
|
||||
{
|
||||
ahd->platform_data =
|
||||
malloc(sizeof(struct ahd_platform_data), M_DEVBUF, M_NOWAIT);
|
||||
kmalloc(sizeof(struct ahd_platform_data), GFP_ATOMIC);
|
||||
if (ahd->platform_data == NULL)
|
||||
return (ENOMEM);
|
||||
memset(ahd->platform_data, 0, sizeof(struct ahd_platform_data));
|
||||
|
@ -1364,7 +1364,7 @@ ahd_platform_free(struct ahd_softc *ahd)
|
|||
if (ahd->platform_data->host)
|
||||
scsi_host_put(ahd->platform_data->host);
|
||||
|
||||
free(ahd->platform_data, M_DEVBUF);
|
||||
kfree(ahd->platform_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1502,7 +1502,7 @@ ahd_linux_user_tagdepth(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
|
|||
if (ahd->unit >= ARRAY_SIZE(aic79xx_tag_info)) {
|
||||
|
||||
if (warned_user == 0) {
|
||||
printf(KERN_WARNING
|
||||
printk(KERN_WARNING
|
||||
"aic79xx: WARNING: Insufficient tag_info instances\n"
|
||||
"aic79xx: for installed controllers. Using defaults\n"
|
||||
"aic79xx: Please update the aic79xx_tag_info array in\n"
|
||||
|
@ -1544,7 +1544,7 @@ ahd_linux_device_queue_depth(struct scsi_device *sdev)
|
|||
ahd_send_async(ahd, devinfo.channel, devinfo.target,
|
||||
devinfo.lun, AC_TRANSFER_NEG);
|
||||
ahd_print_devinfo(ahd, &devinfo);
|
||||
printf("Tagged Queuing enabled. Depth %d\n", tags);
|
||||
printk("Tagged Queuing enabled. Depth %d\n", tags);
|
||||
} else {
|
||||
ahd_platform_set_tags(ahd, sdev, &devinfo, AHD_QUEUE_NONE);
|
||||
ahd_send_async(ahd, devinfo.channel, devinfo.target,
|
||||
|
@ -1794,7 +1794,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
|
|||
struct ahd_linux_device *dev;
|
||||
|
||||
if ((scb->flags & SCB_ACTIVE) == 0) {
|
||||
printf("SCB %d done'd twice\n", SCB_GET_TAG(scb));
|
||||
printk("SCB %d done'd twice\n", SCB_GET_TAG(scb));
|
||||
ahd_dump_card_state(ahd);
|
||||
panic("Stopping for safety");
|
||||
}
|
||||
|
@ -1825,7 +1825,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
|
|||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_MISC) != 0) {
|
||||
ahd_print_path(ahd, scb);
|
||||
printf("Set CAM_UNCOR_PARITY\n");
|
||||
printk("Set CAM_UNCOR_PARITY\n");
|
||||
}
|
||||
#endif
|
||||
ahd_set_transaction_status(scb, CAM_UNCOR_PARITY);
|
||||
|
@ -1843,12 +1843,12 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
|
|||
u_int i;
|
||||
|
||||
ahd_print_path(ahd, scb);
|
||||
printf("CDB:");
|
||||
printk("CDB:");
|
||||
for (i = 0; i < scb->io_ctx->cmd_len; i++)
|
||||
printf(" 0x%x", scb->io_ctx->cmnd[i]);
|
||||
printf("\n");
|
||||
printk(" 0x%x", scb->io_ctx->cmnd[i]);
|
||||
printk("\n");
|
||||
ahd_print_path(ahd, scb);
|
||||
printf("Saw underflow (%ld of %ld bytes). "
|
||||
printk("Saw underflow (%ld of %ld bytes). "
|
||||
"Treated as error\n",
|
||||
ahd_get_residual(scb),
|
||||
ahd_get_transfer_length(scb));
|
||||
|
@ -1881,7 +1881,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
|
|||
dev->commands_since_idle_or_otag = 0;
|
||||
|
||||
if ((scb->flags & SCB_RECOVERY_SCB) != 0) {
|
||||
printf("Recovery SCB completes\n");
|
||||
printk("Recovery SCB completes\n");
|
||||
if (ahd_get_transaction_status(scb) == CAM_BDR_SENT
|
||||
|| ahd_get_transaction_status(scb) == CAM_REQ_ABORTED)
|
||||
ahd_set_transaction_status(scb, CAM_CMD_TIMEOUT);
|
||||
|
@ -1963,14 +1963,14 @@ ahd_linux_handle_scsi_status(struct ahd_softc *ahd,
|
|||
if (ahd_debug & AHD_SHOW_SENSE) {
|
||||
int i;
|
||||
|
||||
printf("Copied %d bytes of sense data at %d:",
|
||||
printk("Copied %d bytes of sense data at %d:",
|
||||
sense_size, sense_offset);
|
||||
for (i = 0; i < sense_size; i++) {
|
||||
if ((i & 0xF) == 0)
|
||||
printf("\n");
|
||||
printf("0x%x ", cmd->sense_buffer[i]);
|
||||
printk("\n");
|
||||
printk("0x%x ", cmd->sense_buffer[i]);
|
||||
}
|
||||
printf("\n");
|
||||
printk("\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1995,7 +1995,7 @@ ahd_linux_handle_scsi_status(struct ahd_softc *ahd,
|
|||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_QFULL) != 0) {
|
||||
ahd_print_path(ahd, scb);
|
||||
printf("Dropping tag count to %d\n",
|
||||
printk("Dropping tag count to %d\n",
|
||||
dev->active);
|
||||
}
|
||||
#endif
|
||||
|
@ -2014,7 +2014,7 @@ ahd_linux_handle_scsi_status(struct ahd_softc *ahd,
|
|||
== AHD_LOCK_TAGS_COUNT) {
|
||||
dev->maxtags = dev->active;
|
||||
ahd_print_path(ahd, scb);
|
||||
printf("Locking max tag count at %d\n",
|
||||
printk("Locking max tag count at %d\n",
|
||||
dev->active);
|
||||
}
|
||||
} else {
|
||||
|
@ -2138,7 +2138,7 @@ ahd_linux_queue_cmd_complete(struct ahd_softc *ahd, struct scsi_cmnd *cmd)
|
|||
}
|
||||
|
||||
if (do_fallback) {
|
||||
printf("%s: device overrun (status %x) on %d:%d:%d\n",
|
||||
printk("%s: device overrun (status %x) on %d:%d:%d\n",
|
||||
ahd_name(ahd), status, cmd->device->channel,
|
||||
cmd->device->id, cmd->device->lun);
|
||||
}
|
||||
|
@ -2187,10 +2187,10 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
|
|||
scmd_printk(KERN_INFO, cmd,
|
||||
"Attempting to queue an ABORT message:");
|
||||
|
||||
printf("CDB:");
|
||||
printk("CDB:");
|
||||
for (cdb_byte = 0; cdb_byte < cmd->cmd_len; cdb_byte++)
|
||||
printf(" 0x%x", cmd->cmnd[cdb_byte]);
|
||||
printf("\n");
|
||||
printk(" 0x%x", cmd->cmnd[cdb_byte]);
|
||||
printk("\n");
|
||||
|
||||
ahd_lock(ahd, &flags);
|
||||
|
||||
|
@ -2249,7 +2249,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
|
|||
goto no_cmd;
|
||||
}
|
||||
|
||||
printf("%s: At time of recovery, card was %spaused\n",
|
||||
printk("%s: At time of recovery, card was %spaused\n",
|
||||
ahd_name(ahd), was_paused ? "" : "not ");
|
||||
ahd_dump_card_state(ahd);
|
||||
|
||||
|
@ -2260,7 +2260,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
|
|||
pending_scb->hscb->tag,
|
||||
ROLE_INITIATOR, CAM_REQ_ABORTED,
|
||||
SEARCH_COMPLETE) > 0) {
|
||||
printf("%s:%d:%d:%d: Cmd aborted from QINFIFO\n",
|
||||
printk("%s:%d:%d:%d: Cmd aborted from QINFIFO\n",
|
||||
ahd_name(ahd), cmd->device->channel,
|
||||
cmd->device->id, cmd->device->lun);
|
||||
retval = SUCCESS;
|
||||
|
@ -2355,7 +2355,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
|
|||
ahd_qinfifo_requeue_tail(ahd, pending_scb);
|
||||
ahd_set_scbptr(ahd, saved_scbptr);
|
||||
ahd_print_path(ahd, pending_scb);
|
||||
printf("Device is disconnected, re-queuing SCB\n");
|
||||
printk("Device is disconnected, re-queuing SCB\n");
|
||||
wait = TRUE;
|
||||
} else {
|
||||
scmd_printk(KERN_INFO, cmd, "Unable to deliver message\n");
|
||||
|
@ -2380,21 +2380,21 @@ done:
|
|||
ahd->platform_data->eh_done = &done;
|
||||
ahd_unlock(ahd, &flags);
|
||||
|
||||
printf("%s: Recovery code sleeping\n", ahd_name(ahd));
|
||||
printk("%s: Recovery code sleeping\n", ahd_name(ahd));
|
||||
if (!wait_for_completion_timeout(&done, 5 * HZ)) {
|
||||
ahd_lock(ahd, &flags);
|
||||
ahd->platform_data->eh_done = NULL;
|
||||
ahd_unlock(ahd, &flags);
|
||||
printf("%s: Timer Expired (active %d)\n",
|
||||
printk("%s: Timer Expired (active %d)\n",
|
||||
ahd_name(ahd), dev->active);
|
||||
retval = FAILED;
|
||||
}
|
||||
printf("Recovery code awake\n");
|
||||
printk("Recovery code awake\n");
|
||||
} else
|
||||
ahd_unlock(ahd, &flags);
|
||||
|
||||
if (retval != SUCCESS)
|
||||
printf("%s: Command abort returning 0x%x\n",
|
||||
printk("%s: Command abort returning 0x%x\n",
|
||||
ahd_name(ahd), retval);
|
||||
|
||||
return retval;
|
||||
|
@ -2431,7 +2431,7 @@ static void ahd_linux_set_period(struct scsi_target *starget, int period)
|
|||
|
||||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_DV) != 0)
|
||||
printf("%s: set period to %d\n", ahd_name(ahd), period);
|
||||
printk("%s: set period to %d\n", ahd_name(ahd), period);
|
||||
#endif
|
||||
if (offset == 0)
|
||||
offset = MAX_OFFSET;
|
||||
|
@ -2484,7 +2484,7 @@ static void ahd_linux_set_offset(struct scsi_target *starget, int offset)
|
|||
|
||||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_DV) != 0)
|
||||
printf("%s: set offset to %d\n", ahd_name(ahd), offset);
|
||||
printk("%s: set offset to %d\n", ahd_name(ahd), offset);
|
||||
#endif
|
||||
|
||||
ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
|
||||
|
@ -2520,7 +2520,7 @@ static void ahd_linux_set_dt(struct scsi_target *starget, int dt)
|
|||
|
||||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_DV) != 0)
|
||||
printf("%s: %s DT\n", ahd_name(ahd),
|
||||
printk("%s: %s DT\n", ahd_name(ahd),
|
||||
dt ? "enabling" : "disabling");
|
||||
#endif
|
||||
if (dt && spi_max_width(starget)) {
|
||||
|
@ -2562,7 +2562,7 @@ static void ahd_linux_set_qas(struct scsi_target *starget, int qas)
|
|||
|
||||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_DV) != 0)
|
||||
printf("%s: %s QAS\n", ahd_name(ahd),
|
||||
printk("%s: %s QAS\n", ahd_name(ahd),
|
||||
qas ? "enabling" : "disabling");
|
||||
#endif
|
||||
|
||||
|
@ -2601,7 +2601,7 @@ static void ahd_linux_set_iu(struct scsi_target *starget, int iu)
|
|||
|
||||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_DV) != 0)
|
||||
printf("%s: %s IU\n", ahd_name(ahd),
|
||||
printk("%s: %s IU\n", ahd_name(ahd),
|
||||
iu ? "enabling" : "disabling");
|
||||
#endif
|
||||
|
||||
|
@ -2641,7 +2641,7 @@ static void ahd_linux_set_rd_strm(struct scsi_target *starget, int rdstrm)
|
|||
|
||||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_DV) != 0)
|
||||
printf("%s: %s Read Streaming\n", ahd_name(ahd),
|
||||
printk("%s: %s Read Streaming\n", ahd_name(ahd),
|
||||
rdstrm ? "enabling" : "disabling");
|
||||
#endif
|
||||
|
||||
|
@ -2677,7 +2677,7 @@ static void ahd_linux_set_wr_flow(struct scsi_target *starget, int wrflow)
|
|||
|
||||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_DV) != 0)
|
||||
printf("%s: %s Write Flow Control\n", ahd_name(ahd),
|
||||
printk("%s: %s Write Flow Control\n", ahd_name(ahd),
|
||||
wrflow ? "enabling" : "disabling");
|
||||
#endif
|
||||
|
||||
|
@ -2714,14 +2714,14 @@ static void ahd_linux_set_rti(struct scsi_target *starget, int rti)
|
|||
if ((ahd->features & AHD_RTI) == 0) {
|
||||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_DV) != 0)
|
||||
printf("%s: RTI not available\n", ahd_name(ahd));
|
||||
printk("%s: RTI not available\n", ahd_name(ahd));
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_DV) != 0)
|
||||
printf("%s: %s RTI\n", ahd_name(ahd),
|
||||
printk("%s: %s RTI\n", ahd_name(ahd),
|
||||
rti ? "enabling" : "disabling");
|
||||
#endif
|
||||
|
||||
|
@ -2757,7 +2757,7 @@ static void ahd_linux_set_pcomp_en(struct scsi_target *starget, int pcomp)
|
|||
|
||||
#ifdef AHD_DEBUG
|
||||
if ((ahd_debug & AHD_SHOW_DV) != 0)
|
||||
printf("%s: %s Precompensation\n", ahd_name(ahd),
|
||||
printk("%s: %s Precompensation\n", ahd_name(ahd),
|
||||
pcomp ? "Enable" : "Disable");
|
||||
#endif
|
||||
|
||||
|
|
|
@ -363,13 +363,6 @@ struct ahd_platform_data {
|
|||
resource_size_t mem_busaddr; /* Mem Base Addr */
|
||||
};
|
||||
|
||||
/************************** OS Utility Wrappers *******************************/
|
||||
#define printf printk
|
||||
#define M_NOWAIT GFP_ATOMIC
|
||||
#define M_WAITOK 0
|
||||
#define malloc(size, type, flags) kmalloc(size, flags)
|
||||
#define free(ptr, type) kfree(ptr)
|
||||
|
||||
void ahd_delay(long);
|
||||
|
||||
/***************************** Low Level I/O **********************************/
|
||||
|
|
|
@ -178,7 +178,7 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
ahd_get_pci_bus(pci),
|
||||
ahd_get_pci_slot(pci),
|
||||
ahd_get_pci_function(pci));
|
||||
name = malloc(strlen(buf) + 1, M_DEVBUF, M_NOWAIT);
|
||||
name = kmalloc(strlen(buf) + 1, GFP_ATOMIC);
|
||||
if (name == NULL)
|
||||
return (-ENOMEM);
|
||||
strcpy(name, buf);
|
||||
|
@ -333,7 +333,7 @@ ahd_pci_map_registers(struct ahd_softc *ahd)
|
|||
|
||||
if (ahd_pci_test_register_access(ahd) != 0) {
|
||||
|
||||
printf("aic79xx: PCI Device %d:%d:%d "
|
||||
printk("aic79xx: PCI Device %d:%d:%d "
|
||||
"failed memory mapped test. Using PIO.\n",
|
||||
ahd_get_pci_bus(ahd->dev_softc),
|
||||
ahd_get_pci_slot(ahd->dev_softc),
|
||||
|
@ -346,7 +346,7 @@ ahd_pci_map_registers(struct ahd_softc *ahd)
|
|||
} else
|
||||
command |= PCIM_CMD_MEMEN;
|
||||
} else if (bootverbose) {
|
||||
printf("aic79xx: PCI%d:%d:%d MEM region 0x%llx "
|
||||
printk("aic79xx: PCI%d:%d:%d MEM region 0x%llx "
|
||||
"unavailable. Cannot memory map device.\n",
|
||||
ahd_get_pci_bus(ahd->dev_softc),
|
||||
ahd_get_pci_slot(ahd->dev_softc),
|
||||
|
@ -365,7 +365,7 @@ ahd_pci_map_registers(struct ahd_softc *ahd)
|
|||
ahd->bshs[1].ioport = (u_long)base2;
|
||||
command |= PCIM_CMD_PORTEN;
|
||||
} else {
|
||||
printf("aic79xx: PCI%d:%d:%d IO regions 0x%llx and "
|
||||
printk("aic79xx: PCI%d:%d:%d IO regions 0x%llx and "
|
||||
"0x%llx unavailable. Cannot map device.\n",
|
||||
ahd_get_pci_bus(ahd->dev_softc),
|
||||
ahd_get_pci_slot(ahd->dev_softc),
|
||||
|
|
|
@ -338,7 +338,7 @@ ahd_pci_config(struct ahd_softc *ahd, const struct ahd_pci_identity *entry)
|
|||
*/
|
||||
if ((ahd->flags & (AHD_39BIT_ADDRESSING|AHD_64BIT_ADDRESSING)) != 0) {
|
||||
if (bootverbose)
|
||||
printf("%s: Enabling 39Bit Addressing\n",
|
||||
printk("%s: Enabling 39Bit Addressing\n",
|
||||
ahd_name(ahd));
|
||||
devconfig = ahd_pci_read_config(ahd->dev_softc,
|
||||
DEVCONFIG, /*bytes*/4);
|
||||
|
@ -528,7 +528,7 @@ ahd_check_extport(struct ahd_softc *ahd)
|
|||
* Fetch VPD for this function and parse it.
|
||||
*/
|
||||
if (bootverbose)
|
||||
printf("%s: Reading VPD from SEEPROM...",
|
||||
printk("%s: Reading VPD from SEEPROM...",
|
||||
ahd_name(ahd));
|
||||
|
||||
/* Address is always in units of 16bit words */
|
||||
|
@ -541,12 +541,12 @@ ahd_check_extport(struct ahd_softc *ahd)
|
|||
if (error == 0)
|
||||
error = ahd_parse_vpddata(ahd, &vpd);
|
||||
if (bootverbose)
|
||||
printf("%s: VPD parsing %s\n",
|
||||
printk("%s: VPD parsing %s\n",
|
||||
ahd_name(ahd),
|
||||
error == 0 ? "successful" : "failed");
|
||||
|
||||
if (bootverbose)
|
||||
printf("%s: Reading SEEPROM...", ahd_name(ahd));
|
||||
printk("%s: Reading SEEPROM...", ahd_name(ahd));
|
||||
|
||||
/* Address is always in units of 16bit words */
|
||||
start_addr = (sizeof(*sc) / 2) * (ahd->channel - 'A');
|
||||
|
@ -556,16 +556,16 @@ ahd_check_extport(struct ahd_softc *ahd)
|
|||
/*bytestream*/FALSE);
|
||||
|
||||
if (error != 0) {
|
||||
printf("Unable to read SEEPROM\n");
|
||||
printk("Unable to read SEEPROM\n");
|
||||
have_seeprom = 0;
|
||||
} else {
|
||||
have_seeprom = ahd_verify_cksum(sc);
|
||||
|
||||
if (bootverbose) {
|
||||
if (have_seeprom == 0)
|
||||
printf ("checksum error\n");
|
||||
printk ("checksum error\n");
|
||||
else
|
||||
printf ("done.\n");
|
||||
printk ("done.\n");
|
||||
}
|
||||
}
|
||||
ahd_release_seeprom(ahd);
|
||||
|
@ -615,21 +615,21 @@ ahd_check_extport(struct ahd_softc *ahd)
|
|||
uint16_t *sc_data;
|
||||
int i;
|
||||
|
||||
printf("%s: Seeprom Contents:", ahd_name(ahd));
|
||||
printk("%s: Seeprom Contents:", ahd_name(ahd));
|
||||
sc_data = (uint16_t *)sc;
|
||||
for (i = 0; i < (sizeof(*sc)); i += 2)
|
||||
printf("\n\t0x%.4x", sc_data[i]);
|
||||
printf("\n");
|
||||
printk("\n\t0x%.4x", sc_data[i]);
|
||||
printk("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!have_seeprom) {
|
||||
if (bootverbose)
|
||||
printf("%s: No SEEPROM available.\n", ahd_name(ahd));
|
||||
printk("%s: No SEEPROM available.\n", ahd_name(ahd));
|
||||
ahd->flags |= AHD_USEDEFAULTS;
|
||||
error = ahd_default_config(ahd);
|
||||
adapter_control = CFAUTOTERM|CFSEAUTOTERM;
|
||||
free(ahd->seep_config, M_DEVBUF);
|
||||
kfree(ahd->seep_config);
|
||||
ahd->seep_config = NULL;
|
||||
} else {
|
||||
error = ahd_parse_cfgdata(ahd, sc);
|
||||
|
@ -656,7 +656,7 @@ ahd_configure_termination(struct ahd_softc *ahd, u_int adapter_control)
|
|||
if ((ahd->flags & AHD_STPWLEVEL_A) != 0)
|
||||
devconfig |= STPWLEVEL;
|
||||
if (bootverbose)
|
||||
printf("%s: STPWLEVEL is %s\n",
|
||||
printk("%s: STPWLEVEL is %s\n",
|
||||
ahd_name(ahd), (devconfig & STPWLEVEL) ? "on" : "off");
|
||||
ahd_pci_write_config(ahd->dev_softc, DEVCONFIG, devconfig, /*bytes*/4);
|
||||
|
||||
|
@ -671,7 +671,7 @@ ahd_configure_termination(struct ahd_softc *ahd, u_int adapter_control)
|
|||
error = ahd_read_flexport(ahd, FLXADDR_TERMCTL, &termctl);
|
||||
if ((adapter_control & CFAUTOTERM) == 0) {
|
||||
if (bootverbose)
|
||||
printf("%s: Manual Primary Termination\n",
|
||||
printk("%s: Manual Primary Termination\n",
|
||||
ahd_name(ahd));
|
||||
termctl &= ~(FLX_TERMCTL_ENPRILOW|FLX_TERMCTL_ENPRIHIGH);
|
||||
if ((adapter_control & CFSTERM) != 0)
|
||||
|
@ -679,14 +679,14 @@ ahd_configure_termination(struct ahd_softc *ahd, u_int adapter_control)
|
|||
if ((adapter_control & CFWSTERM) != 0)
|
||||
termctl |= FLX_TERMCTL_ENPRIHIGH;
|
||||
} else if (error != 0) {
|
||||
printf("%s: Primary Auto-Term Sensing failed! "
|
||||
printk("%s: Primary Auto-Term Sensing failed! "
|
||||
"Using Defaults.\n", ahd_name(ahd));
|
||||
termctl = FLX_TERMCTL_ENPRILOW|FLX_TERMCTL_ENPRIHIGH;
|
||||
}
|
||||
|
||||
if ((adapter_control & CFSEAUTOTERM) == 0) {
|
||||
if (bootverbose)
|
||||
printf("%s: Manual Secondary Termination\n",
|
||||
printk("%s: Manual Secondary Termination\n",
|
||||
ahd_name(ahd));
|
||||
termctl &= ~(FLX_TERMCTL_ENSECLOW|FLX_TERMCTL_ENSECHIGH);
|
||||
if ((adapter_control & CFSELOWTERM) != 0)
|
||||
|
@ -694,7 +694,7 @@ ahd_configure_termination(struct ahd_softc *ahd, u_int adapter_control)
|
|||
if ((adapter_control & CFSEHIGHTERM) != 0)
|
||||
termctl |= FLX_TERMCTL_ENSECHIGH;
|
||||
} else if (error != 0) {
|
||||
printf("%s: Secondary Auto-Term Sensing failed! "
|
||||
printk("%s: Secondary Auto-Term Sensing failed! "
|
||||
"Using Defaults.\n", ahd_name(ahd));
|
||||
termctl |= FLX_TERMCTL_ENSECLOW|FLX_TERMCTL_ENSECHIGH;
|
||||
}
|
||||
|
@ -714,22 +714,22 @@ ahd_configure_termination(struct ahd_softc *ahd, u_int adapter_control)
|
|||
|
||||
error = ahd_write_flexport(ahd, FLXADDR_TERMCTL, termctl);
|
||||
if (error != 0) {
|
||||
printf("%s: Unable to set termination settings!\n",
|
||||
printk("%s: Unable to set termination settings!\n",
|
||||
ahd_name(ahd));
|
||||
} else if (bootverbose) {
|
||||
printf("%s: Primary High byte termination %sabled\n",
|
||||
printk("%s: Primary High byte termination %sabled\n",
|
||||
ahd_name(ahd),
|
||||
(termctl & FLX_TERMCTL_ENPRIHIGH) ? "En" : "Dis");
|
||||
|
||||
printf("%s: Primary Low byte termination %sabled\n",
|
||||
printk("%s: Primary Low byte termination %sabled\n",
|
||||
ahd_name(ahd),
|
||||
(termctl & FLX_TERMCTL_ENPRILOW) ? "En" : "Dis");
|
||||
|
||||
printf("%s: Secondary High byte termination %sabled\n",
|
||||
printk("%s: Secondary High byte termination %sabled\n",
|
||||
ahd_name(ahd),
|
||||
(termctl & FLX_TERMCTL_ENSECHIGH) ? "En" : "Dis");
|
||||
|
||||
printf("%s: Secondary Low byte termination %sabled\n",
|
||||
printk("%s: Secondary Low byte termination %sabled\n",
|
||||
ahd_name(ahd),
|
||||
(termctl & FLX_TERMCTL_ENSECLOW) ? "En" : "Dis");
|
||||
}
|
||||
|
@ -805,7 +805,7 @@ ahd_pci_intr(struct ahd_softc *ahd)
|
|||
if ((intstat & PCIINT) == 0)
|
||||
return;
|
||||
|
||||
printf("%s: PCI error Interrupt\n", ahd_name(ahd));
|
||||
printk("%s: PCI error Interrupt\n", ahd_name(ahd));
|
||||
saved_modes = ahd_save_modes(ahd);
|
||||
ahd_dump_card_state(ahd);
|
||||
ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
|
||||
|
@ -832,7 +832,7 @@ ahd_pci_intr(struct ahd_softc *ahd)
|
|||
s = pci_status_strings[bit];
|
||||
if (i == 7/*TARG*/ && bit == 3)
|
||||
s = "%s: Signaled Target Abort\n";
|
||||
printf(s, ahd_name(ahd), pci_status_source[i]);
|
||||
printk(s, ahd_name(ahd), pci_status_source[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -862,7 +862,7 @@ ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat)
|
|||
*/
|
||||
pcix_status = ahd_pci_read_config(ahd->dev_softc, PCIXR_STATUS,
|
||||
/*bytes*/2);
|
||||
printf("%s: PCI Split Interrupt - PCI-X status = 0x%x\n",
|
||||
printk("%s: PCI Split Interrupt - PCI-X status = 0x%x\n",
|
||||
ahd_name(ahd), pcix_status);
|
||||
saved_modes = ahd_save_modes(ahd);
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
@ -891,7 +891,7 @@ ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat)
|
|||
static const char *s;
|
||||
|
||||
s = split_status_strings[bit];
|
||||
printf(s, ahd_name(ahd),
|
||||
printk(s, ahd_name(ahd),
|
||||
split_status_source[i]);
|
||||
}
|
||||
|
||||
|
@ -902,7 +902,7 @@ ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat)
|
|||
static const char *s;
|
||||
|
||||
s = split_status_strings[bit];
|
||||
printf(s, ahd_name(ahd), "SG");
|
||||
printk(s, ahd_name(ahd), "SG");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -950,7 +950,7 @@ ahd_aic790X_setup(struct ahd_softc *ahd)
|
|||
pci = ahd->dev_softc;
|
||||
rev = ahd_pci_read_config(pci, PCIR_REVID, /*bytes*/1);
|
||||
if (rev < ID_AIC7902_PCI_REV_A4) {
|
||||
printf("%s: Unable to attach to unsupported chip revision %d\n",
|
||||
printk("%s: Unable to attach to unsupported chip revision %d\n",
|
||||
ahd_name(ahd), rev);
|
||||
ahd_pci_write_config(pci, PCIR_COMMAND, 0, /*bytes*/2);
|
||||
return (ENXIO);
|
||||
|
|
|
@ -272,33 +272,32 @@ ahd_proc_write_seeprom(struct ahd_softc *ahd, char *buffer, int length)
|
|||
saved_modes = ahd_save_modes(ahd);
|
||||
ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
|
||||
if (length != sizeof(struct seeprom_config)) {
|
||||
printf("ahd_proc_write_seeprom: incorrect buffer size\n");
|
||||
printk("ahd_proc_write_seeprom: incorrect buffer size\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
have_seeprom = ahd_verify_cksum((struct seeprom_config*)buffer);
|
||||
if (have_seeprom == 0) {
|
||||
printf("ahd_proc_write_seeprom: cksum verification failed\n");
|
||||
printk("ahd_proc_write_seeprom: cksum verification failed\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
have_seeprom = ahd_acquire_seeprom(ahd);
|
||||
if (!have_seeprom) {
|
||||
printf("ahd_proc_write_seeprom: No Serial EEPROM\n");
|
||||
printk("ahd_proc_write_seeprom: No Serial EEPROM\n");
|
||||
goto done;
|
||||
} else {
|
||||
u_int start_addr;
|
||||
|
||||
if (ahd->seep_config == NULL) {
|
||||
ahd->seep_config = malloc(sizeof(*ahd->seep_config),
|
||||
M_DEVBUF, M_NOWAIT);
|
||||
ahd->seep_config = kmalloc(sizeof(*ahd->seep_config), GFP_ATOMIC);
|
||||
if (ahd->seep_config == NULL) {
|
||||
printf("aic79xx: Unable to allocate serial "
|
||||
printk("aic79xx: Unable to allocate serial "
|
||||
"eeprom buffer. Write failing\n");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
printf("aic79xx: Writing Serial EEPROM\n");
|
||||
printk("aic79xx: Writing Serial EEPROM\n");
|
||||
start_addr = 32 * (ahd->channel - 'A');
|
||||
ahd_write_seeprom(ahd, (u_int16_t *)buffer, start_addr,
|
||||
sizeof(struct seeprom_config)/2);
|
||||
|
|
|
@ -207,14 +207,14 @@ ahc_read_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
|
|||
reset_seeprom(sd);
|
||||
}
|
||||
#ifdef AHC_DUMP_EEPROM
|
||||
printf("\nSerial EEPROM:\n\t");
|
||||
printk("\nSerial EEPROM:\n\t");
|
||||
for (k = 0; k < count; k = k + 1) {
|
||||
if (((k % 8) == 0) && (k != 0)) {
|
||||
printf ("\n\t");
|
||||
printk(KERN_CONT "\n\t");
|
||||
}
|
||||
printf (" 0x%x", buf[k]);
|
||||
printk(KERN_CONT " 0x%x", buf[k]);
|
||||
}
|
||||
printf ("\n");
|
||||
printk(KERN_CONT "\n");
|
||||
#endif
|
||||
return (1);
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ ahc_write_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
|
|||
ewen = &seeprom_long_ewen;
|
||||
ewds = &seeprom_long_ewds;
|
||||
} else {
|
||||
printf("ahc_write_seeprom: unsupported seeprom type %d\n",
|
||||
printk("ahc_write_seeprom: unsupported seeprom type %d\n",
|
||||
sd->sd_chip);
|
||||
return (0);
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -653,7 +653,7 @@ ahc_linux_slave_alloc(struct scsi_device *sdev)
|
|||
struct ahc_linux_device *dev;
|
||||
|
||||
if (bootverbose)
|
||||
printf("%s: Slave Alloc %d\n", ahc_name(ahc), sdev->id);
|
||||
printk("%s: Slave Alloc %d\n", ahc_name(ahc), sdev->id);
|
||||
|
||||
dev = scsi_transport_device_data(sdev);
|
||||
memset(dev, 0, sizeof(*dev));
|
||||
|
@ -755,7 +755,7 @@ ahc_linux_abort(struct scsi_cmnd *cmd)
|
|||
|
||||
error = ahc_linux_queue_recovery_cmd(cmd, SCB_ABORT);
|
||||
if (error != 0)
|
||||
printf("aic7xxx_abort returns 0x%x\n", error);
|
||||
printk("aic7xxx_abort returns 0x%x\n", error);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -769,7 +769,7 @@ ahc_linux_dev_reset(struct scsi_cmnd *cmd)
|
|||
|
||||
error = ahc_linux_queue_recovery_cmd(cmd, SCB_DEVICE_RESET);
|
||||
if (error != 0)
|
||||
printf("aic7xxx_dev_reset returns 0x%x\n", error);
|
||||
printk("aic7xxx_dev_reset returns 0x%x\n", error);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -791,7 +791,7 @@ ahc_linux_bus_reset(struct scsi_cmnd *cmd)
|
|||
ahc_unlock(ahc, &flags);
|
||||
|
||||
if (bootverbose)
|
||||
printf("%s: SCSI bus reset delivered. "
|
||||
printk("%s: SCSI bus reset delivered. "
|
||||
"%d SCBs aborted.\n", ahc_name(ahc), found);
|
||||
|
||||
return SUCCESS;
|
||||
|
@ -840,7 +840,7 @@ ahc_dma_tag_create(struct ahc_softc *ahc, bus_dma_tag_t parent,
|
|||
{
|
||||
bus_dma_tag_t dmat;
|
||||
|
||||
dmat = malloc(sizeof(*dmat), M_DEVBUF, M_NOWAIT);
|
||||
dmat = kmalloc(sizeof(*dmat), GFP_ATOMIC);
|
||||
if (dmat == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
|
@ -861,7 +861,7 @@ ahc_dma_tag_create(struct ahc_softc *ahc, bus_dma_tag_t parent,
|
|||
void
|
||||
ahc_dma_tag_destroy(struct ahc_softc *ahc, bus_dma_tag_t dmat)
|
||||
{
|
||||
free(dmat, M_DEVBUF);
|
||||
kfree(dmat);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -918,7 +918,7 @@ ahc_linux_setup_tag_info_global(char *p)
|
|||
int tags, i, j;
|
||||
|
||||
tags = simple_strtoul(p + 1, NULL, 0) & 0xff;
|
||||
printf("Setting Global Tags= %d\n", tags);
|
||||
printk("Setting Global Tags= %d\n", tags);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(aic7xxx_tag_info); i++) {
|
||||
for (j = 0; j < AHC_NUM_TARGETS; j++) {
|
||||
|
@ -936,7 +936,7 @@ ahc_linux_setup_tag_info(u_long arg, int instance, int targ, int32_t value)
|
|||
&& (targ < AHC_NUM_TARGETS)) {
|
||||
aic7xxx_tag_info[instance].tag_commands[targ] = value & 0xff;
|
||||
if (bootverbose)
|
||||
printf("tag_info[%d:%d] = %d\n", instance, targ, value);
|
||||
printk("tag_info[%d:%d] = %d\n", instance, targ, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -977,7 +977,7 @@ ahc_parse_brace_option(char *opt_name, char *opt_arg, char *end, int depth,
|
|||
if (targ == -1)
|
||||
targ = 0;
|
||||
} else {
|
||||
printf("Malformed Option %s\n",
|
||||
printk("Malformed Option %s\n",
|
||||
opt_name);
|
||||
done = TRUE;
|
||||
}
|
||||
|
@ -1120,7 +1120,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
|
|||
ahc_set_unit(ahc, ahc_linux_unit++);
|
||||
ahc_unlock(ahc, &s);
|
||||
sprintf(buf, "scsi%d", host->host_no);
|
||||
new_name = malloc(strlen(buf) + 1, M_DEVBUF, M_NOWAIT);
|
||||
new_name = kmalloc(strlen(buf) + 1, GFP_ATOMIC);
|
||||
if (new_name != NULL) {
|
||||
strcpy(new_name, buf);
|
||||
ahc_set_name(ahc, new_name);
|
||||
|
@ -1220,7 +1220,7 @@ ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg)
|
|||
{
|
||||
|
||||
ahc->platform_data =
|
||||
malloc(sizeof(struct ahc_platform_data), M_DEVBUF, M_NOWAIT);
|
||||
kmalloc(sizeof(struct ahc_platform_data), GFP_ATOMIC);
|
||||
if (ahc->platform_data == NULL)
|
||||
return (ENOMEM);
|
||||
memset(ahc->platform_data, 0, sizeof(struct ahc_platform_data));
|
||||
|
@ -1264,7 +1264,7 @@ ahc_platform_free(struct ahc_softc *ahc)
|
|||
if (ahc->platform_data->host)
|
||||
scsi_host_put(ahc->platform_data->host);
|
||||
|
||||
free(ahc->platform_data, M_DEVBUF);
|
||||
kfree(ahc->platform_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1378,7 +1378,7 @@ ahc_linux_user_tagdepth(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
|
|||
if (ahc->unit >= ARRAY_SIZE(aic7xxx_tag_info)) {
|
||||
if (warned_user == 0) {
|
||||
|
||||
printf(KERN_WARNING
|
||||
printk(KERN_WARNING
|
||||
"aic7xxx: WARNING: Insufficient tag_info instances\n"
|
||||
"aic7xxx: for installed controllers. Using defaults\n"
|
||||
"aic7xxx: Please update the aic7xxx_tag_info array in\n"
|
||||
|
@ -1421,7 +1421,7 @@ ahc_linux_device_queue_depth(struct scsi_device *sdev)
|
|||
ahc_send_async(ahc, devinfo.channel, devinfo.target,
|
||||
devinfo.lun, AC_TRANSFER_NEG);
|
||||
ahc_print_devinfo(ahc, &devinfo);
|
||||
printf("Tagged Queuing enabled. Depth %d\n", tags);
|
||||
printk("Tagged Queuing enabled. Depth %d\n", tags);
|
||||
} else {
|
||||
ahc_platform_set_tags(ahc, sdev, &devinfo, AHC_QUEUE_NONE);
|
||||
ahc_send_async(ahc, devinfo.channel, devinfo.target,
|
||||
|
@ -1735,7 +1735,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
|
|||
* not have been dispatched to the controller, so
|
||||
* only check the SCB_ACTIVE flag for tagged transactions.
|
||||
*/
|
||||
printf("SCB %d done'd twice\n", scb->hscb->tag);
|
||||
printk("SCB %d done'd twice\n", scb->hscb->tag);
|
||||
ahc_dump_card_state(ahc);
|
||||
panic("Stopping for safety");
|
||||
}
|
||||
|
@ -1765,7 +1765,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
|
|||
#ifdef AHC_DEBUG
|
||||
if ((ahc_debug & AHC_SHOW_MISC) != 0) {
|
||||
ahc_print_path(ahc, scb);
|
||||
printf("Set CAM_UNCOR_PARITY\n");
|
||||
printk("Set CAM_UNCOR_PARITY\n");
|
||||
}
|
||||
#endif
|
||||
ahc_set_transaction_status(scb, CAM_UNCOR_PARITY);
|
||||
|
@ -1783,12 +1783,12 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
|
|||
u_int i;
|
||||
|
||||
ahc_print_path(ahc, scb);
|
||||
printf("CDB:");
|
||||
printk("CDB:");
|
||||
for (i = 0; i < scb->io_ctx->cmd_len; i++)
|
||||
printf(" 0x%x", scb->io_ctx->cmnd[i]);
|
||||
printf("\n");
|
||||
printk(" 0x%x", scb->io_ctx->cmnd[i]);
|
||||
printk("\n");
|
||||
ahc_print_path(ahc, scb);
|
||||
printf("Saw underflow (%ld of %ld bytes). "
|
||||
printk("Saw underflow (%ld of %ld bytes). "
|
||||
"Treated as error\n",
|
||||
ahc_get_residual(scb),
|
||||
ahc_get_transfer_length(scb));
|
||||
|
@ -1821,7 +1821,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
|
|||
dev->commands_since_idle_or_otag = 0;
|
||||
|
||||
if ((scb->flags & SCB_RECOVERY_SCB) != 0) {
|
||||
printf("Recovery SCB completes\n");
|
||||
printk("Recovery SCB completes\n");
|
||||
if (ahc_get_transaction_status(scb) == CAM_BDR_SENT
|
||||
|| ahc_get_transaction_status(scb) == CAM_REQ_ABORTED)
|
||||
ahc_set_transaction_status(scb, CAM_CMD_TIMEOUT);
|
||||
|
@ -1886,14 +1886,14 @@ ahc_linux_handle_scsi_status(struct ahc_softc *ahc,
|
|||
if (ahc_debug & AHC_SHOW_SENSE) {
|
||||
int i;
|
||||
|
||||
printf("Copied %d bytes of sense data:",
|
||||
printk("Copied %d bytes of sense data:",
|
||||
sense_size);
|
||||
for (i = 0; i < sense_size; i++) {
|
||||
if ((i & 0xF) == 0)
|
||||
printf("\n");
|
||||
printf("0x%x ", cmd->sense_buffer[i]);
|
||||
printk("\n");
|
||||
printk("0x%x ", cmd->sense_buffer[i]);
|
||||
}
|
||||
printf("\n");
|
||||
printk("\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1918,7 +1918,7 @@ ahc_linux_handle_scsi_status(struct ahc_softc *ahc,
|
|||
dev->openings = 0;
|
||||
/*
|
||||
ahc_print_path(ahc, scb);
|
||||
printf("Dropping tag count to %d\n", dev->active);
|
||||
printk("Dropping tag count to %d\n", dev->active);
|
||||
*/
|
||||
if (dev->active == dev->tags_on_last_queuefull) {
|
||||
|
||||
|
@ -1935,7 +1935,7 @@ ahc_linux_handle_scsi_status(struct ahc_softc *ahc,
|
|||
== AHC_LOCK_TAGS_COUNT) {
|
||||
dev->maxtags = dev->active;
|
||||
ahc_print_path(ahc, scb);
|
||||
printf("Locking max tag count at %d\n",
|
||||
printk("Locking max tag count at %d\n",
|
||||
dev->active);
|
||||
}
|
||||
} else {
|
||||
|
@ -2100,10 +2100,10 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
|
|||
scmd_printk(KERN_INFO, cmd, "Attempting to queue a%s message\n",
|
||||
flag == SCB_ABORT ? "n ABORT" : " TARGET RESET");
|
||||
|
||||
printf("CDB:");
|
||||
printk("CDB:");
|
||||
for (cdb_byte = 0; cdb_byte < cmd->cmd_len; cdb_byte++)
|
||||
printf(" 0x%x", cmd->cmnd[cdb_byte]);
|
||||
printf("\n");
|
||||
printk(" 0x%x", cmd->cmnd[cdb_byte]);
|
||||
printk("\n");
|
||||
|
||||
ahc_lock(ahc, &flags);
|
||||
|
||||
|
@ -2121,7 +2121,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
|
|||
* No target device for this command exists,
|
||||
* so we must not still own the command.
|
||||
*/
|
||||
printf("%s:%d:%d:%d: Is not an active device\n",
|
||||
printk("%s:%d:%d:%d: Is not an active device\n",
|
||||
ahc_name(ahc), cmd->device->channel, cmd->device->id,
|
||||
cmd->device->lun);
|
||||
retval = SUCCESS;
|
||||
|
@ -2133,7 +2133,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
|
|||
cmd->device->channel + 'A',
|
||||
cmd->device->lun,
|
||||
CAM_REQ_ABORTED, SEARCH_COMPLETE) != 0) {
|
||||
printf("%s:%d:%d:%d: Command found on untagged queue\n",
|
||||
printk("%s:%d:%d:%d: Command found on untagged queue\n",
|
||||
ahc_name(ahc), cmd->device->channel, cmd->device->id,
|
||||
cmd->device->lun);
|
||||
retval = SUCCESS;
|
||||
|
@ -2187,7 +2187,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
|
|||
goto no_cmd;
|
||||
}
|
||||
|
||||
printf("%s: At time of recovery, card was %spaused\n",
|
||||
printk("%s: At time of recovery, card was %spaused\n",
|
||||
ahc_name(ahc), was_paused ? "" : "not ");
|
||||
ahc_dump_card_state(ahc);
|
||||
|
||||
|
@ -2199,7 +2199,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
|
|||
pending_scb->hscb->tag,
|
||||
ROLE_INITIATOR, CAM_REQ_ABORTED,
|
||||
SEARCH_COMPLETE) > 0) {
|
||||
printf("%s:%d:%d:%d: Cmd aborted from QINFIFO\n",
|
||||
printk("%s:%d:%d:%d: Cmd aborted from QINFIFO\n",
|
||||
ahc_name(ahc), cmd->device->channel,
|
||||
cmd->device->id, cmd->device->lun);
|
||||
retval = SUCCESS;
|
||||
|
@ -2313,7 +2313,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
|
|||
ahc_qinfifo_requeue_tail(ahc, pending_scb);
|
||||
ahc_outb(ahc, SCBPTR, saved_scbptr);
|
||||
ahc_print_path(ahc, pending_scb);
|
||||
printf("Device is disconnected, re-queuing SCB\n");
|
||||
printk("Device is disconnected, re-queuing SCB\n");
|
||||
wait = TRUE;
|
||||
} else {
|
||||
scmd_printk(KERN_INFO, cmd, "Unable to deliver message\n");
|
||||
|
@ -2338,16 +2338,16 @@ done:
|
|||
ahc->platform_data->eh_done = &done;
|
||||
ahc_unlock(ahc, &flags);
|
||||
|
||||
printf("Recovery code sleeping\n");
|
||||
printk("Recovery code sleeping\n");
|
||||
if (!wait_for_completion_timeout(&done, 5 * HZ)) {
|
||||
ahc_lock(ahc, &flags);
|
||||
ahc->platform_data->eh_done = NULL;
|
||||
ahc_unlock(ahc, &flags);
|
||||
|
||||
printf("Timer Expired\n");
|
||||
printk("Timer Expired\n");
|
||||
retval = FAILED;
|
||||
}
|
||||
printf("Recovery code awake\n");
|
||||
printk("Recovery code awake\n");
|
||||
} else
|
||||
ahc_unlock(ahc, &flags);
|
||||
return (retval);
|
||||
|
|
|
@ -368,13 +368,6 @@ struct ahc_platform_data {
|
|||
resource_size_t mem_busaddr; /* Mem Base Addr */
|
||||
};
|
||||
|
||||
/************************** OS Utility Wrappers *******************************/
|
||||
#define printf printk
|
||||
#define M_NOWAIT GFP_ATOMIC
|
||||
#define M_WAITOK 0
|
||||
#define malloc(size, type, flags) kmalloc(size, flags)
|
||||
#define free(ptr, type) kfree(ptr)
|
||||
|
||||
void ahc_delay(long);
|
||||
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
ahc_get_pci_bus(pci),
|
||||
ahc_get_pci_slot(pci),
|
||||
ahc_get_pci_function(pci));
|
||||
name = malloc(strlen(buf) + 1, M_DEVBUF, M_NOWAIT);
|
||||
name = kmalloc(strlen(buf) + 1, GFP_ATOMIC);
|
||||
if (name == NULL)
|
||||
return (-ENOMEM);
|
||||
strcpy(name, buf);
|
||||
|
@ -412,7 +412,7 @@ ahc_pci_map_registers(struct ahc_softc *ahc)
|
|||
*/
|
||||
if (ahc_pci_test_register_access(ahc) != 0) {
|
||||
|
||||
printf("aic7xxx: PCI Device %d:%d:%d "
|
||||
printk("aic7xxx: PCI Device %d:%d:%d "
|
||||
"failed memory mapped test. Using PIO.\n",
|
||||
ahc_get_pci_bus(ahc->dev_softc),
|
||||
ahc_get_pci_slot(ahc->dev_softc),
|
||||
|
@ -425,7 +425,7 @@ ahc_pci_map_registers(struct ahc_softc *ahc)
|
|||
} else
|
||||
command |= PCIM_CMD_MEMEN;
|
||||
} else {
|
||||
printf("aic7xxx: PCI%d:%d:%d MEM region 0x%llx "
|
||||
printk("aic7xxx: PCI%d:%d:%d MEM region 0x%llx "
|
||||
"unavailable. Cannot memory map device.\n",
|
||||
ahc_get_pci_bus(ahc->dev_softc),
|
||||
ahc_get_pci_slot(ahc->dev_softc),
|
||||
|
@ -444,7 +444,7 @@ ahc_pci_map_registers(struct ahc_softc *ahc)
|
|||
ahc->bsh.ioport = (u_long)base;
|
||||
command |= PCIM_CMD_PORTEN;
|
||||
} else {
|
||||
printf("aic7xxx: PCI%d:%d:%d IO region 0x%llx[0..255] "
|
||||
printk("aic7xxx: PCI%d:%d:%d IO region 0x%llx[0..255] "
|
||||
"unavailable. Cannot map device.\n",
|
||||
ahc_get_pci_bus(ahc->dev_softc),
|
||||
ahc_get_pci_slot(ahc->dev_softc),
|
||||
|
|
|
@ -752,7 +752,7 @@ ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry)
|
|||
if ((ahc->flags & AHC_39BIT_ADDRESSING) != 0) {
|
||||
|
||||
if (bootverbose)
|
||||
printf("%s: Enabling 39Bit Addressing\n",
|
||||
printk("%s: Enabling 39Bit Addressing\n",
|
||||
ahc_name(ahc));
|
||||
devconfig |= DACEN;
|
||||
}
|
||||
|
@ -896,7 +896,7 @@ ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry)
|
|||
/* See if someone else set us up already */
|
||||
if ((ahc->flags & AHC_NO_BIOS_INIT) == 0
|
||||
&& scsiseq != 0) {
|
||||
printf("%s: Using left over BIOS settings\n",
|
||||
printk("%s: Using left over BIOS settings\n",
|
||||
ahc_name(ahc));
|
||||
ahc->flags &= ~AHC_USEDEFAULTS;
|
||||
ahc->flags |= AHC_BIOS_ENABLED;
|
||||
|
@ -1155,7 +1155,7 @@ done:
|
|||
ahc_outb(ahc, CLRINT, CLRPARERR);
|
||||
ahc_outb(ahc, CLRINT, CLRBRKADRINT);
|
||||
if (bootverbose && enable) {
|
||||
printf("%s: External SRAM, %s access%s, %dbytes/SCB\n",
|
||||
printk("%s: External SRAM, %s access%s, %dbytes/SCB\n",
|
||||
ahc_name(ahc), fast ? "fast" : "slow",
|
||||
pcheck ? ", parity checking enabled" : "",
|
||||
large ? 64 : 32);
|
||||
|
@ -1292,7 +1292,7 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1)
|
|||
if (have_seeprom) {
|
||||
|
||||
if (bootverbose)
|
||||
printf("%s: Reading SEEPROM...", ahc_name(ahc));
|
||||
printk("%s: Reading SEEPROM...", ahc_name(ahc));
|
||||
|
||||
for (;;) {
|
||||
u_int start_addr;
|
||||
|
@ -1309,9 +1309,9 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1)
|
|||
if (have_seeprom != 0 || sd.sd_chip == C56_66) {
|
||||
if (bootverbose) {
|
||||
if (have_seeprom == 0)
|
||||
printf ("checksum error\n");
|
||||
printk ("checksum error\n");
|
||||
else
|
||||
printf ("done.\n");
|
||||
printk ("done.\n");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1362,9 +1362,9 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1)
|
|||
|
||||
if (!have_seeprom) {
|
||||
if (bootverbose)
|
||||
printf("%s: No SEEPROM available.\n", ahc_name(ahc));
|
||||
printk("%s: No SEEPROM available.\n", ahc_name(ahc));
|
||||
ahc->flags |= AHC_USEDEFAULTS;
|
||||
free(ahc->seep_config, M_DEVBUF);
|
||||
kfree(ahc->seep_config);
|
||||
ahc->seep_config = NULL;
|
||||
sc = NULL;
|
||||
} else {
|
||||
|
@ -1399,7 +1399,7 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1)
|
|||
if ((sc->adapter_control & CFSTERM) != 0)
|
||||
*sxfrctl1 |= STPWEN;
|
||||
if (bootverbose)
|
||||
printf("%s: Low byte termination %sabled\n",
|
||||
printk("%s: Low byte termination %sabled\n",
|
||||
ahc_name(ahc),
|
||||
(*sxfrctl1 & STPWEN) ? "en" : "dis");
|
||||
}
|
||||
|
@ -1569,7 +1569,7 @@ configure_termination(struct ahc_softc *ahc,
|
|||
&eeprom_present);
|
||||
if ((adapter_control & CFSEAUTOTERM) == 0) {
|
||||
if (bootverbose)
|
||||
printf("%s: Manual SE Termination\n",
|
||||
printk("%s: Manual SE Termination\n",
|
||||
ahc_name(ahc));
|
||||
enableSEC_low = (adapter_control & CFSELOWTERM);
|
||||
enableSEC_high =
|
||||
|
@ -1577,7 +1577,7 @@ configure_termination(struct ahc_softc *ahc,
|
|||
}
|
||||
if ((adapter_control & CFAUTOTERM) == 0) {
|
||||
if (bootverbose)
|
||||
printf("%s: Manual LVD Termination\n",
|
||||
printk("%s: Manual LVD Termination\n",
|
||||
ahc_name(ahc));
|
||||
enablePRI_low = (adapter_control & CFSTERM);
|
||||
enablePRI_high = (adapter_control & CFWSTERM);
|
||||
|
@ -1604,19 +1604,19 @@ configure_termination(struct ahc_softc *ahc,
|
|||
|
||||
if (bootverbose
|
||||
&& (ahc->features & AHC_ULTRA2) == 0) {
|
||||
printf("%s: internal 50 cable %s present",
|
||||
printk("%s: internal 50 cable %s present",
|
||||
ahc_name(ahc),
|
||||
internal50_present ? "is":"not");
|
||||
|
||||
if ((ahc->features & AHC_WIDE) != 0)
|
||||
printf(", internal 68 cable %s present",
|
||||
printk(", internal 68 cable %s present",
|
||||
internal68_present ? "is":"not");
|
||||
printf("\n%s: external cable %s present\n",
|
||||
printk("\n%s: external cable %s present\n",
|
||||
ahc_name(ahc),
|
||||
externalcable_present ? "is":"not");
|
||||
}
|
||||
if (bootverbose)
|
||||
printf("%s: BIOS eeprom %s present\n",
|
||||
printk("%s: BIOS eeprom %s present\n",
|
||||
ahc_name(ahc), eeprom_present ? "is" : "not");
|
||||
|
||||
if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) {
|
||||
|
@ -1642,7 +1642,7 @@ configure_termination(struct ahc_softc *ahc,
|
|||
&& (internal50_present != 0)
|
||||
&& (internal68_present != 0)
|
||||
&& (externalcable_present != 0)) {
|
||||
printf("%s: Illegal cable configuration!!. "
|
||||
printk("%s: Illegal cable configuration!!. "
|
||||
"Only two connectors on the "
|
||||
"adapter may be used at a "
|
||||
"time!\n", ahc_name(ahc));
|
||||
|
@ -1664,10 +1664,10 @@ configure_termination(struct ahc_softc *ahc,
|
|||
brddat |= BRDDAT6;
|
||||
if (bootverbose) {
|
||||
if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0)
|
||||
printf("%s: 68 pin termination "
|
||||
printk("%s: 68 pin termination "
|
||||
"Enabled\n", ahc_name(ahc));
|
||||
else
|
||||
printf("%s: %sHigh byte termination "
|
||||
printk("%s: %sHigh byte termination "
|
||||
"Enabled\n", ahc_name(ahc),
|
||||
enableSEC_high ? "Secondary "
|
||||
: "");
|
||||
|
@ -1683,10 +1683,10 @@ configure_termination(struct ahc_softc *ahc,
|
|||
*sxfrctl1 |= STPWEN;
|
||||
if (bootverbose) {
|
||||
if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0)
|
||||
printf("%s: 50 pin termination "
|
||||
printk("%s: 50 pin termination "
|
||||
"Enabled\n", ahc_name(ahc));
|
||||
else
|
||||
printf("%s: %sLow byte termination "
|
||||
printk("%s: %sLow byte termination "
|
||||
"Enabled\n", ahc_name(ahc),
|
||||
enableSEC_low ? "Secondary "
|
||||
: "");
|
||||
|
@ -1696,7 +1696,7 @@ configure_termination(struct ahc_softc *ahc,
|
|||
if (enablePRI_low != 0) {
|
||||
*sxfrctl1 |= STPWEN;
|
||||
if (bootverbose)
|
||||
printf("%s: Primary Low Byte termination "
|
||||
printk("%s: Primary Low Byte termination "
|
||||
"Enabled\n", ahc_name(ahc));
|
||||
}
|
||||
|
||||
|
@ -1709,7 +1709,7 @@ configure_termination(struct ahc_softc *ahc,
|
|||
if (enablePRI_high != 0) {
|
||||
brddat |= BRDDAT4;
|
||||
if (bootverbose)
|
||||
printf("%s: Primary High Byte "
|
||||
printk("%s: Primary High Byte "
|
||||
"termination Enabled\n",
|
||||
ahc_name(ahc));
|
||||
}
|
||||
|
@ -1721,7 +1721,7 @@ configure_termination(struct ahc_softc *ahc,
|
|||
*sxfrctl1 |= STPWEN;
|
||||
|
||||
if (bootverbose)
|
||||
printf("%s: %sLow byte termination Enabled\n",
|
||||
printk("%s: %sLow byte termination Enabled\n",
|
||||
ahc_name(ahc),
|
||||
(ahc->features & AHC_ULTRA2) ? "Primary "
|
||||
: "");
|
||||
|
@ -1731,7 +1731,7 @@ configure_termination(struct ahc_softc *ahc,
|
|||
&& (ahc->features & AHC_WIDE) != 0) {
|
||||
brddat |= BRDDAT6;
|
||||
if (bootverbose)
|
||||
printf("%s: %sHigh byte termination Enabled\n",
|
||||
printk("%s: %sHigh byte termination Enabled\n",
|
||||
ahc_name(ahc),
|
||||
(ahc->features & AHC_ULTRA2)
|
||||
? "Secondary " : "");
|
||||
|
@ -1937,29 +1937,29 @@ ahc_pci_intr(struct ahc_softc *ahc)
|
|||
status1 = ahc_pci_read_config(ahc->dev_softc,
|
||||
PCIR_STATUS + 1, /*bytes*/1);
|
||||
|
||||
printf("%s: PCI error Interrupt at seqaddr = 0x%x\n",
|
||||
printk("%s: PCI error Interrupt at seqaddr = 0x%x\n",
|
||||
ahc_name(ahc),
|
||||
ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8));
|
||||
|
||||
if (status1 & DPE) {
|
||||
ahc->pci_target_perr_count++;
|
||||
printf("%s: Data Parity Error Detected during address "
|
||||
printk("%s: Data Parity Error Detected during address "
|
||||
"or write data phase\n", ahc_name(ahc));
|
||||
}
|
||||
if (status1 & SSE) {
|
||||
printf("%s: Signal System Error Detected\n", ahc_name(ahc));
|
||||
printk("%s: Signal System Error Detected\n", ahc_name(ahc));
|
||||
}
|
||||
if (status1 & RMA) {
|
||||
printf("%s: Received a Master Abort\n", ahc_name(ahc));
|
||||
printk("%s: Received a Master Abort\n", ahc_name(ahc));
|
||||
}
|
||||
if (status1 & RTA) {
|
||||
printf("%s: Received a Target Abort\n", ahc_name(ahc));
|
||||
printk("%s: Received a Target Abort\n", ahc_name(ahc));
|
||||
}
|
||||
if (status1 & STA) {
|
||||
printf("%s: Signaled a Target Abort\n", ahc_name(ahc));
|
||||
printk("%s: Signaled a Target Abort\n", ahc_name(ahc));
|
||||
}
|
||||
if (status1 & DPR) {
|
||||
printf("%s: Data Parity Error has been reported via PERR#\n",
|
||||
printk("%s: Data Parity Error has been reported via PERR#\n",
|
||||
ahc_name(ahc));
|
||||
}
|
||||
|
||||
|
@ -1968,14 +1968,14 @@ ahc_pci_intr(struct ahc_softc *ahc)
|
|||
status1, /*bytes*/1);
|
||||
|
||||
if ((status1 & (DPE|SSE|RMA|RTA|STA|DPR)) == 0) {
|
||||
printf("%s: Latched PCIERR interrupt with "
|
||||
printk("%s: Latched PCIERR interrupt with "
|
||||
"no status bits set\n", ahc_name(ahc));
|
||||
} else {
|
||||
ahc_outb(ahc, CLRINT, CLRPARERR);
|
||||
}
|
||||
|
||||
if (ahc->pci_target_perr_count > AHC_PCI_TARGET_PERR_THRESH) {
|
||||
printf(
|
||||
printk(
|
||||
"%s: WARNING WARNING WARNING WARNING\n"
|
||||
"%s: Too many PCI parity errors observed as a target.\n"
|
||||
"%s: Some device on this bus is generating bad parity.\n"
|
||||
|
@ -2386,7 +2386,7 @@ ahc_aha29160C_setup(struct ahc_softc *ahc)
|
|||
static int
|
||||
ahc_raid_setup(struct ahc_softc *ahc)
|
||||
{
|
||||
printf("RAID functionality unsupported\n");
|
||||
printk("RAID functionality unsupported\n");
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
|
@ -2404,7 +2404,7 @@ ahc_aha394XX_setup(struct ahc_softc *ahc)
|
|||
ahc->channel = 'B';
|
||||
break;
|
||||
default:
|
||||
printf("adapter at unexpected slot %d\n"
|
||||
printk("adapter at unexpected slot %d\n"
|
||||
"unable to map to a channel\n",
|
||||
ahc_get_pci_slot(pci));
|
||||
ahc->channel = 'A';
|
||||
|
@ -2429,7 +2429,7 @@ ahc_aha398XX_setup(struct ahc_softc *ahc)
|
|||
ahc->channel = 'C';
|
||||
break;
|
||||
default:
|
||||
printf("adapter at unexpected slot %d\n"
|
||||
printk("adapter at unexpected slot %d\n"
|
||||
"unable to map to a channel\n",
|
||||
ahc_get_pci_slot(pci));
|
||||
ahc->channel = 'A';
|
||||
|
@ -2459,7 +2459,7 @@ ahc_aha494XX_setup(struct ahc_softc *ahc)
|
|||
ahc->channel = 'D';
|
||||
break;
|
||||
default:
|
||||
printf("adapter at unexpected slot %d\n"
|
||||
printk("adapter at unexpected slot %d\n"
|
||||
"unable to map to a channel\n",
|
||||
ahc_get_pci_slot(pci));
|
||||
ahc->channel = 'A';
|
||||
|
|
|
@ -248,13 +248,13 @@ ahc_proc_write_seeprom(struct ahc_softc *ahc, char *buffer, int length)
|
|||
ahc_pause(ahc);
|
||||
|
||||
if (length != sizeof(struct seeprom_config)) {
|
||||
printf("ahc_proc_write_seeprom: incorrect buffer size\n");
|
||||
printk("ahc_proc_write_seeprom: incorrect buffer size\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
have_seeprom = ahc_verify_cksum((struct seeprom_config*)buffer);
|
||||
if (have_seeprom == 0) {
|
||||
printf("ahc_proc_write_seeprom: cksum verification failed\n");
|
||||
printk("ahc_proc_write_seeprom: cksum verification failed\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -290,26 +290,25 @@ ahc_proc_write_seeprom(struct ahc_softc *ahc, char *buffer, int length)
|
|||
sd.sd_DI = DI_2840;
|
||||
have_seeprom = TRUE;
|
||||
} else {
|
||||
printf("ahc_proc_write_seeprom: unsupported adapter type\n");
|
||||
printk("ahc_proc_write_seeprom: unsupported adapter type\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!have_seeprom) {
|
||||
printf("ahc_proc_write_seeprom: No Serial EEPROM\n");
|
||||
printk("ahc_proc_write_seeprom: No Serial EEPROM\n");
|
||||
goto done;
|
||||
} else {
|
||||
u_int start_addr;
|
||||
|
||||
if (ahc->seep_config == NULL) {
|
||||
ahc->seep_config = malloc(sizeof(*ahc->seep_config),
|
||||
M_DEVBUF, M_NOWAIT);
|
||||
ahc->seep_config = kmalloc(sizeof(*ahc->seep_config), GFP_ATOMIC);
|
||||
if (ahc->seep_config == NULL) {
|
||||
printf("aic7xxx: Unable to allocate serial "
|
||||
printk("aic7xxx: Unable to allocate serial "
|
||||
"eeprom buffer. Write failing\n");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
printf("aic7xxx: Writing Serial EEPROM\n");
|
||||
printk("aic7xxx: Writing Serial EEPROM\n");
|
||||
start_addr = 32 * (ahc->channel - 'A');
|
||||
ahc_write_seeprom(&sd, (u_int16_t *)buffer, start_addr,
|
||||
sizeof(struct seeprom_config)/2);
|
||||
|
|
Загрузка…
Ссылка в новой задаче