svn commit: r228797 - in head: lib/libarchive lib/libarchive/libarchive_fe lib/libarchive/test usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test
Author: mm Date: Thu Dec 22 08:42:07 2011 New Revision: 228797 URL: http://svn.freebsd.org/changeset/base/228797 Log: Use contrib sources for building libarchive, tar and cpio. Make make test fully operational. MFC after:2 weeks Deleted: head/lib/libarchive/COPYING head/lib/libarchive/README head/lib/libarchive/archive.h head/lib/libarchive/archive_check_magic.c head/lib/libarchive/archive_crc32.h head/lib/libarchive/archive_endian.h head/lib/libarchive/archive_entry.3 head/lib/libarchive/archive_entry.c head/lib/libarchive/archive_entry.h head/lib/libarchive/archive_entry_copy_stat.c head/lib/libarchive/archive_entry_link_resolver.c head/lib/libarchive/archive_entry_private.h head/lib/libarchive/archive_entry_stat.c head/lib/libarchive/archive_entry_strmode.c head/lib/libarchive/archive_entry_xattr.c head/lib/libarchive/archive_hash.h head/lib/libarchive/archive_platform.h head/lib/libarchive/archive_private.h head/lib/libarchive/archive_read.3 head/lib/libarchive/archive_read.c head/lib/libarchive/archive_read_data_into_fd.c head/lib/libarchive/archive_read_disk.3 head/lib/libarchive/archive_read_disk.c head/lib/libarchive/archive_read_disk_entry_from_file.c head/lib/libarchive/archive_read_disk_private.h head/lib/libarchive/archive_read_disk_set_standard_lookup.c head/lib/libarchive/archive_read_extract.c head/lib/libarchive/archive_read_open_fd.c head/lib/libarchive/archive_read_open_file.c head/lib/libarchive/archive_read_open_filename.c head/lib/libarchive/archive_read_open_memory.c head/lib/libarchive/archive_read_private.h head/lib/libarchive/archive_read_support_compression_all.c head/lib/libarchive/archive_read_support_compression_bzip2.c head/lib/libarchive/archive_read_support_compression_compress.c head/lib/libarchive/archive_read_support_compression_gzip.c head/lib/libarchive/archive_read_support_compression_none.c head/lib/libarchive/archive_read_support_compression_program.c head/lib/libarchive/archive_read_support_compression_rpm.c head/lib/libarchive/archive_read_support_compression_uu.c head/lib/libarchive/archive_read_support_compression_xz.c head/lib/libarchive/archive_read_support_format_all.c head/lib/libarchive/archive_read_support_format_ar.c head/lib/libarchive/archive_read_support_format_cpio.c head/lib/libarchive/archive_read_support_format_empty.c head/lib/libarchive/archive_read_support_format_iso9660.c head/lib/libarchive/archive_read_support_format_mtree.c head/lib/libarchive/archive_read_support_format_raw.c head/lib/libarchive/archive_read_support_format_tar.c head/lib/libarchive/archive_read_support_format_xar.c head/lib/libarchive/archive_read_support_format_zip.c head/lib/libarchive/archive_string.c head/lib/libarchive/archive_string.h head/lib/libarchive/archive_string_sprintf.c head/lib/libarchive/archive_util.3 head/lib/libarchive/archive_util.c head/lib/libarchive/archive_virtual.c head/lib/libarchive/archive_write.3 head/lib/libarchive/archive_write.c head/lib/libarchive/archive_write_disk.3 head/lib/libarchive/archive_write_disk.c head/lib/libarchive/archive_write_disk_private.h head/lib/libarchive/archive_write_disk_set_standard_lookup.c head/lib/libarchive/archive_write_open_fd.c head/lib/libarchive/archive_write_open_file.c head/lib/libarchive/archive_write_open_filename.c head/lib/libarchive/archive_write_open_memory.c head/lib/libarchive/archive_write_private.h head/lib/libarchive/archive_write_set_compression_bzip2.c head/lib/libarchive/archive_write_set_compression_compress.c head/lib/libarchive/archive_write_set_compression_gzip.c head/lib/libarchive/archive_write_set_compression_none.c head/lib/libarchive/archive_write_set_compression_program.c head/lib/libarchive/archive_write_set_compression_xz.c head/lib/libarchive/archive_write_set_format.c head/lib/libarchive/archive_write_set_format_ar.c head/lib/libarchive/archive_write_set_format_by_name.c head/lib/libarchive/archive_write_set_format_cpio.c head/lib/libarchive/archive_write_set_format_cpio_newc.c head/lib/libarchive/archive_write_set_format_mtree.c head/lib/libarchive/archive_write_set_format_pax.c head/lib/libarchive/archive_write_set_format_shar.c head/lib/libarchive/archive_write_set_format_ustar.c head/lib/libarchive/archive_write_set_format_zip.c head/lib/libarchive/cpio.5 head/lib/libarchive/filter_fork.c head/lib/libarchive/filter_fork.h head/lib/libarchive/libarchive-formats.5 head/lib/libarchive/libarchive.3 head/lib/libarchive/libarchive_fe/ head/lib/libarchive/libarchive_internals.3 head/lib/libarchive/tar.5 head/lib/libarchive/test/.cvsignore head/lib/libarchive/test/README head/lib/libarchive/test/main.c head/lib/libarchive/test/read_open_memory.c head/lib/libarchive/test/test.h head/lib/libarchive/test/test_acl_basic.c head/lib/libarchive/test/test_acl_freebsd.c
Re: svn commit: r228783 - head/sys/conf
.. and once this LLVM regression has been fixed, do you plan on reverting this change to conf? Adrian On 21 December 2011 09:01, Dimitry Andric d...@freebsd.org wrote: Author: dim Date: Wed Dec 21 17:01:13 2011 New Revision: 228783 URL: http://svn.freebsd.org/changeset/base/228783 Log: When building with clang, disable -Wshift-count-negative and -Wshift-count-overflow for sys/dev/ath/ath_hal/ah_regdomain.c, as it gets multiple instances of the following warnings: In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99: sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:69:15: warning: shift count is negative [-Wshift-count-negative] .chan11a = BM4(F1_4950_4980, ^ sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:41:4: note: expanded from: W1(_fa) | W1(_fb) | W1(_fc) | W1(_fd) } ^ sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:34:45: note: expanded from: (((_a) 63 (_a) 128 ? (((uint64_t) 1)((_a)-64)) : (uint64_t) 0)) ^ ~ and: In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99: sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:629:15: error: shift count = width of type [-Werror,-Wshift-count-overflow] .chan11a = BM4(W2_5260_5320, ^ sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:40:34: note: expanded from: { W0(_fa) | W0(_fb) | W0(_fc) | W0(_fd), \ ^ sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:32:44: note: expanded from: (((_a) = 0 (_a) 64 ? (((uint64_t) 1)(_a)) : (uint64_t) 0)) ^ Both warnings are false positives, caused by LLVM PR 10030. For global initializations, clang fails to detect that the branch of the ternary operator causing the warning is dead. MFC after: 1 week Modified: head/sys/conf/files head/sys/conf/kern.mk Modified: head/sys/conf/files == --- head/sys/conf/files Wed Dec 21 16:47:01 2011 (r228782) +++ head/sys/conf/files Wed Dec 21 17:01:13 2011 (r228783) @@ -613,7 +613,7 @@ dev/ath/ath_hal/ah_eeprom_9287.c \ optional ath_hal | ath_ar9287 \ compile-with ${NORMAL_C} -I$S/dev/ath dev/ath/ath_hal/ah_regdomain.c optional ath \ - compile-with ${NORMAL_C} -I$S/dev/ath + compile-with ${NORMAL_C} ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} -I$S/dev/ath # ar5210 dev/ath/ath_hal/ar5210/ar5210_attach.c optional ath_hal | ath_ar5210 \ compile-with ${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Wed Dec 21 16:47:01 2011 (r228782) +++ head/sys/conf/kern.mk Wed Dec 21 17:01:13 2011 (r228783) @@ -17,6 +17,8 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn .if ${CC:T:Mclang} == clang NO_WCONSTANT_CONVERSION= -Wno-constant-conversion NO_WARRAY_BOUNDS= -Wno-array-bounds +NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative +NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow .endif # ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211
On Wed, Dec 21, 2011 at 11:27:54PM +, Alexander Best wrote: the commits should stay. after all this is HEAD. this way all developers running HEAD and with the appropriate ath hardware will test the changes. if dim@ really broke something, people will notice. the changes should *not* be MFC'ed. but if no one complains until 10.0-RELEASE, it's very unlikely he broke something. plus...does it make a different, if you test HEAD with the changes present or test HEAD with the changes integrated via patches? one way or the other you can test the changes and *if* something broke, the commits can be reverted. Is this a joke? Having HEAD as stable as possible is very important. That's the only way to actually expect people (including developers (including myself!)) to run HEAD on their laptops and less important servers. Those people get upset as any other user if their systems stop working, because untested changes are being committed. This is not to pick on Dimitry, but on those who actually believe that it is ok to commit untested changes to HEAD. IT IS NOT. Maybe you are just confused, because the place you are looking for seems to be junkyard, but not HEAD, NEVER HEAD! BTW. This is a lesson we learned from 5-CURRENT. It was so unstable that nobody wanted to run it, and so unstable it was even hard to test changes on it. In turn it was becoming even more unstable, because people kept committing more untested code. Please, do never, ever encourage evil like that or I'll turn on mean Pawel:) -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpO5pwSQEL7k.pgp Description: PGP signature
Re: svn commit: r228797 - in head: lib/libarchive lib/libarchive/libarchive_fe lib/libarchive/test usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test
On Thursday, December 22, 2011 3:42:08 am Martin Matuska wrote: Author: mm Date: Thu Dec 22 08:42:07 2011 New Revision: 228797 URL: http://svn.freebsd.org/changeset/base/228797 Log: Use contrib sources for building libarchive, tar and cpio. Make make test fully operational. MFC after: 2 weeks Thanks for doing all this work! Hopefully it will make future imports of libarchive easier. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228796 - head/sys/fs/msdosfs
On Thursday, December 22, 2011 1:31:29 am Kevin Lo wrote: Author: kevlo Date: Thu Dec 22 06:31:29 2011 New Revision: 228796 URL: http://svn.freebsd.org/changeset/base/228796 Log: Discarding local array based on return values Is this an incomplete log message? This doesn't really explain (to me at least) what this change does or why it is doing it. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211
On Wednesday, December 21, 2011 6:27:54 pm Alexander Best wrote: On Wed Dec 21 11, John Baldwin wrote: On Wednesday, December 21, 2011 4:52:04 pm Adrian Chadd wrote: Erm, why did you do this without first getting clearance from someone who has the hardware to test it? Just because it looks obviously wrong to you, doesn't at all mean that it's wrong. It's quite possible that the driver _requires_ those bits to be written to the hardware as 0. I'd appreciate it if would please revert this and other ath/hal changes until I've had time to research them and test them out. I agree it should be reviewed, but if you are seriously depending on the fact that the shifted values are beyond the edge of the word boundary and so the result wraps to zero, then I'd question the sanity of your code. i disagree. You don't think changes should be reviewed (that's what I said above, I did not necessarily say it should be reverted)? That's way out in left field if that is what you really think. As for reverting the changes, I think they are small enough that is probably a bit overboard unless someone else reports an actual problem with them. (Specifically, I don't think the bar is high enough in this case to warrant a reversion.) However, I think that for future changes, Dimitry should get these sort of changes reviewed before committing them. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228783 - head/sys/conf
On 2011-12-22 09:43, Adrian Chadd wrote: On 21 December 2011 09:01, Dimitry Andricd...@freebsd.org wrote: Author: dim Date: Wed Dec 21 17:01:13 2011 New Revision: 228783 URL: http://svn.freebsd.org/changeset/base/228783 ... Both warnings are false positives, caused by LLVM PR 10030. For global initializations, clang fails to detect that the branch of the ternary operator causing the warning is dead. .. and once this LLVM regression has been fixed, do you plan on reverting this change to conf? Yes. The LLVM PR (really a Clang bug) can be followed here: http://llvm.org/bugs/show_bug.cgi?id=10030 Since it is in there for quite some time already, I assume the problem is rather tricky to fix. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228801 - head
Author: dim Date: Thu Dec 22 15:03:48 2011 New Revision: 228801 URL: http://svn.freebsd.org/changeset/base/228801 Log: Remove -mfancy-math from LIB32CPUFLAGS for amd64. It has been default for our gcc since more than three years (see r181534, which is also in stable/9 and stable/8). This flag used to be for the benefit of the old in-kernel math emulator, which was removed more than eight years ago. Pointed out by: arundel MFC after:1 week Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Dec 22 14:09:08 2011(r228800) +++ head/Makefile.inc1 Thu Dec 22 15:03:48 2011(r228801) @@ -276,7 +276,6 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse - .else LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif -LIB32CPUFLAGS+=-mfancy-math-387 LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ MACHINE_CPU=i686 mmx sse sse2 \ LD=${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32 \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228802 - head/sys/dev/viawd
Author: fabient Date: Thu Dec 22 15:13:32 2011 New Revision: 228802 URL: http://svn.freebsd.org/changeset/base/228802 Log: Correctly spell my email address. Modified: head/sys/dev/viawd/viawd.c head/sys/dev/viawd/viawd.h Modified: head/sys/dev/viawd/viawd.c == --- head/sys/dev/viawd/viawd.c Thu Dec 22 15:03:48 2011(r228801) +++ head/sys/dev/viawd/viawd.c Thu Dec 22 15:13:32 2011(r228802) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Fabien Thomas ftho...@freebsd.org + * Copyright (c) 2011 Fabien Thomas fabi...@freebsd.org * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/dev/viawd/viawd.h == --- head/sys/dev/viawd/viawd.h Thu Dec 22 15:03:48 2011(r228801) +++ head/sys/dev/viawd/viawd.h Thu Dec 22 15:13:32 2011(r228802) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Fabien Thomas ftho...@freebsd.org + * Copyright (c) 2011 Fabien Thomas fabi...@freebsd.org * All rights reserved. * * Redistribution and use in source and binary forms, with or without ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228803 - head/sys/dev/e1000
Author: luigi Date: Thu Dec 22 15:33:41 2011 New Revision: 228803 URL: http://svn.freebsd.org/changeset/base/228803 Log: put back netmap support, deleted by mistake in a previous commit Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Thu Dec 22 15:13:32 2011(r228802) +++ head/sys/dev/e1000/if_igb.c Thu Dec 22 15:33:41 2011(r228803) @@ -368,6 +368,9 @@ SYSCTL_INT(_hw_igb, OID_AUTO, rx_process igb_rx_process_limit, 0, Maximum number of received packets to process at a time, -1 means unlimited); +#ifdef DEV_NETMAP /* see ixgbe.c for details */ +#include dev/netmap/if_igb_netmap.h +#endif /* DEV_NETMAP */ /* * Device identification routine * @@ -664,6 +667,9 @@ igb_attach(device_t dev) if (error) goto err_late; +#ifdef DEV_NETMAP + igb_netmap_attach(adapter); +#endif /* DEV_NETMAP */ INIT_DEBUGOUT(igb_attach: end); return (0); @@ -742,6 +748,9 @@ igb_detach(device_t dev) callout_drain(adapter-timer); +#ifdef DEV_NETMAP + netmap_detach(adapter-ifp); +#endif /* DEV_NETMAP */ igb_free_pci_resources(adapter); bus_generic_detach(dev); if_free(ifp); @@ -3279,9 +3288,16 @@ igb_setup_transmit_ring(struct tx_ring * struct adapter *adapter = txr-adapter; struct igb_tx_buffer *txbuf; int i; +#ifdef DEV_NETMAP + struct netmap_adapter *na = NA(adapter-ifp); + struct netmap_slot *slot; +#endif /* DEV_NETMAP */ /* Clear the old descriptor contents */ IGB_TX_LOCK(txr); +#ifdef DEV_NETMAP + slot = netmap_reset(na, NR_TX, txr-me, 0); +#endif /* DEV_NETMAP */ bzero((void *)txr-tx_base, (sizeof(union e1000_adv_tx_desc)) * adapter-num_tx_desc); /* Reset indices */ @@ -3298,6 +3314,17 @@ igb_setup_transmit_ring(struct tx_ring * m_freem(txbuf-m_head); txbuf-m_head = NULL; } +#ifdef DEV_NETMAP + if (slot) { + /* slot si is mapped to the i-th NIC-ring entry */ + int si = i + na-tx_rings[txr-me].nkr_hwofs; + + if (si 0) + si += na-num_tx_desc; + netmap_load_map(txr-txtag, txbuf-map, + NMB(slot + si), na-buff_size); + } +#endif /* DEV_NETMAP */ /* clear the watch index */ txbuf-next_eop = -1; } @@ -3664,6 +3691,19 @@ igb_txeof(struct tx_ring *txr) IGB_TX_LOCK_ASSERT(txr); +#ifdef DEV_NETMAP + if (ifp-if_capenable IFCAP_NETMAP) { + struct netmap_adapter *na = NA(ifp); + + selwakeuppri(na-tx_rings[txr-me].si, PI_NET); + IGB_TX_UNLOCK(txr); + IGB_CORE_LOCK(adapter); + selwakeuppri(na-tx_rings[na-num_queues + 1].si, PI_NET); + IGB_CORE_UNLOCK(adapter); + IGB_TX_LOCK(txr); + return FALSE; + } +#endif /* DEV_NETMAP */ if (txr-tx_avail == adapter-num_tx_desc) { txr-queue_status = IGB_QUEUE_IDLE; return FALSE; @@ -3987,6 +4027,10 @@ igb_setup_receive_ring(struct rx_ring *r bus_dma_segment_t pseg[1], hseg[1]; struct lro_ctrl *lro = rxr-lro; int rsize, nsegs, error = 0; +#ifdef DEV_NETMAP + struct netmap_adapter *na = NA(rxr-adapter-ifp); + struct netmap_slot *slot; +#endif /* DEV_NETMAP */ adapter = rxr-adapter; dev = adapter-dev; @@ -3994,6 +4038,9 @@ igb_setup_receive_ring(struct rx_ring *r /* Clear the ring contents */ IGB_RX_LOCK(rxr); +#ifdef DEV_NETMAP + slot = netmap_reset(na, NR_RX, rxr-me, 0); +#endif /* DEV_NETMAP */ rsize = roundup2(adapter-num_rx_desc * sizeof(union e1000_adv_rx_desc), IGB_DBA_ALIGN); bzero((void *)rxr-rx_base, rsize); @@ -4012,6 +4059,22 @@ igb_setup_receive_ring(struct rx_ring *r struct mbuf *mh, *mp; rxbuf = rxr-rx_buffers[j]; +#ifdef DEV_NETMAP + if (slot) { + /* slot sj is mapped to the i-th NIC-ring entry */ + int sj = j + na-rx_rings[rxr-me].nkr_hwofs; + void *addr; + + if (sj 0) + sj += na-num_rx_desc; + addr = NMB(slot + sj); + netmap_load_map(rxr-ptag, + rxbuf-pmap, addr, na-buff_size); + /* Update descriptor */ + rxr-rx_base[j].read.pkt_addr = htole64(vtophys(addr)); + continue; +
svn commit: r228804 - head/sys/kern
Author: jhb Date: Thu Dec 22 16:01:10 2011 New Revision: 228804 URL: http://svn.freebsd.org/changeset/base/228804 Log: Use TASK_INITIALIZER() for dev_dtr_task rather than a dedicated SYSINIT(). Modified: head/sys/kern/kern_conf.c Modified: head/sys/kern/kern_conf.c == --- head/sys/kern/kern_conf.c Thu Dec 22 15:33:41 2011(r228803) +++ head/sys/kern/kern_conf.c Thu Dec 22 16:01:10 2011(r228804) @@ -55,6 +55,7 @@ struct mtx devmtx; static void destroy_devl(struct cdev *dev); static int destroy_dev_sched_cbl(struct cdev *dev, void (*cb)(void *), void *arg); +static void destroy_dev_tq(void *ctx, int pending); static int make_dev_credv(int flags, struct cdev **dres, struct cdevsw *devsw, int unit, struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt, va_list ap); @@ -1298,7 +1299,7 @@ clone_cleanup(struct clonedevs **cdp) static TAILQ_HEAD(, cdev_priv) dev_ddtr = TAILQ_HEAD_INITIALIZER(dev_ddtr); -static struct task dev_dtr_task; +static struct task dev_dtr_task = TASK_INITIALIZER(0, destroy_dev_tq, NULL); static void destroy_dev_tq(void *ctx, int pending) @@ -1386,15 +1387,6 @@ drain_dev_clone_events(void) sx_xunlock(clone_drain_lock); } -static void -devdtr_init(void *dummy __unused) -{ - - TASK_INIT(dev_dtr_task, 0, destroy_dev_tq, NULL); -} - -SYSINIT(devdtr, SI_SUB_DEVFS, SI_ORDER_SECOND, devdtr_init, NULL); - #include opt_ddb.h #ifdef DDB #include sys/kernel.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228805 - in head/sys/modules/aic7xxx: ahc/ahc_pci ahd
Author: dim Date: Thu Dec 22 16:16:12 2011 New Revision: 228805 URL: http://svn.freebsd.org/changeset/base/228805 Log: Disable -Wconstant-conversion warnings for the aic7xxx module in a more fine-grained way: only add the option for the specific .c files that need them, like via sys/conf/files. MFC after:1 week Modified: head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile head/sys/modules/aic7xxx/ahd/Makefile Modified: head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile == --- head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile Thu Dec 22 16:01:10 2011(r228804) +++ head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile Thu Dec 22 16:16:12 2011(r228805) @@ -12,6 +12,8 @@ SRCS+=device_if.h bus_if.h pci_if.h SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h CFLAGS+= -I${.CURDIR}/../../../../dev/aic7xxx -I.. -CWARNFLAGS+= ${NO_WCONSTANT_CONVERSION} .include bsd.kmod.mk + +CWARNFLAGS.ahc_pci.c= ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: head/sys/modules/aic7xxx/ahd/Makefile == --- head/sys/modules/aic7xxx/ahd/Makefile Thu Dec 22 16:01:10 2011 (r228804) +++ head/sys/modules/aic7xxx/ahd/Makefile Thu Dec 22 16:16:12 2011 (r228805) @@ -32,8 +32,10 @@ SRCS= ${GENSRCS} SRCS+= aic79xx.c aic79xx_osm.c aic79xx_pci.c ahd_pci.c SRCS+= opt_scsi.h opt_aic79xx.h opt_cam.h opt_ddb.h SRCS+= device_if.h bus_if.h pci_if.h -CWARNFLAGS+= ${NO_WCONSTANT_CONVERSION} CLEANFILES= ${GENSRCS} .include bsd.kmod.mk + +CWARNFLAGS.ahd_pci.c= ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228800 - in head/sys/dev/ath/ath_hal: ar5212 ar5416
Just to be silly :) I reviewed this patchset early this morning and it's fine. Nothing in the FreeBSD HAL uses the compression code, so unless someone out there has proprietary extensions which does, this patch is fine. I promise to get the AR5210 and AR5211 stuff tested tonight. The AR5210 at least works fine with -9 and -HEAD before the patch; the AR5211 is broken when trying to do WPA so I'll have to fix that first. Thanks, Adrian On 22 December 2011 06:09, Dimitry Andric d...@freebsd.org wrote: Author: dim Date: Thu Dec 22 14:09:08 2011 New Revision: 228800 URL: http://svn.freebsd.org/changeset/base/228800 Log: Revert r228786. We'll need to work around the warnings in another way. Requested by: adrian MFC after: 1 week Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c == --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 22 13:47:36 2011 (r228799) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 22 14:09:08 2011 (r228800) @@ -574,7 +574,7 @@ ar5212SetDecompMask(struct ath_hal *ah, struct ath_hal_5212 *ahp = AH5212(ah); if (keyidx = HAL_DECOMP_MASK_SIZE) - return AH_FALSE; + return HAL_EINVAL; OS_REG_WRITE(ah, AR_DCM_A, keyidx); OS_REG_WRITE(ah, AR_DCM_D, en ? AR_DCM_D_EN : 0); ahp-ah_decompMask[keyidx] = en; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Dec 22 13:47:36 2011 (r228799) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Dec 22 14:09:08 2011 (r228800) @@ -161,7 +161,7 @@ ar5416SetAntennaSwitch(struct ath_hal *a HAL_BOOL ar5416SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en) { - return AH_TRUE; + return HAL_OK; } /* Setup coverage class */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228808 - head/sys/cam/scsi
Author: mav Date: Thu Dec 22 16:40:35 2011 New Revision: 228808 URL: http://svn.freebsd.org/changeset/base/228808 Log: Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to GEOM and using READ CD command for reading data, same as acd driver does. Audio CDs identified by checking respective bit of the control field of the first track in TOC. This fixes bunch of error messages during boot (GEOM taste) with Audio CD inserted and allows to grab Audio CD image using just dd. MFC after:1 month Modified: head/sys/cam/scsi/scsi_all.h head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_all.h == --- head/sys/cam/scsi/scsi_all.hThu Dec 22 16:36:08 2011 (r228807) +++ head/sys/cam/scsi/scsi_all.hThu Dec 22 16:40:35 2011 (r228808) @@ -932,6 +932,7 @@ struct ata_pass_16 { #defineWRITE_120xAA #defineWRITE_VERIFY_12 0xAE #defineREAD_ELEMENT_STATUS 0xB8 +#defineREAD_CD 0xBE /* Maintenance In Service Action Codes */ #defineREPORT_IDENTIFYING_INFRMATION 0x05 Modified: head/sys/cam/scsi/scsi_cd.c == --- head/sys/cam/scsi/scsi_cd.c Thu Dec 22 16:36:08 2011(r228807) +++ head/sys/cam/scsi/scsi_cd.c Thu Dec 22 16:40:35 2011(r228808) @@ -1483,6 +1483,11 @@ cdstart(struct cam_periph *periph, union /* dxfer_len */ bp-bio_bcount, /* sense_len */ SSD_FULL_SIZE, /* timeout */ 3); + /* Use READ CD command for audio tracks. */ + if (softc-params.blksize == 2352) { + start_ccb-csio.cdb_io.cdb_bytes[0] = READ_CD; + start_ccb-csio.cdb_io.cdb_bytes[9] = 0xf8; + } start_ccb-ccb_h.ccb_state = CD_CCB_BUFFER_IO; @@ -2880,6 +2885,13 @@ cdcheckmedia(struct cam_periph *periph) softc-flags |= CD_FLAG_VALID_TOC; + /* If the first track is audio, correct sector size. */ + if ((softc-toc.entries[0].control 4) == 0) { + softc-disk-d_sectorsize = softc-params.blksize = 2352; + softc-disk-d_mediasize = + (off_t)softc-params.blksize * softc-params.disksize; + } + bailout: /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228808 - head/sys/cam/scsi
on 22/12/2011 18:40 Alexander Motin said the following: Author: mav Date: Thu Dec 22 16:40:35 2011 New Revision: 228808 URL: http://svn.freebsd.org/changeset/base/228808 Log: Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to GEOM and using READ CD command for reading data, same as acd driver does. Audio CDs identified by checking respective bit of the control field of the first track in TOC. This fixes bunch of error messages during boot (GEOM taste) with Audio CD inserted and allows to grab Audio CD image using just dd. Thank you! What about CDs with mixed audio and data tracks? I don't ask for any support, just curious if our users could run into any troubles with those. MFC after: 1 month Modified: head/sys/cam/scsi/scsi_all.h head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_all.h == --- head/sys/cam/scsi/scsi_all.h Thu Dec 22 16:36:08 2011 (r228807) +++ head/sys/cam/scsi/scsi_all.h Thu Dec 22 16:40:35 2011 (r228808) @@ -932,6 +932,7 @@ struct ata_pass_16 { #define WRITE_120xAA #define WRITE_VERIFY_12 0xAE #define READ_ELEMENT_STATUS 0xB8 +#define READ_CD 0xBE /* Maintenance In Service Action Codes */ #define REPORT_IDENTIFYING_INFRMATION 0x05 Modified: head/sys/cam/scsi/scsi_cd.c == --- head/sys/cam/scsi/scsi_cd.c Thu Dec 22 16:36:08 2011 (r228807) +++ head/sys/cam/scsi/scsi_cd.c Thu Dec 22 16:40:35 2011 (r228808) @@ -1483,6 +1483,11 @@ cdstart(struct cam_periph *periph, union /* dxfer_len */ bp-bio_bcount, /* sense_len */ SSD_FULL_SIZE, /* timeout */ 3); + /* Use READ CD command for audio tracks. */ + if (softc-params.blksize == 2352) { + start_ccb-csio.cdb_io.cdb_bytes[0] = READ_CD; + start_ccb-csio.cdb_io.cdb_bytes[9] = 0xf8; + } start_ccb-ccb_h.ccb_state = CD_CCB_BUFFER_IO; @@ -2880,6 +2885,13 @@ cdcheckmedia(struct cam_periph *periph) softc-flags |= CD_FLAG_VALID_TOC; + /* If the first track is audio, correct sector size. */ + if ((softc-toc.entries[0].control 4) == 0) { + softc-disk-d_sectorsize = softc-params.blksize = 2352; + softc-disk-d_mediasize = + (off_t)softc-params.blksize * softc-params.disksize; + } + bailout: /* -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228811 - in head/sys: contrib/pf/net modules/pfsync
Author: glebius Date: Thu Dec 22 18:31:47 2011 New Revision: 228811 URL: http://svn.freebsd.org/changeset/base/228811 Log: In FreeBSD we always have bpf(4) API, either real or stub. No need in detecting presense of 'device bpf'. Modified: head/sys/contrib/pf/net/if_pfsync.c head/sys/modules/pfsync/Makefile Modified: head/sys/contrib/pf/net/if_pfsync.c == --- head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:12:51 2011 (r228810) +++ head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:31:47 2011 (r228811) @@ -45,17 +45,12 @@ #ifdef __FreeBSD__ #include opt_inet.h #include opt_inet6.h -#include opt_bpf.h #include opt_pf.h #include sys/cdefs.h __FBSDID($FreeBSD$); -#ifdef DEV_BPF -#defineNBPFILTER DEV_BPF -#else -#defineNBPFILTER 0 -#endif +#defineNBPFILTER 1 #ifdef DEV_PFSYNC #defineNPFSYNC DEV_PFSYNC Modified: head/sys/modules/pfsync/Makefile == --- head/sys/modules/pfsync/MakefileThu Dec 22 18:12:51 2011 (r228810) +++ head/sys/modules/pfsync/MakefileThu Dec 22 18:31:47 2011 (r228811) @@ -6,7 +6,7 @@ KMOD= pfsync SRCS= if_pfsync.c \ - opt_pf.h opt_inet.h opt_inet6.h opt_bpf.h + opt_pf.h opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../contrib/pf SRCS+= bus_if.h device_if.h @@ -24,9 +24,6 @@ opt_inet6.h: echo #define INET6 1 ${.TARGET} .endif -opt_bpf.h: - echo #define DEV_BPF 1 ${.TARGET} - .if defined(VIMAGE) opt_global.h: echo #define VIMAGE 1 ${.TARGET} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228814 - head/sys/contrib/pf/net
Author: glebius Date: Thu Dec 22 18:56:27 2011 New Revision: 228814 URL: http://svn.freebsd.org/changeset/base/228814 Log: Merge couple more fixes from OpenBSD to bulk processing: revision 1.118 date: 2009/03/23 06:19:59; author: dlg; state: Exp; lines: +8 -6 wait an appropriate amount of time before giving up on a bulk update, rather than giving up after a hardcoded 5 seconds (which is generally much too short an interval for a bulk update). pointed out by david@, eyeballed by mcbride@ revision 1.171 date: 2011/10/31 22:02:52; author: mikeb; state: Exp; lines: +2 -1 Don't forget to cancel bulk update failure timeout when destroying an interface. Problem report and fix from Erik Lax, thanks! Start a brief note of revisions merged from OpenBSD. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c == --- head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:51:35 2011 (r228813) +++ head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:56:27 2011 (r228814) @@ -42,6 +42,11 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* + * Revisions picked from OpenBSD after revision 1.110 import: + * 1.118, 1.124, 1.148, 1.149, 1.151, 1.171 - fixes to bulk updates + */ + #ifdef __FreeBSD__ #include opt_inet.h #include opt_inet6.h @@ -536,6 +541,7 @@ pfsync_clone_destroy(struct ifnet *ifp) EVENTHANDLER_DEREGISTER(ifnet_departure_event, sc-sc_detachtag); PF_LOCK(); #endif + timeout_del(sc-sc_bulkfail_tmo); timeout_del(sc-sc_bulk_tmo); timeout_del(sc-sc_tmo); #ifdef __FreeBSD__ @@ -1604,14 +1610,16 @@ pfsync_in_bus(struct pfsync_pkt *pkt, st switch (bus-status) { case PFSYNC_BUS_START: #ifdef __FreeBSD__ - callout_reset(sc-sc_bulkfail_tmo, 5 * hz, pfsync_bulk_fail, - V_pfsyncif); + callout_reset(sc-sc_bulkfail_tmo, 4 * hz + + pf_pool_limits[PF_LIMIT_STATES].limit / + ((sc-sc_sync_if-if_mtu - PFSYNC_MINPKT) / + sizeof(struct pfsync_state)), + pfsync_bulk_fail, V_pfsyncif); #else - timeout_add_sec(sc-sc_bulkfail_tmo, 5); /* XXX magic */ -#endif -#ifdef XXX + timeout_add(sc-sc_bulkfail_tmo, 4 * hz + pf_pool_limits[PF_LIMIT_STATES].limit / - (PFSYNC_BULKPACKETS * sc-sc_maxcount)); + ((sc-sc_if.if_mtu - PFSYNC_MINPKT) / + sizeof(struct pfsync_state))); #endif #ifdef __FreeBSD__ if (V_pf_status.debug = PF_DEBUG_MISC) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228815 - head/sys/contrib/pf/net
Author: glebius Date: Thu Dec 22 19:05:58 2011 New Revision: 228815 URL: http://svn.freebsd.org/changeset/base/228815 Log: Merge from OpenBSD: revision 1.120 date: 2009/04/04 13:09:29; author: dlg; state: Exp; lines: +5 -5 use time_uptime instead of time_second internally. time_uptime isnt affected by adjusting the clock. revision 1.175 date: 2011/11/25 12:52:10; author: dlg; state: Exp; lines: +3 -3 use time_uptime to set state creation values as time_second can be skewed at runtime by things like date(1) and ntpd. time_uptime is monotonic and therefore more useful to compare against. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c == --- head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:56:27 2011 (r228814) +++ head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 19:05:58 2011 (r228815) @@ -45,6 +45,7 @@ /* * Revisions picked from OpenBSD after revision 1.110 import: * 1.118, 1.124, 1.148, 1.149, 1.151, 1.171 - fixes to bulk updates + * 1.120, 1.175 - use monotonic time_uptime */ #ifdef __FreeBSD__ @@ -664,7 +665,7 @@ pfsync_state_export(struct pfsync_state /* copy from state */ strlcpy(sp-ifname, st-kif-pfik_name, sizeof(sp-ifname)); bcopy(st-rt_addr, sp-rt_addr, sizeof(sp-rt_addr)); - sp-creation = htonl(time_second - st-creation); + sp-creation = htonl(time_uptime - st-creation); sp-expire = pf_state_expires(st); if (sp-expire = time_second) sp-expire = htonl(0); @@ -815,7 +816,7 @@ pfsync_state_import(struct pfsync_state /* copy to state */ bcopy(sp-rt_addr, st-rt_addr, sizeof(st-rt_addr)); - st-creation = time_second - ntohl(sp-creation); + st-creation = time_uptime - ntohl(sp-creation); st-expire = time_second; if (sp-expire) { /* XXX No adaptive scaling. */ @@ -838,7 +839,7 @@ pfsync_state_import(struct pfsync_state st-anchor.ptr = NULL; st-rt_kif = NULL; - st-pfsync_time = time_second; + st-pfsync_time = time_uptime; st-sync_state = PFSYNC_S_NONE; /* XXX when we have nat_rule/anchors, use STATE_INC_COUNTERS */ @@ -1330,7 +1331,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, st pf_state_peer_ntoh(sp-dst, st-dst); st-expire = ntohl(sp-expire) + time_second; st-timeout = sp-timeout; - st-pfsync_time = time_second; + st-pfsync_time = time_uptime; } #ifdef __FreeBSD__ PF_UNLOCK(); @@ -1440,7 +1441,7 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, pf_state_peer_ntoh(up-dst, st-dst); st-expire = ntohl(up-expire) + time_second; st-timeout = up-timeout; - st-pfsync_time = time_second; + st-pfsync_time = time_uptime; } #ifdef __FreeBSD__ PF_UNLOCK(); @@ -2621,7 +2622,7 @@ pfsync_update_state(struct pf_state *st) st-sync_state); } - if (sync || (time_second - st-pfsync_time) 2) { + if (sync || (time_uptime - st-pfsync_time) 2) { pfsync_upds++; #ifdef __FreeBSD__ pfsync_sendout(); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211
On 22 December 2011 10:08, Alexander Best arun...@freebsd.org wrote: You don't think changes should be reviewed (that's what I said above, I did not necessarily say it should be reverted)? That's way out in left field if that is what you really think. no of course not. let's handle it this way: keep the commits and adrian@ and everybody else can test dim@'s changes. if the commits broke anything, they should be reverted. Well, he's already reverted them. I've reviewed the HAL_TRUE - HAL_OK change, that's fine. Nothing uses that particular bit of code in the HAL at the moment (and if someone wants to support the payload compression code for the AR5212 era devices, please let me know :) I'll test out the shift register changes tonight and see if I can dig up the AR5210/AR5211 datasheets internally. Once I've verified it's right, I'll commit the change. the next time dim@ is about to touch non trivial code or code that is being maintained by a certain developer, he should post his patches to some mailinglist (-wireless@ in this case) and cc that particular developer (adrian@ in this case). Yup. You guys already did that in November, so thankyou for that. I just hadn't until recently found equipment to test it out. no hard feelings. ;) Oh there's no hard feelings. None whatsoever. :-) There, resolved! Time for a cool, refreshing glass of orange juice. Adrian ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228808 - head/sys/cam/scsi
on 22/12/2011 21:41 Alexander Motin said the following: On 22.12.2011 20:24, Andriy Gapon wrote: on 22/12/2011 18:40 Alexander Motin said the following: Author: mav Date: Thu Dec 22 16:40:35 2011 New Revision: 228808 URL: http://svn.freebsd.org/changeset/base/228808 Log: Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to GEOM and using READ CD command for reading data, same as acd driver does. Audio CDs identified by checking respective bit of the control field of the first track in TOC. This fixes bunch of error messages during boot (GEOM taste) with Audio CD inserted and allows to grab Audio CD image using just dd. Thank you! What about CDs with mixed audio and data tracks? I don't ask for any support, just curious if our users could run into any troubles with those. If data track is the first (I don't know whether it is mandatory, but wiki tells it is usual), the whole disk will be handled as data by the driver and work as before (only data part will be readable). If it can be not the first, then I am not sure how acd driver works with it, but we can just make check a bit more strict, switching to data if found it anywhere on disk. Any way I don't think we will see many Mixed Mode CDs in the future, while Audio CDs are still on market. If you worry about audio extraction of Mixed Mode CDs, then quick look on mplayer and it's underlying cdparanoia and libcdio shows that they are extracting audio data talking directly to the drive using SCSI commands, so cd driver is irrelevant for them. So this change is mostly about staying consistent when possible with a small blood. Yes, I agree. As I've said I wasn't asking for any new capabilities, just wanted to make that no new edge cases are introduced. BTW, acd(4) ... not sure which tense I should use here ... used to create individual devices for each track - e.g. acd0t1, acd0t2 - where each track could have its own properties. -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228808 - head/sys/cam/scsi
On 22.12.2011 21:46, Andriy Gapon wrote: BTW, acd(4) ... not sure which tense I should use here ... used to create individual devices for each track - e.g. acd0t1, acd0t2 - where each track could have its own properties. Yes, I know. But that's a bigger blood, and I am not sure we need it. I am not sure that this approach is correct for data tracks, as up to my present understanding, later data tracks may address data on previous ones, so they can not reside on different devices. For audio tracks it could be more useful, but do you know applications using this? -- Alexander Motin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228808 - head/sys/cam/scsi
On 22.12.2011 20:24, Andriy Gapon wrote: on 22/12/2011 18:40 Alexander Motin said the following: Author: mav Date: Thu Dec 22 16:40:35 2011 New Revision: 228808 URL: http://svn.freebsd.org/changeset/base/228808 Log: Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to GEOM and using READ CD command for reading data, same as acd driver does. Audio CDs identified by checking respective bit of the control field of the first track in TOC. This fixes bunch of error messages during boot (GEOM taste) with Audio CD inserted and allows to grab Audio CD image using just dd. Thank you! What about CDs with mixed audio and data tracks? I don't ask for any support, just curious if our users could run into any troubles with those. If data track is the first (I don't know whether it is mandatory, but wiki tells it is usual), the whole disk will be handled as data by the driver and work as before (only data part will be readable). If it can be not the first, then I am not sure how acd driver works with it, but we can just make check a bit more strict, switching to data if found it anywhere on disk. Any way I don't think we will see many Mixed Mode CDs in the future, while Audio CDs are still on market. If you worry about audio extraction of Mixed Mode CDs, then quick look on mplayer and it's underlying cdparanoia and libcdio shows that they are extracting audio data talking directly to the drive using SCSI commands, so cd driver is irrelevant for them. So this change is mostly about staying consistent when possible with a small blood. -- Alexander Motin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228808 - head/sys/cam/scsi
on 22/12/2011 22:05 Alexander Motin said the following: On 22.12.2011 21:46, Andriy Gapon wrote: BTW, acd(4) ... not sure which tense I should use here ... used to create individual devices for each track - e.g. acd0t1, acd0t2 - where each track could have its own properties. Yes, I know. But that's a bigger blood, and I am not sure we need it. I am not sure that this approach is correct for data tracks, as up to my present understanding, later data tracks may address data on previous ones, so they can not reside on different devices. For audio tracks it could be more useful, but do you know applications using this? I have never researched this. -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228817 - in head/sys/dev/ath/ath_hal: ar5212 ar5416
Author: adrian Date: Thu Dec 22 21:54:53 2011 New Revision: 228817 URL: http://svn.freebsd.org/changeset/base/228817 Log: Use the correct types when calling the decompression mask function. There's currently no public code which uses this feature and the current reference driver doesn't enable this feature at all. It's possible it was used by a previous version of the driver and that indeed it should return HAL_STATUS; but at this point I'm happy to require that they complain and submit a patch. This was found by LLVM compile-time type checking. Submitted by: dim Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c == --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 22 19:09:55 2011(r228816) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 22 21:54:53 2011(r228817) @@ -574,7 +574,7 @@ ar5212SetDecompMask(struct ath_hal *ah, struct ath_hal_5212 *ahp = AH5212(ah); if (keyidx = HAL_DECOMP_MASK_SIZE) -return HAL_EINVAL; +return AH_FALSE; OS_REG_WRITE(ah, AR_DCM_A, keyidx); OS_REG_WRITE(ah, AR_DCM_D, en ? AR_DCM_D_EN : 0); ahp-ah_decompMask[keyidx] = en; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Dec 22 19:09:55 2011(r228816) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Dec 22 21:54:53 2011(r228817) @@ -161,7 +161,7 @@ ar5416SetAntennaSwitch(struct ath_hal *a HAL_BOOL ar5416SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en) { - return HAL_OK; + return AH_TRUE; } /* Setup coverage class */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228818 - head/sys/modules/ath
Author: dim Date: Thu Dec 22 23:40:52 2011 New Revision: 228818 URL: http://svn.freebsd.org/changeset/base/228818 Log: Disable various warnings for the ath module in a more fine-grained way: only add the option for the specific .c files that need them, like via sys/conf/files. MFC after:1 week Modified: head/sys/modules/ath/Makefile Modified: head/sys/modules/ath/Makefile == --- head/sys/modules/ath/Makefile Thu Dec 22 21:54:53 2011 (r228817) +++ head/sys/modules/ath/Makefile Thu Dec 22 23:40:52 2011 (r228818) @@ -139,9 +139,11 @@ SRCS+= amrr.c SRCS+= dfs_null.c CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal -CWARNFLAGS+= ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} opt_ah.h: echo '#define AH_SUPPORT_AR5416 1' $@ .include bsd.kmod.mk + +CWARNFLAGS.ah_regdomain.c= ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228819 - head/sys/cam/ata
Author: mav Date: Thu Dec 22 23:50:31 2011 New Revision: 228819 URL: http://svn.freebsd.org/changeset/base/228819 Log: Update list of 4K physical sector hard drives. Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c == --- head/sys/cam/ata/ata_da.c Thu Dec 22 23:40:52 2011(r228818) +++ head/sys/cam/ata/ata_da.c Thu Dec 22 23:50:31 2011(r228819) @@ -165,6 +165,11 @@ static struct ada_quirk_entry ada_quirk_ }, { /* Samsung Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, *, SAMSUNG HD155UI*, * }, + /*quirks*/ADA_Q_4K + }, + { + /* Samsung Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, *, SAMSUNG HD204UI*, * }, /*quirks*/ADA_Q_4K }, @@ -174,6 +179,16 @@ static struct ada_quirk_entry ada_quirk_ /*quirks*/ADA_Q_4K }, { + /* Seagate Barracuda Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, *, ST???DM*, * }, + /*quirks*/ADA_Q_4K + }, + { + /* Seagate Barracuda Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, *, STDM*, * }, + /*quirks*/ADA_Q_4K + }, + { /* Seagate Momentus Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, *, ST9500423AS*, * }, /*quirks*/ADA_Q_4K @@ -185,6 +200,16 @@ static struct ada_quirk_entry ada_quirk_ }, { /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, *, ST9640423AS*, * }, + /*quirks*/ADA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, *, ST9640424AS*, * }, + /*quirks*/ADA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, *, ST9750420AS*, * }, /*quirks*/ADA_Q_4K }, @@ -194,6 +219,11 @@ static struct ada_quirk_entry ada_quirk_ /*quirks*/ADA_Q_4K }, { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, *, ST9750423AS*, * }, + /*quirks*/ADA_Q_4K + }, + { /* Seagate Momentus Thin Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, *, ST???LT*, * }, /*quirks*/ADA_Q_4K ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228820 - head/sys/cam/scsi
Author: mav Date: Fri Dec 23 00:10:17 2011 New Revision: 228820 URL: http://svn.freebsd.org/changeset/base/228820 Log: Merge to da driver quirks hinting 4K physical sector sizes for SATA disks connected via SAS or USB. Unluckily I've found that SAS (mps) and USB-SATA I have translate models in different ways, requiring twice more quirks. Unluckily for Hitachi, their model names are trimmed on SAS, making impossible to identify 4K sector drives that way. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c == --- head/sys/cam/scsi/scsi_da.c Thu Dec 22 23:50:31 2011(r228819) +++ head/sys/cam/scsi/scsi_da.c Fri Dec 23 00:10:17 2011(r228820) @@ -89,7 +89,8 @@ typedef enum { DA_Q_NONE = 0x00, DA_Q_NO_SYNC_CACHE = 0x01, DA_Q_NO_6_BYTE = 0x02, - DA_Q_NO_PREVENT = 0x04 + DA_Q_NO_PREVENT = 0x04, + DA_Q_4K = 0x08 } da_quirks; typedef enum { @@ -112,6 +113,8 @@ struct disk_params { u_int8_t secs_per_track; u_int32_t secsize; /* Number of bytes/sector */ u_int64_t sectors; /* total number sectors */ + u_int stripesize; + u_int stripeoffset; }; struct da_softc { @@ -564,7 +567,223 @@ static struct da_quirk_entry da_quirk_ta */ {T_DIRECT, SIP_MEDIA_REMOVABLE, Sony, Sony DSC, *}, /*quirks*/ DA_Q_NO_SYNC_CACHE | DA_Q_NO_PREVENT - } + }, + /* ATA/SATA devices over SAS/USB/... */ + { + /* Hitachi Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, Hitachi, H??E3*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Samsung Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ATA, SAMSUNG HD155UI*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Samsung Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, SAMSUNG, HD155UI*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Samsung Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ATA, SAMSUNG HD204UI*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Samsung Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, SAMSUNG, HD204UI*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ATA, STDL*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, STDL, *, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ATA, ST???DM*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ST???DM*, *, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ATA, STDM*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, STDM, *, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ATA, ST9500423AS*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ST950042, 3AS*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ATA, ST9500424AS*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ST950042, 4AS*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ATA, ST9640423AS*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ST964042, 3AS*, * }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, ATA,
svn commit: r228822 - head/sys/conf
Author: dim Date: Fri Dec 23 00:23:37 2011 New Revision: 228822 URL: http://svn.freebsd.org/changeset/base/228822 Log: When building the kernel with clang, it produces several warnings which might be useful in some cases, but which are not severe enough to error out the whole kernel build. Display them anyway, so there is at least some incentive to fix them eventually. Start with -Wtautological-compare warnings. These usually occur when people check if unsigned quantities are negative, or similar cases. To clean these up would be painful, and might give problems if the base type which is compared against changes to signed later on. MFC after:1 week Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Fri Dec 23 00:19:17 2011(r228821) +++ head/sys/conf/kern.mk Fri Dec 23 00:23:37 2011(r228822) @@ -19,6 +19,10 @@ NO_WCONSTANT_CONVERSION= -Wno-constant-c NO_WARRAY_BOUNDS= -Wno-array-bounds NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow +# Several other warnings which might be useful in some cases, but not severe +# enough to error out the whole kernel build. Display them anyway, so there is +# some incentive to fix them eventually. +CWARNFLAGS+= -Wno-error-tautological-compare .endif # ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228824 - head/usr.bin/ar
Author: gjb (doc committer) Date: Fri Dec 23 00:31:26 2011 New Revision: 228824 URL: http://svn.freebsd.org/changeset/base/228824 Log: Whitespace cleanup: ar/ar.1: - Remove trailing whitespace Reported by: igor MFC after:1 week X-MFC-With: r228823 Modified: head/usr.bin/ar/ar.1 Modified: head/usr.bin/ar/ar.1 == --- head/usr.bin/ar/ar.1Fri Dec 23 00:29:01 2011(r228823) +++ head/usr.bin/ar/ar.1Fri Dec 23 00:31:26 2011(r228824) @@ -198,11 +198,11 @@ from the archive specified by argument The archive's symbol table, if present, is updated to reflect the new contents of the archive. .It Fl D -When used in combination with the +When used in combination with the .Fl r or .Fl q -option, insert 0's instead of the real mtime, uid and gid values +option, insert 0's instead of the real mtime, uid and gid values and 0644 instead of file mode from the members named by arguments .Ar . This ensures that checksums on the resulting archives are reproducible @@ -531,7 +531,7 @@ using MRI librarian commands, use the fo .Bd -literal -offset indent create ex.a * specify the output archive addmod ex1.o ex2.o * add modules -save* save pending changes +save* save pending changes end * exit the utility .Ed .Sh DIAGNOSTICS ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228823 - in head/usr.bin: ar hexdump rctl
On Fri, Dec 23, 2011 at 12:29:01AM +, Glen Barber wrote: hexdump/od.1: - Enclose tabbed content in quotes [1] [...] Modified: head/usr.bin/ar/ar.1 == --- head/usr.bin/ar/ar.1 Fri Dec 23 00:23:37 2011(r228822) +++ head/usr.bin/ar/ar.1 Fri Dec 23 00:29:01 2011(r228823) @@ -23,7 +23,7 @@ .\ .\ $FreeBSD$ .\ -.Dd May 17, 2010 +.Dd December 22, 2011 .Dt AR 1 .Os .Sh NAME @@ -414,7 +414,7 @@ character. The .Dq Li * and -.Dq Li \; +.Dq Li \; characters start a comment. Comments extend till the end of the line. .Pp Bah, that should have read fix an escape character sequence. Glen pgpHYBm4ZFsIi.pgp Description: PGP signature
Re: svn commit: r228822 - head/sys/conf
On Fri Dec 23 11, Dimitry Andric wrote: Author: dim Date: Fri Dec 23 00:23:37 2011 New Revision: 228822 URL: http://svn.freebsd.org/changeset/base/228822 Log: When building the kernel with clang, it produces several warnings which might be useful in some cases, but which are not severe enough to error out the whole kernel build. Display them anyway, so there is at least some incentive to fix them eventually. Start with -Wtautological-compare warnings. These usually occur when people check if unsigned quantities are negative, or similar cases. To clean these up would be painful, and might give problems if the base type which is compared against changes to signed later on. ... or is signed on one arch, but unsigned on another. ;) any reason you add -Wno-error-tautological-compare to CWARNFLAGS seperately and not in the upper CWARNFLAGS?= definition? the way you implemented it here makes it impossible to specify custom CWARNFLAGS, where users might want to keep -Wtautological-compare as an error and not turn it into a warning. i already sent you the following patch, which takes a different approach towards the issue you're trying to solve. of course it's debatable, whether -Wno-error-tautological-compare should be mandatory, or not. -fno-strict-aliasing e.g. is a flag which also gets appended (only to COPTFLAGS) even when users set custom COPTFLAGS cheers. alex MFC after: 1 week Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Fri Dec 23 00:19:17 2011(r228821) +++ head/sys/conf/kern.mk Fri Dec 23 00:23:37 2011(r228822) @@ -19,6 +19,10 @@ NO_WCONSTANT_CONVERSION= -Wno-constant-c NO_WARRAY_BOUNDS=-Wno-array-bounds NO_WSHIFT_COUNT_NEGATIVE=-Wno-shift-count-negative NO_WSHIFT_COUNT_OVERFLOW=-Wno-shift-count-overflow +# Several other warnings which might be useful in some cases, but not severe +# enough to error out the whole kernel build. Display them anyway, so there is +# some incentive to fix them eventually. +CWARNFLAGS+= -Wno-error-tautological-compare .endif # Index: conf/kern.mk === --- conf/kern.mk(revision 228556) +++ conf/kern.mk(working copy) @@ -1,12 +1,24 @@ # $FreeBSD$ # +# Clang implies -Wtautological-compare when -Wall was specified. Since this +# will produce errors for valid code, we need to disable -Wtautological-compare. +# GCC doesn't recognize this warning, nor does it have a similar warning flag. +# However specifying -Wextra implies -Wtautological-compare semantics. +# +.if ${CC:T:Mclang} == clang +NO_TAUTCOMP= -Wno-tautological-compare +.else +NO_TAUTCOMP= +.endif + +# # Warning flags for compiling the kernel and components of the kernel: # CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ -Wundef -Wno-pointer-sign -fformat-extensions \ - -Wmissing-include-dirs -fdiagnostics-show-option + -Wmissing-include-dirs -fdiagnostics-show-option ${NO_TAUTCOMP} # # The following flags are next up for working on: # -Wextra ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r228822 - head/sys/conf
On Fri Dec 23 11, Alexander Best wrote: On Fri Dec 23 11, Dimitry Andric wrote: Author: dim Date: Fri Dec 23 00:23:37 2011 New Revision: 228822 URL: http://svn.freebsd.org/changeset/base/228822 Log: When building the kernel with clang, it produces several warnings which might be useful in some cases, but which are not severe enough to error out the whole kernel build. Display them anyway, so there is at least some incentive to fix them eventually. Start with -Wtautological-compare warnings. These usually occur when people check if unsigned quantities are negative, or similar cases. To clean these up would be painful, and might give problems if the base type which is compared against changes to signed later on. ... or is signed on one arch, but unsigned on another. ;) any reason you add -Wno-error-tautological-compare to CWARNFLAGS seperately and not in the upper CWARNFLAGS?= definition? the way you implemented it here makes it impossible to specify custom CWARNFLAGS, where users might want to keep -Wtautological-compare as an error and not turn it into a warning. i already sent you the following patch, which takes a different approach towards the issue you're trying to solve. of course it's debatable, whether -Wno-error-tautological-compare should be mandatory, or not. -fno-strict-aliasing e.g. is a flag which also gets appended (only to COPTFLAGS) even when users set custom COPTFLAGS cheers. alex MFC after:1 week Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Fri Dec 23 00:19:17 2011(r228821) +++ head/sys/conf/kern.mk Fri Dec 23 00:23:37 2011(r228822) @@ -19,6 +19,10 @@ NO_WCONSTANT_CONVERSION= -Wno-constant-c NO_WARRAY_BOUNDS= -Wno-array-bounds NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow +# Several other warnings which might be useful in some cases, but not severe +# enough to error out the whole kernel build. Display them anyway, so there is +# some incentive to fix them eventually. +CWARNFLAGS+= -Wno-error-tautological-compare .endif # Index: conf/kern.mk === --- conf/kern.mk (revision 228556) +++ conf/kern.mk (working copy) @@ -1,12 +1,24 @@ # $FreeBSD$ # +# Clang implies -Wtautological-compare when -Wall was specified. Since this +# will produce errors for valid code, we need to disable -Wtautological-compare. +# GCC doesn't recognize this warning, nor does it have a similar warning flag. +# However specifying -Wextra implies -Wtautological-compare semantics. +# +.if ${CC:T:Mclang} == clang +NO_TAUTCOMP= -Wno-tautological-compare s/-Wno-tautological-compare/-Wno-error-tautological-compare/ sorry. +.else +NO_TAUTCOMP= +.endif + +# # Warning flags for compiling the kernel and components of the kernel: # CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ -Wundef -Wno-pointer-sign -fformat-extensions \ - -Wmissing-include-dirs -fdiagnostics-show-option + -Wmissing-include-dirs -fdiagnostics-show-option ${NO_TAUTCOMP} # # The following flags are next up for working on: #-Wextra ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228826 - head/lib/libc/yp
Author: ghelmer Date: Fri Dec 23 01:56:25 2011 New Revision: 228826 URL: http://svn.freebsd.org/changeset/base/228826 Log: Handle failures to malloc memory to hold key or val copies. PR: bin/83348 Modified: head/lib/libc/yp/xdryp.c Modified: head/lib/libc/yp/xdryp.c == --- head/lib/libc/yp/xdryp.cFri Dec 23 01:39:10 2011(r228825) +++ head/lib/libc/yp/xdryp.cFri Dec 23 01:56:25 2011(r228826) @@ -82,10 +82,21 @@ xdr_ypresp_all_seq(XDR *xdrs, u_long *ob switch (status) { case YP_TRUE: key = (char *)malloc(out.ypresp_all_u.val.key.keydat_len + 1); + if (key == NULL) { + xdr_free((xdrproc_t)xdr_ypresp_all, out); + *objp = YP_YPERR; + return (FALSE); + } bcopy(out.ypresp_all_u.val.key.keydat_val, key, out.ypresp_all_u.val.key.keydat_len); key[out.ypresp_all_u.val.key.keydat_len] = '\0'; val = (char *)malloc(out.ypresp_all_u.val.val.valdat_len + 1); + if (val == NULL) { + free(key); + xdr_free((xdrproc_t)xdr_ypresp_all, out); + *objp = YP_YPERR; + return (FALSE); + } bcopy(out.ypresp_all_u.val.val.valdat_val, val, out.ypresp_all_u.val.val.valdat_len); val[out.ypresp_all_u.val.val.valdat_len] = '\0'; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228828 - head/lib/libc/yp
Author: ghelmer Date: Fri Dec 23 02:13:42 2011 New Revision: 228828 URL: http://svn.freebsd.org/changeset/base/228828 Log: Handle malloc failures in yplib.c. PR: bin/83349 Modified: head/lib/libc/yp/yplib.c Modified: head/lib/libc/yp/yplib.c == --- head/lib/libc/yp/yplib.cFri Dec 23 02:04:35 2011(r228827) +++ head/lib/libc/yp/yplib.cFri Dec 23 02:13:42 2011(r228828) @@ -331,6 +331,8 @@ _yp_dobind(char *dom, struct dom_binding if (ysd == NULL) { ysd = (struct dom_binding *)malloc(sizeof *ysd); + if (ysd == NULL) + return (YPERR_RESRC); bzero((char *)ysd, sizeof *ysd); ysd-dom_socket = -1; ysd-dom_vers = 0; @@ -683,11 +685,18 @@ yp_match(char *indomain, char *inmap, co */ *outvallen = yprv.val.valdat_len; *outval = (char *)malloc(*outvallen+1); + if (*outval == NULL) { + _yp_unbind(ysd); + *outvallen = 0; + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprv.val.valdat_val, *outval, *outvallen); (*outval)[*outvallen] = '\0'; YPUNLOCK(); return (0); } + _yp_unbind(ysd); #endif again: @@ -713,6 +722,13 @@ again: if (!(r = ypprot_err(yprv.stat))) { *outvallen = yprv.val.valdat_len; *outval = (char *)malloc(*outvallen+1); + if (*outval == NULL) { + _yp_unbind(ysd); + *outvallen = 0; + xdr_free((xdrproc_t)xdr_ypresp_val, yprv); + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprv.val.valdat_val, *outval, *outvallen); (*outval)[*outvallen] = '\0'; #ifdef YPMATCHCACHE @@ -791,10 +807,25 @@ again: if (!(r = ypprot_err(yprkv.stat))) { *outkeylen = yprkv.key.keydat_len; *outkey = (char *)malloc(*outkeylen+1); + if (*outkey == NULL) { + _yp_unbind(ysd); + *outkeylen = 0; + xdr_free((xdrproc_t)xdr_ypresp_key_val, yprkv); + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprkv.key.keydat_val, *outkey, *outkeylen); (*outkey)[*outkeylen] = '\0'; *outvallen = yprkv.val.valdat_len; *outval = (char *)malloc(*outvallen+1); + if (*outval == NULL) { + free(*outkey); + _yp_unbind(ysd); + *outkeylen = *outvallen = 0; + xdr_free((xdrproc_t)xdr_ypresp_key_val, yprkv); + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprkv.val.valdat_val, *outval, *outvallen); (*outval)[*outvallen] = '\0'; } @@ -851,10 +882,25 @@ again: if (!(r = ypprot_err(yprkv.stat))) { *outkeylen = yprkv.key.keydat_len; *outkey = (char *)malloc(*outkeylen+1); + if (*outkey == NULL) { + _yp_unbind(ysd); + *outkeylen = 0; + xdr_free((xdrproc_t)xdr_ypresp_key_val, yprkv); + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprkv.key.keydat_val, *outkey, *outkeylen); (*outkey)[*outkeylen] = '\0'; *outvallen = yprkv.val.valdat_len; *outval = (char *)malloc(*outvallen+1); + if (*outval == NULL) { + free(*outkey); + _yp_unbind(ysd); + *outkeylen = *outvallen = 0; + xdr_free((xdrproc_t)xdr_ypresp_key_val, yprkv); + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprkv.val.valdat_val, *outval, *outvallen); (*outval)[*outvallen] = '\0'; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228829 - head/sys/dev/ath
Author: adrian Date: Fri Dec 23 02:21:22 2011 New Revision: 228829 URL: http://svn.freebsd.org/changeset/base/228829 Log: Add a temporary debugging statement in order to try and identify what's going on with the occasional garbage rs_antenna field reported by AR9285 users. I've discovered that the 11n NICs only fill out the entire RX status descriptor on the final descriptor in an aggregate. Some of the fields (notably RSSI) are complete nonsense for A-MPDU subframes. This may be another example of this. The driver doesn't currently toss out statistics for non-final aggregate frames. It's likely that this should be done. If any users hit this particular debugging message they should report it immediately to freebsd-wirel...@freebsd.org - please ensure you have ATH_DEBUG enabled so it prints out the full receive descriptor. PR: kern/163312 Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Fri Dec 23 02:13:42 2011(r228828) +++ head/sys/dev/ath/if_ath.c Fri Dec 23 02:21:22 2011(r228829) @@ -4111,6 +4111,35 @@ rx_accept: m-m_pkthdr.len = len; } + /* +* Validate rs-rs_antenna. +* +* Some users w/ AR9285 NICs have reported crashes +* here because rs_antenna field is bogusly large. +* Let's enforce the maximum antenna limit of 8 +* (and it shouldn't be hard coded, but that's a +* separate problem) and if there's an issue, print +* out an error and adjust rs_antenna to something +* sensible. +* +* This code should be removed once the actual +* root cause of the issue has been identified. +* For example, it may be that the rs_antenna +* field is only valid for the lsat frame of +* an aggregate and it just happens that it is +* mostly right. (This is a general statement - +* the majority of the statistics are only valid +* for the last frame in an aggregate. +*/ + if (rs-rs_antenna 7) { + device_printf(sc-sc_dev, %s: rs_antenna 7 (%d)\n, + __func__, rs-rs_antenna); +#ifdef ATH_DEBUG + ath_printrxbuf(sc, bf, 0, status == HAL_OK); +#endif /* ATH_DEBUG */ + rs-rs_antenna = 0; /* XXX better than nothing */ + } + ifp-if_ipackets++; sc-sc_stats.ast_ant_rx[rs-rs_antenna]++; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228830 - head/sys/dev/ath
Author: adrian Date: Fri Dec 23 02:40:35 2011 New Revision: 228830 URL: http://svn.freebsd.org/changeset/base/228830 Log: Make some more of the 11n specific code conditional. This doesn't fix compilation w/out AH_SUPPORT_AR5416 as all of the software aggregation support in if_ath_tx.c and 11n code in if_ath_tx_ht.c touches the 11n specific fields. I'll work on that later. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Fri Dec 23 02:21:22 2011(r228829) +++ head/sys/dev/ath/if_ath.c Fri Dec 23 02:40:35 2011(r228830) @@ -3962,6 +3962,7 @@ ath_rx_proc(struct ath_softc *sc, int re npkts++; /* These aren't specifically errors */ +#ifdef AH_SUPPORT_AR5416 if (rs-rs_flags HAL_RX_GI) sc-sc_stats.ast_rx_halfgi++; if (rs-rs_flags HAL_RX_2040) @@ -3974,6 +3975,7 @@ ath_rx_proc(struct ath_softc *sc, int re sc-sc_stats.ast_rx_decrypt_busy_err++; if (rs-rs_flags HAL_RX_HI_RX_CHAIN) sc-sc_stats.ast_rx_hi_rx_chain++; +#endif /* AH_SUPPORT_AR5416 */ if (rs-rs_status != 0) { if (rs-rs_status HAL_RXERR_CRC) @@ -4191,8 +4193,10 @@ rx_accept: IEEE80211_KEYIX_NONE : rs-rs_keyix); sc-sc_lastrs = rs; +#ifdef AH_SUPPORT_AR5416 if (rs-rs_isaggr) sc-sc_stats.ast_rx_agg++; +#endif /* AH_SUPPORT_AR5416 */ if (ni != NULL) { /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228831 - head/tools/tools/ath
Author: adrian Date: Fri Dec 23 02:57:18 2011 New Revision: 228831 URL: http://svn.freebsd.org/changeset/base/228831 Log: Add in ath_ee_9287_print. Modified: head/tools/tools/ath/Makefile Modified: head/tools/tools/ath/Makefile == --- head/tools/tools/ath/Makefile Fri Dec 23 02:40:35 2011 (r228830) +++ head/tools/tools/ath/Makefile Fri Dec 23 02:57:18 2011 (r228831) @@ -1,7 +1,7 @@ # $FreeBSD$ SUBDIR=arcode athdebug athdecode athkey athpoke athprom athrd athregs -SUBDIR+= athstats ath_ee_v14_print ath_prom_read ath_ee_v4k_print -SUBDIR+= athradar +SUBDIR+= athstats ath_prom_read ath_radar +SUBDIR+= ath_ee_v14_print ath_ee_v4k_print ath_ee_9287_print .include bsd.subdir.mk ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r228832 - head/sys/dev/ath
Author: adrian Date: Fri Dec 23 03:59:49 2011 New Revision: 228832 URL: http://svn.freebsd.org/changeset/base/228832 Log: Rework this ugly mess that tries to handle reset serialisation. Some users were reporting concurrent resets _were_ occuring - ie, either two ath_reset()s ran at the same time (likely one on each CPU) or ath_reset() versus ath_chan_change(). Instead, this now tries to grab the serialisation semaphore and will pause() for a while if it fails. It will always eventually succeed though and will log an error if it hits the recursion situation. All of this stuff needs to die a horrible death at some point and be replaced with a properly serialising method of programming this stuff (eg using the net80211 taskqueue for all of this stuff.) The trouble is figuring out how to handle the concurrent ioctl() based things without introducing more LORs (which is another reason why I haven't just wrapped all of this stuff in large, long-lived locks, a-la what Linux can get away with.) MFC after:Absolutely, positively never. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Fri Dec 23 02:57:18 2011(r228831) +++ head/sys/dev/ath/if_ath.c Fri Dec 23 03:59:49 2011(r228832) @@ -1898,6 +1898,70 @@ ath_txrx_start(struct ath_softc *sc) taskqueue_unblock(sc-sc_tq); } +/* + * Grab the reset lock, and wait around until noone else + * is trying to do anything with it. + * + * This is totally horrible but we can't hold this lock for + * long enough to do TX/RX or we end up with net80211/ip stack + * LORs and eventual deadlock. + * + * dowait signals whether to spin, waiting for the reset + * lock count to reach 0. This should (for now) only be used + * during the reset path, as the rest of the code may not + * be locking-reentrant enough to behave correctly. + * + * Another, cleaner way should be found to serialise all of + * these operations. + */ +#defineMAX_RESET_ITERATIONS10 +static int +ath_reset_grablock(struct ath_softc *sc, int dowait) +{ + int w = 0; + int i = MAX_RESET_ITERATIONS; + + ATH_PCU_LOCK_ASSERT(sc); + do { + if (sc-sc_inreset_cnt == 0) { + w = 1; + break; + } + if (dowait == 0) { + w = 0; + break; + } + ATH_PCU_UNLOCK(sc); + pause(ath_reset_grablock, 1); + i--; + ATH_PCU_LOCK(sc); + } while (i 0); + + /* +* We always increment the refcounter, regardless +* of whether we succeeded to get it in an exclusive +* way. +*/ + sc-sc_inreset_cnt++; + + if (i = 0) + device_printf(sc-sc_dev, + %s: didn't finish after %d iterations\n, + __func__, MAX_RESET_ITERATIONS); + + if (w == 0) + device_printf(sc-sc_dev, + %s: warning, recursive reset path!\n, + __func__); + + return w; +} +#undef MAX_RESET_ITERATIONS + +/* + * XXX TODO: write ath_reset_releaselock + */ + static void ath_stop(struct ifnet *ifp) { @@ -1926,18 +1990,15 @@ ath_reset(struct ifnet *ifp, ATH_RESET_T DPRINTF(sc, ATH_DEBUG_RESET, %s: called\n, __func__); - /* XXX ensure ATH_LOCK isn't held; ath_rx_proc can't be locked */ + /* Ensure ATH_LOCK isn't held; ath_rx_proc can't be locked */ ATH_PCU_UNLOCK_ASSERT(sc); ATH_UNLOCK_ASSERT(sc); ATH_PCU_LOCK(sc); - /* XXX if we're already inside a reset, print out a big warning */ - if (sc-sc_inreset_cnt 0) { - device_printf(sc-sc_dev, - %s: concurrent ath_reset()! Danger!\n, + if (ath_reset_grablock(sc, 1) == 0) { + device_printf(sc-sc_dev, %s: concurrent reset! Danger!\n, __func__); } - sc-sc_inreset_cnt++; ath_hal_intrset(ah, 0); /* disable interrupts */ ATH_PCU_UNLOCK(sc); @@ -5250,10 +5311,10 @@ ath_chan_set(struct ath_softc *sc, struc /* Treat this as an interface reset */ ATH_PCU_LOCK(sc); - if (sc-sc_inreset_cnt 0) - device_printf(sc-sc_dev, %s: danger! concurrent reset!\n, + if (ath_reset_grablock(sc, 1) == 0) { + device_printf(sc-sc_dev, %s: concurrent reset! Danger!\n, __func__); - sc-sc_inreset_cnt++; + } if (chan != sc-sc_curchan) { dointr = 1; /* XXX only do this if inreset_cnt is 1? */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to
svn commit: r228833 - head/sys/dev/ath/ath_hal/ar9002
Author: adrian Date: Fri Dec 23 04:05:39 2011 New Revision: 228833 URL: http://svn.freebsd.org/changeset/base/228833 Log: Remove unused #define's. Pointy hat to: adrian, for not properly reading things when he copied ar9285.h to ar9287.h. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287.h Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287.h == --- head/sys/dev/ath/ath_hal/ar9002/ar9287.hFri Dec 23 03:59:49 2011 (r228832) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287.hFri Dec 23 04:05:39 2011 (r228833) @@ -45,9 +45,7 @@ struct ath_hal_9287 { #defineAH9287(_ah) ((struct ath_hal_9287 *)(_ah)) #defineAR9287_DEFAULT_RXCHAINMASK 3 -#defineAR9285_DEFAULT_RXCHAINMASK 1 #defineAR9287_DEFAULT_TXCHAINMASK 3 -#defineAR9285_DEFAULT_TXCHAINMASK 1 #defineAR_PHY_CCA_NOM_VAL_9287_2GHZ-112 #defineAR_PHY_CCA_NOM_VAL_9287_5GHZ-112 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org