svn commit: r236666 - in head/sys: cam/ata dev/ahci dev/ata dev/mvs dev/siis
Author: mav Date: Wed Jun 6 06:52:51 2012 New Revision: 23 URL: http://svn.freebsd.org/changeset/base/23 Log: ATA/SATA controllers have no idea about protocol of the connected device until transport will do some probe actions (at least soft reset). Make ATA/SATA SIMs to not report bogus and confusing PROTO_ATA protocol. Make ATA/SATA transport to fill that gap by reporting protocol to SIM with XPT_SET_TRAN_SETTINGS and patching XPT_GET_TRAN_SETTINGS results if needed. Modified: head/sys/cam/ata/ata_xpt.c head/sys/dev/ahci/ahci.c head/sys/dev/ata/ata-all.c head/sys/dev/mvs/mvs.c head/sys/dev/siis/siis.c Modified: head/sys/cam/ata/ata_xpt.c == --- head/sys/cam/ata/ata_xpt.c Wed Jun 6 06:39:34 2012(r236665) +++ head/sys/cam/ata/ata_xpt.c Wed Jun 6 06:52:51 2012(r23) @@ -942,9 +942,9 @@ noerror: xpt_action((union ccb *)&cts); } } + ata_device_transport(path); if (changed) proberequestdefaultnegotiation(periph); - ata_device_transport(path); PROBE_SET_ACTION(softc, PROBE_SETMODE); xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); @@ -1123,6 +1123,9 @@ notsata: snprintf(ident_buf->revision, sizeof(ident_buf->revision), "%04x", softc->pm_prv); path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID; + ata_device_transport(path); + if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) + proberequestdefaultnegotiation(periph); /* Set supported bits. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); @@ -1200,6 +1203,9 @@ notsata: path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID; } + ata_device_transport(path); + if (changed) + proberequestdefaultnegotiation(periph); if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; @@ -1777,6 +1783,12 @@ ata_get_transfer_settings(struct ccb_tra sim = cts->ccb_h.path->bus->sim; (*(sim->sim_action))(sim, (union ccb *)cts); + if (cts->protocol == PROTO_UNKNOWN || + cts->protocol == PROTO_UNSPECIFIED) { + cts->protocol = device->protocol; + cts->protocol_version = device->protocol_version; + } + if (cts->protocol == PROTO_ATA) { ata = &cts->proto_specific.ata; if ((ata->valid & CTS_ATA_VALID_TQ) == 0) { @@ -1797,6 +1809,12 @@ ata_get_transfer_settings(struct ccb_tra scsi->flags |= CTS_SCSI_FLAGS_TAG_ENB; } } + + if (cts->transport == XPORT_UNKNOWN || + cts->transport == XPORT_UNSPECIFIED) { + cts->transport = device->transport; + cts->transport_version = device->transport_version; + } } static void Modified: head/sys/dev/ahci/ahci.c == --- head/sys/dev/ahci/ahci.cWed Jun 6 06:39:34 2012(r236665) +++ head/sys/dev/ahci/ahci.cWed Jun 6 06:52:51 2012(r23) @@ -2881,7 +2881,7 @@ ahciaction(struct cam_sim *sim, union cc d = &ch->curr[ccb->ccb_h.target_id]; else d = &ch->user[ccb->ccb_h.target_id]; - cts->protocol = PROTO_ATA; + cts->protocol = PROTO_UNSPECIFIED; cts->protocol_version = PROTO_VERSION_UNSPECIFIED; cts->transport = XPORT_SATA; cts->transport_version = XPORT_VERSION_UNSPECIFIED; @@ -2967,7 +2967,7 @@ ahciaction(struct cam_sim *sim, union cc cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SATA; cpi->transport_version = XPORT_VERSION_UNSPECIFIED; - cpi->protocol = PROTO_ATA; + cpi->protocol = PROTO_UNSPECIFIED; cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = MAXPHYS; /* ATI SB600 can't handle 256 sectors with FPDMA (NCQ). */ Modified: head/sys/dev/ata/ata-all.c == --- head/sys/dev/ata/ata-all.c Wed Jun 6 06:39:34 2012(r236665) +++ head/sys/dev/ata/ata-all.c Wed Jun 6 06:52:51 2012(r23) @@ -1787,7 +1787,7 @@ ataaction(struct cam_sim *sim, union ccb d = &ch->curr[ccb->ccb_h.target_id]; else d = &ch->user[ccb->ccb_h.target_id]; -
svn commit: r236667 - in stable/8/sys: dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/misc dev/usb/net dev/usb/serial dev/usb/storage dev/usb/template dev/usb/wlan netgraph/bluetoot...
Author: marius Date: Wed Jun 6 07:46:14 2012 New Revision: 236667 URL: http://svn.freebsd.org/changeset/base/236667 Log: MFC: r233774 Fix compiler warnings, mostly signed issues, when USB modules are compiled with WARNS=9. Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/dev/sound/usb/uaudioreg.h stable/8/sys/dev/usb/controller/at91dci.c stable/8/sys/dev/usb/controller/atmegadci.c stable/8/sys/dev/usb/controller/avr32dci.c stable/8/sys/dev/usb/controller/ehci.c stable/8/sys/dev/usb/controller/musb_otg.c stable/8/sys/dev/usb/controller/ohci.c stable/8/sys/dev/usb/controller/uhci.c stable/8/sys/dev/usb/controller/uss820dci.c stable/8/sys/dev/usb/controller/xhci.c stable/8/sys/dev/usb/input/atp.c stable/8/sys/dev/usb/input/uep.c stable/8/sys/dev/usb/input/uhid.c stable/8/sys/dev/usb/input/ukbd.c stable/8/sys/dev/usb/input/ums.c stable/8/sys/dev/usb/misc/ufm.c stable/8/sys/dev/usb/net/if_aue.c stable/8/sys/dev/usb/net/if_axe.c stable/8/sys/dev/usb/net/if_cdce.c stable/8/sys/dev/usb/net/if_cue.c stable/8/sys/dev/usb/net/if_ipheth.c stable/8/sys/dev/usb/net/if_kue.c stable/8/sys/dev/usb/net/if_rue.c stable/8/sys/dev/usb/net/if_udav.c stable/8/sys/dev/usb/net/uhso.c stable/8/sys/dev/usb/serial/ubsa.c stable/8/sys/dev/usb/serial/uchcom.c stable/8/sys/dev/usb/serial/ucycom.c stable/8/sys/dev/usb/serial/ufoma.c stable/8/sys/dev/usb/serial/ulpt.c stable/8/sys/dev/usb/serial/umodem.c stable/8/sys/dev/usb/serial/uplcom.c stable/8/sys/dev/usb/serial/usb_serial.c stable/8/sys/dev/usb/serial/usb_serial.h stable/8/sys/dev/usb/storage/umass.c stable/8/sys/dev/usb/storage/urio.c stable/8/sys/dev/usb/storage/ustorage_fs.c stable/8/sys/dev/usb/template/usb_template.c stable/8/sys/dev/usb/usb_busdma.c stable/8/sys/dev/usb/usb_compat_linux.c stable/8/sys/dev/usb/usb_dev.c stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_handle_request.c stable/8/sys/dev/usb/usb_hid.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usb_msctest.c stable/8/sys/dev/usb/usb_request.c stable/8/sys/dev/usb/usb_transfer.c stable/8/sys/dev/usb/usbdi.h stable/8/sys/dev/usb/usbhid.h stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_uath.c stable/8/sys/dev/usb/wlan/if_upgt.c stable/8/sys/dev/usb/wlan/if_ural.c stable/8/sys/dev/usb/wlan/if_urtw.c stable/8/sys/dev/usb/wlan/if_zyd.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c == --- stable/8/sys/dev/sound/usb/uaudio.c Wed Jun 6 06:52:51 2012 (r23) +++ stable/8/sys/dev/sound/usb/uaudio.c Wed Jun 6 07:46:14 2012 (r236667) @@ -1272,15 +1272,15 @@ uaudio_chan_record_callback(struct usb_x { struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint32_t n; - uint32_t m; - uint32_t blockcount; uint32_t offset0; uint32_t offset1; uint32_t mfl; + int m; + int n; int len; int actlen; int nframes; + int blockcount; usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); mfl = usbd_xfer_max_framelen(xfer); @@ -1307,9 +1307,9 @@ uaudio_chan_record_callback(struct usb_x m = (ch->end - ch->cur); - if (m > len) { + if (m > len) m = len; - } + usbd_copy_out(pc, offset1, ch->cur, m); len -= m; @@ -1884,10 +1884,10 @@ uaudio_mixer_add_selector(struct uaudio_ static uint32_t uaudio_mixer_feature_get_bmaControls(const struct usb_audio_feature_unit *d, -uint8_t index) +uint8_t i) { uint32_t temp = 0; - uint32_t offset = (index * d->bControlSize); + uint32_t offset = (i * d->bControlSize); if (d->bControlSize > 0) { temp |= d->bmaControls[offset]; @@ -2636,8 +2636,8 @@ uaudio_mixer_feature_name(const struct u return (uat->feature); } -const static struct uaudio_terminal_node * -uaudio_mixer_get_input(const struct uaudio_terminal_node *iot, uint8_t index) +static const struct uaudio_terminal_node * +uaudio_mixer_get_input(const struct uaudio_terminal_node *iot, uint8_t i) { struct uaudio_terminal_node *root = iot->root; uint8_t n; @@ -2645,17 +2645,16 @@ uaudio_mixer_get_input(const struct u
svn commit: r236668 - head/lib/librpcsec_gss
Author: joel (doc committer) Date: Wed Jun 6 08:07:47 2012 New Revision: 236668 URL: http://svn.freebsd.org/changeset/base/236668 Log: mdoc: add missing -width argument to Bl -tag. Modified: head/lib/librpcsec_gss/rpc_gss_get_error.3 head/lib/librpcsec_gss/rpc_gss_get_mech_info.3 head/lib/librpcsec_gss/rpc_gss_get_principal_name.3 head/lib/librpcsec_gss/rpc_gss_get_versions.3 head/lib/librpcsec_gss/rpc_gss_getcred.3 head/lib/librpcsec_gss/rpc_gss_is_installed.3 head/lib/librpcsec_gss/rpc_gss_max_data_length.3 head/lib/librpcsec_gss/rpc_gss_mech_to_oid.3 head/lib/librpcsec_gss/rpc_gss_oid_to_mech.3 head/lib/librpcsec_gss/rpc_gss_qop_to_num.3 head/lib/librpcsec_gss/rpc_gss_seccreate.3 head/lib/librpcsec_gss/rpc_gss_set_callback.3 head/lib/librpcsec_gss/rpc_gss_set_defaults.3 head/lib/librpcsec_gss/rpc_gss_set_svc_name.3 head/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3 Modified: head/lib/librpcsec_gss/rpc_gss_get_error.3 == --- head/lib/librpcsec_gss/rpc_gss_get_error.3 Wed Jun 6 07:46:14 2012 (r236667) +++ head/lib/librpcsec_gss/rpc_gss_get_error.3 Wed Jun 6 08:07:47 2012 (r236668) @@ -39,7 +39,7 @@ .Sh DESCRIPTION Get details of the last RPCSEC_GSS error. .Sh PARAMETERS -.Bl -tag +.Bl -tag -width ".It error" .It error A pointer to a structure where the error details will be returned .El Modified: head/lib/librpcsec_gss/rpc_gss_get_mech_info.3 == --- head/lib/librpcsec_gss/rpc_gss_get_mech_info.3 Wed Jun 6 07:46:14 2012(r236667) +++ head/lib/librpcsec_gss/rpc_gss_get_mech_info.3 Wed Jun 6 08:07:47 2012(r236668) @@ -40,7 +40,7 @@ This function looks up a mechanism by name by reading the file /etc/gss/mech and queries it for its capabilities. .Sh PARAMETERS -.Bl -tag +.Bl -tag -width ".It service" .It mech The mechanism to search for .It service Modified: head/lib/librpcsec_gss/rpc_gss_get_principal_name.3 == --- head/lib/librpcsec_gss/rpc_gss_get_principal_name.3 Wed Jun 6 07:46:14 2012(r236667) +++ head/lib/librpcsec_gss/rpc_gss_get_principal_name.3 Wed Jun 6 08:07:47 2012(r236668) @@ -46,7 +46,7 @@ This function can be used to generate a client principal name from various strings. .Sh PARAMETERS -.Bl -tag +.Bl -tag -width ".It principal" .It principal If the principal is created successfully, .Fa *principal Modified: head/lib/librpcsec_gss/rpc_gss_get_versions.3 == --- head/lib/librpcsec_gss/rpc_gss_get_versions.3 Wed Jun 6 07:46:14 2012(r236667) +++ head/lib/librpcsec_gss/rpc_gss_get_versions.3 Wed Jun 6 08:07:47 2012(r236668) @@ -39,7 +39,7 @@ .Sh DESCRIPTION Return the highest and lowest supported versions of the RPCSEC_GSS protocol. .Sh PARAMETERS -.Bl -tag +.Bl -tag -width ".It vers_lo" .It vers_hi The value of .Fa *vers_hi Modified: head/lib/librpcsec_gss/rpc_gss_getcred.3 == --- head/lib/librpcsec_gss/rpc_gss_getcred.3Wed Jun 6 07:46:14 2012 (r236667) +++ head/lib/librpcsec_gss/rpc_gss_getcred.3Wed Jun 6 08:07:47 2012 (r236668) @@ -45,7 +45,7 @@ This function returns the RPCSEC_GSS authenticated credentials associated with an RPC request. .Sh PARAMETERS -.Bl -tag +.Bl -tag -width ".It cookie" .It req The RPC request to query .It rcred Modified: head/lib/librpcsec_gss/rpc_gss_is_installed.3 == --- head/lib/librpcsec_gss/rpc_gss_is_installed.3 Wed Jun 6 07:46:14 2012(r236667) +++ head/lib/librpcsec_gss/rpc_gss_is_installed.3 Wed Jun 6 08:07:47 2012(r236668) @@ -40,7 +40,7 @@ This function looks up a mechanism by name by reading the file /etc/gss/mech. .Sh PARAMETERS -.Bl -tag +.Bl -tag -width ".It mech" .It mech The mechanism to search for .El Modified: head/lib/librpcsec_gss/rpc_gss_max_data_length.3 == --- head/lib/librpcsec_gss/rpc_gss_max_data_length.3Wed Jun 6 07:46:14 2012(r236667) +++ head/lib/librpcsec_gss/rpc_gss_max_data_length.3Wed Jun 6 08:07:47 2012(r236668) @@ -41,7 +41,7 @@ Calculate the maximum message size that .Fa max_tp_unit_len , given the current service and QoP setting. .Sh PARAMETERS -.Bl -tag +.Bl -tag -width ".It max_tp_unit_len" .It auth A handle to a RPCSEC_GSS security context .It max_tp_unit_len Modified: head/lib/librpcsec_gss/rpc_gss_mech_to_oid.3 == --- head/lib/librpcsec_gss/rpc_gss_mech_to_oid.3
svn commit: r236669 - head/usr.sbin/pmcstat
Author: fabient Date: Wed Jun 6 08:58:31 2012 New Revision: 236669 URL: http://svn.freebsd.org/changeset/base/236669 Log: Remove spurious ARM symbols from lookup table. MFC after:3 days Modified: head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/usr.sbin/pmcstat/pmcstat_log.c == --- head/usr.sbin/pmcstat/pmcstat_log.c Wed Jun 6 08:07:47 2012 (r236668) +++ head/usr.sbin/pmcstat/pmcstat_log.c Wed Jun 6 08:58:31 2012 (r236669) @@ -554,6 +554,14 @@ pmcstat_image_add_symbols(struct pmcstat if ((fnname = elf_strptr(e, sh->sh_link, sym.st_name)) == NULL) continue; +#ifdef __arm__ + /* Remove spurious ARM function name. */ + if (fnname[0] == '$' && + (fnname[1] == 'a' || fnname[1] == 't' || + fnname[1] == 'd') && + fnname[2] == '\0') + continue; +#endif symptr->ps_name = pmcstat_string_intern(fnname); symptr->ps_start = sym.st_value - image->pi_vaddr; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236670 - head/sys/dev/ae
Author: pluknet Date: Wed Jun 6 09:07:50 2012 New Revision: 236670 URL: http://svn.freebsd.org/changeset/base/236670 Log: Fix the build. Modified: head/sys/dev/ae/if_ae.c Modified: head/sys/dev/ae/if_ae.c == --- head/sys/dev/ae/if_ae.c Wed Jun 6 08:58:31 2012(r236669) +++ head/sys/dev/ae/if_ae.c Wed Jun 6 09:07:50 2012(r236670) @@ -1381,7 +1381,7 @@ ae_pm_init(ae_softc_t *sc) /* * Configure PME. */ - if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) == 0) { pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2); pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((ifp->if_capenable & IFCAP_WOL) != 0) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236671 - head/sys/contrib/pf/net
Author: glebius Date: Wed Jun 6 09:36:52 2012 New Revision: 236671 URL: http://svn.freebsd.org/changeset/base/236671 Log: Merge revision 1.715 from OpenBSD: date: 2010/12/24 20:12:56; author: henning; state: Exp; lines: +3 -3 in pf_src_connlimit, the indices to sk->addr were swapped. tracked down and diff sent by Robert B Mills thanks, very good work! ok claudio Impact is that the "flush" keyword didn't work. Obtained from:OpenBSD MFC after:1 week Modified: head/sys/contrib/pf/net/pf.c Modified: head/sys/contrib/pf/net/pf.c == --- head/sys/contrib/pf/net/pf.cWed Jun 6 09:07:50 2012 (r236670) +++ head/sys/contrib/pf/net/pf.cWed Jun 6 09:36:52 2012 (r236671) @@ -643,10 +643,10 @@ pf_src_connlimit(struct pf_state **state (*state)->key[PF_SK_WIRE]->af && (((*state)->direction == PF_OUT && PF_AEQ(&(*state)->src_node->addr, - &sk->addr[0], sk->af)) || + &sk->addr[1], sk->af)) || ((*state)->direction == PF_IN && PF_AEQ(&(*state)->src_node->addr, - &sk->addr[1], sk->af))) && + &sk->addr[0], sk->af))) && ((*state)->rule.ptr->flush & PF_FLUSH_GLOBAL || (*state)->rule.ptr == st->rule.ptr)) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236674 - stable/8/sys/cam/scsi
Author: mav Date: Wed Jun 6 11:40:16 2012 New Revision: 236674 URL: http://svn.freebsd.org/changeset/base/236674 Log: MFC r208896, r208900 (by mjacob): Do a minor amount of stylifying. Also, get a Fibre Channel WWPN if one exists for a da unit and create a sysctl OID for it. Modified: stable/8/sys/cam/scsi/scsi_da.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/cam/scsi/scsi_da.c == --- stable/8/sys/cam/scsi/scsi_da.c Wed Jun 6 10:56:59 2012 (r236673) +++ stable/8/sys/cam/scsi/scsi_da.c Wed Jun 6 11:40:16 2012 (r236674) @@ -136,6 +136,7 @@ struct da_softc { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; struct callout sendordered_c; + uint64_t wwpn; }; struct da_quirk_entry { @@ -1312,6 +1313,7 @@ dasysctlinit(void *context, int pending) struct cam_periph *periph; struct da_softc *softc; char tmpstr[80], tmpstr2[80]; + struct ccb_trans_settings cts; periph = (struct cam_periph *)context; /* @@ -1338,14 +1340,38 @@ dasysctlinit(void *context, int pending) } /* -* Now register the sysctl handler, so the user can the value on +* Now register the sysctl handler, so the user can change the value on * the fly. */ - SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree), + SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "minimum_cmd_size", CTLTYPE_INT | CTLFLAG_RW, &softc->minimum_cmd_size, 0, dacmdsizesysctl, "I", "Minimum CDB size"); + /* +* Add some addressing info. +*/ + memset(&cts, 0, sizeof (cts)); + xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + cam_periph_lock(periph); + xpt_action((union ccb *)&cts); + cam_periph_unlock(periph); + if (cts.ccb_h.status != CAM_REQ_CMP) { + cam_periph_release(periph); + return; + } + if (cts.protocol == PROTO_SCSI && cts.transport == XPORT_FC) { + struct ccb_trans_settings_fc *fc = &cts.xport_specific.fc; + if (fc->valid & CTS_FC_VALID_WWPN) { + softc->wwpn = fc->wwpn; + SYSCTL_ADD_XLONG(&softc->sysctl_ctx, + SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "wwpn", CTLTYPE_QUAD | CTLFLAG_RD, + &softc->wwpn, "World Wide Port Name"); + } + } cam_periph_release(periph); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236675 - in stable/8/sys/cam: . scsi
Author: mav Date: Wed Jun 6 11:46:37 2012 New Revision: 236675 URL: http://svn.freebsd.org/changeset/base/236675 Log: MFC r208911 (by mjacob): Implement the usage of Report Luns as part of SCSI probing for SCP3 or better devices. This can be disabled on a per-device basis using quirks as well. This also handles the case where there is actually no connected LUN 0 (which can definitely be the case for storage arrays). Modified: stable/8/sys/cam/cam_debug.h stable/8/sys/cam/cam_xpt.c stable/8/sys/cam/cam_xpt_internal.h stable/8/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/cam/cam_debug.h == --- stable/8/sys/cam/cam_debug.hWed Jun 6 11:40:16 2012 (r236674) +++ stable/8/sys/cam/cam_debug.hWed Jun 6 11:46:37 2012 (r236675) @@ -40,7 +40,8 @@ typedef enum { CAM_DEBUG_SUBTRACE = 0x04, /* internal to routine flows */ CAM_DEBUG_CDB = 0x08, /* print out SCSI CDBs only */ CAM_DEBUG_XPT = 0x10, /* print out xpt scheduling */ - CAM_DEBUG_PERIPH= 0x20 /* print out peripheral calls */ + CAM_DEBUG_PERIPH= 0x20, /* print out peripheral calls */ + CAM_DEBUG_PROBE = 0x40 /* print out probe actions */ } cam_debug_flags; #if defined(CAMDEBUG) && defined(_KERNEL) @@ -58,6 +59,7 @@ extern u_int32_t cam_debug_delay; && (cam_dpath != NULL) \ && (xpt_path_comp(cam_dpath, path) >= 0) \ && (xpt_path_comp(cam_dpath, path) < 2)) + #defineCAM_DEBUG(path, flag, printfargs) \ if ((cam_dflags & (flag)) \ && (cam_dpath != NULL) \ @@ -68,6 +70,7 @@ extern u_int32_t cam_debug_delay; if (cam_debug_delay != 0) \ DELAY(cam_debug_delay); \ } + #defineCAM_DEBUG_PRINT(flag, printfargs) \ if (cam_dflags & (flag)) { \ printf("cam_debug: "); \ @@ -76,11 +79,20 @@ extern u_int32_t cam_debug_delay; DELAY(cam_debug_delay); \ } +#defineCAM_DEBUG_PATH_PRINT(flag, path, printfargs)\ + if (cam_dflags & (flag)) { \ + xpt_print(path, "cam_debug: "); \ + printf printfargs; \ + if (cam_debug_delay != 0) \ + DELAY(cam_debug_delay); \ + } + #else /* !CAMDEBUG || !_KERNEL */ #defineCAM_DEBUGGED(A, B) 0 #defineCAM_DEBUG(A, B, C) #defineCAM_DEBUG_PRINT(A, B) +#defineCAM_DEBUG_PATH_PRINT(A, B, C) #endif /* CAMDEBUG && _KERNEL */ Modified: stable/8/sys/cam/cam_xpt.c == --- stable/8/sys/cam/cam_xpt.c Wed Jun 6 11:40:16 2012(r236674) +++ stable/8/sys/cam/cam_xpt.c Wed Jun 6 11:46:37 2012(r236675) @@ -191,8 +191,18 @@ static struct cdevsw xpt_cdevsw = { /* Storage for debugging datastructures */ #ifdef CAMDEBUG struct cam_path *cam_dpath; -u_int32_t cam_dflags; +#ifdef CAM_DEBUG_FLAGS +u_int32_t cam_dflags = CAM_DEBUG_FLAGS; +#else +u_int32_t cam_dflags = CAM_DEBUG_NONE; +#endif +TUNABLE_INT("kern.cam.dflags", &cam_dflags); +SYSCTL_INT(_kern_cam, OID_AUTO, dflags, CTLFLAG_RW, + &cam_dflags, 0, "Cam Debug Flags"); u_int32_t cam_debug_delay; +TUNABLE_INT("kern.cam.debug_delay", &cam_debug_delay); +SYSCTL_INT(_kern_cam, OID_AUTO, debug_delay, CTLFLAG_RW, + &cam_debug_delay, 0, "Cam Debug Flags"); #endif /* Our boot-time initialization hook */ @@ -4369,6 +4379,7 @@ xpt_alloc_target(struct cam_eb *bus, tar target->target_id = target_id; target->refcount = 1; target->generation = 0; + target->luns = NULL; timevalclear(&target->last_reset); /* * Hold a reference to our parent bus so it @@ -4400,6 +4411,8 @@ xpt_release_target(struct cam_et *target TAILQ_REMOVE(&target->bus->et_entries, target, links); target->bus->generation++; xpt_release_bus(target->bus); + if (target->luns) + free(target->luns, M_CAMXPT); free(target, M_CAMXPT); } } @@ -4662,11 +4675,6 @@ xpt_config(void *arg) #ifdef CAMDEBUG /* Setup debugging flags and path */ -#ifdef CAM_DEBUG_FLAGS - cam_dflags = CAM_DEBUG_FLAGS; -#else /* !CAM_DEBUG_FLAGS */ - cam_dflags = CAM_DEBUG_NONE; -#endif /* CAM_DEBUG_FLAGS */ #ifdef CAM_DEBUG_BUS if (cam_dflags != CAM_DEBUG_NONE) { /* Modified: stable/8/sys/cam/cam_xpt_internal.
svn commit: r236677 - stable/9/sys/cam/scsi
Author: mav Date: Wed Jun 6 12:16:54 2012 New Revision: 236677 URL: http://svn.freebsd.org/changeset/base/236677 Log: MFC r230053: Add BIO_DELETE support for SCSI Direct Access devices (da). Depending on device capabilities use different methods to implement it. Currently used method can be read/set via kern.cam.da.X.delete_method sysctls. Possible values are: NONE - no provisioning support reported by the device; DISABLE - provisioning support was disabled because of errors; ZERO - use WRITE SAME (10) command to write zeroes; WS10 - use WRITE SAME (10) command with UNMAP bit set; WS16 - use WRITE SAME (16) command with UNMAP bit set; UNMAP - use UNMAP command (equivalent of the ATA DSM TRIM command). The last two methods (UNMAP and WS16) are defined by SBC specification and the UNMAP method is the most advanced one. The rest of methods I've found supported in Linux, and as soon as they were trivial to implement, then why not? Hope they will be useful in some cases. Unluckily I have no devices properly reporting parameters of the logical block provisioning support via respective VPD pages (0xB0 and 0xB2). So all info I have/use now is the flag telling whether logical block provisioning is supported or not. As result, specific methods chosen now by trying different ones in order (UNMAP, WS16, DISABLE) and checking completion status to fallback if needed. I don't expect problems from this, as if something go wrong, it should just disable itself. It may disable even too aggressively if only some command parameter misfit. Unlike Linux, which executes each delete with separate request, I've implemented here the same request aggregation as implemented in ada driver. Tests on SSDs I have show much better results doing it this way: above 8GB/s of the linear delete on Intel SATA SSD on LSI SAS HBA (mps). Sponsored by: iXsystems, Inc. Modified: stable/9/sys/cam/scsi/scsi_all.c stable/9/sys/cam/scsi/scsi_all.h stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_all.c == --- stable/9/sys/cam/scsi/scsi_all.cWed Jun 6 12:13:20 2012 (r236676) +++ stable/9/sys/cam/scsi/scsi_all.cWed Jun 6 12:16:54 2012 (r236677) @@ -364,6 +364,8 @@ static struct op_table_entry scsi_op_cod { 0x40, D | T | L | P | W | R | O | M | S | C, "CHANGE DEFINITION" }, /* 41 O WRITE SAME(10) */ { 0x41, D, "WRITE SAME(10)" }, + /* 42 O UNMAP */ + { 0x42, D, "UNMAP" }, /* 42 O READ SUB-CHANNEL */ { 0x42, R, "READ SUB-CHANNEL" }, /* 43 O READ TOC/PMA/ATIP */ @@ -5570,6 +5572,104 @@ scsi_read_write(struct ccb_scsiio *csio, } void +scsi_write_same(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + u_int8_t tag_action, u_int8_t byte2, + int minimum_cmd_size, u_int64_t lba, u_int32_t block_count, + u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, + u_int32_t timeout) +{ + u_int8_t cdb_len; + if ((minimum_cmd_size < 16) && + ((block_count & 0x) == block_count) && + ((lba & 0x) == lba)) { + /* +* Need a 10 byte cdb. +*/ + struct scsi_write_same_10 *scsi_cmd; + + scsi_cmd = (struct scsi_write_same_10 *)&csio->cdb_io.cdb_bytes; + scsi_cmd->opcode = WRITE_SAME_10; + scsi_cmd->byte2 = byte2; + scsi_ulto4b(lba, scsi_cmd->addr); + scsi_cmd->group = 0; + scsi_ulto2b(block_count, scsi_cmd->length); + scsi_cmd->control = 0; + cdb_len = sizeof(*scsi_cmd); + + CAM_DEBUG(csio->ccb_h.path, CAM_DEBUG_SUBTRACE, + ("10byte: %x%x%x%x:%x%x: %d\n", scsi_cmd->addr[0], + scsi_cmd->addr[1], scsi_cmd->addr[2], + scsi_cmd->addr[3], scsi_cmd->length[0], + scsi_cmd->length[1], dxfer_len)); + } else { + /* +* 16 byte CDB. We'll only get here if the LBA is larger +* than 2^32, or if the user asks for a 16 byte command. +*/ + struct scsi_write_same_16 *scsi_cmd; + + scsi_cmd = (struct scsi_write_same_16 *)&csio->cdb_io.cdb_bytes; + scsi_cmd->opcode = WRITE_SAME_16; + scsi_cmd->byte2 = byte2; + scsi_u64to8b(lba, scsi_cmd->addr); + scsi_ulto4b(block_count, scsi_cmd->length); + scsi_cmd->group = 0; + scsi_cmd->control = 0; + cdb_len = sizeof(*scsi_cmd); + + CAM
svn commit: r236678 - stable/8/sys/cam/scsi
Author: mav Date: Wed Jun 6 12:36:40 2012 New Revision: 236678 URL: http://svn.freebsd.org/changeset/base/236678 Log: MFC r223084 (by gibbs): sys/cam/scsi/scsi_da.c: - Only attempt the closing synchronize cache on a disk if it is still there. - When a device is lost, report the number of outstanding I/Os as they are drained. - When a device is lost, return any unprocessed bios with ENXIO instead of EIO. - Filter asynchronous events, but always allow cam_periph_async() to see them too. Modified: stable/8/sys/cam/scsi/scsi_da.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/cam/scsi/scsi_da.c == --- stable/8/sys/cam/scsi/scsi_da.c Wed Jun 6 12:16:54 2012 (r236677) +++ stable/8/sys/cam/scsi/scsi_da.c Wed Jun 6 12:36:40 2012 (r236678) @@ -972,7 +972,8 @@ daclose(struct disk *dp) softc = (struct da_softc *)periph->softc; - if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) { + if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0 +&& (softc->flags & DA_FLAG_PACK_INVALID) == 0) { union ccb *ccb; ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); @@ -1299,12 +1300,12 @@ daasync(void *callback_arg, u_int32_t co softc->flags |= DA_FLAG_RETRY_UA; LIST_FOREACH(ccbh, &softc->pending_ccbs, periph_links.le) ccbh->ccb_state |= DA_CCB_RETRY_UA; - /* FALLTHROUGH*/ + break; } default: - cam_periph_async(periph, code, path, arg); break; } + cam_periph_async(periph, code, path, arg); } static void @@ -1795,7 +1796,7 @@ dadone(struct cam_periph *periph, union if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { int error; int sf; - + if ((csio->ccb_h.ccb_state & DA_CCB_RETRY_UA) != 0) sf = SF_RETRY_UA; else @@ -1810,8 +1811,17 @@ dadone(struct cam_periph *periph, union return; } if (error != 0) { + int queued_error; + + /* +* return all queued I/O with EIO, so that +* the client can retry these I/Os in the +* proper order should it attempt to recover. +*/ + queued_error = EIO; - if (error == ENXIO) { + if (error == ENXIO +&& (softc->flags & DA_FLAG_PACK_INVALID)== 0) { /* * Catastrophic error. Mark our pack as * invalid. @@ -1823,14 +1833,10 @@ dadone(struct cam_periph *periph, union xpt_print(periph->path, "Invalidating pack\n"); softc->flags |= DA_FLAG_PACK_INVALID; + queued_error = ENXIO; } - - /* -* return all queued I/O with EIO, so that -* the client can retry these I/Os in the -* proper order should it attempt to recover. -*/ - bioq_flush(&softc->bio_queue, NULL, EIO); + bioq_flush(&softc->bio_queue, NULL, + queued_error); bp->bio_error = error; bp->bio_resid = bp->bio_bcount; bp->bio_flags |= BIO_ERROR; @@ -1870,6 +1876,11 @@ dadone(struct cam_periph *periph, union if (softc->outstanding_cmds == 0) softc->flags |= DA_FLAG_WENT_IDLE; + if ((softc->flags & DA_FLAG_PACK_INVALID) != 0) { + xpt_print(periph->path, "oustanding %d\n", + softc->outstanding_cmds); + } + biodone(bp); break; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236680 - head/share/man/man9
Author: jhb Date: Wed Jun 6 13:35:30 2012 New Revision: 236680 URL: http://svn.freebsd.org/changeset/base/236680 Log: Use the defined terms "readers" and "writers" to simplify some text. Modified: head/share/man/man9/rwlock.9 Modified: head/share/man/man9/rwlock.9 == --- head/share/man/man9/rwlock.9Wed Jun 6 12:45:48 2012 (r236679) +++ head/share/man/man9/rwlock.9Wed Jun 6 13:35:30 2012 (r236680) @@ -114,12 +114,10 @@ cannot be held while sleeping. The .Nm locks have priority propagation like mutexes, but priority -can be propagated only to an exclusive holder. -This limitation comes from the fact that shared owners +can be propagated only to writers. +This limitation comes from the fact that readers are anonymous. -Another important property is that shared holders of -.Nm -can recurse, +Another important property is that readers can always recurse, and exclusive locks can be made recursive selectively. .Ss Macros and Functions .Bl -tag -width indent ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236681 - head/sys/arm/at91
Author: imp Date: Wed Jun 6 14:31:14 2012 New Revision: 236681 URL: http://svn.freebsd.org/changeset/base/236681 Log: Remove stray break; that resulted from a last-minute, untested change. Modified: head/sys/arm/at91/at91sam9260.c Modified: head/sys/arm/at91/at91sam9260.c == --- head/sys/arm/at91/at91sam9260.c Wed Jun 6 13:35:30 2012 (r236680) +++ head/sys/arm/at91/at91sam9260.c Wed Jun 6 14:31:14 2012 (r236681) @@ -200,7 +200,6 @@ at91_identify(driver_t *drv, device_t pa if (soc_data.type == AT91_CPU_SAM9260) { at91_add_child(parent, 0, "at91sam9260", 0, 0, 0, -1, 0, 0); at91_cpu_add_builtin_children(parent); - break; } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236683 - in stable/9: share/man/man9 sys/kern sys/sys
Author: jhb Date: Wed Jun 6 16:00:31 2012 New Revision: 236683 URL: http://svn.freebsd.org/changeset/base/236683 Log: MFC 228509,228620,228533: Add a helper API to allow in-kernel code to map portions of shared memory objects created by shm_open(2) into the kernel's address space. This provides a convenient way for creating shared memory buffers between userland and the kernel without requiring custom character devices. Added: stable/9/share/man/man9/shm_map.9 - copied, changed from r228509, head/share/man/man9/shm_map.9 Modified: stable/9/share/man/man9/Makefile stable/9/sys/kern/uipc_shm.c stable/9/sys/sys/mman.h Directory Properties: stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/share/man/man9/Makefile == --- stable/9/share/man/man9/MakefileWed Jun 6 15:29:27 2012 (r236682) +++ stable/9/share/man/man9/MakefileWed Jun 6 16:00:31 2012 (r236683) @@ -237,6 +237,7 @@ MAN=accept_filter.9 \ sema.9 \ sf_buf.9 \ sglist.9 \ + shm_map.9 \ signal.9 \ sleep.9 \ sleepqueue.9 \ @@ -1156,6 +1157,7 @@ MLINKS+=sglist.9 sglist_alloc.9 \ sglist.9 sglist_reset.9 \ sglist.9 sglist_slice.9 \ sglist.9 sglist_split.9 +MLINKS+=shm_map.9 shm_unmap.9 MLINKS+=signal.9 cursig.9 \ signal.9 execsigs.9 \ signal.9 issignal.9 \ Copied and modified: stable/9/share/man/man9/shm_map.9 (from r228509, head/share/man/man9/shm_map.9) == --- head/share/man/man9/shm_map.9 Wed Dec 14 22:22:19 2011 (r228509, copy source) +++ stable/9/share/man/man9/shm_map.9 Wed Jun 6 16:00:31 2012 (r236683) @@ -30,9 +30,8 @@ .Dt SHM_MAP 9 .Os .Sh NAME -.Nm shm_map , -.Nm shm_unmap -.Nd map shared memory objects into the kernel's address space +.Nm shm_map , shm_unmap +.Nd "map shared memory objects into the kernel's address space" .Sh SYNOPSIS .In sys/types.h .In sys/mman.h @@ -42,9 +41,9 @@ .Fn shm_unmap "struct file *fp" "void *mem" "size_t size" .Sh DESCRIPTION The -.Nm shm_map +.Fn shm_map and -.Nm shm_unmap +.Fn shm_unmap functions provide an API for mapping shared memory objects into the kernel. Shared memory objects are created by .Xr shm_open 2 . @@ -57,13 +56,13 @@ Shared memory objects can still be grown .Pp To simplify the accounting needed to enforce the above requirement, callers of this API are required to unmap the entire region mapped by -.Nm shm_map +.Fn shm_map when calling -.Nm shm_unmap . +.Fn shm_unmap . Unmapping only a portion of the region is not permitted. .Pp The -.Nm shm_map +.Fn shm_map function locates the shared memory object associated with the open file .Fa fp . It maps the region of that object described by @@ -77,9 +76,9 @@ will be set to the start of the mapping. All pages for the range will be wired into memory upon successful return. .Pp The -.Nm shm_unmap +.Fn shm_unmap function unmaps a region previously mapped by -.Nm shm_map . +.Fn shm_map . The .Fa mem argument should match the value previously returned in @@ -87,22 +86,22 @@ argument should match the value previous and the .Fa size argument should match the value passed to -.Nm shm_map . +.Fn shm_map . .Pp Note that -.Nm shm_map +.Fn shm_map will not hold an extra reference on the open file .Fa fp for the lifetime of the mapping. Instead, the calling code is required to do this if it wishes to use -.Nm shm_unmap +.Fn shm_unmap on the region in the future. .Sh RETURN VALUES The -.Nm shm_map +.Fn shm_map and -.Nm shm_unmap +.Fn shm_unmap functions return zero on success or an error on failure. .Sh EXAMPLES The following function accepts a file descriptor for a shared memory @@ -110,7 +109,7 @@ object. It maps the first sixteen kilobytes of the object into the kernel, performs some work on that address, and then unmaps the address before returning. -.Bd -literal +.Bd -liter
svn commit: r236684 - in stable/8: share/man/man9 sys/kern sys/sys
Author: jhb Date: Wed Jun 6 16:01:45 2012 New Revision: 236684 URL: http://svn.freebsd.org/changeset/base/236684 Log: MFC 228509,228620,228533: Add a helper API to allow in-kernel code to map portions of shared memory objects created by shm_open(2) into the kernel's address space. This provides a convenient way for creating shared memory buffers between userland and the kernel without requiring custom character devices. Added: stable/8/share/man/man9/shm_map.9 - copied, changed from r228509, head/share/man/man9/shm_map.9 Modified: stable/8/share/man/man9/Makefile stable/8/sys/kern/uipc_shm.c stable/8/sys/sys/mman.h Directory Properties: stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/share/man/man9/Makefile == --- stable/8/share/man/man9/MakefileWed Jun 6 16:00:31 2012 (r236683) +++ stable/8/share/man/man9/MakefileWed Jun 6 16:01:45 2012 (r236684) @@ -237,6 +237,7 @@ MAN=accept_filter.9 \ sema.9 \ sf_buf.9 \ sglist.9 \ + shm_map.9 \ signal.9 \ sleep.9 \ sleepqueue.9 \ @@ -1117,6 +1118,7 @@ MLINKS+=sglist.9 sglist_alloc.9 \ sglist.9 sglist_reset.9 \ sglist.9 sglist_slice.9 \ sglist.9 sglist_split.9 +MLINKS+=shm_map.9 shm_unmap.9 MLINKS+=signal.9 cursig.9 \ signal.9 execsigs.9 \ signal.9 issignal.9 \ Copied and modified: stable/8/share/man/man9/shm_map.9 (from r228509, head/share/man/man9/shm_map.9) == --- head/share/man/man9/shm_map.9 Wed Dec 14 22:22:19 2011 (r228509, copy source) +++ stable/8/share/man/man9/shm_map.9 Wed Jun 6 16:01:45 2012 (r236684) @@ -30,9 +30,8 @@ .Dt SHM_MAP 9 .Os .Sh NAME -.Nm shm_map , -.Nm shm_unmap -.Nd map shared memory objects into the kernel's address space +.Nm shm_map , shm_unmap +.Nd "map shared memory objects into the kernel's address space" .Sh SYNOPSIS .In sys/types.h .In sys/mman.h @@ -42,9 +41,9 @@ .Fn shm_unmap "struct file *fp" "void *mem" "size_t size" .Sh DESCRIPTION The -.Nm shm_map +.Fn shm_map and -.Nm shm_unmap +.Fn shm_unmap functions provide an API for mapping shared memory objects into the kernel. Shared memory objects are created by .Xr shm_open 2 . @@ -57,13 +56,13 @@ Shared memory objects can still be grown .Pp To simplify the accounting needed to enforce the above requirement, callers of this API are required to unmap the entire region mapped by -.Nm shm_map +.Fn shm_map when calling -.Nm shm_unmap . +.Fn shm_unmap . Unmapping only a portion of the region is not permitted. .Pp The -.Nm shm_map +.Fn shm_map function locates the shared memory object associated with the open file .Fa fp . It maps the region of that object described by @@ -77,9 +76,9 @@ will be set to the start of the mapping. All pages for the range will be wired into memory upon successful return. .Pp The -.Nm shm_unmap +.Fn shm_unmap function unmaps a region previously mapped by -.Nm shm_map . +.Fn shm_map . The .Fa mem argument should match the value previously returned in @@ -87,22 +86,22 @@ argument should match the value previous and the .Fa size argument should match the value passed to -.Nm shm_map . +.Fn shm_map . .Pp Note that -.Nm shm_map +.Fn shm_map will not hold an extra reference on the open file .Fa fp for the lifetime of the mapping. Instead, the calling code is required to do this if it wishes to use -.Nm shm_unmap +.Fn shm_unmap on the region in the future. .Sh RETURN VALUES The -.Nm shm_map +.Fn shm_map and -.Nm shm_unmap +.Fn shm_unmap functions return zero on success or an error on failure. .Sh EXAMPLES The following function accepts a file descriptor for a shared memory @@ -110,7 +109,7 @@ object. It maps the first sixteen kilobytes of the object into the kernel, performs some work on that address, and then unmaps the address before returning. -.Bd -literal +.Bd -literal -offset indent int shm_example(int fd) { @@ -118,7 +117,7 @@ shm_example(int fd) void *mem; int error; - error = fget(curthread, fd, CAP_MMAP, &fp) + error = fget(curthread, fd, CAP_MMAP, &fp); if (error) return (error); error = shm_map(fp, 16384, 0, &mem); @@ -136,7 +135,7 @@ shm_example(int fd) .Ed .Sh ERRORS The -.Nm shm_map +.Fn shm_map function returns the following errors on failure: .Bl -tag -width Er .It Bq Er EINVAL @@ -158,7 +157,7 @@ The shared memory object could not be ma .El .Pp The -.Nm shm_unmap +.F
svn commit: r236685 - stable/8/sys/vm
Author: emax Date: Wed Jun 6 16:20:59 2012 New Revision: 236685 URL: http://svn.freebsd.org/changeset/base/236685 Log: MFC r235854 Seems applicable here as well. Tweak condition for disabling allocation from per-CPU buckets in low memory situation. I've observed a situation where per-CPU allocations were disabled while there were enough free cached pages. Basically, cnt.v_free_count was sitting stable at a value lower than cnt.v_free_min and that caused massive performance drop. Reviewed by: alc Requested by: Andrew Boyer aboyer at averesystems dot com Modified: stable/8/sys/vm/uma_core.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/vm/uma_core.c == --- stable/8/sys/vm/uma_core.c Wed Jun 6 16:01:45 2012(r236684) +++ stable/8/sys/vm/uma_core.c Wed Jun 6 16:20:59 2012(r236685) @@ -267,10 +267,7 @@ SYSCTL_PROC(_vm, OID_AUTO, zone_stats, C static void bucket_enable(void) { - if (cnt.v_free_count < cnt.v_free_min) - bucketdisable = 1; - else - bucketdisable = 0; + bucketdisable = vm_page_count_min(); } /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236686 - head/tools/tools/syscall_timing
Author: kib Date: Wed Jun 6 16:26:55 2012 New Revision: 236686 URL: http://svn.freebsd.org/changeset/base/236686 Log: Add gettimeofday() test. MFC after:3 days Modified: head/tools/tools/syscall_timing/syscall_timing.c Modified: head/tools/tools/syscall_timing/syscall_timing.c == --- head/tools/tools/syscall_timing/syscall_timing.cWed Jun 6 16:20:59 2012(r236685) +++ head/tools/tools/syscall_timing/syscall_timing.cWed Jun 6 16:26:55 2012(r236686) @@ -142,6 +142,22 @@ test_clock_gettime(uintmax_t num, uintma } uintmax_t +test_gettimeofday(uintmax_t num, uintmax_t int_arg, const char *path) +{ + struct timeval tv; + uintmax_t i; + + benchmark_start(); + for (i = 0; i < num; i++) { + if (alarm_fired) + break; + (void)gettimeofday(&tv, NULL); + } + benchmark_stop(); + return (i); +} + +uintmax_t test_pipe(uintmax_t num, uintmax_t int_arg, const char *path) { int fd[2], i; @@ -608,6 +624,7 @@ static const struct test tests[] = { { "getuid", test_getuid }, { "getppid", test_getppid }, { "clock_gettime", test_clock_gettime }, + { "gettimeofday", test_gettimeofday }, { "pipe", test_pipe }, { "socket_local_stream", test_socket_stream, .t_int = PF_LOCAL }, { "socket_local_dgram", test_socket_dgram, .t_int = PF_LOCAL }, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236687 - head/sys/fs/nfsclient
Author: kib Date: Wed Jun 6 16:30:16 2012 New Revision: 236687 URL: http://svn.freebsd.org/changeset/base/236687 Log: Improve handling of uiomove(9) errors for the NFS client. Do not brelse() the buffer unconditionally with BIO_ERROR set if uiomove() failed. The brelse() treats most buffers with BIO_ERROR as B_INVAL, dropping their content. Instead, if the write request covered the whole buffer, remember the cached state and brelse() with BIO_ERROR set only if the buffer was not cached previously. Update the buffer dirtyoff/dirtyend based on the progress recorded by uiomove() in passed struct uio, even in the presence of error. Otherwise, usermode could see changed data in the backed pages, but later the buffer is destroyed without write-back. If uiomove() failed for IO_UNIT request, try to truncate the vnode back to the pre-write state, and rewind the progress in passed uio accordingly, following the FFS behaviour. Reviewed by: rmacklem (some time ago) Tested by:pho MFC after:1 month Modified: head/sys/fs/nfsclient/nfs_clbio.c Modified: head/sys/fs/nfsclient/nfs_clbio.c == --- head/sys/fs/nfsclient/nfs_clbio.c Wed Jun 6 16:26:55 2012 (r236686) +++ head/sys/fs/nfsclient/nfs_clbio.c Wed Jun 6 16:30:16 2012 (r236687) @@ -897,8 +897,9 @@ ncl_write(struct vop_write_args *ap) struct nfsmount *nmp = VFSTONFS(vp->v_mount); daddr_t lbn; int bcount; - int n, on, error = 0; - off_t tmp_off; + int bp_cached, n, on, error = 0; + size_t orig_resid, local_resid; + off_t orig_size, tmp_off; KASSERT(uio->uio_rw == UIO_WRITE, ("ncl_write mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, @@ -950,6 +951,11 @@ flush_and_restart: mtx_unlock(&np->n_mtx); } + orig_resid = uio->uio_resid; + mtx_lock(&np->n_mtx); + orig_size = np->n_size; + mtx_unlock(&np->n_mtx); + /* * If IO_APPEND then load uio_offset. We restart here if we cannot * get the append lock. @@ -1127,7 +1133,10 @@ again: * normally. */ + bp_cached = 1; if (on == 0 && n == bcount) { + if ((bp->b_flags & B_CACHE) == 0) + bp_cached = 0; bp->b_flags |= B_CACHE; bp->b_flags &= ~B_INVAL; bp->b_ioflags &= ~BIO_ERROR; @@ -1193,8 +1202,24 @@ again: goto again; } + local_resid = uio->uio_resid; error = uiomove((char *)bp->b_data + on, n, uio); + if (error != 0 && !bp_cached) { + /* +* This block has no other content then what +* possibly was written by the faulty uiomove. +* Release it, forgetting the data pages, to +* prevent the leak of uninitialized data to +* usermode. +*/ + bp->b_ioflags |= BIO_ERROR; + brelse(bp); + uio->uio_offset -= local_resid - uio->uio_resid; + uio->uio_resid = local_resid; + break; + } + /* * Since this block is being modified, it must be written * again and not just committed. Since write clustering does @@ -1203,17 +1228,18 @@ again: */ bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK); - if (error) { - bp->b_ioflags |= BIO_ERROR; - brelse(bp); - break; - } + /* +* Get the partial update on the progress made from +* uiomove, if an error occured. +*/ + if (error != 0) + n = local_resid - uio->uio_resid; /* * Only update dirtyoff/dirtyend if not a degenerate * condition. */ - if (n) { + if (n > 0) { if (bp->b_dirtyend > 0) { bp->b_dirtyoff = min(on, bp->b_dirtyoff); bp->b_dirtyend = max((on + n), bp->b_dirtyend); @@ -1242,8 +1268,22 @@ again: } else { bdwrite(bp); } + + if (error != 0) + break; } while (uio->uio_resid > 0 && n > 0); + if (error != 0) { + if (ioflag & IO_UNIT) { + VATTR_NULL(&vattr); + vattr.va_size = orig_size; +
svn commit: r236688 - head/share/man/man4
Author: obrien Date: Wed Jun 6 16:51:33 2012 New Revision: 236688 URL: http://svn.freebsd.org/changeset/base/236688 Log: Add to the description and spell check. Modified: head/share/man/man4/filemon.4 Modified: head/share/man/man4/filemon.4 == --- head/share/man/man4/filemon.4 Wed Jun 6 16:30:16 2012 (r236687) +++ head/share/man/man4/filemon.4 Wed Jun 6 16:51:33 2012 (r236688) @@ -10,7 +10,7 @@ .\"notice, this list of conditions and the following disclaimer in the .\"documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software -.\"must display the following acknowledgement: +.\"must display the following acknowledgment: .\"This product includes software developed by David E. O'Brien and .\"contributors. .\" 4. Neither the name of the author nor the names of its contributors @@ -19,7 +19,7 @@ .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" IMPLIED WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS @@ -87,12 +87,13 @@ following records can represent a single .Xr open 2 for R/W, -or two seperate +or two separate .Xr open 2 calls, one for .Ql R and one for .Ql W . +Note that only successful system calls are captured. .Sh IOCTLS User mode programs communicate with the .Nm @@ -168,7 +169,8 @@ buffer contents to it. .Sh SEE ALSO .Xr dtrace 1 , .Xr ktrace 1 , -.Xr truss 1 +.Xr truss 1 , +.Xr ioctl 2 .Sh HISTORY A .Nm ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236689 - head/sys/cam/scsi
Author: ken Date: Wed Jun 6 17:04:56 2012 New Revision: 236689 URL: http://svn.freebsd.org/changeset/base/236689 Log: Fix a memory leak in the kernel case in scsi_command_string(). Submitted by: Kashyap Desai MFC after:3 days Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c == --- head/sys/cam/scsi/scsi_all.cWed Jun 6 16:51:33 2012 (r236688) +++ head/sys/cam/scsi/scsi_all.cWed Jun 6 17:04:56 2012 (r236689) @@ -3059,6 +3059,10 @@ scsi_command_string(struct cam_device *d sizeof(cdb_str))); } +#ifdef _KERNEL + xpt_free_ccb((union ccb *)cgd); +#endif + return(0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r236688 - head/share/man/man4
On 6 June 2012 17:51, David E. O'Brien wrote: > Author: obrien > Date: Wed Jun 6 16:51:33 2012 > New Revision: 236688 > URL: http://svn.freebsd.org/changeset/base/236688 > > Log: > Add to the description and spell check. > > Modified: > head/share/man/man4/filemon.4 > > Modified: head/share/man/man4/filemon.4 > == > --- head/share/man/man4/filemon.4 Wed Jun 6 16:30:16 2012 > (r236687) > +++ head/share/man/man4/filemon.4 Wed Jun 6 16:51:33 2012 > (r236688) > @@ -10,7 +10,7 @@ > .\" notice, this list of conditions and the following disclaimer in the > .\" documentation and/or other materials provided with the distribution. > .\" 3. All advertising materials mentioning features or use of this software > -.\" must display the following acknowledgement: > +.\" must display the following acknowledgment: > .\" This product includes software developed by David E. O'Brien and > .\" contributors. Aren't we phasing that clause out? Chris ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236690 - head/tools/tools/syscall_timing
Author: kib Date: Wed Jun 6 17:26:52 2012 New Revision: 236690 URL: http://svn.freebsd.org/changeset/base/236690 Log: Do not execute a needed statement with side-effect in assert(). MFC after:3 days Modified: head/tools/tools/syscall_timing/syscall_timing.c Modified: head/tools/tools/syscall_timing/syscall_timing.c == --- head/tools/tools/syscall_timing/syscall_timing.cWed Jun 6 17:04:56 2012(r236689) +++ head/tools/tools/syscall_timing/syscall_timing.cWed Jun 6 17:26:52 2012(r236690) @@ -71,20 +71,24 @@ alarm_handler(int signum) static void benchmark_start(void) { + int error; alarm_fired = 0; if (alarm_timeout) { signal(SIGALRM, alarm_handler); alarm(alarm_timeout); } - assert(clock_gettime(CLOCK_REALTIME, &ts_start) == 0); + error = clock_gettime(CLOCK_REALTIME, &ts_start); + assert(error == 0); } static void benchmark_stop(void) { + int error; - assert(clock_gettime(CLOCK_REALTIME, &ts_end) == 0); + error = clock_gettime(CLOCK_REALTIME, &ts_end); + assert(error == 0); } uintmax_t @@ -687,7 +691,7 @@ main(int argc, char *argv[]) const char *path; long long ll; char *endp; - int ch, i, j, k; + int ch, error, i, j, k; uintmax_t iterations, loops; alarm_timeout = 1; @@ -756,7 +760,8 @@ main(int argc, char *argv[]) } } - assert(clock_getres(CLOCK_REALTIME, &ts_res) == 0); + error = clock_getres(CLOCK_REALTIME, &ts_res); + assert(error == 0); printf("Clock resolution: %ju.%09ju\n", (uintmax_t)ts_res.tv_sec, (uintmax_t)ts_res.tv_nsec); printf("test\tloop\ttime\titerations\tperiteration\n"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236691 - head/sys/cam/scsi
Author: mav Date: Wed Jun 6 17:28:46 2012 New Revision: 236691 URL: http://svn.freebsd.org/changeset/base/236691 Log: Remove declaration of scsi_interpret_sense(), removed 11 years ago. Modified: head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/scsi/scsi_all.h == --- head/sys/cam/scsi/scsi_all.hWed Jun 6 17:26:52 2012 (r236690) +++ head/sys/cam/scsi/scsi_all.hWed Jun 6 17:28:46 2012 (r236691) @@ -2183,12 +2183,6 @@ int scsi_sense_sbuf(struct ccb_scsiio * char * scsi_sense_string(struct ccb_scsiio *csio, char *str, int str_len); void scsi_sense_print(struct ccb_scsiio *csio); -intscsi_interpret_sense(union ccb *ccb, -u_int32_t sense_flags, -u_int32_t *relsim_flags, -u_int32_t *reduction, -u_int32_t *timeout, -scsi_sense_action error_action); #else /* _KERNEL */ intscsi_command_string(struct cam_device *device, struct ccb_scsiio *csio, struct sbuf *sb); @@ -2200,13 +2194,6 @@ char * scsi_sense_string(struct cam_dev char *str, int str_len); void scsi_sense_print(struct cam_device *device, struct ccb_scsiio *csio, FILE *ofile); -intscsi_interpret_sense(struct cam_device *device, -union ccb *ccb, -u_int32_t sense_flags, -u_int32_t *relsim_flags, -u_int32_t *reduction, -u_int32_t *timeout, -scsi_sense_action error_action); #endif /* _KERNEL */ #defineSF_RETRY_UA 0x01 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236692 - stable/9/sys/netinet/ipfw
Author: oleg Date: Wed Jun 6 18:00:19 2012 New Revision: 236692 URL: http://svn.freebsd.org/changeset/base/236692 Log: MFC: r232272, r232273 - lookup_dyn_rule_locked(): style(9) cleanup - Refresh dynamic tcp rule only if both sides answered keepalive packets. - Remove some useless assignments. Modified: stable/9/sys/netinet/ipfw/ip_fw_dynamic.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/ipfw/ip_fw_dynamic.c == --- stable/9/sys/netinet/ipfw/ip_fw_dynamic.c Wed Jun 6 17:28:46 2012 (r236691) +++ stable/9/sys/netinet/ipfw/ip_fw_dynamic.c Wed Jun 6 18:00:19 2012 (r236692) @@ -390,72 +390,68 @@ ipfw_remove_dyn_children(struct ip_fw *r IPFW_DYN_UNLOCK(); } -/** - * lookup a dynamic rule, locked version +/* + * Lookup a dynamic rule, locked version. */ static ipfw_dyn_rule * lookup_dyn_rule_locked(struct ipfw_flow_id *pkt, int *match_direction, struct tcphdr *tcp) { /* -* stateful ipfw extensions. -* Lookup into dynamic session queue +* Stateful ipfw extensions. +* Lookup into dynamic session queue. */ #define MATCH_REVERSE 0 #define MATCH_FORWARD 1 #define MATCH_NONE 2 #define MATCH_UNKNOWN 3 int i, dir = MATCH_NONE; - ipfw_dyn_rule *prev, *q=NULL; + ipfw_dyn_rule *prev, *q = NULL; IPFW_DYN_LOCK_ASSERT(); if (V_ipfw_dyn_v == NULL) - goto done; /* not found */ - i = hash_packet( pkt ); - for (prev=NULL, q = V_ipfw_dyn_v[i] ; q != NULL ; ) { + goto done; /* not found */ + i = hash_packet(pkt); + for (prev = NULL, q = V_ipfw_dyn_v[i]; q != NULL;) { if (q->dyn_type == O_LIMIT_PARENT && q->count) goto next; - if (TIME_LEQ( q->expire, time_uptime)) { /* expire entry */ + if (TIME_LEQ(q->expire, time_uptime)) { /* expire entry */ UNLINK_DYN_RULE(prev, V_ipfw_dyn_v[i], q); continue; } - if (pkt->proto == q->id.proto && - q->dyn_type != O_LIMIT_PARENT) { - if (IS_IP6_FLOW_ID(pkt)) { - if (IN6_ARE_ADDR_EQUAL(&(pkt->src_ip6), - &(q->id.src_ip6)) && - IN6_ARE_ADDR_EQUAL(&(pkt->dst_ip6), - &(q->id.dst_ip6)) && + if (pkt->proto != q->id.proto || q->dyn_type == O_LIMIT_PARENT) + goto next; + + if (IS_IP6_FLOW_ID(pkt)) { + if (IN6_ARE_ADDR_EQUAL(&pkt->src_ip6, &q->id.src_ip6) && + IN6_ARE_ADDR_EQUAL(&pkt->dst_ip6, &q->id.dst_ip6) && pkt->src_port == q->id.src_port && - pkt->dst_port == q->id.dst_port ) { + pkt->dst_port == q->id.dst_port) { + dir = MATCH_FORWARD; + break; + } + if (IN6_ARE_ADDR_EQUAL(&pkt->src_ip6, &q->id.dst_ip6) && + IN6_ARE_ADDR_EQUAL(&pkt->dst_ip6, &q->id.src_ip6) && + pkt->src_port == q->id.dst_port && + pkt->dst_port == q->id.src_port) { + dir = MATCH_REVERSE; + break; + } + } else { + if (pkt->src_ip == q->id.src_ip && + pkt->dst_ip == q->id.dst_ip && + pkt->src_port == q->id.src_port && + pkt->dst_port == q->id.dst_port) { dir = MATCH_FORWARD; break; - } - if (IN6_ARE_ADDR_EQUAL(&(pkt->src_ip6), - &(q->id.dst_ip6)) && - IN6_ARE_ADDR_EQUAL(&(pkt->dst_ip6), - &(q->id.src_ip6)) && - pkt->src_port == q->id.dst_port && - pkt->dst_port == q->id.src_port ) { - dir = MATCH_REVERSE; - break; - } - } else { - if (pkt->src_ip == q->id.src_ip && - pkt->dst_ip == q->id.dst_ip && - pkt->src_port == q->id.src_port && - pkt->dst_port == q->id.dst_port ) { - dir = MATCH_FORWARD; - break; - } - if (pkt->src_ip =
svn commit: r236693 - head/contrib/bsnmp/snmp_mibII
Author: emax Date: Wed Jun 6 18:00:38 2012 New Revision: 236693 URL: http://svn.freebsd.org/changeset/base/236693 Log: Count both IPv4 and IPv6 TCP connections in tcpCurrEstab Timeout from: current, syrinx MFC after:1 week Modified: head/contrib/bsnmp/snmp_mibII/mibII_tcp.c Modified: head/contrib/bsnmp/snmp_mibII/mibII_tcp.c == --- head/contrib/bsnmp/snmp_mibII/mibII_tcp.c Wed Jun 6 18:00:19 2012 (r236692) +++ head/contrib/bsnmp/snmp_mibII/mibII_tcp.c Wed Jun 6 18:00:38 2012 (r236693) @@ -109,10 +109,12 @@ fetch_tcp(void) ptr = (struct xinpgen *)(void *)((char *)ptr + ptr->xig_len)) { tp = (struct xtcpcb *)ptr; if (tp->xt_inp.inp_gencnt > xinpgen->xig_gen || - (tp->xt_inp.inp_vflag & INP_IPV4) == 0) + (tp->xt_inp.inp_vflag & (INP_IPV4|INP_IPV6)) == 0) continue; - tcp_total++; + if (tp->xt_inp.inp_vflag & INP_IPV4) + tcp_total++; + if (tp->xt_tp.t_state == TCPS_ESTABLISHED || tp->xt_tp.t_state == TCPS_CLOSE_WAIT) tcp_count++; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236694 - stable/8/sys/netinet/ipfw
Author: oleg Date: Wed Jun 6 18:04:49 2012 New Revision: 236694 URL: http://svn.freebsd.org/changeset/base/236694 Log: MFC: r232272, r232273 - lookup_dyn_rule_locked(): style(9) cleanup - Refresh dynamic tcp rule only if both sides answered keepalive packets. - Remove some useless assignments. Modified: stable/8/sys/netinet/ipfw/ip_fw_dynamic.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netinet/ipfw/ip_fw_dynamic.c == --- stable/8/sys/netinet/ipfw/ip_fw_dynamic.c Wed Jun 6 18:00:38 2012 (r236693) +++ stable/8/sys/netinet/ipfw/ip_fw_dynamic.c Wed Jun 6 18:04:49 2012 (r236694) @@ -390,72 +390,68 @@ ipfw_remove_dyn_children(struct ip_fw *r IPFW_DYN_UNLOCK(); } -/** - * lookup a dynamic rule, locked version +/* + * Lookup a dynamic rule, locked version. */ static ipfw_dyn_rule * lookup_dyn_rule_locked(struct ipfw_flow_id *pkt, int *match_direction, struct tcphdr *tcp) { /* -* stateful ipfw extensions. -* Lookup into dynamic session queue +* Stateful ipfw extensions. +* Lookup into dynamic session queue. */ #define MATCH_REVERSE 0 #define MATCH_FORWARD 1 #define MATCH_NONE 2 #define MATCH_UNKNOWN 3 int i, dir = MATCH_NONE; - ipfw_dyn_rule *prev, *q=NULL; + ipfw_dyn_rule *prev, *q = NULL; IPFW_DYN_LOCK_ASSERT(); if (V_ipfw_dyn_v == NULL) - goto done; /* not found */ - i = hash_packet( pkt ); - for (prev=NULL, q = V_ipfw_dyn_v[i] ; q != NULL ; ) { + goto done; /* not found */ + i = hash_packet(pkt); + for (prev = NULL, q = V_ipfw_dyn_v[i]; q != NULL;) { if (q->dyn_type == O_LIMIT_PARENT && q->count) goto next; - if (TIME_LEQ( q->expire, time_uptime)) { /* expire entry */ + if (TIME_LEQ(q->expire, time_uptime)) { /* expire entry */ UNLINK_DYN_RULE(prev, V_ipfw_dyn_v[i], q); continue; } - if (pkt->proto == q->id.proto && - q->dyn_type != O_LIMIT_PARENT) { - if (IS_IP6_FLOW_ID(pkt)) { - if (IN6_ARE_ADDR_EQUAL(&(pkt->src_ip6), - &(q->id.src_ip6)) && - IN6_ARE_ADDR_EQUAL(&(pkt->dst_ip6), - &(q->id.dst_ip6)) && + if (pkt->proto != q->id.proto || q->dyn_type == O_LIMIT_PARENT) + goto next; + + if (IS_IP6_FLOW_ID(pkt)) { + if (IN6_ARE_ADDR_EQUAL(&pkt->src_ip6, &q->id.src_ip6) && + IN6_ARE_ADDR_EQUAL(&pkt->dst_ip6, &q->id.dst_ip6) && pkt->src_port == q->id.src_port && - pkt->dst_port == q->id.dst_port ) { + pkt->dst_port == q->id.dst_port) { + dir = MATCH_FORWARD; + break; + } + if (IN6_ARE_ADDR_EQUAL(&pkt->src_ip6, &q->id.dst_ip6) && + IN6_ARE_ADDR_EQUAL(&pkt->dst_ip6, &q->id.src_ip6) && + pkt->src_port == q->id.dst_port && + pkt->dst_port == q->id.src_port) { + dir = MATCH_REVERSE; + break; + } + } else { + if (pkt->src_ip == q->id.src_ip && + pkt->dst_ip == q->id.dst_ip && + pkt->src_port == q->id.src_port && + pkt->dst_port == q->id.dst_port) { dir = MATCH_FORWARD; break; - } - if (IN6_ARE_ADDR_EQUAL(&(pkt->src_ip6), - &(q->id.dst_ip6)) && - IN6_ARE_ADDR_EQUAL(&(pkt->dst_ip6), - &(q->id.src_ip6)) && - pkt->src_port == q->id.dst_port && - pkt->dst_port == q->id.src_port ) { - dir = MATCH_REVERSE; - break; - } - } else { - if (pkt->src_ip == q->id.src_ip && - pkt->dst_ip == q->id.dst_ip && - pkt->src_port == q->id.src_port && - pkt->dst_port == q->id.dst_port ) { - dir = MATCH_FORWARD; - break; - } - if (pkt->src_ip =
svn commit: r236695 - in head/lib/libc: include net
Author: dim Date: Wed Jun 6 21:16:26 2012 New Revision: 236695 URL: http://svn.freebsd.org/changeset/base/236695 Log: Fix two warnings about self-assignment in libc. These normally only trigger with clang, when you either use -save-temps, or ccache. Reported by: Sevan / Venture37 MFC after:3 days Modified: head/lib/libc/include/port_before.h head/lib/libc/net/getaddrinfo.c Modified: head/lib/libc/include/port_before.h == --- head/lib/libc/include/port_before.h Wed Jun 6 18:04:49 2012 (r236694) +++ head/lib/libc/include/port_before.h Wed Jun 6 21:16:26 2012 (r236695) @@ -17,6 +17,6 @@ var = _u.v; \ } while (0) -#define UNUSED(x) (x) = (x) +#define UNUSED(x) (void)(x) #endif /* _PORT_BEFORE_H_ */ Modified: head/lib/libc/net/getaddrinfo.c == --- head/lib/libc/net/getaddrinfo.c Wed Jun 6 18:04:49 2012 (r236694) +++ head/lib/libc/net/getaddrinfo.c Wed Jun 6 21:16:26 2012 (r236695) @@ -464,7 +464,7 @@ getaddrinfo(const char *hostname, const } error = get_portmatch(pai, servname); if (error) - ERR(error); + goto bad; *pai = ai0; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236698 - in stable/9: lib/libprocstat sys/kern sys/sys usr.bin/fstat usr.bin/procstat
Author: jhb Date: Wed Jun 6 21:49:31 2012 New Revision: 236698 URL: http://svn.freebsd.org/changeset/base/236698 Log: MFC 233760: Export some more useful info about shared memory objects to userland via procstat(1) and fstat(1): - Change shm file descriptors to track the pathname they are associated with and add a shm_path() method to copy the path out to a caller-supplied buffer. - Use the fo_stat() method of shared memory objects and shm_path() to export the path, mode, and size of a shared memory object via struct kinfo_file. - Add a struct shmstat to the libprocstat(3) interface along with a procstat_get_shm_info() to export the mode and size of a shared memory object. - Change procstat to always print out the path for a given object if it is valid. - Teach fstat about shared memory objects and to display their path, mode, and size. Modified: stable/9/lib/libprocstat/Symbol.map stable/9/lib/libprocstat/Versions.def stable/9/lib/libprocstat/libprocstat.3 stable/9/lib/libprocstat/libprocstat.c stable/9/lib/libprocstat/libprocstat.h stable/9/sys/kern/kern_descrip.c stable/9/sys/kern/uipc_shm.c stable/9/sys/sys/mman.h stable/9/usr.bin/fstat/fstat.c stable/9/usr.bin/procstat/procstat_files.c Directory Properties: stable/9/lib/libprocstat/ (props changed) stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) stable/9/usr.bin/fstat/ (props changed) stable/9/usr.bin/procstat/ (props changed) Modified: stable/9/lib/libprocstat/Symbol.map == --- stable/9/lib/libprocstat/Symbol.map Wed Jun 6 21:42:22 2012 (r236697) +++ stable/9/lib/libprocstat/Symbol.map Wed Jun 6 21:49:31 2012 (r236698) @@ -14,3 +14,7 @@ FBSD_1.2 { procstat_open_kvm; procstat_open_sysctl; }; + +FBSD_1.3 { + procstat_get_shm_info; +}; Modified: stable/9/lib/libprocstat/Versions.def == --- stable/9/lib/libprocstat/Versions.def Wed Jun 6 21:42:22 2012 (r236697) +++ stable/9/lib/libprocstat/Versions.def Wed Jun 6 21:49:31 2012 (r236698) @@ -3,3 +3,8 @@ # This version was first added to 9.0-current. FBSD_1.2 { }; + +# This version was first added to 10.0-current. +FBSD_1.3 { +} FBSD_1.2; + Modified: stable/9/lib/libprocstat/libprocstat.3 == --- stable/9/lib/libprocstat/libprocstat.3 Wed Jun 6 21:42:22 2012 (r236697) +++ stable/9/lib/libprocstat/libprocstat.3 Wed Jun 6 21:49:31 2012 (r236698) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 12, 2011 +.Dd April 1, 2012 .Dt LIBPROCSTAT 3 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nm procstat_freeprocs , .Nm procstat_get_pipe_info , .Nm procstat_get_pts_info , +.Nm procstat_get_shm_info , .Nm procstat_get_socket_info , .Nm procstat_get_vnode_info .Nd library interface for file and process information retrieval @@ -70,6 +71,13 @@ .Fa "char *errbuf" .Fc .Ft int +.Fo procstat_get_shm_info +.Fa "struct procstat *procstat" +.Fa "struct filestat *fst" +.Fa "struct shmstat *shm" +.Fa "char *errbuf" +.Fc +.Ft int .Fo procstat_get_socket_info .Fa "struct procstat *procstat" .Fa "struct filestat *fst" @@ -191,10 +199,12 @@ function call. The .Fn procstat_get_pipe_info , .Fn procstat_get_pts_info , +.Fn procstat_get_shm_info , .Fn procstat_get_socket_info and .Fn procstat_get_vnode_info functions are used to retrieve information about pipes, pseudo-terminals, +shared memory objects, sockets, and vnodes, respectively. Each of them have a similar interface API. The @@ -231,11 +241,14 @@ argument indicates an actual error messa .Nm procstat_get_pipe_info .It Li PS_FST_TYPE_PTS .Nm procstat_get_pts_info +.It Li PS_FST_TYPE_SHM +.Nm procstat_get_shm_info .El .Sh SEE ALSO .Xr fstat 1 , .Xr fuser 1 , .Xr pipe 2 , +.Xr shm_open 2 , .Xr socket 2 , .Xr kvm 3 , .Xr queue 3 , Modified: stable/9/lib/libprocstat/libprocstat.c =
svn commit: r236699 - in stable/8: sys/kern sys/sys usr.bin/fstat usr.bin/procstat
Author: jhb Date: Wed Jun 6 21:57:03 2012 New Revision: 236699 URL: http://svn.freebsd.org/changeset/base/236699 Log: MFC 233760: Export some more useful info about shared memory objects to userland via procstat(1) and fstat(1): - Change shm file descriptors to track the pathname they are associated with and add a shm_path() method to copy the path out to a caller-supplied buffer. - Use shm_path() to export the path of a shared memory object via struct kinfo_file. - Change procstat to always print out the path for a given object if it is valid. - Teach fstat about shared memory objects and to display their path, mode, and size. Modified: stable/8/sys/kern/kern_descrip.c stable/8/sys/kern/uipc_shm.c stable/8/sys/sys/mman.h stable/8/usr.bin/fstat/fstat.c stable/8/usr.bin/procstat/procstat_files.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/usr.bin/fstat/ (props changed) stable/8/usr.bin/procstat/ (props changed) Modified: stable/8/sys/kern/kern_descrip.c == --- stable/8/sys/kern/kern_descrip.cWed Jun 6 21:49:31 2012 (r236698) +++ stable/8/sys/kern/kern_descrip.cWed Jun 6 21:57:03 2012 (r236699) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2742,6 +2743,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE struct kinfo_ofile *kif; struct filedesc *fdp; int error, i, *name; + struct shmfd *shmfd; struct socket *so; struct vnode *vp; struct file *fp; @@ -2779,6 +2781,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE vp = NULL; so = NULL; tp = NULL; + shmfd = NULL; kif->kf_fd = i; switch (fp->f_type) { case DTYPE_VNODE: @@ -2814,6 +2817,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE case DTYPE_SHM: kif->kf_type = KF_TYPE_SHM; + shmfd = fp->f_data; break; case DTYPE_SEM: @@ -2921,6 +2925,8 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE strlcpy(kif->kf_path, tty_devname(tp), sizeof(kif->kf_path)); } + if (shmfd != NULL) + shm_path(shmfd, kif->kf_path, sizeof(kif->kf_path)); error = SYSCTL_OUT(req, kif, sizeof(*kif)); if (error) break; @@ -2995,6 +3001,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER struct kinfo_file *kif; struct filedesc *fdp; int error, i, *name; + struct shmfd *shmfd; struct socket *so; struct vnode *vp; struct file *fp; @@ -3032,6 +3039,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER vp = NULL; so = NULL; tp = NULL; + shmfd = NULL; kif->kf_fd = i; switch (fp->f_type) { case DTYPE_VNODE: @@ -3067,6 +3075,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER case DTYPE_SHM: kif->kf_type = KF_TYPE_SHM; + shmfd = fp->f_data; break; case DTYPE_SEM: @@ -3174,6 +3183,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER strlcpy(kif->kf_path, tty_devname(tp), sizeof(kif->kf_path)); } + if (shmfd != NULL) + shm_path(shmfd, kif->kf_path, sizeof(kif->kf_path)); /* Pack record size down */ kif->kf_structsize = offsetof(struct kinfo_file, kf_path) + strlen(kif->kf_path) + 1; Modified: stable/8/sys/kern/uipc_shm.c == --- stable/8/sys/kern/uipc_shm.cWed Jun 6 21:49:31 2012 (r236698) +++ stable/8/sys/kern/uipc_shm.cWed Jun 6 21:57:03 2012 (r236699) @@ -453,6 +453,7 @@ shm_insert(char *path, Fnv32_t fnv, stru map->sm_path = path; map->sm_fnv = fnv; map->sm_shmfd = shm_hold(shmfd); + shmfd->shm_path = path; LIST_INSERT_HEAD(SHM_HASH(fnv), map, sm_link); } @@ -475,6 +476,7 @@ shm_remove(char *path, Fnv32_t fnv, stru FREAD | FWRITE); if (error) return (error); + map->sm_shmfd->shm_path = NULL; LIS
svn commit: r236700 - head/sys/dev/jme
Author: kevlo Date: Thu Jun 7 02:24:27 2012 New Revision: 236700 URL: http://svn.freebsd.org/changeset/base/236700 Log: Fix a logic error when use PCIY_PMG capability Reviewed by: yongari Modified: head/sys/dev/jme/if_jme.c Modified: head/sys/dev/jme/if_jme.c == --- head/sys/dev/jme/if_jme.c Wed Jun 6 21:57:03 2012(r236699) +++ head/sys/dev/jme/if_jme.c Thu Jun 7 02:24:27 2012(r236700) @@ -1661,7 +1661,7 @@ jme_resume(device_t dev) sc = device_get_softc(dev); JME_LOCK(sc); - if (pci_find_cap(sc->jme_dev, PCIY_PMG, &pmc) != 0) { + if (pci_find_cap(sc->jme_dev, PCIY_PMG, &pmc) == 0) { pmstat = pci_read_config(sc->jme_dev, pmc + PCIR_POWER_STATUS, 2); /* Disable PME clear PME status. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r234712 - in head: lib/libc/sys usr.sbin/jail
On 27 April 2012 05:36, Jamie Gritton wrote: > Author: jamie > Date: Thu Apr 26 17:36:05 2012 > New Revision: 234712 > URL: http://svn.freebsd.org/changeset/base/234712 > > Log: > A new jail(8) with a configuration file, ultimately to replace the work > currently done by /etc/rc.d/jail. > Is there any further information about this? Is this going to be hooked in to rc.conf? regards, Andrew ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236701 - head/sys/dev/bge
Author: yongari Date: Thu Jun 7 03:22:20 2012 New Revision: 236701 URL: http://svn.freebsd.org/changeset/base/236701 Log: Fix typo. Submitted by: Alexander Milanov < a <> amilanov dot com > Modified: head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bgereg.h == --- head/sys/dev/bge/if_bgereg.hThu Jun 7 02:24:27 2012 (r236700) +++ head/sys/dev/bge/if_bgereg.hThu Jun 7 03:22:20 2012 (r236701) @@ -779,11 +779,11 @@ #defineBGE_LEDCTL_10MBPS_LED 0x0008 #defineBGE_LEDCTL_TRAFLED_OVERRIDE 0x0010 #defineBGE_LEDCTL_TRAFLED_BLINK0x0020 -#defineBGE_LEDCTL_TREFLED_BLINK_2 0x0040 +#defineBGE_LEDCTL_TRAFLED_BLINK_2 0x0040 #defineBGE_LEDCTL_1000MBPS_STS 0x0080 #defineBGE_LEDCTL_100MBPS_STS 0x0100 #defineBGE_LEDCTL_10MBPS_STS 0x0200 -#defineBGE_LEDCTL_TRADLED_STS 0x0400 +#defineBGE_LEDCTL_TRAFLED_STS 0x0400 #defineBGE_LEDCTL_BLINKPERIOD 0x7FF8 #defineBGE_LEDCTL_BLINKPERIOD_OVERRIDE 0x8000 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236702 - stable/9/sys/dev/bge
Author: yongari Date: Thu Jun 7 05:35:43 2012 New Revision: 236702 URL: http://svn.freebsd.org/changeset/base/236702 Log: MFC r236371: Remove unnecessary device_printfs. Modified: stable/9/sys/dev/bge/if_bge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c == --- stable/9/sys/dev/bge/if_bge.c Thu Jun 7 03:22:20 2012 (r236701) +++ stable/9/sys/dev/bge/if_bge.c Thu Jun 7 05:35:43 2012 (r236702) @@ -2800,17 +2800,9 @@ bge_mbox_reorder(struct bge_softc *sc) for (;;) { dev = device_get_parent(bus); bus = device_get_parent(dev); - device_printf(sc->bge_dev, "dev : %s%d, bus : %s%d\n", - device_get_name(dev), device_get_unit(dev), - device_get_name(bus), device_get_unit(bus)); if (device_get_devclass(dev) != pcib) break; for (i = 0; i < nitems(mbox_reorder_lists); i++) { - device_printf(sc->bge_dev, - "probing dev : %s%d, vendor : 0x%04x " - "device : 0x%04x\n", - device_get_name(dev), device_get_unit(dev), - pci_get_vendor(dev), pci_get_device(dev)); if (pci_get_vendor(dev) == mbox_reorder_lists[i].vendor && pci_get_device(dev) == ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236703 - stable/8/sys/dev/bge
Author: yongari Date: Thu Jun 7 05:37:46 2012 New Revision: 236703 URL: http://svn.freebsd.org/changeset/base/236703 Log: MFC r236371: Remove unnecessary device_printfs. Modified: stable/8/sys/dev/bge/if_bge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/dev/bge/if_bge.c == --- stable/8/sys/dev/bge/if_bge.c Thu Jun 7 05:35:43 2012 (r236702) +++ stable/8/sys/dev/bge/if_bge.c Thu Jun 7 05:37:46 2012 (r236703) @@ -2800,17 +2800,9 @@ bge_mbox_reorder(struct bge_softc *sc) for (;;) { dev = device_get_parent(bus); bus = device_get_parent(dev); - device_printf(sc->bge_dev, "dev : %s%d, bus : %s%d\n", - device_get_name(dev), device_get_unit(dev), - device_get_name(bus), device_get_unit(bus)); if (device_get_devclass(dev) != pcib) break; for (i = 0; i < nitems(mbox_reorder_lists); i++) { - device_printf(sc->bge_dev, - "probing dev : %s%d, vendor : 0x%04x " - "device : 0x%04x\n", - device_get_name(dev), device_get_unit(dev), - pci_get_vendor(dev), pci_get_device(dev)); if (pci_get_vendor(dev) == mbox_reorder_lists[i].vendor && pci_get_device(dev) == ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r236704 - stable/9/sys/dev/aic7xxx/aicasm
Author: dim Date: Thu Jun 7 06:41:09 2012 New Revision: 236704 URL: http://svn.freebsd.org/changeset/base/236704 Log: MFC r236571: Make aicasm compile without warnings if -Wpointer-sign is enabled. Modified: stable/9/sys/dev/aic7xxx/aicasm/aicasm.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/aic7xxx/aicasm/aicasm.c == --- stable/9/sys/dev/aic7xxx/aicasm/aicasm.cThu Jun 7 05:37:46 2012 (r236703) +++ stable/9/sys/dev/aic7xxx/aicasm/aicasm.cThu Jun 7 06:41:09 2012 (r236704) @@ -530,7 +530,7 @@ output_listing(char *ifilename) int instrptr; unsigned int line; int func_count; - int skip_addr; + unsigned int skip_addr; instrcount = 0; instrptr = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"