diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/aic79xx.c | 39 | ||||
-rw-r--r-- | sys/dev/ic/aic79xx.h | 7 | ||||
-rw-r--r-- | sys/dev/ic/aic79xx_openbsd.c | 13 | ||||
-rw-r--r-- | sys/dev/ic/aic79xx_openbsd.h | 5 | ||||
-rw-r--r-- | sys/dev/pci/ahd_pci.c | 5 |
5 files changed, 26 insertions, 43 deletions
diff --git a/sys/dev/ic/aic79xx.c b/sys/dev/ic/aic79xx.c index 1c3947ea21d..7feab0b1f7d 100644 --- a/sys/dev/ic/aic79xx.c +++ b/sys/dev/ic/aic79xx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic79xx.c,v 1.14 2004/11/14 01:25:14 krw Exp $ */ +/* $OpenBSD: aic79xx.c,v 1.15 2004/11/18 01:33:28 krw Exp $ */ /* * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom @@ -235,6 +235,8 @@ void ahd_add_scb_to_free_list(struct ahd_softc *ahd, u_int ahd_rem_wscb(struct ahd_softc *ahd, u_int scbid, u_int prev, u_int next, u_int tid); void ahd_reset_current_bus(struct ahd_softc *ahd); +ahd_callback_t ahd_reset_poll; +ahd_callback_t ahd_stat_timer; #ifdef AHD_DUMP_SEQ void ahd_dumpseq(struct ahd_softc *ahd); #endif @@ -5220,6 +5222,15 @@ ahd_sglist_allocsize(struct ahd_softc *ahd) return (best_list_size); } +int +ahd_softc_init(struct ahd_softc *ahd) +{ + + ahd->unpause = 0; + ahd->pause = PAUSE; + return (0); +} + void ahd_softc_insert(struct ahd_softc *ahd) { @@ -5288,14 +5299,6 @@ ahd_find_softc(struct ahd_softc *ahd) return (NULL); } -int -ahd_softc_init(struct ahd_softc *ahd) -{ - ahd->unpause = 0; - ahd->pause = PAUSE; - return (0); -} - void ahd_set_unit(struct ahd_softc *ahd, int unit) { @@ -5885,7 +5888,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd) struct map_node *hscb_map; struct map_node *sg_map; struct map_node *sense_map; - uint8_t *segs; + uint8_t *segs; uint8_t *sense_data; bus_addr_t hscb_busaddr; bus_addr_t sg_busaddr; @@ -5911,7 +5914,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd) if (hscb_map == NULL) return; - + /* Allocate the next batch of hardware SCBs */ if (ahd_createdmamem(ahd, PAGE_SIZE, hscb_map, "hardware SCB structures") < 0) { @@ -6002,7 +6005,6 @@ ahd_alloc_scbs(struct ahd_softc *ahd) scb_data->sense_left -= newcount; scb_data->scbs_left -= newcount; scb_data->sgs_left -= newcount; - for (i = 0; i < newcount; i++) { struct scb_platform_data *pdata; u_int col_tag; @@ -6153,12 +6155,11 @@ ahd_init(struct ahd_softc *ahd) * the incoming target command fifo. */ driver_data_size = AHD_SCB_MAX * sizeof(*ahd->qoutfifo) - + sizeof(struct hardware_scb); - if ((ahd->features & AHD_TARGETMODE) != 0) - driver_data_size += AHD_TMODE_CMDS * sizeof(struct target_cmd); - if ((ahd->bugs & AHD_PKT_BITBUCKET_BUG) != 0) - driver_data_size += PKT_OVERRUN_BUFSIZE; - + + sizeof(struct hardware_scb); + if ((ahd->features & AHD_TARGETMODE) != 0) + driver_data_size += AHD_TMODE_CMDS * sizeof(struct target_cmd); + if ((ahd->bugs & AHD_PKT_BITBUCKET_BUG) != 0) + driver_data_size += PKT_OVERRUN_BUFSIZE; if (ahd_createdmamem(ahd, driver_data_size, &ahd->shared_data_map, "shared data") < 0) return (ENOMEM); @@ -8332,7 +8333,7 @@ ahd_loadseq(struct ahd_softc *ahd) u_int sg_prefetch_cnt_limit; u_int sg_prefetch_align; u_int sg_size; - u_int cacheline_mask; + u_int cacheline_mask; uint8_t download_consts[DOWNLOAD_CONST_COUNT]; if (bootverbose) diff --git a/sys/dev/ic/aic79xx.h b/sys/dev/ic/aic79xx.h index c83c2f3645c..714596f9c55 100644 --- a/sys/dev/ic/aic79xx.h +++ b/sys/dev/ic/aic79xx.h @@ -1,4 +1,4 @@ -/* $OpenBSD: aic79xx.h,v 1.12 2004/11/14 01:25:14 krw Exp $ */ +/* $OpenBSD: aic79xx.h,v 1.13 2004/11/18 01:33:28 krw Exp $ */ /* * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom @@ -631,12 +631,10 @@ typedef enum { * don't want to upset the user. This * flag is typically used during DV. */ - SCB_TIMEDOUT = 0x20000,/* + SCB_TIMEDOUT = 0x20000/* * SCB has timed out and is on the * timedout list. */ - SCB_FREEZE_QUEUE = 0x40000, - SCB_REQUEUE = 0x80000, } scb_flag; struct scb { @@ -1096,7 +1094,6 @@ struct ahd_softc { struct device sc_dev; struct scsi_link sc_channel; struct device * sc_child; - struct scsi_adapter sc_adapter; bus_space_tag_t tags[2]; bus_space_handle_t bshs[2]; diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c index 214bdb9bac2..1ebceb16fd5 100644 --- a/sys/dev/ic/aic79xx_openbsd.c +++ b/sys/dev/ic/aic79xx_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic79xx_openbsd.c,v 1.10 2004/11/14 01:25:14 krw Exp $ */ +/* $OpenBSD: aic79xx_openbsd.c,v 1.11 2004/11/18 01:33:28 krw Exp $ */ /* * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom @@ -311,9 +311,6 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb) ahd_set_transaction_status(scb, XS_SENSE); #endif } - if (scb->flags & SCB_FREEZE_QUEUE) { - scb->flags &= ~SCB_FREEZE_QUEUE; - } #if 0 /* MU: no such settings in ahc */ if (scb->flags & SCB_REQUEUE) ahd_set_transaction_status(scb, XS_REQUEUE); @@ -932,13 +929,7 @@ ahd_release_simq(struct ahd_softc *ahd) void ahd_freeze_scb(struct scb *scb) { - struct scsi_xfer *xs = scb->xs; - int target; - - target = xs->sc_link->target; - if (!(scb->flags & SCB_FREEZE_QUEUE)) { - scb->flags |= SCB_FREEZE_QUEUE; - } + /* do nothing for now */ } void diff --git a/sys/dev/ic/aic79xx_openbsd.h b/sys/dev/ic/aic79xx_openbsd.h index 80d926504ff..763bcb62ff2 100644 --- a/sys/dev/ic/aic79xx_openbsd.h +++ b/sys/dev/ic/aic79xx_openbsd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: aic79xx_openbsd.h,v 1.7 2004/11/14 01:25:14 krw Exp $ */ +/* $OpenBSD: aic79xx_openbsd.h,v 1.8 2004/11/18 01:33:28 krw Exp $ */ /* * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom @@ -161,9 +161,6 @@ void ahd_timeout(void*); void ahd_timer_reset(ahd_timer_t *, u_int, ahd_callback_t *, void *); void ahd_scb_timer_reset(struct scb *, u_int); -ahd_callback_t ahd_reset_poll; -ahd_callback_t ahd_stat_timer; - #define ahd_timer_init callout_init #define ahd_timer_stop callout_stop diff --git a/sys/dev/pci/ahd_pci.c b/sys/dev/pci/ahd_pci.c index 3c2d9e413b5..c1184b25c02 100644 --- a/sys/dev/pci/ahd_pci.c +++ b/sys/dev/pci/ahd_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahd_pci.c,v 1.8 2004/11/14 02:32:08 krw Exp $ */ +/* $OpenBSD: ahd_pci.c,v 1.9 2004/11/18 01:33:28 krw Exp $ */ /* * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom @@ -366,9 +366,6 @@ ahd_pci_attach(struct device *parent, struct device *self, void *aux) LIST_INIT(&ahd->pending_scbs); - timeout_set(&ahd->reset_timer, ahd_reset_poll, ahd); - timeout_set(&ahd->stat_timer, ahd_stat_timer, ahd); - ahd->flags = AHD_SPCHK_ENB_A|AHD_RESET_BUS_A|AHD_TERM_ENB_A | AHD_EXTENDED_TRANS_A|AHD_STPWLEVEL_A; ahd->int_coalescing_timer = AHD_INT_COALESCING_TIMER_DEFAULT; |