svn commit: r234993 - in head: sbin/geom/class/raid sys/geom/raid
Author: mav Date: Fri May 4 07:32:57 2012 New Revision: 234993 URL: http://svn.freebsd.org/changeset/base/234993 Log: Implement read-only support for volumes in optimal state (without using redundancy) for the following RAID levels: RAID4/5E/5EE/6/MDF. Modified: head/sbin/geom/class/raid/graid.8 head/sys/geom/raid/g_raid.c head/sys/geom/raid/tr_raid5.c Modified: head/sbin/geom/class/raid/graid.8 == --- head/sbin/geom/class/raid/graid.8 Fri May 4 02:26:15 2012 (r234992) +++ head/sbin/geom/class/raid/graid.8 Fri May 4 07:32:57 2012 (r234993) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 30, 2012 +.Dd May 3, 2012 .Dt GRAID 8 .Os .Sh NAME @@ -261,9 +261,11 @@ own risk: RAID1 (3+ disks), RAID10 (6+ d .Sh SUPPORTED RAID LEVELS The GEOM RAID class follows a modular design, allowing different RAID levels to be used. -Support for the following RAID levels is currently implemented: RAID0, RAID1, -RAID1E, RAID5, RAID10, SINGLE, CONCAT. -RAID5 support is read-only and only for volumes in optimal state. +Full support for the following RAID levels is currently implemented: +RAID0, RAID1, RAID1E, RAID10, SINGLE, CONCAT. +The following RAID levels supported as read-only for volumes in optimal +state (without using redundancy): RAID4, RAID5, RAID5E, RAID5EE, RAID6, +RAIDMDF. .Sh RAID LEVEL MIGRATION The GEOM RAID class has no support for RAID level migration, allowed by some metadata formats. Modified: head/sys/geom/raid/g_raid.c == --- head/sys/geom/raid/g_raid.c Fri May 4 02:26:15 2012(r234992) +++ head/sys/geom/raid/g_raid.c Fri May 4 07:32:57 2012(r234993) @@ -376,17 +376,17 @@ g_raid_volume_str2level(const char *str, else if (strcasecmp(str, "RAID3-P0") == 0) { *level = G_RAID_VOLUME_RL_RAID3; *qual = G_RAID_VOLUME_RLQ_R3P0; - } else if (strcasecmp(str, "RAID3-PN") == 0 && + } else if (strcasecmp(str, "RAID3-PN") == 0 || strcasecmp(str, "RAID3") == 0) { *level = G_RAID_VOLUME_RL_RAID3; - *qual = G_RAID_VOLUME_RLQ_R3P0; + *qual = G_RAID_VOLUME_RLQ_R3PN; } else if (strcasecmp(str, "RAID4-P0") == 0) { *level = G_RAID_VOLUME_RL_RAID4; *qual = G_RAID_VOLUME_RLQ_R4P0; - } else if (strcasecmp(str, "RAID4-PN") == 0 && + } else if (strcasecmp(str, "RAID4-PN") == 0 || strcasecmp(str, "RAID4") == 0) { *level = G_RAID_VOLUME_RL_RAID4; - *qual = G_RAID_VOLUME_RLQ_R4P0; + *qual = G_RAID_VOLUME_RLQ_R4PN; } else if (strcasecmp(str, "RAID5-RA") == 0) { *level = G_RAID_VOLUME_RL_RAID5; *qual = G_RAID_VOLUME_RLQ_R5RA; Modified: head/sys/geom/raid/tr_raid5.c == --- head/sys/geom/raid/tr_raid5.c Fri May 4 02:26:15 2012 (r234992) +++ head/sys/geom/raid/tr_raid5.c Fri May 4 07:32:57 2012 (r234993) @@ -106,9 +106,16 @@ g_raid_tr_taste_raid5(struct g_raid_tr_o trs = (struct g_raid_tr_raid5_object *)tr; qual = tr->tro_volume->v_raid_level_qualifier; - if (tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5 && + if (tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID4 && + qual >= 0 && qual <= 1) { + /* RAID4 */ + } else if ((tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5 || +tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5E || +tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5EE || +tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID6 || +tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAIDMDF) && qual >= 0 && qual <= 3) { - /* RAID5 */ + /* RAID5/5E/5EE/6/MDF */ } else return (G_RAID_TR_TASTE_FAIL); trs->trso_starting = 1; @@ -203,30 +210,55 @@ g_raid_tr_iostart_raid5_read(struct g_ra struct bio *cbp; char *addr; off_t offset, start, length, nstripe, remain; - int no, pno; - u_int strip_size, qual; + int no, pno, ddisks, pdisks; + u_int strip_size, lvl, qual; vol = tr->tro_volume; addr = bp->bio_data; strip_size = vol->v_strip_size; + lvl = tr->tro_volume->v_raid_level; qual = tr->tro_volume->v_raid_level_qualifier; /* Stripe number. */ nstripe = bp->bio_offset / strip_size; /* Start position in stripe. */ start = bp->bio_offset % strip_size; + /* Number of data and parity disks. */ + if (lvl == G_RAID_VOLUME_RL_RAIDMDF) + pdisks = 3; + else if (lvl == G_RAID_VOLUME_RL_RAID5EE || + lvl ==
svn commit: r234994 - head/sys/geom/raid
Author: mav Date: Fri May 4 08:59:19 2012 New Revision: 234994 URL: http://svn.freebsd.org/changeset/base/234994 Log: Fix bug causing memory corruption and panics with big-endian metadata. Modified: head/sys/geom/raid/md_ddf.c Modified: head/sys/geom/raid/md_ddf.c == --- head/sys/geom/raid/md_ddf.c Fri May 4 07:32:57 2012(r234993) +++ head/sys/geom/raid/md_ddf.c Fri May 4 08:59:19 2012(r234994) @@ -789,7 +789,7 @@ ddf_meta_update(struct ddf_meta *meta, s if (isff(spde->PD_GUID, 24)) continue; j = ddf_meta_find_pd(meta, NULL, - src->pdr->entry[i].PD_Reference); + GET32(src, pdr->entry[i].PD_Reference)); if (j < 0) { j = ddf_meta_find_pd(meta, NULL, 0x); pde = &meta->pdr->entry[j]; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r234995 - head/sys/netinet
Author: tuexen Date: Fri May 4 09:27:00 2012 New Revision: 234995 URL: http://svn.freebsd.org/changeset/base/234995 Log: Use SCTP_PRINTF() instead of printf() in all SCTP sources. MFC after: 3 days Modified: head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_cc_functions.c head/sys/netinet/sctp_crc32.c head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_auth.c == --- head/sys/netinet/sctp_auth.cFri May 4 08:59:19 2012 (r234994) +++ head/sys/netinet/sctp_auth.cFri May 4 09:27:00 2012 (r234995) @@ -284,16 +284,16 @@ sctp_print_key(sctp_key_t * key, const c uint32_t i; if (key == NULL) { - printf("%s: [Null key]\n", str); + SCTP_PRINTF("%s: [Null key]\n", str); return; } - printf("%s: len %u, ", str, key->keylen); + SCTP_PRINTF("%s: len %u, ", str, key->keylen); if (key->keylen) { for (i = 0; i < key->keylen; i++) - printf("%02x", key->key[i]); - printf("\n"); + SCTP_PRINTF("%02x", key->key[i]); + SCTP_PRINTF("\n"); } else { - printf("[Null key]\n"); + SCTP_PRINTF("[Null key]\n"); } } @@ -303,16 +303,16 @@ sctp_show_key(sctp_key_t * key, const ch uint32_t i; if (key == NULL) { - printf("%s: [Null key]\n", str); + SCTP_PRINTF("%s: [Null key]\n", str); return; } - printf("%s: len %u, ", str, key->keylen); + SCTP_PRINTF("%s: len %u, ", str, key->keylen); if (key->keylen) { for (i = 0; i < key->keylen; i++) - printf("%02x", key->key[i]); - printf("\n"); + SCTP_PRINTF("%02x", key->key[i]); + SCTP_PRINTF("\n"); } else { - printf("[Null key]\n"); + SCTP_PRINTF("[Null key]\n"); } } Modified: head/sys/netinet/sctp_bsd_addr.c == --- head/sys/netinet/sctp_bsd_addr.cFri May 4 08:59:19 2012 (r234994) +++ head/sys/netinet/sctp_bsd_addr.cFri May 4 09:27:00 2012 (r234995) @@ -483,7 +483,7 @@ again_locked: } /* Sanity check */ if (thisend >= SCTP_PACKET_LOG_SIZE) { - printf("Insanity stops a log thisbegin:%d thisend:%d writers:%d lock:%d end:%d\n", + SCTP_PRINTF("Insanity stops a log thisbegin:%d thisend:%d writers:%d lock:%d end:%d\n", thisbegin, thisend, SCTP_BASE_VAR(packet_log_writers), Modified: head/sys/netinet/sctp_cc_functions.c == --- head/sys/netinet/sctp_cc_functions.cFri May 4 08:59:19 2012 (r234994) +++ head/sys/netinet/sctp_cc_functions.cFri May 4 09:27:00 2012 (r234995) @@ -1594,9 +1594,7 @@ sctp_hs_cwnd_increase(struct sctp_tcb *s cur_val = net->cwnd >> 10; indx = SCTP_HS_TABLE_SIZE - 1; -#ifdef SCTP_DEBUG - printf("HS CC CAlled.\n"); -#endif + if (cur_val < sctp_cwnd_adjust[0].cwnd) { /* normal mode */ if (net->net_ack > net->mtu) { Modified: head/sys/netinet/sctp_crc32.c == --- head/sys/netinet/sctp_crc32.c Fri May 4 08:59:19 2012 (r234994) +++ head/sys/netinet/sctp_crc32.c Fri May 4 09:27:00 2012 (r234995) @@ -134,7 +134,7 @@ sctp_delayed_cksum(struct mbuf *m, uint3 offset += offsetof(struct sctphdr, checksum); if (offset + sizeof(uint32_t) > (uint32_t) (m->m_len)) { - printf("sctp_delayed_cksum(): m->len: %d, off: %d.\n", + SCTP_PRINTF("sctp_delayed_cksum(): m->len: %d, off: %d.\n", (uint32_t) m->m_len, offset); /* * XXX this shouldn't happen, but if it does, the correct Modified: head/sys/netinet/sctp_indata.c == --- head/sys/netinet/sctp_indata.c Fri May 4 08:59:19 2012 (r234994) +++ head/sys/netinet/sctp_indata.c Fri May 4 09:27:00 2012 (r234995) @@ -328,7 +328,7 @@ sctp_mark_non_revokable(struct sctp_asso } SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { - printf("gap:%x tsn:%x\n", gap, tsn); + SCTP_PRINTF("gap:%x tsn:%x\n",
svn commit: r234996 - head/sys/netinet
Author: tuexen Date: Fri May 4 10:06:08 2012 New Revision: 234996 URL: http://svn.freebsd.org/changeset/base/234996 Log: Call panic() only under INVARIANTS. MFC after: 3 days Modified: head/sys/netinet/sctp_crc32.c Modified: head/sys/netinet/sctp_crc32.c == --- head/sys/netinet/sctp_crc32.c Fri May 4 09:27:00 2012 (r234995) +++ head/sys/netinet/sctp_crc32.c Fri May 4 10:06:08 2012 (r234996) @@ -124,7 +124,9 @@ void sctp_delayed_cksum(struct mbuf *m, uint32_t offset) { #if defined(SCTP_WITH_NO_CSUM) +#ifdef INVARIANTS panic("sctp_delayed_cksum() called when using no SCTP CRC."); +#endif #else uint32_t checksum; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r234997 - head/lib/libc/net
Author: tuexen Date: Fri May 4 10:26:50 2012 New Revision: 234997 URL: http://svn.freebsd.org/changeset/base/234997 Log: Remove debug output. MFC after: 3 days Modified: head/lib/libc/net/sctp_sys_calls.c Modified: head/lib/libc/net/sctp_sys_calls.c == --- head/lib/libc/net/sctp_sys_calls.c Fri May 4 10:06:08 2012 (r234996) +++ head/lib/libc/net/sctp_sys_calls.c Fri May 4 10:26:50 2012 (r234997) @@ -800,7 +800,6 @@ continue_send: } sinfo->sinfo_assoc_id = sctp_getassocid(sd, addrs); if (sinfo->sinfo_assoc_id == 0) { - printf("Huh, can't get associd? TSNH!\n"); (void)setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X_COMPLETE, (void *)addrs, (socklen_t) addrs->sa_len); errno = ENOENT; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235000 - in stable/9/sys: dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/misc dev/usb/net dev/usb/serial dev/usb/storage dev/usb/template dev/usb/wlan netgraph/bluetoot...
Author: hselasky Date: Fri May 4 15:05:30 2012 New Revision: 235000 URL: http://svn.freebsd.org/changeset/base/235000 Log: MFC r233774: Fix compiler warnings, mostly signed issues, when USB modules are compiled with WARNS=9. Modified: stable/9/sys/dev/sound/usb/uaudio.c stable/9/sys/dev/sound/usb/uaudioreg.h stable/9/sys/dev/usb/controller/at91dci.c stable/9/sys/dev/usb/controller/atmegadci.c stable/9/sys/dev/usb/controller/avr32dci.c stable/9/sys/dev/usb/controller/ehci.c stable/9/sys/dev/usb/controller/musb_otg.c stable/9/sys/dev/usb/controller/ohci.c stable/9/sys/dev/usb/controller/uhci.c stable/9/sys/dev/usb/controller/uss820dci.c stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/input/atp.c stable/9/sys/dev/usb/input/uep.c stable/9/sys/dev/usb/input/uhid.c stable/9/sys/dev/usb/input/ukbd.c stable/9/sys/dev/usb/input/ums.c stable/9/sys/dev/usb/misc/ufm.c stable/9/sys/dev/usb/net/if_aue.c stable/9/sys/dev/usb/net/if_axe.c stable/9/sys/dev/usb/net/if_cdce.c stable/9/sys/dev/usb/net/if_cue.c stable/9/sys/dev/usb/net/if_ipheth.c stable/9/sys/dev/usb/net/if_kue.c stable/9/sys/dev/usb/net/if_rue.c stable/9/sys/dev/usb/net/if_udav.c stable/9/sys/dev/usb/net/if_usie.c stable/9/sys/dev/usb/net/ruephy.c stable/9/sys/dev/usb/net/uhso.c stable/9/sys/dev/usb/serial/ubsa.c stable/9/sys/dev/usb/serial/uchcom.c stable/9/sys/dev/usb/serial/ucycom.c stable/9/sys/dev/usb/serial/ufoma.c stable/9/sys/dev/usb/serial/ulpt.c stable/9/sys/dev/usb/serial/umodem.c stable/9/sys/dev/usb/serial/uplcom.c stable/9/sys/dev/usb/serial/usb_serial.c stable/9/sys/dev/usb/serial/usb_serial.h stable/9/sys/dev/usb/storage/umass.c stable/9/sys/dev/usb/storage/urio.c stable/9/sys/dev/usb/storage/ustorage_fs.c stable/9/sys/dev/usb/template/usb_template.c stable/9/sys/dev/usb/usb_busdma.c stable/9/sys/dev/usb/usb_compat_linux.c stable/9/sys/dev/usb/usb_dev.c stable/9/sys/dev/usb/usb_device.c stable/9/sys/dev/usb/usb_handle_request.c stable/9/sys/dev/usb/usb_hid.c stable/9/sys/dev/usb/usb_hub.c stable/9/sys/dev/usb/usb_msctest.c stable/9/sys/dev/usb/usb_request.c stable/9/sys/dev/usb/usb_transfer.c stable/9/sys/dev/usb/usbdi.h stable/9/sys/dev/usb/usbhid.h stable/9/sys/dev/usb/wlan/if_rum.c stable/9/sys/dev/usb/wlan/if_run.c stable/9/sys/dev/usb/wlan/if_uath.c stable/9/sys/dev/usb/wlan/if_upgt.c stable/9/sys/dev/usb/wlan/if_ural.c stable/9/sys/dev/usb/wlan/if_urtw.c stable/9/sys/dev/usb/wlan/if_zyd.c stable/9/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c == --- stable/9/sys/dev/sound/usb/uaudio.c Fri May 4 14:10:54 2012 (r234999) +++ stable/9/sys/dev/sound/usb/uaudio.c Fri May 4 15:05:30 2012 (r235000) @@ -1272,15 +1272,15 @@ uaudio_chan_record_callback(struct usb_x { struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint32_t n; - uint32_t m; - uint32_t blockcount; uint32_t offset0; uint32_t offset1; uint32_t mfl; + int m; + int n; int len; int actlen; int nframes; + int blockcount; usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); mfl = usbd_xfer_max_framelen(xfer); @@ -1307,9 +1307,9 @@ uaudio_chan_record_callback(struct usb_x m = (ch->end - ch->cur); - if (m > len) { + if (m > len) m = len; - } + usbd_copy_out(pc, offset1, ch->cur, m); len -= m; @@ -1884,10 +1884,10 @@ uaudio_mixer_add_selector(struct uaudio_ static uint32_t uaudio_mixer_feature_get_bmaControls(const struct usb_audio_feature_unit *d, -uint8_t index) +uint8_t i) { uint32_t temp = 0; - uint32_t offset = (index * d->bControlSize); + uint32_t offset = (i * d->bControlSize); if (d->bControlSize > 0) { temp |= d->bmaControls[offset]; @@ -2636,8 +2636,8 @@ uaudio_mixer_feature_name(const struct u return (uat->feature); } -const static struct uaudio_terminal_node * -uaudio_mixer_get_input(const struct uaudio_terminal_node *iot, uint8_t index) +static const struct uaudio_terminal_node * +uaudio_mixer_get_input(const struct uaudio_terminal_node *iot, uint8_t i) { struct uaudio_terminal_node *root = iot->root; uint8_t n; @@ -2645,17 +2645,16 @@ uaudio_mixer_get_input(const struct uaud n = iot->usr.id_max; do { if (iot->usr.bit_input[n / 8] & (1 << (n % 8))) { - if (!index--) { + if (!i--) re
svn commit: r235001 - in stable/9/sys/dev/usb: . controller
Author: hselasky Date: Fri May 4 15:10:49 2012 New Revision: 235001 URL: http://svn.freebsd.org/changeset/base/235001 Log: MFC r234803 and r234961: Add support for Multi-TT mode of modern USB HUBs. This will give you more bandwidth for isochronous FULL speed applications connected through a High Speed HUB. This patch has been tested with XHCI and EHCI. Modified: stable/9/sys/dev/usb/controller/ehci.c stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/usb_controller.h stable/9/sys/dev/usb/usb_hub.c stable/9/sys/dev/usb/usb_hub.h stable/9/sys/dev/usb/usb_transfer.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/usb/controller/ehci.c == --- stable/9/sys/dev/usb/controller/ehci.c Fri May 4 15:05:30 2012 (r235000) +++ stable/9/sys/dev/usb/controller/ehci.c Fri May 4 15:10:49 2012 (r235001) @@ -2398,9 +2398,9 @@ ehci_device_isoc_fs_open(struct usb_xfer EHCI_SITD_SET_HUBA(xfer->xroot->udev->hs_hub_addr) | EHCI_SITD_SET_PORT(xfer->xroot->udev->hs_port_no); - if (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN) { + if (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN) sitd_portaddr |= EHCI_SITD_SET_DIR_IN; - } + sitd_portaddr = htohc32(sc, sitd_portaddr); /* initialize all TD's */ @@ -2436,9 +2436,6 @@ ehci_device_isoc_fs_enter(struct usb_xfe { struct usb_page_search buf_res; ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); - struct usb_fs_isoc_schedule *fss_start; - struct usb_fs_isoc_schedule *fss_end; - struct usb_fs_isoc_schedule *fss; ehci_sitd_t *td; ehci_sitd_t *td_last = NULL; ehci_sitd_t **pp_last; @@ -2450,7 +2447,6 @@ ehci_device_isoc_fs_enter(struct usb_xfe uint16_t tlen; uint8_t sa; uint8_t sb; - uint8_t error; #ifdef USB_DEBUG uint8_t once = 1; @@ -2495,9 +2491,8 @@ ehci_device_isoc_fs_enter(struct usb_xfe * pre-compute when the isochronous transfer will be finished: */ xfer->isoc_time_complete = - usbd_fs_isoc_schedule_isoc_time_expand - (xfer->xroot->udev, &fss_start, &fss_end, nframes) + buf_offset + - xfer->nframes; + usb_isoc_time_expand(&sc->sc_bus, nframes) + + buf_offset + xfer->nframes; /* get the real number of frames */ @@ -2520,19 +2515,14 @@ ehci_device_isoc_fs_enter(struct usb_xfe xfer->qh_pos = xfer->endpoint->isoc_next; - fss = fss_start + (xfer->qh_pos % USB_ISOC_TIME_MAX); - while (nframes--) { if (td == NULL) { panic("%s:%d: out of TD's\n", __FUNCTION__, __LINE__); } - if (pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) { + if (pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) pp_last = &sc->sc_isoc_fs_p_last[0]; - } - if (fss >= fss_end) { - fss = fss_start; - } + /* reuse sitd_portaddr and sitd_back from last transfer */ if (*plen > xfer->max_frame_size) { @@ -2547,17 +2537,19 @@ ehci_device_isoc_fs_enter(struct usb_xfe #endif *plen = xfer->max_frame_size; } - /* -* We currently don't care if the ISOCHRONOUS schedule is -* full! -*/ - error = usbd_fs_isoc_schedule_alloc(fss, &sa, *plen); - if (error) { + + /* allocate a slot */ + + sa = usbd_fs_isoc_schedule_alloc_slot(xfer, + xfer->isoc_time_complete - nframes - 1); + + if (sa == 255) { /* -* The FULL speed schedule is FULL! Set length -* to zero. +* Schedule is FULL, set length to zero: */ + *plen = 0; + sa = USB_FS_ISOC_UFRAME_MAX - 1; } if (*plen) { /* @@ -2637,7 +2629,6 @@ ehci_device_isoc_fs_enter(struct usb_xfe pp_last++; plen++; - fss++; td_last = td; td = td->obj_next; } @@ -2647,11 +2638,29 @@ ehci_device_isoc_fs_enter(struct usb_xfe /* update isoc_next */ xfer->endpoint->isoc_next = (pp_last - &sc->sc_isoc_fs_p_last[0]) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); + + /* +* We don't allow cancelling of the SPLIT transaction USB FULL +* speed transfer, because it disturbs the bandwidth +* computation algorithm. +*/ + xfer->flags_int.can_cancel_immed =
svn commit: r235002 - in stable/9/sys/dev/usb: . serial
Author: hselasky Date: Fri May 4 15:13:25 2012 New Revision: 235002 URL: http://svn.freebsd.org/changeset/base/235002 Log: MFC r234541: Add new USB ID to u3g driver. Modified: stable/9/sys/dev/usb/serial/u3g.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/usb/serial/u3g.c == --- stable/9/sys/dev/usb/serial/u3g.c Fri May 4 15:10:49 2012 (r235001) +++ stable/9/sys/dev/usb/serial/u3g.c Fri May 4 15:13:25 2012 (r235002) @@ -354,6 +354,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QISDA, H21_2, 0), U3G_DEV(QUALCOMM2, AC8700, 0), U3G_DEV(QUALCOMM2, MF330, 0), + U3G_DEV(QUALCOMM2, SIM5218, 0), U3G_DEV(QUALCOMM2, VW110L, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, AC2726, 0), U3G_DEV(QUALCOMMINC, AC8700, 0), Modified: stable/9/sys/dev/usb/usbdevs == --- stable/9/sys/dev/usb/usbdevsFri May 4 15:10:49 2012 (r235001) +++ stable/9/sys/dev/usb/usbdevsFri May 4 15:13:25 2012 (r235002) @@ -2680,6 +2680,7 @@ product QUALCOMM2 RWT_FCT 0x3100 RWT FCT product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem product QUALCOMM2 AC8700 0x6000 AC8700 product QUALCOMM2 VW110L 0x1000 Vertex Wireless 110L modem +product QUALCOMM2 SIM5218 0x9000 SIM5218 product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem product QUALCOMMINC E0002 0x0002 3G modem product QUALCOMMINC E0003 0x0003 3G modem ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235003 - stable/9/usr.sbin/usbdump
Author: hselasky Date: Fri May 4 15:18:00 2012 New Revision: 235003 URL: http://svn.freebsd.org/changeset/base/235003 Log: MFC r234636 and r234655: Improve support for USB packet filtering also when reading dumps, and allow filtered data to be dumped to a binary file. Add missing and probably also mandatory -h option. Modified: stable/9/usr.sbin/usbdump/usbdump.8 stable/9/usr.sbin/usbdump/usbdump.c Directory Properties: stable/9/usr.sbin/usbdump/ (props changed) Modified: stable/9/usr.sbin/usbdump/usbdump.8 == --- stable/9/usr.sbin/usbdump/usbdump.8 Fri May 4 15:13:25 2012 (r235002) +++ stable/9/usr.sbin/usbdump/usbdump.8 Fri May 4 15:18:00 2012 (r235003) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 16, 2012 +.Dd April 24, 2012 .Dt USBDUMP 8 .Os .Sh NAME @@ -39,6 +39,8 @@ .Op Fl v .Op Fl w Ar file .Op Fl f Ar filter +.Op Fl b Ar file +.Op Fl h .Sh DESCRIPTION The .Nm @@ -46,12 +48,17 @@ utility provides a way to dump USB packe .Pp The following options are accepted: .Bl -tag -width ".Fl f Ar file" +.It Fl b Ar file +Store data part of the USB trace in binary format to the given +.Ar file . +This option also works with the -r and -f options. .It Fl i Ar ifname Listen on USB bus interface .Ar ifname . .It Fl r Ar file Read the raw packets from .Ar file . +This option also works with the -f option. .It Fl s Ar snaplen Snapshot .Ar snaplen @@ -62,6 +69,7 @@ When defined multiple times the verbosit .It Fl w Ar file Write the raw packets to .Ar file . +This option also works with the -s and -v options. .It Fl f Ar filter The filter argument consists of either one or two numbers separated by a dot. The first indicates the device unit number which should be traced. @@ -72,6 +80,8 @@ If 128 is added to the endpoint number t A device unit or endpoint value of -1 means ignore this field. If no filters are specified, all packets are passed through using the default -1,-1 filter. This option can be specified multiple times. +.It Fl h +This option displays a summary of the command line options. .El .Sh EXAMPLES Capture the USB raw packets on usbus2: Modified: stable/9/usr.sbin/usbdump/usbdump.c == --- stable/9/usr.sbin/usbdump/usbdump.c Fri May 4 15:13:25 2012 (r235002) +++ stable/9/usr.sbin/usbdump/usbdump.c Fri May 4 15:18:00 2012 (r235003) @@ -82,6 +82,8 @@ struct usbcap { int wfd; /* for -r option */ int rfd; + /* for -b option */ + int bfd; }; struct usbcap_filehdr { @@ -112,6 +114,8 @@ static int uf_minor; static const char *i_arg = "usbus0"; static const char *r_arg = NULL; static const char *w_arg = NULL; +static const char *b_arg = NULL; +static struct usbcap uc; static const char *errstr_table[USB_ERR_MAX] = { [USB_ERR_NORMAL_COMPLETION] = "0", [USB_ERR_PENDING_REQUESTS] = "PENDING_REQUESTS", @@ -255,6 +259,22 @@ done: pprog->bf_insns = dynamic_insn; } +static int +match_filter(int unit, int endpoint) +{ + struct usb_filt *puf; + + if (STAILQ_FIRST(&usb_filt_head) == NULL) + return (1); + + STAILQ_FOREACH(puf, &usb_filt_head, entry) { + if ((puf->unit == -1 || puf->unit == unit) && + (puf->endpoint == -1 || puf->endpoint == endpoint)) + return (1); + } + return (0); +} + static void free_filter(struct bpf_program *pprog) { @@ -462,28 +482,33 @@ print_apacket(const struct header_32 *hd up->up_packet_count = le32toh(up->up_packet_count); up->up_endpoint = le32toh(up->up_endpoint); + if (!match_filter(up->up_address, up->up_endpoint)) + return; + tv.tv_sec = hdr->ts_sec; tv.tv_usec = hdr->ts_usec; tm = localtime(&tv.tv_sec); len = strftime(buf, sizeof(buf), "%H:%M:%S", tm); - printf("%.*s.%06ld usbus%d.%d %s-%s-EP=%08x,SPD=%s,NFR=%d,SLEN=%d,IVAL=%d%s%s\n", - (int)len, buf, tv.tv_usec, - (int)up->up_busunit, (int)up->up_address, - (up->up_type == USBPF_XFERTAP_SUBMIT) ? "SUBM" : "DONE", - xfertype_table[up->up_xfertype], - (unsigned int)up->up_endpoint, - usb_speedstr(up->up_speed), - (int)up->up_frames, - (int)(up->up_totlen - USBPF_HDR_LEN - - (USBPF_FRAME_HDR_LEN * up->up_frames)), - (int)up->up_interval, - (up->up_type == USBPF_XFERTAP_DONE) ? ",ERR=" : "", - (up->up_type == USBPF_XFERTAP_DONE) ? - usb_errstr(up->up_error) : ""); + if (verbose >= 0) { + printf("%.*s.%06ld usbus%d.%d %s-%s-EP=%08x,SPD=%s,NFR=%d,SLEN=%d,IVAL=%d%s%s\n", + (int)len, buf, tv.tv_usec, + (int)up->up_busun
svn commit: r235004 - stable/9/lib/libusb
Author: hselasky Date: Fri May 4 15:27:18 2012 New Revision: 235004 URL: http://svn.freebsd.org/changeset/base/235004 Log: MFC r233667, r234687, r234491, r234193, r233424: Fix some compile warnings. Fix some mdoc issues. Add missing LibUSB 1.0 API function. Modified: stable/9/lib/libusb/Makefile stable/9/lib/libusb/libusb.3 stable/9/lib/libusb/libusb.h stable/9/lib/libusb/libusb10.c stable/9/lib/libusb/libusb10_desc.c stable/9/lib/libusb/libusb10_io.c stable/9/lib/libusb/libusb20.3 stable/9/lib/libusb/libusb20.c stable/9/lib/libusb/libusb20_desc.c stable/9/lib/libusb/libusb20_ugen20.c Directory Properties: stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/Makefile == --- stable/9/lib/libusb/MakefileFri May 4 15:18:00 2012 (r235003) +++ stable/9/lib/libusb/MakefileFri May 4 15:27:18 2012 (r235004) @@ -48,6 +48,7 @@ MLINKS += libusb.3 libusb_get_bus_number MLINKS += libusb.3 libusb_get_device_address.3 MLINKS += libusb.3 libusb_get_device_speed.3 MLINKS += libusb.3 libusb_get_max_packet_size.3 +MLINKS += libusb.3 libusb_get_max_iso_packet_size.3 MLINKS += libusb.3 libusb_ref_device.3 MLINKS += libusb.3 libusb_unref_device.3 MLINKS += libusb.3 libusb_open.3 @@ -69,7 +70,7 @@ MLINKS += libusb.3 libusb_detach_kernel_ MLINKS += libusb.3 libusb_detach_kernel_driver_np.3 MLINKS += libusb.3 libusb_attach_kernel_driver.3 MLINKS += libusb.3 libusb_get_device_descriptor.3 -MLINKS += libusb.3 libsub_get_active_config_descriptor.3 +MLINKS += libusb.3 libusb_get_active_config_descriptor.3 MLINKS += libusb.3 libusb_get_config_descriptor.3 MLINKS += libusb.3 libusb_get_config_descriptor_by_value.3 MLINKS += libusb.3 libusb_free_config_descriptor.3 Modified: stable/9/lib/libusb/libusb.3 == --- stable/9/lib/libusb/libusb.3Fri May 4 15:18:00 2012 (r235003) +++ stable/9/lib/libusb/libusb.3Fri May 4 15:27:18 2012 (r235004) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd April 12, 2012 .Dt LIBUSB 3 .Os .Sh NAME @@ -43,7 +43,6 @@ The library contains interfaces for directly managing a usb device. The current implementation supports v1.0 of the libusb API. .Sh LIBRARY INITIALISATION / DEINITIALISATION -.Pp .Ft int .Fn libusb_init libusb_context **ctx This function initialises libusb. @@ -119,6 +118,12 @@ LIBUSB_SPEED_UNKNOWN is returned in case Returns the wMaxPacketSize value on success, LIBUSB_ERROR_NOT_FOUND if the endpoint does not exist and LIBUSB_ERROR_OTHERS on other failure. .Pp +.Ft int +.Fn libusb_get_max_iso_packet_size "libusb_device *dev" "unsigned char endpoint" +Returns the packet size multiplied by the packet multiplier on success, +LIBUSB_ERROR_NOT_FOUND if the endpoint does not exist and +LIBUSB_ERROR_OTHERS on other failure. +.Pp .Ft libusb_device * .Fn libusb_ref_device "libusb_device *dev" Increment the reference counter of the device @@ -270,9 +275,7 @@ LIBUSB_ERROR_NO_DEVICE if the device has been disconnected, LIBUSB_ERROR_BUSY if the driver cannot be attached because the interface is claimed by a program or driver and a LIBUSB_ERROR code on failure. -.Pp .Sh USB DESCRIPTORS -.Pp .Ft int .Fn libusb_get_device_descriptor "libusb_device *dev" "libusb_device_descriptor *desc" Get the USB device descriptor for the device @@ -282,7 +285,7 @@ Returns 0 on success and a LIBUSB_ERROR failure. .Pp .Ft int -.Fn libsub_get_active_config_descriptor "libusb_device *dev" "struct libusb_config_descriptor **config" +.Fn libusb_get_active_config_descriptor "libusb_device *dev" "struct libusb_config_descriptor **config" Get the USB configuration descriptor for the active configuration. Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the device is in @@ -349,9 +352,7 @@ libusb_free_bos_descriptor function. .Ft void .Fn libusb_free_bos_descriptor "libusb_bos_descriptor *bos" This function is NULL safe and frees a parsed BOS descriptor. -.Pp .Sh USB ASYNCHRONOUS I/O -.Pp .Ft struct libusb_transfer * .Fn libusb_alloc_transfer "int iso_packets" Allocate a transfer with the number of isochronous packet descriptors @@ -374,9 +375,7 @@ LIBUSB_ERROR code on other failure. .Fn libusb_cancel_transfer "struct libusb_transfer *tr" This function asynchronously cancels a transfer. Returns 0 on success and a LIBUSB_ERROR code on failure. -.Pp .Sh USB SYNCHRONOUS I/O -.Pp .Ft int .Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint8_t bRequest" "uint16_t wValue" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" Perform a USB control transfer. @@ -411,9 +410,7 @@ if the transfer timed out, LIBUSB_ERROR_ supported, LIBUSB_ERROR_OVERFLOW if the device offered more data, LIBUSB_ERROR_NO_DEVICE if the device has been disconnecte
svn commit: r235005 - head/usr.sbin/pc-sysinstall/backend
Author: jpaetzel Date: Fri May 4 15:31:35 2012 New Revision: 235005 URL: http://svn.freebsd.org/changeset/base/235005 Log: Use a unique zpool name during install, in the case of having another PC-BSD / FreeBSD zpool on the system for another install. Submitted by: kmoore Obtained from:PC-BSD MFC after:3 days Sponsored by: iXsystems Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh == --- head/usr.sbin/pc-sysinstall/backend/functions.shFri May 4 15:27:18 2012(r235004) +++ head/usr.sbin/pc-sysinstall/backend/functions.shFri May 4 15:31:35 2012(r235005) @@ -216,7 +216,7 @@ fetch_file() fetch -s "${FETCHFILE}" >${SIZEFILE} SIZE="`cat ${SIZEFILE}`" - SIZE="`expr ${SIZE} / 1024`" + SIZE=$((SIZE/1024)) echo "FETCH: ${FETCHFILE}" echo "FETCH: ${FETCHOUTFILE}" >>${LOGOUT} @@ -276,11 +276,22 @@ get_zpool_name() else # Need to generate a zpool name for this device NUM=`ls ${TMPDIR}/.zpools/ | wc -l | sed 's| ||g'` -NEWNAME="${BASENAME}${NUM}" + +# Is it used in another zpool? +while +z=1 +do + NEWNAME="${BASENAME}${NUM}" + zpool import | grep -q "${NEWNAME}" + if [ $? -ne 0 ] ; then break ; fi + NUM=$((NUM+1)) +done + +# Now save the new tank name mkdir -p ${TMPDIR}/.zpools/`dirname $DEVICE` echo "$NEWNAME" >${TMPDIR}/.zpools/${DEVICE} echo "${NEWNAME}" -return +return 0 fi }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235006 - head/usr.sbin/pc-sysinstall/backend
Author: jpaetzel Date: Fri May 4 15:36:51 2012 New Revision: 235006 URL: http://svn.freebsd.org/changeset/base/235006 Log: Add powerpc / powerpc64 support to pc-sysinstall. This patch will autodetect if on powerpc and use the APM gpart GEOM class automaticaly. At this time support for full disk installation is the only supported scheme. Submitted by: kmoore Obtained from:PC-BSD MFC after:3 days Sponsored by: iXsystems Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Fri May 4 15:31:35 2012(r235005) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Fri May 4 15:36:51 2012(r235006) @@ -177,6 +177,8 @@ setup_gpart_partitions() # Lets read in the config file now and setup our partitions if [ "${_pType}" = "gpt" ] ; then CURPART="2" + elif [ "${_pType}" = "apm" ] ; then +CURPART="3" else PARTLETTER="a" CURPART="1" @@ -255,6 +257,9 @@ setup_gpart_partitions() if [ "${CURPART}" = "2" -a "$_pType" = "gpt" ] ; then export FOUNDROOT="0" fi +if [ "${CURPART}" = "3" -a "$_pType" = "apm" ] ; then + export FOUNDROOT="0" +fi if [ "${CURPART}" = "1" -a "$_pType" = "mbr" ] ; then export FOUNDROOT="0" fi @@ -269,6 +274,9 @@ setup_gpart_partitions() if [ "${CURPART}" != "2" -a "${_pType}" = "gpt" ] ; then exit_err "/boot partition must be first partition" fi +if [ "${CURPART}" != "3" -a "${_pType}" = "apm" ] ; then +exit_err "/boot partition must be first partition" +fi if [ "${CURPART}" != "1" -a "${_pType}" = "mbr" ] ; then exit_err "/boot partition must be first partition" fi @@ -288,6 +296,8 @@ setup_gpart_partitions() # Get any extra options for this fs / line if [ "${_pType}" = "gpt" ] ; then get_fs_line_xvars "${_pDisk}p${CURPART}" "${STRING}" + elif [ "${_pType}" = "apm" ] ; then +get_fs_line_xvars "${_pDisk}s${CURPART}" "${STRING}" else get_fs_line_xvars "${_wSlice}${PARTLETTER}" "${STRING}" fi @@ -298,6 +308,8 @@ setup_gpart_partitions() if [ $? -eq 0 -a "$FS" = "ZFS" ] ; then if [ "${_pType}" = "gpt" -o "${_pType}" = "gptslice" ] ; then XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${_pDisk}p${CURPART}") +elif [ "${_pType}" = "apm" ] ; then + XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${_pDisk}s${CURPART}") else XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${_wSlice}${PARTLETTER}") fi @@ -323,6 +335,9 @@ setup_gpart_partitions() elif [ "${_pType}" = "gptslice" ]; then sleep 2 rc_halt "gpart add ${SOUT} -t ${PARTYPE} ${_wSlice}" + elif [ "${_pType}" = "apm" ]; then +sleep 2 +rc_halt "gpart add ${SOUT} -t ${PARTYPE} ${_pDisk}" else sleep 2 rc_halt "gpart add ${SOUT} -t ${PARTYPE} -i ${CURPART} ${_wSlice}" @@ -352,6 +367,18 @@ setup_gpart_partitions() if [ -n "${ENCPASS}" ] ; then echo "${ENCPASS}" >${PARTDIR}-enc/${_dFile}p${CURPART}-encpass fi + elif [ "${_pType}" = "apm" ] ; then + _dFile="`echo $_pDisk | sed 's|/|-|g'`" +echo "${FS}#${MNT}#${ENC}#${PLABEL}#GPT#${XTRAOPTS}" >${PARTDIR}/${_dFile}s${CURPART} + +# Clear out any headers +sleep 2 +dd if=/dev/zero of=${_pDisk}s${CURPART} count=2048 2>/dev/null + +# If we have a enc password, save it as well +if [ -n "${ENCPASS}" ] ; then + echo "${ENCPASS}" >${PARTDIR}-enc/${_dFile}s${CURPART}-encpass +fi else # MBR Partition or GPT slice _dFile="`echo $_wSlice | sed 's|/|-|g'`" @@ -368,9 +395,10 @@ setup_gpart_partitions() # Increment our parts counter - if [ "$_pType" = "gpt" ] ; then + if [ "$_pType" = "gpt" -o "$_pType" = "apm" ] ; then CURPART=$((CURPART+1)) -# If this is a gpt partition, we can continue and skip the MBR part letter stuff +# If this is a gpt/apm partition, +# we can continue and skip the MBR part letter stuff continue else CURPART=$((CURPART+1)) @@ -437,6 +465,9 @@ populate_disk_label() if [ "$type" = "mbr" ] ; then wrkslice="${diskid}s${slicenum}" fi + if [ "$type" = "apm" ] ; then +wrkslice="${diskid}s${slicenum}" + fi if [ "$type" = "gpt" -o "$type" = "gptslice" ] ; then wrkslice="${diskid}p${slicenum}" fi @@ -474,6 +505,9 @@ setup_disk_label() if [ "$type" = "gpt" -a ! -e "${disk}p${pnum}" ] ; then exit_err "ERROR:
svn commit: r235007 - stable/9/sys/dev/pci
Author: hselasky Date: Fri May 4 15:38:47 2012 New Revision: 235007 URL: http://svn.freebsd.org/changeset/base/235007 Log: MFC r233662, r233677 and r233678: Writing zero to BAR actually does not disable it and it is even harmful as hselasky found out. Historically, this code was originated from (OLDCARD) CardBus driver and later leaked into PCI driver when CardBus was newbus'ified and refactored with PCI driver. However, it is not really necessary even for CardBus. Modified: stable/9/sys/dev/pci/pci.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/pci/pci.c == --- stable/9/sys/dev/pci/pci.c Fri May 4 15:36:51 2012(r235006) +++ stable/9/sys/dev/pci/pci.c Fri May 4 15:38:47 2012(r235007) @@ -2746,16 +2746,15 @@ pci_add_map(device_t bus, device_t dev, prefetch ? RF_PREFETCHABLE : 0); if (res == NULL) { /* -* If the allocation fails, clear the BAR and delete -* the resource list entry to force -* pci_alloc_resource() to allocate resources from the -* parent. +* If the allocation fails, delete the resource list entry +* to force pci_alloc_resource() to allocate resources +* from the parent. */ resource_list_delete(rl, type, reg); - start = 0; - } else + } else { start = rman_get_start(res); - pci_write_bar(dev, pm, start); + pci_write_bar(dev, pm, start); + } return (barlen); } @@ -3824,7 +3823,7 @@ pci_describe_device(device_t dev) if ((desc = malloc(strlen(vp) + strlen(dp) + 3, M_DEVBUF, M_NOWAIT)) != NULL) sprintf(desc, "%s, %s", vp, dp); - out: +out: if (vp != NULL) free(vp, M_DEVBUF); if (dp != NULL) @@ -4100,7 +4099,7 @@ pci_reserve_map(device_t dev, device_t c count, *rid, type, rman_get_start(res)); map = rman_get_start(res); pci_write_bar(child, pm, map); -out:; +out: return (res); } @@ -4289,19 +4288,6 @@ pci_delete_resource(device_t dev, device type, rid, rman_get_start(rle->res)); return; } - -#ifndef __PCI_BAR_ZERO_VALID - /* -* If this is a BAR, clear the BAR so it stops -* decoding before releasing the resource. -*/ - switch (type) { - case SYS_RES_IOPORT: - case SYS_RES_MEMORY: - pci_write_bar(child, pci_find_bar(child, rid), 0); - break; - } -#endif resource_list_unreserve(rl, dev, child, type, rid); } resource_list_delete(rl, type, rid); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235008 - head/usr.sbin/pc-sysinstall/backend
Author: jpaetzel Date: Fri May 4 15:39:41 2012 New Revision: 235008 URL: http://svn.freebsd.org/changeset/base/235008 Log: Add bootcamp bootloader stamp Submitted by: kmoore Obtained from:PC-BSD MFC after:3 days Sponsored by: iXsystems Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Fri May 4 15:38:47 2012(r235007) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Fri May 4 15:39:41 2012(r235008) @@ -766,6 +766,10 @@ run_gpart_gpt_part() # Init the MBR partition rc_halt "gpart create -s BSD ${DISK}p${slicenum}" + # Stamp the bootloader + sleep 4 + rc_halt "gpart bootcode -b /boot/boot ${DISK}p${slicenum}" + # Set the slice to the format we'll be using for gpart later slice=`echo "${1}:${3}:gptslice" | sed 's|/|-|g'` ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235009 - head/sys/netinet
Author: tuexen Date: Fri May 4 15:49:08 2012 New Revision: 235009 URL: http://svn.freebsd.org/changeset/base/235009 Log: Add support for SCTP_STREAM_CHANGE_EVENT, SCTP_ASSOC_RESET_EVENT as required by RFC 6525. This also fixes SCTP_STREAM_RESET_EVENT. MFC after: 3 days Modified: head/sys/netinet/sctp.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp.h == --- head/sys/netinet/sctp.h Fri May 4 15:39:41 2012(r235008) +++ head/sys/netinet/sctp.h Fri May 4 15:49:08 2012(r235009) @@ -511,35 +511,37 @@ struct sctp_error_unrecognized_chunk { /* * PCB Features (in sctp_features bitmask) */ -#define SCTP_PCB_FLAGS_DO_NOT_PMTUD 0x0001 -#define SCTP_PCB_FLAGS_EXT_RCVINFO 0x0002 /* deprecated */ -#define SCTP_PCB_FLAGS_DONOT_HEARTBEAT 0x0004 -#define SCTP_PCB_FLAGS_FRAG_INTERLEAVE 0x0008 -#define SCTP_PCB_FLAGS_INTERLEAVE_STRMS0x0010 -#define SCTP_PCB_FLAGS_DO_ASCONF 0x0020 -#define SCTP_PCB_FLAGS_AUTO_ASCONF 0x0040 -#define SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE 0x0080 +#define SCTP_PCB_FLAGS_DO_NOT_PMTUD 0x0001 +#define SCTP_PCB_FLAGS_EXT_RCVINFO 0x0002/* deprecated */ +#define SCTP_PCB_FLAGS_DONOT_HEARTBEAT 0x0004 +#define SCTP_PCB_FLAGS_FRAG_INTERLEAVE 0x0008 +#define SCTP_PCB_FLAGS_INTERLEAVE_STRMS 0x0010 +#define SCTP_PCB_FLAGS_DO_ASCONF 0x0020 +#define SCTP_PCB_FLAGS_AUTO_ASCONF 0x0040 +#define SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE 0x0080 /* socket options */ -#define SCTP_PCB_FLAGS_NODELAY 0x0100 -#define SCTP_PCB_FLAGS_AUTOCLOSE 0x0200 -#define SCTP_PCB_FLAGS_RECVDATAIOEVNT 0x0400 /* deprecated */ -#define SCTP_PCB_FLAGS_RECVASSOCEVNT 0x0800 -#define SCTP_PCB_FLAGS_RECVPADDREVNT 0x1000 -#define SCTP_PCB_FLAGS_RECVPEERERR 0x2000 -#define SCTP_PCB_FLAGS_RECVSENDFAILEVNT0x4000 -#define SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT0x8000 -#define SCTP_PCB_FLAGS_ADAPTATIONEVNT 0x0001 -#define SCTP_PCB_FLAGS_PDAPIEVNT 0x0002 -#define SCTP_PCB_FLAGS_AUTHEVNT0x0004 -#define SCTP_PCB_FLAGS_STREAM_RESETEVNT 0x0008 -#define SCTP_PCB_FLAGS_NO_FRAGMENT 0x0010 -#define SCTP_PCB_FLAGS_EXPLICIT_EOR 0x0040 -#define SCTP_PCB_FLAGS_NEEDS_MAPPED_V4 0x0080 -#define SCTP_PCB_FLAGS_MULTIPLE_ASCONFS0x0100 -#define SCTP_PCB_FLAGS_PORTREUSE0x0200 -#define SCTP_PCB_FLAGS_DRYEVNT 0x0400 -#define SCTP_PCB_FLAGS_RECVRCVINFO 0x0800 -#define SCTP_PCB_FLAGS_RECVNXTINFO 0x1000 +#define SCTP_PCB_FLAGS_NODELAY 0x0100 +#define SCTP_PCB_FLAGS_AUTOCLOSE 0x0200 +#define SCTP_PCB_FLAGS_RECVDATAIOEVNT0x0400/* deprecated */ +#define SCTP_PCB_FLAGS_RECVASSOCEVNT 0x0800 +#define SCTP_PCB_FLAGS_RECVPADDREVNT 0x1000 +#define SCTP_PCB_FLAGS_RECVPEERERR 0x2000 +#define SCTP_PCB_FLAGS_RECVSENDFAILEVNT 0x4000 +#define SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT 0x8000 +#define SCTP_PCB_FLAGS_ADAPTATIONEVNT0x0001 +#define SCTP_PCB_FLAGS_PDAPIEVNT 0x0002 +#define SCTP_PCB_FLAGS_AUTHEVNT 0x0004 +#define SCTP_PCB_FLAGS_STREAM_RESETEVNT 0x0008 +#define SCTP_PCB_FLAGS_NO_FRAGMENT 0x0010 +#define SCTP_PCB_FLAGS_EXPLICIT_EOR 0x0040 +#define SCTP_PCB_FLAGS_NEEDS_MAPPED_V4 0x0080 +#define SCTP_PCB_FLAGS_MULTIPLE_ASCONFS 0x0100 +#define SCTP_PCB_FLAGS_PORTREUSE 0x0200 +#define SCTP_PCB_FLAGS_DRYEVNT 0x0400 +#define SCTP_PCB_FLAGS_RECVRCVINFO 0x0800 +#define SCTP_PCB_FLAGS_RECVNXTINFO 0x1000 +#define SCTP_PCB_FLAGS_ASSOC_RESETEVNT 0x2000 +#define SCTP_PCB_FLAGS_STREAM_CHANGEEVNT 0x4000 /*- * mobility_features parameters (by micchie).Note @@ -547,9 +549,9 @@ struct sctp_error_unrecognized_chunk { * sctp_mobility_features flags.. not the sctp_features * flags. */ -#define SCTP_MOBILITY_BASE 0x0001 -#define SCTP_MOBILITY_FASTHANDOFF 0x0002 -#define SCTP_MOBILITY_PRIM_DELETED 0x0004 +#define SCTP_MOBILITY_BASE 0x0001 +#define SCTP_MOBILITY_FASTHANDOFF0x0002 +#define SCTP_MOBILITY_PRIM_DELETED 0x0004 #define SCTP_SMALLEST_PMTU 512 /* smallest pmtu allowed when disabling PMTU Modified: head/sys/netinet/sctp_usrreq.c == --- head/sys/netinet/sctp_usrreq.c Fri May 4 15:39:41 2012 (r235008) +++ head/sys/netinet/sctp_usrreq.c Fri May 4 15:49:08 2012 (r235009) @@ -2983,6 +2983,12 @@ flags_out: SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOTSUP); error = ENOTSUP;
svn commit: r235010 - in stable/9/sys: i386/conf kern ufs/ufs
Author: jh Date: Fri May 4 15:51:23 2012 New Revision: 235010 URL: http://svn.freebsd.org/changeset/base/235010 Log: MFC r233875: Add a check for unsupported file flags to ufs_setattr(). Modified: stable/9/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/ufs/ufs/ufs_vnops.c == --- stable/9/sys/ufs/ufs/ufs_vnops.cFri May 4 15:49:08 2012 (r235009) +++ stable/9/sys/ufs/ufs/ufs_vnops.cFri May 4 15:51:23 2012 (r235010) @@ -528,6 +528,10 @@ ufs_setattr(ap) return (EINVAL); } if (vap->va_flags != VNOVAL) { + if ((vap->va_flags & ~(UF_NODUMP | UF_IMMUTABLE | UF_APPEND | + UF_OPAQUE | UF_NOUNLINK | SF_ARCHIVED | SF_IMMUTABLE | + SF_APPEND | SF_NOUNLINK | SF_SNAPSHOT)) != 0) + return (EOPNOTSUPP); if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235011 - in stable/8/sys/dev/usb: . controller
Author: hselasky Date: Fri May 4 15:55:31 2012 New Revision: 235011 URL: http://svn.freebsd.org/changeset/base/235011 Log: MFC r234803 and r234961: Add support for Multi-TT mode of modern USB HUBs. This will give you more bandwidth for isochronous FULL speed applications connected through a High Speed HUB. This patch has been tested with XHCI and EHCI. Modified: stable/8/sys/dev/usb/controller/ehci.c stable/8/sys/dev/usb/controller/xhci.c stable/8/sys/dev/usb/usb_controller.h stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usb_hub.h stable/8/sys/dev/usb/usb_transfer.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci.c == --- stable/8/sys/dev/usb/controller/ehci.c Fri May 4 15:51:23 2012 (r235010) +++ stable/8/sys/dev/usb/controller/ehci.c Fri May 4 15:55:31 2012 (r235011) @@ -2398,9 +2398,9 @@ ehci_device_isoc_fs_open(struct usb_xfer EHCI_SITD_SET_HUBA(xfer->xroot->udev->hs_hub_addr) | EHCI_SITD_SET_PORT(xfer->xroot->udev->hs_port_no); - if (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN) { + if (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN) sitd_portaddr |= EHCI_SITD_SET_DIR_IN; - } + sitd_portaddr = htohc32(sc, sitd_portaddr); /* initialize all TD's */ @@ -2436,9 +2436,6 @@ ehci_device_isoc_fs_enter(struct usb_xfe { struct usb_page_search buf_res; ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); - struct usb_fs_isoc_schedule *fss_start; - struct usb_fs_isoc_schedule *fss_end; - struct usb_fs_isoc_schedule *fss; ehci_sitd_t *td; ehci_sitd_t *td_last = NULL; ehci_sitd_t **pp_last; @@ -2450,7 +2447,6 @@ ehci_device_isoc_fs_enter(struct usb_xfe uint16_t tlen; uint8_t sa; uint8_t sb; - uint8_t error; #ifdef USB_DEBUG uint8_t once = 1; @@ -2495,9 +2491,8 @@ ehci_device_isoc_fs_enter(struct usb_xfe * pre-compute when the isochronous transfer will be finished: */ xfer->isoc_time_complete = - usbd_fs_isoc_schedule_isoc_time_expand - (xfer->xroot->udev, &fss_start, &fss_end, nframes) + buf_offset + - xfer->nframes; + usb_isoc_time_expand(&sc->sc_bus, nframes) + + buf_offset + xfer->nframes; /* get the real number of frames */ @@ -2520,19 +2515,14 @@ ehci_device_isoc_fs_enter(struct usb_xfe xfer->qh_pos = xfer->endpoint->isoc_next; - fss = fss_start + (xfer->qh_pos % USB_ISOC_TIME_MAX); - while (nframes--) { if (td == NULL) { panic("%s:%d: out of TD's\n", __FUNCTION__, __LINE__); } - if (pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) { + if (pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) pp_last = &sc->sc_isoc_fs_p_last[0]; - } - if (fss >= fss_end) { - fss = fss_start; - } + /* reuse sitd_portaddr and sitd_back from last transfer */ if (*plen > xfer->max_frame_size) { @@ -2547,17 +2537,19 @@ ehci_device_isoc_fs_enter(struct usb_xfe #endif *plen = xfer->max_frame_size; } - /* -* We currently don't care if the ISOCHRONOUS schedule is -* full! -*/ - error = usbd_fs_isoc_schedule_alloc(fss, &sa, *plen); - if (error) { + + /* allocate a slot */ + + sa = usbd_fs_isoc_schedule_alloc_slot(xfer, + xfer->isoc_time_complete - nframes - 1); + + if (sa == 255) { /* -* The FULL speed schedule is FULL! Set length -* to zero. +* Schedule is FULL, set length to zero: */ + *plen = 0; + sa = USB_FS_ISOC_UFRAME_MAX - 1; } if (*plen) { /* @@ -2637,7 +2629,6 @@ ehci_device_isoc_fs_enter(struct usb_xfe pp_last++; plen++; - fss++; td_last = td; td = td->obj_next; } @@ -2647,11 +2638,29 @@ ehci_device_isoc_fs_enter(struct usb_xfe /* update isoc_next */ xfer->endpoint->isoc_next = (pp_last - &sc->sc_isoc_fs_p_last[0]) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); + + /* +* We don't allow cancelling of the SPLIT transaction USB FULL +* speed transfer, because it disturbs the bandwidth +* computation algorithm. +*/ + xfer->flags_int.can_cancel_immed =
svn commit: r235012 - in stable/8/sys/dev/usb: . serial
Author: hselasky Date: Fri May 4 15:57:05 2012 New Revision: 235012 URL: http://svn.freebsd.org/changeset/base/235012 Log: MFC r234541: Add new USB ID to u3g driver. Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c == --- stable/8/sys/dev/usb/serial/u3g.c Fri May 4 15:55:31 2012 (r235011) +++ stable/8/sys/dev/usb/serial/u3g.c Fri May 4 15:57:05 2012 (r235012) @@ -354,6 +354,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QISDA, H21_2, 0), U3G_DEV(QUALCOMM2, AC8700, 0), U3G_DEV(QUALCOMM2, MF330, 0), + U3G_DEV(QUALCOMM2, SIM5218, 0), U3G_DEV(QUALCOMM2, VW110L, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, AC2726, 0), U3G_DEV(QUALCOMMINC, AC8700, 0), Modified: stable/8/sys/dev/usb/usbdevs == --- stable/8/sys/dev/usb/usbdevsFri May 4 15:55:31 2012 (r235011) +++ stable/8/sys/dev/usb/usbdevsFri May 4 15:57:05 2012 (r235012) @@ -2668,6 +2668,7 @@ product QUALCOMM2 RWT_FCT 0x3100 RWT FCT product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem product QUALCOMM2 AC8700 0x6000 AC8700 product QUALCOMM2 VW110L 0x1000 Vertex Wireless 110L modem +product QUALCOMM2 SIM5218 0x9000 SIM5218 product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem product QUALCOMMINC E0002 0x0002 3G modem product QUALCOMMINC E0003 0x0003 3G modem ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235013 - in head/sys/powerpc: aim include
Author: nwhitehorn Date: Fri May 4 16:00:22 2012 New Revision: 235013 URL: http://svn.freebsd.org/changeset/base/235013 Log: Fix final bugs in memory barriers on PowerPC: - Use isync/lwsync unconditionally for acquire/release. Use of isync guarantees a complete memory barrier, which is important for serialization of bus space accesses with mutexes on multi-processor systems. - Go back to using sync as the I/O memory barrier, which solves the same problem as above with respect to mutex release using lwsync, while not penalizing non-I/O operations like a return to sync on the atomic release operations would. - Place an acquisition barrier around thread lock acquisition in cpu_switchin(). Modified: head/sys/powerpc/aim/swtch32.S head/sys/powerpc/aim/swtch64.S head/sys/powerpc/include/atomic.h head/sys/powerpc/include/pio.h Modified: head/sys/powerpc/aim/swtch32.S == --- head/sys/powerpc/aim/swtch32.S Fri May 4 15:57:05 2012 (r235012) +++ head/sys/powerpc/aim/swtch32.S Fri May 4 16:00:22 2012 (r235013) @@ -124,7 +124,8 @@ cpu_switchin: blocked_loop: lwz %r7,TD_LOCK(%r2) cmpw%r6,%r7 - beq blocked_loop + beq-blocked_loop + isync #endif mfsprg %r7,0 /* Get the pcpu pointer */ Modified: head/sys/powerpc/aim/swtch64.S == --- head/sys/powerpc/aim/swtch64.S Fri May 4 15:57:05 2012 (r235012) +++ head/sys/powerpc/aim/swtch64.S Fri May 4 16:00:22 2012 (r235013) @@ -150,7 +150,8 @@ cpu_switchin: blocked_loop: ld %r7,TD_LOCK(%r13) cmpd%r6,%r7 - beq blocked_loop + beq-blocked_loop + isync #endif mfsprg %r7,0 /* Get the pcpu pointer */ Modified: head/sys/powerpc/include/atomic.h == --- head/sys/powerpc/include/atomic.h Fri May 4 15:57:05 2012 (r235012) +++ head/sys/powerpc/include/atomic.h Fri May 4 16:00:22 2012 (r235013) @@ -51,13 +51,8 @@ * with the atomic lXarx/stXcx. sequences below. See Appendix B.2 of Book II * of the architecture manual. */ -#ifdef __powerpc64__ -#define __ATOMIC_REL() __asm __volatile("lwsync" : : : "memory") -#define __ATOMIC_ACQ() __asm __volatile("lwsync" : : : "memory") -#else #define __ATOMIC_REL() __asm __volatile("lwsync" : : : "memory") #define __ATOMIC_ACQ() __asm __volatile("isync" : : : "memory") -#endif /* * atomic_add(p, v) Modified: head/sys/powerpc/include/pio.h == --- head/sys/powerpc/include/pio.h Fri May 4 15:57:05 2012 (r235012) +++ head/sys/powerpc/include/pio.h Fri May 4 16:00:22 2012 (r235013) @@ -39,7 +39,12 @@ * I/O macros. */ -#define powerpc_iomb() __asm __volatile("eieio" : : : "memory") +/* + * Use sync so that bus space operations cannot sneak out the bottom of + * mutex-protected sections (mutex release does not guarantee completion of + * accesses to caching-inhibited memory on some systems) + */ +#define powerpc_iomb() __asm __volatile("sync" : : : "memory") static __inline void __outb(volatile u_int8_t *a, u_int8_t v) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235014 - head/sys/dev/mfi
Author: ambrisko Date: Fri May 4 16:00:39 2012 New Revision: 235014 URL: http://svn.freebsd.org/changeset/base/235014 Log: First fix pr 167226: ThunderBolt cannot read sector >= 2^32 or 2^21 with supplied patch. Second the bigger change, fix RAID operation on ThunderBolt base card such as physically removing a disk from a RAID and replacing it. The current situation is the RAID firmware effectively hangs waiting for an acknowledgement from the driver. This is due to the firmware support of the driver actually accessing the RAID from under the firmware. This is an interesting feature that the FreeBSD driver does not use. However, when the firmare detects the driver has attached it then expects the driver will synchronize LD's with the firmware. If the driver does not sync. then the management part of the firmware will hang waiting for it so a pulled driver will listed as still there. The fix for this problem isn't extremely difficult. However, figuring out why some of the code was the way it was and then redoing it was involved. Not have a spec. made it harder to try to figure out. The existing driver would send a MFI_DCMD_LD_MAP_GET_INFO command in write mode to acknowledge a LD state change. In read mode it gets the RAID map from the firmware. The FreeBSD driver doesn't do that currently. It could be added in the future with the appropriate structures. To simplify things, get the current LD state and then build the MFI_DCMD_LD_MAP_GET_INFO/write command so that it sends an acknowledgement for each LD. The map would probably state which LD's changed so then the driver could probably just acknowledge the LD's that changed versus all. This doesn't seem to be a problem. When a MFI_DCMD_LD_MAP_GET_INFO/write command is sent to the firmware, it will complete later when a change to the LD's happen. So it is very much like an AEN command returning when something happened. When the MFI_DCMD_LD_MAP_GET_INFO/write command completes, we refire the sync'ing of the LD state. This needs to be done in as an event so that MFI_DCMD_LD_GET_LIST can wait for that command to complete before issuing the MFI_DCMD_LD_MAP_GET_INFO/write. The prior code didn't use the call-back function and tried to intercept the MFI_DCMD_LD_MAP_GET_INFO/write command when processing an interrupt. This added a bunch of code complexity to the interrupt handler. Using the call-back that is done for other commands got rid of this need. So the interrupt handler is greatly simplified. It seems that even commands that shouldn't be acknowledged end up in the interrupt handler. To deal with this, code was added to check to see if a command is in the busy queue or not. This might have contributed to the interrupt storm happening without MSI enabled on these cards. Note that MFI_DCMD_LD_MAP_GET_INFO/read returns right away. It would be interesting to see what other complexity could be removed from the ThunderBolt driver that really isn't needed in our mode of operation. Letting the RAID firmware do all of the I/O to disks is a lot faster since it can use its caches. It greatly simplifies what the driver has to do and potential bugs if the driver and firmware are not in sync. Simplify the aen_abort/cm_map_abort and put it in the softc versus in the command structure. This should get merged to 9 before the driver is merged to 8. PR: 167226 Submitted by: Petr Lampa MFC after:3 days Modified: head/sys/dev/mfi/mfi.c head/sys/dev/mfi/mfi_debug.c head/sys/dev/mfi/mfi_tbolt.c head/sys/dev/mfi/mfireg.h head/sys/dev/mfi/mfivar.h Modified: head/sys/dev/mfi/mfi.c == --- head/sys/dev/mfi/mfi.c Fri May 4 16:00:22 2012(r235013) +++ head/sys/dev/mfi/mfi.c Fri May 4 16:00:39 2012(r235014) @@ -90,8 +90,6 @@ static intmfi_get_controller_info(struc static int mfi_get_log_state(struct mfi_softc *, struct mfi_evt_log_state **); static int mfi_parse_entries(struct mfi_softc *, int, int); -static int mfi_dcmd_command(struct mfi_softc *, struct mfi_command **, - uint32_t, void **, size_t); static voidmfi_data_cb(void *, bus_dma_segment_t *, int, int); static voidmfi_startup(void *arg); static voidmfi_intr(void *arg); @@ -377,6 +375,7 @@ mfi_attach(struct mfi_softc *sc) TAILQ_INIT(&sc->mfi_syspd_tqh); TAILQ_INIT(&sc->mfi_evt_queue); TASK_INIT(&sc->mfi_evt_task, 0, mfi_handle_evt, sc); + TASK_INIT(&sc->mfi_map_sync_task, 0, mfi_handle_map_sync, sc); TAILQ_INIT(&sc->mfi_aen_pids); TAILQ_INIT(&sc->mfi_cam_ccbq); @@ -696,7 +695,6 @@ mfi_attach(struct mfi_softc *sc) return (EINVAL); } sc->mfi_enable_intr(sc); -
Re: svn commit: r232798 - in stable/9: share/man/man4 sys/conf sys/dev/sound/pci/hda sys/dev/sound/pcm sys/modules/sound/driver/hda
On 10-03-2012 21:58, Alexander Motin wrote: > Author: mav > Date: Sat Mar 10 21:58:08 2012 > New Revision: 232798 > URL: http://svn.freebsd.org/changeset/base/232798 > > Log: > MFC r230130, r230181, r230312, r230326, r230331, r230451, r230465, r230488, > r230507, r230511, r230513, r230532, r230537, r230551, r230554, r230571, > r230574, r230585, r230641, r230768, r230807, r231024: > Sync snd_hda(4) driver with HEAD. > > This includes major code refactoring, HDMI support, new volume control, > automatic recording source selection, runtime reconfigureation, support > for more then 4 PCM devices on controller, multichannel recording, > additional playback/record streams, higher bandwidths support, more > informative device names and many other things. > > Sponsored by: iXsystems, Inc. I'm still having problems with r230451. Every time I boot one of the machines I have at home it makes a short but loud "popping" sound. I almost fell of my chair the first time it happened. Now I'm being forced to unplug my speakers every time I boot it, just to avoid having a heart attack... -- Joel ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r235007 - stable/9/sys/dev/pci
On Friday, May 04, 2012 11:38:47 am Hans Petter Selasky wrote: > Author: hselasky > Date: Fri May 4 15:38:47 2012 > New Revision: 235007 > URL: http://svn.freebsd.org/changeset/base/235007 > > Log: > MFC r233662, r233677 and r233678: > > Writing zero to BAR actually does not disable it and > it is even harmful as hselasky found out. Historically, > this code was originated from (OLDCARD) CardBus driver and later leaked into > PCI driver when CardBus was newbus'ified and refactored with PCI driver. > However, it is not really necessary even for CardBus. FYI, I've got one bug report on HEAD where these changes broke a machine's ATA controller. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235015 - stable/8/usr.sbin/usbdump
Author: hselasky Date: Fri May 4 16:18:57 2012 New Revision: 235015 URL: http://svn.freebsd.org/changeset/base/235015 Log: MFC r231835, r234636 and r234655: Add support for filtering USB devices and USB endpoints to the usbdump utility when making software USB traces. Improve support for USB packet filtering also when reading dumps, and allow filtered data to be dumped to a binary file. Add missing and probably also mandatory -h option. Modified: stable/8/usr.sbin/usbdump/usbdump.8 (contents, props changed) stable/8/usr.sbin/usbdump/usbdump.c (contents, props changed) Directory Properties: stable/8/usr.sbin/usbdump/ (props changed) Modified: stable/8/usr.sbin/usbdump/usbdump.8 == --- stable/8/usr.sbin/usbdump/usbdump.8 Fri May 4 16:00:39 2012 (r235014) +++ stable/8/usr.sbin/usbdump/usbdump.8 Fri May 4 16:18:57 2012 (r235015) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31, 2011 +.Dd April 24, 2012 .Dt USBDUMP 8 .Os .Sh NAME @@ -38,6 +38,9 @@ .Op Fl s Ar snaplen .Op Fl v .Op Fl w Ar file +.Op Fl f Ar filter +.Op Fl b Ar file +.Op Fl h .Sh DESCRIPTION The .Nm @@ -45,12 +48,17 @@ utility provides a way to dump USB packe .Pp The following options are accepted: .Bl -tag -width ".Fl f Ar file" +.It Fl b Ar file +Store data part of the USB trace in binary format to the given +.Ar file . +This option also works with the -r and -f options. .It Fl i Ar ifname Listen on USB bus interface .Ar ifname . .It Fl r Ar file Read the raw packets from .Ar file . +This option also works with the -f option. .It Fl s Ar snaplen Snapshot .Ar snaplen @@ -61,6 +69,19 @@ When defined multiple times the verbosit .It Fl w Ar file Write the raw packets to .Ar file . +This option also works with the -s and -v options. +.It Fl f Ar filter +The filter argument consists of either one or two numbers separated by a dot. +The first indicates the device unit number which should be traced. +The second number which is optional indicates the endpoint which should be traced. +To get all traffic for the control endpoint, two filters should be +created, one for endpoint 0 and one for endpoint 128. +If 128 is added to the endpoint number that means IN direction, else OUT direction is implied. +A device unit or endpoint value of -1 means ignore this field. +If no filters are specified, all packets are passed through using the default -1,-1 filter. +This option can be specified multiple times. +.It Fl h +This option displays a summary of the command line options. .El .Sh EXAMPLES Capture the USB raw packets on usbus2: @@ -72,6 +93,11 @@ size limit: .Pp .Dl "usbdump -i usbus2 -s 0 -w /tmp/dump_pkts" .Pp +Dump the USB raw packets of usbus2, but only the control endpoint traffic +of device unit number 3: +.Pp +.Dl "usbdump -i usbus2 -s 0 -f 3.0 -f 3.128 -w /tmp/dump_pkts" +.Pp Read and display the USB raw packets from previous file: .Pp .Dl "usbdump -r /tmp/dump_pkts -v" Modified: stable/8/usr.sbin/usbdump/usbdump.c == --- stable/8/usr.sbin/usbdump/usbdump.c Fri May 4 16:00:39 2012 (r235014) +++ stable/8/usr.sbin/usbdump/usbdump.c Fri May 4 16:18:57 2012 (r235015) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -45,12 +46,33 @@ #include #include #include +#include #include #include #include #include #include +#defineBPF_STORE_JUMP(x,_c,_k,_jt,_jf) do {\ + (x).code = (_c); \ + (x).k = (_k);\ + (x).jt = (_jt); \ + (x).jf = (_jf); \ +} while (0) + +#defineBPF_STORE_STMT(x,_c,_k) do {\ + (x).code = (_c); \ + (x).k = (_k);\ + (x).jt = 0; \ + (x).jf = 0; \ +} while (0) + +struct usb_filt { + STAILQ_ENTRY(usb_filt) entry; + int unit; + int endpoint; +}; + struct usbcap { int fd; /* fd for /dev/usbpf */ uint32_tbufsize; @@ -60,6 +82,8 @@ struct usbcap { int wfd; /* for -r option */ int rfd; + /* for -b option */ + int bfd; }; struct usbcap_filehdr { @@ -90,6 +114,8 @@ static int uf_minor; static const char *i_arg = "usbus0"; static const char *r_arg = NULL; static const char *w_arg = NULL; +static const char *b_arg = NULL; +static struct usbcap uc; static const char *errstr_table[USB_ERR_MAX] = { [USB_ERR_NORMAL_COMPLETION] = "0", [USB_ERR_PENDING_REQUESTS] = "PENDING_REQUESTS", @@ -137,6 +163,130 @@ static const char *speed_table[USB_SPEED [USB_SPEED_SUPER] =
svn commit: r235016 - head/sys/dev/mfi
Author: ambrisko Date: Fri May 4 16:22:13 2012 New Revision: 235016 URL: http://svn.freebsd.org/changeset/base/235016 Log: Some style improvements. Modified: head/sys/dev/mfi/mfi.c head/sys/dev/mfi/mfi_disk.c head/sys/dev/mfi/mfi_tbolt.c Modified: head/sys/dev/mfi/mfi.c == --- head/sys/dev/mfi/mfi.c Fri May 4 16:18:57 2012(r235015) +++ head/sys/dev/mfi/mfi.c Fri May 4 16:22:13 2012(r235016) @@ -1319,7 +1319,7 @@ mfi_syspdprobe(struct mfi_softc *sc) /* Add SYSTEM PD's */ error = mfi_dcmd_command(sc, &cm, MFI_DCMD_PD_LIST_QUERY, (void **)&pdlist, sizeof(*pdlist)); - if (error){ + if (error) { device_printf(sc->mfi_dev, "Error while forming SYSTEM PD list\n"); goto out; @@ -1958,6 +1958,7 @@ mfi_add_sys_pd_complete(struct mfi_comma mtx_unlock(&Giant); mtx_lock(&sc->mfi_io_lock); } + static struct mfi_command * mfi_bio_command(struct mfi_softc *sc) { @@ -1965,7 +1966,7 @@ mfi_bio_command(struct mfi_softc *sc) struct mfi_command *cm = NULL; /*reserving two commands to avoid starvation for IOCTL*/ - if (sc->mfi_qstat[MFIQ_FREE].q_length < 2){ + if (sc->mfi_qstat[MFIQ_FREE].q_length < 2) { return (NULL); } if ((bio = mfi_dequeue_bio(sc)) == NULL) { @@ -2694,12 +2695,12 @@ static int mfi_check_for_sscd(struct mfi int error = 0; if ((cm->cm_frame->dcmd.opcode == MFI_DCMD_CFG_ADD) && - (conf_data->ld[0].params.isSSCD == 1)){ + (conf_data->ld[0].params.isSSCD == 1)) { error = 1; } else if (cm->cm_frame->dcmd.opcode == MFI_DCMD_LD_DELETE) { error = mfi_dcmd_command (sc, &ld_cm, MFI_DCMD_LD_GET_INFO, (void **)&ld_info, sizeof(*ld_info)); - if (error){ + if (error) { device_printf(sc->mfi_dev, "Failed to allocate" "MFI_DCMD_LD_GET_INFO %d", error); if (ld_info) @@ -2709,7 +2710,7 @@ static int mfi_check_for_sscd(struct mfi ld_cm->cm_flags = MFI_CMD_DATAIN; ld_cm->cm_frame->dcmd.mbox[0]= cm->cm_frame->dcmd.mbox[0]; ld_cm->cm_frame->header.target_id = cm->cm_frame->dcmd.mbox[0]; - if (mfi_wait_command(sc, ld_cm) != 0){ + if (mfi_wait_command(sc, ld_cm) != 0) { device_printf(sc->mfi_dev, "failed to get log drv\n"); mfi_release_command(ld_cm); free(ld_info, M_MFIBUF); Modified: head/sys/dev/mfi/mfi_disk.c == --- head/sys/dev/mfi/mfi_disk.c Fri May 4 16:18:57 2012(r235015) +++ head/sys/dev/mfi/mfi_disk.c Fri May 4 16:22:13 2012(r235016) @@ -256,17 +256,17 @@ mfi_disk_strategy(struct bio *bio) return; } - if (controller->adpreset){ + if (controller->adpreset) { bio->bio_error = EBUSY; return; } - if (controller->hw_crit_error){ + if (controller->hw_crit_error) { bio->bio_error = EBUSY; return; } - if (controller->issuepend_done == 0){ + if (controller->issuepend_done == 0) { bio->bio_error = EBUSY; return; } Modified: head/sys/dev/mfi/mfi_tbolt.c == --- head/sys/dev/mfi/mfi_tbolt.cFri May 4 16:18:57 2012 (r235015) +++ head/sys/dev/mfi/mfi_tbolt.cFri May 4 16:22:13 2012 (r235016) @@ -141,11 +141,12 @@ mfi_tbolt_issue_cmd_ppc(struct mfi_softc MFI_WRITE4(sc, MFI_IQPH, (uint32_t)((uint64_t)bus_add >> 32)); } -/** +/* * mfi_tbolt_adp_reset - For controller reset * @regs: MFI register set */ -int mfi_tbolt_adp_reset(struct mfi_softc *sc) +int +mfi_tbolt_adp_reset(struct mfi_softc *sc) { int retry = 0, i = 0; int HostDiag; @@ -193,12 +194,10 @@ int mfi_tbolt_adp_reset(struct mfi_softc } /* - *** - * Description: - * This routine initialize Thunderbolt specific device information - *** + * This routine initialize Thunderbolt specific device information */ -void mfi_tbolt_init_globals(struct mfi_softc *sc) +void +mfi_tbolt_init_globals(struct mfi_softc *sc) { /* Initialize single reply size and Message size */ sc->reply_size = MEGASAS_THUNDERBOLT_REPLY_SIZE; @@ -240,16 +239,12 @@ void mfi_tbolt_init_globals(struct mfi_s } /* - *
svn commit: r235017 - stable/8/lib/libusb
Author: hselasky Date: Fri May 4 16:25:35 2012 New Revision: 235017 URL: http://svn.freebsd.org/changeset/base/235017 Log: MFC r228235, r228236, r233667, r234687, r234491, r234193, and r233424: Minor code simplification. No functional change. Fix some compile warnings. Fix some mdoc issues. Add missing LibUSB 1.0 API function. Modified: stable/8/lib/libusb/Makefile stable/8/lib/libusb/libusb.3 stable/8/lib/libusb/libusb.h stable/8/lib/libusb/libusb10.c stable/8/lib/libusb/libusb10_desc.c stable/8/lib/libusb/libusb10_io.c stable/8/lib/libusb/libusb20.3 stable/8/lib/libusb/libusb20.c stable/8/lib/libusb/libusb20_desc.c stable/8/lib/libusb/libusb20_ugen20.c Directory Properties: stable/8/lib/libusb/ (props changed) Modified: stable/8/lib/libusb/Makefile == --- stable/8/lib/libusb/MakefileFri May 4 16:22:13 2012 (r235016) +++ stable/8/lib/libusb/MakefileFri May 4 16:25:35 2012 (r235017) @@ -46,6 +46,7 @@ MLINKS += libusb.3 libusb_get_bus_number MLINKS += libusb.3 libusb_get_device_address.3 MLINKS += libusb.3 libusb_get_device_speed.3 MLINKS += libusb.3 libusb_get_max_packet_size.3 +MLINKS += libusb.3 libusb_get_max_iso_packet_size.3 MLINKS += libusb.3 libusb_ref_device.3 MLINKS += libusb.3 libusb_unref_device.3 MLINKS += libusb.3 libusb_open.3 @@ -67,7 +68,7 @@ MLINKS += libusb.3 libusb_detach_kernel_ MLINKS += libusb.3 libusb_detach_kernel_driver_np.3 MLINKS += libusb.3 libusb_attach_kernel_driver.3 MLINKS += libusb.3 libusb_get_device_descriptor.3 -MLINKS += libusb.3 libsub_get_active_config_descriptor.3 +MLINKS += libusb.3 libusb_get_active_config_descriptor.3 MLINKS += libusb.3 libusb_get_config_descriptor.3 MLINKS += libusb.3 libusb_get_config_descriptor_by_value.3 MLINKS += libusb.3 libusb_free_config_descriptor.3 Modified: stable/8/lib/libusb/libusb.3 == --- stable/8/lib/libusb/libusb.3Fri May 4 16:22:13 2012 (r235016) +++ stable/8/lib/libusb/libusb.3Fri May 4 16:25:35 2012 (r235017) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd April 12, 2012 .Dt LIBUSB 3 .Os .Sh NAME @@ -43,7 +43,6 @@ The library contains interfaces for directly managing a usb device. The current implementation supports v1.0 of the libusb API. .Sh LIBRARY INITIALISATION / DEINITIALISATION -.Pp .Ft int .Fn libusb_init libusb_context **ctx This function initialises libusb. @@ -119,6 +118,12 @@ LIBUSB_SPEED_UNKNOWN is returned in case Returns the wMaxPacketSize value on success, LIBUSB_ERROR_NOT_FOUND if the endpoint does not exist and LIBUSB_ERROR_OTHERS on other failure. .Pp +.Ft int +.Fn libusb_get_max_iso_packet_size "libusb_device *dev" "unsigned char endpoint" +Returns the packet size multiplied by the packet multiplier on success, +LIBUSB_ERROR_NOT_FOUND if the endpoint does not exist and +LIBUSB_ERROR_OTHERS on other failure. +.Pp .Ft libusb_device * .Fn libusb_ref_device "libusb_device *dev" Increment the reference counter of the device @@ -270,9 +275,7 @@ LIBUSB_ERROR_NO_DEVICE if the device has been disconnected, LIBUSB_ERROR_BUSY if the driver cannot be attached because the interface is claimed by a program or driver and a LIBUSB_ERROR code on failure. -.Pp .Sh USB DESCRIPTORS -.Pp .Ft int .Fn libusb_get_device_descriptor "libusb_device *dev" "libusb_device_descriptor *desc" Get the USB device descriptor for the device @@ -282,7 +285,7 @@ Returns 0 on success and a LIBUSB_ERROR failure. .Pp .Ft int -.Fn libsub_get_active_config_descriptor "libusb_device *dev" "struct libusb_config_descriptor **config" +.Fn libusb_get_active_config_descriptor "libusb_device *dev" "struct libusb_config_descriptor **config" Get the USB configuration descriptor for the active configuration. Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the device is in @@ -349,9 +352,7 @@ libusb_free_bos_descriptor function. .Ft void .Fn libusb_free_bos_descriptor "libusb_bos_descriptor *bos" This function is NULL safe and frees a parsed BOS descriptor. -.Pp .Sh USB ASYNCHRONOUS I/O -.Pp .Ft struct libusb_transfer * .Fn libusb_alloc_transfer "int iso_packets" Allocate a transfer with the number of isochronous packet descriptors @@ -374,9 +375,7 @@ LIBUSB_ERROR code on other failure. .Fn libusb_cancel_transfer "struct libusb_transfer *tr" This function asynchronously cancels a transfer. Returns 0 on success and a LIBUSB_ERROR code on failure. -.Pp .Sh USB SYNCHRONOUS I/O -.Pp .Ft int .Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint8_t bRequest" "uint16_t wValue" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" Perform a USB control transfer. @@ -411,9 +410,7 @@ if the transfer timed out, LIBUSB_ERROR_ supported, LIBUSB_ERROR_OVERFLOW if the device
Re: svn commit: r235007 - stable/9/sys/dev/pci
On Friday 04 May 2012 18:14:16 John Baldwin wrote: > On Friday, May 04, 2012 11:38:47 am Hans Petter Selasky wrote: > > Author: hselasky > > Date: Fri May 4 15:38:47 2012 > > New Revision: 235007 > > URL: http://svn.freebsd.org/changeset/base/235007 > > > > Log: > > MFC r233662, r233677 and r233678: > > > > Writing zero to BAR actually does not disable it and > > it is even harmful as hselasky found out. Historically, > > this code was originated from (OLDCARD) CardBus driver and later leaked > > into PCI driver when CardBus was newbus'ified and refactored with PCI > > driver. However, it is not really necessary even for CardBus. > > FYI, I've got one bug report on HEAD where these changes broke a machine's > ATA controller. Have you considered adding code to disable the I/O or memory range instead of writing 0 to the bar in this case? --HPS ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r235005 - head/usr.sbin/pc-sysinstall/backend
On May 4, 2012, at 8:31 AM, Josh Paetzel wrote: > Author: jpaetzel > Date: Fri May 4 15:31:35 2012 > New Revision: 235005 > URL: http://svn.freebsd.org/changeset/base/235005 > > Log: > Use a unique zpool name during install, in the case of having another > PC-BSD / FreeBSD zpool on the system for another install. > > Submitted by:kmoore > Obtained from:PC-BSD > MFC after:3 days > Sponsored by:iXsystems > > Modified: > head/usr.sbin/pc-sysinstall/backend/functions.sh > > Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh > == > --- head/usr.sbin/pc-sysinstall/backend/functions.shFri May 4 15:27:18 > 2012(r235004) > +++ head/usr.sbin/pc-sysinstall/backend/functions.shFri May 4 15:31:35 > 2012(r235005) > @@ -216,7 +216,7 @@ fetch_file() > > fetch -s "${FETCHFILE}" >${SIZEFILE} > SIZE="`cat ${SIZEFILE}`" > - SIZE="`expr ${SIZE} / 1024`" > + SIZE=$((SIZE/1024)) Bug; should be '$SIZE/' > echo "FETCH: ${FETCHFILE}" > echo "FETCH: ${FETCHOUTFILE}" >>${LOGOUT} > > @@ -276,11 +276,22 @@ get_zpool_name() > else > # Need to generate a zpool name for this device > NUM=`ls ${TMPDIR}/.zpools/ | wc -l | sed 's| ||g'` > -NEWNAME="${BASENAME}${NUM}" > + > +# Is it used in another zpool? > +while > +z=1 > +do while : do Is better. > + NEWNAME="${BASENAME}${NUM}" > + zpool import | grep -q "${NEWNAME}" > + if [ $? -ne 0 ] ; then break ; fi Please decompress the conditional. > + NUM=$((NUM+1)) Another bug (see above). Thanks, -Garrett___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235021 - head/sys/netinet
Author: tuexen Date: Fri May 4 17:18:02 2012 New Revision: 235021 URL: http://svn.freebsd.org/changeset/base/235021 Log: Add support for the SCTP_ENABLE_STREAM_RESET socket option to getsockopt(). This improves the support of RFC 6525. MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c == --- head/sys/netinet/sctp_usrreq.c Fri May 4 17:12:31 2012 (r235020) +++ head/sys/netinet/sctp_usrreq.c Fri May 4 17:18:02 2012 (r235021) @@ -3296,6 +3296,33 @@ flags_out: } break; } + case SCTP_ENABLE_STREAM_RESET: + { + struct sctp_assoc_value *av; + + SCTP_CHECK_AND_CAST(av, optval, struct sctp_assoc_value, *optsize); + SCTP_FIND_STCB(inp, stcb, av->assoc_id); + + if (stcb) { + av->assoc_value = (uint32_t) stcb->asoc.local_strreset_support; + SCTP_TCB_UNLOCK(stcb); + } else { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || + (av->assoc_id == SCTP_FUTURE_ASSOC)) { + SCTP_INP_RLOCK(inp); + av->assoc_value = (uint32_t) inp->local_strreset_support; + SCTP_INP_RUNLOCK(inp); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + } + } + if (error == 0) { + *optsize = sizeof(struct sctp_assoc_value); + } + break; + } default: SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOPROTOOPT); error = ENOPROTOOPT; @@ -4096,7 +4123,6 @@ sctp_setopt(struct socket *so, int optna case SCTP_ENABLE_STREAM_RESET: { struct sctp_assoc_value *av; - uint8_t set_value = 0; SCTP_CHECK_AND_CAST(av, optval, struct sctp_assoc_value, optsize); if (av->assoc_value & (~SCTP_ENABLE_VALUE_MASK)) { @@ -4104,10 +4130,9 @@ sctp_setopt(struct socket *so, int optna error = EINVAL; break; } - set_value = av->assoc_value & SCTP_ENABLE_VALUE_MASK; SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - stcb->asoc.local_strreset_support = set_value; + stcb->asoc.local_strreset_support = (uint8_t) av->assoc_value; SCTP_TCB_UNLOCK(stcb); } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || @@ -4115,7 +4140,7 @@ sctp_setopt(struct socket *so, int optna (av->assoc_id == SCTP_FUTURE_ASSOC) || (av->assoc_id == SCTP_ALL_ASSOC)) { SCTP_INP_WLOCK(inp); - inp->local_strreset_support = set_value; + inp->local_strreset_support = (uint8_t) av->assoc_value; SCTP_INP_WUNLOCK(inp); } if ((av->assoc_id == SCTP_CURRENT_ASSOC) || @@ -4123,7 +4148,7 @@ sctp_setopt(struct socket *so, int optna SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); - stcb->asoc.local_strreset_support = set_value; + stcb->asoc.local_strreset_support = (uint8_t) av->assoc_value; SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r235007 - stable/9/sys/dev/pci
On Friday, May 04, 2012 12:26:19 pm Hans Petter Selasky wrote: > On Friday 04 May 2012 18:14:16 John Baldwin wrote: > > On Friday, May 04, 2012 11:38:47 am Hans Petter Selasky wrote: > > > Author: hselasky > > > Date: Fri May 4 15:38:47 2012 > > > New Revision: 235007 > > > URL: http://svn.freebsd.org/changeset/base/235007 > > > > > > Log: > > > MFC r233662, r233677 and r233678: > > > > > > Writing zero to BAR actually does not disable it and > > > it is even harmful as hselasky found out. Historically, > > > this code was originated from (OLDCARD) CardBus driver and later leaked > > > into PCI driver when CardBus was newbus'ified and refactored with PCI > > > driver. However, it is not really necessary even for CardBus. > > > > FYI, I've got one bug report on HEAD where these changes broke a machine's > > ATA controller. > > Have you considered adding code to disable the I/O or memory range instead of > writing 0 to the bar in this case? I have to figure out what the user's bug is first. The patch that "fixed" it was to restore writing 0 to a BAR that failed to allocate during the initial bus scan. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r235007 - stable/9/sys/dev/pci
On May 4, 2012, at 10:26 AM, Hans Petter Selasky wrote: > On Friday 04 May 2012 18:14:16 John Baldwin wrote: >> On Friday, May 04, 2012 11:38:47 am Hans Petter Selasky wrote: >>> Author: hselasky >>> Date: Fri May 4 15:38:47 2012 >>> New Revision: 235007 >>> URL: http://svn.freebsd.org/changeset/base/235007 >>> >>> Log: >>> MFC r233662, r233677 and r233678: >>> >>> Writing zero to BAR actually does not disable it and >>> it is even harmful as hselasky found out. Historically, >>> this code was originated from (OLDCARD) CardBus driver and later leaked >>> into PCI driver when CardBus was newbus'ified and refactored with PCI >>> driver. However, it is not really necessary even for CardBus. >> >> FYI, I've got one bug report on HEAD where these changes broke a machine's >> ATA controller. > > Have you considered adding code to disable the I/O or memory range instead of > writing 0 to the bar in this case? I tried that once upon a time, but was problematical with some bridges that had BARs at non-standard locations that needed the I/O or MEM bit set in order to work... Warner ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r235005 - head/usr.sbin/pc-sysinstall/backend
On Fri, May 04, 2012 at 09:33:38AM -0700, Garrett Cooper wrote: > On May 4, 2012, at 8:31 AM, Josh Paetzel wrote: > > > Author: jpaetzel > > Date: Fri May 4 15:31:35 2012 > > New Revision: 235005 > > URL: http://svn.freebsd.org/changeset/base/235005 > > > > Log: > > Use a unique zpool name during install, in the case of having another > > PC-BSD / FreeBSD zpool on the system for another install. > > > > Submitted by:kmoore > > Obtained from:PC-BSD > > MFC after:3 days > > Sponsored by:iXsystems > > > > Modified: > > head/usr.sbin/pc-sysinstall/backend/functions.sh > > > > Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh > > == > > --- head/usr.sbin/pc-sysinstall/backend/functions.shFri May 4 15:27:18 > > 2012(r235004) > > +++ head/usr.sbin/pc-sysinstall/backend/functions.shFri May 4 15:31:35 > > 2012(r235005) > > @@ -216,7 +216,7 @@ fetch_file() > > > > fetch -s "${FETCHFILE}" >${SIZEFILE} > > SIZE="`cat ${SIZEFILE}`" > > - SIZE="`expr ${SIZE} / 1024`" > > + SIZE=$((SIZE/1024)) > > Bug; should be '$SIZE/' No this is perfectly valid > > > echo "FETCH: ${FETCHFILE}" > > echo "FETCH: ${FETCHOUTFILE}" >>${LOGOUT} > > > > @@ -276,11 +276,22 @@ get_zpool_name() > > else > > # Need to generate a zpool name for this device > > NUM=`ls ${TMPDIR}/.zpools/ | wc -l | sed 's| ||g'` > > -NEWNAME="${BASENAME}${NUM}" > > + > > +# Is it used in another zpool? > > +while > > +z=1 > > +do > > while : > do > > Is better. > > > + NEWNAME="${BASENAME}${NUM}" > > + zpool import | grep -q "${NEWNAME}" > > + if [ $? -ne 0 ] ; then break ; fi > > Please decompress the conditional. or zpool import | grep -q "${NEWNAME}" && break btw this is potentially buggy if there is a zpool named: a${NEWNAME}b for example zpool import | grep -qw "${NEWNAME}" && break should be perhaps better > > > + NUM=$((NUM+1)) > > Another bug (see above). > > Thanks, > -Garrett pgpLUQg70Jj8j.pgp Description: PGP signature
svn commit: r235024 - in head: share/man/man4 sys/dev/acpica
Author: jkim Date: Fri May 4 18:24:38 2012 New Revision: 235024 URL: http://svn.freebsd.org/changeset/base/235024 Log: Use MADT to match ACPI Processor objects to CPUs. MADT and DSDT/SSDTs may list CPUs in different orders, especially for disabled logical cores. Now we match ACPI IDs from the MADT with Processor objects, strictly order CPUs accordingly, and ignore disabled cores. This prevents us from executing methods for other CPUs, e. g., _PSS for disabled logical core, which may not exist. Unfortunately, it is known that there are a few systems with buggy BIOSes that do not have unique ACPI IDs for MADT and Processor objects. To work around these problems Modified: head/share/man/man4/acpi.4 head/sys/dev/acpica/acpi.c Modified: head/share/man/man4/acpi.4 == --- head/share/man/man4/acpi.4 Fri May 4 18:23:03 2012(r235023) +++ head/share/man/man4/acpi.4 Fri May 4 18:24:38 2012(r235024) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 22, 2012 +.Dd May 4, 2012 .Dt ACPI 4 .Os .Sh NAME @@ -198,6 +198,11 @@ entry for access after boot. Enables loading of a custom ACPI DSDT. .It Va acpi_dsdt_name Name of the DSDT table to load, if loading is enabled. +.It Va debug.acpi.cpu_unordered +Do not use the MADT to match ACPI processor objects to CPUs. +This is needed on a few systems with a buggy BIOS that does not use +consistent processor IDs. +Default is 0 (disabled). .It Va debug.acpi.disabled Selectively disables portions of ACPI for debugging purposes. .It Va debug.acpi.interpreter_slack Modified: head/sys/dev/acpica/acpi.c == --- head/sys/dev/acpica/acpi.c Fri May 4 18:23:03 2012(r235023) +++ head/sys/dev/acpica/acpi.c Fri May 4 18:24:38 2012(r235024) @@ -289,6 +289,13 @@ SYSCTL_INT(_debug_acpi, OID_AUTO, reset_ &acpi_reset_clock, 1, "Reset system clock while resuming."); #endif +/* Allow users to ignore processor orders in MADT. */ +static int acpi_cpu_unordered; +TUNABLE_INT("debug.acpi.cpu_unordered", &acpi_cpu_unordered); +SYSCTL_INT(_debug_acpi, OID_AUTO, cpu_unordered, CTLFLAG_RDTUN, +&acpi_cpu_unordered, 0, +"Do not use the MADT to match ACPI processor objects to CPUs."); + /* Allow users to override quirks. */ TUNABLE_INT("debug.acpi.quirks", &acpi_quirks); @@ -1856,11 +1863,15 @@ static ACPI_STATUS acpi_probe_child(ACPI_HANDLE handle, UINT32 level, void *context, void **status) { struct acpi_prw_data prw; +ACPI_BUFFER buf; +ACPI_OBJECT obj; ACPI_OBJECT_TYPE type; ACPI_HANDLE h; +struct pcpu *pc; device_t bus, child; char *handle_str; -int order; +u_int cpuid; +int order, unit; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -1898,6 +1909,31 @@ acpi_probe_child(ACPI_HANDLE handle, UIN case ACPI_TYPE_PROCESSOR: case ACPI_TYPE_THERMAL: case ACPI_TYPE_POWER: + unit = -1; + if (type == ACPI_TYPE_PROCESSOR && acpi_cpu_unordered == 0) { + ACPI_STATUS s; + buf.Pointer = &obj; + buf.Length = sizeof(obj); + s = AcpiEvaluateObject(handle, NULL, NULL, &buf); + if (ACPI_SUCCESS(s)) { + CPU_FOREACH(cpuid) { + pc = pcpu_find(cpuid); + if (pc->pc_acpi_id == obj.Processor.ProcId) { + unit = cpuid; + if (bootverbose) + printf("ACPI: %s (ACPI ID %u) -> cpu%d\n", + handle_str, obj.Processor.ProcId, unit); + break; + } + } + if (unit == -1) { + if (bootverbose) + printf("ACPI: %s (ACPI ID %u) ignored\n", + handle_str, obj.Processor.ProcId); + break; + } + } + } /* * Create a placeholder device for this node. Sort the * placeholder so that the probe/attach passes will run @@ -1908,7 +1944,7 @@ acpi_probe_child(ACPI_HANDLE handle, UIN ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "scanning '%s'\n", handle_str)); order = level * 10 + ACPI_DEV_BASE_ORDER; acpi_probe_order(handle, &order); - child = BUS_ADD_CHILD(bus, order, NULL, -1); + child = BUS_ADD_CHILD(bus, order, NULL, unit); if (child == NULL) break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235025 - vendor/netcat/dist
Author: delphij Date: Fri May 4 18:29:32 2012 New Revision: 235025 URL: http://svn.freebsd.org/changeset/base/235025 Log: Vendor import of netcat as of OPENBSD_5_1. Modified: vendor/netcat/dist/nc.1 vendor/netcat/dist/netcat.c Modified: vendor/netcat/dist/nc.1 == --- vendor/netcat/dist/nc.1 Fri May 4 18:24:38 2012(r235024) +++ vendor/netcat/dist/nc.1 Fri May 4 18:29:32 2012(r235025) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.57 2011/01/09 22:16:46 jeremy Exp $ +.\" $OpenBSD: nc.1,v 1.60 2012/02/07 12:11:43 lum Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: January 8 2011 $ +.Dd $Mdocdate: October 4 2011 $ .Dt NC 1 .Os .Sh NAME @@ -41,7 +41,7 @@ .Op Fl P Ar proxy_username .Op Fl p Ar source_port .Op Fl s Ar source -.Op Fl T Ar ToS +.Op Fl T Ar toskeyword .Op Fl V Ar rtable .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol @@ -164,14 +164,21 @@ to create and use so that datagrams can It is an error to use this option in conjunction with the .Fl l option. -.It Fl T Ar ToS -Specifies IP Type of Service (ToS) for the connection. -Valid values are the tokens -.Dq lowdelay , -.Dq throughput , -.Dq reliability , -or an 8-bit hexadecimal value preceded by -.Dq 0x . +.It Fl T Ar toskeyword +Change IPv4 TOS value. +.Ar toskeyword +may be one of +.Ar critical , +.Ar inetcontrol , +.Ar lowdelay , +.Ar netcontrol , +.Ar throughput , +.Ar reliability , +or one of the DiffServ Code Points: +.Ar ef , +.Ar af11 ... af43 , +.Ar cs0 ... cs7 ; +or a number in either hex or decimal. .It Fl t Causes .Nm @@ -203,9 +210,9 @@ Have .Nm give more verbose output. .It Fl w Ar timeout -If a connection and stdin are idle for more than +Connections which cannot be established or are idle timeout after .Ar timeout -seconds, then the connection is silently closed. +seconds. The .Fl w flag has no effect on the @@ -442,8 +449,15 @@ Original implementation by *Hobbit* Rewritten with IPv6 support by .An Eric Jackson Aq er...@monkey.org . .Sh CAVEATS -UDP port scans will always succeed -(i.e. report the port as open), -rendering the +UDP port scans using the .Fl uz -combination of flags relatively useless. +combination of flags will always report success irrespective of +the target machine's state. +However, +in conjunction with a traffic sniffer either on the target machine +or an intermediary device, +the +.Fl uz +combination could be useful for communications diagnostics. +Note that the amount of UDP traffic generated may be limited either +due to hardware resources and/or configuration settings. Modified: vendor/netcat/dist/netcat.c == --- vendor/netcat/dist/netcat.c Fri May 4 18:24:38 2012(r235024) +++ vendor/netcat/dist/netcat.c Fri May 4 18:29:32 2012(r235025) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.101 2011/06/21 17:31:07 mikeb Exp $ */ +/* $OpenBSD: netcat.c,v 1.105 2012/02/09 06:25:35 lum Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -98,6 +98,7 @@ void help(void); intlocal_listen(char *, char *, struct addrinfo); void readwrite(int); intremote_connect(const char *, const char *, struct addrinfo); +inttimeout_connect(int, const struct sockaddr *, socklen_t); intsocks_connect(const char *, const char *, struct addrinfo, const char *, const char *, struct addrinfo, int, const char *); intudptest(int); @@ -105,7 +106,7 @@ int unix_bind(char *); intunix_connect(char *); intunix_listen(char *); void set_common_sockopts(int); -intparse_iptos(char *); +intmap_tos(char *, int *); void usage(int); int @@ -234,7 +235,18 @@ main(int argc, char *argv[]) Sflag = 1; break; case 'T': - Tflag = parse_iptos(optarg); + errstr = NULL; + errno = 0; + if (map_tos(optarg, &Tflag)) + break; + if (strlen(optarg) > 1 && optarg[0] == '0' && + optarg[1] == 'x') + Tflag = (int)strtol(optarg, NULL, 16); + else + Tflag = (int)strtonum(optarg, 0, 255, + &errstr); + if (Tflag < 0 || Tflag > 255 || errstr || errno) + errx(1, "illegal tos value %s", optarg); break; default: usage(1); @@ -579,7 +591,7 @@ remote_connect(const char *host, const c set_common_sockopts(s); -
Re: svn commit: r235024 - in head: share/man/man4 sys/dev/acpica
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2012-05-04 14:24:39 -0400, Jung-uk Kim wrote: > Author: jkim Date: Fri May 4 18:24:38 2012 New Revision: 235024 > URL: http://svn.freebsd.org/changeset/base/235024 > > Log: Use MADT to match ACPI Processor objects to CPUs. MADT and > DSDT/SSDTs may list CPUs in different orders, especially for > disabled logical cores. Now we match ACPI IDs from the MADT with > Processor objects, strictly order CPUs accordingly, and ignore > disabled cores. This prevents us from executing methods for other > CPUs, e. g., _PSS for disabled logical core, which may not exist. > Unfortunately, it is known that there are a few systems with buggy > BIOSes that do not have unique ACPI IDs for MADT and Processor > objects. To work around these problems , 'debug.acpi.cpu_unordered' tunable is added. Set this to non-zero value to restore the old behavior. Sorry, the commit message was incomplete. How do I fix it? Jung-uk Kim -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+kIA8ACgkQmlay1b9qnVM8dQCg1D1cQhd0zLkTD3/uWzFOSI4u Ph4AoL1QzIgRmp4JduHpJaPlP3i64s84 =bXd0 -END PGP SIGNATURE- ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235026 - vendor/netcat/5.1
Author: delphij Date: Fri May 4 18:30:40 2012 New Revision: 235026 URL: http://svn.freebsd.org/changeset/base/235026 Log: Tag netcat from OpenBSD 5.1. Added: vendor/netcat/5.1/ - copied from r235025, vendor/netcat/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235029 - in head: share/man/man4 sys/dev/acpica
Author: jkim Date: Fri May 4 18:54:51 2012 New Revision: 235029 URL: http://svn.freebsd.org/changeset/base/235029 Log: Complete commit message for r235024: Use MADT to match ACPI Processor objects to CPUs. MADT and DSDT/SSDTs may list CPUs in different orders, especially for disabled logical cores. Now we match ACPI IDs from the MADT with Processor objects, strictly order CPUs accordingly, and ignore disabled cores. This prevents us from executing methods for other CPUs, e. g., _PSS for disabled logical core, which may not exist. Unfortunately, it is known that there are a few systems with buggy BIOSes that do not have unique ACPI IDs for MADT and Processor objects. To work around these problems, 'debug.acpi.cpu_unordered' tunable is added. Set this to a non-zero value to restore the old behavior. Many thanks to jhb for pointing me to the right direction and the manual page change. Reported by: Harris, James R (james dot r dot harris at intel dot com) Tested by:Harris, James R (james dot r dot harris at intel dot com) Reviewed by: jhb MFC after:1 month Modified: head/share/man/man4/acpi.4 head/sys/dev/acpica/acpi.c Modified: head/share/man/man4/acpi.4 == --- head/share/man/man4/acpi.4 Fri May 4 18:36:00 2012(r235028) +++ head/share/man/man4/acpi.4 Fri May 4 18:54:51 2012(r235029) @@ -199,7 +199,7 @@ Enables loading of a custom ACPI DSDT. .It Va acpi_dsdt_name Name of the DSDT table to load, if loading is enabled. .It Va debug.acpi.cpu_unordered -Do not use the MADT to match ACPI processor objects to CPUs. +Do not use the MADT to match ACPI Processor objects to CPUs. This is needed on a few systems with a buggy BIOS that does not use consistent processor IDs. Default is 0 (disabled). Modified: head/sys/dev/acpica/acpi.c == --- head/sys/dev/acpica/acpi.c Fri May 4 18:36:00 2012(r235028) +++ head/sys/dev/acpica/acpi.c Fri May 4 18:54:51 2012(r235029) @@ -294,7 +294,7 @@ static int acpi_cpu_unordered; TUNABLE_INT("debug.acpi.cpu_unordered", &acpi_cpu_unordered); SYSCTL_INT(_debug_acpi, OID_AUTO, cpu_unordered, CTLFLAG_RDTUN, &acpi_cpu_unordered, 0, -"Do not use the MADT to match ACPI processor objects to CPUs."); +"Do not use the MADT to match ACPI Processor objects to CPUs."); /* Allow users to override quirks. */ TUNABLE_INT("debug.acpi.quirks", &acpi_quirks); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r233435 - head/etc/mtree
On Sat, Mar 24, 2012 at 09:10:19PM +, Eitan Adler wrote: > Author: eadler > Date: Sat Mar 24 21:10:19 2012 > New Revision: 233435 > URL: http://svn.freebsd.org/changeset/base/233435 > > Log: > Fix build by adding new directory to mtree in r233429 > > Submitted by: flo > Approved by:cperciva > MFC after: 1 week > > Modified: > head/etc/mtree/BSD.usr.dist > > Modified: head/etc/mtree/BSD.usr.dist > == > --- head/etc/mtree/BSD.usr.dist Sat Mar 24 19:59:14 2012 > (r233434) > +++ head/etc/mtree/BSD.usr.dist Sat Mar 24 21:10:19 2012 > (r233435) > @@ -209,6 +209,8 @@ > .. > bootforth > .. > + csh > + .. > cvs You need to use only spaces in this file for indentation just like in all the other lines. That's a shame it was merged into 7, 8 and 9. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpJHjaJZPr7C.pgp Description: PGP signature
Re: svn commit: r235007 - stable/9/sys/dev/pci
On Friday 04 May 2012 19:18:56 Warner Losh wrote: > On May 4, 2012, at 10:26 AM, Hans Petter Selasky wrote: > > On Friday 04 May 2012 18:14:16 John Baldwin wrote: > >> On Friday, May 04, 2012 11:38:47 am Hans Petter Selasky wrote: > >>> Author: hselasky > >>> Date: Fri May 4 15:38:47 2012 > >>> New Revision: 235007 > >>> URL: http://svn.freebsd.org/changeset/base/235007 > >>> > >>> Log: > >>> MFC r233662, r233677 and r233678: > >>> > >>> Writing zero to BAR actually does not disable it and > >>> it is even harmful as hselasky found out. Historically, > >>> this code was originated from (OLDCARD) CardBus driver and later > >>> leaked into PCI driver when CardBus was newbus'ified and refactored > >>> with PCI driver. However, it is not really necessary even for > >>> CardBus. > >> > >> FYI, I've got one bug report on HEAD where these changes broke a > >> machine's ATA controller. > > > > Have you considered adding code to disable the I/O or memory range > > instead of writing 0 to the bar in this case? > > I tried that once upon a time, but was problematical with some bridges that > had BARs at non-standard locations that needed the I/O or MEM bit set in > order to work... > > Warner If the size of the bar is a few megabytes, then moving it to location 0 is definitely wrong. Else it might work! --HPS ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235033 - head/sbin/geom/class/part
Author: ae Date: Fri May 4 19:49:24 2012 New Revision: 235033 URL: http://svn.freebsd.org/changeset/base/235033 Log: Don't ignore start offset value when user specifies it together with alignment. PR: bin/167567 Tested by:Warren Block MFC after:1 week Modified: head/sbin/geom/class/part/geom_part.c Modified: head/sbin/geom/class/part/geom_part.c == --- head/sbin/geom/class/part/geom_part.c Fri May 4 19:44:58 2012 (r235032) +++ head/sbin/geom/class/part/geom_part.c Fri May 4 19:49:24 2012 (r235033) @@ -507,6 +507,8 @@ gpart_autofill(struct gctl_req *req) grade = ~0ULL; a_first = ALIGNUP(first + offset, alignment); last = ALIGNDOWN(last + offset, alignment); + if (a_first < start) + a_first = start; while ((pp = find_provider(gp, first)) != NULL) { s = find_provcfg(pp, "start"); lba = (off_t)strtoimax(s, NULL, 0); @@ -536,7 +538,8 @@ gpart_autofill(struct gctl_req *req) s = find_provcfg(pp, "end"); first = (off_t)strtoimax(s, NULL, 0) + 1; - a_first = ALIGNUP(first + offset, alignment); + if (first > a_first) + a_first = ALIGNUP(first + offset, alignment); } if (a_first <= last) { /* Free space [first-last] */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r235005 - head/usr.sbin/pc-sysinstall/backend
On 05/04/2012 11:22 AM, Baptiste Daroussin wrote: >>> > > fetch -s "${FETCHFILE}" >${SIZEFILE} >>> > > SIZE="`cat ${SIZEFILE}`" >>> > > - SIZE="`expr ${SIZE} / 1024`" >>> > > + SIZE=$((SIZE/1024)) >> > >> > Bug; should be '$SIZE/' > No this is perfectly valid Yes, that works, but it's not our usual style. However, the point is moot as that whole block should be reduced down to: SIZE=$(( `fetch -s "${FETCHFILE}"` / 1024 )) If SIZEFILE is needed elsewhere that's a different matter, but as it is that's a hot mess. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235034 - head/sys/dev/ath
Author: adrian Date: Fri May 4 20:31:27 2012 New Revision: 235034 URL: http://svn.freebsd.org/changeset/base/235034 Log: Fix a couple of sc_ac2q[] mappings that were using the TID, not the AC. PR: kern/167588 Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c == --- head/sys/dev/ath/if_ath_tx.cFri May 4 19:49:24 2012 (r235033) +++ head/sys/dev/ath/if_ath_tx.cFri May 4 20:31:27 2012 (r235034) @@ -4307,9 +4307,9 @@ ath_addba_request(struct ieee80211_node * it'll be "after" the left edge of the BAW and thus it'll * fall within it. */ - ATH_TXQ_LOCK(sc->sc_ac2q[atid->tid]); + ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); ath_tx_tid_pause(sc, atid); - ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->tid]); + ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: called; dialogtoken=%d, baparamset=%d, batimeout=%d\n", @@ -4395,9 +4395,9 @@ ath_addba_stop(struct ieee80211_node *ni DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: called\n", __func__); /* Pause TID traffic early, so there aren't any races */ - ATH_TXQ_LOCK(sc->sc_ac2q[atid->tid]); + ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); ath_tx_tid_pause(sc, atid); - ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->tid]); + ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); /* There's no need to hold the TXQ lock here */ sc->sc_addba_stop(ni, tap); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235035 - stable/9/lib/libc/gen
Author: jilles Date: Fri May 4 20:45:53 2012 New Revision: 235035 URL: http://svn.freebsd.org/changeset/base/235035 Log: MFC r234057: sem_open: Make sure to fail an O_CREAT|O_EXCL open, even if that semaphore is already open in this process. If the named semaphore is already open, sem_open() only increments a reference count and did not take the flags into account (which otherwise happens by passing them to open()). Add an extra check for O_CREAT|O_EXCL. PR: kern/166706 Modified: stable/9/lib/libc/gen/sem_new.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/sem_new.c == --- stable/9/lib/libc/gen/sem_new.c Fri May 4 20:31:27 2012 (r235034) +++ stable/9/lib/libc/gen/sem_new.c Fri May 4 20:45:53 2012 (r235035) @@ -162,10 +162,16 @@ _sem_open(const char *name, int flags, . _pthread_mutex_lock(&sem_llock); LIST_FOREACH(ni, &sem_list, next) { if (strcmp(name, ni->name) == 0) { - ni->open_count++; - sem = ni->sem; - _pthread_mutex_unlock(&sem_llock); - return (sem); + if ((flags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) { + _pthread_mutex_unlock(&sem_llock); + errno = EEXIST; + return (SEM_FAILED); + } else { + ni->open_count++; + sem = ni->sem; + _pthread_mutex_unlock(&sem_llock); + return (sem); + } } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235036 - head/sys/netinet
Author: delphij Date: Fri May 4 21:00:32 2012 New Revision: 235036 URL: http://svn.freebsd.org/changeset/base/235036 Log: Add ToS definitions for DiffServ Codepoints as per RFC2474. Obtained from:OpenBSD MFC after:2 weeks Modified: head/sys/netinet/ip.h Modified: head/sys/netinet/ip.h == --- head/sys/netinet/ip.h Fri May 4 20:45:53 2012(r235035) +++ head/sys/netinet/ip.h Fri May 4 21:00:32 2012(r235036) @@ -92,6 +92,31 @@ struct ip { #defineIPTOS_PREC_ROUTINE 0x00 /* + * Definitions for DiffServ Codepoints as per RFC2474 + */ +#defineIPTOS_DSCP_CS0 0x00 +#defineIPTOS_DSCP_CS1 0x20 +#defineIPTOS_DSCP_AF11 0x28 +#defineIPTOS_DSCP_AF12 0x30 +#defineIPTOS_DSCP_AF13 0x38 +#defineIPTOS_DSCP_CS2 0x40 +#defineIPTOS_DSCP_AF21 0x48 +#defineIPTOS_DSCP_AF22 0x50 +#defineIPTOS_DSCP_AF23 0x58 +#defineIPTOS_DSCP_CS3 0x60 +#defineIPTOS_DSCP_AF31 0x68 +#defineIPTOS_DSCP_AF32 0x70 +#defineIPTOS_DSCP_AF33 0x78 +#defineIPTOS_DSCP_CS4 0x80 +#defineIPTOS_DSCP_AF41 0x88 +#defineIPTOS_DSCP_AF42 0x90 +#defineIPTOS_DSCP_AF43 0x98 +#defineIPTOS_DSCP_CS5 0xa0 +#defineIPTOS_DSCP_EF 0xb8 +#defineIPTOS_DSCP_CS6 0xc0 +#defineIPTOS_DSCP_CS7 0xe0 + +/* * ECN (Explicit Congestion Notification) codepoints in RFC3168 mapped to the * lower 2 bits of the TOS field. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235037 - head/contrib/netcat
Author: delphij Date: Fri May 4 21:03:39 2012 New Revision: 235037 URL: http://svn.freebsd.org/changeset/base/235037 Log: Merge from OpenBSD 5.1. MFC after:3 weeks Modified: head/contrib/netcat/nc.1 head/contrib/netcat/netcat.c Directory Properties: head/contrib/netcat/ (props changed) Modified: head/contrib/netcat/nc.1 == --- head/contrib/netcat/nc.1Fri May 4 21:00:32 2012(r235036) +++ head/contrib/netcat/nc.1Fri May 4 21:03:39 2012(r235037) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.57 2011/01/09 22:16:46 jeremy Exp $ +.\" $OpenBSD: nc.1,v 1.60 2012/02/07 12:11:43 lum Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2011 +.Dd October 4, 2011 .Dt NC 1 .Os .Sh NAME @@ -45,7 +45,7 @@ .Op Fl P Ar proxy_username .Op Fl p Ar source_port .Op Fl s Ar source -.Op Fl T Ar ToS +.Op Fl T Ar toskeyword .Op Fl V Ar rtable .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol @@ -186,14 +186,21 @@ to create and use so that datagrams can It is an error to use this option in conjunction with the .Fl l option. -.It Fl T Ar ToS -Specifies IP Type of Service (ToS) for the connection. -Valid values are the tokens -.Dq lowdelay , -.Dq throughput , -.Dq reliability , -or an 8-bit hexadecimal value preceded by -.Dq 0x . +.It Fl T Ar toskeyword +Change IPv4 TOS value. +.Ar toskeyword +may be one of +.Ar critical , +.Ar inetcontrol , +.Ar lowdelay , +.Ar netcontrol , +.Ar throughput , +.Ar reliability , +or one of the DiffServ Code Points: +.Ar ef , +.Ar af11 ... af43 , +.Ar cs0 ... cs7 ; +or a number in either hex or decimal. .It Fl t Causes .Nm @@ -227,9 +234,9 @@ Have .Nm give more verbose output. .It Fl w Ar timeout -If a connection and stdin are idle for more than +Connections which cannot be established or are idle timeout after .Ar timeout -seconds, then the connection is silently closed. +seconds. The .Fl w flag has no effect on the @@ -480,8 +487,15 @@ Original implementation by *Hobbit* Rewritten with IPv6 support by .An Eric Jackson Aq er...@monkey.org . .Sh CAVEATS -UDP port scans will always succeed -(i.e. report the port as open), -rendering the +UDP port scans using the .Fl uz -combination of flags relatively useless. +combination of flags will always report success irrespective of +the target machine's state. +However, +in conjunction with a traffic sniffer either on the target machine +or an intermediary device, +the +.Fl uz +combination could be useful for communications diagnostics. +Note that the amount of UDP traffic generated may be limited either +due to hardware resources and/or configuration settings. Modified: head/contrib/netcat/netcat.c == --- head/contrib/netcat/netcat.cFri May 4 21:00:32 2012 (r235036) +++ head/contrib/netcat/netcat.cFri May 4 21:03:39 2012 (r235037) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.101 2011/06/21 17:31:07 mikeb Exp $ */ +/* $OpenBSD: netcat.c,v 1.105 2012/02/09 06:25:35 lum Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -107,6 +107,7 @@ voidhelp(void); intlocal_listen(char *, char *, struct addrinfo); void readwrite(int); intremote_connect(const char *, const char *, struct addrinfo); +inttimeout_connect(int, const struct sockaddr *, socklen_t); intsocks_connect(const char *, const char *, struct addrinfo, const char *, const char *, struct addrinfo, int, const char *); intudptest(int); @@ -114,7 +115,7 @@ int unix_bind(char *); intunix_connect(char *); intunix_listen(char *); void set_common_sockopts(int); -intparse_iptos(char *); +intmap_tos(char *, int *); void usage(int); #ifdef IPSEC @@ -281,7 +282,18 @@ main(int argc, char *argv[]) Sflag = 1; break; case 'T': - Tflag = parse_iptos(optarg); + errstr = NULL; + errno = 0; + if (map_tos(optarg, &Tflag)) + break; + if (strlen(optarg) > 1 && optarg[0] == '0' && + optarg[1] == 'x') + Tflag = (int)strtol(optarg, NULL, 16); + else + Tflag = (int)strtonum(optarg, 0, 255, + &errstr); + if (Tflag < 0 || Tflag > 255 || errstr || errno) + errx(1, "illegal tos value %s", optarg); break; default: usage(1); @@ -633,7 +645,7 @@ remote_connect(const char *host, const c set_common_sockopts(s); - if (connect(s, res0->ai_addr, r
svn commit: r235038 - head/contrib/netcat
Author: delphij Date: Fri May 4 21:06:53 2012 New Revision: 235038 URL: http://svn.freebsd.org/changeset/base/235038 Log: Update FREEBSD-vendor to reflect the current version. Modified: head/contrib/netcat/FREEBSD-vendor Modified: head/contrib/netcat/FREEBSD-vendor == --- head/contrib/netcat/FREEBSD-vendor Fri May 4 21:03:39 2012 (r235037) +++ head/contrib/netcat/FREEBSD-vendor Fri May 4 21:06:53 2012 (r235038) @@ -1,5 +1,5 @@ # $FreeBSD$ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL:http://www.openbsd.org/ -Version: 4.7 +Version: 5.1 License: BSD ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r235007 - stable/9/sys/dev/pci
On May 4, 2012, at 1:41 PM, Hans Petter Selasky wrote: > On Friday 04 May 2012 19:18:56 Warner Losh wrote: >> On May 4, 2012, at 10:26 AM, Hans Petter Selasky wrote: >>> On Friday 04 May 2012 18:14:16 John Baldwin wrote: On Friday, May 04, 2012 11:38:47 am Hans Petter Selasky wrote: > Author: hselasky > Date: Fri May 4 15:38:47 2012 > New Revision: 235007 > URL: http://svn.freebsd.org/changeset/base/235007 > > Log: > MFC r233662, r233677 and r233678: > > Writing zero to BAR actually does not disable it and > it is even harmful as hselasky found out. Historically, > this code was originated from (OLDCARD) CardBus driver and later > leaked into PCI driver when CardBus was newbus'ified and refactored > with PCI driver. However, it is not really necessary even for > CardBus. FYI, I've got one bug report on HEAD where these changes broke a machine's ATA controller. >>> >>> Have you considered adding code to disable the I/O or memory range >>> instead of writing 0 to the bar in this case? >> >> I tried that once upon a time, but was problematical with some bridges that >> had BARs at non-standard locations that needed the I/O or MEM bit set in >> order to work... >> >> Warner > > If the size of the bar is a few megabytes, then moving it to location 0 is > definitely wrong. Else it might work! Only if the bridge passes the transactions for that memory to the PCI bus for decoding. The reason it worked for as long as it did was that we had bridges that passed the memory cycles to DRAM for addresses near 0 and they didn't make it onto the PCI bus. Except in embedded systems, I fail to see how that could have changed in the interim. The physical layout of x86 has actual memory at location 0 and it would be a big performance hit to push those transactions onto the pci bus, so nobody in their right mind would do that. Warner Warner___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235040 - head/sys/dev/mfi
Author: ambrisko Date: Fri May 4 22:54:54 2012 New Revision: 235040 URL: http://svn.freebsd.org/changeset/base/235040 Log: Fix the returns in mfi_tbolt_sync_map_info. I forgot to change them to cleanup and goto out when acknowledging the LD's. Check for failure on malloc. Remove a couple of extra lines and remove the spurious return. Prompted by: Petr Lampa MFC after:3 days Modified: head/sys/dev/mfi/mfi_tbolt.c Modified: head/sys/dev/mfi/mfi_tbolt.c == --- head/sys/dev/mfi/mfi_tbolt.cFri May 4 22:48:44 2012 (r235039) +++ head/sys/dev/mfi/mfi_tbolt.cFri May 4 22:54:54 2012 (r235040) @@ -1290,7 +1290,6 @@ mfi_process_fw_state_chg_isr(void *arg) mtx_unlock(&sc->mfi_io_lock); } - /* * The ThunderBolt HW has an option for the driver to directly * access the underlying disks and operate on the RAID. To @@ -1362,13 +1361,21 @@ mfi_tbolt_sync_map_info(struct mfi_softc mtx_unlock(&sc->mfi_io_lock); ld_sync = (union mfi_ld_ref *) malloc(ld_size, M_MFIBUF, M_WAITOK | M_ZERO); + if (ld_sync == NULL) { + device_printf(sc->mfi_dev, "Failed to allocate sync\n"); + goto out; + } for (i = 0; i < list->ld_count; i++) { ld_sync[i].ref = list->ld_list[i].ld.ref; } mtx_lock(&sc->mfi_io_lock); - if ((cmd = mfi_dequeue_free(sc)) == NULL) - return; + if ((cmd = mfi_dequeue_free(sc)) == NULL) { + device_printf(sc->mfi_dev, "Failed to get command\n"); + free(ld_sync, M_MFIBUF); + goto out; + } + context = cmd->cm_frame->header.context; bzero(cmd->cm_frame, sizeof(union mfi_frame)); cmd->cm_frame->header.context = context; @@ -1396,7 +1403,10 @@ mfi_tbolt_sync_map_info(struct mfi_softc if ((error = mfi_mapcmd(sc, cmd)) != 0) { device_printf(sc->mfi_dev, "failed to send map sync\n"); - return; + free(ld_sync, M_MFIBUF); + sc->mfi_map_sync_cm = NULL; + mfi_requeue_ready(cmd); + goto out; } out: @@ -1405,11 +1415,8 @@ out: if (cm) mfi_release_command(cm); mtx_unlock(&sc->mfi_io_lock); - - return; } - static void mfi_sync_map_complete(struct mfi_command *cm) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235041 - head/sys/ia64/ia64
Author: marcel Date: Fri May 4 23:16:29 2012 New Revision: 235041 URL: http://svn.freebsd.org/changeset/base/235041 Log: Don't assume we have legacy PICs (i.e. 8259A in cascade) at the legacy I/O port addresses. Even if we do, this is hardly the place to mask interrupts. It's not clear that this was at all needed. The code came with CVS revision 1.2 of nexus.c when interrupt support was first added. What is known is that ia64 has always been designed around the IOSAPIC, and that doing I/O like this prevents Altix from booting. Modified: head/sys/ia64/ia64/nexus.c Modified: head/sys/ia64/ia64/nexus.c == --- head/sys/ia64/ia64/nexus.c Fri May 4 22:54:54 2012(r235040) +++ head/sys/ia64/ia64/nexus.c Fri May 4 23:16:29 2012(r235041) @@ -65,9 +65,6 @@ #include -#include -#include - #include "clock_if.h" static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); @@ -191,12 +188,6 @@ static int nexus_attach(device_t dev) { - /* -* Mask the legacy PICs - we will use the I/O SAPIC for interrupt. -*/ - outb(IO_ICU1+1, 0xff); - outb(IO_ICU2+1, 0xff); - if (acpi_identify() == 0) BUS_ADD_CHILD(dev, 10, "acpi", 0); clock_register(dev, 1000); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235043 - head/sys/dev/isci/scil
Author: jimharris Date: Fri May 4 23:45:34 2012 New Revision: 235043 URL: http://svn.freebsd.org/changeset/base/235043 Log: Fix off-by-one error in sati_inquiry_block_device_translate_data(). Bug would result in INQUIRY VPD 0x81 to SATA devices to return only 63 bytes of data instead of 64 during SCSI/ATA translation. Sponsored by: Intel Approved by: scottl MFC after: 1 week Modified: head/sys/dev/isci/scil/sati_inquiry.c Modified: head/sys/dev/isci/scil/sati_inquiry.c == --- head/sys/dev/isci/scil/sati_inquiry.c Fri May 4 23:33:40 2012 (r235042) +++ head/sys/dev/isci/scil/sati_inquiry.c Fri May 4 23:45:34 2012 (r235043) @@ -359,7 +359,7 @@ void sati_inquiry_block_device_translate ); //bytes 8-63 are reserved -for(offset = 8; offset < 63; offset++) +for(offset = 8; offset < 64; offset++) { sati_set_data_byte(sequence, scsi_io, offset, 0x00); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235045 - stable/9/lib/libc/rpc
Author: kib Date: Sat May 5 00:28:08 2012 New Revision: 235045 URL: http://svn.freebsd.org/changeset/base/235045 Log: MFC r234769: Fix several memory and lock leaks on the out of memory condition. Modified: stable/9/lib/libc/rpc/svc.c stable/9/lib/libc/rpc/svc_raw.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/svc.c == --- stable/9/lib/libc/rpc/svc.c Sat May 5 00:08:05 2012(r235044) +++ stable/9/lib/libc/rpc/svc.c Sat May 5 00:28:08 2012(r235045) @@ -108,8 +108,10 @@ xprt_register(xprt) if (__svc_xports == NULL) { __svc_xports = (SVCXPRT **) mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); - if (__svc_xports == NULL) + if (__svc_xports == NULL) { + rwlock_unlock(&svc_fd_lock); return; + } memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); } if (sock < FD_SETSIZE) { @@ -565,8 +567,14 @@ svc_xprt_alloc() SVCXPRT_EXT *ext; xprt = mem_alloc(sizeof(SVCXPRT)); + if (xprt == NULL) + return (NULL); memset(xprt, 0, sizeof(SVCXPRT)); ext = mem_alloc(sizeof(SVCXPRT_EXT)); + if (ext == NULL) { + mem_free(xprt, sizeof(SVCXPRT)); + return (NULL); + } memset(ext, 0, sizeof(SVCXPRT_EXT)); xprt->xp_p3 = ext; ext->xp_auth.svc_ah_ops = &svc_auth_null_ops; Modified: stable/9/lib/libc/rpc/svc_raw.c == --- stable/9/lib/libc/rpc/svc_raw.c Sat May 5 00:08:05 2012 (r235044) +++ stable/9/lib/libc/rpc/svc_raw.c Sat May 5 00:28:08 2012 (r235045) @@ -96,10 +96,22 @@ svc_raw_create() mutex_unlock(&svcraw_lock); return (NULL); } - if (__rpc_rawcombuf == NULL) + if (__rpc_rawcombuf == NULL) { __rpc_rawcombuf = calloc(UDPMSGSIZE, sizeof (char)); + if (__rpc_rawcombuf == NULL) { + free(srp); + mutex_unlock(&svcraw_lock); + return (NULL); + } + } srp->raw_buf = __rpc_rawcombuf; /* Share it with the client */ srp->server = svc_xprt_alloc(); + if (srp->server == NULL) { + free(__rpc_rawcombuf); + free(srp); + mutex_unlock(&svcraw_lock); + return (NULL); + } svc_raw_private = srp; } srp->server->xp_fd = FD_SETSIZE; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235046 - stable/8/lib/libc/rpc
Author: kib Date: Sat May 5 00:30:43 2012 New Revision: 235046 URL: http://svn.freebsd.org/changeset/base/235046 Log: MFC r234769: Fix several memory and lock leaks on the out of memory condition. Modified: stable/8/lib/libc/rpc/svc.c stable/8/lib/libc/rpc/svc_raw.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/rpc/svc.c == --- stable/8/lib/libc/rpc/svc.c Sat May 5 00:28:08 2012(r235045) +++ stable/8/lib/libc/rpc/svc.c Sat May 5 00:30:43 2012(r235046) @@ -108,8 +108,10 @@ xprt_register(xprt) if (__svc_xports == NULL) { __svc_xports = (SVCXPRT **) mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); - if (__svc_xports == NULL) + if (__svc_xports == NULL) { + rwlock_unlock(&svc_fd_lock); return; + } memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); } if (sock < FD_SETSIZE) { @@ -565,8 +567,14 @@ svc_xprt_alloc() SVCXPRT_EXT *ext; xprt = mem_alloc(sizeof(SVCXPRT)); + if (xprt == NULL) + return (NULL); memset(xprt, 0, sizeof(SVCXPRT)); ext = mem_alloc(sizeof(SVCXPRT_EXT)); + if (ext == NULL) { + mem_free(xprt, sizeof(SVCXPRT)); + return (NULL); + } memset(ext, 0, sizeof(SVCXPRT_EXT)); xprt->xp_p3 = ext; ext->xp_auth.svc_ah_ops = &svc_auth_null_ops; Modified: stable/8/lib/libc/rpc/svc_raw.c == --- stable/8/lib/libc/rpc/svc_raw.c Sat May 5 00:28:08 2012 (r235045) +++ stable/8/lib/libc/rpc/svc_raw.c Sat May 5 00:30:43 2012 (r235046) @@ -96,10 +96,22 @@ svc_raw_create() mutex_unlock(&svcraw_lock); return (NULL); } - if (__rpc_rawcombuf == NULL) + if (__rpc_rawcombuf == NULL) { __rpc_rawcombuf = calloc(UDPMSGSIZE, sizeof (char)); + if (__rpc_rawcombuf == NULL) { + free(srp); + mutex_unlock(&svcraw_lock); + return (NULL); + } + } srp->raw_buf = __rpc_rawcombuf; /* Share it with the client */ srp->server = svc_xprt_alloc(); + if (srp->server == NULL) { + free(__rpc_rawcombuf); + free(srp); + mutex_unlock(&svcraw_lock); + return (NULL); + } svc_raw_private = srp; } srp->server->xp_fd = FD_SETSIZE; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r235005 - head/usr.sbin/pc-sysinstall/backend
On May 4, 2012, at 11:22 AM, Baptiste Daroussin wrote: > On Fri, May 04, 2012 at 09:33:38AM -0700, Garrett Cooper wrote: ... >> Bug; should be '$SIZE/' > > No this is perfectly valid Appreciate the clarification. I guess that's what I get for being impatient and not testing my claim before I fired it off. Thanks! -Garrett___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235047 - stable/9/usr.sbin/cron/crontab
Author: gjb (doc committer) Date: Sat May 5 02:52:41 2012 New Revision: 235047 URL: http://svn.freebsd.org/changeset/base/235047 Log: MFC r234775: As cron(8) is started with '-s' by default, timezones that observe DST should not need to worry about scheduling jobs when the DST time changes. Rather than removing the BUGS section in crontab(5) regarding this, note that disabling '-s' may still cause jobs to be executed twice or not at all. PR: 166318 Modified: stable/9/usr.sbin/cron/crontab/crontab.5 Directory Properties: stable/9/usr.sbin/cron/crontab/ (props changed) Modified: stable/9/usr.sbin/cron/crontab/crontab.5 == --- stable/9/usr.sbin/cron/crontab/crontab.5Sat May 5 00:30:43 2012 (r235046) +++ stable/9/usr.sbin/cron/crontab/crontab.5Sat May 5 02:52:41 2012 (r235047) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2012 +.Dd April 28, 2012 .Dt CRONTAB 5 .Os .Sh NAME @@ -296,10 +296,21 @@ are extensions. .An Paul Vixie Aq p...@vix.com .Sh BUGS If you are in one of the 70-odd countries that observe Daylight -Savings Time, jobs scheduled during the rollback or advance will be -affected. +Savings Time, jobs scheduled during the rollback or advance may be +affected if +.Xr cron 8 +is not started with the +.Fl s +flag. In general, it is not a good idea to schedule jobs during -this period. +this period if +.Xr cron 8 +is not started with the +.Fl s +flag, which is enabled by default. +See +.Xr cron 8 +for more details. .Pp For US timezones (except parts of AZ and HI) the time shift occurs at 2AM local time. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235048 - stable/8/usr.sbin/cron/crontab
Author: gjb (doc committer) Date: Sat May 5 02:53:02 2012 New Revision: 235048 URL: http://svn.freebsd.org/changeset/base/235048 Log: MFC r234775: As cron(8) is started with '-s' by default, timezones that observe DST should not need to worry about scheduling jobs when the DST time changes. Rather than removing the BUGS section in crontab(5) regarding this, note that disabling '-s' may still cause jobs to be executed twice or not at all. PR: 166318 Modified: stable/8/usr.sbin/cron/crontab/crontab.5 Directory Properties: stable/8/usr.sbin/cron/crontab/ (props changed) Modified: stable/8/usr.sbin/cron/crontab/crontab.5 == --- stable/8/usr.sbin/cron/crontab/crontab.5Sat May 5 02:52:41 2012 (r235047) +++ stable/8/usr.sbin/cron/crontab/crontab.5Sat May 5 02:53:02 2012 (r235048) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2012 +.Dd April 28, 2012 .Dt CRONTAB 5 .Os .Sh NAME @@ -296,10 +296,21 @@ are extensions. .An Paul Vixie Aq p...@vix.com .Sh BUGS If you are in one of the 70-odd countries that observe Daylight -Savings Time, jobs scheduled during the rollback or advance will be -affected. +Savings Time, jobs scheduled during the rollback or advance may be +affected if +.Xr cron 8 +is not started with the +.Fl s +flag. In general, it is not a good idea to schedule jobs during -this period. +this period if +.Xr cron 8 +is not started with the +.Fl s +flag, which is enabled by default. +See +.Xr cron 8 +for more details. .Pp For US timezones (except parts of AZ and HI) the time shift occurs at 2AM local time. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r235049 - stable/7/usr.sbin/cron/crontab
Author: gjb (doc committer) Date: Sat May 5 02:53:19 2012 New Revision: 235049 URL: http://svn.freebsd.org/changeset/base/235049 Log: MFC r234775: As cron(8) is started with '-s' by default, timezones that observe DST should not need to worry about scheduling jobs when the DST time changes. Rather than removing the BUGS section in crontab(5) regarding this, note that disabling '-s' may still cause jobs to be executed twice or not at all. PR: 166318 Modified: stable/7/usr.sbin/cron/crontab/crontab.5 Directory Properties: stable/7/usr.sbin/cron/crontab/ (props changed) Modified: stable/7/usr.sbin/cron/crontab/crontab.5 == --- stable/7/usr.sbin/cron/crontab/crontab.5Sat May 5 02:53:02 2012 (r235048) +++ stable/7/usr.sbin/cron/crontab/crontab.5Sat May 5 02:53:19 2012 (r235049) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2012 +.Dd April 28, 2012 .Dt CRONTAB 5 .Os .Sh NAME @@ -296,10 +296,21 @@ are extensions. .An Paul Vixie Aq p...@vix.com .Sh BUGS If you are in one of the 70-odd countries that observe Daylight -Savings Time, jobs scheduled during the rollback or advance will be -affected. +Savings Time, jobs scheduled during the rollback or advance may be +affected if +.Xr cron 8 +is not started with the +.Fl s +flag. In general, it is not a good idea to schedule jobs during -this period. +this period if +.Xr cron 8 +is not started with the +.Fl s +flag, which is enabled by default. +See +.Xr cron 8 +for more details. .Pp For US timezones (except parts of AZ and HI) the time shift occurs at 2AM local time. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"