svn commit: r299401 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Wed May 11 03:31:25 2016 New Revision: 299401 URL: https://svnweb.freebsd.org/changeset/base/299401 Log: hyperv/hn: Extract RSS hash value and type. MFC after:1 week Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D6287 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis.h head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed May 11 00:59:06 2016 (r299400) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed May 11 03:31:25 2016 (r299401) @@ -1164,6 +1164,7 @@ struct hn_rx_ring { u_long hn_lro_tried; u_long hn_small_pkts; u_long hn_pkts; + u_long hn_rss_pkts; /* Rarely used stuffs */ struct sysctl_oid *hn_rx_sysctl_tree; Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed May 11 00:59:06 2016(r299400) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed May 11 03:31:25 2016(r299401) @@ -140,7 +140,7 @@ __FBSDID("$FreeBSD$"); #define HN_RNDIS_MSG_LEN \ (sizeof(rndis_msg) + \ - RNDIS_HASH_PPI_SIZE + \ + RNDIS_HASHVAL_PPI_SIZE + \ RNDIS_VLAN_PPI_SIZE + \ RNDIS_TSO_PPI_SIZE + \ RNDIS_CSUM_PPI_SIZE) @@ -866,7 +866,7 @@ hn_encap(struct hn_tx_ring *txr, struct rndis_msg *rndis_mesg; rndis_packet *rndis_pkt; rndis_per_packet_info *rppi; - struct ndis_hash_info *hash_info; + struct rndis_hash_value *hash_value; uint32_t rndis_msg_size; packet = >netvsc_pkt; @@ -892,16 +892,16 @@ hn_encap(struct hn_tx_ring *txr, struct rndis_msg_size = RNDIS_MESSAGE_SIZE(rndis_packet); /* -* Set the hash info for this packet, so that the host could +* Set the hash value for this packet, so that the host could * dispatch the TX done event for this packet back to this TX * ring's channel. */ - rndis_msg_size += RNDIS_HASH_PPI_SIZE; - rppi = hv_set_rppi_data(rndis_mesg, RNDIS_HASH_PPI_SIZE, + rndis_msg_size += RNDIS_HASHVAL_PPI_SIZE; + rppi = hv_set_rppi_data(rndis_mesg, RNDIS_HASHVAL_PPI_SIZE, nbl_hash_value); - hash_info = (struct ndis_hash_info *)((uint8_t *)rppi + + hash_value = (struct rndis_hash_value *)((uint8_t *)rppi + rppi->per_packet_info_offset); - hash_info->hash = txr->hn_tx_idx; + hash_value->hash_value = txr->hn_tx_idx; if (m_head->m_flags & M_VLANTAG) { ndis_8021q_info *rppi_vlan_info; @@ -1291,7 +1291,9 @@ hv_m_append(struct mbuf *m0, int len, c_ */ int netvsc_recv(struct hv_vmbus_channel *chan, netvsc_packet *packet, -rndis_tcp_ip_csum_info *csum_info) +rndis_tcp_ip_csum_info *csum_info, +const struct rndis_hash_info *hash_info, +const struct rndis_hash_value *hash_value) { struct hn_rx_ring *rxr = chan->hv_chan_rxr; struct ifnet *ifp = rxr->hn_ifp; @@ -1400,7 +1402,6 @@ netvsc_recv(struct hv_vmbus_channel *cha CSUM_DATA_VALID | CSUM_PSEUDO_HDR); m_new->m_pkthdr.csum_data = 0x; } - /* Rely on SW csum verification though... */ do_lro = 1; } else if (pr == IPPROTO_UDP) { if (do_csum && @@ -1427,8 +1428,50 @@ skip: m_new->m_flags |= M_VLANTAG; } - m_new->m_pkthdr.flowid = rxr->hn_rx_idx; - M_HASHTYPE_SET(m_new, M_HASHTYPE_OPAQUE); + if (hash_info != NULL && hash_value != NULL) { + int hash_type = M_HASHTYPE_OPAQUE; + + rxr->hn_rss_pkts++; + m_new->m_pkthdr.flowid = hash_value->hash_value; + if ((hash_info->hash_info & NDIS_HASH_FUNCTION_MASK) == + NDIS_HASH_FUNCTION_TOEPLITZ) { + uint32_t type = + (hash_info->hash_info & NDIS_HASH_TYPE_MASK); + + switch (type) { + case NDIS_HASH_IPV4: + hash_type = M_HASHTYPE_RSS_IPV4; + break; + + case NDIS_HASH_TCP_IPV4: + hash_type = M_HASHTYPE_RSS_TCP_IPV4; + break; + + case NDIS_HASH_IPV6: +
svn commit: r299400 - in stable/10/sys/cam: . ctl
Author: pfg Date: Wed May 11 00:59:06 2016 New Revision: 299400 URL: https://svnweb.freebsd.org/changeset/base/299400 Log: MFC r298703: cam: unsign some types to match their definitions and avoid overflows. numpatterns is u_int. ctl: CTL_NUM_MODE_PAGES comes from sizeof(). In struct:ctl_scsiio, kern_sg_entries is uint32_t. Modified: stable/10/sys/cam/cam_xpt.c stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_xpt.c == --- stable/10/sys/cam/cam_xpt.c Wed May 11 00:41:40 2016(r299399) +++ stable/10/sys/cam/cam_xpt.c Wed May 11 00:59:06 2016(r299400) @@ -1186,7 +1186,7 @@ xptbusmatch(struct dev_match_pattern *pa struct cam_eb *bus) { dev_match_ret retval; - int i; + u_int i; retval = DM_RET_NONE; @@ -1298,7 +1298,7 @@ xptdevicematch(struct dev_match_pattern struct cam_ed *device) { dev_match_ret retval; - int i; + u_int i; retval = DM_RET_NONE; @@ -1421,7 +1421,7 @@ xptperiphmatch(struct dev_match_pattern struct cam_periph *periph) { dev_match_ret retval; - int i; + u_int i; /* * If we aren't given something to match against, that's an error. Modified: stable/10/sys/cam/ctl/ctl.c == --- stable/10/sys/cam/ctl/ctl.c Wed May 11 00:41:40 2016(r299399) +++ stable/10/sys/cam/ctl/ctl.c Wed May 11 00:59:06 2016(r299400) @@ -918,7 +918,7 @@ ctl_isc_announce_mode(struct ctl_lun *lu { struct ctl_softc *softc = lun->ctl_softc; union ctl_ha_msg msg; - int i; + u_int i; if (softc->ha_link != CTL_HA_LINK_ONLINE) return; @@ -1286,7 +1286,7 @@ static void ctl_isc_mode_sync(struct ctl_softc *softc, union ctl_ha_msg *msg, int len) { struct ctl_lun *lun; - int i; + u_int i; uint32_t initidx, targ_lun; targ_lun = msg->hdr.nexus.targ_mapped_lun; @@ -6407,7 +6407,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) */ switch (page_code) { case SMS_ALL_PAGES_PAGE: { - int i; + u_int i; page_len = 0; @@ -6459,7 +6459,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) break; } default: { - int i; + u_int i; page_len = 0; @@ -12777,7 +12777,7 @@ static void ctl_datamove_remote_write_cb(struct ctl_ha_dt_req *rq) { union ctl_io *io; - int i; + uint32_t i; io = rq->context; @@ -12855,7 +12855,7 @@ ctl_datamove_remote_dm_read_cb(union ctl char path_str[64]; struct sbuf sb; #endif - int i; + uint32_t i; for (i = 0; i < io->scsiio.kern_sg_entries; i++) free(io->io_hdr.local_sglist[i].addr, M_CTL); @@ -13096,7 +13096,7 @@ static void ctl_datamove_remote_read(union ctl_io *io) { int retval; - int i; + uint32_t i; /* * This will send an error to the other controller in the case of a ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299399 - head/sys/dev/dpaa
Author: jhibbits Date: Wed May 11 00:41:40 2016 New Revision: 299399 URL: https://svnweb.freebsd.org/changeset/base/299399 Log: Don't mark the initial portal registers as fully mapped. BMan and QMan will do this at attach time. Even though the registers are mapped now, dpaa_portal_map_registers() will be called at BMan and QMan attach time, updating the mappings to be private, and in the case of cache-enabled registers, marked as coherent memory mappings. Modified: head/sys/dev/dpaa/portals_common.c Modified: head/sys/dev/dpaa/portals_common.c == --- head/sys/dev/dpaa/portals_common.c Wed May 11 00:37:15 2016 (r299398) +++ head/sys/dev/dpaa/portals_common.c Wed May 11 00:41:40 2016 (r299399) @@ -91,7 +91,6 @@ dpaa_portal_alloc_res(device_t dev, stru sc->sc_rrid[0], sc->sc_rres[0]); return (ENXIO); } - sc->sc_dp[PCPU_GET(cpuid)].dp_regs_mapped = 1; } /* Acquire portal's CE_PA and CI_PA */ rle = resource_list_find(res, SYS_RES_MEMORY, 0); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299398 - in stable/9/sys/geom: . mirror raid virstor
Author: pfg Date: Wed May 11 00:37:15 2016 New Revision: 299398 URL: https://svnweb.freebsd.org/changeset/base/299398 Log: MFC r298698: geom: unsign some types to match their definitions and avoid overflows. In struct:gctl_req, nargs is unsigned. In mirror: g_mirror_syncreqs is unsigned. In raid: in struct:g_raid_volume, v_disks_count is unsigned. In virstor: in struct:g_virstor_softc, n_components is unsigned. Modified: stable/9/sys/geom/geom_ctl.c stable/9/sys/geom/mirror/g_mirror.c stable/9/sys/geom/raid/md_promise.c stable/9/sys/geom/raid/md_sii.c stable/9/sys/geom/virstor/g_virstor.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_ctl.c == --- stable/9/sys/geom/geom_ctl.cWed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/geom_ctl.cWed May 11 00:37:15 2016 (r299398) @@ -135,7 +135,7 @@ gctl_copyin(struct gctl_req *req) { struct gctl_req_arg *ap; char *p; - int i; + u_int i; ap = geom_alloc_copyin(req, req->arg, req->narg * sizeof(*ap)); if (ap == NULL) { @@ -212,7 +212,7 @@ gctl_copyout(struct gctl_req *req) static void gctl_free(struct gctl_req *req) { - int i; + u_int i; sbuf_delete(req->serror); if (req->arg == NULL) @@ -270,7 +270,7 @@ int gctl_set_param(struct gctl_req *req, const char *param, void const *ptr, int len) { - int i; + u_int i; struct gctl_req_arg *ap; for (i = 0; i < req->narg; i++) { @@ -311,7 +311,7 @@ gctl_set_param_err(struct gctl_req *req, void * gctl_get_param(struct gctl_req *req, const char *param, int *len) { - int i; + u_int i; void *p; struct gctl_req_arg *ap; @@ -332,7 +332,7 @@ gctl_get_param(struct gctl_req *req, con char const * gctl_get_asciiparam(struct gctl_req *req, const char *param) { - int i; + u_int i; char const *p; struct gctl_req_arg *ap; Modified: stable/9/sys/geom/mirror/g_mirror.c == --- stable/9/sys/geom/mirror/g_mirror.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/mirror/g_mirror.c Wed May 11 00:37:15 2016 (r299398) @@ -1119,7 +1119,7 @@ g_mirror_sync_collision(struct g_mirror_ struct g_mirror_disk *disk; struct bio *sbp; off_t rstart, rend, sstart, send; - int i; + u_int i; if (sc->sc_sync.ds_ndisks == 0) return (0); Modified: stable/9/sys/geom/raid/md_promise.c == --- stable/9/sys/geom/raid/md_promise.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/raid/md_promise.c Wed May 11 00:37:15 2016 (r299398) @@ -893,7 +893,7 @@ g_raid_md_promise_start(struct g_raid_vo struct g_raid_md_promise_perdisk *pd; struct g_raid_md_promise_pervolume *pv; struct promise_raid_conf *meta; - int i; + u_int i; sc = vol->v_softc; md = sc->sc_md; Modified: stable/9/sys/geom/raid/md_sii.c == --- stable/9/sys/geom/raid/md_sii.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/raid/md_sii.c Wed May 11 00:37:15 2016 (r299398) @@ -1481,7 +1481,7 @@ g_raid_md_write_sii(struct g_raid_md_obj struct g_raid_md_sii_object *mdi; struct g_raid_md_sii_perdisk *pd; struct sii_raid_conf *meta; - int i; + u_int i; sc = md->mdo_softc; mdi = (struct g_raid_md_sii_object *)md; Modified: stable/9/sys/geom/virstor/g_virstor.c == --- stable/9/sys/geom/virstor/g_virstor.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/virstor/g_virstor.c Wed May 11 00:37:15 2016 (r299398) @@ -475,7 +475,7 @@ static void update_metadata(struct g_virstor_softc *sc) { struct g_virstor_metadata md; - int n; + u_int n; if (virstor_valid_components(sc) != sc->n_components) return; /* Incomplete device */ @@ -932,7 +932,7 @@ virstor_geom_destroy(struct g_virstor_so { struct g_provider *pp; struct g_geom *gp; - int n; + u_int n; g_topology_assert(); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299397 - in stable/10/sys/geom: . mirror raid virstor
Author: pfg Date: Wed May 11 00:36:31 2016 New Revision: 299397 URL: https://svnweb.freebsd.org/changeset/base/299397 Log: MFC r298698: geom: unsign some types to match their definitions and avoid overflows. In struct:gctl_req, nargs is unsigned. In mirror: g_mirror_syncreqs is unsigned. In raid: in struct:g_raid_volume, v_disks_count is unsigned. In virstor: in struct:g_virstor_softc, n_components is unsigned. Modified: stable/10/sys/geom/geom_ctl.c stable/10/sys/geom/mirror/g_mirror.c stable/10/sys/geom/raid/md_promise.c stable/10/sys/geom/raid/md_sii.c stable/10/sys/geom/virstor/g_virstor.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_ctl.c == --- stable/10/sys/geom/geom_ctl.c Wed May 11 00:34:43 2016 (r299396) +++ stable/10/sys/geom/geom_ctl.c Wed May 11 00:36:31 2016 (r299397) @@ -135,7 +135,7 @@ gctl_copyin(struct gctl_req *req) { struct gctl_req_arg *ap; char *p; - int i; + u_int i; ap = geom_alloc_copyin(req, req->arg, req->narg * sizeof(*ap)); if (ap == NULL) { @@ -212,7 +212,7 @@ gctl_copyout(struct gctl_req *req) static void gctl_free(struct gctl_req *req) { - int i; + u_int i; sbuf_delete(req->serror); if (req->arg == NULL) @@ -270,7 +270,7 @@ int gctl_set_param(struct gctl_req *req, const char *param, void const *ptr, int len) { - int i; + u_int i; struct gctl_req_arg *ap; for (i = 0; i < req->narg; i++) { @@ -311,7 +311,7 @@ gctl_set_param_err(struct gctl_req *req, void * gctl_get_param(struct gctl_req *req, const char *param, int *len) { - int i; + u_int i; void *p; struct gctl_req_arg *ap; @@ -332,7 +332,7 @@ gctl_get_param(struct gctl_req *req, con char const * gctl_get_asciiparam(struct gctl_req *req, const char *param) { - int i; + u_int i; char const *p; struct gctl_req_arg *ap; Modified: stable/10/sys/geom/mirror/g_mirror.c == --- stable/10/sys/geom/mirror/g_mirror.cWed May 11 00:34:43 2016 (r299396) +++ stable/10/sys/geom/mirror/g_mirror.cWed May 11 00:36:31 2016 (r299397) @@ -1166,7 +1166,7 @@ g_mirror_sync_collision(struct g_mirror_ struct g_mirror_disk *disk; struct bio *sbp; off_t rstart, rend, sstart, send; - int i; + u_int i; if (sc->sc_sync.ds_ndisks == 0) return (0); Modified: stable/10/sys/geom/raid/md_promise.c == --- stable/10/sys/geom/raid/md_promise.cWed May 11 00:34:43 2016 (r299396) +++ stable/10/sys/geom/raid/md_promise.cWed May 11 00:36:31 2016 (r299397) @@ -893,7 +893,7 @@ g_raid_md_promise_start(struct g_raid_vo struct g_raid_md_promise_perdisk *pd; struct g_raid_md_promise_pervolume *pv; struct promise_raid_conf *meta; - int i; + u_int i; sc = vol->v_softc; md = sc->sc_md; Modified: stable/10/sys/geom/raid/md_sii.c == --- stable/10/sys/geom/raid/md_sii.cWed May 11 00:34:43 2016 (r299396) +++ stable/10/sys/geom/raid/md_sii.cWed May 11 00:36:31 2016 (r299397) @@ -1482,7 +1482,7 @@ g_raid_md_write_sii(struct g_raid_md_obj struct g_raid_md_sii_object *mdi; struct g_raid_md_sii_perdisk *pd; struct sii_raid_conf *meta; - int i; + u_int i; sc = md->mdo_softc; mdi = (struct g_raid_md_sii_object *)md; Modified: stable/10/sys/geom/virstor/g_virstor.c == --- stable/10/sys/geom/virstor/g_virstor.c Wed May 11 00:34:43 2016 (r299396) +++ stable/10/sys/geom/virstor/g_virstor.c Wed May 11 00:36:31 2016 (r299397) @@ -475,7 +475,7 @@ static void update_metadata(struct g_virstor_softc *sc) { struct g_virstor_metadata md; - int n; + u_int n; if (virstor_valid_components(sc) != sc->n_components) return; /* Incomplete device */ @@ -932,7 +932,7 @@ virstor_geom_destroy(struct g_virstor_so { struct g_provider *pp; struct g_geom *gp; - int n; + u_int n; g_topology_assert(); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299396 - head/sys/dev/gpio
Author: gonzo Date: Wed May 11 00:34:43 2016 New Revision: 299396 URL: https://svnweb.freebsd.org/changeset/base/299396 Log: Use DEVMETHOD_END instead of its value to indicate end of methods table Modified: head/sys/dev/gpio/gpioc.c head/sys/dev/gpio/gpioiic.c head/sys/dev/gpio/gpioled.c Modified: head/sys/dev/gpio/gpioc.c == --- head/sys/dev/gpio/gpioc.c Wed May 11 00:26:52 2016(r299395) +++ head/sys/dev/gpio/gpioc.c Wed May 11 00:34:43 2016(r299396) @@ -195,7 +195,7 @@ static device_method_t gpioc_methods[] = DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume,bus_generic_resume), - { 0, 0 } + DEVMETHOD_END }; driver_t gpioc_driver = { Modified: head/sys/dev/gpio/gpioiic.c == --- head/sys/dev/gpio/gpioiic.c Wed May 11 00:26:52 2016(r299395) +++ head/sys/dev/gpio/gpioiic.c Wed May 11 00:34:43 2016(r299396) @@ -272,7 +272,7 @@ static device_method_t gpioiic_methods[] DEVMETHOD(ofw_bus_get_node, gpioiic_get_node), #endif - { 0, 0 } + DEVMETHOD_END }; static driver_t gpioiic_driver = { Modified: head/sys/dev/gpio/gpioled.c == --- head/sys/dev/gpio/gpioled.c Wed May 11 00:26:52 2016(r299395) +++ head/sys/dev/gpio/gpioled.c Wed May 11 00:34:43 2016(r299396) @@ -245,7 +245,7 @@ static device_method_t gpioled_methods[] DEVMETHOD(device_attach,gpioled_attach), DEVMETHOD(device_detach,gpioled_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t gpioled_driver = { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299395 - head/sys/dev/gpio
Author: gonzo Date: Wed May 11 00:26:52 2016 New Revision: 299395 URL: https://svnweb.freebsd.org/changeset/base/299395 Log: Use GPIO pin management API in gpiobacklight - Get rid of hack with re-parenting gpio-leds node to gpiobus - Use gpio_pin_set_active to enable/disable backlight, it automatically takes care of active-low pins Modified: head/sys/dev/gpio/gpiobacklight.c Modified: head/sys/dev/gpio/gpiobacklight.c == --- head/sys/dev/gpio/gpiobacklight.c Tue May 10 22:38:39 2016 (r299394) +++ head/sys/dev/gpio/gpiobacklight.c Wed May 11 00:26:52 2016 (r299395) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Oleksandr Tymoshenko+ * Copyright (c) 2015-2016 Oleksandr Tymoshenko * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -45,28 +45,11 @@ __FBSDID("$FreeBSD$"); #include -#include "gpiobus_if.h" - -/* - * Only one pin for led - */ -#defineGPIOBL_PIN 0 - -#define GPIOBL_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#defineGPIOBL_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define GPIOBL_LOCK_INIT(_sc) \ - mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ - "gpiobacklight", MTX_DEF) -#define GPIOBL_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); - struct gpiobacklight_softc { - device_tsc_dev; - device_tsc_busdev; - struct mtx sc_mtx; - + gpio_pin_t sc_pin; struct sysctl_oid *sc_oid; - int sc_brightness; + boolsc_brightness; }; static int gpiobacklight_sysctl(SYSCTL_HANDLER_ARGS); @@ -78,22 +61,9 @@ static int gpiobacklight_detach(device_t static void gpiobacklight_update_brightness(struct gpiobacklight_softc *sc) { - int error; - GPIOBL_LOCK(sc); - error = GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev, - GPIOBUS_DONTWAIT); - if (error != 0) { - GPIOBL_UNLOCK(sc); - return; - } - error = GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, - GPIOBL_PIN, GPIO_PIN_OUTPUT); - if (error == 0) - GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, GPIOBL_PIN, - sc->sc_brightness ? GPIO_PIN_HIGH : GPIO_PIN_LOW); - GPIOBUS_RELEASE_BUS(sc->sc_busdev, sc->sc_dev); - GPIOBL_UNLOCK(sc); + if (sc->sc_pin) + gpio_pin_set_active(sc->sc_pin, sc->sc_brightness); } static int @@ -104,35 +74,17 @@ gpiobacklight_sysctl(SYSCTL_HANDLER_ARGS int brightness; sc = (struct gpiobacklight_softc*)arg1; + brightness = sc->sc_brightness; error = sysctl_handle_int(oidp, , 0, req); if (error != 0 || req->newptr == NULL) return (error); - if (brightness <= 0) - sc->sc_brightness = 0; - else - sc->sc_brightness = 1; - + sc->sc_brightness = (brightness > 0); gpiobacklight_update_brightness(sc); - return (error); -} - -static void -gpiobacklight_identify(driver_t *driver, device_t bus) -{ - phandle_t node, root; - - root = OF_finddevice("/"); - if (root == 0) - return; - for (node = OF_child(root); node != 0; node = OF_peer(node)) { - if (!fdt_is_compatible_strict(node, "gpio-backlight")) - continue; - ofw_gpiobus_add_fdt_child(bus, driver->name, node); - } + return (0); } static int @@ -156,27 +108,32 @@ gpiobacklight_attach(device_t dev) phandle_t node; sc = device_get_softc(dev); - sc->sc_dev = dev; - sc->sc_busdev = device_get_parent(dev); if ((node = ofw_bus_get_node(dev)) == -1) return (ENXIO); - GPIOBL_LOCK_INIT(sc); if (OF_hasprop(node, "default-on")) - sc->sc_brightness = 1; + sc->sc_brightness = true; else - sc->sc_brightness = 0; + sc->sc_brightness = false; + + gpio_pin_get_by_ofw_idx(dev, node, 0, >sc_pin); + if (sc->sc_pin == NULL) { + device_printf(dev, "failed to map GPIO pin\n"); + return (ENXIO); + } + + gpio_pin_setflags(sc->sc_pin, GPIO_PIN_OUTPUT); + + gpiobacklight_update_brightness(sc); /* Init backlight interface */ - ctx = device_get_sysctl_ctx(sc->sc_dev); - tree = device_get_sysctl_tree(sc->sc_dev); + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); sc->sc_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "brightness", CTLTYPE_INT | CTLFLAG_RW, sc, 0, gpiobacklight_sysctl, "I", "backlight brightness"); - gpiobacklight_update_brightness(sc); - return
svn commit: r299394 - in head/sys: conf mips/conf
Author: adrian Date: Tue May 10 22:38:39 2016 New Revision: 299394 URL: https://svnweb.freebsd.org/changeset/base/299394 Log: Rename siba -> siba_s5, to specifically reference that it's for the legacy siba sentry5 cpu glue. The siba_cc code is the hard-coded chipcommon bits for the sentry s5, which will eventually be replaced with the more flexible bhnd sipa/cc code. bwn, etc uses siba_bwn, which doesn't use siba or siba_cc to do anything. Modified: head/sys/conf/files head/sys/mips/conf/SENTRY5 Modified: head/sys/conf/files == --- head/sys/conf/files Tue May 10 22:32:23 2016(r299393) +++ head/sys/conf/files Tue May 10 22:38:39 2016(r299394) @@ -2441,10 +2441,10 @@ dev/si/si_eisa.coptional si eisa dev/si/si_isa.coptional si isa dev/si/si_pci.coptional si pci dev/siba/siba_bwn.coptional siba_bwn pci -dev/siba/siba_cc.c optional siba !bhnd !bhndbus -dev/siba/siba_core.c optional siba | siba_bwn pci -dev/siba/siba_mips.c optional siba !bhnd !bhndbus -dev/siba/siba_pcib.c optional siba pci !bhnd !bhndbus +dev/siba/siba_cc.c optional siba_s5 !bhnd !bhndbus +dev/siba/siba_core.c optional siba_s5 | siba_bwn pci +dev/siba/siba_mips.c optional siba_s5 !bhnd !bhndbus +dev/siba/siba_pcib.c optional siba_s5 pci !bhnd !bhndbus dev/siis/siis.coptional siis pci dev/sis/if_sis.c optional sis pci dev/sk/if_sk.c optional sk pci Modified: head/sys/mips/conf/SENTRY5 == --- head/sys/mips/conf/SENTRY5 Tue May 10 22:32:23 2016(r299393) +++ head/sys/mips/conf/SENTRY5 Tue May 10 22:38:39 2016(r299394) @@ -57,8 +57,7 @@ options INVARIANT_SUPPORT #options BUS_DEBUG #makeoptions BUS_DEBUG -device bhndbus # Broadcom Home Networking Division Bus -device siba# Sonics SiliconBackplane +device siba_s5 # Sonics SiliconBackplane device pci # siba_pcib # device bfe # XXX will build both pci and siba ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r297748 - in head/sys: conf dev/acpica kern vm x86/acpica
On Thursday, May 05, 2016 02:08:56 PM Ngie Cooper wrote: > On Sat, Apr 9, 2016 at 6:58 AM, John Baldwinwrote: > > Author: jhb > > Date: Sat Apr 9 13:58:04 2016 > > New Revision: 297748 > > URL: https://svnweb.freebsd.org/changeset/base/297748 > > > > Log: > > Add more fine-grained kernel options for NUMA support. > > > > VM_NUMA_ALLOC is used to enable use of domain-aware memory allocation in > > the virtual memory system. DEVICE_NUMA is used to enable affinity > > reporting for devices such as bus_get_domain(). > > > > MAXMEMDOM must still be set to a value greater than for any NUMA support > > to be effective. Note that 'cpuset -gd' always works if MAXMEMDOM is > > enabled and the system supports NUMA. > > > > Reviewed by: kib > > Differential Revision:https://reviews.freebsd.org/D5782 > > Jenkins/clang says vm_domain_rr_selectdomain(..) is unused if > VM_NUMA_ALLOC isn't defined after this commit: > https://jenkins.freebsd.org/job/FreeBSD_HEAD/250/warnings7Result/package.-887393991/source.-7253451996200343468/#55 > . Could this be reduced/folded or did you mean to add more logic > around this function in the future? Fixed, thanks. -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299393 - in head: . share/mk
Author: jhb Date: Tue May 10 22:32:23 2016 New Revision: 299393 URL: https://svnweb.freebsd.org/changeset/base/299393 Log: Change the default installation directory for modules to /boot/modules. Kernel installs always override KMODDIR when installing modules, so this default setting is only used for standalone module builds. Many out-of-tree modules manually override KMODDIR already to avoid placing modules in /boot/kernel. This now makes that behavior the default. Discussed on: arch@ Reviewed by: imp Relnotes: yes Modified: head/UPDATING head/share/mk/bsd.own.mk Modified: head/UPDATING == --- head/UPDATING Tue May 10 22:28:06 2016(r299392) +++ head/UPDATING Tue May 10 22:32:23 2016(r299393) @@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20160510: + Kernel modules compiled outside of a kernel build now default to + installing to /boot/modules instead of /boot/kernel. Many kernel + modules built this way (such as those in ports) already overrode + KMODDIR explicitly to install into /boot/modules. However, + manually building and installing a module from /sys/modules will + now install to /boot/modules instead of /boot/kernel. + 20160414: The CAM I/O scheduler has been committed to the kernel. There should be no user visible impact. This does enable NCQ Trim on ada SSDs. While the Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkTue May 10 22:28:06 2016(r299392) +++ head/share/mk/bsd.own.mkTue May 10 22:32:23 2016(r299393) @@ -165,11 +165,7 @@ BINGRP?= wheel BINMODE?= 555 NOBINMODE?=444 -.if defined(MODULES_WITH_WORLD) KMODDIR?= /boot/modules -.else -KMODDIR?= /boot/kernel -.endif KMODOWN?= ${BINOWN} KMODGRP?= ${BINGRP} KMODMODE?= ${BINMODE} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299392 - head/sys/x86/isa
Author: bz Date: Tue May 10 22:28:06 2016 New Revision: 299392 URL: https://svnweb.freebsd.org/changeset/base/299392 Log: Allow orm(4) to be disabled from probing/attaching by a hints entry: hint.orm.0.disabled=1 Suggested by: jhb Reviewed by: jhb MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D6307 Modified: head/sys/x86/isa/orm.c Modified: head/sys/x86/isa/orm.c == --- head/sys/x86/isa/orm.c Tue May 10 22:25:55 2016(r299391) +++ head/sys/x86/isa/orm.c Tue May 10 22:28:06 2016(r299392) @@ -91,6 +91,9 @@ orm_identify(driver_t* driver, device_t struct orm_softc*sc; u_int8_tbuf[3]; + if (resource_disabled("orm", 0)) + return; + child = BUS_ADD_CHILD(parent, ISA_ORDER_SENSITIVE, "orm", -1); device_set_driver(child, driver); isa_set_logicalid(child, ORM_ID); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299391 - head/sys/vm
Author: jhb Date: Tue May 10 22:25:55 2016 New Revision: 299391 URL: https://svnweb.freebsd.org/changeset/base/299391 Log: Move vm_domain_rr_selectdomain() under #ifdef VM_NUMA_ALLOC. The function had a null function body in the !VM_NUMA_ALLOC case but also wasn't called in the !VM_NUMA_ALLOC case. Suggested by: ngie Modified: head/sys/vm/vm_domain.c Modified: head/sys/vm/vm_domain.c == --- head/sys/vm/vm_domain.c Tue May 10 21:12:32 2016(r299390) +++ head/sys/vm/vm_domain.c Tue May 10 22:25:55 2016(r299391) @@ -61,10 +61,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef VM_NUMA_ALLOC static __inline int vm_domain_rr_selectdomain(int skip_domain) { -#ifdef VM_NUMA_ALLOC struct thread *td; td = curthread; @@ -82,10 +82,8 @@ vm_domain_rr_selectdomain(int skip_domai td->td_dom_rr_idx %= vm_ndomains; } return (td->td_dom_rr_idx); -#else - return (0); -#endif } +#endif /* * This implements a very simple set of VM domain memory allocation ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299390 - in vendor/libarchive/dist: . build contrib cpio cpio/test doc examples libarchive libarchive/test tar tar/test
Author: mm Date: Tue May 10 21:12:32 2016 New Revision: 299390 URL: https://svnweb.freebsd.org/changeset/base/299390 Log: Trim libarchive/dist using FREEBSD-Xlist Deleted: vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/CTestConfig.cmake vendor/libarchive/dist/INSTALL vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/build/ vendor/libarchive/dist/configure.ac vendor/libarchive/dist/contrib/ vendor/libarchive/dist/cpio/CMakeLists.txt vendor/libarchive/dist/cpio/config_freebsd.h vendor/libarchive/dist/cpio/cpio_windows.c vendor/libarchive/dist/cpio/cpio_windows.h vendor/libarchive/dist/cpio/test/CMakeLists.txt vendor/libarchive/dist/doc/ vendor/libarchive/dist/examples/ vendor/libarchive/dist/libarchive/CMakeLists.txt vendor/libarchive/dist/libarchive/archive_entry_copy_bhfi.c vendor/libarchive/dist/libarchive/archive_read_disk_windows.c vendor/libarchive/dist/libarchive/archive_windows.c vendor/libarchive/dist/libarchive/archive_windows.h vendor/libarchive/dist/libarchive/archive_write_disk_windows.c vendor/libarchive/dist/libarchive/config_freebsd.h vendor/libarchive/dist/libarchive/filter_fork_windows.c vendor/libarchive/dist/libarchive/mtree.5 vendor/libarchive/dist/libarchive/test/.cvsignore vendor/libarchive/dist/libarchive/test/CMakeLists.txt vendor/libarchive/dist/tar/CMakeLists.txt vendor/libarchive/dist/tar/bsdtar_windows.c vendor/libarchive/dist/tar/bsdtar_windows.h vendor/libarchive/dist/tar/config_freebsd.h vendor/libarchive/dist/tar/test/CMakeLists.txt vendor/libarchive/dist/tar/test/test_windows.c ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299389 - in head/secure/lib/libcrypto: . i386
On 10 May 2016 at 16:31, Jung-uk Kimwrote: > Author: jkim > Date: Tue May 10 20:31:09 2016 > New Revision: 299389 > URL: https://svnweb.freebsd.org/changeset/base/299389 > > Log: > Make libcrypto.so position independent on i386. Great, thanks! ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299389 - in head/secure/lib/libcrypto: . i386
Author: jkim Date: Tue May 10 20:31:09 2016 New Revision: 299389 URL: https://svnweb.freebsd.org/changeset/base/299389 Log: Make libcrypto.so position independent on i386. Added: head/secure/lib/libcrypto/i386/aes-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/aes-586.s head/secure/lib/libcrypto/i386/aesni-x86.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/aesni-x86.s head/secure/lib/libcrypto/i386/bf-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/bf-586.s head/secure/lib/libcrypto/i386/bf-686.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/bf-686.s head/secure/lib/libcrypto/i386/bn-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/bn-586.s head/secure/lib/libcrypto/i386/cmll-x86.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/cmll-x86.s head/secure/lib/libcrypto/i386/co-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/co-586.s head/secure/lib/libcrypto/i386/crypt586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/crypt586.s head/secure/lib/libcrypto/i386/des-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/des-586.s head/secure/lib/libcrypto/i386/ghash-x86.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/ghash-x86.s head/secure/lib/libcrypto/i386/md5-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/md5-586.s head/secure/lib/libcrypto/i386/rc4-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/rc4-586.s head/secure/lib/libcrypto/i386/rc5-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/rc5-586.s head/secure/lib/libcrypto/i386/rmd-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/rmd-586.s head/secure/lib/libcrypto/i386/sha1-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/sha1-586.s head/secure/lib/libcrypto/i386/sha256-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/sha256-586.s head/secure/lib/libcrypto/i386/sha512-586.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/sha512-586.s head/secure/lib/libcrypto/i386/vpaes-x86.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/vpaes-x86.s head/secure/lib/libcrypto/i386/wp-mmx.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/wp-mmx.s head/secure/lib/libcrypto/i386/x86-gf2m.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/x86-gf2m.s head/secure/lib/libcrypto/i386/x86-mont.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/x86-mont.s head/secure/lib/libcrypto/i386/x86cpuid.S - copied, changed from r299388, head/secure/lib/libcrypto/i386/x86cpuid.s Deleted: head/secure/lib/libcrypto/i386/aes-586.s head/secure/lib/libcrypto/i386/aesni-x86.s head/secure/lib/libcrypto/i386/bf-586.s head/secure/lib/libcrypto/i386/bf-686.s head/secure/lib/libcrypto/i386/bn-586.s head/secure/lib/libcrypto/i386/cmll-x86.s head/secure/lib/libcrypto/i386/co-586.s head/secure/lib/libcrypto/i386/crypt586.s head/secure/lib/libcrypto/i386/des-586.s head/secure/lib/libcrypto/i386/ghash-x86.s head/secure/lib/libcrypto/i386/md5-586.s head/secure/lib/libcrypto/i386/rc4-586.s head/secure/lib/libcrypto/i386/rc5-586.s head/secure/lib/libcrypto/i386/rmd-586.s head/secure/lib/libcrypto/i386/sha1-586.s head/secure/lib/libcrypto/i386/sha256-586.s head/secure/lib/libcrypto/i386/sha512-586.s head/secure/lib/libcrypto/i386/vpaes-x86.s head/secure/lib/libcrypto/i386/wp-mmx.s head/secure/lib/libcrypto/i386/x86-gf2m.s head/secure/lib/libcrypto/i386/x86-mont.s head/secure/lib/libcrypto/i386/x86cpuid.s Modified: head/secure/lib/libcrypto/Makefile head/secure/lib/libcrypto/Makefile.asm Modified: head/secure/lib/libcrypto/Makefile == --- head/secure/lib/libcrypto/Makefile Tue May 10 20:25:49 2016 (r299388) +++ head/secure/lib/libcrypto/Makefile Tue May 10 20:31:09 2016 (r299389) @@ -26,7 +26,7 @@ SRCS= cpt_err.c cryptlib.c cversion.c ex .if ${MACHINE_CPUARCH} == "amd64" SRCS+= x86_64cpuid.S .elif ${MACHINE_CPUARCH} == "i386" -SRCS+= x86cpuid.s +SRCS+= x86cpuid.S .else SRCS+= mem_clr.c .endif @@ -38,7 +38,7 @@ SRCS+=aes_cfb.c aes_ctr.c aes_ecb.c aes SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S \ aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S .elif ${MACHINE_CPUARCH} == "i386" -SRCS+= aes-586.s aesni-x86.s vpaes-x86.s +SRCS+= aes-586.S aesni-x86.S vpaes-x86.S .else SRCS+= aes_cbc.c aes_core.c .endif @@ -63,9 +63,9 @@ INCS+=asn1.h asn1_mac.h asn1t.h SRCS+= bf_cfb64.c bf_ecb.c bf_ofb64.c bf_skey.c .if ${MACHINE_CPUARCH} == "i386" .if ${MACHINE_CPU:Mi686} -SRCS+= bf-686.s +SRCS+=
svn commit: r299388 - head/cddl/usr.sbin/dtrace/tests
Author: markj Date: Tue May 10 20:25:49 2016 New Revision: 299388 URL: https://svnweb.freebsd.org/changeset/base/299388 Log: Fix DTrace test ATF wrapper generation. Modified: head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk Modified: head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk == --- head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk Tue May 10 20:14:11 2016(r299387) +++ head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk Tue May 10 20:25:49 2016(r299388) @@ -18,7 +18,7 @@ TEST_METADATA.t_dtrace_contrib+= require GENTEST?= ${.CURDIR:H:H}/tools/gentest.sh EXCLUDE= ${.CURDIR:H:H}/tools/exclude.sh ${TESTWRAPPER}.sh: ${GENTEST} ${EXCLUDE} ${${PACKAGE}FILES} - sh ${GENTEST} -e ${EXCLUDE} ${TESTGROUP} ${${TESTGROUP}:S/ */ /} > ${.TARGET} + sh ${GENTEST} -e ${EXCLUDE} ${TESTGROUP} ${${PACKAGE}FILES:S/ */ /} > ${.TARGET} CLEANFILES+= ${TESTWRAPPER}.sh ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299387 - head/sys/netipsec
Author: cem Date: Tue May 10 20:14:11 2016 New Revision: 299387 URL: https://svnweb.freebsd.org/changeset/base/299387 Log: netipsec: Fix minor style nit Coverity points out that 'continue' is equivalent to 'break' in a do {} while(false) loop. Reported by: Coverity CID: 1354983 Sponsored by: EMC / Isilon Storage Division Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c == --- head/sys/netipsec/key.c Tue May 10 20:12:27 2016(r299386) +++ head/sys/netipsec/key.c Tue May 10 20:14:11 2016(r299387) @@ -351,7 +351,7 @@ do { \ if ((head) != (sav)) { \ ipseclog((LOG_DEBUG, "%s: state mismatched (TREE=%d SA=%d)\n", \ (name), (head), (sav)));\ - continue; \ + break; \ } \ } while (0) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299386 - in stable/10/share/man: man4 man9
Author: wblock (doc committer) Date: Tue May 10 20:12:27 2016 New Revision: 299386 URL: https://svnweb.freebsd.org/changeset/base/299386 Log: MFC r298904: Spelling fixes supplied by pfg@, detected with codespell, plus additional misspellings detected by igor. Modified: stable/10/share/man/man4/cxgbe.4 stable/10/share/man/man4/ng_car.4 stable/10/share/man/man4/ng_nat.4 stable/10/share/man/man4/uplcom.4 stable/10/share/man/man9/counter.9 stable/10/share/man/man9/fpu_kern.9 stable/10/share/man/man9/hash.9 stable/10/share/man/man9/lock.9 stable/10/share/man/man9/pci.9 stable/10/share/man/man9/sysctl.9 stable/10/share/man/man9/zone.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/cxgbe.4 == --- stable/10/share/man/man4/cxgbe.4Tue May 10 20:09:40 2016 (r299385) +++ stable/10/share/man/man4/cxgbe.4Tue May 10 20:12:27 2016 (r299386) @@ -227,7 +227,7 @@ long as it is compatible with the driver the one already on the card. The default is 1. .It Va hw.cxgbe.fl_pktshift -The number of bytes of padding inserted before the begining of an Ethernet +The number of bytes of padding inserted before the beginning of an Ethernet frame in the receive buffer. The default value of 2 ensures that the Ethernet payload (usually the IP header) is at a 4 byte aligned address. Modified: stable/10/share/man/man4/ng_car.4 == --- stable/10/share/man/man4/ng_car.4 Tue May 10 20:09:40 2016 (r299385) +++ stable/10/share/man/man4/ng_car.4 Tue May 10 20:12:27 2016 (r299386) @@ -123,9 +123,9 @@ Return current node configuration as .Vt "struct ng_car_bulkconf" .Bd -literal struct ng_car_hookconf { - uint64_t cbs; /* Commited burst size (bytes) */ + uint64_t cbs; /* Committed burst size (bytes) */ uint64_t ebs; /* Exceeded/Peak burst size (bytes) */ - uint64_t cir; /* Commited information rate (bits/s) */ + uint64_t cir; /* Committed information rate (bits/s) */ uint64_t pir; /* Peak information rate (bits/s) */ uint8_t green_action; /* Action for green packets */ uint8_t yellow_action; /* Action for yellow packets */ @@ -162,7 +162,7 @@ Return node statistics as .Bd -literal struct ng_car_hookstats { uint64_t passed_pkts; /* Counter for passed packets */ - uint64_t droped_pkts; /* Counter for droped packets */ + uint64_t droped_pkts; /* Counter for dropped packets */ uint64_t green_pkts;/* Counter for green packets */ uint64_t yellow_pkts; /* Counter for yellow packets */ uint64_t red_pkts; /* Counter for red packets */ Modified: stable/10/share/man/man4/ng_nat.4 == --- stable/10/share/man/man4/ng_nat.4 Tue May 10 20:09:40 2016 (r299385) +++ stable/10/share/man/man4/ng_nat.4 Tue May 10 20:12:27 2016 (r299386) @@ -259,7 +259,7 @@ struct ng_nat_libalias_info { .Ed In case of .Nm -failed to retreive a certain counter +failed to retrieve a certain counter from its .Xr libalias instance, the corresponding field is returned as Modified: stable/10/share/man/man4/uplcom.4 == --- stable/10/share/man/man4/uplcom.4 Tue May 10 20:09:40 2016 (r299385) +++ stable/10/share/man/man4/uplcom.4 Tue May 10 20:12:27 2016 (r299386) @@ -98,7 +98,7 @@ HAL Corporation Crossam2+USB IR commande .It Hama USB RS-232 Serial Adapter .It -Hamlet exagerate XURS232 +Hamlet exaggerate XURS232 .It HP LD220 Point-Of-Sale (POS) Display .It Modified: stable/10/share/man/man9/counter.9 == --- stable/10/share/man/man9/counter.9 Tue May 10 20:09:40 2016 (r299385) +++ stable/10/share/man/man9/counter.9 Tue May 10 20:12:27 2016 (r299386) @@ -78,7 +78,7 @@ update faster than simple arithmetic on Thus .Nm is considered suitable for accounting in the performance-critical -code pathes. +code paths. .Bl -tag -width indent .It Fn counter_u64_alloc how Allocate a new 64-bit unsigned counter. Modified: stable/10/share/man/man9/fpu_kern.9 == --- stable/10/share/man/man9/fpu_kern.9 Tue May 10 20:09:40 2016 (r299385) +++ stable/10/share/man/man9/fpu_kern.9 Tue May 10 20:12:27 2016 (r299386) @@ -139,7 +139,7 @@ function ends the region started by .Fn fpu_kern_enter . The uses of FPU in the kernel after the call to .Fn fpu_kern_leave -are erronous until the next call to +are erroneous until the next call to .Fn fpu_kern_enter is performed. The
svn commit: r299385 - head/usr.bin/sdiff
Author: cem Date: Tue May 10 20:09:40 2016 New Revision: 299385 URL: https://svnweb.freebsd.org/changeset/base/299385 Log: sdiff(1): Fix potential NULL deref in cleanup path In the presence of the --diff-pid argument, it is possible for 'diffpipe' to be NULL. Only fclose() it if it was initialized. Reported by: Coverity CID: 1355183 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/sdiff/sdiff.c Modified: head/usr.bin/sdiff/sdiff.c == --- head/usr.bin/sdiff/sdiff.c Tue May 10 20:02:03 2016(r299384) +++ head/usr.bin/sdiff/sdiff.c Tue May 10 20:09:40 2016(r299385) @@ -430,7 +430,8 @@ main(int argc, char **argv) /* Close open files and pipe, delete temps */ fclose(file1); fclose(file2); - fclose(diffpipe); + if (diffpipe != NULL) + fclose(diffpipe); if (tmp1) if (unlink(tmp1)) warn("Error deleting %s.", tmp1); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299384 - in head/sys: arm/nvidia dev/gpio
Author: gonzo Date: Tue May 10 20:02:03 2016 New Revision: 299384 URL: https://svnweb.freebsd.org/changeset/base/299384 Log: Pass device tree node as a part of gpio_pin_get_by_ofw_XXX API Current API assumes that "gpios" property belongs to the device's node but for some binding it's not true: gpiokeys has set of child nodes with this property. Patch adds new argument instead of replacing device_t because device_t will be used to track ownership for allocated pins Reviewed by: mmel Differential Revision:https://reviews.freebsd.org/D6277 Modified: head/sys/arm/nvidia/tegra_sdhci.c head/sys/dev/gpio/gpiobusvar.h head/sys/dev/gpio/ofw_gpiobus.c Modified: head/sys/arm/nvidia/tegra_sdhci.c == --- head/sys/arm/nvidia/tegra_sdhci.c Tue May 10 19:11:25 2016 (r299383) +++ head/sys/arm/nvidia/tegra_sdhci.c Tue May 10 20:02:03 2016 (r299384) @@ -300,9 +300,9 @@ tegra_sdhci_attach(device_t dev) goto fail; } - gpio_pin_get_by_ofw_property(sc->dev, "cd-gpios", >gpio_cd); - gpio_pin_get_by_ofw_property(sc->dev, "power-gpios", >gpio_power); - gpio_pin_get_by_ofw_property(sc->dev, "wp-gpios", >gpio_wp); + gpio_pin_get_by_ofw_property(sc->dev, node, "cd-gpios", >gpio_cd); + gpio_pin_get_by_ofw_property(sc->dev, node, "power-gpios", >gpio_power); + gpio_pin_get_by_ofw_property(sc->dev, node, "wp-gpios", >gpio_wp); rv = clk_get_by_ofw_index(dev, 0, >clk); if (rv != 0) { Modified: head/sys/dev/gpio/gpiobusvar.h == --- head/sys/dev/gpio/gpiobusvar.h Tue May 10 19:11:25 2016 (r299383) +++ head/sys/dev/gpio/gpiobusvar.h Tue May 10 20:02:03 2016 (r299384) @@ -116,10 +116,12 @@ void ofw_gpiobus_register_provider(devic void ofw_gpiobus_unregister_provider(device_t); /* Consumers interface. */ -int gpio_pin_get_by_ofw_name(device_t consumer, char *name, gpio_pin_t *gpio); -int gpio_pin_get_by_ofw_idx(device_t consumer, int idx, gpio_pin_t *gpio); -int gpio_pin_get_by_ofw_property(device_t consumer, char *name, -gpio_pin_t *gpio); +int gpio_pin_get_by_ofw_name(device_t consumer, phandle_t node, +char *name, gpio_pin_t *gpio); +int gpio_pin_get_by_ofw_idx(device_t consumer, phandle_t node, +int idx, gpio_pin_t *gpio); +int gpio_pin_get_by_ofw_property(device_t consumer, phandle_t node, +char *name, gpio_pin_t *gpio); void gpio_pin_release(gpio_pin_t gpio); int gpio_pin_is_active(gpio_pin_t pin, bool *active); int gpio_pin_set_active(gpio_pin_t pin, bool active); Modified: head/sys/dev/gpio/ofw_gpiobus.c == --- head/sys/dev/gpio/ofw_gpiobus.c Tue May 10 19:11:25 2016 (r299383) +++ head/sys/dev/gpio/ofw_gpiobus.c Tue May 10 20:02:03 2016 (r299384) @@ -56,21 +56,17 @@ static int ofw_gpiobus_parse_gpios_impl( * */ static int -gpio_pin_get_by_ofw_impl(device_t consumer_dev, char *prop_name, int idx, -gpio_pin_t *out_pin) +gpio_pin_get_by_ofw_impl(device_t consumer, phandle_t cnode, +char *prop_name, int idx, gpio_pin_t *out_pin) { - phandle_t cnode, xref; + phandle_t xref; pcell_t *cells; device_t busdev; struct gpiobus_pin pin; int ncells, rv; - cnode = ofw_bus_get_node(consumer_dev); - if (cnode <= 0) { - device_printf(consumer_dev, - "%s called on not ofw based device\n", __func__); - return (ENXIO); - } + KASSERT(consumer != NULL && cnode > 0, + ("both consumer and cnode required")); rv = ofw_bus_parse_xref_list_alloc(cnode, prop_name, "#gpio-cells", idx, , , ); @@ -95,17 +91,13 @@ gpio_pin_get_by_ofw_impl(device_t consum rv = gpio_map_gpios(pin.dev, cnode, OF_node_from_xref(xref), ncells, cells, , ); free(cells, M_OFWPROP); - if (rv != 0) { - device_printf(consumer_dev, "Cannot map the gpio property.\n"); + if (rv != 0) return (ENXIO); - } /* Reserve GPIO pin. */ rv = gpiobus_map_pin(busdev, pin.pin); - if (rv != 0) { - device_printf(consumer_dev, "Cannot reserve gpio pin.\n"); + if (rv != 0) return (EBUSY); - } *out_pin = malloc(sizeof(struct gpiobus_pin), M_DEVBUF, M_WAITOK | M_ZERO); @@ -114,35 +106,34 @@ gpio_pin_get_by_ofw_impl(device_t consum } int -gpio_pin_get_by_ofw_idx(device_t consumer_dev, int idx, gpio_pin_t *pin) +gpio_pin_get_by_ofw_idx(device_t consumer, phandle_t node, +int idx, gpio_pin_t *pin) { - return (gpio_pin_get_by_ofw_impl(consumer_dev, "gpios", idx, pin)); + return (gpio_pin_get_by_ofw_impl(consumer, node, "gpios", idx, pin));
svn commit: r299383 - head/sys/arm/arm
Author: manu Date: Tue May 10 19:11:25 2016 New Revision: 299383 URL: https://svnweb.freebsd.org/changeset/base/299383 Log: When PLATFORM_SMP is enabled, check if tunable hw.ncpu is set and valid (>= 1 and <= real ncores) and set mp_ncpus to it. Approved by: andrew (mentor) Differential Revision:https://reviews.freebsd.org/D6151 Modified: head/sys/arm/arm/platform.c Modified: head/sys/arm/arm/platform.c == --- head/sys/arm/arm/platform.c Tue May 10 18:28:38 2016(r299382) +++ head/sys/arm/arm/platform.c Tue May 10 19:11:25 2016(r299383) @@ -209,8 +209,16 @@ platform_delay(int usec, void *arg __unu void platform_mp_setmaxid(void) { + int ncpu; PLATFORM_MP_SETMAXID(plat_obj); + + if (TUNABLE_INT_FETCH("hw.ncpu", )) { + if (ncpu >= 1 && ncpu <= mp_ncpus) { + mp_ncpus = ncpu; + mp_maxid = ncpu - 1; + } + } } void ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299382 - head/sbin/growfs
Author: trasz Date: Tue May 10 18:28:38 2016 New Revision: 299382 URL: https://svnweb.freebsd.org/changeset/base/299382 Log: Update the example growfs(8) manual page to include information on how to make the system "notice" the updated disk size. (Relnotes, since I've forget to set it for "camcontrol reprobe", and it's worth mentioning.) MFC after:1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Modified: head/sbin/growfs/growfs.8 Modified: head/sbin/growfs/growfs.8 == --- head/sbin/growfs/growfs.8 Tue May 10 18:18:29 2016(r299381) +++ head/sbin/growfs/growfs.8 Tue May 10 18:28:38 2016(r299382) @@ -37,7 +37,7 @@ .\" $TSHeader: src/sbin/growfs/growfs.8,v 1.3 2000/12/12 19:31:00 tomsoft Exp $ .\" $FreeBSD$ .\" -.Dd November 20, 2014 +.Dd May 10, 2016 .Dt GROWFS 8 .Os .Sh NAME @@ -99,16 +99,15 @@ will enlarge the file system to the size Expand root file system to fill up available space: .Dl growfs / .Pp -Resize -.Pa /dev/ada0p1 -partition to 2GB and expand the file system: -.Dl gpart resize -i 1 -s 2G ada0 -.Dl growfs -s 2G /dev/ada0p1 +Refresh the LUN size, resize the partition to use all available +capacity, and expand the filesystem accordingly: +.Dl camcontrol reprobe da0 +.Dl gpart recover da0 +.Dl gpart resize -i 1 da0 +.Dl growfs /dev/da0p1 .Sh SEE ALSO -.Xr dumpfs 8 , -.Xr ffsinfo 8 , +.Xr camcontrol 8 , .Xr fsck 8 , -.Xr fsdb 8 , .Xr gpart 8 , .Xr newfs 8 , .Xr tunefs 8 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299381 - head/sys/dev/drm2/i915
Author: hselasky Date: Tue May 10 18:18:29 2016 New Revision: 299381 URL: https://svnweb.freebsd.org/changeset/base/299381 Log: Ensure waiting loops terminate during cold boot. This fixes boot with MacBookPro and i915kms_load="YES" in /boot/loader.conf. A lowlevel timeout in one of the display ports caused an infinite wait because a ticks/jiffies comparison was constant. The clock subsystem which makes ticks/jiffies increment is started after the initial driver probing is done. Refer to sys/kernel.h and SI_SUB_DRIVERS vs SI_SUB_CLOCKS . Discussed with: kmacy @ Modified: head/sys/dev/drm2/i915/intel_drv.h Modified: head/sys/dev/drm2/i915/intel_drv.h == --- head/sys/dev/drm2/i915/intel_drv.h Tue May 10 18:00:37 2016 (r299380) +++ head/sys/dev/drm2/i915/intel_drv.h Tue May 10 18:18:29 2016 (r299381) @@ -50,6 +50,8 @@ pause((WMSG), 1); \ else\ DELAY(1000);\ + if (cold) \ + end -= howmany(hz, 1000); \ } \ \ ret;\ @@ -68,6 +70,8 @@ } else {\ DELAY(1000);\ } \ + if (cold) \ + timeout__ -= howmany(hz, 1000); \ } \ ret__; \ }) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299380 - head/sys/arm/allwinner
Author: manu Date: Tue May 10 18:00:37 2016 New Revision: 299380 URL: https://svnweb.freebsd.org/changeset/base/299380 Log: Merge a20_mp_start_ap and a31_mp_start_ap into one function. This function works with all smp non-multicluster allwinner SoC (A20, A31, A31S and H3). Approved by: cognet (mentor) Differential Revision:https://reviews.freebsd.org/D6269 Modified: head/sys/arm/allwinner/allwinner_machdep.c head/sys/arm/allwinner/aw_mp.c head/sys/arm/allwinner/aw_mp.h Modified: head/sys/arm/allwinner/allwinner_machdep.c == --- head/sys/arm/allwinner/allwinner_machdep.c Tue May 10 17:51:17 2016 (r299379) +++ head/sys/arm/allwinner/allwinner_machdep.c Tue May 10 18:00:37 2016 (r299380) @@ -167,7 +167,7 @@ static platform_method_t a20_methods[] = PLATFORMMETHOD(platform_devmap_init,allwinner_devmap_init), #ifdef SMP - PLATFORMMETHOD(platform_mp_start_ap,a20_mp_start_ap), + PLATFORMMETHOD(platform_mp_start_ap,aw_mp_start_ap), PLATFORMMETHOD(platform_mp_setmaxid,aw_mp_setmaxid), #endif PLATFORMMETHOD_END, @@ -182,7 +182,7 @@ static platform_method_t a31_methods[] = PLATFORMMETHOD(platform_devmap_init,allwinner_devmap_init), #ifdef SMP - PLATFORMMETHOD(platform_mp_start_ap,a31_mp_start_ap), + PLATFORMMETHOD(platform_mp_start_ap,aw_mp_start_ap), PLATFORMMETHOD(platform_mp_setmaxid,aw_mp_setmaxid), #endif PLATFORMMETHOD_END, @@ -197,7 +197,7 @@ static platform_method_t a31s_methods[] PLATFORMMETHOD(platform_devmap_init,allwinner_devmap_init), #ifdef SMP - PLATFORMMETHOD(platform_mp_start_ap,a31_mp_start_ap), + PLATFORMMETHOD(platform_mp_start_ap,aw_mp_start_ap), PLATFORMMETHOD(platform_mp_setmaxid,aw_mp_setmaxid), #endif PLATFORMMETHOD_END, Modified: head/sys/arm/allwinner/aw_mp.c == --- head/sys/arm/allwinner/aw_mp.c Tue May 10 17:51:17 2016 (r299379) +++ head/sys/arm/allwinner/aw_mp.c Tue May 10 18:00:37 2016 (r299380) @@ -107,12 +107,28 @@ aw_mp_setmaxid(platform_t plat) mp_maxid = ncpu - 1; } -static void -aw_common_mp_start_ap(bus_space_handle_t cpucfg, bus_space_handle_t prcm) +void +aw_mp_start_ap(platform_t plat) { - int i, j; + bus_space_handle_t cpucfg; + bus_space_handle_t prcm; + int i, j, soc_family; uint32_t val; + soc_family = allwinner_soc_family(); + if (soc_family == ALLWINNERSOC_SUN7I) { + if (bus_space_map(fdtbus_bs_tag, A20_CPUCFG_BASE, CPUCFG_SIZE, + 0, ) != 0) + panic("Couldn't map the CPUCFG\n"); + } else { + if (bus_space_map(fdtbus_bs_tag, CPUCFG_BASE, CPUCFG_SIZE, + 0, ) != 0) + panic("Couldn't map the CPUCFG\n"); + if (bus_space_map(fdtbus_bs_tag, PRCM_BASE, PRCM_SIZE, 0, + ) != 0) + panic("Couldn't map the PRCM\n"); + } + dcache_wbinv_poc_all(); bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_P_REG0, @@ -141,7 +157,7 @@ aw_common_mp_start_ap(bus_space_handle_t /* Release power clamp */ for (i = 1; i < mp_ncpus; i++) for (j = 0; j <= CPU_PWR_CLAMP_STEPS; j++) { - if (prcm) { + if (soc_family != ALLWINNERSOC_SUN7I) { bus_space_write_4(fdtbus_bs_tag, prcm, CPU_PWR_CLAMP(i), 0xff >> j); } else { @@ -152,7 +168,7 @@ aw_common_mp_start_ap(bus_space_handle_t DELAY(1); /* Clear power-off gating */ - if (prcm) { + if (soc_family != ALLWINNERSOC_SUN7I) { val = bus_space_read_4(fdtbus_bs_tag, prcm, CPU_PWROFF); for (i = 0; i < mp_ncpus; i++) val &= ~(1 << i); @@ -179,39 +195,8 @@ aw_common_mp_start_ap(bus_space_handle_t armv7_sev(); bus_space_unmap(fdtbus_bs_tag, cpucfg, CPUCFG_SIZE); -} - -void -a20_mp_start_ap(platform_t plat) -{ - bus_space_handle_t cpucfg; - - if (bus_space_map(fdtbus_bs_tag, A20_CPUCFG_BASE, CPUCFG_SIZE, - 0, ) != 0) - panic("Couldn't map the CPUCFG\n"); - - aw_common_mp_start_ap(cpucfg, 0); - armv7_sev(); - bus_space_unmap(fdtbus_bs_tag, cpucfg, CPUCFG_SIZE); -} - -void -a31_mp_start_ap(platform_t plat) -{ - bus_space_handle_t cpucfg; - bus_space_handle_t prcm; - - if (bus_space_map(fdtbus_bs_tag, CPUCFG_BASE, CPUCFG_SIZE, - 0, ) != 0) - panic("Couldn't map the CPUCFG\n"); - if (bus_space_map(fdtbus_bs_tag, PRCM_BASE, PRCM_SIZE, 0, - ) != 0) -
svn commit: r299379 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue May 10 17:51:17 2016 New Revision: 299379 URL: https://svnweb.freebsd.org/changeset/base/299379 Log: Implement ioremap_wt() and use that in the MEMREMAP_WT case for i386 and amd64. Suggested by: cem @ Discussed with: kmacy @ MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/io.h Modified: head/sys/compat/linuxkpi/common/include/linux/io.h == --- head/sys/compat/linuxkpi/common/include/linux/io.h Tue May 10 17:34:35 2016(r299378) +++ head/sys/compat/linuxkpi/common/include/linux/io.h Tue May 10 17:51:17 2016(r299379) @@ -183,6 +183,8 @@ void *_ioremap_attr(vm_paddr_t phys_addr _ioremap_attr((addr), (size), VM_MEMATTR_WRITE_COMBINING) #defineioremap_wb(addr, size) \ _ioremap_attr((addr), (size), VM_MEMATTR_WRITE_BACK) +#defineioremap_wt(addr, size) \ +_ioremap_attr((addr), (size), VM_MEMATTR_WRITE_THROUGH) #defineioremap(addr, size) \ _ioremap_attr((addr), (size), VM_MEMATTR_UNCACHEABLE) void iounmap(void *addr); @@ -227,7 +229,7 @@ memremap(resource_size_t offset, size_t (addr = ioremap_wb(offset, size)) != NULL) goto done; if ((flags & MEMREMAP_WT) && - (addr = ioremap_nocache(offset, size)) != NULL) + (addr = ioremap_wt(offset, size)) != NULL) goto done; if ((flags & MEMREMAP_WC) && (addr = ioremap_wc(offset, size)) != NULL) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299368 - head/sys/mips/conf
Yeah, I'll do that today. -adrian On 10 May 2016 at 10:23, John Baldwinwrote: > On Tuesday, May 10, 2016 09:23:07 AM Adrian Chadd wrote: >> I'll go take another look at this. siba != bnhdbus. bhndbus is the new stuff. > > Right. For now, how about reverting this change to SENTRY5 but adding > #NO_UNIVERSE so that people's tinderboxes are not broken until you've > fixed the build for real? > > -- > John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299368 - head/sys/mips/conf
On Tuesday, May 10, 2016 09:23:07 AM Adrian Chadd wrote: > I'll go take another look at this. siba != bnhdbus. bhndbus is the new stuff. Right. For now, how about reverting this change to SENTRY5 but adding #NO_UNIVERSE so that people's tinderboxes are not broken until you've fixed the build for real? -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299378 - stable/10/contrib/netbsd-tests/usr.bin/grep
Author: asomers Date: Tue May 10 17:34:35 2016 New Revision: 299378 URL: https://svnweb.freebsd.org/changeset/base/299378 Log: MFC 294923 Fix grep_test:recurse with ZFS and TMPFS tmpdirs contrib/netbsd-tests/usr.bin/grep/t_grep.sh Fix grep_test:recurse when /tmp is either zfs or tmpfs. The test was relying on an implicit ordering of directory recursion which happens to be true when using UFS. grep's specification requires no such ordering. The solution is to ignore the order of grep's results. Modified: stable/10/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/usr.bin/grep/t_grep.sh == --- stable/10/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Tue May 10 17:01:51 2016(r299377) +++ stable/10/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Tue May 10 17:34:35 2016(r299378) @@ -70,7 +70,15 @@ recurse_body() echo -e "cod\ndover sole\nhaddock\nhalibut\npilchard" > recurse/d/fish echo -e "cod\nhaddock\nplaice" > recurse/a/f/favourite-fish + # Begin FreeBSD + if true; then + atf_check -o file:"$(atf_get_srcdir)/d_recurse.out" -x "grep -r haddock recurse | sort" + else + # End FreeBSD atf_check -o file:"$(atf_get_srcdir)/d_recurse.out" grep -r haddock recurse + # Begin FreeBSD + fi + # End FreeBSD } atf_test_case recurse_symlink ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299371 - in head: sbin/camcontrol sys/cam sys/cam/scsi
On 0510T1020, Alan Somers wrote: > On Tue, May 10, 2016 at 9:46 AM, Edward Tomasz Napierala> wrote: > > > Author: trasz > > Date: Tue May 10 15:46:33 2016 > > New Revision: 299371 > > URL: https://svnweb.freebsd.org/changeset/base/299371 > > > > Log: > > Add "camcontrol reprobe" subcommand, and implement it for da(4). > > This makes it possible to manually force updating capacity data > > after the disk got resized. Without it it might be neccessary to > > reboot before FreeBSD notices updated disk size under eg VMWare. > > > > Discussed with: imp@ > > MFC after:1 month > > Sponsored by: The FreeBSD Foundation > > Differential Revision:https://reviews.freebsd.org/D6108 > > > > Modified: > > head/sbin/camcontrol/camcontrol.8 > > head/sbin/camcontrol/camcontrol.c > > head/sys/cam/cam_ccb.h > > head/sys/cam/cam_xpt.c > > head/sys/cam/scsi/scsi_da.c > > > > > > I too have been annoyed that "camcontrol rescan" won't update capacity > data. But could we solve the problem by simply adding logic to "camcontrol > rescan" instead of adding an entirely new command? Would a user ever want > to rescan a device without reprobing it too? Two reasons. First, I want to be able to pass the device name (like 'da0') and not the CAM path (like 1:0:0) for usability reasons - it seems easy to figure out the latter from the former, using "camcontrol devlist", but it suddenly becomes complicated when you try to explain it in a man page. Second - I don't understand the "camcontrol rescan" logic well enough, and "camcontrol rescan all" sometimes fails for me anyway, in a way I'm not sure how to debug. Also, to be honest I'm not sure those two are actually that related. Rescanning is about discovering new devices on the bus. "Reprobe" is about updating... well, mostly updating the capacity. The former requires enumerating the bus using a mechanism built into XPT; the latter is just notifying the periph driver (in this case da(4)) that it needs to query the capacity and call disk_resize(4). ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299364 - head/sys/compat/linuxkpi/common/include/linux
On 05/10/16 16:49, Conrad Meyer wrote: On Tue, May 10, 2016 at 5:04 AM, Hans Petter Selaskywrote: Author: hselasky Date: Tue May 10 12:04:57 2016 New Revision: 299364 URL: https://svnweb.freebsd.org/changeset/base/299364 Log: Add more LinuxKPI I/O functions. Obtained from:kmacy @ ... @@ -166,5 +212,35 @@ __iowrite64_copy(void *to, void *from, s #endif } +enum { + MEMREMAP_WB = 1 << 0, + MEMREMAP_WT = 1 << 1, + MEMREMAP_WC = 1 << 2, +}; + +static inline void * +memremap(resource_size_t offset, size_t size, unsigned long flags) +{ + void *addr = NULL; + + if ((flags & MEMREMAP_WB) && + (addr = ioremap_wb(offset, size)) != NULL) + goto done; + if ((flags & MEMREMAP_WT) && + (addr = ioremap_nocache(offset, size)) != NULL) + goto done; x86 can actually map memory as WT rather than UC. Why throw that away? + if ((flags & MEMREMAP_WC) && + (addr = ioremap_wc(offset, size)) != NULL) + goto done; +done: + return (addr); +} + ... Hi Conrad, I agree. I see no reason to not implement ioremap_wt() for x86 (32-bit and 64-bit) and use it for the WT case. --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299377 - head/usr.bin/sed
Author: pfg Date: Tue May 10 17:01:51 2016 New Revision: 299377 URL: https://svnweb.freebsd.org/changeset/base/299377 Log: sed.1: Correction for the case insensitive case. Use the capital I instead of the lowercase. Submitted by: Mikhail T. PR: 195929 MFC after:2 weeks Modified: head/usr.bin/sed/sed.1 Modified: head/usr.bin/sed/sed.1 == --- head/usr.bin/sed/sed.1 Tue May 10 16:49:50 2016(r299376) +++ head/usr.bin/sed/sed.1 Tue May 10 17:01:51 2016(r299377) @@ -31,7 +31,7 @@ .\"@(#)sed.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd June 20, 2014 +.Dd May 10, 2016 .Dt SED 1 .Os .Sh NAME @@ -198,7 +198,7 @@ option was specified); a context address that consists of a regular expression preceded and followed by a delimiter. The closing delimiter can also optionally be followed by the -.Dq i +.Dq I character, to indicate that the regular expression is to be matched in a case-insensitive way. .El ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299376 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: asomers Date: Tue May 10 16:49:50 2016 New Revision: 299376 URL: https://svnweb.freebsd.org/changeset/base/299376 Log: MFC 297868 Fix rare double free in vdev_geom_attrchanged sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Don't drop the g_topology_lock before freeing old_physpath. That opens up a race where one thread can call vdev_geom_attrchanged, set old_physpath, drop the g_topology_lock, then block trying to acquire the SCL_STATE lock. Then another thread can come into vdev_geom_attrchanged, set old_physpath to the same value, and proceed to free it. When the first thread resumes, it will free the same location. It turns out that the SCL_STATE lock isn't needed. It was originally added by gibbs to protect vd->vdev_physpath while updating the same. However, the update process subsequently was switched to an atomic operation (a pointer swap). Now, there is no need for the SCL_STATE lock, and hence no need to drop the g_topology_lock. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue May 10 16:40:19 2016(r299375) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue May 10 16:49:50 2016(r299376) @@ -110,27 +110,14 @@ vdev_geom_attrchanged(struct g_consumer if (error == 0) { char *old_physpath; + /* g_topology lock ensures that vdev has not been closed */ + g_topology_assert(); old_physpath = vd->vdev_physpath; vd->vdev_physpath = spa_strdup(physpath); spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE); - if (old_physpath != NULL) { - int held_lock; - - held_lock = spa_config_held(spa, SCL_STATE, RW_WRITER); - if (held_lock == 0) { - g_topology_unlock(); - spa_config_enter(spa, SCL_STATE, FTAG, - RW_WRITER); - } - + if (old_physpath != NULL) spa_strfree(old_physpath); - - if (held_lock == 0) { - spa_config_exit(spa, SCL_STATE, FTAG); - g_topology_lock(); - } - } } g_free(physpath); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299375 - in head/sys/dev/aic7xxx: . aicasm
Author: pfg Date: Tue May 10 16:40:19 2016 New Revision: 299375 URL: https://svnweb.freebsd.org/changeset/base/299375 Log: aic7xxx: minor spelling fixes. Affects mostly comments but also a visible text string, Differential Revision:https://reviews.freebsd.org/D6270 Modified: head/sys/dev/aic7xxx/aic79xx.c head/sys/dev/aic7xxx/aic79xx.h head/sys/dev/aic7xxx/aic79xx.reg head/sys/dev/aic7xxx/aic79xx.seq head/sys/dev/aic7xxx/aic79xx_inline.h head/sys/dev/aic7xxx/aic79xx_pci.c head/sys/dev/aic7xxx/aic7xxx.c head/sys/dev/aic7xxx/aic7xxx.h head/sys/dev/aic7xxx/aic7xxx.reg head/sys/dev/aic7xxx/aic7xxx.seq head/sys/dev/aic7xxx/aic7xxx_inline.h head/sys/dev/aic7xxx/aic7xxx_pci.c head/sys/dev/aic7xxx/aicasm/aicasm.c head/sys/dev/aic7xxx/aicasm/aicasm_gram.y Modified: head/sys/dev/aic7xxx/aic79xx.c == --- head/sys/dev/aic7xxx/aic79xx.c Tue May 10 16:31:18 2016 (r299374) +++ head/sys/dev/aic7xxx/aic79xx.c Tue May 10 16:40:19 2016 (r299375) @@ -1206,7 +1206,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, * that requires host assistance for completion. * While handling the message phase(s), we will be * notified by the sequencer after each byte is -* transfered so we can track bus phase changes. +* transferred so we can track bus phase changes. * * If this is the first time we've seen a HOST_MSG_LOOP * interrupt, initialize the state of the host message @@ -1620,7 +1620,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd /* * Although the driver does not care about the * 'Selection in Progress' status bit, the busy -* LED does. SELINGO is only cleared by a sucessfull +* LED does. SELINGO is only cleared by a successful * selection, so we must manually clear it to insure * the LED turns off just incase no future successful * selections occur (e.g. no devices on the bus). @@ -2695,7 +2695,7 @@ ahd_clear_critical_section(struct ahd_so ahd_outb(ahd, SEQCTL0, ahd_inb(ahd, SEQCTL0) & ~STEP); ahd_outb(ahd, SIMODE1, simode1); /* -* SCSIINT seems to glitch occassionally when +* SCSIINT seems to glitch occasionally when * the interrupt masks are restored. Clear SCSIINT * one more time so that only persistent errors * are seen as a real interrupt. @@ -3023,7 +3023,7 @@ ahd_validate_width(struct ahd_softc *ahd /* * Update the bitmask of targets for which the controller should - * negotiate with at the next convenient oportunity. This currently + * negotiate with at the next convenient opportunity. This currently * means the next time we send the initial identify messages for * a new transaction. */ @@ -3374,7 +3374,7 @@ ahd_update_neg_table(struct ahd_softc *a /* * During packetized transfers, the target will -* give us the oportunity to send command packets +* give us the opportunity to send command packets * without us asserting attention. */ if ((tinfo->ppr_options & MSG_EXT_PPR_IU_REQ) == 0) @@ -4838,7 +4838,7 @@ ahd_handle_msg_reject(struct ahd_softc * /* * Requeue all tagged commands for this target -* currently in our posession so they can be +* currently in our possession so they can be * converted to untagged commands. */ ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb), @@ -5489,7 +5489,7 @@ ahd_shutdown(void *arg) /* * Reset the controller and record some information about it * that is only available just after a reset. If "reinit" is - * non-zero, this reset occured after initial configuration + * non-zero, this reset occurred after initial configuration * and the caller requests that the chip be fully reinitialized * to a runable state. Chip interrupts are *not* enabled after * a reinitialization. The caller must enable interrupts via @@ -5742,7 +5742,7 @@ ahd_init_scbdata(struct ahd_softc *ahd) } /* -* Note that we were successfull +* Note that we were successful */ return (0); @@ -8785,7 +8785,7 @@ ahd_check_patch(struct ahd_softc *ahd, s cur_patch += cur_patch->skip_patch; } else { /* Accepted this patch. Advance to the next -* one and wait for our intruction pointer to +* one and wait for our instruction pointer to * hit this point. */
Re: svn commit: r299364 - head/sys/compat/linuxkpi/common/include/linux
On Tue, May 10, 2016 at 5:04 AM, Hans Petter Selaskywrote: > Author: hselasky > Date: Tue May 10 12:04:57 2016 > New Revision: 299364 > URL: https://svnweb.freebsd.org/changeset/base/299364 > > Log: > Add more LinuxKPI I/O functions. > > Obtained from:kmacy @ > ... > @@ -166,5 +212,35 @@ __iowrite64_copy(void *to, void *from, s > #endif > } > > +enum { > + MEMREMAP_WB = 1 << 0, > + MEMREMAP_WT = 1 << 1, > + MEMREMAP_WC = 1 << 2, > +}; > + > +static inline void * > +memremap(resource_size_t offset, size_t size, unsigned long flags) > +{ > + void *addr = NULL; > + > + if ((flags & MEMREMAP_WB) && > + (addr = ioremap_wb(offset, size)) != NULL) > + goto done; > + if ((flags & MEMREMAP_WT) && > + (addr = ioremap_nocache(offset, size)) != NULL) > + goto done; x86 can actually map memory as WT rather than UC. Why throw that away? > + if ((flags & MEMREMAP_WC) && > + (addr = ioremap_wc(offset, size)) != NULL) > + goto done; > +done: > + return (addr); > +} > + > ... Best, Conrad ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299363 - head/sys/compat/linuxkpi/common/include/asm
On 05/10/16 18:05, Conrad Meyer wrote: On Tue, May 10, 2016 at 8:55 AM, John Baldwinwrote: On Tuesday, May 10, 2016 05:06:08 PM Hans Petter Selasky wrote: On 05/10/16 13:39, Hans Petter Selasky wrote: Author: hselasky Date: Tue May 10 11:39:36 2016 New Revision: 299363 URL: https://svnweb.freebsd.org/changeset/base/299363 Log: Use function macros when possible to avoid stray substitutions. MFC after:1 week Sponsored by: Mellanox Technologies Is the reason for the change to avoid accepting the wrong number of arguments (e.g. cpu_to_be32(x, y))? Won't that still fail to compile if so? (That is, the reasoning for why you made the original change isn't clear to me from the commit.) The macro form also prevents clobbering non-function-pointer variables named "cpu_to_be32," right? Not that that's a great variable name. Hi, That's right Conrad. My intention was to avoid substitutions outside the function domain, like in a structure like this for example: struct { int cpu_to_be32; } xxx; These functions only accepts one argument, so no problem there. --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299374 - head/sys/dev/cxgb
Author: hselasky Date: Tue May 10 16:31:18 2016 New Revision: 299374 URL: https://svnweb.freebsd.org/changeset/base/299374 Log: Fix kernel LINT build after r299363. Define shadowing macros the same way to avoid macro redefinition compile error(s) for now. Approved by: np @ Modified: head/sys/dev/cxgb/cxgb_osdep.h Modified: head/sys/dev/cxgb/cxgb_osdep.h == --- head/sys/dev/cxgb/cxgb_osdep.h Tue May 10 16:20:36 2016 (r299373) +++ head/sys/dev/cxgb/cxgb_osdep.h Tue May 10 16:31:18 2016 (r299374) @@ -169,7 +169,7 @@ static const int debug_flags = DBG_RX; #define test_and_clear_bit(bit, p) atomic_cmpset_int((p), ((*(p)) | (1<
Re: svn commit: r299368 - head/sys/mips/conf
I'll go take another look at this. siba != bnhdbus. bhndbus is the new stuff. -adrian ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299371 - in head: sbin/camcontrol sys/cam sys/cam/scsi
On Tue, May 10, 2016 at 9:46 AM, Edward Tomasz Napieralawrote: > Author: trasz > Date: Tue May 10 15:46:33 2016 > New Revision: 299371 > URL: https://svnweb.freebsd.org/changeset/base/299371 > > Log: > Add "camcontrol reprobe" subcommand, and implement it for da(4). > This makes it possible to manually force updating capacity data > after the disk got resized. Without it it might be neccessary to > reboot before FreeBSD notices updated disk size under eg VMWare. > > Discussed with: imp@ > MFC after:1 month > Sponsored by: The FreeBSD Foundation > Differential Revision:https://reviews.freebsd.org/D6108 > > Modified: > head/sbin/camcontrol/camcontrol.8 > head/sbin/camcontrol/camcontrol.c > head/sys/cam/cam_ccb.h > head/sys/cam/cam_xpt.c > head/sys/cam/scsi/scsi_da.c > > I too have been annoyed that "camcontrol rescan" won't update capacity data. But could we solve the problem by simply adding logic to "camcontrol rescan" instead of adding an entirely new command? Would a user ever want to rescan a device without reprobing it too? -Alan ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299373 - head/sys/cam/scsi
Author: mav Date: Tue May 10 16:20:36 2016 New Revision: 299373 URL: https://svnweb.freebsd.org/changeset/base/299373 Log: Allow sleepable allocations in enclosure daemon threads. There were at least two places where M_NOWAIT was used without NULL check. This change should fix NULL-dereference panic there and possibly improve operation in other ways under memory pressure. MFC after:2 weeks Modified: head/sys/cam/scsi/scsi_enc_safte.c head/sys/cam/scsi/scsi_enc_ses.c Modified: head/sys/cam/scsi/scsi_enc_safte.c == --- head/sys/cam/scsi/scsi_enc_safte.c Tue May 10 16:13:54 2016 (r299372) +++ head/sys/cam/scsi/scsi_enc_safte.c Tue May 10 16:20:36 2016 (r299373) @@ -291,11 +291,8 @@ safte_process_config(enc_softc_t *enc, s cfg->DoorLock + cfg->Ntherm + cfg->Nspkrs + cfg->Ntstats + 1; ENC_FREE_AND_NULL(enc->enc_cache.elm_map); enc->enc_cache.elm_map = - ENC_MALLOCZ(enc->enc_cache.nelms * sizeof(enc_element_t)); - if (enc->enc_cache.elm_map == NULL) { - enc->enc_cache.nelms = 0; - return (ENOMEM); - } + malloc(enc->enc_cache.nelms * sizeof(enc_element_t), + M_SCSIENC, M_WAITOK|M_ZERO); r = 0; /* Modified: head/sys/cam/scsi/scsi_enc_ses.c == --- head/sys/cam/scsi/scsi_enc_ses.cTue May 10 16:13:54 2016 (r299372) +++ head/sys/cam/scsi/scsi_enc_ses.cTue May 10 16:20:36 2016 (r299373) @@ -715,13 +715,15 @@ ses_cache_clone(enc_softc_t *enc, enc_ca * The element map is independent even though it starts out * pointing to the same constant page data. */ - dst->elm_map = ENC_MALLOCZ(dst->nelms * sizeof(enc_element_t)); + dst->elm_map = malloc(dst->nelms * sizeof(enc_element_t), + M_SCSIENC, M_WAITOK); memcpy(dst->elm_map, src->elm_map, dst->nelms * sizeof(enc_element_t)); for (dst_elm = dst->elm_map, src_elm = src->elm_map, last_elm = >elm_map[src->nelms]; src_elm != last_elm; src_elm++, dst_elm++) { - dst_elm->elm_private = ENC_MALLOCZ(sizeof(ses_element_t)); + dst_elm->elm_private = malloc(sizeof(ses_element_t), + M_SCSIENC, M_WAITOK); memcpy(dst_elm->elm_private, src_elm->elm_private, sizeof(ses_element_t)); } @@ -1066,11 +1068,7 @@ ses_set_physpath(enc_softc_t *enc, enc_e cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.buftype = CDAI_TYPE_SCSI_DEVID; cdai.bufsiz = CAM_SCSI_DEVID_MAXLEN; - cdai.buf = devid = ENC_MALLOCZ(cdai.bufsiz); - if (devid == NULL) { - ret = ENOMEM; - goto out; - } + cdai.buf = devid = malloc(cdai.bufsiz, M_SCSIENC, M_WAITOK|M_ZERO); cam_periph_lock(enc->periph); xpt_action((union ccb *)); if ((cdai.ccb_h.status & CAM_DEV_QFRZN) != 0) @@ -1370,12 +1368,8 @@ ses_process_config(enc_softc_t *enc, str * Now waltz through all the subenclosures summing the number of * types available in each. */ - subencs = ENC_MALLOCZ(ses_cfg_page_get_num_subenc(cfg_page) - * sizeof(*subencs)); - if (subencs == NULL) { - err = ENOMEM; - goto out; - } + subencs = malloc(ses_cfg_page_get_num_subenc(cfg_page) + * sizeof(*subencs), M_SCSIENC, M_WAITOK|M_ZERO); /* * Sub-enclosure data is const after construction (i.e. when * accessed via our cache object. @@ -1413,11 +1407,8 @@ ses_process_config(enc_softc_t *enc, str } /* Process the type headers. */ - ses_types = ENC_MALLOCZ(ntype * sizeof(*ses_types)); - if (ses_types == NULL) { - err = ENOMEM; - goto out; - } + ses_types = malloc(ntype * sizeof(*ses_types), + M_SCSIENC, M_WAITOK|M_ZERO); /* * Type data is const after construction (i.e. when accessed via * our cache object. @@ -1454,11 +1445,8 @@ ses_process_config(enc_softc_t *enc, str } /* Create the object map. */ - enc_cache->elm_map = ENC_MALLOCZ(nelm * sizeof(enc_element_t)); - if (enc_cache->elm_map == NULL) { - err = ENOMEM; - goto out; - } + enc_cache->elm_map = malloc(nelm * sizeof(enc_element_t), + M_SCSIENC, M_WAITOK|M_ZERO); enc_cache->nelms = nelm; ses_iter_init(enc, enc_cache, ); @@ -1472,11 +1460,8 @@ ses_process_config(enc_softc_t *enc, str element->subenclosure = thdr->etype_subenc; element->enctype = thdr->etype_elm_type; element->overall_status_elem = iter.type_element_index == 0; -
svn commit: r299372 - head/share/man/man9
Author: jhb Date: Tue May 10 16:13:54 2016 New Revision: 299372 URL: https://svnweb.freebsd.org/changeset/base/299372 Log: Add a missing section to a cross-reference. While here, add bus_space(9) to the SEE ALSO section. Modified: head/share/man/man9/bus_activate_resource.9 Modified: head/share/man/man9/bus_activate_resource.9 == --- head/share/man/man9/bus_activate_resource.9 Tue May 10 15:46:33 2016 (r299371) +++ head/share/man/man9/bus_activate_resource.9 Tue May 10 16:13:54 2016 (r299372) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 28, 2016 +.Dd May 10, 2016 .Dt BUS_ACTIVATE_RESOURCE 9 .Os .Sh NAME @@ -90,7 +90,7 @@ returned by .El .Ss Resource Mapping Resources which can be mapped for CPU access by a -.Xr bus_space +.Xr bus_space 9 tag and handle will create a mapping of the entire resource when activated. The tag and handle for this mapping are stored in .Fa r @@ -133,6 +133,7 @@ resource: Zero is returned on success, otherwise an error is returned. .Sh SEE ALSO .Xr bus_alloc_resource 9 , +.Xr bus_space 9 , .Xr device 9 , .Xr driver 9 .Sh AUTHORS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299363 - head/sys/compat/linuxkpi/common/include/asm
On Tue, May 10, 2016 at 8:55 AM, John Baldwinwrote: > On Tuesday, May 10, 2016 05:06:08 PM Hans Petter Selasky wrote: >> On 05/10/16 13:39, Hans Petter Selasky wrote: >> > Author: hselasky >> > Date: Tue May 10 11:39:36 2016 >> > New Revision: 299363 >> > URL: https://svnweb.freebsd.org/changeset/base/299363 >> > >> > Log: >> > Use function macros when possible to avoid stray substitutions. >> > >> > MFC after:1 week >> > Sponsored by: Mellanox Technologies >> > > > Is the reason for the change to avoid accepting the wrong number of arguments > (e.g. cpu_to_be32(x, y))? Won't that still fail to compile if so? (That is, > the reasoning for why you made the original change isn't clear to me from the > commit.) The macro form also prevents clobbering non-function-pointer variables named "cpu_to_be32," right? Not that that's a great variable name. Best, Conrad ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299368 - head/sys/mips/conf
On Tuesday, May 10, 2016 03:03:55 PM Bjoern A. Zeeb wrote: > > > On 10 May 2016, at 14:59 , Bjoern A. Zeebwrote: > > > > Author: bz > > Date: Tue May 10 14:59:48 2016 > > New Revision: 299368 > > URL: https://svnweb.freebsd.org/changeset/base/299368 > > > > Log: > > siba depends on bhndbus; add the device to the kernel config. > > This gets us past compiling and now only linking is failing on builtins. > > > head.svn% grep -r __builtin_ctz sys/dev/bhnd/ > sys/dev/bhnd/bhndb/bhndb_private.h: dw_free = > >dw_alloc[__builtin_ctz(br->dwa_freelist)]; > head.svn% grep -r __builtin_popcount !$ > sys/dev/bhnd/bhndb/bhndb_subr.c:if > (__builtin_popcount(br->dwa_freelist) != br->dwa_count) { > > Fixing this in the kernel on mips32 is beyond my commitment today. Could you > please have a look. SENTRY5 has not been compiling in a few days now; > alternatively siba should temporarily go out of the kernel config until this > is all resolved? I think that SENTRY5 actually wants to use the "old" siba, so that adding bhndbus here is actually backwards. Perhaps the simplest approach is to disconnect SENTRY5 from the build entirely via #NO_UNIVERSE until this is resolved? -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r299363 - head/sys/compat/linuxkpi/common/include/asm
On Tuesday, May 10, 2016 05:06:08 PM Hans Petter Selasky wrote: > On 05/10/16 13:39, Hans Petter Selasky wrote: > > Author: hselasky > > Date: Tue May 10 11:39:36 2016 > > New Revision: 299363 > > URL: https://svnweb.freebsd.org/changeset/base/299363 > > > > Log: > > Use function macros when possible to avoid stray substitutions. > > > > MFC after:1 week > > Sponsored by: Mellanox Technologies > > > > FYI > > This change accidentially broke LINT and I have a patch waiting for > review from the Chelsio guys that will fix LINT and WITH_OFED=YES again. > Will hopefully be fixed shortly. Is the reason for the change to avoid accepting the wrong number of arguments (e.g. cpu_to_be32(x, y))? Won't that still fail to compile if so? (That is, the reasoning for why you made the original change isn't clear to me from the commit.) -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299371 - in head: sbin/camcontrol sys/cam sys/cam/scsi
Author: trasz Date: Tue May 10 15:46:33 2016 New Revision: 299371 URL: https://svnweb.freebsd.org/changeset/base/299371 Log: Add "camcontrol reprobe" subcommand, and implement it for da(4). This makes it possible to manually force updating capacity data after the disk got resized. Without it it might be neccessary to reboot before FreeBSD notices updated disk size under eg VMWare. Discussed with: imp@ MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D6108 Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c head/sys/cam/cam_ccb.h head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_da.c Modified: head/sbin/camcontrol/camcontrol.8 == --- head/sbin/camcontrol/camcontrol.8 Tue May 10 15:45:59 2016 (r299370) +++ head/sbin/camcontrol/camcontrol.8 Tue May 10 15:46:33 2016 (r299371) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 2015 +.Dd April 26, 2016 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -98,6 +98,9 @@ .Op device id .Op generic args .Nm +.Ic reprobe +.Op device id +.Nm .Ic rescan .Aq all | bus Ns Op :target:lun .Nm @@ -518,6 +521,12 @@ are not specified). Print out the last logical block or the size of the device only, and omit the blocksize. .El +.Pp +Note that this command only displays the information, it does not update +the kernel data structures. +Use the +.Nm +reprobe subcommand to do that. .It Ic start Send the SCSI Start/Stop Unit (0x1B) command to the given device with the start bit set. @@ -539,6 +548,12 @@ The user may specify a scan of all busses, a single bus, or a lun. Scanning all luns on a target is not supported. +.It Ic reprobe +Tell the kernel to refresh the information about the device and +notify the upper layer, +.Xr GEOM 4 . +This includes sending the SCSI READ CAPACITY command and updating +the disk size visible to the rest of the system. .It Ic reset Tell the kernel to reset all busses in the system (with the .Ar all Modified: head/sbin/camcontrol/camcontrol.c == --- head/sbin/camcontrol/camcontrol.c Tue May 10 15:45:59 2016 (r299370) +++ head/sbin/camcontrol/camcontrol.c Tue May 10 15:46:33 2016 (r299371) @@ -100,7 +100,8 @@ typedef enum { CAM_CMD_APM = 0x0021, CAM_CMD_AAM = 0x0022, CAM_CMD_ATTRIB = 0x0023, - CAM_CMD_OPCODES = 0x0024 + CAM_CMD_OPCODES = 0x0024, + CAM_CMD_REPROBE = 0x0025 } cam_cmdmask; typedef enum { @@ -190,6 +191,7 @@ static struct camcontrol_opts option_tab {"eject", CAM_CMD_STARTSTOP, CAM_ARG_EJECT, NULL}, {"reportluns", CAM_CMD_REPORTLUNS, CAM_ARG_NONE, "clr:"}, {"readcapacity", CAM_CMD_READCAP, CAM_ARG_NONE, "bhHNqs"}, + {"reprobe", CAM_CMD_REPROBE, CAM_ARG_NONE, NULL}, #endif /* MINIMALISTIC */ {"rescan", CAM_CMD_RESCAN, CAM_ARG_NONE, NULL}, {"reset", CAM_CMD_RESET, CAM_ARG_NONE, NULL}, @@ -328,6 +330,7 @@ static int scsiprintopcodes(struct cam_d static int scsiopcodes(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout, int verbose); +static int scsireprobe(struct cam_device *device); #endif /* MINIMALISTIC */ #ifndef min @@ -8660,6 +8663,42 @@ bailout: #endif /* MINIMALISTIC */ +static int +scsireprobe(struct cam_device *device) +{ + union ccb *ccb; + int retval = 0; + + ccb = cam_getccb(device); + + if (ccb == NULL) { + warnx("%s: error allocating ccb", __func__); + return (1); + } + + bzero(&(>ccb_h)[1], + sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + + ccb->ccb_h.func_code = XPT_REPROBE_LUN; + + if (cam_send_ccb(device, ccb) < 0) { + warn("error sending XPT_REPROBE_LUN CCB"); + retval = 1; + goto bailout; + } + + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); + retval = 1; + goto bailout; + } + +bailout: + cam_freeccb(ccb); + + return (retval); +} + void usage(int printlong) { @@ -8679,6 +8718,7 @@ usage(int printlong) "camcontrol stop [dev_id][generic args]\n" "camcontrol load [dev_id][generic args]\n" "camcontrol eject [dev_id][generic args]\n" +"camcontrol reprobe[dev_id][generic args]\n" #endif /* MINIMALISTIC */ "camcontrol rescan \n" "camcontrol reset \n" @@ -8751,6 +8791,7 @@ usage(int printlong) "stopsend a Stop Unit command to the device\n" "load
svn commit: r299370 - head/sys/arm64/cavium
Author: andrew Date: Tue May 10 15:45:59 2016 New Revision: 299370 URL: https://svnweb.freebsd.org/changeset/base/299370 Log: Push the logic to talk with the MSI/MSI-X interrupt controller to the FDT attachment. This is where it will live when we import intrng as it will need to look at either the msi-parent or msi-map FDT properties. Obtained from:ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/cavium/thunder_pcie_pem.c head/sys/arm64/cavium/thunder_pcie_pem_fdt.c Modified: head/sys/arm64/cavium/thunder_pcie_pem.c == --- head/sys/arm64/cavium/thunder_pcie_pem.cTue May 10 15:04:24 2016 (r299369) +++ head/sys/arm64/cavium/thunder_pcie_pem.cTue May 10 15:45:59 2016 (r299370) @@ -128,9 +128,9 @@ static struct resource * thunder_pem_all int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int thunder_pem_alloc_msi(device_t, device_t, int, int, int *); static int thunder_pem_release_msi(device_t, device_t, int, int *); -static int thunder_pem_map_msi(device_t, device_t, int, uint64_t *, uint32_t *); static int thunder_pem_alloc_msix(device_t, device_t, int *); static int thunder_pem_release_msix(device_t, device_t, int); +static int thunder_pem_map_msi(device_t, device_t, int, uint64_t *, uint32_t *); static int thunder_pem_attach(device_t); static int thunder_pem_deactivate_resource(device_t, device_t, int, int, struct resource *); @@ -177,11 +177,11 @@ static device_method_t thunder_pem_metho DEVMETHOD(pcib_maxslots,thunder_pem_maxslots), DEVMETHOD(pcib_read_config, thunder_pem_read_config), DEVMETHOD(pcib_write_config,thunder_pem_write_config), - DEVMETHOD(pcib_map_msi, thunder_pem_map_msi), DEVMETHOD(pcib_alloc_msix, thunder_pem_alloc_msix), DEVMETHOD(pcib_release_msix,thunder_pem_release_msix), DEVMETHOD(pcib_alloc_msi, thunder_pem_alloc_msi), DEVMETHOD(pcib_release_msi, thunder_pem_release_msi), + DEVMETHOD(pcib_map_msi, thunder_pem_map_msi), DEVMETHOD_END }; @@ -327,37 +327,48 @@ static int thunder_pem_alloc_msi(device_t pci, device_t child, int count, int maxcount, int *irqs) { + device_t bus; - return (arm_alloc_msi(pci, child, count, maxcount, irqs)); + bus = device_get_parent(pci); + return (PCIB_ALLOC_MSI(device_get_parent(bus), child, count, maxcount, + irqs)); } static int thunder_pem_release_msi(device_t pci, device_t child, int count, int *irqs) { + device_t bus; - return (arm_release_msi(pci, child, count, irqs)); + bus = device_get_parent(pci); + return (PCIB_RELEASE_MSI(device_get_parent(bus), child, count, irqs)); } static int -thunder_pem_map_msi(device_t pci, device_t child, int irq, uint64_t *addr, -uint32_t *data) +thunder_pem_alloc_msix(device_t pci, device_t child, int *irq) { + device_t bus; - return (arm_map_msi(pci, child, irq, addr, data)); + bus = device_get_parent(pci); + return (PCIB_ALLOC_MSIX(device_get_parent(bus), child, irq)); } static int -thunder_pem_alloc_msix(device_t pci, device_t child, int *irq) +thunder_pem_release_msix(device_t pci, device_t child, int irq) { + device_t bus; - return (arm_alloc_msix(pci, child, irq)); + bus = device_get_parent(pci); + return (PCIB_RELEASE_MSIX(device_get_parent(bus), child, irq)); } static int -thunder_pem_release_msix(device_t pci, device_t child, int irq) +thunder_pem_map_msi(device_t pci, device_t child, int irq, uint64_t *addr, +uint32_t *data) { + device_t bus; - return (arm_release_msix(pci, child, irq)); + bus = device_get_parent(pci); + return (PCIB_MAP_MSI(device_get_parent(bus), child, irq, addr, data)); } static int Modified: head/sys/arm64/cavium/thunder_pcie_pem_fdt.c == --- head/sys/arm64/cavium/thunder_pcie_pem_fdt.cTue May 10 15:04:24 2016(r299369) +++ head/sys/arm64/cavium/thunder_pcie_pem_fdt.cTue May 10 15:45:59 2016(r299370) @@ -51,15 +51,32 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "thunder_pcie_common.h" #include "thunder_pcie_pem.h" +#include "pcib_if.h" + static int thunder_pem_fdt_probe(device_t); +static int thunder_pem_fdt_alloc_msix(device_t, device_t, int *); +static int thunder_pem_fdt_release_msix(device_t, device_t, int); +static int thunder_pem_fdt_alloc_msi(device_t, device_t, int, int, int *); +static int thunder_pem_fdt_release_msi(device_t, device_t, int, int *); +static int thunder_pem_fdt_map_msi(device_t, device_t, int, uint64_t *, +uint32_t *); static device_method_t
svn commit: r299369 - head/sys/dev/mpr
Author: trasz Date: Tue May 10 15:04:24 2016 New Revision: 299369 URL: https://svnweb.freebsd.org/changeset/base/299369 Log: Remove NULL checks after M_WAITOK allocations from mpr(4). Reviewed by: asomers@ MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D6297 Modified: head/sys/dev/mpr/mpr_user.c Modified: head/sys/dev/mpr/mpr_user.c == --- head/sys/dev/mpr/mpr_user.c Tue May 10 14:59:48 2016(r299368) +++ head/sys/dev/mpr/mpr_user.c Tue May 10 15:04:24 2016(r299369) @@ -685,11 +685,6 @@ mpr_user_command(struct mpr_softc *sc, s if (cmd->len > 0) { buf = malloc(cmd->len, M_MPRUSER, M_WAITOK|M_ZERO); - if (!buf) { - mpr_printf(sc, "Cannot allocate memory %s %d\n", - __func__, __LINE__); - return (ENOMEM); - } cm->cm_data = buf; cm->cm_length = cmd->len; } else { @@ -916,25 +911,20 @@ mpr_user_pass_thru(struct mpr_softc *sc, if (cm->cm_length != 0) { cm->cm_data = malloc(cm->cm_length, M_MPRUSER, M_WAITOK | M_ZERO); - if (cm->cm_data == NULL) { - mpr_dprint(sc, MPR_FAULT, "%s: alloc failed for IOCTL " - "passthru length %d\n", __func__, cm->cm_length); - } else { - cm->cm_flags = MPR_CM_FLAGS_DATAIN; - if (data->DataOutSize) { - cm->cm_flags |= MPR_CM_FLAGS_DATAOUT; - err = copyin(PTRIN(data->PtrDataOut), - cm->cm_data, data->DataOutSize); - } else if (data->DataDirection == - MPR_PASS_THRU_DIRECTION_WRITE) { - cm->cm_flags = MPR_CM_FLAGS_DATAOUT; - err = copyin(PTRIN(data->PtrData), - cm->cm_data, data->DataSize); - } - if (err != 0) - mpr_dprint(sc, MPR_FAULT, "%s: failed to copy " - "IOCTL data from user space\n", __func__); - } + cm->cm_flags = MPR_CM_FLAGS_DATAIN; + if (data->DataOutSize) { + cm->cm_flags |= MPR_CM_FLAGS_DATAOUT; + err = copyin(PTRIN(data->PtrDataOut), + cm->cm_data, data->DataOutSize); + } else if (data->DataDirection == + MPR_PASS_THRU_DIRECTION_WRITE) { + cm->cm_flags = MPR_CM_FLAGS_DATAOUT; + err = copyin(PTRIN(data->PtrData), + cm->cm_data, data->DataSize); + } + if (err != 0) + mpr_dprint(sc, MPR_FAULT, "%s: failed to copy " + "IOCTL data from user space\n", __func__); } /* * Set this flag only if processing a command that does not need an @@ -2118,11 +2108,6 @@ mpr_ioctl(struct cdev *dev, u_long cmd, break; case MPRIO_READ_CFG_PAGE: mpr_page = malloc(page_req->len, M_MPRUSER, M_WAITOK | M_ZERO); - if (!mpr_page) { - mpr_printf(sc, "Cannot allocate memory %s %d\n", - __func__, __LINE__); - return (ENOMEM); - } error = copyin(page_req->buf, mpr_page, sizeof(MPI2_CONFIG_PAGE_HEADER)); if (error) @@ -2142,11 +2127,6 @@ mpr_ioctl(struct cdev *dev, u_long cmd, case MPRIO_READ_EXT_CFG_PAGE: mpr_page = malloc(ext_page_req->len, M_MPRUSER, M_WAITOK | M_ZERO); - if (!mpr_page) { - mpr_printf(sc, "Cannot allocate memory %s %d\n", - __func__, __LINE__); - return (ENOMEM); - } error = copyin(ext_page_req->buf, mpr_page, sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); if (error) @@ -2160,11 +2140,6 @@ mpr_ioctl(struct cdev *dev, u_long cmd, break; case MPRIO_WRITE_CFG_PAGE: mpr_page = malloc(page_req->len, M_MPRUSER, M_WAITOK|M_ZERO); - if (!mpr_page) { - mpr_printf(sc, "Cannot allocate memory %s %d\n", - __func__, __LINE__); - return (ENOMEM); - } error = copyin(page_req->buf, mpr_page, page_req->len); if (error) break; ___
Re: svn commit: r299368 - head/sys/mips/conf
> On 10 May 2016, at 14:59 , Bjoern A. Zeebwrote: > > Author: bz > Date: Tue May 10 14:59:48 2016 > New Revision: 299368 > URL: https://svnweb.freebsd.org/changeset/base/299368 > > Log: > siba depends on bhndbus; add the device to the kernel config. > This gets us past compiling and now only linking is failing on builtins. head.svn% grep -r __builtin_ctz sys/dev/bhnd/ sys/dev/bhnd/bhndb/bhndb_private.h: dw_free = >dw_alloc[__builtin_ctz(br->dwa_freelist)]; head.svn% grep -r __builtin_popcount !$ sys/dev/bhnd/bhndb/bhndb_subr.c:if (__builtin_popcount(br->dwa_freelist) != br->dwa_count) { Fixing this in the kernel on mips32 is beyond my commitment today. Could you please have a look. SENTRY5 has not been compiling in a few days now; alternatively siba should temporarily go out of the kernel config until this is all resolved? 107 linking kernel.full 108 bhndb.o: In function `bhndb_try_activate_resource': 109 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0xb20): undefined reference to `__ctzsi2' 110 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0xb20): relocation truncated to fit: R_MIPS_26 against `__ctzsi2' 111 bhndb.o: In function `bhndb_bus_write_multi_stream_1': 112 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x290c): undefined reference to `__ctzsi2' 113 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x290c): relocation truncated to fit: R_MIPS_26 against `__ctzsi2' 114 bhndb.o: In function `bhndb_bus_read_1': 115 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x2b9c): undefined reference to `__ctzsi2' 116 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x2b9c): relocation truncated to fit: R_MIPS_26 against `__ctzsi2' 117 bhndb.o: In function `bhndb_bus_read_stream_1': 118 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x2dc0): undefined reference to `__ctzsi2' 119 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x2dc0): relocation truncated to fit: R_MIPS_26 against `__ctzsi2' 120 bhndb.o: In function `bhndb_bus_write_1': 121 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x2fec): undefined reference to `__ctzsi2' 122 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x2fec): relocation truncated to fit: R_MIPS_26 against `__ctzsi2' 123 bhndb.o:/tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x3218): more undefined references to `__ctzsi2' follow 124 bhndb.o: In function `bhndb_bus_barrier': 125 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x3218): relocation truncated to fit: R_MIPS_26 against `__ctzsi2' 126 bhndb.o: In function `bhndb_bus_write_multi_stream_4': 127 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x3464): relocation truncated to fit: R_MIPS_26 against `__ctzsi2' 128 bhndb.o: In function `bhndb_bus_read_multi_stream_1': 129 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x3700): relocation truncated to fit: R_MIPS_26 against `__ctzsi2' 130 bhndb.o: In function `bhndb_bus_write_multi_1': 131 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x3998): relocation truncated to fit: R_MIPS_26 against `__ctzsi2' 132 bhndb.o: In function `bhndb_bus_read_multi_1': 133 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x3c30): relocation truncated to fit: R_MIPS_26 against `__ctzsi2' 134 bhndb.o: In function `bhndb_bus_write_stream_1': 135 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb.c:(.text+0x3ec8): additional relocation overflows omitted from the output 136 bhndb_subr.o: In function `bhndb_free_resources': 137 /tank/users/bz/head.svn/sys/dev/bhnd/bhndb/bhndb_subr.c:(.text+0x888): undefined reference to `__popcountsi2' 138 *** [kernel.full] Error code 1 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299367 - head/sys/dev/mps
Author: trasz Date: Tue May 10 14:57:14 2016 New Revision: 299367 URL: https://svnweb.freebsd.org/changeset/base/299367 Log: Remove NULL checks after M_WAITOK allocations from mps(4). Reviewed by: asomers@ MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D6296 Modified: head/sys/dev/mps/mps_user.c Modified: head/sys/dev/mps/mps_user.c == --- head/sys/dev/mps/mps_user.c Tue May 10 14:38:43 2016(r299366) +++ head/sys/dev/mps/mps_user.c Tue May 10 14:57:14 2016(r299367) @@ -699,11 +699,6 @@ mps_user_command(struct mps_softc *sc, s if (cmd->len > 0) { buf = malloc(cmd->len, M_MPSUSER, M_WAITOK|M_ZERO); - if(!buf) { - mps_printf(sc, "Cannot allocate memory %s %d\n", -__func__, __LINE__); - return (ENOMEM); - } cm->cm_data = buf; cm->cm_length = cmd->len; } else { @@ -930,25 +925,20 @@ mps_user_pass_thru(struct mps_softc *sc, if (cm->cm_length != 0) { cm->cm_data = malloc(cm->cm_length, M_MPSUSER, M_WAITOK | M_ZERO); - if (cm->cm_data == NULL) { - mps_dprint(sc, MPS_FAULT, "%s: alloc failed for IOCTL " - "passthru length %d\n", __func__, cm->cm_length); - } else { - cm->cm_flags = MPS_CM_FLAGS_DATAIN; - if (data->DataOutSize) { - cm->cm_flags |= MPS_CM_FLAGS_DATAOUT; - err = copyin(PTRIN(data->PtrDataOut), - cm->cm_data, data->DataOutSize); - } else if (data->DataDirection == - MPS_PASS_THRU_DIRECTION_WRITE) { - cm->cm_flags = MPS_CM_FLAGS_DATAOUT; - err = copyin(PTRIN(data->PtrData), - cm->cm_data, data->DataSize); - } - if (err != 0) - mps_dprint(sc, MPS_FAULT, "%s: failed to copy " - "IOCTL data from user space\n", __func__); + cm->cm_flags = MPS_CM_FLAGS_DATAIN; + if (data->DataOutSize) { + cm->cm_flags |= MPS_CM_FLAGS_DATAOUT; + err = copyin(PTRIN(data->PtrDataOut), + cm->cm_data, data->DataOutSize); + } else if (data->DataDirection == + MPS_PASS_THRU_DIRECTION_WRITE) { + cm->cm_flags = MPS_CM_FLAGS_DATAOUT; + err = copyin(PTRIN(data->PtrData), + cm->cm_data, data->DataSize); } + if (err != 0) + mps_dprint(sc, MPS_FAULT, "%s: failed to copy " + "IOCTL data from user space\n", __func__); } cm->cm_flags |= MPS_CM_FLAGS_SGE_SIMPLE; cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; @@ -2090,11 +2080,6 @@ mps_ioctl(struct cdev *dev, u_long cmd, break; case MPSIO_READ_CFG_PAGE: mps_page = malloc(page_req->len, M_MPSUSER, M_WAITOK | M_ZERO); - if(!mps_page) { - mps_printf(sc, "Cannot allocate memory %s %d\n", -__func__, __LINE__); - return (ENOMEM); - } error = copyin(page_req->buf, mps_page, sizeof(MPI2_CONFIG_PAGE_HEADER)); if (error) @@ -2113,11 +2098,6 @@ mps_ioctl(struct cdev *dev, u_long cmd, break; case MPSIO_READ_EXT_CFG_PAGE: mps_page = malloc(ext_page_req->len, M_MPSUSER, M_WAITOK|M_ZERO); - if(!mps_page) { - mps_printf(sc, "Cannot allocate memory %s %d\n", -__func__, __LINE__); - return (ENOMEM); - } error = copyin(ext_page_req->buf, mps_page, sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); if (error) @@ -2131,11 +2111,6 @@ mps_ioctl(struct cdev *dev, u_long cmd, break; case MPSIO_WRITE_CFG_PAGE: mps_page = malloc(page_req->len, M_MPSUSER, M_WAITOK|M_ZERO); - if(!mps_page) { - mps_printf(sc, "Cannot allocate memory %s %d\n", -__func__, __LINE__); - return (ENOMEM); - } error = copyin(page_req->buf, mps_page, page_req->len); if (error) break; ___ svn-src-all@freebsd.org
Re: svn commit: r299363 - head/sys/compat/linuxkpi/common/include/asm
On 05/10/16 13:39, Hans Petter Selasky wrote: Author: hselasky Date: Tue May 10 11:39:36 2016 New Revision: 299363 URL: https://svnweb.freebsd.org/changeset/base/299363 Log: Use function macros when possible to avoid stray substitutions. MFC after:1 week Sponsored by: Mellanox Technologies FYI This change accidentially broke LINT and I have a patch waiting for review from the Chelsio guys that will fix LINT and WITH_OFED=YES again. Will hopefully be fixed shortly. Index: sys/dev/cxgb/cxgb_osdep.h === --- sys/dev/cxgb/cxgb_osdep.h (revision 299261) +++ sys/dev/cxgb/cxgb_osdep.h (working copy) @@ -169,7 +169,7 @@ #define test_and_clear_bit(bit, p) atomic_cmpset_int((p), ((*(p)) | (1<
svn commit: r299368 - head/sys/mips/conf
Author: bz Date: Tue May 10 14:59:48 2016 New Revision: 299368 URL: https://svnweb.freebsd.org/changeset/base/299368 Log: siba depends on bhndbus; add the device to the kernel config. This gets us past compiling and now only linking is failing on builtins. Modified: head/sys/mips/conf/SENTRY5 Modified: head/sys/mips/conf/SENTRY5 == --- head/sys/mips/conf/SENTRY5 Tue May 10 14:57:14 2016(r299367) +++ head/sys/mips/conf/SENTRY5 Tue May 10 14:59:48 2016(r299368) @@ -57,6 +57,7 @@ options INVARIANT_SUPPORT #options BUS_DEBUG #makeoptions BUS_DEBUG +device bhndbus # Broadcom Home Networking Division Bus device siba# Sonics SiliconBackplane device pci # siba_pcib ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299366 - head/usr.sbin/bsdinstall/scripts
Author: allanjude Date: Tue May 10 14:38:43 2016 New Revision: 299366 URL: https://svnweb.freebsd.org/changeset/base/299366 Log: bsdinstall/zfsboot: Do not mirror swap when swapsize is 0 PR: 209415 Submitted by: Ganael LAPLANCHEMFC after:2 weeks Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot == --- head/usr.sbin/bsdinstall/scripts/zfsbootTue May 10 12:47:36 2016 (r299365) +++ head/usr.sbin/bsdinstall/scripts/zfsbootTue May 10 14:38:43 2016 (r299366) @@ -1233,7 +1233,7 @@ zfs_create_boot() # # Create the gmirror(8) GEOMS for swap # - if [ "$ZFSBOOT_SWAP_MIRROR" ]; then + if [ ${swapsize:-0} -gt 0 -a "$ZFSBOOT_SWAP_MIRROR" ]; then for disk in $disks; do swap_devs="$swap_devs $disk$swappart" done ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299365 - head/etc
Author: bcr (doc committer) Date: Tue May 10 12:47:36 2016 New Revision: 299365 URL: https://svnweb.freebsd.org/changeset/base/299365 Log: Capitalize "LDAP" in the description field of the _ypldap entry. Reviewed by: bapt MFC after:5 days Differential Revision:https://reviews.freebsd.org/D5267 Modified: head/etc/master.passwd Modified: head/etc/master.passwd == --- head/etc/master.passwd Tue May 10 12:04:57 2016(r299364) +++ head/etc/master.passwd Tue May 10 12:47:36 2016(r299365) @@ -22,6 +22,6 @@ uucp:*:66:66::0:0:UUCP pseudo-user:/var/ pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/sbin/nologin www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin -_ypldap:*:160:160::0:0:YP Ldap unprivileged user:/var/empty:/usr/sbin/nologin +_ypldap:*:160:160::0:0:YP LDAP unprivileged user:/var/empty:/usr/sbin/nologin hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299364 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue May 10 12:04:57 2016 New Revision: 299364 URL: https://svnweb.freebsd.org/changeset/base/299364 Log: Add more LinuxKPI I/O functions. Obtained from:kmacy @ MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/io.h Modified: head/sys/compat/linuxkpi/common/include/linux/io.h == --- head/sys/compat/linuxkpi/common/include/linux/io.h Tue May 10 11:39:36 2016(r299363) +++ head/sys/compat/linuxkpi/common/include/linux/io.h Tue May 10 12:04:57 2016(r299364) @@ -35,6 +35,8 @@ #include #include +#include + static inline uint32_t __raw_readl(const volatile void *addr) { @@ -62,7 +64,7 @@ __raw_writeq(uint64_t b, volatile void * /* * XXX This is all x86 specific. It should be bus space access. */ -#define mmiowb() +#definemmiowb()barrier() #undef writel static inline void @@ -92,6 +94,27 @@ writew(uint16_t b, void *addr) *(volatile uint16_t *)addr = b; } +#undef ioread8 +static inline uint8_t +ioread8(const volatile void *addr) +{ + return *(const volatile uint8_t *)addr; +} + +#undef ioread16 +static inline uint16_t +ioread16(const volatile void *addr) +{ + return *(const volatile uint16_t *)addr; +} + +#undef ioread32 +static inline uint32_t +ioread32(const volatile void *addr) +{ + return *(const volatile uint32_t *)addr; +} + #undef ioread32be static inline uint32_t ioread32be(const volatile void *addr) @@ -99,6 +122,27 @@ ioread32be(const volatile void *addr) return be32toh(*(const volatile uint32_t *)addr); } +#undef iowrite8 +static inline void +iowrite8(uint8_t v, volatile void *addr) +{ + *(volatile uint8_t *)addr = v; +} + +#undef iowrite16 +static inline void +iowrite16(uint16_t v, volatile void *addr) +{ + *(volatile uint16_t *)addr = v; +} + +#undef iowrite32 +static inline void +iowrite32(uint32_t v, volatile void *addr) +{ + *(volatile uint32_t *)addr = v; +} + #undef iowrite32be static inline void iowrite32be(uint32_t v, volatile void *addr) @@ -137,6 +181,8 @@ void *_ioremap_attr(vm_paddr_t phys_addr _ioremap_attr((addr), (size), VM_MEMATTR_UNCACHEABLE) #defineioremap_wc(addr, size) \ _ioremap_attr((addr), (size), VM_MEMATTR_WRITE_COMBINING) +#defineioremap_wb(addr, size) \ +_ioremap_attr((addr), (size), VM_MEMATTR_WRITE_BACK) #defineioremap(addr, size) \ _ioremap_attr((addr), (size), VM_MEMATTR_UNCACHEABLE) void iounmap(void *addr); @@ -166,5 +212,35 @@ __iowrite64_copy(void *to, void *from, s #endif } +enum { + MEMREMAP_WB = 1 << 0, + MEMREMAP_WT = 1 << 1, + MEMREMAP_WC = 1 << 2, +}; + +static inline void * +memremap(resource_size_t offset, size_t size, unsigned long flags) +{ + void *addr = NULL; + + if ((flags & MEMREMAP_WB) && + (addr = ioremap_wb(offset, size)) != NULL) + goto done; + if ((flags & MEMREMAP_WT) && + (addr = ioremap_nocache(offset, size)) != NULL) + goto done; + if ((flags & MEMREMAP_WC) && + (addr = ioremap_wc(offset, size)) != NULL) + goto done; +done: + return (addr); +} + +static inline void +memunmap(void *addr) +{ + /* XXX May need to check if this is RAM */ + iounmap(addr); +} #endif /* _LINUX_IO_H_ */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299363 - head/sys/compat/linuxkpi/common/include/asm
Author: hselasky Date: Tue May 10 11:39:36 2016 New Revision: 299363 URL: https://svnweb.freebsd.org/changeset/base/299363 Log: Use function macros when possible to avoid stray substitutions. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/asm/byteorder.h Modified: head/sys/compat/linuxkpi/common/include/asm/byteorder.h == --- head/sys/compat/linuxkpi/common/include/asm/byteorder.h Tue May 10 11:35:03 2016(r299362) +++ head/sys/compat/linuxkpi/common/include/asm/byteorder.h Tue May 10 11:39:36 2016(r299363) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,19 +41,19 @@ #define__BIG_ENDIAN #endif -#definecpu_to_le64 htole64 -#definele64_to_cpu le64toh -#definecpu_to_le32 htole32 -#definele32_to_cpu le32toh -#definecpu_to_le16 htole16 -#definele16_to_cpu le16toh -#definecpu_to_be64 htobe64 -#definebe64_to_cpu be64toh -#definecpu_to_be32 htobe32 -#definebe32_to_cpu be32toh -#definecpu_to_be16 htobe16 -#definebe16_to_cpu be16toh -#define__be16_to_cpu be16toh +#definecpu_to_le64(x) htole64(x) +#definele64_to_cpu(x) le64toh(x) +#definecpu_to_le32(x) htole32(x) +#definele32_to_cpu(x) le32toh(x) +#definecpu_to_le16(x) htole16(x) +#definele16_to_cpu(x) le16toh(x) +#definecpu_to_be64(x) htobe64(x) +#definebe64_to_cpu(x) be64toh(x) +#definecpu_to_be32(x) htobe32(x) +#definebe32_to_cpu(x) be32toh(x) +#definecpu_to_be16(x) htobe16(x) +#definebe16_to_cpu(x) be16toh(x) +#define__be16_to_cpu(x)be16toh(x) #definecpu_to_le64p(x) htole64(*((const uint64_t *)(x))) #definele64_to_cpup(x) le64toh(*((const uint64_t *)(x))) @@ -81,9 +81,9 @@ #definecpu_to_be16s(x) do { *((uint16_t *)(x)) = cpu_to_be16p((x)); } while (0) #definebe16_to_cpus(x) do { *((uint16_t *)(x)) = be16_to_cpup((x)); } while (0) -#defineswab16 bswap16 -#defineswab32 bswap32 -#defineswab64 bswap64 +#defineswab16(x) bswap16(x) +#defineswab32(x) bswap32(x) +#defineswab64(x) bswap64(x) static inline void be16_add_cpu(uint16_t *var, uint16_t val) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299362 - head/sbin/iscontrol
Author: bapt Date: Tue May 10 11:35:03 2016 New Revision: 299362 URL: https://svnweb.freebsd.org/changeset/base/299362 Log: Rename getline with get_line to avoid collision with getline(3) When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard Modified: head/sbin/iscontrol/config.c Modified: head/sbin/iscontrol/config.c == --- head/sbin/iscontrol/config.cTue May 10 11:34:22 2016 (r299361) +++ head/sbin/iscontrol/config.cTue May 10 11:35:03 2016 (r299362) @@ -210,7 +210,7 @@ setOption(isc_opt_t *op, int which, void } static char * -getline(FILE *fd) +get_line(FILE *fd) { static char *sp, line[BUFSIZ]; char *lp, *p; @@ -248,7 +248,7 @@ getConfig(FILE *fd, char *key, char **Ar else len = 0; state = 0; - while((lp = getline(fd)) != NULL) { + while((lp = get_line(fd)) != NULL) { for(; isspace((unsigned char)*lp); lp++) ; switch(state) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299361 - head/sys/compat/linuxkpi/common/include/asm
Author: hselasky Date: Tue May 10 11:34:22 2016 New Revision: 299361 URL: https://svnweb.freebsd.org/changeset/base/299361 Log: Add missing semicolon and properly wrap macro argument. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/asm/byteorder.h Modified: head/sys/compat/linuxkpi/common/include/asm/byteorder.h == --- head/sys/compat/linuxkpi/common/include/asm/byteorder.h Tue May 10 11:31:00 2016(r299360) +++ head/sys/compat/linuxkpi/common/include/asm/byteorder.h Tue May 10 11:34:22 2016(r299361) @@ -68,18 +68,18 @@ #definecpu_to_be16p(x) htobe16(*((const uint16_t *)(x))) #definebe16_to_cpup(x) be16toh(*((const uint16_t *)(x))) -#definecpu_to_le64s(x) do { *((uint64_t *)x) = cpu_to_le64p((x)) } while (0) -#definele64_to_cpus(x) do { *((uint64_t *)x) = le64_to_cpup((x)) } while (0) -#definecpu_to_le32s(x) do { *((uint32_t *)x) = cpu_to_le32p((x)) } while (0) -#definele32_to_cpus(x) do { *((uint32_t *)x) = le32_to_cpup((x)) } while (0) -#definecpu_to_le16s(x) do { *((uint16_t *)x) = cpu_to_le16p((x)) } while (0) -#definele16_to_cpus(x) do { *((uint16_t *)x) = le16_to_cpup((x)) } while (0) -#definecpu_to_be64s(x) do { *((uint64_t *)x) = cpu_to_be64p((x)) } while (0) -#definebe64_to_cpus(x) do { *((uint64_t *)x) = be64_to_cpup((x)) } while (0) -#definecpu_to_be32s(x) do { *((uint32_t *)x) = cpu_to_be32p((x)) } while (0) -#definebe32_to_cpus(x) do { *((uint32_t *)x) = be32_to_cpup((x)) } while (0) -#definecpu_to_be16s(x) do { *((uint16_t *)x) = cpu_to_be16p((x)) } while (0) -#definebe16_to_cpus(x) do { *((uint16_t *)x) = be16_to_cpup((x)) } while (0) +#definecpu_to_le64s(x) do { *((uint64_t *)(x)) = cpu_to_le64p((x)); } while (0) +#definele64_to_cpus(x) do { *((uint64_t *)(x)) = le64_to_cpup((x)); } while (0) +#definecpu_to_le32s(x) do { *((uint32_t *)(x)) = cpu_to_le32p((x)); } while (0) +#definele32_to_cpus(x) do { *((uint32_t *)(x)) = le32_to_cpup((x)); } while (0) +#definecpu_to_le16s(x) do { *((uint16_t *)(x)) = cpu_to_le16p((x)); } while (0) +#definele16_to_cpus(x) do { *((uint16_t *)(x)) = le16_to_cpup((x)); } while (0) +#definecpu_to_be64s(x) do { *((uint64_t *)(x)) = cpu_to_be64p((x)); } while (0) +#definebe64_to_cpus(x) do { *((uint64_t *)(x)) = be64_to_cpup((x)); } while (0) +#definecpu_to_be32s(x) do { *((uint32_t *)(x)) = cpu_to_be32p((x)); } while (0) +#definebe32_to_cpus(x) do { *((uint32_t *)(x)) = be32_to_cpup((x)); } while (0) +#definecpu_to_be16s(x) do { *((uint16_t *)(x)) = cpu_to_be16p((x)); } while (0) +#definebe16_to_cpus(x) do { *((uint16_t *)(x)) = be16_to_cpup((x)); } while (0) #defineswab16 bswap16 #defineswab32 bswap32 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299360 - head/sys/compat/linuxkpi/common/include/asm
Author: hselasky Date: Tue May 10 11:31:00 2016 New Revision: 299360 URL: https://svnweb.freebsd.org/changeset/base/299360 Log: Allow the argument for the cpu_to_xxxp() and xxx_to_cpup() macros to point to a constant. Obtained from:kmacy @ MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/asm/byteorder.h Modified: head/sys/compat/linuxkpi/common/include/asm/byteorder.h == --- head/sys/compat/linuxkpi/common/include/asm/byteorder.h Tue May 10 11:18:53 2016(r299359) +++ head/sys/compat/linuxkpi/common/include/asm/byteorder.h Tue May 10 11:31:00 2016(r299360) @@ -55,18 +55,18 @@ #definebe16_to_cpu be16toh #define__be16_to_cpu be16toh -#definecpu_to_le64p(x) htole64(*((uint64_t *)x)) -#definele64_to_cpup(x) le64toh(*((uint64_t *)x)) -#definecpu_to_le32p(x) htole32(*((uint32_t *)x)) -#definele32_to_cpup(x) le32toh(*((uint32_t *)x)) -#definecpu_to_le16p(x) htole16(*((uint16_t *)x)) -#definele16_to_cpup(x) le16toh(*((uint16_t *)x)) -#definecpu_to_be64p(x) htobe64(*((uint64_t *)x)) -#definebe64_to_cpup(x) be64toh(*((uint64_t *)x)) -#definecpu_to_be32p(x) htobe32(*((uint32_t *)x)) -#definebe32_to_cpup(x) be32toh(*((uint32_t *)x)) -#definecpu_to_be16p(x) htobe16(*((uint16_t *)x)) -#definebe16_to_cpup(x) be16toh(*((uint16_t *)x)) +#definecpu_to_le64p(x) htole64(*((const uint64_t *)(x))) +#definele64_to_cpup(x) le64toh(*((const uint64_t *)(x))) +#definecpu_to_le32p(x) htole32(*((const uint32_t *)(x))) +#definele32_to_cpup(x) le32toh(*((const uint32_t *)(x))) +#definecpu_to_le16p(x) htole16(*((const uint16_t *)(x))) +#definele16_to_cpup(x) le16toh(*((const uint16_t *)(x))) +#definecpu_to_be64p(x) htobe64(*((const uint64_t *)(x))) +#definebe64_to_cpup(x) be64toh(*((const uint64_t *)(x))) +#definecpu_to_be32p(x) htobe32(*((const uint32_t *)(x))) +#definebe32_to_cpup(x) be32toh(*((const uint32_t *)(x))) +#definecpu_to_be16p(x) htobe16(*((const uint16_t *)(x))) +#definebe16_to_cpup(x) be16toh(*((const uint16_t *)(x))) #definecpu_to_le64s(x) do { *((uint64_t *)x) = cpu_to_le64p((x)) } while (0) #definele64_to_cpus(x) do { *((uint64_t *)x) = le64_to_cpup((x)) } while (0) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299359 - head/usr.sbin/powerd
Author: bapt Date: Tue May 10 11:18:53 2016 New Revision: 299359 URL: https://svnweb.freebsd.org/changeset/base/299359 Log: Directly set the NONBLOCK flags when creating the socket No functional changes Modified: head/usr.sbin/powerd/powerd.c Modified: head/usr.sbin/powerd/powerd.c == --- head/usr.sbin/powerd/powerd.c Tue May 10 11:17:36 2016 (r299358) +++ head/usr.sbin/powerd/powerd.c Tue May 10 11:18:53 2016 (r299359) @@ -379,7 +379,7 @@ devd_init(void) struct sockaddr_un devd_addr; bzero(_addr, sizeof(devd_addr)); - if ((devd_pipe = socket(PF_LOCAL, SOCK_STREAM, 0)) < 0) { + if ((devd_pipe = socket(PF_LOCAL, SOCK_STREAM|SOCK_NONBLOCK, 0)) < 0) { if (vflag) warn("%s(): socket()", __func__); return (-1); @@ -396,13 +396,6 @@ devd_init(void) return (-1); } - if (fcntl(devd_pipe, F_SETFL, O_NONBLOCK) == -1) { - if (vflag) - warn("%s(): fcntl()", __func__); - close(devd_pipe); - return (-1); - } - return (devd_pipe); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299357 - in head/usr.sbin/lpr: common_source lpc
Author: bapt Date: Tue May 10 11:17:19 2016 New Revision: 299357 URL: https://svnweb.freebsd.org/changeset/base/299357 Log: Rename getline with get_line to avoid collision with getline(3) When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard Modified: head/usr.sbin/lpr/common_source/common.c head/usr.sbin/lpr/common_source/displayq.c head/usr.sbin/lpr/common_source/lp.h head/usr.sbin/lpr/common_source/rmjob.c head/usr.sbin/lpr/lpc/cmds.c Modified: head/usr.sbin/lpr/common_source/common.c == --- head/usr.sbin/lpr/common_source/common.cTue May 10 11:12:31 2016 (r299356) +++ head/usr.sbin/lpr/common_source/common.cTue May 10 11:17:19 2016 (r299357) @@ -80,12 +80,12 @@ static int compar(const void *_p1, const #defineisdigitch(Anychar) isdigit((u_char)(Anychar)) /* - * Getline reads a line from the control file cfp, removes tabs, converts + * get_line reads a line from the control file cfp, removes tabs, converts * new-line to null and leaves it in line. * Returns 0 at EOF or the number of characters read. */ int -getline(FILE *cfp) +get_line(FILE *cfp) { register int linel = 0; register char *lp = line; Modified: head/usr.sbin/lpr/common_source/displayq.c == --- head/usr.sbin/lpr/common_source/displayq.c Tue May 10 11:12:31 2016 (r299356) +++ head/usr.sbin/lpr/common_source/displayq.c Tue May 10 11:17:19 2016 (r299357) @@ -415,7 +415,7 @@ inform(const struct printer *pp, char *c file[0] = '\0'; savedname[0] = '\0'; jnum = calc_jobnum(cf, NULL); - while (getline(cfp)) { + while (get_line(cfp)) { switch (line[0]) { case 'P': /* Was this file specified in the user's list? */ if (!inlist(line+1, cf)) { @@ -445,7 +445,7 @@ inform(const struct printer *pp, char *c } copycnt++; /* -* deliberately 'continue' to another getline(), so +* deliberately 'continue' to another get_line(), so * all format-spec lines for this datafile are read * in and counted before calling show() */ Modified: head/usr.sbin/lpr/common_source/lp.h == --- head/usr.sbin/lpr/common_source/lp.hTue May 10 11:12:31 2016 (r299356) +++ head/usr.sbin/lpr/common_source/lp.hTue May 10 11:17:19 2016 (r299357) @@ -281,7 +281,7 @@ void fatal(const struct printer *_pp, c int firstprinter(struct printer *_pp, int *_error); voidfree_printer(struct printer *_pp); voidfree_request(struct request *_rp); -int getline(FILE *_cfp); +int get_line(FILE *_cfp); int getport(const struct printer *_pp, const char *_rhost, int _rport); int getprintcap(const char *_printer, struct printer *_pp); int getq(const struct printer *_pp, struct jobqueue *(*_namelist[])); Modified: head/usr.sbin/lpr/common_source/rmjob.c == --- head/usr.sbin/lpr/common_source/rmjob.c Tue May 10 11:12:31 2016 (r299356) +++ head/usr.sbin/lpr/common_source/rmjob.c Tue May 10 11:17:19 2016 (r299357) @@ -163,7 +163,7 @@ lockchk(struct printer *pp, char *slockf return(0); } PRIV_END - if (!getline(fp)) { + if (!get_line(fp)) { (void) fclose(fp); return(0); /* no daemon present */ } @@ -198,7 +198,7 @@ process(const struct printer *pp, char * if ((cfp = fopen(file, "r")) == NULL) fatal(pp, "cannot open %s", file); PRIV_END - while (getline(cfp)) { + while (get_line(cfp)) { switch (line[0]) { case 'U': /* unlink associated files */ if (strchr(line+1, '/') || strncmp(line+1, "df", 2)) @@ -251,7 +251,7 @@ chk(char *file) if ((cfp = fopen(file, "r")) == NULL) return(0); PRIV_END - while (getline(cfp)) { + while (get_line(cfp)) { if (line[0] == 'P') break; } Modified: head/usr.sbin/lpr/lpc/cmds.c == --- head/usr.sbin/lpr/lpc/cmds.cTue May 10 11:12:31 2016 (r299356) +++ head/usr.sbin/lpr/lpc/cmds.cTue May 10 11:17:19 2016 (r299357) @@ -306,7 +306,7 @@ kill_qtask(const char *lf) } /* If the lock file is empty, then there is no
svn commit: r299358 - head/usr.bin/rs
Author: bapt Date: Tue May 10 11:17:36 2016 New Revision: 299358 URL: https://svnweb.freebsd.org/changeset/base/299358 Log: Rename getline with get_line to avoid collision with getline(3) When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard Modified: head/usr.bin/rs/rs.c Modified: head/usr.bin/rs/rs.c == --- head/usr.bin/rs/rs.cTue May 10 11:17:19 2016(r299357) +++ head/usr.bin/rs/rs.cTue May 10 11:17:36 2016(r299358) @@ -93,7 +93,7 @@ static intowidth = 80, gutter = 2; static void getargs(int, char *[]); static void getfile(void); -static int getline(void); +static int get_line(void); static char *getlist(short **, char *); static char *getnum(int *, char *, int); static char**getptrs(char **); @@ -133,13 +133,13 @@ getfile(void) char **padto; while (skip--) { - c = getline(); + c = get_line(); if (flags & SKIPPRINT) puts(curline); if (c == EOF) return; } - getline(); + get_line(); if (flags & NOARGS && curlen < owidth) flags |= ONEPERLINE; if (flags & ONEPERLINE) @@ -184,7 +184,7 @@ getfile(void) INCR(ep); } } - } while (getline() != EOF); + } while (get_line() != EOF); *ep = 0;/* mark end of pointers */ nelem = ep - elem; } @@ -333,7 +333,7 @@ prepfile(void) static charibuf[BSIZE]; static int -getline(void) /* get line; maintain curline, curlen; manage storage */ +get_line(void) /* get line; maintain curline, curlen; manage storage */ { static int putlength; static char *endblock = ibuf + BSIZE; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299356 - in head: libexec/ftpd usr.bin/gencat usr.bin/uudecode usr.sbin/inetd usr.sbin/lpr/lpd
Author: bapt Date: Tue May 10 11:12:31 2016 New Revision: 299356 URL: https://svnweb.freebsd.org/changeset/base/299356 Log: Rename getline with get_line to avoid collision with getline(3) When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard Modified: head/libexec/ftpd/extern.h head/libexec/ftpd/ftpcmd.y head/libexec/ftpd/ftpd.c head/usr.bin/gencat/gencat.c head/usr.bin/uudecode/uudecode.c head/usr.sbin/inetd/builtins.c head/usr.sbin/lpr/lpd/printjob.c Modified: head/libexec/ftpd/extern.h == --- head/libexec/ftpd/extern.h Tue May 10 11:11:23 2016(r299355) +++ head/libexec/ftpd/extern.h Tue May 10 11:12:31 2016(r299356) @@ -42,7 +42,7 @@ void fatalerror(char *); voidftpd_logwtmp(char *, char *, struct sockaddr *addr); intftpd_pclose(FILE *); FILE *ftpd_popen(char *, char *); -intgetline(char *, int, FILE *); +intget_line(char *, int, FILE *); void lreply(int, const char *, ...) __printflike(2, 3); void makedir(char *); void nack(char *); Modified: head/libexec/ftpd/ftpcmd.y == --- head/libexec/ftpd/ftpcmd.y Tue May 10 11:11:23 2016(r299355) +++ head/libexec/ftpd/ftpcmd.y Tue May 10 11:12:31 2016(r299356) @@ -1158,10 +1158,10 @@ lookup(struct tab *p, char *cmd) #include /* - * getline - a hacked up version of fgets to ignore TELNET escape codes. + * get_line - a hacked up version of fgets to ignore TELNET escape codes. */ int -getline(char *s, int n, FILE *iop) +get_line(char *s, int n, FILE *iop) { int c; register char *cs; @@ -1280,7 +1280,7 @@ yylex(void) case CMD: (void) signal(SIGALRM, toolong); (void) alarm(timeout); - n = getline(cbuf, sizeof(cbuf)-1, stdin); + n = get_line(cbuf, sizeof(cbuf)-1, stdin); if (n == -1) { reply(221, "You could at least say goodbye."); dologout(0); Modified: head/libexec/ftpd/ftpd.c == --- head/libexec/ftpd/ftpd.cTue May 10 11:11:23 2016(r299355) +++ head/libexec/ftpd/ftpd.cTue May 10 11:12:31 2016(r299356) @@ -2820,7 +2820,7 @@ myoob(void) return (0); } cp = tmpline; - ret = getline(cp, 7, stdin); + ret = get_line(cp, 7, stdin); if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); Modified: head/usr.bin/gencat/gencat.c == --- head/usr.bin/gencat/gencat.cTue May 10 11:11:23 2016 (r299355) +++ head/usr.bin/gencat/gencat.cTue May 10 11:12:31 2016 (r299356) @@ -104,7 +104,7 @@ static long lineno = 0; static char *cskip(char *); static voiderror(const char *); -static char *getline(int); +static char *get_line(int); static char *getmsg(int, char *, char); static voidwarning(const char *, const char *); static char *wskip(char *); @@ -231,7 +231,7 @@ xstrdup(const char *str) } static char * -getline(int fd) +get_line(int fd) { static long curlen = BUFSIZ; static char buf[BUFSIZ], *bptr = buf, *bend = buf; @@ -334,7 +334,7 @@ getmsg(int fd, char *cptr, char quote) ++cptr; switch (*cptr) { case '\0': - cptr = getline(fd); + cptr = get_line(fd); if (!cptr) error("premature end of file"); msglen += strlen(cptr); @@ -394,7 +394,7 @@ MCParse(int fd) /* XXX: init sethead? */ - while ((cptr = getline(fd))) { + while ((cptr = get_line(fd))) { if (*cptr == '$') { ++cptr; if (strncmp(cptr, "set", 3) == 0) { Modified: head/usr.bin/uudecode/uudecode.c == --- head/usr.bin/uudecode/uudecode.cTue May 10 11:11:23 2016 (r299355) +++ head/usr.bin/uudecode/uudecode.cTue May 10 11:12:31 2016 (r299356) @@ -300,7 +300,7 @@ decode2(void) } static int -getline(char *buf, size_t size) +get_line(char *buf, size_t size) { if (fgets(buf, size, infp) != NULL) @@ -338,7 +338,7 @@ uu_decode(void) /* for each input line */ for (;;) { - switch (getline(buf, sizeof(buf))) { +
svn commit: r299355 - in head: bin/pax usr.bin/csplit usr.bin/ctags
Author: bapt Date: Tue May 10 11:11:23 2016 New Revision: 299355 URL: https://svnweb.freebsd.org/changeset/base/299355 Log: Rename getline with get_line to avoid collision with getline(3) When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard Obtained from:NetBSD Modified: head/bin/pax/options.c head/usr.bin/csplit/csplit.c head/usr.bin/ctags/C.c head/usr.bin/ctags/ctags.h head/usr.bin/ctags/fortran.c head/usr.bin/ctags/lisp.c head/usr.bin/ctags/print.c head/usr.bin/ctags/yacc.c Modified: head/bin/pax/options.c == --- head/bin/pax/options.c Tue May 10 11:09:26 2016(r299354) +++ head/bin/pax/options.c Tue May 10 11:11:23 2016(r299355) @@ -68,7 +68,7 @@ static int no_op(void); static void printflg(unsigned int); static int c_frmt(const void *, const void *); static off_t str_offt(char *); -static char *getline(FILE *fp); +static char *get_line(FILE *fp); static void pax_options(int, char **); static void pax_usage(void); static void tar_options(int, char **); @@ -76,10 +76,10 @@ static void tar_usage(void); static void cpio_options(int, char **); static void cpio_usage(void); -/* errors from getline */ +/* errors from get_line */ #define GETLINE_FILE_CORRUPT 1 #define GETLINE_OUT_OF_MEM 2 -static int getline_error; +static int get_line_error; char *chdname; @@ -873,14 +873,14 @@ tar_options(int argc, char **argv) paxwarn(1, "Unable to open file '%s' for read", file); tar_usage(); } - while ((str = getline(fp)) != NULL) { + while ((str = get_line(fp)) != NULL) { if (pat_add(str, dir) < 0) tar_usage(); sawpat = 1; } if (strcmp(file, "-") != 0) fclose(fp); - if (getline_error) { + if (get_line_error) { paxwarn(1, "Problem with file '%s'", file); tar_usage(); } @@ -946,13 +946,13 @@ tar_options(int argc, char **argv) paxwarn(1, "Unable to open file '%s' for read", file); tar_usage(); } - while ((str = getline(fp)) != NULL) { + while ((str = get_line(fp)) != NULL) { if (ftree_add(str, 0) < 0) tar_usage(); } if (strcmp(file, "-") != 0) fclose(fp); - if (getline_error) { + if (get_line_error) { paxwarn(1, "Problem with file '%s'", file); tar_usage(); @@ -1159,11 +1159,11 @@ cpio_options(int argc, char **argv) paxwarn(1, "Unable to open file '%s' for read", optarg); cpio_usage(); } - while ((str = getline(fp)) != NULL) { + while ((str = get_line(fp)) != NULL) { pat_add(str, NULL); } fclose(fp); - if (getline_error) { + if (get_line_error) { paxwarn(1, "Problem with file '%s'", optarg); cpio_usage(); } @@ -1258,10 +1258,10 @@ cpio_options(int argc, char **argv) * no read errors allowed on updates/append operation! */ maxflt = 0; - while ((str = getline(stdin)) != NULL) { + while ((str = get_line(stdin)) != NULL) { ftree_add(str, 0); } - if (getline_error) { + if (get_line_error) { paxwarn(1, "Problem while reading stdin");
svn commit: r299354 - head/contrib/pf/ftp-proxy
Author: bapt Date: Tue May 10 11:09:26 2016 New Revision: 299354 URL: https://svnweb.freebsd.org/changeset/base/299354 Log: Rename getline with get_line to avoid collision with getline(3) When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard Obtained from:OpenBSD Modified: head/contrib/pf/ftp-proxy/ftp-proxy.c Modified: head/contrib/pf/ftp-proxy/ftp-proxy.c == --- head/contrib/pf/ftp-proxy/ftp-proxy.c Tue May 10 10:26:07 2016 (r299353) +++ head/contrib/pf/ftp-proxy/ftp-proxy.c Tue May 10 11:09:26 2016 (r299354) @@ -103,7 +103,7 @@ voidclient_read(struct bufferevent *, v intdrop_privs(void); void end_session(struct session *); void exit_daemon(void); -intgetline(char *, size_t *); +intget_line(char *, size_t *); void handle_connection(const int, short, void *); void handle_signal(int, short, void *); struct session * init_session(void); @@ -249,7 +249,7 @@ client_read(struct bufferevent *bufev, v buf_avail); s->cbuf_valid += clientread; - while ((n = getline(s->cbuf, >cbuf_valid)) > 0) { + while ((n = get_line(s->cbuf, >cbuf_valid)) > 0) { logmsg(LOG_DEBUG, "#%d client: %s", s->id, linebuf); if (!client_parse(s)) { end_session(s); @@ -343,7 +343,7 @@ exit_daemon(void) } int -getline(char *buf, size_t *valid) +get_line(char *buf, size_t *valid) { size_t i; @@ -1087,7 +1087,7 @@ server_read(struct bufferevent *bufev, v buf_avail); s->sbuf_valid += srvread; - while ((n = getline(s->sbuf, >sbuf_valid)) > 0) { + while ((n = get_line(s->sbuf, >sbuf_valid)) > 0) { logmsg(LOG_DEBUG, "#%d server: %s", s->id, linebuf); if (!server_parse(s)) { end_session(s); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299353 - in head/sys: dev/acpica dev/hwpmc dev/ioat dev/xen/evtchn x86/xen
Author: trasz Date: Tue May 10 10:26:07 2016 New Revision: 299353 URL: https://svnweb.freebsd.org/changeset/base/299353 Log: Remove misc NULL checks after M_WAITOK allocations. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/acpica/acpi_perf.c head/sys/dev/hwpmc/hwpmc_piv.c head/sys/dev/ioat/ioat.c head/sys/dev/xen/evtchn/evtchn_dev.c head/sys/x86/xen/pv.c Modified: head/sys/dev/acpica/acpi_perf.c == --- head/sys/dev/acpica/acpi_perf.c Tue May 10 10:24:35 2016 (r299352) +++ head/sys/dev/acpica/acpi_perf.c Tue May 10 10:26:07 2016 (r299353) @@ -267,8 +267,6 @@ acpi_perf_evaluate(device_t dev) sc->px_states = malloc(sc->px_count * sizeof(struct acpi_px), M_ACPIPERF, M_WAITOK | M_ZERO); - if (sc->px_states == NULL) - goto out; /* * Each state is a package of {CoreFreq, Power, TransitionLatency, Modified: head/sys/dev/hwpmc/hwpmc_piv.c == --- head/sys/dev/hwpmc/hwpmc_piv.c Tue May 10 10:24:35 2016 (r299352) +++ head/sys/dev/hwpmc/hwpmc_piv.c Tue May 10 10:26:07 2016 (r299353) @@ -605,9 +605,6 @@ p4_pcpu_init(struct pmc_mdep *md, int cp p4c = malloc(sizeof(struct p4_cpu), M_PMC, M_WAITOK|M_ZERO); - if (p4c == NULL) - return (ENOMEM); - pc = pmc_pcpu[cpu]; KASSERT(pc != NULL, ("[p4,%d] cpu %d null per-cpu", __LINE__, cpu)); Modified: head/sys/dev/ioat/ioat.c == --- head/sys/dev/ioat/ioat.cTue May 10 10:24:35 2016(r299352) +++ head/sys/dev/ioat/ioat.cTue May 10 10:26:07 2016(r299353) @@ -464,8 +464,6 @@ ioat3_attach(device_t device) ioat->ring = malloc(num_descriptors * sizeof(*ring), M_IOAT, M_ZERO | M_WAITOK); - if (ioat->ring == NULL) - return (ENOMEM); ring = ioat->ring; for (i = 0; i < num_descriptors; i++) { Modified: head/sys/dev/xen/evtchn/evtchn_dev.c == --- head/sys/dev/xen/evtchn/evtchn_dev.cTue May 10 10:24:35 2016 (r299352) +++ head/sys/dev/xen/evtchn/evtchn_dev.cTue May 10 10:26:07 2016 (r299353) @@ -325,8 +325,6 @@ evtchn_write(struct cdev *dev, struct ui return (EINVAL); kbuf = malloc(PAGE_SIZE, M_EVTCHN, M_WAITOK); - if (kbuf == NULL) - return (ENOMEM); count = uio->uio_resid; /* Whole number of ports. */ Modified: head/sys/x86/xen/pv.c == --- head/sys/x86/xen/pv.c Tue May 10 10:24:35 2016(r299352) +++ head/sys/x86/xen/pv.c Tue May 10 10:26:07 2016(r299353) @@ -226,8 +226,6 @@ start_xen_ap(int cpu) bootAP = cpu; ctxt = malloc(sizeof(*ctxt), M_TEMP, M_WAITOK | M_ZERO); - if (ctxt == NULL) - panic("unable to allocate memory"); ctxt->flags = VGCF_IN_KERNEL; ctxt->user_regs.rip = (unsigned long) init_secondary; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299352 - head/sys/dev/mfi
Author: trasz Date: Tue May 10 10:24:35 2016 New Revision: 299352 URL: https://svnweb.freebsd.org/changeset/base/299352 Log: Remove NULL check after M_WAITOK allocations from mfi(4). MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/mfi/mfi.c Modified: head/sys/dev/mfi/mfi.c == --- head/sys/dev/mfi/mfi.c Tue May 10 10:21:03 2016(r299351) +++ head/sys/dev/mfi/mfi.c Tue May 10 10:24:35 2016(r299352) @@ -3230,10 +3230,6 @@ mfi_ioctl(struct cdev *dev, u_long cmd, (cm->cm_flags & (MFI_CMD_DATAIN | MFI_CMD_DATAOUT))) { cm->cm_data = data = malloc(cm->cm_len, M_MFIBUF, M_WAITOK | M_ZERO); - if (cm->cm_data == NULL) { - device_printf(sc->mfi_dev, "Malloc failed\n"); - goto out; - } } else { cm->cm_data = 0; } @@ -3527,10 +3523,6 @@ mfi_linux_ioctl_int(struct cdev *dev, u_ (cm->cm_flags & (MFI_CMD_DATAIN | MFI_CMD_DATAOUT))) { cm->cm_data = data = malloc(cm->cm_len, M_MFIBUF, M_WAITOK | M_ZERO); - if (cm->cm_data == NULL) { - device_printf(sc->mfi_dev, "Malloc failed\n"); - goto out; - } } else { cm->cm_data = 0; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299351 - head/sys/dev/firewire
Author: trasz Date: Tue May 10 10:21:03 2016 New Revision: 299351 URL: https://svnweb.freebsd.org/changeset/base/299351 Log: Remove NULL checks after M_WAITOK allocations from firewire. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/firewire/fwdev.c head/sys/dev/firewire/fwdma.c head/sys/dev/firewire/fwmem.c head/sys/dev/firewire/fwohci.c head/sys/dev/firewire/if_fwe.c Modified: head/sys/dev/firewire/fwdev.c == --- head/sys/dev/firewire/fwdev.c Tue May 10 09:58:51 2016 (r299350) +++ head/sys/dev/firewire/fwdev.c Tue May 10 10:21:03 2016 (r299351) @@ -102,8 +102,6 @@ fwdev_allocbuf(struct firewire_comm *fc, q->bulkxfer = malloc(sizeof(struct fw_bulkxfer) * b->nchunk, M_FW, M_WAITOK); - if (q->bulkxfer == NULL) - return (ENOMEM); b->psize = roundup2(b->psize, sizeof(uint32_t)); q->buf = fwdma_malloc_multiseg(fc, sizeof(uint32_t), @@ -179,8 +177,6 @@ fw_open(struct cdev *dev, int flags, int FW_GUNLOCK(sc->fc); dev->si_drv1 = malloc(sizeof(struct fw_drv1), M_FW, M_WAITOK | M_ZERO); - if (dev->si_drv1 == NULL) - return (ENOMEM); if ((dev->si_flags & SI_NAMED) == 0) { int unit = DEV2UNIT(dev); @@ -742,10 +738,6 @@ out: break; } fwb = malloc(sizeof(struct fw_bind), M_FW, M_WAITOK); - if (fwb == NULL) { - err = ENOMEM; - break; - } fwb->start = ((u_int64_t)bindreq->start.hi << 32) | bindreq->start.lo; fwb->end = fwb->start + bindreq->len; Modified: head/sys/dev/firewire/fwdma.c == --- head/sys/dev/firewire/fwdma.c Tue May 10 09:58:51 2016 (r299350) +++ head/sys/dev/firewire/fwdma.c Tue May 10 10:21:03 2016 (r299351) @@ -160,10 +160,6 @@ fwdma_malloc_multiseg(struct firewire_co } am = (struct fwdma_alloc_multi *)malloc(sizeof(struct fwdma_alloc_multi) + sizeof(struct fwdma_seg)*nseg, M_FW, M_WAITOK); - if (am == NULL) { - printf("fwdma_malloc_multiseg: malloc failed\n"); - return (NULL); - } am->ssize = ssize; am->esize = esize; am->nseg = 0; Modified: head/sys/dev/firewire/fwmem.c == --- head/sys/dev/firewire/fwmem.c Tue May 10 09:58:51 2016 (r299350) +++ head/sys/dev/firewire/fwmem.c Tue May 10 10:21:03 2016 (r299351) @@ -287,8 +287,6 @@ fwmem_open(struct cdev *dev, int flags, FW_GUNLOCK(sc->fc); dev->si_drv1 = malloc(sizeof(struct fwmem_softc), M_FWMEM, M_WAITOK); - if (dev->si_drv1 == NULL) - return (ENOMEM); dev->si_iosize_max = DFLTPHYS; fms = dev->si_drv1; bcopy(_eui64, >eui, sizeof(struct fw_eui64)); Modified: head/sys/dev/firewire/fwohci.c == --- head/sys/dev/firewire/fwohci.c Tue May 10 09:58:51 2016 (r299350) +++ head/sys/dev/firewire/fwohci.c Tue May 10 10:21:03 2016 (r299351) @@ -1247,10 +1247,6 @@ fwohci_db_init(struct fwohci_softc *sc, db_tr = (struct fwohcidb_tr *) malloc(sizeof(struct fwohcidb_tr) * dbch->ndb, M_FW, M_WAITOK | M_ZERO); - if (db_tr == NULL) { - printf("fwohci_db_init: malloc(1) failed\n"); - return; - } #define DB_SIZE(x) (sizeof(struct fwohcidb) * (x)->ndesc) dbch->am = fwdma_malloc_multiseg(>fc, sizeof(struct fwohcidb), Modified: head/sys/dev/firewire/if_fwe.c == --- head/sys/dev/firewire/if_fwe.c Tue May 10 09:58:51 2016 (r299350) +++ head/sys/dev/firewire/if_fwe.c Tue May 10 10:21:03 2016 (r299351) @@ -307,10 +307,6 @@ fwe_init(void *arg) xferq->bulkxfer = (struct fw_bulkxfer *) malloc( sizeof(struct fw_bulkxfer) * xferq->bnchunk, M_FWE, M_WAITOK); - if (xferq->bulkxfer == NULL) { - printf("if_fwe: malloc failed\n"); - return; - } STAILQ_INIT(>stvalid); STAILQ_INIT(>stfree); STAILQ_INIT(>stdma); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to
svn commit: r299350 - head/sys/amd64/include
Author: kib Date: Tue May 10 09:58:51 2016 New Revision: 299350 URL: https://svnweb.freebsd.org/changeset/base/299350 Log: Add locking annotations to amd64 struct md_page members. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/amd64/include/pmap.h Modified: head/sys/amd64/include/pmap.h == --- head/sys/amd64/include/pmap.h Tue May 10 08:44:44 2016 (r299349) +++ head/sys/amd64/include/pmap.h Tue May 10 09:58:51 2016 (r299350) @@ -284,9 +284,13 @@ extern pt_entry_t pg_nx; struct pv_entry; struct pv_chunk; +/* + * Locks + * (p) PV list lock + */ struct md_page { - TAILQ_HEAD(,pv_entry) pv_list; - int pv_gen; + TAILQ_HEAD(, pv_entry) pv_list; /* (p) */ + int pv_gen; /* (p) */ int pat_mode; }; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299349 - in head/etc: . rc.d
Author: trasz Date: Tue May 10 08:44:44 2016 New Revision: 299349 URL: https://svnweb.freebsd.org/changeset/base/299349 Log: Refactor the root mount hold code and add the wait to etc/rc.d/fsck. This fixes mounting (non-root) USB drives on boot with fsck enabled (with non-zero 'Pass#' field in fstab(5)). Reported by: Graham Menhennitt Reviewed by: jilles@ MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D6221 Modified: head/etc/rc.d/fsck head/etc/rc.d/mountcritlocal head/etc/rc.subr Modified: head/etc/rc.d/fsck == --- head/etc/rc.d/fsck Tue May 10 08:37:41 2016(r299348) +++ head/etc/rc.d/fsck Tue May 10 08:44:44 2016(r299349) @@ -31,7 +31,21 @@ fsck_start() fsck -p fi - case $? in + err=$? + if [ ${err} -eq 3 ]; then + echo "Warning! Some of the devices might not be" \ + "available; retrying" + root_hold_wait + check_startmsgs && echo "Restarting file system checks:" + if checkyesno background_fsck; then + fsck -F -p + else + fsck -p + fi + err=$? + fi + + case ${err} in 0) ;; 2) @@ -68,7 +82,7 @@ fsck_start() stop_boot ;; *) - echo "Unknown error; help!" + echo "Unknown error ${err}; help!" stop_boot ;; esac Modified: head/etc/rc.d/mountcritlocal == --- head/etc/rc.d/mountcritlocalTue May 10 08:37:41 2016 (r299348) +++ head/etc/rc.d/mountcritlocalTue May 10 08:44:44 2016 (r299349) @@ -37,37 +37,12 @@ mountcritlocal_start() done mount_excludes=${mount_excludes%,} - # Originally, root mount hold had to be released before mounting - # the root filesystem. This delayed the boot, so it was changed - # to only wait if the root device isn't readily available. This - # can result in this script executing before all the devices - such - # as graid(8) - are available. Thus, should the mount fail, - # we will wait for the root mount hold release and retry. mount -a -t ${mount_excludes} err=$? if [ ${err} -ne 0 ]; then - echo echo 'Mounting /etc/fstab filesystems failed,' \ 'will retry after root mount hold release' - - waited=0 - while [ ${waited} -lt ${root_hold_delay} ]; do - holders="$(sysctl -n vfs.root_mount_hold)" - if [ -z "${holders}" ]; then - break; - fi - if [ ${waited} -eq 0 ]; then - echo -n "Waiting ${root_hold_delay}s" \ - "for the root mount holders: ${holders}" - else - echo -n . - fi - if [ ${waited} -eq ${root_hold_delay} ]; then - break 2 - fi - sleep 1 - waited=$(($waited + 1)) - done + root_hold_wait mount -a -t ${mount_excludes} err=$? fi Modified: head/etc/rc.subr == --- head/etc/rc.subrTue May 10 08:37:41 2016(r299348) +++ head/etc/rc.subrTue May 10 08:44:44 2016(r299349) @@ -1954,6 +1954,37 @@ geli_make_list() echo ${devices2} } +# Originally, root mount hold had to be released before mounting +# the root filesystem. This delayed the boot, so it was changed +# to only wait if the root device isn't readily available. This +# can result in rc scripts executing before all the devices - such +# as graid(8), or USB disks - can be accessed. This function can +# be used to explicitly wait for root mount holds to be released. +root_hold_wait() +{ + local wait waited holders + + waited=0 + while true; do + holders="$(sysctl -n vfs.root_mount_hold)" + if [ -z "${holders}" ]; then + break; + fi + if [ ${waited} -eq 0 ]; then + echo -n "Waiting ${root_hold_delay}s" \ + "for the root mount holders:
svn commit: r299348 - head/sys/cam/ctl
Author: mav Date: Tue May 10 08:37:41 2016 New Revision: 299348 URL: https://svnweb.freebsd.org/changeset/base/299348 Log: Fix previous commit to report proper error code. MFC after:2 weeks Modified: head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl_tpc.c == --- head/sys/cam/ctl/ctl_tpc.c Tue May 10 08:28:16 2016(r299347) +++ head/sys/cam/ctl/ctl_tpc.c Tue May 10 08:37:41 2016(r299348) @@ -1104,11 +1104,11 @@ tpc_ranges_length(struct scsi_range_desc } static int -tpc_check_ranges(struct scsi_range_desc *range, int nrange, uint64_t maxlba) +tpc_check_ranges_l(struct scsi_range_desc *range, int nrange, uint64_t maxlba) { - uint64_t b1, b2; - uint32_t l1, l2; - int i, j; + uint64_t b1; + uint32_t l1; + int i; for (i = 0; i < nrange; i++) { b1 = scsi_8btou64(range[i].lba); @@ -1116,6 +1116,16 @@ tpc_check_ranges(struct scsi_range_desc if (b1 + l1 < b1 || b1 + l1 > maxlba + 1) return (-1); } + return (0); +} + +static int +tpc_check_ranges_x(struct scsi_range_desc *range, int nrange) +{ + uint64_t b1, b2; + uint32_t l1, l2; + int i, j; + for (i = 0; i < nrange - 1; i++) { b1 = scsi_8btou64(range[i].lba); l1 = scsi_4btoul(range[i].length); @@ -2019,10 +2029,16 @@ ctl_populate_token(struct ctl_scsiio *ct } /* Validate list of ranges */ - if (tpc_check_ranges(>desc[0], + if (tpc_check_ranges_l(>desc[0], scsi_2btoul(data->range_descriptor_length) / sizeof(struct scsi_range_desc), lun->be_lun->maxlba) != 0) { + ctl_set_lba_out_of_range(ctsio); + goto done; + } + if (tpc_check_ranges_x(>desc[0], + scsi_2btoul(data->range_descriptor_length) / + sizeof(struct scsi_range_desc)) != 0) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 0, /*command*/ 0, /*field*/ 0, /*bit_valid*/ 0, /*bit*/ 0); @@ -2161,10 +2177,16 @@ ctl_write_using_token(struct ctl_scsiio */ /* Validate list of ranges */ - if (tpc_check_ranges(>desc[0], + if (tpc_check_ranges_l(>desc[0], scsi_2btoul(data->range_descriptor_length) / sizeof(struct scsi_range_desc), lun->be_lun->maxlba) != 0) { + ctl_set_lba_out_of_range(ctsio); + goto done; + } + if (tpc_check_ranges_x(>desc[0], + scsi_2btoul(data->range_descriptor_length) / + sizeof(struct scsi_range_desc)) != 0) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 0, /*command*/ 0, /*field*/ 0, /*bit_valid*/ 0, /*bit*/ 0); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299347 - head/sys/cam/ctl
Author: mav Date: Tue May 10 08:28:16 2016 New Revision: 299347 URL: https://svnweb.freebsd.org/changeset/base/299347 Log: Validate XCOPY range offsets and lengths. MFC after:2 weeks Modified: head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl_tpc.c == --- head/sys/cam/ctl/ctl_tpc.c Tue May 10 08:08:39 2016(r299346) +++ head/sys/cam/ctl/ctl_tpc.c Tue May 10 08:28:16 2016(r299347) @@ -1104,12 +1104,18 @@ tpc_ranges_length(struct scsi_range_desc } static int -tpc_check_ranges(struct scsi_range_desc *range, int nrange) +tpc_check_ranges(struct scsi_range_desc *range, int nrange, uint64_t maxlba) { uint64_t b1, b2; uint32_t l1, l2; int i, j; + for (i = 0; i < nrange; i++) { + b1 = scsi_8btou64(range[i].lba); + l1 = scsi_4btoul(range[i].length); + if (b1 + l1 < b1 || b1 + l1 > maxlba + 1) + return (-1); + } for (i = 0; i < nrange - 1; i++) { b1 = scsi_8btou64(range[i].lba); l1 = scsi_4btoul(range[i].length); @@ -2015,7 +2021,8 @@ ctl_populate_token(struct ctl_scsiio *ct /* Validate list of ranges */ if (tpc_check_ranges(>desc[0], scsi_2btoul(data->range_descriptor_length) / - sizeof(struct scsi_range_desc))) { + sizeof(struct scsi_range_desc), + lun->be_lun->maxlba) != 0) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 0, /*command*/ 0, /*field*/ 0, /*bit_valid*/ 0, /*bit*/ 0); @@ -2156,7 +2163,8 @@ ctl_write_using_token(struct ctl_scsiio /* Validate list of ranges */ if (tpc_check_ranges(>desc[0], scsi_2btoul(data->range_descriptor_length) / - sizeof(struct scsi_range_desc))) { + sizeof(struct scsi_range_desc), + lun->be_lun->maxlba) != 0) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 0, /*command*/ 0, /*field*/ 0, /*bit_valid*/ 0, /*bit*/ 0); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299346 - head/sys/cam/ctl
Author: mav Date: Tue May 10 08:08:39 2016 New Revision: 299346 URL: https://svnweb.freebsd.org/changeset/base/299346 Log: More XCOPY parameters validation. MFC after:2 weeks Modified: head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl_tpc.c == --- head/sys/cam/ctl/ctl_tpc.c Tue May 10 08:00:40 2016(r299345) +++ head/sys/cam/ctl/ctl_tpc.c Tue May 10 08:08:39 2016(r299346) @@ -1104,6 +1104,26 @@ tpc_ranges_length(struct scsi_range_desc } static int +tpc_check_ranges(struct scsi_range_desc *range, int nrange) +{ + uint64_t b1, b2; + uint32_t l1, l2; + int i, j; + + for (i = 0; i < nrange - 1; i++) { + b1 = scsi_8btou64(range[i].lba); + l1 = scsi_4btoul(range[i].length); + for (j = i + 1; j < nrange; j++) { + b2 = scsi_8btou64(range[j].lba); + l2 = scsi_4btoul(range[j].length); + if (b1 + l1 > b2 && b2 + l2 > b1) + return (-1); + } + } + return (0); +} + +static int tpc_skip_ranges(struct scsi_range_desc *range, int nrange, off_t skip, int *srange, off_t *soffset) { @@ -1992,6 +2012,16 @@ ctl_populate_token(struct ctl_scsiio *ct goto done; } + /* Validate list of ranges */ + if (tpc_check_ranges(>desc[0], + scsi_2btoul(data->range_descriptor_length) / + sizeof(struct scsi_range_desc))) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 0, + /*command*/ 0, /*field*/ 0, /*bit_valid*/ 0, + /*bit*/ 0); + goto done; + } + list = malloc(sizeof(struct tpc_list), M_CTL, M_WAITOK | M_ZERO); list->service_action = cdb->service_action; list->init_port = ctsio->io_hdr.nexus.targ_port; @@ -2065,7 +2095,7 @@ ctl_write_using_token(struct ctl_scsiio struct ctl_lun *lun; struct tpc_list *list, *tlist; struct tpc_token *token; - int len, lendesc; + int len, lendata, lendesc; CTL_DEBUG_PRINT(("ctl_write_using_token\n")); @@ -2074,8 +2104,8 @@ ctl_write_using_token(struct ctl_scsiio cdb = (struct scsi_write_using_token *)ctsio->cdb; len = scsi_4btoul(cdb->length); - if (len < sizeof(struct scsi_populate_token_data) || - len > sizeof(struct scsi_populate_token_data) + + if (len < sizeof(struct scsi_write_using_token_data) || + len > sizeof(struct scsi_write_using_token_data) + TPC_MAX_SEGS * sizeof(struct scsi_range_desc)) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, /*field*/ 9, /*bit_valid*/ 0, /*bit*/ 0); @@ -2101,10 +2131,19 @@ ctl_write_using_token(struct ctl_scsiio } data = (struct scsi_write_using_token_data *)ctsio->kern_data_ptr; + lendata = scsi_2btoul(data->length); + if (lendata < sizeof(struct scsi_write_using_token_data) - 2 + + sizeof(struct scsi_range_desc)) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 0, + /*field*/ 0, /*bit_valid*/ 0, /*bit*/ 0); + goto done; + } lendesc = scsi_2btoul(data->range_descriptor_length); - if (len < sizeof(struct scsi_populate_token_data) + lendesc) { + if (lendesc < sizeof(struct scsi_range_desc) || + len < sizeof(struct scsi_write_using_token_data) + lendesc || + lendata < sizeof(struct scsi_write_using_token_data) - 2 + lendesc) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 0, - /*field*/ 2, /*bit_valid*/ 0, /*bit*/ 0); + /*field*/ 534, /*bit_valid*/ 0, /*bit*/ 0); goto done; } /* @@ -2113,6 +2152,17 @@ ctl_write_using_token(struct ctl_scsiio data->flags, scsi_8btou64(data->offset_into_rod), scsi_2btoul(data->range_descriptor_length)); */ + + /* Validate list of ranges */ + if (tpc_check_ranges(>desc[0], + scsi_2btoul(data->range_descriptor_length) / + sizeof(struct scsi_range_desc))) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 0, + /*command*/ 0, /*field*/ 0, /*bit_valid*/ 0, + /*bit*/ 0); + goto done; + } + list = malloc(sizeof(struct tpc_list), M_CTL, M_WAITOK | M_ZERO); list->service_action = cdb->service_action; list->init_port = ctsio->io_hdr.nexus.targ_port; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299345 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 08:00:40 2016 New Revision: 299345 URL: https://svnweb.freebsd.org/changeset/base/299345 Log: sfxge(4): cleanup: fix typo Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/hunt_vpd.c Modified: head/sys/dev/sfxge/common/hunt_vpd.c == --- head/sys/dev/sfxge/common/hunt_vpd.cTue May 10 07:59:23 2016 (r299344) +++ head/sys/dev/sfxge/common/hunt_vpd.cTue May 10 08:00:40 2016 (r299345) @@ -74,7 +74,7 @@ ef10_vpd_init( tag, , _size); if (rc != 0) { if (rc == EACCES) { - /* Unpriviledged functions cannot access VPD */ + /* Unprivileged functions cannot access VPD */ goto out; } goto fail1; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299344 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:59:23 2016 New Revision: 299344 URL: https://svnweb.freebsd.org/changeset/base/299344 Log: sfxge(4): cleanup: remove unneeded include files Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/medford_nic.c Modified: head/sys/dev/sfxge/common/efx_impl.h == --- head/sys/dev/sfxge/common/efx_impl.hTue May 10 07:52:17 2016 (r299343) +++ head/sys/dev/sfxge/common/efx_impl.hTue May 10 07:59:23 2016 (r299344) @@ -33,8 +33,6 @@ #ifndef_SYS_EFX_IMPL_H #define_SYS_EFX_IMPL_H -#include "efsys.h" -#include "efx_check.h" #include "efx.h" #include "efx_regs.h" #include "efx_regs_ef10.h" Modified: head/sys/dev/sfxge/common/medford_nic.c == --- head/sys/dev/sfxge/common/medford_nic.c Tue May 10 07:52:17 2016 (r299343) +++ head/sys/dev/sfxge/common/medford_nic.c Tue May 10 07:59:23 2016 (r299344) @@ -33,11 +33,9 @@ __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" -#include "mcdi_mon.h" -#if EFSYS_OPT_MEDFORD -#include "ef10_tlv_layout.h" +#if EFSYS_OPT_MEDFORD static __checkReturn efx_rc_t efx_mcdi_get_rxdp_config( ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299343 - head/cddl/contrib/opensolaris/lib/libdtrace/common
Author: bapt Date: Tue May 10 07:52:17 2016 New Revision: 299343 URL: https://svnweb.freebsd.org/changeset/base/299343 Log: Rename dprintf into dbg_printf to avoid collision with dprintf(3) When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added. This rename is made in preparation for the removal of this guard Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c == --- head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue May 10 07:50:57 2016(r299342) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue May 10 07:52:17 2016(r299343) @@ -65,7 +65,7 @@ extern dof_hdr_t __SUNW_dof; /* DOF defi static boolean_t dof_init_debug = B_FALSE; /* From DTRACE_DOF_INIT_DEBUG */ static void -dprintf(int debug, const char *fmt, ...) +dbg_printf(int debug, const char *fmt, ...) { va_list ap; @@ -119,13 +119,13 @@ dtrace_dof_init(void) dof_init_debug = B_TRUE; if (dlinfo(RTLD_SELF, RTLD_DI_LINKMAP, ) == -1 || lmp == NULL) { - dprintf(1, "couldn't discover module name or address\n"); + dbg_printf(1, "couldn't discover module name or address\n"); return; } #ifdef illumos if (dlinfo(RTLD_SELF, RTLD_DI_LMID, ) == -1) { - dprintf(1, "couldn't discover link map ID\n"); + dbg_printf(1, "couldn't discover link map ID\n"); return; } #endif @@ -139,7 +139,7 @@ dtrace_dof_init(void) dof->dofh_ident[DOF_ID_MAG1] != DOF_MAG_MAG1 || dof->dofh_ident[DOF_ID_MAG2] != DOF_MAG_MAG2 || dof->dofh_ident[DOF_ID_MAG3] != DOF_MAG_MAG3) { - dprintf(0, ".SUNW_dof section corrupt\n"); + dbg_printf(0, ".SUNW_dof section corrupt\n"); return; } @@ -163,7 +163,7 @@ dtrace_dof_init(void) devnamep = p; if ((fd = open64(devnamep, O_RDWR)) < 0) { - dprintf(1, "failed to open helper device %s", devnamep); + dbg_printf(1, "failed to open helper device %s", devnamep); #ifdef illumos /* * If the device path wasn't explicitly set, try again with @@ -175,7 +175,7 @@ dtrace_dof_init(void) devnamep = olddevname; if ((fd = open64(devnamep, O_RDWR)) < 0) { - dprintf(1, "failed to open helper device %s", devnamep); + dbg_printf(1, "failed to open helper device %s", devnamep); return; } #else @@ -183,9 +183,9 @@ dtrace_dof_init(void) #endif } if ((gen = ioctl(fd, DTRACEHIOC_ADDDOF, )) == -1) - dprintf(1, "DTrace ioctl failed for DOF at %p", dof); + dbg_printf(1, "DTrace ioctl failed for DOF at %p", dof); else { - dprintf(1, "DTrace ioctl succeeded for DOF at %p\n", dof); + dbg_printf(1, "DTrace ioctl succeeded for DOF at %p\n", dof); #ifdef __FreeBSD__ gen = dh.dofhp_gen; #endif @@ -206,14 +206,14 @@ dtrace_dof_fini(void) int fd; if ((fd = open64(devnamep, O_RDWR)) < 0) { - dprintf(1, "failed to open helper device %s", devnamep); + dbg_printf(1, "failed to open helper device %s", devnamep); return; } if ((gen = ioctl(fd, DTRACEHIOC_REMOVE, )) == -1) - dprintf(1, "DTrace ioctl failed to remove DOF (%d)\n", gen); + dbg_printf(1, "DTrace ioctl failed to remove DOF (%d)\n", gen); else - dprintf(1, "DTrace ioctl removed DOF (%d)\n", gen); + dbg_printf(1, "DTrace ioctl removed DOF (%d)\n", gen); (void) close(fd); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299342 - head/cddl/compat/opensolaris/misc
Author: bapt Date: Tue May 10 07:50:57 2016 New Revision: 299342 URL: https://svnweb.freebsd.org/changeset/base/299342 Log: rename getline into zgetline to avoid collision with getline(3) When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard Obtained from:NetBSD Modified: head/cddl/compat/opensolaris/misc/fsshare.c Modified: head/cddl/compat/opensolaris/misc/fsshare.c == --- head/cddl/compat/opensolaris/misc/fsshare.c Tue May 10 07:45:44 2016 (r299341) +++ head/cddl/compat/opensolaris/misc/fsshare.c Tue May 10 07:50:57 2016 (r299342) @@ -69,7 +69,7 @@ restart_mountd(void) * mountpoint specified in the 'skip' argument. */ static char * -getline(FILE *fd, const char *skip) +zgetline(FILE *fd, const char *skip) { static char line[MAXLINESIZE]; size_t len, skiplen; @@ -200,7 +200,7 @@ fsshare_main(const char *file, const cha /* Place big, fat warning at the begining of the file. */ fprintf(newfd, "%s", FILE_HEADER); - while (oldfd != NULL && (line = getline(oldfd, mountpoint)) != NULL) + while (oldfd != NULL && (line = zgetline(oldfd, mountpoint)) != NULL) fprintf(newfd, "%s\n", line); if (oldfd != NULL && ferror(oldfd) != 0) { error = ferror(oldfd); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299341 - head/lib/libc/net
Author: bapt Date: Tue May 10 07:45:44 2016 New Revision: 299341 URL: https://svnweb.freebsd.org/changeset/base/299341 Log: Rename dprintf into dbg_printf to avoid collision with dprintf(3) When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added. This rename is made in preparation for the removal of this guard Modified: head/lib/libc/net/gethostbydns.c Modified: head/lib/libc/net/gethostbydns.c == --- head/lib/libc/net/gethostbydns.cTue May 10 07:42:18 2016 (r299340) +++ head/lib/libc/net/gethostbydns.cTue May 10 07:45:44 2016 (r299341) @@ -87,7 +87,7 @@ static void addrsort(char **, int, res_s #endif #ifdef DEBUG -static void dprintf(char *, int, res_state) __printflike(1, 0); +static void dbg_printf(char *, int, res_state) __printflike(1, 0); #endif #define MAXPACKET (64*1024) @@ -106,7 +106,7 @@ int _dns_ttl_; #ifdef DEBUG static void -dprintf(char *msg, int num, res_state res) +dbg_printf(char *msg, int num, res_state res) { if (res->options & RES_DEBUG) { int save = errno; @@ -116,7 +116,7 @@ dprintf(char *msg, int num, res_state re } } #else -# define dprintf(msg, num, res) /*nada*/ +# define dbg_printf(msg, num, res) /*nada*/ #endif #define BOUNDED_INCR(x) \ @@ -369,13 +369,13 @@ gethostanswer(const querybuf *answer, in bp += sizeof(align) - ((u_long)bp % sizeof(align)); if (bp + n >= ep) { - dprintf("size (%d) too big\n", n, statp); + dbg_printf("size (%d) too big\n", n, statp); had_error++; continue; } if (hap >= >h_addr_ptrs[_MAXADDRS-1]) { if (!toobig++) - dprintf("Too many addresses (%d)\n", + dbg_printf("Too many addresses (%d)\n", _MAXADDRS, statp); cp += n; continue; @@ -389,7 +389,7 @@ gethostanswer(const querybuf *answer, in } break; default: - dprintf("Impossible condition (type=%d)\n", type, + dbg_printf("Impossible condition (type=%d)\n", type, statp); RES_SET_H_ERRNO(statp, NO_RECOVERY); return (-1); @@ -516,12 +516,12 @@ _dns_gethostbyname(void *rval, void *cb_ n = res_nsearch(statp, name, C_IN, type, buf->buf, sizeof(buf->buf)); if (n < 0) { free(buf); - dprintf("res_nsearch failed (%d)\n", n, statp); + dbg_printf("res_nsearch failed (%d)\n", n, statp); *h_errnop = statp->res_h_errno; return (NS_NOTFOUND); } else if (n > sizeof(buf->buf)) { free(buf); - dprintf("static buffer is too small (%d)\n", n, statp); + dbg_printf("static buffer is too small (%d)\n", n, statp); *h_errnop = statp->res_h_errno; return (NS_UNAVAIL); } @@ -623,13 +623,13 @@ _dns_gethostbyaddr(void *rval, void *cb_ sizeof buf->buf); if (n < 0) { free(buf); - dprintf("res_nquery failed (%d)\n", n, statp); + dbg_printf("res_nquery failed (%d)\n", n, statp); *h_errnop = statp->res_h_errno; return (NS_UNAVAIL); } if (n > sizeof buf->buf) { free(buf); - dprintf("static buffer is too small (%d)\n", n, statp); + dbg_printf("static buffer is too small (%d)\n", n, statp); *h_errnop = statp->res_h_errno; return (NS_UNAVAIL); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299340 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:42:18 2016 New Revision: 299340 URL: https://svnweb.freebsd.org/changeset/base/299340 Log: sfxge(4): cleanup: remove unused efx_infer_family() Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_nic.c Modified: head/sys/dev/sfxge/common/efx.h == --- head/sys/dev/sfxge/common/efx.h Tue May 10 07:40:03 2016 (r299339) +++ head/sys/dev/sfxge/common/efx.h Tue May 10 07:42:18 2016 (r299340) @@ -72,10 +72,6 @@ efx_family( __inuint16_t devid, __out efx_family_t *efp); -extern __checkReturn efx_rc_t -efx_infer_family( - __inefsys_bar_t *esbp, - __out efx_family_t *efp); #defineEFX_PCI_VENID_SFC 0x1924 Modified: head/sys/dev/sfxge/common/efx_nic.c == --- head/sys/dev/sfxge/common/efx_nic.c Tue May 10 07:40:03 2016 (r299339) +++ head/sys/dev/sfxge/common/efx_nic.c Tue May 10 07:42:18 2016 (r299340) @@ -105,59 +105,6 @@ efx_family( return (ENOTSUP); } -/* - * To support clients which aren't provided with any PCI context infer - * the hardware family by inspecting the hardware. Obviously the caller - * must be damn sure they're really talking to a supported device. - */ - __checkReturn efx_rc_t -efx_infer_family( - __inefsys_bar_t *esbp, - __out efx_family_t *efp) -{ - efx_family_t family; - efx_oword_t oword; - unsigned int portnum; - efx_rc_t rc; - - EFSYS_BAR_READO(esbp, FR_AZ_CS_DEBUG_REG_OFST, , B_TRUE); - portnum = EFX_OWORD_FIELD(oword, FRF_CZ_CS_PORT_NUM); - if ((portnum == 1) || (portnum == 2)) { -#if EFSYS_OPT_SIENA - family = EFX_FAMILY_SIENA; - goto out; -#endif - } else if (portnum == 0) { - efx_dword_t dword; - uint32_t hw_rev; - - EFSYS_BAR_READD(esbp, ER_DZ_BIU_HW_REV_ID_REG_OFST, , - B_TRUE); - hw_rev = EFX_DWORD_FIELD(dword, ERF_DZ_HW_REV_ID); - if (hw_rev == ER_DZ_BIU_HW_REV_ID_REG_RESET) { -#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD - /* -* BIU_HW_REV_ID is the same for Huntington and Medford. -* Assume Huntington, as Medford is very similar. -*/ - family = EFX_FAMILY_HUNTINGTON; - goto out; -#endif - } - } - rc = ENOTSUP; - goto fail1; - -out: - if (efp != NULL) - *efp = family; - return (0); - -fail1: - EFSYS_PROBE1(fail1, efx_rc_t, rc); - - return (rc); -} #defineEFX_BIU_MAGIC0 0x01234567 #defineEFX_BIU_MAGIC1 0xfedcba98 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299339 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:40:03 2016 New Revision: 299339 URL: https://svnweb.freebsd.org/changeset/base/299339 Log: sfxge(4): cleanup: remove obsolete common code module Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_impl.h Modified: head/sys/dev/sfxge/common/efx_impl.h == --- head/sys/dev/sfxge/common/efx_impl.hTue May 10 07:38:23 2016 (r299338) +++ head/sys/dev/sfxge/common/efx_impl.hTue May 10 07:40:03 2016 (r299339) @@ -78,8 +78,7 @@ extern "C" { #defineEFX_MOD_MON 0x0400 #defineEFX_MOD_WOL 0x0800 #defineEFX_MOD_FILTER 0x1000 -#defineEFX_MOD_PKTFILTER 0x2000 -#defineEFX_MOD_LIC 0x4000 +#defineEFX_MOD_LIC 0x2000 #defineEFX_RESET_MAC 0x0001 #defineEFX_RESET_PHY 0x0002 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299338 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:38:23 2016 New Revision: 299338 URL: https://svnweb.freebsd.org/changeset/base/299338 Log: sfxge(4): cleanup: fix typos Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/hunt_filter.c Modified: head/sys/dev/sfxge/common/hunt_filter.c == --- head/sys/dev/sfxge/common/hunt_filter.c Tue May 10 07:22:19 2016 (r299337) +++ head/sys/dev/sfxge/common/hunt_filter.c Tue May 10 07:38:23 2016 (r299338) @@ -1275,7 +1275,7 @@ ef10_filter_reconfigure( * firmware state, and that later changes to enable/disable the * workaround will result in this function seeing a reset (FLR). * -* FIXME: On Medford mulicast chaining should always be on. +* FIXME: On Medford multicast chaining should always be on. */ if ((rc = hunt_filter_get_workarounds(enp)) != 0) goto fail3; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299337 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:22:19 2016 New Revision: 299337 URL: https://svnweb.freebsd.org/changeset/base/299337 Log: sfxge(4): cleanup efx_check.h comments and error messages Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:21:14 2016 (r299336) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:22:19 2016 (r299337) @@ -160,15 +160,13 @@ # error "MON_NULL is obsolete and is not supported." #endif -/* Obsolete option */ #ifdef EFSYS_OPT_MON_SIENA # error "MON_SIENA is obsolete (replaced by MON_MCDI)." -#endif /* EFSYS_OPT_MON_SIENA*/ +#endif -/* Obsolete option */ #ifdef EFSYS_OPT_MON_HUNTINGTON # error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)." -#endif /* EFSYS_OPT_MON_HUNTINGTON*/ +#endif /* Support monitor statistics (voltage/temperature) */ #if EFSYS_OPT_MON_STATS @@ -216,7 +214,6 @@ # error "PCIE_TUNE is obsolete and is not supported." #endif -/* Obsolete option */ #ifdef EFSYS_OPT_PHY_BIST # error "PHY_BIST is obsolete (replaced by BIST)." #endif @@ -239,7 +236,6 @@ # error "PHY_NULL is obsolete and is not supported." #endif -/* Obsolete option */ #ifdef EFSYS_OPT_PHY_PM8358 # error "EFSYS_OPT_PHY_PM8358 is obsolete and is not supported." #endif @@ -285,10 +281,9 @@ # endif #endif /* EFSYS_OPT_QSTATS */ -/* Obsolete option */ #ifdef EFSYS_OPT_RX_HDR_SPLIT # error "RX_HDR_SPLIT is obsolete and is not supported" -#endif /* EFSYS_OPT_RX_HDR_SPLIT */ +#endif /* Support receive scaling (RSS) */ #if EFSYS_OPT_RX_SCALE @@ -304,7 +299,6 @@ # endif #endif /* EFSYS_OPT_RX_SCATTER */ -/* Obsolete option */ #ifdef EFSYS_OPT_STAT_NAME # error "STAT_NAME is obsolete (replaced by NAMES)." #endif @@ -323,10 +317,9 @@ # endif #endif /* EFSYS_OPT_WOL */ -/* Obsolete option */ #ifdef EFSYS_OPT_MCAST_FILTER_LIST # error "MCAST_FILTER_LIST is obsolete and is not supported" -#endif /* EFSYS_OPT_MCAST_FILTER_LIST */ +#endif /* Support BIST */ #if EFSYS_OPT_BIST ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299336 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:21:14 2016 New Revision: 299336 URL: https://svnweb.freebsd.org/changeset/base/299336 Log: sfxge(4): remove EFSYS_OPT_PHY_TXC43128 Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_phy.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:20:18 2016 (r299335) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:21:14 2016 (r299336) @@ -45,9 +45,6 @@ #ifdef EFSYS_OPT_FALCON # error "FALCON is obsolete and is not supported." -#else -/* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_PHY_TXC43128 (0) #endif /* Support NVRAM based boot config */ @@ -277,12 +274,9 @@ # endif #endif /* EFSYS_OPT_PHY_STATS */ -/* Support TXC43128 PHY (SFE4003 NIC) */ -#if EFSYS_OPT_PHY_TXC43128 -# if !EFSYS_OPT_FALCON -# error "PHY_TXC43128 requires FALCON" -# endif -#endif /* EFSYS_OPT_PHY_TXC43128 */ +#ifdef EFSYS_OPT_PHY_TXC43128 +# error "PHY_TXC43128 is obsolete and is not supported." +#endif /* Support EVQ/RXQ/TXQ statistics */ #if EFSYS_OPT_QSTATS Modified: head/sys/dev/sfxge/common/efx_impl.h == --- head/sys/dev/sfxge/common/efx_impl.hTue May 10 07:20:18 2016 (r299335) +++ head/sys/dev/sfxge/common/efx_impl.hTue May 10 07:21:14 2016 (r299336) @@ -301,13 +301,6 @@ typedef struct efx_port_s { uint32_tep_lp_cap_mask; uint32_tep_default_adv_cap_mask; uint32_tep_phy_cap_mask; -#if EFSYS_OPT_PHY_TXC43128 - union { - struct { - unsigned intbug10934_count; - } ep_txc43128; - }; -#endif boolean_t ep_mac_poll_needed; /* falcon only */ boolean_t ep_mac_up; /* falcon only */ uint32_tep_fwver; /* falcon only */ Modified: head/sys/dev/sfxge/common/efx_phy.c == --- head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:20:18 2016 (r299335) +++ head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:21:14 2016 (r299336) @@ -34,37 +34,6 @@ __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" -#if EFSYS_OPT_PHY_TXC43128 -#include "txc43128.h" -#endif - -#if EFSYS_OPT_PHY_TXC43128 -static efx_phy_ops_t __efx_phy_txc43128_ops = { - NULL, /* epo_power */ - txc43128_reset, /* epo_reset */ - txc43128_reconfigure, /* epo_reconfigure */ - txc43128_verify,/* epo_verify */ - txc43128_uplink_check, /* epo_uplink_check */ - txc43128_downlink_check,/* epo_downlink_check */ - txc43128_oui_get, /* epo_oui_get */ -#if EFSYS_OPT_PHY_STATS - txc43128_stats_update, /* epo_stats_update */ -#endif /* EFSYS_OPT_PHY_STATS */ -#if EFSYS_OPT_PHY_PROPS -#if EFSYS_OPT_NAMES - txc43128_prop_name, /* epo_prop_name */ -#endif - txc43128_prop_get, /* epo_prop_get */ - txc43128_prop_set, /* epo_prop_set */ -#endif /* EFSYS_OPT_PHY_PROPS */ -#if EFSYS_OPT_BIST - NULL, /* epo_bist_enable_offline */ - NULL, /* epo_bist_start */ - NULL, /* epo_bist_poll */ - NULL, /* epo_bist_stop */ -#endif /* EFSYS_OPT_BIST */ -}; -#endif /* EFSYS_OPT_PHY_TXC43128 */ #if EFSYS_OPT_SIENA static efx_phy_ops_t __efx_phy_siena_ops = { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299335 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:20:18 2016 New Revision: 299335 URL: https://svnweb.freebsd.org/changeset/base/299335 Log: sfxge(4): remove EFSYS_OPT_PHY_SFX7101 Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_phy.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:19:15 2016 (r299334) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:20:18 2016 (r299335) @@ -47,7 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_PHY_SFX7101 (0) #defineEFSYS_OPT_PHY_TXC43128 (0) #endif @@ -267,12 +266,9 @@ # error "PHY_SFT9001 is obsolete and is not supported." #endif -/* Support SFX7101 PHY (SFE4001 NIC) */ -#if EFSYS_OPT_PHY_SFX7101 -# if !EFSYS_OPT_FALCON -# error "PHY_SFX7101 requires FALCON" -# endif -#endif /* EFSYS_OPT_PHY_SFX7101 */ +#ifdef EFSYS_OPT_PHY_SFX7101 +# error "PHY_SFX7101 is obsolete and is not supported." +#endif /* Support PHY statistics */ #if EFSYS_OPT_PHY_STATS Modified: head/sys/dev/sfxge/common/efx_phy.c == --- head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:19:15 2016 (r299334) +++ head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:20:18 2016 (r299335) @@ -34,42 +34,10 @@ __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" -#if EFSYS_OPT_PHY_SFX7101 -#include "sfx7101.h" -#endif - #if EFSYS_OPT_PHY_TXC43128 #include "txc43128.h" #endif -#if EFSYS_OPT_PHY_SFX7101 -static efx_phy_ops_t __efx_phy_sfx7101_ops = { - sfx7101_power, /* epo_power */ - sfx7101_reset, /* epo_reset */ - sfx7101_reconfigure,/* epo_reconfigure */ - sfx7101_verify, /* epo_verify */ - sfx7101_uplink_check, /* epo_uplink_check */ - sfx7101_downlink_check, /* epo_downlink_check */ - sfx7101_oui_get,/* epo_oui_get */ -#if EFSYS_OPT_PHY_STATS - sfx7101_stats_update, /* epo_stats_update */ -#endif /* EFSYS_OPT_PHY_STATS */ -#if EFSYS_OPT_PHY_PROPS -#if EFSYS_OPT_NAMES - sfx7101_prop_name, /* epo_prop_name */ -#endif - sfx7101_prop_get, /* epo_prop_get */ - sfx7101_prop_set, /* epo_prop_set */ -#endif /* EFSYS_OPT_PHY_PROPS */ -#if EFSYS_OPT_BIST - NULL, /* epo_bist_enable_offline */ - NULL, /* epo_bist_start */ - NULL, /* epo_bist_poll */ - NULL, /* epo_bist_stop */ -#endif /* EFSYS_OPT_BIST */ -}; -#endif /* EFSYS_OPT_PHY_SFX7101 */ - #if EFSYS_OPT_PHY_TXC43128 static efx_phy_ops_t __efx_phy_txc43128_ops = { NULL, /* epo_power */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299334 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:19:15 2016 New Revision: 299334 URL: https://svnweb.freebsd.org/changeset/base/299334 Log: sfxge(4): remove EFSYS_OPT_PHY_SFT9001 Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_phy.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:18:18 2016 (r299333) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:19:15 2016 (r299334) @@ -47,7 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_PHY_SFT9001 (0) #defineEFSYS_OPT_PHY_SFX7101 (0) #defineEFSYS_OPT_PHY_TXC43128 (0) #endif @@ -264,12 +263,9 @@ # error "PHY_QT2025C is obsolete and is not supported." #endif -/* Support SFT9001 PHY (Starbolt NIC) */ -#if EFSYS_OPT_PHY_SFT9001 -# if !EFSYS_OPT_FALCON -# error "PHY_SFT9001 requires FALCON" -# endif -#endif /* EFSYS_OPT_PHY_SFT9001 */ +#ifdef EFSYS_OPT_PHY_SFT9001 +# error "PHY_SFT9001 is obsolete and is not supported." +#endif /* Support SFX7101 PHY (SFE4001 NIC) */ #if EFSYS_OPT_PHY_SFX7101 Modified: head/sys/dev/sfxge/common/efx_phy.c == --- head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:18:18 2016 (r299333) +++ head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:19:15 2016 (r299334) @@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$"); #include "txc43128.h" #endif -#if EFSYS_OPT_PHY_SFT9001 -#include "sft9001.h" -#endif - #if EFSYS_OPT_PHY_SFX7101 static efx_phy_ops_t __efx_phy_sfx7101_ops = { sfx7101_power, /* epo_power */ @@ -102,34 +98,6 @@ static efx_phy_ops_t__efx_phy_txc43128_ }; #endif /* EFSYS_OPT_PHY_TXC43128 */ -#if EFSYS_OPT_PHY_SFT9001 -static efx_phy_ops_t __efx_phy_sft9001_ops = { - NULL, /* epo_power */ - sft9001_reset, /* epo_reset */ - sft9001_reconfigure,/* epo_reconfigure */ - sft9001_verify, /* epo_verify */ - sft9001_uplink_check, /* epo_uplink_check */ - sft9001_downlink_check, /* epo_downlink_check */ - sft9001_oui_get,/* epo_oui_get */ -#if EFSYS_OPT_PHY_STATS - sft9001_stats_update, /* epo_stats_update */ -#endif /* EFSYS_OPT_PHY_STATS */ -#if EFSYS_OPT_PHY_PROPS -#if EFSYS_OPT_NAMES - sft9001_prop_name, /* epo_prop_name */ -#endif - sft9001_prop_get, /* epo_prop_get */ - sft9001_prop_set, /* epo_prop_set */ -#endif /* EFSYS_OPT_PHY_PROPS */ -#if EFSYS_OPT_BIST - NULL, /* epo_bist_enable_offline */ - sft9001_bist_start, /* epo_bist_start */ - sft9001_bist_poll, /* epo_bist_poll */ - sft9001_bist_stop, /* epo_bist_stop */ -#endif /* EFSYS_OPT_BIST */ -}; -#endif /* EFSYS_OPT_PHY_SFT9001 */ - #if EFSYS_OPT_SIENA static efx_phy_ops_t __efx_phy_siena_ops = { siena_phy_power,/* epo_power */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299333 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:18:18 2016 New Revision: 299333 URL: https://svnweb.freebsd.org/changeset/base/299333 Log: sfxge(4): remove EFSYS_OPT_PHY_QT2025C Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_phy.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:17:08 2016 (r299332) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:18:18 2016 (r299333) @@ -47,7 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_PHY_QT2025C (0) #defineEFSYS_OPT_PHY_SFT9001 (0) #defineEFSYS_OPT_PHY_SFX7101 (0) #defineEFSYS_OPT_PHY_TXC43128 (0) @@ -261,12 +260,9 @@ # error "PHY_QT2022C2 is obsolete and is not supported." #endif -/* Support QT2025C PHY (Wakefield NIC) */ -#if EFSYS_OPT_PHY_QT2025C -# if !EFSYS_OPT_FALCON -# error "PHY_QT2025C requires FALCON" -# endif -#endif /* EFSYS_OPT_PHY_QT2025C */ +#ifdef EFSYS_OPT_PHY_QT2025C +# error "PHY_QT2025C is obsolete and is not supported." +#endif /* Support SFT9001 PHY (Starbolt NIC) */ #if EFSYS_OPT_PHY_SFT9001 Modified: head/sys/dev/sfxge/common/efx_impl.h == --- head/sys/dev/sfxge/common/efx_impl.hTue May 10 07:17:08 2016 (r299332) +++ head/sys/dev/sfxge/common/efx_impl.hTue May 10 07:18:18 2016 (r299333) @@ -301,14 +301,11 @@ typedef struct efx_port_s { uint32_tep_lp_cap_mask; uint32_tep_default_adv_cap_mask; uint32_tep_phy_cap_mask; -#if EFSYS_OPT_PHY_TXC43128 || EFSYS_OPT_PHY_QT2025C +#if EFSYS_OPT_PHY_TXC43128 union { struct { unsigned intbug10934_count; } ep_txc43128; - struct { - unsigned intbug17190_count; - } ep_qt2025c; }; #endif boolean_t ep_mac_poll_needed; /* falcon only */ Modified: head/sys/dev/sfxge/common/efx_phy.c == --- head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:17:08 2016 (r299332) +++ head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:18:18 2016 (r299333) @@ -46,10 +46,6 @@ __FBSDID("$FreeBSD$"); #include "sft9001.h" #endif -#if EFSYS_OPT_PHY_QT2025C -#include "qt2025c.h" -#endif - #if EFSYS_OPT_PHY_SFX7101 static efx_phy_ops_t __efx_phy_sfx7101_ops = { sfx7101_power, /* epo_power */ @@ -134,34 +130,6 @@ static efx_phy_ops_t __efx_phy_sft9001_o }; #endif /* EFSYS_OPT_PHY_SFT9001 */ -#if EFSYS_OPT_PHY_QT2025C -static efx_phy_ops_t __efx_phy_qt2025c_ops = { - NULL, /* epo_power */ - qt2025c_reset, /* epo_reset */ - qt2025c_reconfigure,/* epo_reconfigure */ - qt2025c_verify, /* epo_verify */ - qt2025c_uplink_check, /* epo_uplink_check */ - qt2025c_downlink_check, /* epo_downlink_check */ - qt2025c_oui_get,/* epo_oui_get */ -#if EFSYS_OPT_PHY_STATS - qt2025c_stats_update, /* epo_stats_update */ -#endif /* EFSYS_OPT_PHY_STATS */ -#if EFSYS_OPT_PHY_PROPS -#if EFSYS_OPT_NAMES - qt2025c_prop_name, /* epo_prop_name */ -#endif - qt2025c_prop_get, /* epo_prop_get */ - qt2025c_prop_set, /* epo_prop_set */ -#endif /* EFSYS_OPT_PHY_PROPS */ -#if EFSYS_OPT_BIST - NULL, /* epo_bist_enable_offline */ - NULL, /* epo_bist_start */ - NULL, /* epo_bist_poll */ - NULL, /* epo_bist_stop */ -#endif /* EFSYS_OPT_BIST */ -}; -#endif /* EFSYS_OPT_PHY_QT2025C */ - #if EFSYS_OPT_SIENA static efx_phy_ops_t __efx_phy_siena_ops = { siena_phy_power,/* epo_power */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299332 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:17:08 2016 New Revision: 299332 URL: https://svnweb.freebsd.org/changeset/base/299332 Log: sfxge(4): remove EFSYS_OPT_PHY_QT2022C2 Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_phy.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:15:57 2016 (r299331) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:17:08 2016 (r299332) @@ -47,7 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_PHY_QT2022C2 (0) #defineEFSYS_OPT_PHY_QT2025C (0) #defineEFSYS_OPT_PHY_SFT9001 (0) #defineEFSYS_OPT_PHY_SFX7101 (0) @@ -258,12 +257,9 @@ # endif #endif /* EFSYS_OPT_PHY_PROPS */ -/* Support QT2022C2 PHY */ -#if EFSYS_OPT_PHY_QT2022C2 -# if !EFSYS_OPT_FALCON -# error "PHY_QT2022C2 requires FALCON" -# endif -#endif /* EFSYS_OPT_PHY_QT2022C2 */ +#ifdef EFSYS_OPT_PHY_QT2022C2 +# error "PHY_QT2022C2 is obsolete and is not supported." +#endif /* Support QT2025C PHY (Wakefield NIC) */ #if EFSYS_OPT_PHY_QT2025C Modified: head/sys/dev/sfxge/common/efx_phy.c == --- head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:15:57 2016 (r299331) +++ head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:17:08 2016 (r299332) @@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" -#if EFSYS_OPT_PHY_QT2022C2 -#include "qt2022c2.h" -#endif - #if EFSYS_OPT_PHY_SFX7101 #include "sfx7101.h" #endif @@ -54,34 +50,6 @@ __FBSDID("$FreeBSD$"); #include "qt2025c.h" #endif -#if EFSYS_OPT_PHY_QT2022C2 -static efx_phy_ops_t __efx_phy_qt2022c2_ops = { - NULL, /* epo_power */ - qt2022c2_reset, /* epo_reset */ - qt2022c2_reconfigure, /* epo_reconfigure */ - qt2022c2_verify,/* epo_verify */ - qt2022c2_uplink_check, /* epo_uplink_check */ - qt2022c2_downlink_check,/* epo_downlink_check */ - qt2022c2_oui_get, /* epo_oui_get */ -#if EFSYS_OPT_PHY_STATS - qt2022c2_stats_update, /* epo_stats_update */ -#endif /* EFSYS_OPT_PHY_STATS */ -#if EFSYS_OPT_PHY_PROPS -#if EFSYS_OPT_NAMES - qt2022c2_prop_name, /* epo_prop_name */ -#endif - qt2022c2_prop_get, /* epo_prop_get */ - qt2022c2_prop_set, /* epo_prop_set */ -#endif /* EFSYS_OPT_PHY_PROPS */ -#if EFSYS_OPT_BIST - NULL, /* epo_bist_enable_offline */ - NULL, /* epo_bist_start */ - NULL, /* epo_bist_poll */ - NULL, /* epo_bist_stop */ -#endif /* EFSYS_OPT_BIST */ -}; -#endif /* EFSYS_OPT_PHY_QT2022C2 */ - #if EFSYS_OPT_PHY_SFX7101 static efx_phy_ops_t __efx_phy_sfx7101_ops = { sfx7101_power, /* epo_power */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299331 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:15:57 2016 New Revision: 299331 URL: https://svnweb.freebsd.org/changeset/base/299331 Log: sfxge(4): remove EFSYS_OPT_PHY_NULL Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_phy.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:15:09 2016 (r299330) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:15:57 2016 (r299331) @@ -47,7 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_PHY_NULL (0) #defineEFSYS_OPT_PHY_QT2022C2 (0) #defineEFSYS_OPT_PHY_QT2025C (0) #defineEFSYS_OPT_PHY_SFT9001 (0) @@ -243,12 +242,9 @@ # endif #endif /* EFSYS_OPT_PHY_LED_CONTROL */ -/* Support NULL PHY */ -#if EFSYS_OPT_PHY_NULL -# if !EFSYS_OPT_FALCON -# error "PHY_NULL requires FALCON" -# endif -#endif /* EFSYS_OPT_PHY_NULL */ +#ifdef EFSYS_OPT_PHY_NULL +# error "PHY_NULL is obsolete and is not supported." +#endif /* Obsolete option */ #ifdef EFSYS_OPT_PHY_PM8358 Modified: head/sys/dev/sfxge/common/efx_phy.c == --- head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:15:09 2016 (r299330) +++ head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:15:57 2016 (r299331) @@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" -#if EFSYS_OPT_PHY_NULL -#include "nullphy.h" -#endif - #if EFSYS_OPT_PHY_QT2022C2 #include "qt2022c2.h" #endif @@ -58,34 +54,6 @@ __FBSDID("$FreeBSD$"); #include "qt2025c.h" #endif -#if EFSYS_OPT_PHY_NULL -static efx_phy_ops_t __efx_phy_null_ops = { - NULL, /* epo_power */ - nullphy_reset, /* epo_reset */ - nullphy_reconfigure,/* epo_reconfigure */ - nullphy_verify, /* epo_verify */ - NULL, /* epo_uplink_check */ - nullphy_downlink_check, /* epo_downlink_check */ - nullphy_oui_get,/* epo_oui_get */ -#if EFSYS_OPT_PHY_STATS - nullphy_stats_update, /* epo_stats_update */ -#endif /* EFSYS_OPT_PHY_STATS */ -#if EFSYS_OPT_PHY_PROPS -#if EFSYS_OPT_NAMES - nullphy_prop_name, /* epo_prop_name */ -#endif - nullphy_prop_get, /* epo_prop_get */ - nullphy_prop_set, /* epo_prop_set */ -#endif /* EFSYS_OPT_PHY_PROPS */ -#if EFSYS_OPT_BIST - NULL, /* epo_bist_enable_offline */ - NULL, /* epo_bist_start */ - NULL, /* epo_bist_poll */ - NULL, /* epo_bist_stop */ -#endif /* EFSYS_OPT_BIST */ -}; -#endif /* EFSYS_OPT_PHY_NULL */ - #if EFSYS_OPT_PHY_QT2022C2 static efx_phy_ops_t __efx_phy_qt2022c2_ops = { NULL, /* epo_power */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299330 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:15:09 2016 New Revision: 299330 URL: https://svnweb.freebsd.org/changeset/base/299330 Log: sfxge(4): remove EFSYS_OPT_NVRAM_SFX7101 Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:14:49 2016 (r299329) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:15:09 2016 (r299330) @@ -47,8 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_NVRAM_SFX7101 (0) - #defineEFSYS_OPT_PHY_NULL (0) #defineEFSYS_OPT_PHY_QT2022C2 (0) #defineEFSYS_OPT_PHY_QT2025C (0) @@ -218,15 +216,9 @@ # error "NVRAM_SFT9001 is obsolete and is not supported." #endif -/* Support NVRAM config for SFX7101 */ -#if EFSYS_OPT_NVRAM_SFX7101 -# if !EFSYS_OPT_NVRAM -# error "NVRAM_SFX7101 requires NVRAM" -# endif -# if !EFSYS_OPT_FALCON -# error "NVRAM_SFX7101 requires FALCON" -# endif -#endif /* EFSYS_OPT_NVRAM_SFX7101 */ +#ifdef EFSYS_OPT_NVRAM_SFX7101 +# error "NVRAM_SFX7101 is obsolete and is not supported." +#endif #ifdef EFSYS_OPT_PCIE_TUNE # error "PCIE_TUNE is obsolete and is not supported." ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299329 - head/sys/cam/ctl
Author: mav Date: Tue May 10 07:14:49 2016 New Revision: 299329 URL: https://svnweb.freebsd.org/changeset/base/299329 Log: Improve validation of some POPULATE TOKEN parameters. MFC after:2 weeks Modified: head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl_tpc.c == --- head/sys/cam/ctl/ctl_tpc.c Tue May 10 07:13:45 2016(r299328) +++ head/sys/cam/ctl/ctl_tpc.c Tue May 10 07:14:49 2016(r299329) @@ -1916,7 +1916,7 @@ ctl_populate_token(struct ctl_scsiio *ct struct ctl_port *port; struct tpc_list *list, *tlist; struct tpc_token *token; - int len, lendesc; + int len, lendata, lendesc; CTL_DEBUG_PRINT(("ctl_populate_token\n")); @@ -1953,10 +1953,19 @@ ctl_populate_token(struct ctl_scsiio *ct } data = (struct scsi_populate_token_data *)ctsio->kern_data_ptr; + lendata = scsi_2btoul(data->length); + if (lendata < sizeof(struct scsi_populate_token_data) - 2 + + sizeof(struct scsi_range_desc)) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 0, + /*field*/ 0, /*bit_valid*/ 0, /*bit*/ 0); + goto done; + } lendesc = scsi_2btoul(data->range_descriptor_length); - if (len < sizeof(struct scsi_populate_token_data) + lendesc) { + if (lendesc < sizeof(struct scsi_range_desc) || + len < sizeof(struct scsi_populate_token_data) + lendesc || + lendata < sizeof(struct scsi_populate_token_data) - 2 + lendesc) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 0, - /*field*/ 2, /*bit_valid*/ 0, /*bit*/ 0); + /*field*/ 14, /*bit_valid*/ 0, /*bit*/ 0); goto done; } /* @@ -1966,6 +1975,16 @@ ctl_populate_token(struct ctl_scsiio *ct scsi_4btoul(data->rod_type), scsi_2btoul(data->range_descriptor_length)); */ + + /* Validate INACTIVITY TIMEOUT field */ + if (scsi_4btoul(data->inactivity_timeout) > TPC_MAX_TOKEN_TIMEOUT) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, + /*command*/ 0, /*field*/ 4, /*bit_valid*/ 0, + /*bit*/ 0); + goto done; + } + + /* Validate ROD TYPE field */ if ((data->flags & EC_PT_RTV) && scsi_4btoul(data->rod_type) != ROD_TYPE_AUR) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 0, @@ -2016,11 +2035,6 @@ ctl_populate_token(struct ctl_scsiio *ct token->timeout = TPC_DFL_TOKEN_TIMEOUT; else if (token->timeout < TPC_MIN_TOKEN_TIMEOUT) token->timeout = TPC_MIN_TOKEN_TIMEOUT; - else if (token->timeout > TPC_MAX_TOKEN_TIMEOUT) { - ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, - /*command*/ 0, /*field*/ 4, /*bit_valid*/ 0, - /*bit*/ 0); - } memcpy(list->res_token, token->token, sizeof(list->res_token)); list->res_token_valid = 1; list->curseg = 0; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299328 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:13:45 2016 New Revision: 299328 URL: https://svnweb.freebsd.org/changeset/base/299328 Log: sfxge(4): remove EFSYS_OPT_NVRAM_SFT9001 Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:12:27 2016 (r299327) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:13:45 2016 (r299328) @@ -47,7 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_NVRAM_SFT9001 (0) #defineEFSYS_OPT_NVRAM_SFX7101 (0) #defineEFSYS_OPT_PHY_NULL (0) @@ -215,15 +214,9 @@ # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported." #endif -/* Support NVRAM config for SFT9001 */ -#if EFSYS_OPT_NVRAM_SFT9001 -# if !EFSYS_OPT_NVRAM -# error "NVRAM_SFT9001 requires NVRAM" -# endif -# if !EFSYS_OPT_FALCON -# error "NVRAM_SFT9001 requires FALCON" -# endif -#endif /* EFSYS_OPT_NVRAM_SFT9001 */ +#ifdef EFSYS_OPT_NVRAM_SFT9001 +# error "NVRAM_SFT9001 is obsolete and is not supported." +#endif /* Support NVRAM config for SFX7101 */ #if EFSYS_OPT_NVRAM_SFX7101 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299327 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:12:27 2016 New Revision: 299327 URL: https://svnweb.freebsd.org/changeset/base/299327 Log: sfxge(4): remove EFSYS_OPT_FALCON_BOOTROM Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:11:09 2016 (r299326) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:12:27 2016 (r299327) @@ -47,7 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_NVRAM_FALCON_BOOTROM (0) #defineEFSYS_OPT_NVRAM_SFT9001 (0) #defineEFSYS_OPT_NVRAM_SFX7101 (0) @@ -212,15 +211,9 @@ # endif #endif /* EFSYS_OPT_NVRAM */ -/* Support Falcon bootrom */ -#if EFSYS_OPT_NVRAM_FALCON_BOOTROM -# if !EFSYS_OPT_NVRAM -# error "NVRAM_FALCON_BOOTROM requires NVRAM" -# endif -# if !EFSYS_OPT_FALCON -# error "NVRAM_FALCON_BOOTROM requires FALCON" -# endif -#endif /* EFSYS_OPT_NVRAM_FALCON_BOOTROM */ +#ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM +# error "NVRAM_FALCON_BOOTROM is obsolete and is not supported." +#endif /* Support NVRAM config for SFT9001 */ #if EFSYS_OPT_NVRAM_SFT9001 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299326 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:11:09 2016 New Revision: 299326 URL: https://svnweb.freebsd.org/changeset/base/299326 Log: sfxge(4): remove EFSYS_OPT_MON_NULL Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_mon.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:09:18 2016 (r299325) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:11:09 2016 (r299326) @@ -47,8 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_MON_NULL (0) - #defineEFSYS_OPT_NVRAM_FALCON_BOOTROM (0) #defineEFSYS_OPT_NVRAM_SFT9001 (0) #defineEFSYS_OPT_NVRAM_SFX7101 (0) @@ -170,12 +168,9 @@ # error "MON_MAX6647 is obsolete and is not supported." #endif -/* Support null monitor */ -#if EFSYS_OPT_MON_NULL -# if !EFSYS_OPT_FALCON -# error "MON_NULL requires FALCON" -# endif -#endif /* EFSYS_OPT_MON_NULL */ +#ifdef EFSYS_OPT_MON_NULL +# error "MON_NULL is obsolete and is not supported." +#endif /* Obsolete option */ #ifdef EFSYS_OPT_MON_SIENA Modified: head/sys/dev/sfxge/common/efx_mon.c == --- head/sys/dev/sfxge/common/efx_mon.c Tue May 10 07:09:18 2016 (r299325) +++ head/sys/dev/sfxge/common/efx_mon.c Tue May 10 07:11:09 2016 (r299326) @@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" -#if EFSYS_OPT_MON_NULL -#include "nullmon.h" -#endif - #if EFSYS_OPT_MON_MCDI #include "mcdi_mon.h" #endif @@ -69,16 +65,6 @@ efx_mon_name( #endif /* EFSYS_OPT_NAMES */ -#if EFSYS_OPT_MON_NULL -static efx_mon_ops_t __efx_mon_null_ops = { - nullmon_reset, /* emo_reset */ - nullmon_reconfigure,/* emo_reconfigure */ -#if EFSYS_OPT_MON_STATS - nullmon_stats_update/* emo_stats_update */ -#endif /* EFSYS_OPT_MON_STATS */ -}; -#endif - #if EFSYS_OPT_MON_MCDI static efx_mon_ops_t __efx_mon_mcdi_ops = { NULL, /* emo_reset */ @@ -113,11 +99,6 @@ efx_mon_init( EFSYS_ASSERT(encp->enc_mon_type != EFX_MON_INVALID); switch (emp->em_type) { -#if EFSYS_OPT_MON_NULL - case EFX_MON_NULL: - emop = &__efx_mon_null_ops; - break; -#endif #if EFSYS_OPT_MON_MCDI case EFX_MON_SFC90X0: case EFX_MON_SFC91X0: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299325 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:09:18 2016 New Revision: 299325 URL: https://svnweb.freebsd.org/changeset/base/299325 Log: sfxge(4): remove EFSYS_OPT_MON_MAX6647 Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_mon.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:08:40 2016 (r299324) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:09:18 2016 (r299325) @@ -47,7 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_MON_MAX6647 (0) #defineEFSYS_OPT_MON_NULL (0) #defineEFSYS_OPT_NVRAM_FALCON_BOOTROM (0) @@ -167,12 +166,9 @@ # error "MON_LM87 is obsolete and is not supported." #endif -/* Support MAX6647 monitor */ -#if EFSYS_OPT_MON_MAX6647 -# if !EFSYS_OPT_FALCON -# error "MON_MAX6647 requires FALCON" -# endif -#endif /* EFSYS_OPT_MON_MAX6647 */ +#ifdef EFSYS_OPT_MON_MAX6647 +# error "MON_MAX6647 is obsolete and is not supported." +#endif /* Support null monitor */ #if EFSYS_OPT_MON_NULL Modified: head/sys/dev/sfxge/common/efx_mon.c == --- head/sys/dev/sfxge/common/efx_mon.c Tue May 10 07:08:40 2016 (r299324) +++ head/sys/dev/sfxge/common/efx_mon.c Tue May 10 07:09:18 2016 (r299325) @@ -38,10 +38,6 @@ __FBSDID("$FreeBSD$"); #include "nullmon.h" #endif -#if EFSYS_OPT_MON_MAX6647 -#include "max6647.h" -#endif - #if EFSYS_OPT_MON_MCDI #include "mcdi_mon.h" #endif @@ -83,16 +79,6 @@ static efx_mon_ops_t __efx_mon_null_ops }; #endif -#if EFSYS_OPT_MON_MAX6647 -static efx_mon_ops_t __efx_mon_max6647_ops = { - max6647_reset, /* emo_reset */ - max6647_reconfigure,/* emo_reconfigure */ -#if EFSYS_OPT_MON_STATS - max6647_stats_update/* emo_stats_update */ -#endif /* EFSYS_OPT_MON_STATS */ -}; -#endif - #if EFSYS_OPT_MON_MCDI static efx_mon_ops_t __efx_mon_mcdi_ops = { NULL, /* emo_reset */ @@ -132,11 +118,6 @@ efx_mon_init( emop = &__efx_mon_null_ops; break; #endif -#if EFSYS_OPT_MON_MAX6647 - case EFX_MON_MAX6647: - emop = &__efx_mon_max6647_ops; - break; -#endif #if EFSYS_OPT_MON_MCDI case EFX_MON_SFC90X0: case EFX_MON_SFC91X0: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299324 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:08:40 2016 New Revision: 299324 URL: https://svnweb.freebsd.org/changeset/base/299324 Log: sfxge(4): remove EFSYS_OPT_MON_LM87 Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_mon.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:07:49 2016 (r299323) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:08:40 2016 (r299324) @@ -47,7 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_MON_LM87 (0) #defineEFSYS_OPT_MON_MAX6647 (0) #defineEFSYS_OPT_MON_NULL (0) @@ -164,12 +163,9 @@ # endif #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */ -/* Support LM87 monitor */ -#if EFSYS_OPT_MON_LM87 -# if !EFSYS_OPT_FALCON -# error "MON_LM87 requires FALCON" -# endif -#endif /* EFSYS_OPT_MON_LM87 */ +#ifdef EFSYS_OPT_MON_LM87 +# error "MON_LM87 is obsolete and is not supported." +#endif /* Support MAX6647 monitor */ #if EFSYS_OPT_MON_MAX6647 Modified: head/sys/dev/sfxge/common/efx_mon.c == --- head/sys/dev/sfxge/common/efx_mon.c Tue May 10 07:07:49 2016 (r299323) +++ head/sys/dev/sfxge/common/efx_mon.c Tue May 10 07:08:40 2016 (r299324) @@ -38,10 +38,6 @@ __FBSDID("$FreeBSD$"); #include "nullmon.h" #endif -#if EFSYS_OPT_MON_LM87 -#include "lm87.h" -#endif - #if EFSYS_OPT_MON_MAX6647 #include "max6647.h" #endif @@ -87,16 +83,6 @@ static efx_mon_ops_t __efx_mon_null_ops }; #endif -#if EFSYS_OPT_MON_LM87 -static efx_mon_ops_t __efx_mon_lm87_ops = { - lm87_reset, /* emo_reset */ - lm87_reconfigure, /* emo_reconfigure */ -#if EFSYS_OPT_MON_STATS - lm87_stats_update /* emo_stats_update */ -#endif /* EFSYS_OPT_MON_STATS */ -}; -#endif - #if EFSYS_OPT_MON_MAX6647 static efx_mon_ops_t __efx_mon_max6647_ops = { max6647_reset, /* emo_reset */ @@ -146,11 +132,6 @@ efx_mon_init( emop = &__efx_mon_null_ops; break; #endif -#if EFSYS_OPT_MON_LM87 - case EFX_MON_LM87: - emop = &__efx_mon_lm87_ops; - break; -#endif #if EFSYS_OPT_MON_MAX6647 case EFX_MON_MAX6647: emop = &__efx_mon_max6647_ops; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299323 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:07:49 2016 New Revision: 299323 URL: https://svnweb.freebsd.org/changeset/base/299323 Log: sfxge(4): remove EFSYS_OPT_MAC_FALCON_XMAC Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_mac.c head/sys/dev/sfxge/common/efx_phy.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:06:44 2016 (r299322) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:07:49 2016 (r299323) @@ -47,8 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_MAC_FALCON_XMAC (0) - #defineEFSYS_OPT_MON_LM87 (0) #defineEFSYS_OPT_MON_MAX6647 (0) #defineEFSYS_OPT_MON_NULL (0) @@ -128,12 +126,9 @@ # error "MAC_FALCON_GMAC is obsolete and is not supported." #endif -/* Support Falcon XMAC */ -#if EFSYS_OPT_MAC_FALCON_XMAC -# if !EFSYS_OPT_FALCON -# error "MAC_FALCON_XMAC requires FALCON" -# endif -#endif /* EFSYS_OPT_MAC_FALCON_XMAC */ +#ifdef EFSYS_OPT_MAC_FALCON_XMAC +# error "MAC_FALCON_XMAC is obsolete and is not supported." +#endif /* Support MAC statistics */ #if EFSYS_OPT_MAC_STATS Modified: head/sys/dev/sfxge/common/efx_mac.c == --- head/sys/dev/sfxge/common/efx_mac.c Tue May 10 07:06:44 2016 (r299322) +++ head/sys/dev/sfxge/common/efx_mac.c Tue May 10 07:07:49 2016 (r299323) @@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" -#if EFSYS_OPT_MAC_FALCON_XMAC -#include "falcon_xmac.h" -#endif - #if EFSYS_OPT_SIENA static __checkReturn efx_rc_t @@ -46,28 +42,6 @@ falconsiena_mac_multicast_list_set( #endif /* EFSYS_OPT_SIENA */ -#if EFSYS_OPT_MAC_FALCON_XMAC -static efx_mac_ops_t __efx_falcon_xmac_ops = { - falcon_xmac_reset, /* emo_reset */ - falcon_mac_poll,/* emo_poll */ - falcon_mac_up, /* emo_up */ - falcon_xmac_reconfigure,/* emo_addr_set */ - falcon_xmac_reconfigure,/* emo_pdu_set */ - falcon_xmac_reconfigure,/* emo_reconfigure */ - falconsiena_mac_multicast_list_set, /* emo_multicast_list_set */ - NULL, /* emo_filter_set_default_rxq */ - NULL, /* emo_filter_default_rxq_clear */ -#if EFSYS_OPT_LOOPBACK - falcon_mac_loopback_set,/* emo_loopback_set */ -#endif /* EFSYS_OPT_LOOPBACK */ -#if EFSYS_OPT_MAC_STATS - falcon_mac_stats_upload,/* emo_stats_upload */ - NULL, /* emo_stats_periodic */ - falcon_xmac_stats_update/* emo_stats_update */ -#endif /* EFSYS_OPT_MAC_STATS */ -}; -#endif /* EFSYS_OPT_MAC_FALCON_XMAC */ - #if EFSYS_OPT_SIENA static efx_mac_ops_t __efx_siena_mac_ops = { NULL, /* emo_reset */ @@ -119,11 +93,7 @@ static efx_mac_ops_t*__efx_mac_ops[] = /* [EFX_MAC_FALCON_GMAC] */ NULL, /* [EFX_MAC_FALCON_XMAC] */ -#if EFSYS_OPT_MAC_FALCON_XMAC - &__efx_falcon_xmac_ops, -#else NULL, -#endif /* [EFX_MAC_SIENA] */ #if EFSYS_OPT_SIENA &__efx_siena_mac_ops, Modified: head/sys/dev/sfxge/common/efx_phy.c == --- head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:06:44 2016 (r299322) +++ head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:07:49 2016 (r299323) @@ -33,9 +33,6 @@ __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" -#if EFSYS_OPT_MAC_FALCON_XMAC -#include "falcon_xmac.h" -#endif #if EFSYS_OPT_PHY_NULL #include "nullphy.h" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299322 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:06:44 2016 New Revision: 299322 URL: https://svnweb.freebsd.org/changeset/base/299322 Log: sfxge(4): remove EFSYS_OPT_MAC_FALCON_GMAC Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_mac.c head/sys/dev/sfxge/common/efx_phy.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:02:59 2016 (r299321) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:06:44 2016 (r299322) @@ -47,7 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_MAC_FALCON_GMAC (0) #defineEFSYS_OPT_MAC_FALCON_XMAC (0) #defineEFSYS_OPT_MON_LM87 (0) @@ -125,12 +124,9 @@ # endif #endif /* EFSYS_OPT_LOOPBACK */ -/* Support Falcon GMAC */ -#if EFSYS_OPT_MAC_FALCON_GMAC -# if !EFSYS_OPT_FALCON -# error "MAC_FALCON_GMAC requires FALCON" -# endif -#endif /* EFSYS_OPT_MAC_FALCON_GMAC */ +#ifdef EFSYS_OPT_MAC_FALCON_GMAC +# error "MAC_FALCON_GMAC is obsolete and is not supported." +#endif /* Support Falcon XMAC */ #if EFSYS_OPT_MAC_FALCON_XMAC Modified: head/sys/dev/sfxge/common/efx_mac.c == --- head/sys/dev/sfxge/common/efx_mac.c Tue May 10 07:02:59 2016 (r299321) +++ head/sys/dev/sfxge/common/efx_mac.c Tue May 10 07:06:44 2016 (r299322) @@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" -#if EFSYS_OPT_MAC_FALCON_GMAC -#include "falcon_gmac.h" -#endif - #if EFSYS_OPT_MAC_FALCON_XMAC #include "falcon_xmac.h" #endif @@ -50,28 +46,6 @@ falconsiena_mac_multicast_list_set( #endif /* EFSYS_OPT_SIENA */ -#if EFSYS_OPT_MAC_FALCON_GMAC -static efx_mac_ops_t __efx_falcon_gmac_ops = { - falcon_gmac_reset, /* emo_reset */ - falcon_mac_poll,/* emo_poll */ - falcon_mac_up, /* emo_up */ - falcon_gmac_reconfigure,/* emo_addr_set */ - falcon_gmac_reconfigure,/* emo_pdu_set */ - falcon_gmac_reconfigure,/* emo_reconfigure */ - falconsiena_mac_multicast_list_set, /* emo_multicast_list_set */ - NULL, /* emo_filter_set_default_rxq */ - NULL, /* emo_filter_default_rxq_clear */ -#if EFSYS_OPT_LOOPBACK - falcon_mac_loopback_set,/* emo_loopback_set */ -#endif /* EFSYS_OPT_LOOPBACK */ -#if EFSYS_OPT_MAC_STATS - falcon_mac_stats_upload,/* emo_stats_upload */ - NULL, /* emo_stats_periodic */ - falcon_gmac_stats_update/* emo_stats_update */ -#endif /* EFSYS_OPT_MAC_STATS */ -}; -#endif /* EFSYS_OPT_MAC_FALCON_GMAC */ - #if EFSYS_OPT_MAC_FALCON_XMAC static efx_mac_ops_t __efx_falcon_xmac_ops = { falcon_xmac_reset, /* emo_reset */ @@ -143,11 +117,7 @@ static efx_mac_ops_t *__efx_mac_ops[] = /* [EFX_MAC_INVALID] */ NULL, /* [EFX_MAC_FALCON_GMAC] */ -#if EFSYS_OPT_MAC_FALCON_GMAC - &__efx_falcon_gmac_ops, -#else NULL, -#endif /* [EFX_MAC_FALCON_XMAC] */ #if EFSYS_OPT_MAC_FALCON_XMAC &__efx_falcon_xmac_ops, Modified: head/sys/dev/sfxge/common/efx_phy.c == --- head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:02:59 2016 (r299321) +++ head/sys/dev/sfxge/common/efx_phy.c Tue May 10 07:06:44 2016 (r299322) @@ -37,10 +37,6 @@ __FBSDID("$FreeBSD$"); #include "falcon_xmac.h" #endif -#if EFSYS_OPT_MAC_FALCON_GMAC -#include "falcon_gmac.h" -#endif - #if EFSYS_OPT_PHY_NULL #include "nullphy.h" #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299321 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:02:59 2016 New Revision: 299321 URL: https://svnweb.freebsd.org/changeset/base/299321 Log: sfxge(4): remove EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:01:06 2016 (r299320) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:02:59 2016 (r299321) @@ -47,8 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_FALCON_NIC_CFG_OVERRIDE (0) - #defineEFSYS_OPT_MAC_FALCON_GMAC (0) #defineEFSYS_OPT_MAC_FALCON_XMAC (0) @@ -103,12 +101,9 @@ # endif #endif /* EFSYS_OPT_EV_PREFETCH */ -/* Support overriding the NVRAM and VPD configuration */ -#if EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE -# if !EFSYS_OPT_FALCON -# error "FALCON_NIC_CFG_OVERRIDE requires FALCON" -# endif -#endif /* EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE */ +#ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE +# error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported." +#endif /* Support hardware packet filters */ #if EFSYS_OPT_FILTER ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r299320 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 07:01:06 2016 New Revision: 299320 URL: https://svnweb.freebsd.org/changeset/base/299320 Log: sfxge(4): remove EFSYS_OPT_FALCON Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_ev.c head/sys/dev/sfxge/common/efx_filter.c head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_intr.c head/sys/dev/sfxge/common/efx_mac.c head/sys/dev/sfxge/common/efx_mcdi.c head/sys/dev/sfxge/common/efx_nic.c head/sys/dev/sfxge/common/efx_nvram.c head/sys/dev/sfxge/common/efx_phy.c head/sys/dev/sfxge/common/efx_rx.c head/sys/dev/sfxge/common/efx_tx.c head/sys/dev/sfxge/common/efx_vpd.c Modified: head/sys/dev/sfxge/common/efx_check.h == --- head/sys/dev/sfxge/common/efx_check.h Tue May 10 06:53:38 2016 (r299319) +++ head/sys/dev/sfxge/common/efx_check.h Tue May 10 07:01:06 2016 (r299320) @@ -47,7 +47,6 @@ # error "FALCON is obsolete and is not supported." #else /* FIXME: remove this after Falcon support has been removed */ -#defineEFSYS_OPT_FALCON(0) #defineEFSYS_OPT_FALCON_NIC_CFG_OVERRIDE (0) #defineEFSYS_OPT_MAC_FALCON_GMAC (0) @@ -78,32 +77,29 @@ /* Verify chip implements accessed registers */ #if EFSYS_OPT_CHECK_REG -# if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA || \ - EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "CHECK_REG requires FALCON or SIENA or HUNTINGTON or MEDFORD" +# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) +# error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD" # endif #endif /* EFSYS_OPT_CHECK_REG */ /* Decode fatal errors */ #if EFSYS_OPT_DECODE_INTR_FATAL -# if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA) -# error "INTR_FATAL requires FALCON or SIENA" +# if !EFSYS_OPT_SIENA +# error "INTR_FATAL requires SIENA" # endif #endif /* EFSYS_OPT_DECODE_INTR_FATAL */ /* Support diagnostic hardware tests */ #if EFSYS_OPT_DIAG -# if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA || \ - EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "DIAG requires FALCON or SIENA or HUNTINGTON or MEDFORD" +# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) +# error "DIAG requires SIENA or HUNTINGTON or MEDFORD" # endif #endif /* EFSYS_OPT_DIAG */ /* Support optimized EVQ data access */ #if EFSYS_OPT_EV_PREFETCH -# if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA || \ - EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "EV_PREFETCH requires FALCON or SIENA or HUNTINGTON or MEDFORD" +# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) +# error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD" # endif #endif /* EFSYS_OPT_EV_PREFETCH */ @@ -116,9 +112,8 @@ /* Support hardware packet filters */ #if EFSYS_OPT_FILTER -# if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA || \ - EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "FILTER requires FALCON or SIENA or HUNTINGTON or MEDFORD" +# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) +# error "FILTER requires SIENA or HUNTINGTON or MEDFORD" # endif #endif /* EFSYS_OPT_FILTER */ @@ -130,9 +125,8 @@ /* Support hardware loopback modes */ #if EFSYS_OPT_LOOPBACK -# if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA || \ - EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "LOOPBACK requires FALCON or SIENA or HUNTINGTON or MEDFORD" +# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) +# error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD" # endif #endif /* EFSYS_OPT_LOOPBACK */ @@ -152,9 +146,8 @@ /* Support MAC statistics */ #if EFSYS_OPT_MAC_STATS -# if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA || \ - EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "MAC_STATS requires FALCON or SIENA or HUNTINGTON or MEDFORD" +# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) +# error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD" # endif #endif /* EFSYS_OPT_MAC_STATS */ @@ -218,9 +211,8 @@ /* Support monitor statistics (voltage/temperature) */ #if EFSYS_OPT_MON_STATS -# if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA || \ - EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "MON_STATS requires FALCON or SIENA or HUNTINGTON or MEDFORD" +# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) +# error "MON_STATS requires SIENA or HUNTINGTON or MEDFORD" # endif #endif /* EFSYS_OPT_MON_STATS */ @@ -242,9 +234,8 @@ /* Support non volatile configuration */ #if EFSYS_OPT_NVRAM -# if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA || \ - EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "NVRAM requires FALCON or SIENA or HUNTINGTON or MEDFORD" +# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON ||
svn commit: r299319 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 06:53:38 2016 New Revision: 299319 URL: https://svnweb.freebsd.org/changeset/base/299319 Log: sfxge(4): add TLV item manipulation functions to common code Add creation, deletion and checksumming operations to the private copy of TLV functions in the common code. Functions added in preparation for V3 licensing support, as licensing keys are stored in the TLV format. Missing support for multiple segment partitions added. Annotations for Windows code analysis also updated. Submitted by: Richard Houldsworth Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6264 Modified: head/sys/dev/sfxge/common/hunt_nvram.c Modified: head/sys/dev/sfxge/common/hunt_nvram.c == --- head/sys/dev/sfxge/common/hunt_nvram.c Tue May 10 06:51:20 2016 (r299318) +++ head/sys/dev/sfxge/common/hunt_nvram.c Tue May 10 06:53:38 2016 (r299319) @@ -48,14 +48,34 @@ typedef struct tlv_cursor_s { uint32_t*limit; /* Last dword of data block */ } tlv_cursor_t; +typedef struct nvram_partition_s { + uint16_t type; + uint8_t chip_select; + uint8_t flags; + /* +* The full length of the NVRAM partition. +* This is different from tlv_partition_header.total_length, +* which can be smaller. +*/ + uint32_t length; + uint32_t erase_size; + uint32_t *data; + tlv_cursor_t tlv_cursor; +} nvram_partition_t; + + static __checkReturn efx_rc_t tlv_validate_state( - __intlv_cursor_t *cursor); + __inout tlv_cursor_t *cursor); -/* - * Operations on TLV formatted partition data. - */ +static void +tlv_init_block( + __out uint32_t*block) +{ + *block = __CPU_TO_LE_32(TLV_TAG_END); +} + static uint32_t tlv_tag( __intlv_cursor_t*cursor) @@ -122,9 +142,9 @@ tlv_next_item_ptr( return (cursor->current + TLV_DWORD_COUNT(length)); } -static efx_rc_t +static __checkReturn efx_rc_t tlv_advance( - __intlv_cursor_t*cursor) + __inout tlv_cursor_t*cursor) { efx_rc_t rc; @@ -177,7 +197,7 @@ fail1: static efx_rc_t tlv_find( - __intlv_cursor_t*cursor, + __inout tlv_cursor_t*cursor, __inuint32_ttag) { efx_rc_t rc; @@ -194,7 +214,7 @@ tlv_find( static __checkReturn efx_rc_t tlv_validate_state( - __intlv_cursor_t*cursor) + __inout tlv_cursor_t*cursor) { efx_rc_t rc; @@ -242,31 +262,49 @@ staticefx_rc_t tlv_init_cursor( __out tlv_cursor_t*cursor, __inuint32_t*block, - __inuint32_t*limit) + __inuint32_t*limit, + __inuint32_t*current) { cursor->block = block; cursor->limit = limit; - cursor->current = cursor->block; + cursor->current = current; cursor->end = NULL; return (tlv_validate_state(cursor)); } -static efx_rc_t +static __checkReturn efx_rc_t tlv_init_cursor_from_size( __out tlv_cursor_t*cursor, - __inuint8_t *block, + __in_bcount(size) + uint8_t *block, __insize_t size) { uint32_t *limit; limit = (uint32_t *)(block + size - sizeof (uint32_t)); - return (tlv_init_cursor(cursor, (uint32_t *)block, limit)); + return (tlv_init_cursor(cursor, (uint32_t *)block, + limit, (uint32_t *)block)); } -static efx_rc_t +static __checkReturn efx_rc_t +tlv_init_cursor_at_offset( + __out tlv_cursor_t*cursor, + __in_bcount(size) + uint8_t *block, + __insize_t size, + __insize_t offset) +{ + uint32_t *limit; + uint32_t *current; + limit = (uint32_t *)(block + size - sizeof (uint32_t)); + current = (uint32_t *)(block + offset); + return (tlv_init_cursor(cursor, (uint32_t *)block, limit, current)); +} + +static __checkReturn efx_rc_t tlv_require_end( - __intlv_cursor_t*cursor) + __inout tlv_cursor_t*cursor) { uint32_t *pos; efx_rc_t rc; @@ -290,7 +328,7 @@ fail1: static size_t tlv_block_length_used( - __intlv_cursor_t*cursor) + __inout tlv_cursor_t*cursor) { efx_rc_t rc; @@ -311,8 +349,34 @@ fail1: return (0); } +static uint32_t * +tlv_last_segment_end( + __intlv_cursor_t *cursor) +{ +
svn commit: r299318 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue May 10 06:51:20 2016 New Revision: 299318 URL: https://svnweb.freebsd.org/changeset/base/299318 Log: sfxge(4): restructure TLV buffer validation Move TLV buffer validation into ef10-specific function and add accessor function which also converts the partition ID to the internal representation. Submitted by: Richard Houldsworth Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6263 Modified: head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_nvram.c head/sys/dev/sfxge/common/hunt_impl.h head/sys/dev/sfxge/common/hunt_nvram.c Modified: head/sys/dev/sfxge/common/efx.h == --- head/sys/dev/sfxge/common/efx.h Tue May 10 05:47:25 2016 (r299317) +++ head/sys/dev/sfxge/common/efx.h Tue May 10 06:51:20 2016 (r299318) @@ -1370,11 +1370,10 @@ efx_nvram_set_version( __inefx_nvram_type_t type, __in_ecount(4) uint16_t version[4]); -/* Validate contents of TLV formatted partition */ extern __checkReturn efx_rc_t -efx_nvram_tlv_validate( +efx_nvram_validate( __inefx_nic_t *enp, - __inuint32_t partn, + __inefx_nvram_type_t type, __in_bcount(partn_size) caddr_t partn_data, __insize_t partn_size); Modified: head/sys/dev/sfxge/common/efx_impl.h == --- head/sys/dev/sfxge/common/efx_impl.hTue May 10 05:47:25 2016 (r299317) +++ head/sys/dev/sfxge/common/efx_impl.hTue May 10 06:51:20 2016 (r299318) @@ -499,9 +499,19 @@ typedef struct efx_nvram_ops_s { uint32_t *, uint16_t *); efx_rc_t(*envo_partn_set_version)(efx_nic_t *, uint32_t, uint16_t *); + efx_rc_t(*envo_buffer_validate)(efx_nic_t *, uint32_t, + caddr_t, size_t); } efx_nvram_ops_t; #endif /* EFSYS_OPT_NVRAM */ +extern __checkReturn efx_rc_t +efx_nvram_tlv_validate( + __inefx_nic_t *enp, + __inuint32_t partn, + __in_bcount(partn_size) caddr_t partn_data, + __insize_t partn_size); + + #if EFSYS_OPT_VPD typedef struct efx_vpd_ops_s { efx_rc_t(*evpdo_init)(efx_nic_t *); Modified: head/sys/dev/sfxge/common/efx_nvram.c == --- head/sys/dev/sfxge/common/efx_nvram.c Tue May 10 05:47:25 2016 (r299317) +++ head/sys/dev/sfxge/common/efx_nvram.c Tue May 10 06:51:20 2016 (r299318) @@ -51,6 +51,7 @@ static efx_nvram_ops_t__efx_nvram_falco falcon_nvram_partn_rw_finish, /* envo_partn_rw_finish */ falcon_nvram_partn_get_version, /* envo_partn_get_version */ falcon_nvram_partn_set_version, /* envo_partn_set_version */ + NULL, /* envo_partn_validate */ }; #endif /* EFSYS_OPT_FALCON */ @@ -70,6 +71,7 @@ static efx_nvram_ops_t__efx_nvram_siena siena_nvram_partn_rw_finish,/* envo_partn_rw_finish */ siena_nvram_partn_get_version, /* envo_partn_get_version */ siena_nvram_partn_set_version, /* envo_partn_set_version */ + NULL, /* envo_partn_validate */ }; #endif /* EFSYS_OPT_SIENA */ @@ -89,6 +91,7 @@ static efx_nvram_ops_t__efx_nvram_ef10_ ef10_nvram_partn_rw_finish, /* envo_partn_rw_finish */ ef10_nvram_partn_get_version, /* envo_partn_get_version */ ef10_nvram_partn_set_version, /* envo_partn_set_version */ + ef10_nvram_buffer_validate, /* envo_buffer_validate */ }; #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */ @@ -446,6 +449,44 @@ fail1: return (rc); } +/* Validate buffer contents (before writing to flash) */ + __checkReturn efx_rc_t +efx_nvram_validate( + __inefx_nic_t *enp, + __inefx_nvram_type_t type, + __in_bcount(partn_size) caddr_t partn_data, + __insize_t partn_size) +{ + efx_nvram_ops_t *envop = enp->en_envop; + uint32_t partn; + efx_rc_t rc; + + EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); + EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); + EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM); + + EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES); + + + if ((rc = envop->envo_type_to_partn(enp, type, )) != 0) + goto fail1; + + if (envop->envo_type_to_partn != NULL && +