From owner-svn-src-stable-6@FreeBSD.ORG Tue Oct 27 14:36:37 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABB6C106568F; Tue, 27 Oct 2009 14:36:37 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FB1B8FC27; Tue, 27 Oct 2009 14:36:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9REabiY033818; Tue, 27 Oct 2009 14:36:37 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9REabY7033817; Tue, 27 Oct 2009 14:36:37 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <200910271436.n9REabY7033817@svn.freebsd.org> From: Andrew Gallatin Date: Tue, 27 Oct 2009 14:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198517 - in stable/6/sys: . conf contrib/pf dev/cxgb X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2009 14:36:37 -0000 Author: gallatin Date: Tue Oct 27 14:36:37 2009 New Revision: 198517 URL: http://svn.freebsd.org/changeset/base/198517 Log: MFC of r178332 - Unbreak firmware.ko build without kernel Actual patch was comitted in r198447; this just updates svn props Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) From owner-svn-src-stable-6@FreeBSD.ORG Tue Oct 27 18:30:56 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A3CB10656AA; Tue, 27 Oct 2009 18:30:56 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 874B58FC34; Tue, 27 Oct 2009 18:30:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9RIUuOh038826; Tue, 27 Oct 2009 18:30:56 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9RIUuWA038823; Tue, 27 Oct 2009 18:30:56 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <200910271830.n9RIUuWA038823@svn.freebsd.org> From: Andrew Gallatin Date: Tue, 27 Oct 2009 18:30:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198524 - in stable/6/sys: . conf contrib/pf dev/cxgb dev/mxge X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2009 18:30:56 -0000 Author: gallatin Date: Tue Oct 27 18:30:56 2009 New Revision: 198524 URL: http://svn.freebsd.org/changeset/base/198524 Log: MFC: recent mxge watchdog improvements: 194909: add a dying flag (as a dependency) 198250: Move mxge(4)'s NIC watchdog reset handler to a taskqueue 198303: Check config space to react more quickly to failures Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) stable/6/sys/dev/mxge/if_mxge.c stable/6/sys/dev/mxge/if_mxge_var.h Modified: stable/6/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/6/sys/dev/mxge/if_mxge.c Tue Oct 27 18:30:26 2009 (r198523) +++ stable/6/sys/dev/mxge/if_mxge.c Tue Oct 27 18:30:56 2009 (r198524) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -3368,7 +3369,6 @@ mxge_open(mxge_softc_t *sc) } sc->ifp->if_drv_flags |= IFF_DRV_RUNNING; sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - callout_reset(&sc->co_hdl, mxge_ticks, mxge_tick, sc); return 0; @@ -3385,15 +3385,13 @@ mxge_close(mxge_softc_t *sc, int down) mxge_cmd_t cmd; int err, old_down_cnt; - callout_stop(&sc->co_hdl); sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; if (!down) { old_down_cnt = sc->down_cnt; mb(); err = mxge_send_cmd(sc, MXGEFW_CMD_ETHERNET_DOWN, &cmd); if (err) { - device_printf(sc->dev, - "Couldn't bring down link\n"); + device_printf(sc->dev, "Couldn't bring down link\n"); } if (old_down_cnt == sc->down_cnt) { /* wait for down irq */ @@ -3458,7 +3456,7 @@ mxge_read_reboot(mxge_softc_t *sc) return (pci_read_config(dev, vs + 0x14, 4)); } -static int +static void mxge_watchdog_reset(mxge_softc_t *sc) { struct pci_devinfo *dinfo; @@ -3489,7 +3487,6 @@ mxge_watchdog_reset(mxge_softc_t *sc) cmd = pci_read_config(sc->dev, PCIR_COMMAND, 2); if (cmd == 0xffff) { device_printf(sc->dev, "NIC disappeared!\n"); - return (err); } } if ((cmd & PCIM_CMD_BUSMASTEREN) == 0) { @@ -3548,18 +3545,40 @@ mxge_watchdog_reset(mxge_softc_t *sc) } sc->watchdog_resets++; } else { - device_printf(sc->dev, "NIC did not reboot, ring state:\n"); - device_printf(sc->dev, "tx.req=%d tx.done=%d\n", - sc->ss->tx.req, sc->ss->tx.done); - device_printf(sc->dev, "pkt_done=%d fw=%d\n", - sc->ss->tx.pkt_done, - be32toh(sc->ss->fw_stats->send_done_count)); - device_printf(sc->dev, "not resetting\n"); + device_printf(sc->dev, + "NIC did not reboot, not resetting\n"); + err = 0; } - if (err) + if (err) { device_printf(sc->dev, "watchdog reset failed\n"); + } else { + if (sc->dying == 2) + sc->dying = 0; + callout_reset(&sc->co_hdl, mxge_ticks, mxge_tick, sc); + } +} - return (err); +static void +mxge_watchdog_task(void *arg, int pending) +{ + mxge_softc_t *sc = arg; + + + mtx_lock(&sc->driver_mtx); + mxge_watchdog_reset(sc); + mtx_unlock(&sc->driver_mtx); +} + +static void +mxge_warn_stuck(mxge_softc_t *sc, mxge_tx_ring_t *tx, int slice) +{ + tx = &sc->ss[slice].tx; + device_printf(sc->dev, "slice %d struck? ring state:\n", slice); + device_printf(sc->dev, "tx.req=%d tx.done=%d\n", + tx->req, tx->done); + device_printf(sc->dev, "pkt_done=%d fw=%d\n", + tx->pkt_done, + be32toh(sc->ss->fw_stats->send_done_count)); } static int @@ -3575,11 +3594,14 @@ mxge_watchdog(mxge_softc_t *sc) tx->watchdog_req != tx->watchdog_done && tx->done == tx->watchdog_done) { /* check for pause blocking before resetting */ - if (tx->watchdog_rx_pause == rx_pause) - err = mxge_watchdog_reset(sc); - else + if (tx->watchdog_rx_pause == rx_pause) { + mxge_warn_stuck(sc, tx, 0); + taskqueue_enqueue(sc->tq, &sc->watchdog_task); + return (ENXIO); + } else { device_printf(sc->dev, "Flow control blocking " "xmits, check link partner\n"); + } } tx->watchdog_req = tx->req; @@ -3591,7 +3613,7 @@ mxge_watchdog(mxge_softc_t *sc) return (err); } -static void +static u_long mxge_update_stats(mxge_softc_t *sc) { struct mxge_slice_state *ss; @@ -3603,23 +3625,45 @@ mxge_update_stats(mxge_softc_t *sc) ipackets += ss->ipackets; } sc->ifp->if_ipackets = ipackets; - + return ipackets; } + static void mxge_tick(void *arg) { mxge_softc_t *sc = arg; + u_long pkts = 0; int err = 0; + int running, ticks; + uint16_t cmd; - /* aggregate stats from different slices */ - mxge_update_stats(sc); - if (!sc->watchdog_countdown) { - err = mxge_watchdog(sc); - sc->watchdog_countdown = 4; + ticks = mxge_ticks; + mtx_lock(&sc->driver_mtx); + running = sc->ifp->if_drv_flags & IFF_DRV_RUNNING; + mtx_unlock(&sc->driver_mtx); + if (running) { + /* aggregate stats from different slices */ + pkts = mxge_update_stats(sc); + if (!sc->watchdog_countdown) { + err = mxge_watchdog(sc); + sc->watchdog_countdown = 4; + } + sc->watchdog_countdown--; + } + if (pkts == 0) { + /* ensure NIC did not suffer h/w fault while idle */ + cmd = pci_read_config(sc->dev, PCIR_COMMAND, 2); + if ((cmd & PCIM_CMD_BUSMASTEREN) == 0) { + sc->dying = 2; + taskqueue_enqueue(sc->tq, &sc->watchdog_task); + err = ENXIO; + } + /* look less often if NIC is idle */ + ticks *= 4; } - sc->watchdog_countdown--; + if (err == 0) - callout_reset(&sc->co_hdl, mxge_ticks, mxge_tick, sc); + callout_reset(&sc->co_hdl, ticks, mxge_tick, sc); } @@ -3690,6 +3734,10 @@ mxge_ioctl(struct ifnet *ifp, u_long com case SIOCSIFFLAGS: mtx_lock(&sc->driver_mtx); + if (sc->dying) { + mtx_unlock(&sc->driver_mtx); + return EINVAL; + } if (ifp->if_flags & IFF_UP) { if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { err = mxge_open(sc); @@ -4212,6 +4260,17 @@ mxge_attach(device_t dev) sc->dev = dev; mxge_fetch_tunables(sc); + TASK_INIT(&sc->watchdog_task, 1, mxge_watchdog_task, sc); + sc->tq = taskqueue_create_fast("mxge_taskq", M_WAITOK, + taskqueue_thread_enqueue, + &sc->tq); + if (sc->tq == NULL) { + err = ENOMEM; + goto abort_with_nothing; + } + taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq", + device_get_nameunit(sc->dev)); + err = bus_dma_tag_create(NULL, /* parent */ 1, /* alignment */ 0, /* boundary */ @@ -4228,7 +4287,7 @@ mxge_attach(device_t dev) if (err != 0) { device_printf(sc->dev, "Err %d allocating parent dmat\n", err); - goto abort_with_nothing; + goto abort_with_tq; } ifp = sc->ifp = if_alloc(IFT_ETHER); @@ -4355,12 +4414,14 @@ mxge_attach(device_t dev) mxge_media_status); mxge_set_media(sc, IFM_ETHER | IFM_AUTO); mxge_media_probe(sc); + sc->dying = 0; ether_ifattach(ifp, sc->mac_addr); /* ether_ifattach sets mtu to 1500 */ if (ifp->if_capabilities & IFCAP_JUMBO_MTU) ifp->if_mtu = 9000; mxge_add_sysctls(sc); + callout_reset(&sc->co_hdl, mxge_ticks, mxge_tick, sc); return 0; abort_with_rings: @@ -4382,7 +4443,12 @@ abort_with_lock: if_free(ifp); abort_with_parent_dmat: bus_dma_tag_destroy(sc->parent_dmat); - +abort_with_tq: + if (sc->tq != NULL) { + taskqueue_drain(sc->tq, &sc->watchdog_task); + taskqueue_free(sc->tq); + sc->tq = NULL; + } abort_with_nothing: return err; } @@ -4398,10 +4464,16 @@ mxge_detach(device_t dev) return EBUSY; } mtx_lock(&sc->driver_mtx); + sc->dying = 1; if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) mxge_close(sc, 0); mtx_unlock(&sc->driver_mtx); ether_ifdetach(sc->ifp); + if (sc->tq != NULL) { + taskqueue_drain(sc->tq, &sc->watchdog_task); + taskqueue_free(sc->tq); + sc->tq = NULL; + } callout_drain(&sc->co_hdl); ifmedia_removeall(&sc->media); mxge_dummy_rdma(sc, 0); Modified: stable/6/sys/dev/mxge/if_mxge_var.h ============================================================================== --- stable/6/sys/dev/mxge/if_mxge_var.h Tue Oct 27 18:30:26 2009 (r198523) +++ stable/6/sys/dev/mxge/if_mxge_var.h Tue Oct 27 18:30:56 2009 (r198524) @@ -247,8 +247,11 @@ struct mxge_softc { int need_media_probe; int num_slices; int rx_ring_size; + int dying; mxge_dma_t dmabench_dma; struct callout co_hdl; + struct taskqueue *tq; + struct task watchdog_task; struct sysctl_oid *slice_sysctl_tree; struct sysctl_ctx_list slice_sysctl_ctx; char *mac_addr_string; From owner-svn-src-stable-6@FreeBSD.ORG Tue Oct 27 21:02:43 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 031DD1065670; Tue, 27 Oct 2009 21:02:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC9188FC13; Tue, 27 Oct 2009 21:02:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9RL2g2N041923; Tue, 27 Oct 2009 21:02:42 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9RL2gWN041919; Tue, 27 Oct 2009 21:02:42 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200910272102.n9RL2gWN041919@svn.freebsd.org> From: Ed Maste Date: Tue, 27 Oct 2009 21:02:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198528 - in stable/6/sys: . conf contrib/pf dev/aac dev/cxgb X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2009 21:02:43 -0000 Author: emaste Date: Tue Oct 27 21:02:42 2009 New Revision: 198528 URL: http://svn.freebsd.org/changeset/base/198528 Log: MFC r188743,r188940 Use outbound message register 0 instead of mailbox 7 in aac_{rx,rkt}_get_fwstatus, as done in Adaptec's vendor driver as well as the Linux drivers. Submitted by: jkim, from Adaptec's driver == SVN rev 188743 modified aac_rx_get_fwstatus to use the AAC_RX_OMR0 register instead of AAC_RX_FWSTATUS, as that is the way it's done in Adaptec's vendor driver and in the Linux drivers. (The same applies to aac_rkt_get_fwstatus as well.) However, a concern has been raised about the compatibility of this change and old hardware / firmware versions. In the absense of specific information, revert to the original behaviour if the firmware does not support the "New comm." interface. Users of old cards or firmware haven't reported the problems that are potentially solved by switching to OMR0. Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/aac/aac.c stable/6/sys/dev/aac/aacreg.h stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/aac/aac.c ============================================================================== --- stable/6/sys/dev/aac/aac.c Tue Oct 27 20:41:55 2009 (r198527) +++ stable/6/sys/dev/aac/aac.c Tue Oct 27 21:02:42 2009 (r198528) @@ -2373,7 +2373,8 @@ aac_rx_get_fwstatus(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_FWSTATUS)); + return(AAC_GETREG4(sc, sc->flags & AAC_FLAGS_NEW_COMM ? + AAC_RX_OMR0 : AAC_RX_FWSTATUS)); } static int @@ -2392,7 +2393,8 @@ aac_rkt_get_fwstatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_FWSTATUS)); + return(AAC_GETREG4(sc, sc->flags & AAC_FLAGS_NEW_COMM ? + AAC_RKT_OMR0 : AAC_RKT_FWSTATUS)); } /* Modified: stable/6/sys/dev/aac/aacreg.h ============================================================================== --- stable/6/sys/dev/aac/aacreg.h Tue Oct 27 20:41:55 2009 (r198527) +++ stable/6/sys/dev/aac/aacreg.h Tue Oct 27 21:02:42 2009 (r198528) @@ -1495,6 +1495,8 @@ enum { * and other related adapters. */ +#define AAC_RX_OMR0 0x18 /* outbound message register 0 */ +#define AAC_RX_OMR1 0x1c /* outbound message register 1 */ #define AAC_RX_IDBR 0x20 /* inbound doorbell register */ #define AAC_RX_IISR 0x24 /* inbound interrupt status register */ #define AAC_RX_IIMR 0x28 /* inbound interrupt mask register */ @@ -1512,6 +1514,8 @@ enum { * Unsurprisingly, it's quite similar to the i960! */ +#define AAC_RKT_OMR0 0x18 /* outbound message register 0 */ +#define AAC_RKT_OMR1 0x1c /* outbound message register 1 */ #define AAC_RKT_IDBR 0x20 /* inbound doorbell register */ #define AAC_RKT_IISR 0x24 /* inbound interrupt status register */ #define AAC_RKT_IIMR 0x28 /* inbound interrupt mask register */ From owner-svn-src-stable-6@FreeBSD.ORG Wed Oct 28 01:53:26 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B383106568F; Wed, 28 Oct 2009 01:53:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18C928FC17; Wed, 28 Oct 2009 01:53:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9S1rPZj047293; Wed, 28 Oct 2009 01:53:25 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9S1rPN3047291; Wed, 28 Oct 2009 01:53:25 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200910280153.n9S1rPN3047291@svn.freebsd.org> From: Ed Maste Date: Wed, 28 Oct 2009 01:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198532 - in stable/6/sys: . conf contrib/pf dev/aac dev/cxgb X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 01:53:26 -0000 Author: emaste Date: Wed Oct 28 01:53:25 2009 New Revision: 198532 URL: http://svn.freebsd.org/changeset/base/198532 Log: MFC r180072,182967 Add explicit PCI IDs for the following Adaptec RAID Series 2 adapters: Adaptec RAID 2045 Adaptec RAID 2405 Adaptec RAID 2445 Adaptec RAID 2805 Correct whitespace. Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/aac/aac_pci.c stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/aac/aac_pci.c ============================================================================== --- stable/6/sys/dev/aac/aac_pci.c Wed Oct 28 00:01:20 2009 (r198531) +++ stable/6/sys/dev/aac/aac_pci.c Wed Oct 28 01:53:25 2009 (r198532) @@ -245,7 +245,15 @@ struct aac_ident {0x9005, 0x0285, 0x9005, 0x02d0, AAC_HWIF_I960RX, 0, "Adaptec RAID 52445"}, {0x9005, 0x0285, 0x9005, 0x02d1, AAC_HWIF_I960RX, 0, - "Adaptec RAID 5405"}, + "Adaptec RAID 5405"}, + {0x9005, 0x0285, 0x9005, 0x02d4, AAC_HWIF_I960RX, 0, + "Adaptec RAID 2045"}, + {0x9005, 0x0285, 0x9005, 0x02d5, AAC_HWIF_I960RX, 0, + "Adaptec RAID 2405"}, + {0x9005, 0x0285, 0x9005, 0x02d6, AAC_HWIF_I960RX, 0, + "Adaptec RAID 2445"}, + {0x9005, 0x0285, 0x9005, 0x02d7, AAC_HWIF_I960RX, 0, + "Adaptec RAID 2805"}, {0x9005, 0x0286, 0x1014, 0x9580, AAC_HWIF_RKT, 0, "IBM ServeRAID-8k"}, {0x9005, 0x0285, 0x1014, 0x034d, AAC_HWIF_I960RX, 0, From owner-svn-src-stable-6@FreeBSD.ORG Wed Oct 28 13:38:07 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A579106568D; Wed, 28 Oct 2009 13:38:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6672B8FC20; Wed, 28 Oct 2009 13:38:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9SDc7Up062773; Wed, 28 Oct 2009 13:38:07 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9SDc7MU062767; Wed, 28 Oct 2009 13:38:07 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200910281338.n9SDc7MU062767@svn.freebsd.org> From: Ed Maste Date: Wed, 28 Oct 2009 13:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198540 - in stable/6/sys: . conf contrib/pf dev/aac dev/cxgb X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 13:38:07 -0000 Author: emaste Date: Wed Oct 28 13:38:07 2009 New Revision: 198540 URL: http://svn.freebsd.org/changeset/base/198540 Log: MFC r188896 Sync with the official Adaptec vendor driver: [1] Add the support for the NARK controller which seems a variant of the i960Rx. [2] Split up memory regions and other resources in 2 different parts as long as NARK uses them separately (it is not clear to me why though as long as there are no more informations available on this controller). Please note that in all the other cases, the regions overlaps leaving the default behaviour for all the other controllers. [3] Implement a clock daemon responsible for maintain updated the wall clock time of the controller (run any 30 minutes). (Replace callout_schedule with callout_reset for [3].) Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/aac/aac.c stable/6/sys/dev/aac/aac_debug.c stable/6/sys/dev/aac/aac_pci.c stable/6/sys/dev/aac/aacreg.h stable/6/sys/dev/aac/aacvar.h stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/aac/aac.c ============================================================================== --- stable/6/sys/dev/aac/aac.c Wed Oct 28 12:10:29 2009 (r198539) +++ stable/6/sys/dev/aac/aac.c Wed Oct 28 13:38:07 2009 (r198540) @@ -71,6 +71,7 @@ static void aac_startup(void *arg); static void aac_add_container(struct aac_softc *sc, struct aac_mntinforesp *mir, int f); static void aac_get_bus_info(struct aac_softc *sc); +static void aac_daemon(void *arg); /* Command Processing */ static void aac_timeout(struct aac_softc *sc); @@ -292,6 +293,9 @@ aac_attach(struct aac_softc *sc) TAILQ_INIT(&sc->aac_container_tqh); TAILQ_INIT(&sc->aac_ev_cmfree); + /* Initialize the clock daemon callout. */ + callout_init_mtx(&sc->aac_daemontime, &sc->aac_io_lock, 0); + /* * Initialize the adapter. */ @@ -349,9 +353,34 @@ aac_attach(struct aac_softc *sc) aac_get_bus_info(sc); } + mtx_lock(&sc->aac_io_lock); + callout_reset(&sc->aac_daemontime, 30 * 60 * hz, aac_daemon, sc); + mtx_unlock(&sc->aac_io_lock); + return(0); } +static void +aac_daemon(void *arg) +{ + struct timeval tv; + struct aac_softc *sc; + struct aac_fib *fib; + + sc = arg; + mtx_assert(&sc->aac_io_lock, MA_OWNED); + + if (callout_pending(&sc->aac_daemontime) || + callout_active(&sc->aac_daemontime) == 0) + return; + getmicrotime(&tv); + aac_alloc_sync_fib(sc, &fib); + *(uint32_t *)fib->data = tv.tv_sec; + aac_sync_fib(sc, SendHostTime, 0, fib, sizeof(uint32_t)); + aac_release_sync_fib(sc); + callout_schedule(&sc->aac_daemontime, 30 * 60 * hz); +} + void aac_add_event(struct aac_softc *sc, struct aac_event *event) { @@ -632,9 +661,12 @@ aac_free(struct aac_softc *sc) bus_dma_tag_destroy(sc->aac_parent_dmat); /* release the register window mapping */ - if (sc->aac_regs_resource != NULL) + if (sc->aac_regs_res0 != NULL) + bus_release_resource(sc->aac_dev, SYS_RES_MEMORY, + sc->aac_regs_rid0, sc->aac_regs_res0); + if (sc->aac_hwif == AAC_HWIF_NARK && sc->aac_regs_res1 != NULL) bus_release_resource(sc->aac_dev, SYS_RES_MEMORY, - sc->aac_regs_rid, sc->aac_regs_resource); + sc->aac_regs_rid1, sc->aac_regs_res1); } /* @@ -654,6 +686,8 @@ aac_detach(device_t dev) if (sc->aac_state & AAC_STATE_OPEN) return(EBUSY); + callout_drain(&sc->aac_daemontime); + /* Remove the child containers */ while ((co = TAILQ_FIRST(&sc->aac_container_tqh)) != NULL) { error = device_delete_child(dev, co->co_disk); @@ -834,7 +868,7 @@ aac_new_intr(void *arg) } index &= ~2; for (i = 0; i < sizeof(struct aac_fib)/4; ++i) - ((u_int32_t *)fib)[i] = AAC_GETREG4(sc, index + i*4); + ((u_int32_t *)fib)[i] = AAC_MEM1_GETREG4(sc, index + i*4); aac_handle_aif(sc, fib); free(fib, M_AACBUF); @@ -1753,26 +1787,33 @@ aac_check_firmware(struct aac_softc *sc) /* Remap mem. resource, if required */ if ((sc->flags & AAC_FLAGS_NEW_COMM) && - atu_size > rman_get_size(sc->aac_regs_resource)) { + atu_size > rman_get_size(sc->aac_regs_res1)) { bus_release_resource( sc->aac_dev, SYS_RES_MEMORY, - sc->aac_regs_rid, sc->aac_regs_resource); - sc->aac_regs_resource = bus_alloc_resource( - sc->aac_dev, SYS_RES_MEMORY, &sc->aac_regs_rid, + sc->aac_regs_rid1, sc->aac_regs_res1); + sc->aac_regs_res1 = bus_alloc_resource( + sc->aac_dev, SYS_RES_MEMORY, &sc->aac_regs_rid1, 0ul, ~0ul, atu_size, RF_ACTIVE); - if (sc->aac_regs_resource == NULL) { - sc->aac_regs_resource = bus_alloc_resource_any( + if (sc->aac_regs_res1 == NULL) { + sc->aac_regs_res1 = bus_alloc_resource_any( sc->aac_dev, SYS_RES_MEMORY, - &sc->aac_regs_rid, RF_ACTIVE); - if (sc->aac_regs_resource == NULL) { + &sc->aac_regs_rid1, RF_ACTIVE); + if (sc->aac_regs_res1 == NULL) { device_printf(sc->aac_dev, "couldn't allocate register window\n"); return (ENXIO); } sc->flags &= ~AAC_FLAGS_NEW_COMM; } - sc->aac_btag = rman_get_bustag(sc->aac_regs_resource); - sc->aac_bhandle = rman_get_bushandle(sc->aac_regs_resource); + sc->aac_btag1 = rman_get_bustag(sc->aac_regs_res1); + sc->aac_bhandle1 = rman_get_bushandle(sc->aac_regs_res1); + + if (sc->aac_hwif == AAC_HWIF_NARK) { + sc->aac_regs_res0 = sc->aac_regs_res1; + sc->aac_regs_rid0 = sc->aac_regs_rid1; + sc->aac_btag0 = sc->aac_btag1; + sc->aac_bhandle0 = sc->aac_bhandle1; + } } /* Read preferred settings */ @@ -1943,10 +1984,10 @@ aac_init(struct aac_softc *sc) */ switch (sc->aac_hwif) { case AAC_HWIF_I960RX: - AAC_SETREG4(sc, AAC_RX_ODBR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RX_ODBR, ~0); break; case AAC_HWIF_RKT: - AAC_SETREG4(sc, AAC_RKT_ODBR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RKT_ODBR, ~0); break; default: break; @@ -2365,7 +2406,7 @@ aac_sa_get_fwstatus(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_SA_FWSTATUS)); + return(AAC_MEM0_GETREG4(sc, AAC_SA_FWSTATUS)); } static int @@ -2373,7 +2414,7 @@ aac_rx_get_fwstatus(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, sc->flags & AAC_FLAGS_NEW_COMM ? + return(AAC_MEM0_GETREG4(sc, sc->flags & AAC_FLAGS_NEW_COMM ? AAC_RX_OMR0 : AAC_RX_FWSTATUS)); } @@ -2384,7 +2425,7 @@ aac_fa_get_fwstatus(struct aac_softc *sc fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - val = AAC_GETREG4(sc, AAC_FA_FWSTATUS); + val = AAC_MEM0_GETREG4(sc, AAC_FA_FWSTATUS); return (val); } @@ -2393,7 +2434,7 @@ aac_rkt_get_fwstatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, sc->flags & AAC_FLAGS_NEW_COMM ? + return(AAC_MEM0_GETREG4(sc, sc->flags & AAC_FLAGS_NEW_COMM ? AAC_RKT_OMR0 : AAC_RKT_FWSTATUS)); } @@ -2406,7 +2447,7 @@ aac_sa_qnotify(struct aac_softc *sc, int { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_SA_DOORBELL1_SET, qbit); + AAC_MEM0_SETREG2(sc, AAC_SA_DOORBELL1_SET, qbit); } static void @@ -2414,7 +2455,7 @@ aac_rx_qnotify(struct aac_softc *sc, int { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_IDBR, qbit); + AAC_MEM0_SETREG4(sc, AAC_RX_IDBR, qbit); } static void @@ -2422,7 +2463,7 @@ aac_fa_qnotify(struct aac_softc *sc, int { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_FA_DOORBELL1, qbit); + AAC_MEM0_SETREG2(sc, AAC_FA_DOORBELL1, qbit); AAC_FA_HACK(sc); } @@ -2431,7 +2472,7 @@ aac_rkt_qnotify(struct aac_softc *sc, in { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_IDBR, qbit); + AAC_MEM0_SETREG4(sc, AAC_RKT_IDBR, qbit); } /* @@ -2442,7 +2483,7 @@ aac_sa_get_istatus(struct aac_softc *sc) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG2(sc, AAC_SA_DOORBELL0)); + return(AAC_MEM0_GETREG2(sc, AAC_SA_DOORBELL0)); } static int @@ -2450,7 +2491,7 @@ aac_rx_get_istatus(struct aac_softc *sc) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_ODBR)); + return(AAC_MEM0_GETREG4(sc, AAC_RX_ODBR)); } static int @@ -2460,7 +2501,7 @@ aac_fa_get_istatus(struct aac_softc *sc) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - val = AAC_GETREG2(sc, AAC_FA_DOORBELL0); + val = AAC_MEM0_GETREG2(sc, AAC_FA_DOORBELL0); return (val); } @@ -2469,7 +2510,7 @@ aac_rkt_get_istatus(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_ODBR)); + return(AAC_MEM0_GETREG4(sc, AAC_RKT_ODBR)); } /* @@ -2480,7 +2521,7 @@ aac_sa_clear_istatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_SA_DOORBELL0_CLEAR, mask); + AAC_MEM0_SETREG2(sc, AAC_SA_DOORBELL0_CLEAR, mask); } static void @@ -2488,7 +2529,7 @@ aac_rx_clear_istatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_ODBR, mask); + AAC_MEM0_SETREG4(sc, AAC_RX_ODBR, mask); } static void @@ -2496,7 +2537,7 @@ aac_fa_clear_istatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_FA_DOORBELL0_CLEAR, mask); + AAC_MEM0_SETREG2(sc, AAC_FA_DOORBELL0_CLEAR, mask); AAC_FA_HACK(sc); } @@ -2505,7 +2546,7 @@ aac_rkt_clear_istatus(struct aac_softc * { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_ODBR, mask); + AAC_MEM0_SETREG4(sc, AAC_RKT_ODBR, mask); } /* @@ -2517,11 +2558,11 @@ aac_sa_set_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_SA_MAILBOX, command); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 4, arg0); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 8, arg1); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 12, arg2); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 16, arg3); } static void @@ -2530,11 +2571,11 @@ aac_rx_set_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_MAILBOX, command); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 4, arg0); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 8, arg1); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 12, arg2); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 16, arg3); } static void @@ -2543,15 +2584,15 @@ aac_fa_set_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_FA_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX, command); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 4, arg0); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 8, arg1); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 12, arg2); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 16, arg3); AAC_FA_HACK(sc); } @@ -2561,11 +2602,11 @@ aac_rkt_set_mailbox(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_MAILBOX, command); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 4, arg0); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 8, arg1); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 12, arg2); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 16, arg3); } /* @@ -2576,7 +2617,7 @@ aac_sa_get_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_SA_MAILBOX + (mb * 4))); + return(AAC_MEM1_GETREG4(sc, AAC_SA_MAILBOX + (mb * 4))); } static int @@ -2584,7 +2625,7 @@ aac_rx_get_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_MAILBOX + (mb * 4))); + return(AAC_MEM1_GETREG4(sc, AAC_RX_MAILBOX + (mb * 4))); } static int @@ -2594,7 +2635,7 @@ aac_fa_get_mailbox(struct aac_softc *sc, fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - val = AAC_GETREG4(sc, AAC_FA_MAILBOX + (mb * 4)); + val = AAC_MEM1_GETREG4(sc, AAC_FA_MAILBOX + (mb * 4)); return (val); } @@ -2603,7 +2644,7 @@ aac_rkt_get_mailbox(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_MAILBOX + (mb * 4))); + return(AAC_MEM1_GETREG4(sc, AAC_RKT_MAILBOX + (mb * 4))); } /* @@ -2615,9 +2656,9 @@ aac_sa_set_interrupts(struct aac_softc * fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", enable ? "en" : "dis"); if (enable) { - AAC_SETREG2((sc), AAC_SA_MASK0_CLEAR, AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG2((sc), AAC_SA_MASK0_CLEAR, AAC_DB_INTERRUPTS); } else { - AAC_SETREG2((sc), AAC_SA_MASK0_SET, ~0); + AAC_MEM0_SETREG2((sc), AAC_SA_MASK0_SET, ~0); } } @@ -2628,11 +2669,11 @@ aac_rx_set_interrupts(struct aac_softc * if (enable) { if (sc->flags & AAC_FLAGS_NEW_COMM) - AAC_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INT_NEW_COMM); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INT_NEW_COMM); else - AAC_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INTERRUPTS); } else { - AAC_SETREG4(sc, AAC_RX_OIMR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~0); } } @@ -2642,10 +2683,10 @@ aac_fa_set_interrupts(struct aac_softc * fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", enable ? "en" : "dis"); if (enable) { - AAC_SETREG2((sc), AAC_FA_MASK0_CLEAR, AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG2((sc), AAC_FA_MASK0_CLEAR, AAC_DB_INTERRUPTS); AAC_FA_HACK(sc); } else { - AAC_SETREG2((sc), AAC_FA_MASK0, ~0); + AAC_MEM0_SETREG2((sc), AAC_FA_MASK0, ~0); AAC_FA_HACK(sc); } } @@ -2657,11 +2698,11 @@ aac_rkt_set_interrupts(struct aac_softc if (enable) { if (sc->flags & AAC_FLAGS_NEW_COMM) - AAC_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INT_NEW_COMM); + AAC_MEM0_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INT_NEW_COMM); else - AAC_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INTERRUPTS); } else { - AAC_SETREG4(sc, AAC_RKT_OIMR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RKT_OIMR, ~0); } } @@ -2675,19 +2716,19 @@ aac_rx_send_command(struct aac_softc *sc fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "send command (new comm.)"); - index = AAC_GETREG4(sc, AAC_RX_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RX_IQUE); if (index == 0xffffffffL) - index = AAC_GETREG4(sc, AAC_RX_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RX_IQUE); if (index == 0xffffffffL) return index; aac_enqueue_busy(cm); device = index; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); device += 4; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); device += 4; - AAC_SETREG4(sc, device, cm->cm_fib->Header.Size); - AAC_SETREG4(sc, AAC_RX_IQUE, index); + AAC_MEM1_SETREG4(sc, device, cm->cm_fib->Header.Size); + AAC_MEM0_SETREG4(sc, AAC_RX_IQUE, index); return 0; } @@ -2698,19 +2739,19 @@ aac_rkt_send_command(struct aac_softc *s fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "send command (new comm.)"); - index = AAC_GETREG4(sc, AAC_RKT_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RKT_IQUE); if (index == 0xffffffffL) - index = AAC_GETREG4(sc, AAC_RKT_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RKT_IQUE); if (index == 0xffffffffL) return index; aac_enqueue_busy(cm); device = index; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); device += 4; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); device += 4; - AAC_SETREG4(sc, device, cm->cm_fib->Header.Size); - AAC_SETREG4(sc, AAC_RKT_IQUE, index); + AAC_MEM1_SETREG4(sc, device, cm->cm_fib->Header.Size); + AAC_MEM0_SETREG4(sc, AAC_RKT_IQUE, index); return 0; } @@ -2722,7 +2763,7 @@ aac_rx_get_outb_queue(struct aac_softc * { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_OQUE)); + return(AAC_MEM0_GETREG4(sc, AAC_RX_OQUE)); } static int @@ -2730,7 +2771,7 @@ aac_rkt_get_outb_queue(struct aac_softc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_OQUE)); + return(AAC_MEM0_GETREG4(sc, AAC_RKT_OQUE)); } static void @@ -2738,7 +2779,7 @@ aac_rx_set_outb_queue(struct aac_softc * { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_OQUE, index); + AAC_MEM0_SETREG4(sc, AAC_RX_OQUE, index); } static void @@ -2746,7 +2787,7 @@ aac_rkt_set_outb_queue(struct aac_softc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_OQUE, index); + AAC_MEM0_SETREG4(sc, AAC_RKT_OQUE, index); } /* Modified: stable/6/sys/dev/aac/aac_debug.c ============================================================================== --- stable/6/sys/dev/aac/aac_debug.c Wed Oct 28 12:10:29 2009 (r198539) +++ stable/6/sys/dev/aac/aac_debug.c Wed Oct 28 13:38:07 2009 (r198540) @@ -134,17 +134,18 @@ aac_printstate0(void) aac_print_queues(sc); switch (sc->aac_hwif) { case AAC_HWIF_I960RX: + case AAC_HWIF_NARK: device_printf(sc->aac_dev, "IDBR 0x%08x IIMR 0x%08x " - "IISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_IDBR), - AAC_GETREG4(sc, AAC_RX_IIMR), AAC_GETREG4(sc, AAC_RX_IISR)); + "IISR 0x%08x\n", AAC_MEM0_GETREG4(sc, AAC_RX_IDBR), + AAC_MEM0_GETREG4(sc, AAC_RX_IIMR), AAC_MEM0_GETREG4(sc, AAC_RX_IISR)); device_printf(sc->aac_dev, "ODBR 0x%08x OIMR 0x%08x " - "OISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_ODBR), - AAC_GETREG4(sc, AAC_RX_OIMR), AAC_GETREG4(sc, AAC_RX_OISR)); - AAC_SETREG4(sc, AAC_RX_OIMR, 0/*~(AAC_DB_COMMAND_READY | + "OISR 0x%08x\n", AAC_MEM0_GETREG4(sc, AAC_RX_ODBR), + AAC_MEM0_GETREG4(sc, AAC_RX_OIMR), AAC_MEM0_GETREG4(sc, AAC_RX_OISR)); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, 0/*~(AAC_DB_COMMAND_READY | AAC_DB_RESPONSE_READY | AAC_DB_PRINTF)*/); device_printf(sc->aac_dev, "ODBR 0x%08x OIMR 0x%08x " - "OISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_ODBR), - AAC_GETREG4(sc, AAC_RX_OIMR), AAC_GETREG4(sc, AAC_RX_OISR)); + "OISR 0x%08x\n", AAC_MEM0_GETREG4(sc, AAC_RX_ODBR), + AAC_MEM0_GETREG4(sc, AAC_RX_OIMR), AAC_MEM0_GETREG4(sc, AAC_RX_OISR)); break; case AAC_HWIF_STRONGARM: /* XXX implement */ Modified: stable/6/sys/dev/aac/aac_pci.c ============================================================================== --- stable/6/sys/dev/aac/aac_pci.c Wed Oct 28 12:10:29 2009 (r198539) +++ stable/6/sys/dev/aac/aac_pci.c Wed Oct 28 13:38:07 2009 (r198540) @@ -374,21 +374,32 @@ aac_pci_attach(device_t dev) /* * Allocate the PCI register window. */ - sc->aac_regs_rid = PCIR_BAR(0); - if ((sc->aac_regs_resource = bus_alloc_resource_any(sc->aac_dev, - SYS_RES_MEMORY, - &sc->aac_regs_rid, - RF_ACTIVE)) == - NULL) { + sc->aac_regs_rid0 = PCIR_BAR(0); + if ((sc->aac_regs_res0 = bus_alloc_resource_any(sc->aac_dev, + SYS_RES_MEMORY, &sc->aac_regs_rid0, RF_ACTIVE)) == NULL) { device_printf(sc->aac_dev, - "couldn't allocate register window\n"); + "couldn't allocate register window 0\n"); goto out; } - sc->aac_btag = rman_get_bustag(sc->aac_regs_resource); - sc->aac_bhandle = rman_get_bushandle(sc->aac_regs_resource); + sc->aac_btag0 = rman_get_bustag(sc->aac_regs_res0); + sc->aac_bhandle0 = rman_get_bushandle(sc->aac_regs_res0); - /* assume failure is 'out of memory' */ - error = ENOMEM; + if (sc->aac_hwif == AAC_HWIF_NARK) { + sc->aac_regs_rid1 = PCIR_BAR(1); + if ((sc->aac_regs_res1 = bus_alloc_resource_any(sc->aac_dev, + SYS_RES_MEMORY, &sc->aac_regs_rid1, RF_ACTIVE)) == NULL) { + device_printf(sc->aac_dev, + "couldn't allocate register window 1\n"); + goto out; + } + sc->aac_btag1 = rman_get_bustag(sc->aac_regs_res1); + sc->aac_bhandle1 = rman_get_bushandle(sc->aac_regs_res1); + } else { + sc->aac_regs_res1 = sc->aac_regs_res0; + sc->aac_regs_rid1 = sc->aac_regs_rid0; + sc->aac_btag1 = sc->aac_btag0; + sc->aac_bhandle1 = sc->aac_bhandle0; + } /* * Allocate the parent bus DMA tag appropriate for our PCI interface. @@ -418,7 +429,8 @@ aac_pci_attach(device_t dev) sc->aac_hwif = id->hwif; switch(sc->aac_hwif) { case AAC_HWIF_I960RX: - fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for i960Rx"); + case AAC_HWIF_NARK: + fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for i960Rx/NARK"); sc->aac_if = aac_rx_interface; break; case AAC_HWIF_STRONGARM: Modified: stable/6/sys/dev/aac/aacreg.h ============================================================================== --- stable/6/sys/dev/aac/aacreg.h Wed Oct 28 12:10:29 2009 (r198539) +++ stable/6/sys/dev/aac/aacreg.h Wed Oct 28 13:38:07 2009 (r198540) @@ -1468,7 +1468,7 @@ enum { #define AAC_FA_FWSTATUS 0x2c /* Mailbox 7 */ #define AAC_FA_INTSRC 0x900 -#define AAC_FA_HACK(sc) (void)AAC_GETREG4(sc, AAC_FA_INTSRC) +#define AAC_FA_HACK(sc) (void)AAC_MEM0_GETREG4(sc, AAC_FA_INTSRC) /* * Register definitions for the Adaptec AAC-364 'Jalapeno I/II' adapters, based Modified: stable/6/sys/dev/aac/aacvar.h ============================================================================== --- stable/6/sys/dev/aac/aacvar.h Wed Oct 28 12:10:29 2009 (r198539) +++ stable/6/sys/dev/aac/aacvar.h Wed Oct 28 13:38:07 2009 (r198540) @@ -30,6 +30,7 @@ */ #include +#include #include #include #include @@ -259,18 +260,31 @@ extern struct aac_interface aac_rkt_inte #define AAC_GET_OUTB_QUEUE(sc) ((sc)->aac_if.aif_get_outb_queue((sc))) #define AAC_SET_OUTB_QUEUE(sc, idx) ((sc)->aac_if.aif_set_outb_queue((sc), (idx))) -#define AAC_SETREG4(sc, reg, val) bus_space_write_4(sc->aac_btag, \ - sc->aac_bhandle, reg, val) -#define AAC_GETREG4(sc, reg) bus_space_read_4 (sc->aac_btag, \ - sc->aac_bhandle, reg) -#define AAC_SETREG2(sc, reg, val) bus_space_write_2(sc->aac_btag, \ - sc->aac_bhandle, reg, val) -#define AAC_GETREG2(sc, reg) bus_space_read_2 (sc->aac_btag, \ - sc->aac_bhandle, reg) -#define AAC_SETREG1(sc, reg, val) bus_space_write_1(sc->aac_btag, \ - sc->aac_bhandle, reg, val) -#define AAC_GETREG1(sc, reg) bus_space_read_1 (sc->aac_btag, \ - sc->aac_bhandle, reg) +#define AAC_MEM0_SETREG4(sc, reg, val) bus_space_write_4(sc->aac_btag0, \ + sc->aac_bhandle0, reg, val) +#define AAC_MEM0_GETREG4(sc, reg) bus_space_read_4(sc->aac_btag0, \ + sc->aac_bhandle0, reg) +#define AAC_MEM0_SETREG2(sc, reg, val) bus_space_write_2(sc->aac_btag0, \ + sc->aac_bhandle0, reg, val) +#define AAC_MEM0_GETREG2(sc, reg) bus_space_read_2(sc->aac_btag0, \ + sc->aac_bhandle0, reg) +#define AAC_MEM0_SETREG1(sc, reg, val) bus_space_write_1(sc->aac_btag0, \ + sc->aac_bhandle0, reg, val) +#define AAC_MEM0_GETREG1(sc, reg) bus_space_read_1(sc->aac_btag0, \ + sc->aac_bhandle0, reg) + +#define AAC_MEM1_SETREG4(sc, reg, val) bus_space_write_4(sc->aac_btag1, \ + sc->aac_bhandle1, reg, val) +#define AAC_MEM1_GETREG4(sc, reg) bus_space_read_4(sc->aac_btag1, \ + sc->aac_bhandle1, reg) +#define AAC_MEM1_SETREG2(sc, reg, val) bus_space_write_2(sc->aac_btag1, \ + sc->aac_bhandle1, reg, val) +#define AAC_MEM1_GETREG2(sc, reg) bus_space_read_2(sc->aac_btag1, \ + sc->aac_bhandle1, reg) +#define AAC_MEM1_SETREG1(sc, reg, val) bus_space_write_1(sc->aac_btag1, \ + sc->aac_bhandle1, reg, val) +#define AAC_MEM1_GETREG1(sc, reg) bus_space_read_1(sc->aac_btag1, \ + sc->aac_bhandle1, reg) /* fib context (IOCTL) */ struct aac_fib_context { @@ -287,11 +301,10 @@ struct aac_softc { /* bus connections */ device_t aac_dev; - struct resource *aac_regs_resource; /* register interface - * window */ - int aac_regs_rid; /* resource ID */ - bus_space_handle_t aac_bhandle; /* bus space handle */ - bus_space_tag_t aac_btag; /* bus space tag */ + struct resource *aac_regs_res0, *aac_regs_res1; /* reg. if. window */ + int aac_regs_rid0, aac_regs_rid1; /* resource ID */ + bus_space_handle_t aac_bhandle0, aac_bhandle1; /* bus space handle */ + bus_space_tag_t aac_btag0, aac_btag1; /* bus space tag */ bus_dma_tag_t aac_parent_dmat; /* parent DMA tag */ bus_dma_tag_t aac_buffer_dmat; /* data buffer/command * DMA tag */ @@ -315,6 +328,7 @@ struct aac_softc #define AAC_HWIF_STRONGARM 1 #define AAC_HWIF_FALCON 2 #define AAC_HWIF_RKT 3 +#define AAC_HWIF_NARK 4 #define AAC_HWIF_UNKNOWN -1 bus_dma_tag_t aac_common_dmat; /* common structure * DMA tag */ @@ -398,6 +412,8 @@ struct aac_softc u_int32_t scsi_method_id; TAILQ_HEAD(,aac_sim) aac_sim_tqh; + struct callout aac_daemontime; /* clock daemon callout */ + u_int32_t aac_max_fibs; /* max. FIB count */ u_int32_t aac_max_fibs_alloc; /* max. alloc. per alloc_commands() */ u_int32_t aac_max_fib_size; /* max. FIB size */ From owner-svn-src-stable-6@FreeBSD.ORG Wed Oct 28 15:36:55 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E01E51065676; Wed, 28 Oct 2009 15:36:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE75C8FC1B; Wed, 28 Oct 2009 15:36:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9SFat5Q065381; Wed, 28 Oct 2009 15:36:55 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9SFatZu065379; Wed, 28 Oct 2009 15:36:55 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200910281536.n9SFatZu065379@svn.freebsd.org> From: Ed Maste Date: Wed, 28 Oct 2009 15:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198547 - in stable/6/sys: . conf contrib/pf dev/aac dev/cxgb X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 15:36:56 -0000 Author: emaste Date: Wed Oct 28 15:36:55 2009 New Revision: 198547 URL: http://svn.freebsd.org/changeset/base/198547 Log: MFC r185376: Remove duplicate 2610SA entry. Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/aac/aac_pci.c stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/aac/aac_pci.c ============================================================================== --- stable/6/sys/dev/aac/aac_pci.c Wed Oct 28 15:22:58 2009 (r198546) +++ stable/6/sys/dev/aac/aac_pci.c Wed Oct 28 15:36:55 2009 (r198547) @@ -168,8 +168,6 @@ struct aac_ident "ICP ICP9014RO SCSI RAID"}, {0x9005, 0x0285, 0x9005, 0x0294, AAC_HWIF_I960RX, 0, "Adaptec SATA RAID 2026ZCR"}, - {0x9005, 0x0285, 0x103c, 0x3227, AAC_HWIF_I960RX, 0, - "Adaptec SATA RAID 2610SA"}, {0x9005, 0x0285, 0x9005, 0x0296, AAC_HWIF_I960RX, 0, "Adaptec SCSI RAID 2240S"}, {0x9005, 0x0285, 0x9005, 0x0297, AAC_HWIF_I960RX, 0, From owner-svn-src-stable-6@FreeBSD.ORG Wed Oct 28 15:58:15 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADE5E106568F; Wed, 28 Oct 2009 15:58:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C8418FC0A; Wed, 28 Oct 2009 15:58:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9SFwF5A065849; Wed, 28 Oct 2009 15:58:15 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9SFwFQh065847; Wed, 28 Oct 2009 15:58:15 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200910281558.n9SFwFQh065847@svn.freebsd.org> From: Ed Maste Date: Wed, 28 Oct 2009 15:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198548 - stable/6/sys/dev/aac X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 15:58:15 -0000 Author: emaste Date: Wed Oct 28 15:58:15 2009 New Revision: 198548 URL: http://svn.freebsd.org/changeset/base/198548 Log: Replace callout_schedule (which doesn't exist on 6.x) with callout_reset. Modified: stable/6/sys/dev/aac/aac.c Modified: stable/6/sys/dev/aac/aac.c ============================================================================== --- stable/6/sys/dev/aac/aac.c Wed Oct 28 15:36:55 2009 (r198547) +++ stable/6/sys/dev/aac/aac.c Wed Oct 28 15:58:15 2009 (r198548) @@ -378,7 +378,7 @@ aac_daemon(void *arg) *(uint32_t *)fib->data = tv.tv_sec; aac_sync_fib(sc, SendHostTime, 0, fib, sizeof(uint32_t)); aac_release_sync_fib(sc); - callout_schedule(&sc->aac_daemontime, 30 * 60 * hz); + callout_reset(&sc->aac_daemontime, 30 * 60 * hz, aac_daemon, sc); } void From owner-svn-src-stable-6@FreeBSD.ORG Wed Oct 28 21:13:58 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B990106568B; Wed, 28 Oct 2009 21:13:58 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8849A8FC19; Wed, 28 Oct 2009 21:13:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9SLDw0c072444; Wed, 28 Oct 2009 21:13:58 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9SLDwx2072440; Wed, 28 Oct 2009 21:13:58 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200910282113.n9SLDwx2072440@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 28 Oct 2009 21:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198560 - stable/6/share/zoneinfo X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 21:13:58 -0000 Author: edwin Date: Wed Oct 28 21:13:58 2009 New Revision: 198560 URL: http://svn.freebsd.org/changeset/base/198560 Log: MFC of r198270, r198515. MFC of tzdata2009o: - Somoa has not moved to DST this year (comment only) - Bangladesh stays on DST for now. - Pakistan went back to standard time in 1 October 2009 MFC of tzdata2009p: - Argentina does not go to DST this year. Modified: stable/6/share/zoneinfo/ (props changed) stable/6/share/zoneinfo/asia stable/6/share/zoneinfo/australasia stable/6/share/zoneinfo/southamerica Modified: stable/6/share/zoneinfo/asia ============================================================================== --- stable/6/share/zoneinfo/asia Wed Oct 28 21:13:12 2009 (r198559) +++ stable/6/share/zoneinfo/asia Wed Oct 28 21:13:58 2009 (r198560) @@ -1,5 +1,5 @@ #
-# @(#)asia	8.41
+# @(#)asia	8.42
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -172,11 +172,30 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 #
 # No DST end date has been announced yet.
 
-# From Arthur David Olson (2009-07-11):
-# Arbitrarily end DST at the end of 2009 so that a POSIX-sytle time zone string
-# can appear in the Dhaka binary file and for the benefit of old glibc
-# reimplementations of the time zone software that mishandle permanent DST.
-# A change will be required once the end date is known.
+# From Alexander Krivenyshev (2009-09-25):
+# Bangladesh won't go back to Standard Time from October 1, 2009, 
+# instead it will continue DST measure till the cabinet makes a fresh decision. 
+#
+# Following report by same newspaper-"The Daily Star Friday":
+# "DST change awaits cabinet decision-Clock won't go back by 1-hr from Oct 1"
+# 
+# http://www.thedailystar.net/newDesign/news-details.php?nid=107021
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_bangladesh04.html
+# 
+
+# From Steffen Thorsen (2009-10-13):
+# IANS (Indo-Asian News Service) now reports:
+# Bangladesh has decided that the clock advanced by an hour to make 
+# maximum use of daylight hours as an energy saving measure would 
+# "continue for an indefinite period."
+#
+# One of many places where it is published:
+# 
+# http://www.thaindian.com/newsportal/business/bangladesh-to-continue-indefinitely-with-advanced-time_100259987.html
+# 
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
@@ -186,8 +205,7 @@ Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			6:30	-	BURT	1951 Sep 30
 			6:00	-	DACT	1971 Mar 26 # Dacca Time
 			6:00	-	BDT	2009 Jun 19 23:00 # Bangladesh Time
-			6:00	1:00	BDST	2010
-			6:00	-	BDT
+			6:00	1:00	BDST
 
 # Bhutan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1684,13 +1702,56 @@ Zone	Asia/Muscat	3:54:20 -	LMT	1920
 # http://www.thenews.com.pk/updates.asp?id=87168
 # 
 
+# From Alexander Krivenyshev (2009-09-28):
+# According to Associated Press Of Pakistan, it is confirmed that
+# Pakistan clocks across the country would be turned back by an hour from October
+# 1, 2009.
+#
+# "Clocks to go back one hour from 1 Oct"
+# 
+# http://www.app.com.pk/en_/index.php?option=com_content&task=view&id=86715&Itemid=2
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_pakistan07.htm
+# 
+
+# From Steffen Thorsen (2009-09-29):
+# Alexander Krivenyshev wrote:
+# > According to Associated Press Of Pakistan, it is confirmed that
+# > Pakistan clocks across the country would be turned back by an hour from October
+# > 1, 2009.
+#
+# Now they seem to have changed their mind, November 1 is the new date:
+# 
+# http://www.thenews.com.pk/top_story_detail.asp?Id=24742
+# 
+# "The country's clocks will be reversed by one hour on November 1.
+# Officials of Federal Ministry for Interior told this to Geo News on
+# Monday."
+#
+# And more importantly, it seems that these dates will be kept every year:
+# "It has now been decided that clocks will be wound forward by one hour
+# on April 15 and reversed by an hour on November 1 every year without
+# obtaining prior approval, the officials added."
+#
+# We have confirmed this year's end date with both with the Ministry of
+# Water and Power and the Pakistan Electric Power Company:
+# 
+# http://www.timeanddate.com/news/time/pakistan-ends-dst09.html
+# 
+
+# From Christoph Goehre (2009-10-01):
+# [T]he German Consulate General in Karachi reported me today that Pakistan
+# will go back to standard time on 1st of November.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule Pakistan	2002	only	-	Apr	Sun>=2	0:01	1:00	S
 Rule Pakistan	2002	only	-	Oct	Sun>=2	0:01	0	-
 Rule Pakistan	2008	only	-	Jun	1	0:00	1:00	S
 Rule Pakistan	2008	only	-	Nov	1	0:00	0	-
-Rule Pakistan	2009	only	-	Apr	15	0:00	1:00	S
-Rule Pakistan	2009	only	-	Oct	1	0:00	0	-
+Rule Pakistan	2009	max	-	Apr	15	0:00	1:00	S
+Rule Pakistan	2009	max	-	Nov	1	0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Karachi	4:28:12 -	LMT	1907
 			5:30	-	IST	1942 Sep

Modified: stable/6/share/zoneinfo/australasia
==============================================================================
--- stable/6/share/zoneinfo/australasia	Wed Oct 28 21:13:12 2009	(r198559)
+++ stable/6/share/zoneinfo/australasia	Wed Oct 28 21:13:58 2009	(r198560)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.13
+# @(#)australasia	8.14
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -457,6 +457,36 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
 # 
 
+# From Alexander Krivenyshev (2009-10-03):
+# First, my deepest condolences to people of Samoa islands and all families and
+# loved ones around the world who lost their lives in the earthquake and tsunami.
+#
+# Considering the recent devastation on Samoa by earthquake and tsunami and that
+# many government offices/ ministers are closed- not sure if "Daylight Saving
+# Bill 2009" will be implemented in next few days- on October 4, 2009.
+#
+# Here is reply from Consulate-General of Samoa in New Zealand
+# ---------------------------
+# Consul General
+# consulgeneral@samoaconsulate.org.nz
+#
+# Talofa Alexander,
+#
+# Thank you for your sympathy for our country but at this time we have not
+# been informed about the Daylight Savings Time Change.  Most Ministries in
+# Apia are closed or relocating due to weather concerns.
+#
+# When we do find out if they are still proceeding with the time change we
+# will advise you soonest.
+#
+# Kind Regards,
+# Lana
+# for: Consul General
+
+# From Steffen Thorsen (2009-10-05):
+# We have called a hotel in Samoa and asked about local time there - they 
+# are still on standard time.
+
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time

Modified: stable/6/share/zoneinfo/southamerica
==============================================================================
--- stable/6/share/zoneinfo/southamerica	Wed Oct 28 21:13:12 2009	(r198559)
+++ stable/6/share/zoneinfo/southamerica	Wed Oct 28 21:13:58 2009	(r198560)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.37
+# @(#)southamerica	8.40
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -215,9 +215,23 @@ Rule	Arg	2000	only	-	Mar	3	0:00	0	-
 # http://www.jujuy.gov.ar/index2/partes_prensa/18_10_08/235-181008.doc
 # 
 
+# From fullinet (2009-10-18):
+# As announced in
+# 
+# http://www.argentina.gob.ar/argentina/portal/paginas.dhtml?pagina=356
+# 
+# (an official .gob.ar) under title: "Sin Cambio de Hora" (english: "No hour change")
+#
+# "Por el momento, el Gobierno Nacional resolvio no modificar la hora
+# oficial, decision que estaba en estudio para su implementacion el
+# domingo 18 de octubre. Desde el Ministerio de Planificacion se anuncio
+# que la Argentina hoy, en estas condiciones meteorologicas, no necesita
+# la modificacion del huso horario, ya que 2009 nos encuentra con
+# crecimiento en la produccion y distribucion energetica."
+
 Rule	Arg	2007	only	-	Dec	30	0:00	1:00	S
-Rule	Arg	2008	max	-	Mar	Sun>=15	0:00	0	-
-Rule	Arg	2008	max	-	Oct	Sun>=15	0:00	1:00	S
+Rule	Arg	2008	2009	-	Mar	Sun>=15	0:00	0	-
+Rule	Arg	2008	only	-	Oct	Sun>=15	0:00	1:00	S
  
 # From Mariano Absatz (2004-05-21):
 # Today it was officially published that the Province of Mendoza is changing
@@ -389,44 +403,39 @@ Rule	Arg	2008	max	-	Oct	Sun>=15	0:00	1:0
 # during 2009, this timezone change will run from 00:00 the third Sunday
 # in March until 24:00 of the second Saturday in October.
 
-# From Arthur David Olson (2009-03-16):
-# The unofficial claim at
-# 
-# http://www.timeanddate.com/news/time/san-luis-new-time-zone.html
-# 
-# is that "The province will most likely follow the next daylight saving schedule,
-# which is planned for the second Sunday in October."
-
-# From Alexander Krivenyshev (2009-09-19):
-# Some  Argentinian Provinces (Buenos Aires, Entre Ríos) are opposing to the
-# Daylight Saving Time for the 2009-2010 season.
-#
-# (Spanish)
-# "El cambio de huso horario en Entre Ríos deberá ser aprobado por la
-# Legislatura":
-# 
-# http://www.analisisdigital.com.ar/noticias.php?ed=1&di=0&no=110168
-# 
-# English translation - "The time zone change in Entre Rios must be approved by
-# the Legislature."
-#
-# (Spanish)
-# "Mar del Plata no quiere cambiar la hora."
-# 
-# http://www.mensajeroweb.com.ar/index.php?x=nota/33861/1/mar-del-plata-no-quiere-cambiar-la-hora
-# 
-# English translation - "Mar del Plata is not to change the time"
-#
-# or
-# (some English translation)
-# 
-# http://www.worldtimezone.com/dst_news/dst_news_argentina07.html
-# 
-
-# From Arthur David Olson (2009-09-22):
-# "Mar del Plata no quiere cambiar la hora" translates to
-# "Mar del Plata doesn't want to change the time"
-# (less definitive than "is not to").
+# From Mariano Absatz (2009-10-16):
+# ...the Province of San Luis is a case in itself.
+#
+# The Law at
+# 
+# is ambiguous because establishes a calendar from the 2nd Sunday in
+# October at 0:00 thru the 2nd Saturday in March at 24:00 and the
+# complement of that starting on the 2nd Sunday of March at 0:00 and
+# ending on the 2nd Saturday of March at 24:00.
+#
+# This clearly breaks every time the 1st of March or October is a Sunday.
+#
+# IMHO, the "spirit of the Law" is to make the changes at 0:00 on the 2nd
+# Sunday of October and March.
+#
+# The problem is that the changes in the rest of the Provinces that did
+# change in 2007/2008, were made according to the Federal Law and Decrees
+# that did so on the 3rd Sunday of October and March.
+#
+# In fact, San Luis actually switched from UTC-4 to UTC-3 last Sunday
+# (October 11th) at 0:00.
+#
+# So I guess a new set of rules, besides "Arg", must be made and the last
+# America/Argentina/San_Luis entries should change to use these...
+#
+# I'm enclosing a patch that does what I say... regretfully, the San Luis
+# timezone must be called "WART/WARST" even when most of the time (like,
+# right now) WARST == ART... that is, since last Sunday, all the country
+# is using UTC-3, but in my patch, San Luis calls it "WARST" and the rest
+# of the country calls it "ART".
+# ...
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 #
@@ -560,6 +569,10 @@ Zone America/Argentina/Mendoza -4:35:16 
 			-3:00	-	ART
 #
 # San Luis (SL)
+
+Rule	SanLuis	2008	max	-	Mar	Sun>=8	0:00	0	-
+Rule	SanLuis	2007	max	-	Oct	Sun>=8	0:00	1:00	S
+
 Zone America/Argentina/San_Luis -4:25:24 - LMT	1894 Oct 31
 			-4:16:48 -	CMT	1920 May
 			-4:00	-	ART	1930 Dec
@@ -574,8 +587,7 @@ Zone America/Argentina/San_Luis -4:25:24
 			-3:00	-	ART	2004 May 31
 			-4:00	-	WART	2004 Jul 25
 			-3:00	Arg	AR%sT	2008 Jan 21
-			-3:00	-	ART	2009 Mar 15
-			-4:00	Arg	WAR%sT
+			-4:00	SanLuis	WAR%sT
 #
 # Santa Cruz (SC)
 Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31