svn commit: r221009 - head/sys/netinet6
Author: ticso Date: Mon Apr 25 09:00:52 2011 New Revision: 221009 URL: http://svn.freebsd.org/changeset/base/221009 Log: correct variable type name in comment Modified: head/sys/netinet6/in6.h Modified: head/sys/netinet6/in6.h == --- head/sys/netinet6/in6.h Mon Apr 25 06:36:26 2011(r221008) +++ head/sys/netinet6/in6.h Mon Apr 25 09:00:52 2011(r221009) @@ -397,8 +397,8 @@ struct route_in6 { #define IPV6_MULTICAST_IF 9 /* u_int; set/get IP6 multicast i/f */ #define IPV6_MULTICAST_HOPS10 /* int; set/get IP6 multicast hops */ #define IPV6_MULTICAST_LOOP11 /* u_int; set/get IP6 multicast loopback */ -#define IPV6_JOIN_GROUP12 /* ip6_mreq; join a group membership */ -#define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */ +#define IPV6_JOIN_GROUP12 /* ipv6_mreq; join a group membership */ +#define IPV6_LEAVE_GROUP 13 /* ipv6_mreq; leave a group membership */ #define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */ #define ICMP6_FILTER 18 /* icmp6_filter; icmp6 filter */ /* RFC2292 options */ ___ 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: r218387 - head/sys/arm/at91
Author: ticso Date: Mon Feb 7 01:13:57 2011 New Revision: 218387 URL: http://svn.freebsd.org/changeset/base/218387 Log: unbreak mutlicast hash creation for the second time. at91_emac hardware is *not* using ether_crc32_be algorithm! Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c == --- head/sys/arm/at91/if_ate.c Sun Feb 6 23:34:09 2011(r218386) +++ head/sys/arm/at91/if_ate.c Mon Feb 7 01:13:57 2011(r218387) @@ -433,6 +433,16 @@ ate_load_rx_buf(void *arg, bus_dma_segme bus_dmamap_sync(sc-rx_desc_tag, sc-rx_desc_map, BUS_DMASYNC_POSTWRITE); } +static uint32_t +ate_mac_hash(const uint8_t *buf) +{ + uint32_t index = 0; + for (int i = 0; i 48; i++) { + index ^= ((buf[i 3] (i 7)) 1) (i % 6); + } + return (index); +} + /* * Compute the multicast filter for this device. */ @@ -462,8 +472,8 @@ ate_setmcast(struct ate_softc *sc) TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) { if (ifma-ifma_addr-sa_family != AF_LINK) continue; - index = ether_crc32_be(LLADDR((struct sockaddr_dl *) - ifma-ifma_addr), ETHER_ADDR_LEN) 26; + index = ate_mac_hash(LLADDR((struct sockaddr_dl *) + ifma-ifma_addr)); af[index 3] |= 1 (index 7); } if_maddr_runlock(ifp); ___ 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: r215124 - head/sys/arm/conf
Author: ticso Date: Thu Nov 11 15:02:14 2010 New Revision: 215124 URL: http://svn.freebsd.org/changeset/base/215124 Log: add hint for at45d flash device sitting of spibus0 Modified: head/sys/arm/conf/BWCT.hints Modified: head/sys/arm/conf/BWCT.hints == --- head/sys/arm/conf/BWCT.hintsThu Nov 11 14:13:56 2010 (r215123) +++ head/sys/arm/conf/BWCT.hintsThu Nov 11 15:02:14 2010 (r215124) @@ -7,3 +7,7 @@ hint.ds1672_rtc.0.addr=0xd0 # National Semiconductor LM75 temperature sensor sitting on the I2C bus hint.lm75.0.at=iicbus0 hint.lm75.0.addr=0x9e + +# Atmel SPIflash sitting on the spibus +hint.at45d.0.at=spibus0 +hint.at45d.0.addr=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: r213251 - head/sys/arm/at91
Author: ticso Date: Tue Sep 28 21:13:54 2010 New Revision: 213251 URL: http://svn.freebsd.org/changeset/base/213251 Log: fix outdated comment Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c == --- head/sys/arm/at91/if_ate.c Tue Sep 28 20:57:14 2010(r213250) +++ head/sys/arm/at91/if_ate.c Tue Sep 28 21:13:54 2010(r213251) @@ -391,10 +391,7 @@ ate_mac_hash(const uint8_t *buf) } /* - * Compute the multicast filter for this device using the standard - * algorithm. I wonder why this isn't in ether somewhere as a lot - * of different MAC chips use this method (or the reverse the bits) - * method. + * Compute the multicast filter for this device. */ static int ate_setmcast(struct ate_softc *sc) ___ 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: r213201 - head/sys/arm/at91
Author: ticso Date: Mon Sep 27 15:55:30 2010 New Revision: 213201 URL: http://svn.freebsd.org/changeset/base/213201 Log: fix off by one error for twi reads with len != 1. STOP must be requested before the last byte is received. Modified: head/sys/arm/at91/at91_twi.c Modified: head/sys/arm/at91/at91_twi.c == --- head/sys/arm/at91/at91_twi.cMon Sep 27 15:24:16 2010 (r213200) +++ head/sys/arm/at91/at91_twi.cMon Sep 27 15:55:30 2010 (r213201) @@ -348,7 +348,7 @@ at91_twi_transfer(device_t dev, struct i if ((sr = RD4(sc, TWI_SR)) TWI_SR_RXRDY) { len--; *buf++ = RD4(sc, TWI_RHR) 0xff; - if (len == 0 msgs[i].len != 1) + if (len == 1) WR4(sc, TWI_CR, TWI_CR_STOP); } } ___ 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: r213203 - head/sys/arm/at91
Author: ticso Date: Mon Sep 27 15:58:19 2010 New Revision: 213203 URL: http://svn.freebsd.org/changeset/base/213203 Log: The TWI controller automatically stops if we don't fill up with new data in time. Modified: head/sys/arm/at91/at91_twi.c Modified: head/sys/arm/at91/at91_twi.c == --- head/sys/arm/at91/at91_twi.cMon Sep 27 15:55:39 2010 (r213202) +++ head/sys/arm/at91/at91_twi.cMon Sep 27 15:58:19 2010 (r213203) @@ -338,7 +338,7 @@ at91_twi_transfer(device_t dev, struct i err = EINVAL; goto out; } - if (len == 1) + if (len == 1 msgs[i].flags IIC_M_RD) WR4(sc, TWI_CR, TWI_CR_START | TWI_CR_STOP); else WR4(sc, TWI_CR, TWI_CR_START); @@ -358,8 +358,6 @@ at91_twi_transfer(device_t dev, struct i } } else { while (len--) { - if (len == 0 msgs[i].len != 1) - WR4(sc, TWI_CR, TWI_CR_STOP); if ((err = at91_twi_wait(sc, TWI_SR_TXRDY))) goto out; WR4(sc, TWI_THR, *buf++); ___ 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: I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf]
On Fri, Mar 19, 2010 at 05:28:06PM +0100, Ivan Voras wrote: On 19 March 2010 17:22, Valentin Nechayev ne...@netch.kiev.ua wrote: Fri, Mar 19, 2010 at 17:13:00, ivoras wrote about Re: I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf]: SSE in the userland you mean? Regardless, I don't think there is now reason for compiling everything as for i386. E.g. why not add at least -mtune=generic or even also -march=i686 to default gcc options? http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html Having userland compiled with i686 will give the same effect as i686-only kernel: it won't boot on machines which doesn't conform to. If it is supposed to boot on i486 and higher, no more than -march=i486 can be used. Yes, this is how I read the change - the move from i386 to i686. I apologize if I got it wrong :) As it was pointed out earlier - small systems users and designers probably have special install procedures because of the nature of the business. The assumption is wrong to my knowledge. I think it is a fact that an old 586 usually can't boot our CDs. It is also true that many embedded boards don't have CD boot support, like Soekris systems. But there are also some miniATX systems build on 586 class CPUs, which have recent BIOS code and can boot from CD. It is also quite common for unexeperienced users to binary install the HDD in a modern system. This is not business, because many home users run such small systems as storage servers, gateways, dhcp, ... - there are many unexperienced users with such systems. -- B.Walter be...@bwct.de http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. ___ 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: r205124 - stable/8/sys/arm/at91
Author: ticso Date: Sat Mar 13 16:37:17 2010 New Revision: 205124 URL: http://svn.freebsd.org/changeset/base/205124 Log: MFC 204462,204463,204476: fix multicast hashes Modified: stable/8/sys/arm/at91/if_ate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/arm/at91/if_ate.c == --- stable/8/sys/arm/at91/if_ate.c Sat Mar 13 16:15:15 2010 (r205123) +++ stable/8/sys/arm/at91/if_ate.c Sat Mar 13 16:37:17 2010 (r205124) @@ -383,6 +383,16 @@ ate_load_rx_buf(void *arg, bus_dma_segme bus_dmamap_sync(sc-rxtag, sc-rx_map[i], BUS_DMASYNC_PREREAD); } +static uint32_t +ate_mac_hash(const uint8_t *buf) +{ + uint32_t index = 0; + for (int i = 0; i 48; i++) { + index ^= ((buf[i 3] (i 7)) 1) (i % 6); + } + return (index); +} + /* * Compute the multicast filter for this device using the standard * algorithm. I wonder why this isn't in ether somewhere as a lot @@ -417,8 +427,8 @@ ate_setmcast(struct ate_softc *sc) TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) { if (ifma-ifma_addr-sa_family != AF_LINK) continue; - index = ether_crc32_be(LLADDR((struct sockaddr_dl *) - ifma-ifma_addr), ETHER_ADDR_LEN) 26; + index = ate_mac_hash(LLADDR((struct sockaddr_dl *) + ifma-ifma_addr)); af[index 3] |= 1 (index 7); } if_maddr_runlock(ifp); ___ 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: r204899 - head/sys/boot/arm/at91/boot2
Author: ticso Date: Tue Mar 9 00:48:06 2010 New Revision: 204899 URL: http://svn.freebsd.org/changeset/base/204899 Log: fix signed warning Modified: head/sys/boot/arm/at91/boot2/bwct_board.c Modified: head/sys/boot/arm/at91/boot2/bwct_board.c == --- head/sys/boot/arm/at91/boot2/bwct_board.c Mon Mar 8 23:06:09 2010 (r204898) +++ head/sys/boot/arm/at91/boot2/bwct_board.c Tue Mar 9 00:48:06 2010 (r204899) @@ -21,7 +21,7 @@ static void DS1672_Init(); static void DS1672_Init() { - uint8_t buf[] = {0x00, 0xa9}; + char buf[] = {0x00, 0xa9}; EEWrite(0xd0, buf, sizeof(buf)); } ___ 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: r204462 - head/sys/arm/at91
Author: ticso Date: Sun Feb 28 16:11:13 2010 New Revision: 204462 URL: http://svn.freebsd.org/changeset/base/204462 Log: Fix multicast hashes. Atmel uses a simple xor hash instead of the typical crc based one. Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c == --- head/sys/arm/at91/if_ate.c Sun Feb 28 14:43:55 2010(r204461) +++ head/sys/arm/at91/if_ate.c Sun Feb 28 16:11:13 2010(r204462) @@ -380,6 +380,20 @@ ate_load_rx_buf(void *arg, bus_dma_segme bus_dmamap_sync(sc-rxtag, sc-rx_map[i], BUS_DMASYNC_PREREAD); } +static uint32_t +ate_mac_hash(const uint8_t *buf) +{ + uint32_t index = 0; + uint8_t bit; + uint8_t bitshift; + for (int i = 0; i 48; i++) { + bit = i / 6; + bitshift = i - bit * 6; + index ^= ((buf[i 3] (i 7)) 1) bitshift; + } + return (index); +} + /* * Compute the multicast filter for this device using the standard * algorithm. I wonder why this isn't in ether somewhere as a lot @@ -414,8 +428,9 @@ ate_setmcast(struct ate_softc *sc) TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) { if (ifma-ifma_addr-sa_family != AF_LINK) continue; - index = ether_crc32_be(LLADDR((struct sockaddr_dl *) - ifma-ifma_addr), ETHER_ADDR_LEN) 26; + index = 0; + index = ate_mac_hash(LLADDR((struct sockaddr_dl *) + ifma-ifma_addr)); af[index 3] |= 1 (index 7); } if_maddr_runlock(ifp); ___ 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: r204463 - head/sys/arm/at91
Author: ticso Date: Sun Feb 28 16:14:34 2010 New Revision: 204463 URL: http://svn.freebsd.org/changeset/base/204463 Log: remove debug leftover Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c == --- head/sys/arm/at91/if_ate.c Sun Feb 28 16:11:13 2010(r204462) +++ head/sys/arm/at91/if_ate.c Sun Feb 28 16:14:34 2010(r204463) @@ -428,7 +428,6 @@ ate_setmcast(struct ate_softc *sc) TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) { if (ifma-ifma_addr-sa_family != AF_LINK) continue; - index = 0; index = ate_mac_hash(LLADDR((struct sockaddr_dl *) ifma-ifma_addr)); af[index 3] |= 1 (index 7); ___ 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: r204476 - head/sys/arm/at91
Author: ticso Date: Sun Feb 28 18:06:54 2010 New Revision: 204476 URL: http://svn.freebsd.org/changeset/base/204476 Log: simplify hash calculation Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c == --- head/sys/arm/at91/if_ate.c Sun Feb 28 17:19:22 2010(r204475) +++ head/sys/arm/at91/if_ate.c Sun Feb 28 18:06:54 2010(r204476) @@ -384,12 +384,8 @@ static uint32_t ate_mac_hash(const uint8_t *buf) { uint32_t index = 0; - uint8_t bit; - uint8_t bitshift; for (int i = 0; i 48; i++) { - bit = i / 6; - bitshift = i - bit * 6; - index ^= ((buf[i 3] (i 7)) 1) bitshift; + index ^= ((buf[i 3] (i 7)) 1) (i % 6); } return (index); } ___ 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: r203758 - in head/sys: amd64/conf arm/conf i386/conf ia64/conf mips/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf
On Mon, Feb 15, 2010 at 05:14:25PM -0700, M. Warner Losh wrote: In message: 4b79ce84.3060...@freebsd.org Andriy Gapon a...@freebsd.org writes: : At least in the i386/amd64 kernel config files typically we have: : optionsspacetabOPTION : And it is the case for the quoted above amd64 context. That's the standard way to add options in all kernel config files, although there's pockets here and there which don't quite comply. Interesting - I wasn't aware of this, but it surely makes sense. -- B.Walter be...@bwct.de http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. ___ 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: r191322 - in head/sys: arm/conf dev/iicbus
On Tue, Apr 21, 2009 at 08:58:42PM +0200, Rafal Jaworowski wrote: On 2009-04-21, at 20:38, M. Warner Losh wrote: In message: 20090421223502.507f0dcf.s...@freebsd.org Consider one kernel. Two different boards. Different RTC chips on each of these boards. Hints loaded from the boot loader. Now, on one board the ds1672 is used, on the other a ds163x is used. How does the right driver get attached in that case? If these boards are different, they are supposed to have different dedicated hints; doesn't this solve your concerns? For the same reason we have hint.ed.0 hint.le.0 ... And not just hint.eth.0 Each driver needs its own private hints. You can have a kernel compiled with multiple rtc to support a board family and just tune the hint for a specific board. This is embedded stuff, people might want to use board X and add another rtc. e.g. the BWCT board has a DS1672, but also an iic header. For whatever reason someone might want another rtc and simply adds one to the iic header. Say that this person has multiple boards in use - some with the special rtc and the others not. You can as easily add a DS1672 to a normal PC if the onboard rtc isn't sufficient for your need. -- B.Walter be...@bwct.de http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. ___ 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: r191228 - head/sys/arm/conf
Author: ticso Date: Fri Apr 17 22:45:57 2009 New Revision: 191228 URL: http://svn.freebsd.org/changeset/base/191228 Log: minor cleanup Modified: head/sys/arm/conf/BWCT Modified: head/sys/arm/conf/BWCT == --- head/sys/arm/conf/BWCT Fri Apr 17 22:20:44 2009(r191227) +++ head/sys/arm/conf/BWCT Fri Apr 17 22:45:57 2009(r191228) @@ -51,7 +51,7 @@ options NFSCLIENT #Network Filesystem #options NFSLOCKD#Network Lock Manager optionsNFS_ROOT#NFS usable as /, requires NFSCLIENT optionsBOOTP_NFSROOT -optionsBOOTP +optionsBOOTP #options MSDOSFS #MSDOS Filesystem #options CD9660 #ISO 9660 Filesystem @@ -83,7 +83,7 @@ devicerlswitch #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN#Don't run witness on spinlocks for speed -#options DIAGNOSTIC +#options DIAGNOSTIC device md device at91_twi# TWI: Two Wire Interface @@ -101,7 +101,7 @@ device ds1672 # DS1672 on I2C bus #devicesmb # SPI bus device spibus -#deviceat45d # at45db642 and maybe others +#deviceat45d # at45db642 and maybe others device bpf # Berkeley packet filter @@ -109,5 +109,3 @@ device bpf # Berkeley packet filter #deviceohci #deviceusb #deviceumass # Disks/Mass storage - Requires scbus and da - -#deviceat91_qdmmc ___ 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