From owner-p4-projects@FreeBSD.ORG Tue Aug 17 22:32:43 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1FAFE16A4D0; Tue, 17 Aug 2004 22:32:43 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDE7F16A4CE for ; Tue, 17 Aug 2004 22:32:42 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE7D243D31 for ; Tue, 17 Aug 2004 22:32:42 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7HMWgCM088537 for ; Tue, 17 Aug 2004 22:32:42 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7HMWg16088534 for perforce@freebsd.org; Tue, 17 Aug 2004 22:32:42 GMT (envelope-from peter@freebsd.org) Date: Tue, 17 Aug 2004 22:32:42 GMT Message-Id: <200408172232.i7HMWg16088534@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 59941 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2004 22:32:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=59941 Change 59941 by peter@peter_daintree on 2004/08/17 22:32:37 IFC @59940 Affected files ... .. //depot/projects/hammer/contrib/isc-dhcp/client/dhclient.c#11 integrate .. //depot/projects/hammer/lib/libc/locale/wcwidth.3#5 integrate .. //depot/projects/hammer/share/man/man4/uscanner.4#10 integrate .. //depot/projects/hammer/sys/conf/files#75 integrate .. //depot/projects/hammer/sys/conf/options#51 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_cmbat.c#18 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/ahc_eisa.c#11 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/ahc_isa.c#1 branch .. //depot/projects/hammer/sys/dev/aic7xxx/ahc_pci.c#14 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/aic79xx.c#16 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/aic79xx.h#15 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/aic79xx_osm.c#12 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/aic7xxx.c#14 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/aic7xxx.h#8 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/aic7xxx_osm.c#14 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/aic7xxx_osm.h#12 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/aic_osm_lib.c#2 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/aic_osm_lib.h#3 integrate .. //depot/projects/hammer/sys/isa/psm.c#21 integrate .. //depot/projects/hammer/sys/kern/kern_intr.c#28 integrate .. //depot/projects/hammer/sys/modules/aic7xxx/ahc/Makefile#5 integrate .. //depot/projects/hammer/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/aic7xxx/ahc/ahc_isa/Makefile#1 branch .. //depot/projects/hammer/sys/modules/ipfw/Makefile#2 integrate .. //depot/projects/hammer/sys/net/bridge.c#16 integrate .. //depot/projects/hammer/sys/netgraph/ng_bridge.c#12 integrate .. //depot/projects/hammer/sys/netinet/ip_divert.c#20 integrate .. //depot/projects/hammer/sys/netinet/ip_dummynet.c#23 integrate .. //depot/projects/hammer/sys/netinet/ip_dummynet.h#8 integrate .. //depot/projects/hammer/sys/netinet/ip_fastfwd.c#10 integrate .. //depot/projects/hammer/sys/netinet/ip_fw.h#14 integrate .. //depot/projects/hammer/sys/netinet/ip_fw2.c#36 integrate .. //depot/projects/hammer/sys/netinet/ip_fw_pfil.c#1 branch .. //depot/projects/hammer/sys/netinet/ip_input.c#35 integrate .. //depot/projects/hammer/sys/netinet/ip_output.c#33 integrate .. //depot/projects/hammer/sys/netinet/ip_var.h#19 integrate .. //depot/projects/hammer/sys/netinet/raw_ip.c#26 integrate .. //depot/projects/hammer/sys/netinet/tcp_input.c#36 integrate .. //depot/projects/hammer/sys/netinet/tcp_sack.c#3 integrate .. //depot/projects/hammer/sys/sparc64/conf/GENERIC#26 integrate .. //depot/projects/hammer/sys/sparc64/conf/NOTES#8 integrate .. //depot/projects/hammer/sys/sys/mbuf.h#29 integrate .. //depot/projects/hammer/tools/tools/nanobsd/Makefile#5 integrate .. //depot/projects/hammer/tools/tools/nanobsd/customize.sh#1 branch .. //depot/projects/hammer/tools/tools/nanobsd/i386.diskimage#6 integrate .. //depot/projects/hammer/tools/tools/nanobsd/localfiles#1 branch .. //depot/projects/hammer/tools/tools/nanobsd/make.conf#3 integrate Differences ... ==== //depot/projects/hammer/contrib/isc-dhcp/client/dhclient.c#11 (text+ko) ==== @@ -32,7 +32,7 @@ #ifndef lint static char ocopyright[] = -"$FreeBSD: src/contrib/isc-dhcp/client/dhclient.c,v 1.42 2004/08/16 21:26:04 mbr Exp $\n" +"$FreeBSD: src/contrib/isc-dhcp/client/dhclient.c,v 1.43 2004/08/16 22:35:56 mbr Exp $\n" "$Id: dhclient.c,v 1.129.2.19 2004/07/10 00:11:16 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ @@ -2073,6 +2073,9 @@ else oc = (struct option_cache *)0; + if (client->sent_options != 0L) + option_state_dereference (&client -> sent_options, MDL); + make_client_options (client, lease, &request, oc, ((client -> state == S_REQUESTING || client -> state == S_REBOOTING) @@ -2095,7 +2098,6 @@ (struct data_string *)0, client -> config -> vendor_space_name); - option_state_dereference (&client -> sent_options, MDL); if (client -> packet_length < BOOTP_MIN_LEN) client -> packet_length = BOOTP_MIN_LEN; ==== //depot/projects/hammer/lib/libc/locale/wcwidth.3#5 (text+ko) ==== @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/locale/wcwidth.3,v 1.4 2004/08/12 12:32:14 tjr Exp $ +.\" $FreeBSD: src/lib/libc/locale/wcwidth.3,v 1.6 2004/08/17 04:56:03 trhodes Exp $ .\" -.Dd August 12, 2004 +.Dd August 17, 2004 .Dt WCWIDTH 3 .Os .Sh NAME ==== //depot/projects/hammer/share/man/man4/uscanner.4#10 (text+ko) ==== @@ -28,9 +28,9 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/uscanner.4,v 1.14 2004/08/04 08:11:33 blackend Exp $ +.\" $FreeBSD: src/share/man/man4/uscanner.4,v 1.15 2004/08/17 07:44:25 blackend Exp $ .\" -.Dd October 26, 2000 +.Dd August 04, 2004 .Dt USCANNER 4 .Os .Sh NAME ==== //depot/projects/hammer/sys/conf/files#75 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.941 2004/08/16 06:36:20 pjd Exp $ +# $FreeBSD: src/sys/conf/files,v 1.943 2004/08/17 22:05:53 andre Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -318,9 +318,9 @@ dev/aic/aic.c optional aic dev/aic/aic_pccard.c optional aic card dev/aic/aic_pccard.c optional aic pccard -dev/aic7xxx/aic7770.c optional ahc eisa +dev/aic7xxx/aic7770.c optional ahc dev/aic7xxx/ahc_eisa.c optional ahc eisa -#dev/aic7xxx/ahc_isa.c optional ahc isa +dev/aic7xxx/ahc_isa.c optional ahc isa dev/aic7xxx/ahc_pci.c optional ahc pci dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc @@ -1484,6 +1484,7 @@ netinet/ip_encap.c optional inet6 netinet/ip_fastfwd.c optional inet netinet/ip_fw2.c optional ipfirewall +netinet/ip_fw_pfil.c optional ipfirewall netinet/ip_icmp.c optional inet netinet/ip_input.c optional inet netinet/ip_mroute.c optional mrouting ==== //depot/projects/hammer/sys/conf/options#51 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.474 2004/08/16 06:36:20 pjd Exp $ +# $FreeBSD: src/sys/conf/options,v 1.475 2004/08/17 22:05:53 andre Exp $ # # On the handling of kernel options # @@ -347,6 +347,7 @@ IPFIREWALL_VERBOSE opt_ipfw.h IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h IPFIREWALL_DEFAULT_TO_ACCEPT opt_ipfw.h +IPFIREWALL_FORWARD opt_ipfw.h IPV6FIREWALL opt_ip6fw.h IPV6FIREWALL_VERBOSE opt_ip6fw.h IPV6FIREWALL_VERBOSE_LIMIT opt_ip6fw.h ==== //depot/projects/hammer/sys/dev/acpica/acpi_cmbat.c#18 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.35 2004/08/13 06:21:44 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.36 2004/08/17 18:36:07 njl Exp $ */ #include "opt_acpi.h" @@ -274,7 +274,12 @@ acpi_UserNotify("CMBAT", h, notify); - ACPI_SERIAL_BEGIN(cmbat); + /* + * Clear the appropriate last updated time. The next call to retrieve + * the battery status will get the new value for us. We don't need to + * acquire a lock since we are only clearing the time stamp and since + * calling _BST/_BIF can trigger a notify, we could deadlock also. + */ switch (notify) { case ACPI_NOTIFY_DEVICE_CHECK: case ACPI_BATTERY_BST_CHANGE: @@ -287,7 +292,6 @@ default: break; } - ACPI_SERIAL_END(cmbat); } static int ==== //depot/projects/hammer/sys/dev/aic7xxx/ahc_eisa.c#11 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahc_eisa.c,v 1.33 2004/03/17 17:50:25 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahc_eisa.c,v 1.34 2004/08/17 00:14:30 gibbs Exp $"); #include @@ -159,41 +159,6 @@ return (0); } -int -aic7770_map_registers(struct ahc_softc *ahc, u_int unused_ioport_arg) -{ - struct resource *regs; - int rid; - - rid = 0; - regs = bus_alloc_resource_any(ahc->dev_softc, SYS_RES_IOPORT, &rid, - RF_ACTIVE); - if (regs == NULL) { - device_printf(ahc->dev_softc, "Unable to map I/O space?!\n"); - return ENOMEM; - } - ahc->platform_data->regs_res_type = SYS_RES_IOPORT; - ahc->platform_data->regs_res_id = rid, - ahc->platform_data->regs = regs; - ahc->tag = rman_get_bustag(regs); - ahc->bsh = rman_get_bushandle(regs); - return (0); -} - -int -aic7770_map_int(struct ahc_softc *ahc, int irq) -{ - int zero; - - zero = 0; - ahc->platform_data->irq = - bus_alloc_resource_any(ahc->dev_softc, SYS_RES_IRQ, &zero, - RF_ACTIVE); - if (ahc->platform_data->irq == NULL) - return (ENOMEM); - ahc->platform_data->irq_res_type = SYS_RES_IRQ; - return (ahc_map_int(ahc)); -} static device_method_t ahc_eisa_device_methods[] = { /* Device interface */ ==== //depot/projects/hammer/sys/dev/aic7xxx/ahc_pci.c#14 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahc_pci.c,v 1.61 2004/03/17 17:50:25 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahc_pci.c,v 1.62 2004/08/17 00:14:30 gibbs Exp $"); #include @@ -237,22 +237,3 @@ ahc->platform_data->regs = regs; return (0); } - -int -ahc_pci_map_int(struct ahc_softc *ahc) -{ - int zero; - - zero = 0; - ahc->platform_data->irq = - bus_alloc_resource_any(ahc->dev_softc, SYS_RES_IRQ, &zero, - RF_ACTIVE | RF_SHAREABLE); - if (ahc->platform_data->irq == NULL) { - device_printf(ahc->dev_softc, - "bus_alloc_resource() failed to allocate IRQ\n"); - return (ENOMEM); - } - ahc->platform_data->irq_res_type = SYS_RES_IRQ; - return (ahc_map_int(ahc)); -} - ==== //depot/projects/hammer/sys/dev/aic7xxx/aic79xx.c#16 (text+ko) ==== @@ -46,7 +46,7 @@ #include "aicasm/aicasm_insformat.h" #else #include -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx.c,v 1.30 2004/08/04 17:55:33 gibbs Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx.c,v 1.31 2004/08/17 00:14:30 gibbs Exp $"); #include #include #include @@ -8351,9 +8351,14 @@ ahd_queue_scb(ahd, scb); /* * Ensure we have enough time to actually - * retrieve the sense. + * retrieve the sense, but only schedule + * the timer if we are not in recovery or + * this is a recovery SCB that is allowed + * to have an active timer. */ - aic_scb_timer_reset(scb, 5 * 1000000); + if (ahd->scb_data.recovery_scbs == 0 + || (scb->flags & SCB_RECOVERY_SCB) != 0) + aic_scb_timer_reset(scb, 5 * 1000000); break; } case SCSI_STATUS_OK: @@ -9441,15 +9446,6 @@ * In either case (selection or reselection), * we will now issue a target reset to the * timed-out device. - * - * Set the MK_MESSAGE control bit indicating - * that we desire to send a message. We - * also set the disconnected flag since - * in the paging case there is no guarantee - * that our SCB control byte matches the - * version on the card. We don't want the - * sequencer to abort the command thinking - * an unsolicited reselection occurred. */ scb->flags |= SCB_DEVICE_RESET; scb->hscb->cdb_len = 0; ==== //depot/projects/hammer/sys/dev/aic7xxx/aic79xx.h#15 (text+ko) ==== @@ -39,7 +39,7 @@ * * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#107 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.h,v 1.20 2004/08/04 17:55:34 gibbs Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.h,v 1.21 2004/08/17 00:14:30 gibbs Exp $ */ #ifndef _AIC79XX_H_ @@ -667,12 +667,15 @@ */ struct scb *scbindex[AHD_SCB_MAX]; + u_int recovery_scbs; /* Transactions currently in recovery */ + /* * "Bus" addresses of our data structures. */ bus_dma_tag_t hscb_dmat; /* dmat for our hardware SCB array */ bus_dma_tag_t sg_dmat; /* dmat for our sg segments */ bus_dma_tag_t sense_dmat; /* dmat for our sense buffers */ + SLIST_HEAD(, map_node) hscb_maps; SLIST_HEAD(, map_node) sg_maps; SLIST_HEAD(, map_node) sense_maps; @@ -1068,6 +1071,8 @@ uint8_t valid_tag; }; +#define AIC_SCB_DATA(softc) (&(softc)->scb_data) + struct ahd_softc { bus_space_tag_t tags[2]; bus_space_handle_t bshs[2]; ==== //depot/projects/hammer/sys/dev/aic7xxx/aic79xx_osm.c#12 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx_osm.c,v 1.18 2004/08/04 17:55:34 gibbs Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx_osm.c,v 1.19 2004/08/17 00:14:30 gibbs Exp $"); #include #include @@ -263,40 +263,31 @@ } #endif - /* - * If the recovery SCB completes, we have to be - * out of our timeout. - */ if ((scb->flags & SCB_RECOVERY_SCB) != 0) { struct scb *list_scb; - /* - * We were able to complete the command successfully, - * so reinstate the timeouts for all other pending - * commands. - */ - LIST_FOREACH(list_scb, &ahd->pending_scbs, pending_links) { - union ccb *ccb; - uint64_t time; + ahd->scb_data.recovery_scbs--; - ccb = list_scb->io_ctx; - if (ccb->ccb_h.timeout == CAM_TIME_INFINITY) - continue; - - time = ccb->ccb_h.timeout; - time *= hz; - time /= 1000; - ccb->ccb_h.timeout_ch = - timeout(ahd_platform_timeout, list_scb, time); - } - if (aic_get_transaction_status(scb) == CAM_BDR_SENT || aic_get_transaction_status(scb) == CAM_REQ_ABORTED) aic_set_transaction_status(scb, CAM_CMD_TIMEOUT); - ahd_print_path(ahd, scb); - printf("no longer in timeout, status = %x\n", - ccb->ccb_h.status); + if (ahd->scb_data.recovery_scbs == 0) { + /* + * All recovery actions have completed successfully, + * so reinstate the timeouts for all other pending + * commands. + */ + LIST_FOREACH(list_scb, + &ahd->pending_scbs, pending_links) { + + aic_scb_timer_reset(scb, aic_get_timeout(scb)); + } + + ahd_print_path(ahd, scb); + printf("no longer in timeout, status = %x\n", + ccb->ccb_h.status); + } } /* Don't clobber any existing error state */ @@ -1123,18 +1114,7 @@ ccb->ccb_h.status |= CAM_SIM_QUEUED; - if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { - uint64_t time; - - if (ccb->ccb_h.timeout == CAM_TIME_DEFAULT) - ccb->ccb_h.timeout = 5 * 1000; - - time = ccb->ccb_h.timeout; - time *= hz; - time /= 1000; - ccb->ccb_h.timeout_ch = - timeout(ahd_platform_timeout, (caddr_t)scb, time); - } + aic_scb_timer_start(scb); if ((scb->flags & SCB_TARGET_IMMEDIATE) != 0) { /* Define a mapping from our tag to the SCB. */ ==== //depot/projects/hammer/sys/dev/aic7xxx/aic7xxx.c#14 (text+ko) ==== @@ -46,7 +46,7 @@ #include "aicasm/aicasm_insformat.h" #else #include -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx.c,v 1.101 2004/08/13 21:39:14 gibbs Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx.c,v 1.102 2004/08/17 00:14:30 gibbs Exp $"); #include #include #include @@ -377,6 +377,9 @@ if ((scb = TAILQ_FIRST(queue)) != NULL && (scb->flags & SCB_ACTIVE) == 0) { scb->flags |= SCB_ACTIVE; + /* + * Timers are disabled while recovery is in progress. + */ aic_scb_timer_start(scb); ahc_queue_scb(ahc, scb); } @@ -578,9 +581,14 @@ ahc_outb(ahc, RETURN_1, SEND_SENSE); /* * Ensure we have enough time to actually - * retrieve the sense. + * retrieve the sense, but only schedule + * the timer if we are not in recovery or + * this is a recovery SCB that is allowed + * to have an active timer. */ - aic_scb_timer_reset(scb, 5 * 1000000); + if (ahc->scb_data->recovery_scbs == 0 + || (scb->flags & SCB_RECOVERY_SCB) != 0) + aic_scb_timer_reset(scb, 5 * 1000000); break; } default: ==== //depot/projects/hammer/sys/dev/aic7xxx/aic7xxx.h#8 (text+ko) ==== @@ -39,7 +39,7 @@ * * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#85 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.h,v 1.50 2003/12/17 00:02:09 gibbs Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.h,v 1.51 2004/08/17 00:14:31 gibbs Exp $ */ #ifndef _AIC7XXX_H_ @@ -613,6 +613,8 @@ struct scb *scbarray; /* Array of kernel SCBs */ struct scsi_sense_data *sense; /* Per SCB sense data */ + u_int recovery_scbs; /* Transactions currently in recovery */ + /* * "Bus" addresses of our data structures. */ @@ -920,6 +922,8 @@ typedef int (*ahc_bus_resume_t)(struct ahc_softc *); typedef void ahc_callback_t (void *); +#define AIC_SCB_DATA(softc) ((softc)->scb_data) + struct ahc_softc { bus_space_tag_t tag; bus_space_handle_t bsh; ==== //depot/projects/hammer/sys/dev/aic7xxx/aic7xxx_osm.c#14 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx_osm.c,v 1.40 2004/07/15 08:26:00 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx_osm.c,v 1.41 2004/08/17 00:14:31 gibbs Exp $"); #include #include @@ -90,6 +90,20 @@ ahc_map_int(struct ahc_softc *ahc) { int error; + int zero; + int shareable; + + zero = 0; + shareable = (ahc->flags & AHC_EDGE_INTERRUPT) ? 0: RF_SHAREABLE; + ahc->platform_data->irq = + bus_alloc_resource_any(ahc->dev_softc, SYS_RES_IRQ, &zero, + RF_ACTIVE | shareable); + if (ahc->platform_data->irq == NULL) { + device_printf(ahc->dev_softc, + "bus_alloc_resource() failed to allocate IRQ\n"); + return (ENOMEM); + } + ahc->platform_data->irq_res_type = SYS_RES_IRQ; /* Hook up our interrupt handler */ error = bus_setup_intr(ahc->dev_softc, ahc->platform_data->irq, @@ -102,6 +116,27 @@ return (error); } +int +aic7770_map_registers(struct ahc_softc *ahc, u_int unused_ioport_arg) +{ + struct resource *regs; + int rid; + + rid = 0; + regs = bus_alloc_resource_any(ahc->dev_softc, SYS_RES_IOPORT, &rid, + RF_ACTIVE); + if (regs == NULL) { + device_printf(ahc->dev_softc, "Unable to map I/O space?!\n"); + return ENOMEM; + } + ahc->platform_data->regs_res_type = SYS_RES_IOPORT; + ahc->platform_data->regs_res_id = rid, + ahc->platform_data->regs = regs; + ahc->tag = rman_get_bustag(regs); + ahc->bsh = rman_get_bushandle(regs); + return (0); +} + /* * Attach all the sub-devices we can find */ @@ -346,22 +381,28 @@ if ((scb->flags & SCB_RECOVERY_SCB) != 0) { struct scb *list_scb; - /* - * We were able to complete the command successfully, - * so renew the timeouts for all other pending - * commands. - */ - LIST_FOREACH(list_scb, &ahc->pending_scbs, pending_links) { - - aic_scb_timer_reset(scb, aic_get_timeout(scb)); - } + ahc->scb_data->recovery_scbs--; if (aic_get_transaction_status(scb) == CAM_BDR_SENT || aic_get_transaction_status(scb) == CAM_REQ_ABORTED) aic_set_transaction_status(scb, CAM_CMD_TIMEOUT); - ahc_print_path(ahc, scb); - printf("no longer in timeout, status = %x\n", - ccb->ccb_h.status); + + if (ahc->scb_data->recovery_scbs == 0) { + /* + * All recovery actions have completed successfully, + * so reinstate the timeouts for all other pending + * commands. + */ + LIST_FOREACH(list_scb, &ahc->pending_scbs, + pending_links) { + + aic_scb_timer_reset(scb, aic_get_timeout(scb)); + } + + ahc_print_path(ahc, scb); + printf("no longer in timeout, status = %x\n", + ccb->ccb_h.status); + } } /* Don't clobber any existing error state */ @@ -1230,19 +1271,6 @@ ccb->ccb_h.status |= CAM_SIM_QUEUED; - if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { - uint64_t time; - - if (ccb->ccb_h.timeout == CAM_TIME_DEFAULT) - ccb->ccb_h.timeout = 5 * 1000; - - time = ccb->ccb_h.timeout; - time *= hz; - time /= 1000; - ccb->ccb_h.timeout_ch = - timeout(ahc_platform_timeout, (caddr_t)scb, time); - } - /* * We only allow one untagged transaction * per target in the initiator role unless @@ -1265,6 +1293,11 @@ } scb->flags |= SCB_ACTIVE; + /* + * Timers are disabled while recovery is in progress. + */ + aic_scb_timer_start(scb); + if ((scb->flags & SCB_TARGET_IMMEDIATE) != 0) { /* Define a mapping from our tag to the SCB. */ ahc->scb_data->scbindex[scb->hscb->tag] = scb; ==== //depot/projects/hammer/sys/dev/aic7xxx/aic7xxx_osm.h#12 (text+ko) ==== @@ -31,7 +31,7 @@ * * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic7xxx_osm.h#18 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_osm.h,v 1.26 2004/05/30 20:08:24 phk Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_osm.h,v 1.27 2004/08/17 00:14:31 gibbs Exp $ */ #ifndef _AIC7XXX_FREEBSD_H_ @@ -256,15 +256,35 @@ { } +/************************* Initialization/Teardown ****************************/ +int ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg); +void ahc_platform_free(struct ahc_softc *ahc); +int ahc_map_int(struct ahc_softc *ahc); +int ahc_attach(struct ahc_softc *); +int ahc_softc_comp(struct ahc_softc *lahc, struct ahc_softc *rahc); +int ahc_detach(device_t); + /********************************** PCI ***************************************/ #ifdef AIC_PCI_CONFIG int ahc_pci_map_registers(struct ahc_softc *ahc); -int ahc_pci_map_int(struct ahc_softc *ahc); +#define ahc_pci_map_int ahc_map_int #endif /*AIC_PCI_CONFIG*/ /******************************** VL/EISA *************************************/ int aic7770_map_registers(struct ahc_softc *ahc, u_int port); -int aic7770_map_int(struct ahc_softc *ahc, int irq); +static __inline int aic7770_map_int(struct ahc_softc *, int); + +static __inline int +aic7770_map_int(struct ahc_softc *ahc, int irq) +{ + /* + * The IRQ is unused in the FreeBSD + * implementation since the EISA and + * ISA attachments register the IRQ + * with newbus before the core is called. + */ + return ahc_map_int(ahc); +} /********************************* Debug **************************************/ static __inline void ahc_print_path(struct ahc_softc *, struct scb *); @@ -287,14 +307,6 @@ void ahc_platform_set_tags(struct ahc_softc *, struct ahc_devinfo *, int /*enable*/); -/************************* Initialization/Teardown ****************************/ -int ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg); -void ahc_platform_free(struct ahc_softc *ahc); -int ahc_map_int(struct ahc_softc *ahc); -int ahc_attach(struct ahc_softc *); -int ahc_softc_comp(struct ahc_softc *lahc, struct ahc_softc *rahc); -int ahc_detach(device_t); - /****************************** Interrupts ************************************/ void ahc_platform_intr(void *); static __inline void ahc_platform_flushwork(struct ahc_softc *ahc); ==== //depot/projects/hammer/sys/dev/aic7xxx/aic_osm_lib.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic_osm_lib.c,v 1.2 2003/12/19 18:34:30 gibbs Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic_osm_lib.c,v 1.3 2004/08/17 00:14:31 gibbs Exp $"); static void aic_recovery_thread(void *arg); @@ -46,15 +46,7 @@ scb->flags |= SCB_RECOVERY_SCB; - /* - * Take all queued, but not sent SCBs out of the equation. - * Also ensure that no new CCBs are queued to us while we - * try to fix this problem. - */ - if ((scb->io_ctx->ccb_h.status & CAM_RELEASE_SIMQ) == 0) { - xpt_freeze_simq(SCB_GET_SIM(aic, scb), /*count*/1); - scb->io_ctx->ccb_h.status |= CAM_RELEASE_SIMQ; - } + AIC_SCB_DATA(aic)->recovery_scbs++; /* * Go through all of our pending SCBs and remove ==== //depot/projects/hammer/sys/dev/aic7xxx/aic_osm_lib.h#3 (text+ko) ==== @@ -32,7 +32,7 @@ * * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic_osm_lib.h#5 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aic_osm_lib.h,v 1.2 2004/05/11 20:33:42 gibbs Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aic_osm_lib.h,v 1.3 2004/08/17 00:14:31 gibbs Exp $ */ /******************************** OS Includes *********************************/ @@ -223,7 +223,8 @@ aic_scb_timer_start(struct scb *scb) { - if (scb->io_ctx->ccb_h.timeout != CAM_TIME_INFINITY) { + if (AIC_SCB_DATA(scb->aic_softc)->recovery_scbs == 0 + && scb->io_ctx->ccb_h.timeout != CAM_TIME_INFINITY) { uint64_t time; time = scb->io_ctx->ccb_h.timeout; ==== //depot/projects/hammer/sys/isa/psm.c#21 (text+ko) ==== @@ -59,7 +59,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/isa/psm.c,v 1.78 2004/08/16 20:19:09 philip Exp $"); +__FBSDID("$FreeBSD: src/sys/isa/psm.c,v 1.79 2004/08/17 18:12:37 gibbs Exp $"); #include "opt_psm.h" @@ -200,6 +200,7 @@ #define PSM_OPEN 1 /* Device is open */ #define PSM_ASLP 2 /* Waiting for mouse data */ #define PSM_SOFTARMED 4 /* Software interrupt armed */ +#define PSM_NEED_SYNCBITS 8 /* Set syncbits using next data pkt */ /* driver configuration flags (config) */ #define PSM_CONFIG_RESOLUTION 0x000f /* resolution */ @@ -739,16 +740,8 @@ set_mouse_mode(kbdc); } - /* request a data packet and extract sync. bits */ - if (get_mouse_status(kbdc, stat, 1, 3) < 3) { - log(LOG_DEBUG, "psm%d: failed to get data (doinitialize).\n", - sc->unit); - sc->mode.syncmask[0] = 0; - } else { - sc->mode.syncmask[1] = stat[0] & sc->mode.syncmask[0]; /* syncbits */ - /* the NetScroll Mouse will send three more bytes... Ignore them */ - empty_aux_buffer(kbdc, 5); - } + /* Record sync on the next data packet we see. */ + sc->flags |= PSM_NEED_SYNCBITS; /* just check the status of the mouse */ if (get_mouse_status(kbdc, stat, 0, 3) < 3) @@ -890,7 +883,8 @@ (c & KBD_KBD_CONTROL_BITS) | KBD_DISABLE_AUX_PORT | KBD_DISABLE_AUX_INT)) { /* CONTROLLER ERROR */ - log(LOG_ERR, "psm%d: failed to disable the aux port (reinitialize).\n", + log(LOG_ERR, + "psm%d: failed to disable the aux port (reinitialize).\n", sc->unit); err = EIO; } @@ -1209,15 +1203,8 @@ } set_mouse_scaling(sc->kbdc, 1); - /* request a data packet and extract sync. bits */ - if (get_mouse_status(sc->kbdc, stat, 1, 3) < 3) { - printf("psm%d: failed to get data.\n", unit); - sc->mode.syncmask[0] = 0; - } else { - sc->mode.syncmask[1] = stat[0] & sc->mode.syncmask[0]; /* syncbits */ - /* the NetScroll Mouse will send three more bytes... Ignore them */ - empty_aux_buffer(sc->kbdc, 5); - } + /* Record sync on the next data packet we see. */ + sc->flags |= PSM_NEED_SYNCBITS; /* just check the status of the mouse */ /* @@ -2081,6 +2068,11 @@ c = pb->ipacket[0]; if ((c & sc->mode.syncmask[0]) != sc->mode.syncmask[1]) { + if ((sc->flags & PSM_NEED_SYNCBITS) != 0) { + sc->mode.syncmask[1] = (c & sc->mode.syncmask[0]); + sc->flags &= ~PSM_NEED_SYNCBITS; + goto valid_sync; + } #if DEBUG log(LOG_DEBUG, "psmintr: out of sync (%04x != %04x) %d" " cmds since last error.\n", @@ -2119,6 +2111,7 @@ } continue; } +valid_sync: /* if this packet is at all bogus then drop the packet. */ if (haderror || !timeelapsed(&sc->lastinputerr, psmerrsecs, psmerrusecs, &now)) { ==== //depot/projects/hammer/sys/kern/kern_intr.c#28 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_intr.c,v 1.112 2004/08/06 03:39:28 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_intr.c,v 1.113 2004/08/17 04:09:09 rwatson Exp $"); #include "opt_ddb.h" @@ -556,6 +556,9 @@ * on some machines, but we don't * want to always delay, so only delay * while warming up. + * + * XXXRW: Calling DELAY() in the interrupt + * path surely needs to be revisited. */ if (warming != 0) { DELAY(1); ==== //depot/projects/hammer/sys/modules/aic7xxx/ahc/Makefile#5 (text+ko) ==== @@ -1,9 +1,9 @@ -# $FreeBSD: src/sys/modules/aic7xxx/ahc/Makefile,v 1.4 2003/01/22 21:56:54 gibbs Exp $ +# $FreeBSD: src/sys/modules/aic7xxx/ahc/Makefile,v 1.5 2004/08/17 00:14:31 gibbs Exp $ .PATH: ${.CURDIR}/../../../dev/aic7xxx KMOD= ahc -SUBDIR= ahc_eisa ahc_pci +SUBDIR= ahc_eisa ahc_isa ahc_pci GENSRCS= aic7xxx_{seq,reg}.h AHC_REG_PRETTY_PRINT=1 @@ -29,7 +29,7 @@ ${.CURDIR}/../../../dev/aic7xxx/aic7xxx.seq SRCS= ${GENSRCS} -SRCS+= aic7xxx.c aic7xxx_93cx6.c aic7xxx_osm.c +SRCS+= aic7xxx.c aic7xxx_93cx6.c aic7xxx_osm.c aic7770.c SRCS+= opt_scsi.h opt_aic7xxx.h opt_cam.h SRCS+= device_if.h bus_if.h pci_if.h ==== //depot/projects/hammer/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ -# $FreeBSD: src/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile,v 1.2 2004/06/09 21:51:02 imp Exp $ +# $FreeBSD: src/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile,v 1.3 2004/08/17 00:14:31 gibbs Exp $ .PATH: ${.CURDIR}/../../../../dev/aic7xxx KMOD= ahc_eisa @@ -7,8 +7,8 @@ ../aic7xxx_reg.h: ( cd .. ; ${MAKE} aic7xxx_reg.h ) -SRCS= ahc_eisa.c aic7770.c ../aic7xxx_reg.h -SRCS+= device_if.h bus_if.h pci_if.h eisa_if.h +SRCS= ahc_eisa.c ../aic7xxx_reg.h +SRCS+= device_if.h bus_if.h eisa_if.h SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h CFLAGS+= -I${.CURDIR}/../../../../dev/aic7xxx -I.. ==== //depot/projects/hammer/sys/modules/ipfw/Makefile#2 (text+ko) ==== @@ -1,9 +1,9 @@ -# $FreeBSD: src/sys/modules/ipfw/Makefile,v 1.16 2002/06/28 08:10:07 julian Exp $ +# $FreeBSD: src/sys/modules/ipfw/Makefile,v 1.17 2004/08/17 22:05:53 andre Exp $ .PATH: ${.CURDIR}/../../netinet KMOD= ipfw -SRCS= ip_fw2.c +SRCS= ip_fw2.c ip_fw_pfil.c CFLAGS+= -DIPFIREWALL # ==== //depot/projects/hammer/sys/net/bridge.c#16 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/net/bridge.c,v 1.81 2004/07/05 16:28:31 rwatson Exp $ + * $FreeBSD: src/sys/net/bridge.c,v 1.82 2004/08/17 22:05:53 andre Exp $ */ /* @@ -1003,6 +1003,7 @@ * NetBSD-style generic packet filter, pfil(9), hooks. * Enables ipf(8) in bridging. */ + if (!IPFW_LOADED) { /* XXX: Prevent ipfw from being run twice. */ if (inet_pfil_hook.ph_busy_count >= 0 && m0->m_pkthdr.len >= sizeof(struct ip) && ntohs(save_eh.ether_type) == ETHERTYPE_IP) { @@ -1029,6 +1030,7 @@ ip->ip_len = htons(ip->ip_len); ip->ip_off = htons(ip->ip_off); } + } /* XXX: Prevent ipfw from being run twice. */ #endif /* PFIL_HOOKS */ /* ==== //depot/projects/hammer/sys/netgraph/ng_bridge.c#12 (text+ko) ==== @@ -36,7 +36,7 @@ * * Author: Archie Cobbs * - * $FreeBSD: src/sys/netgraph/ng_bridge.c,v 1.27 2004/07/20 17:15:37 julian Exp $ + * $FreeBSD: src/sys/netgraph/ng_bridge.c,v 1.28 2004/08/17 22:05:53 andre Exp $ */ /* @@ -629,9 +629,11 @@ } /* Run packet through ipfw processing, if enabled */ +#if 0 if (priv->conf.ipfw[linkNum] && fw_enable && ip_fw_chk_ptr != NULL) { /* XXX not implemented yet */ } +#endif /* * If unicast and destination host known, deliver to host's link, ==== //depot/projects/hammer/sys/netinet/ip_divert.c#20 (text+ko) ==== @@ -26,7 +26,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<<