Re: svn commit: r226604 - head/lib/libc/stdio
On Fri, Oct 21, 2011 at 06:35:58AM +, David Schultz wrote: > Author: das > Date: Fri Oct 21 06:35:58 2011 > New Revision: 226604 > URL: http://svn.freebsd.org/changeset/base/226604 > > Log: > Add support for the 'x' mode option in fopen() as specified in the C1X > draft standard. The option is equivalent to O_EXCL. Apart from adding the 'x' mode option this change heavly modifies manual page. For example you removed information that the 'w' option truncates the file to zero length. I had to look at the code to figure it out. Why those changes to manual page were made? -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpyO4gzuC39M.pgp Description: PGP signature
svn commit: r239723 - head/sys/vm
Author: pluknet Date: Mon Aug 27 10:59:49 2012 New Revision: 239723 URL: http://svn.freebsd.org/changeset/base/239723 Log: Typo in previous change: print half the theoretical maximum as maximum recommended amount. Reported by: Reviewed by: des Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c == --- head/sys/vm/swap_pager.cMon Aug 27 04:43:30 2012(r239722) +++ head/sys/vm/swap_pager.cMon Aug 27 10:59:49 2012(r239723) @@ -2135,7 +2135,7 @@ swapon_check_swzone(unsigned long npages if (npages > maxpages / 2) { printf("warning: total configured swap (%lu pages) " "exceeds maximum recommended amount (%lu pages).\n", - npages, maxpages); + npages, maxpages / 2); printf("warning: increase kern.maxswzone " "or reduce amount of swap.\n"); return (-1); ___ 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: r239725 - in stable/9: share/man/man4 sys/dev/usb sys/dev/usb/serial
Author: gavin Date: Mon Aug 27 12:40:40 2012 New Revision: 239725 URL: http://svn.freebsd.org/changeset/base/239725 Log: Merge r238766, r238774 from head: Update the list of devices supported by uplcom. Although this only adds one device (support for Motorola cables), this syncronises us with: OpenBSD src/sys/dev/usb/uplcom.c 1.56 NetBSD src/sys/dev/usb/uplcom.c 1.73 Linux kernel.org HEAD Modified: stable/9/share/man/man4/uplcom.4 stable/9/sys/dev/usb/serial/uplcom.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/uplcom.4 == --- stable/9/share/man/man4/uplcom.4Mon Aug 27 11:59:04 2012 (r239724) +++ stable/9/share/man/man4/uplcom.4Mon Aug 27 12:40:40 2012 (r239725) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2011 +.Dd July 25, 2012 .Dt UPLCOM 4 .Os .Sh NAME @@ -116,6 +116,8 @@ Microsoft Palm 700WX .It Mobile Action MA-620 Infrared Adapter .It +Motorola Cables +.It Nokia CA-42 Cable .It OTI DKU-5 cable Modified: stable/9/sys/dev/usb/serial/uplcom.c == --- stable/9/sys/dev/usb/serial/uplcom.cMon Aug 27 11:59:04 2012 (r239724) +++ stable/9/sys/dev/usb/serial/uplcom.cMon Aug 27 12:40:40 2012 (r239725) @@ -279,6 +279,7 @@ static const STRUCT_USB_HOST_ID uplcom_d UPLCOM_DEV(PROLIFIC, DCU11),/* DCU-11 Phone Cable */ UPLCOM_DEV(PROLIFIC, HCR331), /* HCR331 Card Reader */ UPLCOM_DEV(PROLIFIC, MICROMAX_610U),/* Micromax 610U modem */ + UPLCOM_DEV(PROLIFIC, MOTOROLA), /* Motorola cable */ UPLCOM_DEV(PROLIFIC, PHAROS), /* Prolific Pharos */ UPLCOM_DEV(PROLIFIC, PL2303), /* Generic adapter */ UPLCOM_DEV(PROLIFIC, RSAQ2),/* I/O DATA USB-RSAQ2 */ Modified: stable/9/sys/dev/usb/usbdevs == --- stable/9/sys/dev/usb/usbdevsMon Aug 27 11:59:04 2012 (r239724) +++ stable/9/sys/dev/usb/usbdevsMon Aug 27 12:40:40 2012 (r239725) @@ -2646,6 +2646,7 @@ product PRIMAX HP_RH304AA 0x4d17 HP RH30 /* Prolific products */ product PROLIFIC PL23010x PL2301 Host-Host interface product PROLIFIC PL23020x0001 PL2302 Host-Host interface +product PROLIFIC MOTOROLA 0x0307 Motorola Cable product PROLIFIC RSAQ2 0x04bb PL2303 Serial (IODATA USB-RSAQ2) product PROLIFIC ALLTRONIX_GPRS0x0609 Alltronix ACM003U00 modem product PROLIFIC ALDIGA_AL11U 0x0611 AlDiga AL-11U modem ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r239726 - in stable/8: share/man/man4 sys/dev/usb sys/dev/usb/serial
Author: gavin Date: Mon Aug 27 12:45:41 2012 New Revision: 239726 URL: http://svn.freebsd.org/changeset/base/239726 Log: Merge r238766, r238774 from head: Update the list of devices supported by uplcom. Although this only adds one device (support for Motorola cables), this syncronises us with: OpenBSD src/sys/dev/usb/uplcom.c 1.56 NetBSD src/sys/dev/usb/uplcom.c 1.73 Linux kernel.org HEAD Modified: stable/8/share/man/man4/uplcom.4 stable/8/sys/dev/usb/serial/uplcom.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/share/man/man4/uplcom.4 == --- stable/8/share/man/man4/uplcom.4Mon Aug 27 12:40:40 2012 (r239725) +++ stable/8/share/man/man4/uplcom.4Mon Aug 27 12:45:41 2012 (r239726) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2011 +.Dd July 25, 2012 .Dt UPLCOM 4 .Os .Sh NAME @@ -124,6 +124,8 @@ Microsoft Palm 700WX .It Mobile Action MA-620 Infrared Adapter .It +Motorola Cables +.It Nokia CA-42 Cable .It OTI DKU-5 cable Modified: stable/8/sys/dev/usb/serial/uplcom.c == --- stable/8/sys/dev/usb/serial/uplcom.cMon Aug 27 12:40:40 2012 (r239725) +++ stable/8/sys/dev/usb/serial/uplcom.cMon Aug 27 12:45:41 2012 (r239726) @@ -279,6 +279,7 @@ static const STRUCT_USB_HOST_ID uplcom_d UPLCOM_DEV(PROLIFIC, DCU11),/* DCU-11 Phone Cable */ UPLCOM_DEV(PROLIFIC, HCR331), /* HCR331 Card Reader */ UPLCOM_DEV(PROLIFIC, MICROMAX_610U),/* Micromax 610U modem */ + UPLCOM_DEV(PROLIFIC, MOTOROLA), /* Motorola cable */ UPLCOM_DEV(PROLIFIC, PHAROS), /* Prolific Pharos */ UPLCOM_DEV(PROLIFIC, PL2303), /* Generic adapter */ UPLCOM_DEV(PROLIFIC, RSAQ2),/* I/O DATA USB-RSAQ2 */ Modified: stable/8/sys/dev/usb/usbdevs == --- stable/8/sys/dev/usb/usbdevsMon Aug 27 12:40:40 2012 (r239725) +++ stable/8/sys/dev/usb/usbdevsMon Aug 27 12:45:41 2012 (r239726) @@ -2634,6 +2634,7 @@ product PRIMAX HP_RH304AA 0x4d17 HP RH30 /* Prolific products */ product PROLIFIC PL23010x PL2301 Host-Host interface product PROLIFIC PL23020x0001 PL2302 Host-Host interface +product PROLIFIC MOTOROLA 0x0307 Motorola Cable product PROLIFIC RSAQ2 0x04bb PL2303 Serial (IODATA USB-RSAQ2) product PROLIFIC ALLTRONIX_GPRS0x0609 Alltronix ACM003U00 modem product PROLIFIC ALDIGA_AL11U 0x0611 AlDiga AL-11U modem ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r239727 - stable/9/share/misc
Author: gavin Date: Mon Aug 27 12:58:54 2012 New Revision: 239727 URL: http://svn.freebsd.org/changeset/base/239727 Log: Merge r236101, r236102 from head: Update to reflect various src and doc commit bits taken into safekeeping. Modified: stable/9/share/misc/committers-doc.dot stable/9/share/misc/committers-src.dot Directory Properties: stable/9/share/misc/ (props changed) Modified: stable/9/share/misc/committers-doc.dot == --- stable/9/share/misc/committers-doc.dot Mon Aug 27 12:45:41 2012 (r239726) +++ stable/9/share/misc/committers-doc.dot Mon Aug 27 12:58:54 2012 (r239727) @@ -32,15 +32,19 @@ node [color=grey62, style=filled, bgcolo ache [label="Andrey Chernov\na...@freebsd.org\n1997/06/13\n2010/12/11"] bmah [label="Bruce A. Mah\nb...@freebsd.org\n2000/08/22\n2009/09/13"] bvs [label="Vitaly Bogdanov\n...@freebsd.org\n2005/10/03\n2010/12/11"] +ceri [label="Ceri Davies\nc...@freebsd.org\n2002/03/17\n2012/02/29"] den [label="Denis Peplin\n...@freebsd.org\n2003/09/13\n2009/07/09"] garys [label="Gary W. Swearingen\nga...@freebsd.org\n2005/08/21\n2008/03/02"] jcamou [label="Jesus R. Camou\njca...@freebsd.org\n2005/03/02\n2008/12/20"] jesusr [label="Jesus Rodriguez Cuesta\njes...@freebsd.org\n1998/12/10\n2010/12/11"] jim [label="Jim Mock\n...@freebsd.org\n1999/08/11\n2003/12/15"] josef [label="Josef El-Rayes\njo...@freebsd.org\n2004/01/15\n2008/03/29"] +marcel [label="Marcel Moolenaar\nmar...@freebsd.org\n1999/07/03\n2012/04/25"] mheinen [label="Martin Heinen\nmhei...@freebsd.org\n2002/10/04\n2006/04/26"] +murray [label="Murray Stokely\nmur...@freebsd.org\n2000/04/05\n2012/04/25"] nik [label="Nik Clayton\n...@freebsd.org\n1998/02/26\n2008/12/20"] pgj [label="Gabor Pali\n...@freebsd.org\n2008/04/21\n2010/12/01"] +roam [label="Peter Pentchev\nr...@freebsd.org\n2003/02/14\n2012/02/29"] node [color=lightblue2, style=filled, bgcolor=black]; @@ -51,7 +55,6 @@ bcr [label="Benedict Reuschling\nbcr@Fre blackend [label="Marc Fonvieille\nblack...@freebsd.org\n2002/06/16"] brd [label="Brad Davis\n...@freebsd.org\n2005/06/01"] brueffer [label="Christian Brueffer\nbruef...@freebsd.org\n2003/01/13"] -ceri [label="Ceri Davies\nc...@freebsd.org\n2002/03/17"] chinsan [label="Chinsan Huang\nchin...@freebsd.org\n2006/09/20"] danger [label="Daniel Gerzo\ndan...@freebsd.org\n2006/08/20"] delphij [label="Xin Li\ndelp...@freebsd.org\n2004/09/14"] @@ -66,15 +69,12 @@ keramida [label="Giorgos Keramidas\nkera linimon [label="Mark Linimon\nlini...@freebsd.org\n2004/03/31"] loader [label="Fukang Chen\nloa...@freebsd.org\n2007/07/30"] manolis [label="Manolis Kiagias\nmano...@freebsd.org\n2008/05/24"] -marcel [label="Marcel Moolenaar\nmar...@freebsd.org\n1999/07/03"] marck [label="Dmitry Morozovsky\nma...@freebsd.org\n2004/08/10"] maxim [label="Maxim Konovalov\nma...@freebsd.org\n2002/02/07"] miwi [label="Martin Wilke\nm...@freebsd.org\n2007/10/26"] -murray [label="Murray Stokely\nmur...@freebsd.org\n2000/04/05"] pav [label="Pav Lucistnik\n...@freebsd.org\n2005/08/12"] remko [label="Remko Lodder\nre...@freebsd.org\n2004/10/16"] rene [label="Rene Ladan\nr...@freebsd.org\n2008/11/03"] -roam [label="Peter Pentchev\nr...@freebsd.org\n2003/02/14"] ryusuke [label="Ryusuke Suzuki\nryus...@freebsd.org\n2009/12/21"] simon [label="Simon L. Nielsen\nsi...@freebsd.org\n2003/07/20"] taras [label="Taras Korenko\nta...@freebsd.org\n2010/06/25"] Modified: stable/9/share/misc/committers-src.dot == --- stable/9/share/misc/committers-src.dot Mon Aug 27 12:45:41 2012 (r239726) +++ stable/9/share/misc/committers-src.dot Mon Aug 27 12:58:54 2012 (r239727) @@ -39,6 +39,7 @@ billf [label="Bill Fumerola\nbillf@FreeB bmah [label="Bruce A. Mah\nb...@freebsd.org\n2002/01/29\n2009/09/13"] bmilekic [label="Bosko Milekic\nbmile...@freebsd.org\n2000/09/21\n2008/11/10"] bushman [label="Michael Bushkov\nbush...@freebsd.org\n2007/03/10\n2010/04/29"] +ceri [label="Ceri Davies\nc...@freebsd.org\n2006/11/07\n2012/03/07"] cjc [label="Crist J. Clark\n...@freebsd.org\n2001/06/01\n2006/12/29"] dds [label="Diomidis Spinellis\n...@freebsd.org\n2003/06/20\n2010/09/22"] dhartmei [label="Daniel Hartmeier\ndhart...@freebsd.org\n2004/04/06\n2008/12/08"] @@ -58,18 +59,22 @@ jtc [label="J.T. Conklin\n...@freebsd.or kbyanc [label="Kelly Yancey\nkby...@freebsd.org\n2000/07/11\n2006/07/25"] keichii [label="Michael Wu\nkeic...@freebsd.org\n2001/03/07\n2006/04/28"] linimon [label="Mark Linimon\nlini...@freebsd.org\n2006/09/30\n2008/05/04"] +lulf [label="Ulf Lilleengen\nl...@freebsd.org\n2007/10/24\n2012/01/19"] mb [label="Maxim Bolotin\n...@freebsd.org\n2000/04/06\n2003/03/08"] marks [label="Mark Santcroos\nma...@freebsd.org\n2004/03/18\n2008/09/29"] mike [label="Mike Barcroft\nm...@freebsd.org\n2001/07/17\n2006/04/28"]
svn commit: r239728 - stable/9/share/misc
Author: gavin Date: Mon Aug 27 13:04:45 2012 New Revision: 239728 URL: http://svn.freebsd.org/changeset/base/239728 Log: Merge r238396 from head: Update to reflect new core team. Modified: stable/9/share/misc/organization.dot Directory Properties: stable/9/share/misc/ (props changed) Modified: stable/9/share/misc/organization.dot == --- stable/9/share/misc/organization.dotMon Aug 27 12:58:54 2012 (r239727) +++ stable/9/share/misc/organization.dotMon Aug 27 13:04:45 2012 (r239728) @@ -25,7 +25,7 @@ _misc [label="Miscellaneous Hats"] # Development teams go here alphabetically sorted -core [label="Core Team\nc...@freebsd.org\nwilko, brooks, keramida, imp,\ngnn, wes, hrs, murray,\nrwatson"] +core [label="Core Team\nc...@freebsd.org\ntabthorpe, gavin, jhb, kib,\ntheraven, attilio, hrs,\npeter, miwi"] coresecretary [label="Core Team Secretary\ncore-secret...@freebsd.org\njoel"] doccommitters [label="Doc/www Committers\ndoc-committ...@freebsd.org"] doceng [label="Documentation Engineering Team\ndoc...@freebsd.org\nnik, blackend, hrs,\nkeramida"] ___ 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: r239729 - stable/8/share/misc
Author: gavin Date: Mon Aug 27 13:05:15 2012 New Revision: 239729 URL: http://svn.freebsd.org/changeset/base/239729 Log: Merge r238396 from head: Update to reflect new core team. Modified: stable/8/share/misc/organization.dot Directory Properties: stable/8/share/misc/ (props changed) Modified: stable/8/share/misc/organization.dot == --- stable/8/share/misc/organization.dotMon Aug 27 13:04:45 2012 (r239728) +++ stable/8/share/misc/organization.dotMon Aug 27 13:05:15 2012 (r239729) @@ -25,7 +25,7 @@ _misc [label="Miscellaneous Hats"] # Development teams go here alphabetically sorted -core [label="Core Team\nc...@freebsd.org\nwilko, brooks, keramida, imp,\ngnn, wes, hrs, murray,\nrwatson"] +core [label="Core Team\nc...@freebsd.org\ntabthorpe, gavin, jhb, kib,\ntheraven, attilio, hrs,\npeter, miwi"] coresecretary [label="Core Team Secretary\ncore-secret...@freebsd.org\njoel"] doccommitters [label="Doc/www Committers\ndoc-committ...@freebsd.org"] doceng [label="Documentation Engineering Team\ndoc...@freebsd.org\nnik, blackend, hrs,\nkeramida"] ___ 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: r239730 - head/sys/i386/include
Author: des Date: Mon Aug 27 13:22:27 2012 New Revision: 239730 URL: http://svn.freebsd.org/changeset/base/239730 Log: Parly revert r239255: reinstate a default maxswzone on i386, where KVA is scarce, but set it slightly higher so we can handle 8 GB of swap. Modified: head/sys/i386/include/param.h Modified: head/sys/i386/include/param.h == --- head/sys/i386/include/param.h Mon Aug 27 13:05:15 2012 (r239729) +++ head/sys/i386/include/param.h Mon Aug 27 13:22:27 2012 (r239730) @@ -123,6 +123,20 @@ #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ /* + * Ceiling on amount of swblock kva space, can be changed via + * the kern.maxswzone /boot/loader.conf variable. + * + * 276 is sizeof(struct swblock), but we do not always have a definition + * in scope for struct swblock, so we have to hardcode it. Each struct + * swblock holds metadata for 32 pages, so in theory, this is enough for + * 16 GB of swap. In practice, however, the usable amount is considerably + * lower due to fragmentation. + */ +#ifndef VM_SWZONE_SIZE_MAX +#define VM_SWZONE_SIZE_MAX (276 * 128 * 1024) +#endif + +/* * Ceiling on size of buffer cache (really only effects write queueing, * the VM page cache is not effected), can be changed via * the kern.maxbcache /boot/loader.conf variable. ___ 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: r239731 - stable/8/sys/dev/usb/serial
Author: gavin Date: Mon Aug 27 13:50:01 2012 New Revision: 239731 URL: http://svn.freebsd.org/changeset/base/239731 Log: Merge r238778 from head: The baud rate on CP1201/2/3 devices can be set in one of two ways: - The USLCOM_SET_BAUD_DIV command (0x01) - The USLCOM_SET_BAUD_RATE command (0x13) Devices based on the CP1204 will only accept the latter command, and ignore the former. As the latter command works on all chips that this driver supports, switch to always using it. A slight confusion here is that the previously used command was incorrectly named USLCOM_BAUD_RATE - even though we no longer use it, rename it to USLCOM_SET_BAUD_DIV to closer match the name used in the datasheet. This change reflects a similar change made in the Linux driver, which was submitted by preston.fick at silabs.com, and has been tested on all of the uslcom(4) devices I have to hand. Modified: stable/8/sys/dev/usb/serial/uslcom.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/usb/serial/uslcom.c == --- stable/8/sys/dev/usb/serial/uslcom.cMon Aug 27 13:22:27 2012 (r239730) +++ stable/8/sys/dev/usb/serial/uslcom.cMon Aug 27 13:50:01 2012 (r239731) @@ -70,12 +70,13 @@ SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, deb /* Request codes */ #defineUSLCOM_UART 0x00 -#defineUSLCOM_BAUD_RATE0x01 +#defineUSLCOM_SET_BAUD_DIV 0x01 #defineUSLCOM_DATA 0x03 #defineUSLCOM_BREAK0x05 #defineUSLCOM_CTRL 0x07 #defineUSLCOM_RCTRL0x08 #defineUSLCOM_SET_FLOWCTRL 0x13 +#defineUSLCOM_SET_BAUD_RATE0x1e #defineUSLCOM_VENDOR_SPECIFIC 0xff /* USLCOM_UART values */ @@ -92,8 +93,8 @@ SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, deb #defineUSLCOM_CTRL_RI 0x0040 #defineUSLCOM_CTRL_DCD 0x0080 -/* USLCOM_BAUD_RATE values */ -#defineUSLCOM_BAUD_REF 0x384000 +/* USLCOM_SET_BAUD_DIV values */ +#defineUSLCOM_BAUD_REF 3686400 /* 3.6864 MHz */ /* USLCOM_DATA values */ #defineUSLCOM_STOP_BITS_1 0x00 @@ -511,19 +512,20 @@ uslcom_param(struct ucom_softc *ucom, st { struct uslcom_softc *sc = ucom->sc_parent; struct usb_device_request req; - uint32_t flowctrl[4]; + uint32_t baudrate, flowctrl[4]; uint16_t data; DPRINTF("\n"); + baudrate = t->c_ospeed; req.bmRequestType = USLCOM_WRITE; - req.bRequest = USLCOM_BAUD_RATE; - USETW(req.wValue, USLCOM_BAUD_REF / t->c_ospeed); + req.bRequest = USLCOM_SET_BAUD_RATE; + USETW(req.wValue, 0); USETW(req.wIndex, USLCOM_PORT_NO); - USETW(req.wLength, 0); + USETW(req.wLength, sizeof(baudrate)); -if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, - &req, NULL, 0, 1000)) { + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + &req, &baudrate, 0, 1000)) { DPRINTF("Set baudrate failed (ignored)\n"); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r239732 - stable/9/sys/dev/usb/serial
Author: gavin Date: Mon Aug 27 14:44:40 2012 New Revision: 239732 URL: http://svn.freebsd.org/changeset/base/239732 Log: Merge r238778 from head: The baud rate on CP1201/2/3 devices can be set in one of two ways: - The USLCOM_SET_BAUD_DIV command (0x01) - The USLCOM_SET_BAUD_RATE command (0x13) Devices based on the CP1204 will only accept the latter command, and ignore the former. As the latter command works on all chips that this driver supports, switch to always using it. A slight confusion here is that the previously used command was incorrectly named USLCOM_BAUD_RATE - even though we no longer use it, rename it to USLCOM_SET_BAUD_DIV to closer match the name used in the datasheet. This change reflects a similar change made in the Linux driver, which was submitted by preston.fick at silabs.com, and has been tested on all of the uslcom(4) devices I have to hand. Modified: stable/9/sys/dev/usb/serial/uslcom.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/uslcom.c == --- stable/9/sys/dev/usb/serial/uslcom.cMon Aug 27 13:50:01 2012 (r239731) +++ stable/9/sys/dev/usb/serial/uslcom.cMon Aug 27 14:44:40 2012 (r239732) @@ -70,12 +70,13 @@ SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, deb /* Request codes */ #defineUSLCOM_UART 0x00 -#defineUSLCOM_BAUD_RATE0x01 +#defineUSLCOM_SET_BAUD_DIV 0x01 #defineUSLCOM_DATA 0x03 #defineUSLCOM_BREAK0x05 #defineUSLCOM_CTRL 0x07 #defineUSLCOM_RCTRL0x08 #defineUSLCOM_SET_FLOWCTRL 0x13 +#defineUSLCOM_SET_BAUD_RATE0x1e #defineUSLCOM_VENDOR_SPECIFIC 0xff /* USLCOM_UART values */ @@ -92,8 +93,8 @@ SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, deb #defineUSLCOM_CTRL_RI 0x0040 #defineUSLCOM_CTRL_DCD 0x0080 -/* USLCOM_BAUD_RATE values */ -#defineUSLCOM_BAUD_REF 0x384000 +/* USLCOM_SET_BAUD_DIV values */ +#defineUSLCOM_BAUD_REF 3686400 /* 3.6864 MHz */ /* USLCOM_DATA values */ #defineUSLCOM_STOP_BITS_1 0x00 @@ -511,19 +512,20 @@ uslcom_param(struct ucom_softc *ucom, st { struct uslcom_softc *sc = ucom->sc_parent; struct usb_device_request req; - uint32_t flowctrl[4]; + uint32_t baudrate, flowctrl[4]; uint16_t data; DPRINTF("\n"); + baudrate = t->c_ospeed; req.bmRequestType = USLCOM_WRITE; - req.bRequest = USLCOM_BAUD_RATE; - USETW(req.wValue, USLCOM_BAUD_REF / t->c_ospeed); + req.bRequest = USLCOM_SET_BAUD_RATE; + USETW(req.wValue, 0); USETW(req.wIndex, USLCOM_PORT_NO); - USETW(req.wLength, 0); + USETW(req.wLength, sizeof(baudrate)); -if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, - &req, NULL, 0, 1000)) { + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + &req, &baudrate, 0, 1000)) { DPRINTF("Set baudrate failed (ignored)\n"); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r239733 - head/usr.sbin/nvram
Author: rdivacky Date: Mon Aug 27 14:51:26 2012 New Revision: 239733 URL: http://svn.freebsd.org/changeset/base/239733 Log: Dont cast from char* to struct chrp_header* which has a bigger alignment requirements. Copy it via union instead. Fixes a clang warning about alignment. Reviewed by:sobomax Modified: head/usr.sbin/nvram/nvram.c Modified: head/usr.sbin/nvram/nvram.c == --- head/usr.sbin/nvram/nvram.c Mon Aug 27 14:44:40 2012(r239732) +++ head/usr.sbin/nvram/nvram.c Mon Aug 27 14:51:26 2012(r239733) @@ -51,12 +51,16 @@ struct deletelist { struct deletelist *last; }; +union { + uint8_t buf[sizeof(struct chrp_header)]; + struct chrp_header header; +} conv; + int main(int argc, char **argv) { int opt, dump, fd, res, i, size; uint8_t buf[NVRAM_SIZE], *cp, *common; - struct chrp_header *header; struct deletelist *dl; dump = 0; @@ -116,9 +120,9 @@ main(int argc, char **argv) /* Locate common block */ size = 0; for (cp = buf; cp < buf + sizeof(buf); cp += size) { - header = (struct chrp_header *)cp; - size = header->length * 0x10; - if (strncmp(header->name, "common", 7) == 0) + memcpy(conv.buf, cp, sizeof(struct chrp_header)); + size = conv.header.length * 0x10; + if (strncmp(conv.header.name, "common", 7) == 0) break; } if (cp >= buf + sizeof(buf) || size <= (int)sizeof(struct chrp_header)) ___ 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: r239734 - in stable/9/sys/dev/isci: . scil
Author: jimharris Date: Mon Aug 27 15:47:46 2012 New Revision: 239734 URL: http://svn.freebsd.org/changeset/base/239734 Log: MFC r239545, r239665: Fix/add support for SCSI UNMAP to ATA DSM translation. This addresses kernel panic observed when sending SCSI UNMAP commands to SATA disks attached to isci(4). 1) Flesh out callback routines to allocate/free buffers needed for translating SCSI UNMAP data to ATA DSM data. 2) Add controller-level pool for storing buffers previously allocated for UNMAP translation, to lessen chance of no buffer available under memory pressure. 3) Ensure driver properly handles case where buffer pool is empty and contigmalloc returns NULL. 4) Clear freeze bit in isci_remote_device_release_lun_queue() before calling xpt_release_devq to ensure that any ccbs which immediately start during the call to xpt_release_devq() see an accurate picture of the frozen_lun_mask. This code path is extensively exercised when tagged read/write commands mix with non-tagged DSM commands. Sponsored by: Intel Modified: stable/9/sys/dev/isci/isci.c stable/9/sys/dev/isci/isci.h stable/9/sys/dev/isci/isci_controller.c stable/9/sys/dev/isci/isci_remote_device.c stable/9/sys/dev/isci/scil/sati_unmap.c stable/9/sys/dev/isci/scil/scif_sas_sati_binding.h stable/9/sys/dev/isci/scil/scif_sas_stp_io_request.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/isci/isci.c == --- stable/9/sys/dev/isci/isci.cMon Aug 27 14:51:26 2012 (r239733) +++ stable/9/sys/dev/isci/isci.cMon Aug 27 15:47:46 2012 (r239734) @@ -185,6 +185,7 @@ isci_detach(device_t device) for (i = 0; i < isci->controller_count; i++) { struct ISCI_CONTROLLER *controller = &isci->controllers[i]; SCI_STATUS status; + void *unmap_buffer; if (controller->scif_controller_handle != NULL) { scic_controller_disable_interrupts( @@ -218,6 +219,13 @@ isci_detach(device_t device) if (controller->remote_device_memory != NULL) free(controller->remote_device_memory, M_ISCI); + + while (1) { + sci_pool_get(controller->unmap_buffer_pool, unmap_buffer); + if (unmap_buffer == NULL) + break; + contigfree(unmap_buffer, PAGE_SIZE, M_ISCI); + } } /* The SCIF controllers have been stopped, so we can now Modified: stable/9/sys/dev/isci/isci.h == --- stable/9/sys/dev/isci/isci.hMon Aug 27 14:51:26 2012 (r239733) +++ stable/9/sys/dev/isci/isci.hMon Aug 27 15:47:46 2012 (r239734) @@ -175,6 +175,7 @@ struct ISCI_CONTROLLER SCI_POOL_CREATE(remote_device_pool, struct ISCI_REMOTE_DEVICE *, SCI_MAX_REMOTE_DEVICES); SCI_POOL_CREATE(request_pool, struct ISCI_REQUEST *, SCI_MAX_IO_REQUESTS); SCI_POOL_CREATE(timer_pool, struct ISCI_TIMER *, SCI_MAX_TIMERS); + SCI_POOL_CREATE(unmap_buffer_pool, void *, SCI_MAX_REMOTE_DEVICES); }; struct ISCI_REQUEST Modified: stable/9/sys/dev/isci/isci_controller.c == --- stable/9/sys/dev/isci/isci_controller.c Mon Aug 27 14:51:26 2012 (r239733) +++ stable/9/sys/dev/isci/isci_controller.c Mon Aug 27 15:47:46 2012 (r239734) @@ -145,6 +145,14 @@ void scif_cb_controller_stop_complete(SC isci_controller->is_started = FALSE; } +static void +isci_single_map(void *arg, bus_dma_segment_t *seg, int nseg, int error) +{ + SCI_PHYSICAL_ADDRESS *phys_addr = arg; + + *phys_addr = seg[0].ds_addr; +} + /** * @brief This method will be invoked to allocate memory dynamically. * @@ -159,7 +167,29 @@ void scif_cb_controller_stop_complete(SC void scif_cb_controller_allocate_memory(SCI_CONTROLLER_HANDLE_T controller, SCI_PHYSICAL_MEMORY_DESCRIPTOR_T *mde) { + struct ISCI_CONTROLLER *isci_controller = (struct ISCI_CONTROLLER *) + sci_object_get_association(controller); + /* +* Note this routine is only used for buffers needed to translate +* SCSI UNMAP commands to ATA DSM commands for SATA disks. +* +* We first try to pull a buffer from the controller's pool, and only +* call contigmalloc if one isn't there. +*/ + if (!sci_pool_empty(isci_controller->unmap_buffer_pool)) { + sci_pool_get(isci_controller->unmap_buffer_pool, + mde->virtual_address); + } else + mde->virtual_address = contigmalloc(PAGE_SIZE, + M_ISCI, M_NOWAIT, 0, BUS_SPACE_MAXADDR,
svn commit: r239735 - in stable/8/sys/dev/isci: . scil
Author: jimharris Date: Mon Aug 27 15:52:09 2012 New Revision: 239735 URL: http://svn.freebsd.org/changeset/base/239735 Log: MFC r239545, r239665: Fix/add support for SCSI UNMAP to ATA DSM translation. (Note: scsi_da does not support BIO_DELETE->SCSI_UNMAP on this stable branch, but I am MFC'ing the changes to keep a consistent driver across all stable releases.) This addresses kernel panic observed when sending SCSI UNMAP commands to SATA disks attached to isci(4). 1) Flesh out callback routines to allocate/free buffers needed for translating SCSI UNMAP data to ATA DSM data. 2) Add controller-level pool for storing buffers previously allocated for UNMAP translation, to lessen chance of no buffer available under memory pressure. 3) Ensure driver properly handles case where buffer pool is empty and contigmalloc returns NULL. 4) Clear freeze bit in isci_remote_device_release_lun_queue() before calling xpt_release_devq to ensure that any ccbs which immediately start during the call to xpt_release_devq() see an accurate picture of the frozen_lun_mask. This code path is extensively exercised when tagged read/write commands mix with non-tagged DSM commands. Sponsored by: Intel Modified: stable/8/sys/dev/isci/isci.c stable/8/sys/dev/isci/isci.h stable/8/sys/dev/isci/isci_controller.c stable/8/sys/dev/isci/isci_remote_device.c stable/8/sys/dev/isci/scil/sati_unmap.c stable/8/sys/dev/isci/scil/scif_sas_sati_binding.h stable/8/sys/dev/isci/scil/scif_sas_stp_io_request.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/isci/isci.c == --- stable/8/sys/dev/isci/isci.cMon Aug 27 15:47:46 2012 (r239734) +++ stable/8/sys/dev/isci/isci.cMon Aug 27 15:52:09 2012 (r239735) @@ -185,6 +185,7 @@ isci_detach(device_t device) for (i = 0; i < isci->controller_count; i++) { struct ISCI_CONTROLLER *controller = &isci->controllers[i]; SCI_STATUS status; + void *unmap_buffer; if (controller->scif_controller_handle != NULL) { scic_controller_disable_interrupts( @@ -218,6 +219,13 @@ isci_detach(device_t device) if (controller->remote_device_memory != NULL) free(controller->remote_device_memory, M_ISCI); + + while (1) { + sci_pool_get(controller->unmap_buffer_pool, unmap_buffer); + if (unmap_buffer == NULL) + break; + contigfree(unmap_buffer, PAGE_SIZE, M_ISCI); + } } /* The SCIF controllers have been stopped, so we can now Modified: stable/8/sys/dev/isci/isci.h == --- stable/8/sys/dev/isci/isci.hMon Aug 27 15:47:46 2012 (r239734) +++ stable/8/sys/dev/isci/isci.hMon Aug 27 15:52:09 2012 (r239735) @@ -175,6 +175,7 @@ struct ISCI_CONTROLLER SCI_POOL_CREATE(remote_device_pool, struct ISCI_REMOTE_DEVICE *, SCI_MAX_REMOTE_DEVICES); SCI_POOL_CREATE(request_pool, struct ISCI_REQUEST *, SCI_MAX_IO_REQUESTS); SCI_POOL_CREATE(timer_pool, struct ISCI_TIMER *, SCI_MAX_TIMERS); + SCI_POOL_CREATE(unmap_buffer_pool, void *, SCI_MAX_REMOTE_DEVICES); }; struct ISCI_REQUEST Modified: stable/8/sys/dev/isci/isci_controller.c == --- stable/8/sys/dev/isci/isci_controller.c Mon Aug 27 15:47:46 2012 (r239734) +++ stable/8/sys/dev/isci/isci_controller.c Mon Aug 27 15:52:09 2012 (r239735) @@ -145,6 +145,14 @@ void scif_cb_controller_stop_complete(SC isci_controller->is_started = FALSE; } +static void +isci_single_map(void *arg, bus_dma_segment_t *seg, int nseg, int error) +{ + SCI_PHYSICAL_ADDRESS *phys_addr = arg; + + *phys_addr = seg[0].ds_addr; +} + /** * @brief This method will be invoked to allocate memory dynamically. * @@ -159,7 +167,29 @@ void scif_cb_controller_stop_complete(SC void scif_cb_controller_allocate_memory(SCI_CONTROLLER_HANDLE_T controller, SCI_PHYSICAL_MEMORY_DESCRIPTOR_T *mde) { + struct ISCI_CONTROLLER *isci_controller = (struct ISCI_CONTROLLER *) + sci_object_get_association(controller); + /* +* Note this routine is only used for buffers needed to translate +* SCSI UNMAP commands to ATA DSM commands for SATA disks. +* +* We first try to pull a buffer from the controller's pool, and only +* call contigmalloc if one isn't there. +*/ + if (!sci_pool_empty(isci_controller->unmap_buffer_pool)) { + sci_pool_get(isci_controller->unmap_buffer_pool, +
svn commit: r239736 - in stable/7/sys/dev/isci: . scil
Author: jimharris Date: Mon Aug 27 15:54:51 2012 New Revision: 239736 URL: http://svn.freebsd.org/changeset/base/239736 Log: MFC r239545, r239665: Fix/add support for SCSI UNMAP to ATA DSM translation. (Note: scsi_da does not support BIO_DELETE->SCSI_UNMAP on this stable branch, but I am MFC'ing the changes to keep a consistent driver across all stable releases.) This addresses kernel panic observed when sending SCSI UNMAP commands to SATA disks attached to isci(4). 1) Flesh out callback routines to allocate/free buffers needed for translating SCSI UNMAP data to ATA DSM data. 2) Add controller-level pool for storing buffers previously allocated for UNMAP translation, to lessen chance of no buffer available under memory pressure. 3) Ensure driver properly handles case where buffer pool is empty and contigmalloc returns NULL. 4) Clear freeze bit in isci_remote_device_release_lun_queue() before calling xpt_release_devq to ensure that any ccbs which immediately start during the call to xpt_release_devq() see an accurate picture of the frozen_lun_mask. This code path is extensively exercised when tagged read/write commands mix with non-tagged DSM commands. Sponsored by: Intel Modified: stable/7/sys/dev/isci/isci.c stable/7/sys/dev/isci/isci.h stable/7/sys/dev/isci/isci_controller.c stable/7/sys/dev/isci/isci_remote_device.c stable/7/sys/dev/isci/scil/sati_unmap.c stable/7/sys/dev/isci/scil/scif_sas_sati_binding.h stable/7/sys/dev/isci/scil/scif_sas_stp_io_request.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/isci/isci.c == --- stable/7/sys/dev/isci/isci.cMon Aug 27 15:52:09 2012 (r239735) +++ stable/7/sys/dev/isci/isci.cMon Aug 27 15:54:51 2012 (r239736) @@ -185,6 +185,7 @@ isci_detach(device_t device) for (i = 0; i < isci->controller_count; i++) { struct ISCI_CONTROLLER *controller = &isci->controllers[i]; SCI_STATUS status; + void *unmap_buffer; if (controller->scif_controller_handle != NULL) { scic_controller_disable_interrupts( @@ -218,6 +219,13 @@ isci_detach(device_t device) if (controller->remote_device_memory != NULL) free(controller->remote_device_memory, M_ISCI); + + while (1) { + sci_pool_get(controller->unmap_buffer_pool, unmap_buffer); + if (unmap_buffer == NULL) + break; + contigfree(unmap_buffer, PAGE_SIZE, M_ISCI); + } } /* The SCIF controllers have been stopped, so we can now Modified: stable/7/sys/dev/isci/isci.h == --- stable/7/sys/dev/isci/isci.hMon Aug 27 15:52:09 2012 (r239735) +++ stable/7/sys/dev/isci/isci.hMon Aug 27 15:54:51 2012 (r239736) @@ -175,6 +175,7 @@ struct ISCI_CONTROLLER SCI_POOL_CREATE(remote_device_pool, struct ISCI_REMOTE_DEVICE *, SCI_MAX_REMOTE_DEVICES); SCI_POOL_CREATE(request_pool, struct ISCI_REQUEST *, SCI_MAX_IO_REQUESTS); SCI_POOL_CREATE(timer_pool, struct ISCI_TIMER *, SCI_MAX_TIMERS); + SCI_POOL_CREATE(unmap_buffer_pool, void *, SCI_MAX_REMOTE_DEVICES); }; struct ISCI_REQUEST Modified: stable/7/sys/dev/isci/isci_controller.c == --- stable/7/sys/dev/isci/isci_controller.c Mon Aug 27 15:52:09 2012 (r239735) +++ stable/7/sys/dev/isci/isci_controller.c Mon Aug 27 15:54:51 2012 (r239736) @@ -145,6 +145,14 @@ void scif_cb_controller_stop_complete(SC isci_controller->is_started = FALSE; } +static void +isci_single_map(void *arg, bus_dma_segment_t *seg, int nseg, int error) +{ + SCI_PHYSICAL_ADDRESS *phys_addr = arg; + + *phys_addr = seg[0].ds_addr; +} + /** * @brief This method will be invoked to allocate memory dynamically. * @@ -159,7 +167,29 @@ void scif_cb_controller_stop_complete(SC void scif_cb_controller_allocate_memory(SCI_CONTROLLER_HANDLE_T controller, SCI_PHYSICAL_MEMORY_DESCRIPTOR_T *mde) { + struct ISCI_CONTROLLER *isci_controller = (struct ISCI_CONTROLLER *) + sci_object_get_association(controller); + /* +* Note this routine is only used for buffers needed to translate +* SCSI UNMAP commands to ATA DSM commands for SATA disks. +* +* We first try to pull a buffer from the controller's pool, and only +* call contigmalloc if one isn't there. +*/ + if (!sci_pool_empty(isci_controller->unmap_buffer_pool)) { + sci_pool_get(isci_controller->unmap_buffer_pool, + mde->virtual_address); +
svn commit: r239737 - stable/9/sys/cam/scsi
Author: jimharris Date: Mon Aug 27 15:57:33 2012 New Revision: 239737 URL: http://svn.freebsd.org/changeset/base/239737 Log: MFC r239655: Fix scsi_da's BIO_DELETE->SCSI_UNMAP translation to use correct local variable when determining various sizes related to SCSI UNMAP block descriptor lists. Sponsored by: Intel Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c == --- stable/9/sys/cam/scsi/scsi_da.c Mon Aug 27 15:54:51 2012 (r239736) +++ stable/9/sys/cam/scsi/scsi_da.c Mon Aug 27 15:57:33 2012 (r239737) @@ -1788,8 +1788,8 @@ dastart(struct cam_periph *periph, union softc->params.secsize > softc->unmap_max_lba) break; } while (1); - scsi_ulto2b(count * 16 + 6, &buf[0]); - scsi_ulto2b(count * 16, &buf[2]); + scsi_ulto2b(ranges * 16 + 6, &buf[0]); + scsi_ulto2b(ranges * 16, &buf[2]); scsi_unmap(&start_ccb->csio, /*retries*/da_retry_count, @@ -1797,7 +1797,7 @@ dastart(struct cam_periph *periph, union /*tag_action*/MSG_SIMPLE_Q_TAG, /*byte2*/0, /*data_ptr*/ buf, - /*dxfer_len*/ count * 16 + 8, + /*dxfer_len*/ ranges * 16 + 8, /*sense_len*/SSD_FULL_SIZE, da_default_timeout * 1000); start_ccb->ccb_h.ccb_state = DA_CCB_DELETE; ___ 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: r239738 - head/release/picobsd/build
Author: luigi Date: Mon Aug 27 16:42:32 2012 New Revision: 239738 URL: http://svn.freebsd.org/changeset/base/239738 Log: use MALLOC_PRODUCTION for picobsd builds, be more frugal in memory usage. Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd == --- head/release/picobsd/build/picobsd Mon Aug 27 15:57:33 2012 (r239737) +++ head/release/picobsd/build/picobsd Mon Aug 27 16:42:32 2012 (r239738) @@ -7,6 +7,8 @@ # # picobsd [options] image_type [site_name] # +# CWARNFLAGS can be used to pass -Wall or similar options +# # Where image_type is a directory with the picobsd config info, # and ${image_type}/floppy.tree.${site_name} contains # optional site-specific configuration. @@ -164,7 +166,7 @@ create_includes_and_libraries2() { # opt log "create_includes_and_libraries2() for ${SRC} $1" if [ ${OSVERSION} -ge 60 ] ; then no="-DNO_CLEAN -DNO_PROFILE -DNO_GAMES -DNO_LIBC_R" # WITHOUT_CDDL=1" - no="$no -DWITHOUT_CLANG" + no="$no -DWITHOUT_CLANG -DMALLOC_PRODUCTION" else no="-DNOCLEAN -DNOPROFILE -DNOGAMES -DNOLIBC_R" fi ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r239739 - head/share/doc/smm
Author: jhb Date: Mon Aug 27 17:15:14 2012 New Revision: 239739 URL: http://svn.freebsd.org/changeset/base/239739 Log: Don't build and install the 07.lpd doc if WITHOUT_LPR is set. MFC after:1 week Modified: head/share/doc/smm/Makefile Modified: head/share/doc/smm/Makefile == --- head/share/doc/smm/Makefile Mon Aug 27 16:42:32 2012(r239738) +++ head/share/doc/smm/Makefile Mon Aug 27 17:15:14 2012(r239739) @@ -18,7 +18,7 @@ SUBDIR= title \ 04.quotas \ 05.fastfs \ 06.nfs \ - 07.lpd \ + ${_07.lpd} \ ${_08.sendmailop} \ 11.timedop \ 12.timed \ @@ -28,4 +28,8 @@ SUBDIR= title \ _08.sendmailop=08.sendmailop .endif +.if ${MK_LPR} != "no" +_07.lpd= 07.lpd +.endif + .include ___ 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: r239740 - head/sys/dev/ida
Author: jhb Date: Mon Aug 27 17:24:07 2012 New Revision: 239740 URL: http://svn.freebsd.org/changeset/base/239740 Log: Rework the DMA handling in ida(4) and add locking to make this driver MPSAFE. - Preallocate a full set of QCBs during attach rather than allocating new ones on demand to avoid allocations in the I/O path. - Remove the explicit bus space tag/handle and use bus_*() on the relevant 'struct resource' instead. - Defer logical drive probing to an intrhook. - Fix ida_detach() to detach and delete child devices (logical drives). - Update the DMA handling to support EINPROGRESS by moving the work to submit a mapped request into the bus_dma callback routine as well as add support for freezing the queue when EINPROGRESS is encountered. Tested by:Marco Steinbach coco executive-computing de Modified: head/sys/dev/ida/ida.c head/sys/dev/ida/ida_disk.c head/sys/dev/ida/ida_eisa.c head/sys/dev/ida/ida_pci.c head/sys/dev/ida/idavar.h Modified: head/sys/dev/ida/ida.c == --- head/sys/dev/ida/ida.c Mon Aug 27 17:15:14 2012(r239739) +++ head/sys/dev/ida/ida.c Mon Aug 27 17:24:07 2012(r239740) @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -56,17 +58,17 @@ __FBSDID("$FreeBSD$"); #include /* prototypes */ -static void ida_alloc_qcb(struct ida_softc *ida); -static void ida_construct_qcb(struct ida_softc *ida); -static void ida_start(struct ida_softc *ida); +static int ida_alloc_qcbs(struct ida_softc *ida); static void ida_done(struct ida_softc *ida, struct ida_qcb *qcb); +static void ida_start(struct ida_softc *ida); +static void ida_startio(struct ida_softc *ida); +static void ida_startup(void *arg); +static void ida_timeout(void *arg); static int ida_wait(struct ida_softc *ida, struct ida_qcb *qcb); -static void ida_timeout (void *arg); static d_ioctl_t ida_ioctl; static struct cdevsw ida_cdevsw = { .d_version =D_VERSION, - .d_flags = D_NEEDGIANT, .d_ioctl = ida_ioctl, .d_name = "ida", }; @@ -76,10 +78,16 @@ ida_free(struct ida_softc *ida) { int i; + if (ida->ih != NULL) + bus_teardown_intr(ida->dev, ida->irq, ida->ih); + + mtx_lock(&ida->lock); callout_stop(&ida->ch); + mtx_unlock(&ida->lock); + callout_drain(&ida->ch); if (ida->buffer_dmat) { - for (i = 0; i < ida->num_qcbs; i++) + for (i = 0; i < IDA_QCB_MAX; i++) bus_dmamap_destroy(ida->buffer_dmat, ida->qcbs[i].dmamap); bus_dma_tag_destroy(ida->buffer_dmat); } @@ -96,9 +104,6 @@ ida_free(struct ida_softc *ida) if (ida->qcbs != NULL) free(ida->qcbs, M_DEVBUF); - if (ida->ih != NULL) - bus_teardown_intr(ida->dev, ida->irq, ida->ih); - if (ida->irq != NULL) bus_release_resource(ida->dev, ida->irq_res_type, 0, ida->irq); @@ -109,6 +114,8 @@ ida_free(struct ida_softc *ida) if (ida->regs != NULL) bus_release_resource(ida->dev, ida->regs_res_type, ida->regs_res_id, ida->regs); + + mtx_destroy(&ida->lock); } /* @@ -130,14 +137,21 @@ ida_get_qcb(struct ida_softc *ida) if ((qcb = SLIST_FIRST(&ida->free_qcbs)) != NULL) { SLIST_REMOVE_HEAD(&ida->free_qcbs, link.sle); - } else { - ida_alloc_qcb(ida); - if ((qcb = SLIST_FIRST(&ida->free_qcbs)) != NULL) - SLIST_REMOVE_HEAD(&ida->free_qcbs, link.sle); + bzero(qcb->hwqcb, sizeof(struct ida_hdr) + sizeof(struct ida_req)); } return (qcb); } +static __inline void +ida_free_qcb(struct ida_softc *ida, struct ida_qcb *qcb) +{ + + qcb->state = QCB_FREE; + qcb->buf = NULL; + qcb->error = 0; + SLIST_INSERT_HEAD(&ida->free_qcbs, qcb, link.sle); +} + static __inline bus_addr_t idahwqcbvtop(struct ida_softc *ida, struct ida_hardware_qcb *hwqcb) { @@ -155,42 +169,35 @@ idahwqcbptov(struct ida_softc *ida, bus_ return (hwqcb->qcb); } -/* - * XXX - * since we allocate all QCB space up front during initialization, then - * why bother with this routine? - */ -static void -ida_alloc_qcb(struct ida_softc *ida) +static int +ida_alloc_qcbs(struct ida_softc *ida) { struct ida_qcb *qcb; - int error; - - if (ida->num_qcbs >= IDA_QCB_MAX) - return; - - qcb = &ida->qcbs[ida->num_qcbs]; + int error, i; - error = bus_dmamap_create(ida->buffer_dmat, /*flags*/0, &qcb->dmamap); - if (error != 0) - return; + for (i = 0; i < IDA_QCB_MAX; i++) { + qcb = &ida->qcbs[i]; - qcb->flags = QCB_FREE; - qcb->hwqcb = &ida->hwqcb
svn commit: r239741 - in releng/9.1/sys/dev/isci: . scil
Author: jimharris Date: Mon Aug 27 18:10:25 2012 New Revision: 239741 URL: http://svn.freebsd.org/changeset/base/239741 Log: MFC r239545: Fix/add isci(4) support for SCSI UNMAP to ATA DSM translation. This addresses kernel panic observed when sending SCSI UNMAP commands to SATA disks attached to isci(4). 1) Flesh out callback routines to allocate/free buffers needed for translating SCSI UNMAP data to ATA DSM data. 2) Add controller-level pool for storing buffers previously allocated for UNMAP translation, to lessen chance of no buffer available under memory pressure. 3) Ensure driver properly handles case where buffer pool is empty and contigmalloc returns NULL. Sponsored by: Intel Approved by: re (kib) Modified: releng/9.1/sys/dev/isci/isci.c releng/9.1/sys/dev/isci/isci.h releng/9.1/sys/dev/isci/isci_controller.c releng/9.1/sys/dev/isci/scil/sati_unmap.c releng/9.1/sys/dev/isci/scil/scif_sas_sati_binding.h releng/9.1/sys/dev/isci/scil/scif_sas_stp_io_request.c Directory Properties: releng/9.1/sys/ (props changed) releng/9.1/sys/dev/ (props changed) Modified: releng/9.1/sys/dev/isci/isci.c == --- releng/9.1/sys/dev/isci/isci.c Mon Aug 27 17:24:07 2012 (r239740) +++ releng/9.1/sys/dev/isci/isci.c Mon Aug 27 18:10:25 2012 (r239741) @@ -185,6 +185,7 @@ isci_detach(device_t device) for (i = 0; i < isci->controller_count; i++) { struct ISCI_CONTROLLER *controller = &isci->controllers[i]; SCI_STATUS status; + void *unmap_buffer; if (controller->scif_controller_handle != NULL) { scic_controller_disable_interrupts( @@ -218,6 +219,13 @@ isci_detach(device_t device) if (controller->remote_device_memory != NULL) free(controller->remote_device_memory, M_ISCI); + + while (1) { + sci_pool_get(controller->unmap_buffer_pool, unmap_buffer); + if (unmap_buffer == NULL) + break; + contigfree(unmap_buffer, PAGE_SIZE, M_ISCI); + } } /* The SCIF controllers have been stopped, so we can now Modified: releng/9.1/sys/dev/isci/isci.h == --- releng/9.1/sys/dev/isci/isci.h Mon Aug 27 17:24:07 2012 (r239740) +++ releng/9.1/sys/dev/isci/isci.h Mon Aug 27 18:10:25 2012 (r239741) @@ -175,6 +175,7 @@ struct ISCI_CONTROLLER SCI_POOL_CREATE(remote_device_pool, struct ISCI_REMOTE_DEVICE *, SCI_MAX_REMOTE_DEVICES); SCI_POOL_CREATE(request_pool, struct ISCI_REQUEST *, SCI_MAX_IO_REQUESTS); SCI_POOL_CREATE(timer_pool, struct ISCI_TIMER *, SCI_MAX_TIMERS); + SCI_POOL_CREATE(unmap_buffer_pool, void *, SCI_MAX_REMOTE_DEVICES); }; struct ISCI_REQUEST Modified: releng/9.1/sys/dev/isci/isci_controller.c == --- releng/9.1/sys/dev/isci/isci_controller.c Mon Aug 27 17:24:07 2012 (r239740) +++ releng/9.1/sys/dev/isci/isci_controller.c Mon Aug 27 18:10:25 2012 (r239741) @@ -145,6 +145,14 @@ void scif_cb_controller_stop_complete(SC isci_controller->is_started = FALSE; } +static void +isci_single_map(void *arg, bus_dma_segment_t *seg, int nseg, int error) +{ + SCI_PHYSICAL_ADDRESS *phys_addr = arg; + + *phys_addr = seg[0].ds_addr; +} + /** * @brief This method will be invoked to allocate memory dynamically. * @@ -159,7 +167,29 @@ void scif_cb_controller_stop_complete(SC void scif_cb_controller_allocate_memory(SCI_CONTROLLER_HANDLE_T controller, SCI_PHYSICAL_MEMORY_DESCRIPTOR_T *mde) { + struct ISCI_CONTROLLER *isci_controller = (struct ISCI_CONTROLLER *) + sci_object_get_association(controller); + /* +* Note this routine is only used for buffers needed to translate +* SCSI UNMAP commands to ATA DSM commands for SATA disks. +* +* We first try to pull a buffer from the controller's pool, and only +* call contigmalloc if one isn't there. +*/ + if (!sci_pool_empty(isci_controller->unmap_buffer_pool)) { + sci_pool_get(isci_controller->unmap_buffer_pool, + mde->virtual_address); + } else + mde->virtual_address = contigmalloc(PAGE_SIZE, + M_ISCI, M_NOWAIT, 0, BUS_SPACE_MAXADDR, + mde->constant_memory_alignment, 0); + + if (mde->virtual_address != NULL) + bus_dmamap_load(isci_controller->buffer_dma_tag, + NULL, mde->virtual_address, PAGE_SIZE, + isci_single_map, &mde->physical_address, + BUS_DMA
svn commit: r239742 - releng/9.1/sys/cam/scsi
Author: jimharris Date: Mon Aug 27 18:12:08 2012 New Revision: 239742 URL: http://svn.freebsd.org/changeset/base/239742 Log: MFC r239655: Fix scsi_da's BIO_DELETE->SCSI_UNMAP translation to use correct local variable when determining various sizes related to SCSI UNMAP block descriptor lists. Sponsored by: Intel Approved by: re (kib) Modified: releng/9.1/sys/cam/scsi/scsi_da.c Directory Properties: releng/9.1/sys/ (props changed) Modified: releng/9.1/sys/cam/scsi/scsi_da.c == --- releng/9.1/sys/cam/scsi/scsi_da.c Mon Aug 27 18:10:25 2012 (r239741) +++ releng/9.1/sys/cam/scsi/scsi_da.c Mon Aug 27 18:12:08 2012 (r239742) @@ -1788,8 +1788,8 @@ dastart(struct cam_periph *periph, union softc->params.secsize > softc->unmap_max_lba) break; } while (1); - scsi_ulto2b(count * 16 + 6, &buf[0]); - scsi_ulto2b(count * 16, &buf[2]); + scsi_ulto2b(ranges * 16 + 6, &buf[0]); + scsi_ulto2b(ranges * 16, &buf[2]); scsi_unmap(&start_ccb->csio, /*retries*/da_retry_count, @@ -1797,7 +1797,7 @@ dastart(struct cam_periph *periph, union /*tag_action*/MSG_SIMPLE_Q_TAG, /*byte2*/0, /*data_ptr*/ buf, - /*dxfer_len*/ count * 16 + 8, + /*dxfer_len*/ ranges * 16 + 8, /*sense_len*/SSD_FULL_SIZE, da_default_timeout * 1000); start_ccb->ccb_h.ccb_state = DA_CCB_DELETE; ___ 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: r239743 - releng/9.1/sys/dev/isci
Author: jimharris Date: Mon Aug 27 18:14:22 2012 New Revision: 239743 URL: http://svn.freebsd.org/changeset/base/239743 Log: MFC r239665: Clear freeze bit before calling xpt_release_devq. This ensures that any ccbs which immediately start during the call to xpt_release_devq see an accurate picture of the frozen_lun_mask. Sponsored by: Intel Approved by: re (kib) Modified: releng/9.1/sys/dev/isci/isci_remote_device.c Directory Properties: releng/9.1/sys/ (props changed) releng/9.1/sys/dev/ (props changed) Modified: releng/9.1/sys/dev/isci/isci_remote_device.c == --- releng/9.1/sys/dev/isci/isci_remote_device.cMon Aug 27 18:12:08 2012(r239742) +++ releng/9.1/sys/dev/isci/isci_remote_device.cMon Aug 27 18:14:22 2012(r239743) @@ -278,12 +278,12 @@ isci_remote_device_release_lun_queue(str if (remote_device->frozen_lun_mask & (1 << lun)) { struct cam_path *path; + remote_device->frozen_lun_mask &= ~(1 << lun); xpt_create_path(&path, xpt_periph, cam_sim_path(remote_device->domain->controller->sim), remote_device->index, lun); xpt_release_devq(path, 1, TRUE); xpt_free_path(path); - remote_device->frozen_lun_mask &= ~(1 << lun); } } ___ 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: r239744 - head/usr.sbin/mountd
Author: delphij Date: Mon Aug 27 19:08:47 2012 New Revision: 239744 URL: http://svn.freebsd.org/changeset/base/239744 Log: Show error messages if nmount() failed. MFC after:1 month Modified: head/usr.sbin/mountd/mountd.c Modified: head/usr.sbin/mountd/mountd.c == --- head/usr.sbin/mountd/mountd.c Mon Aug 27 18:14:22 2012 (r239743) +++ head/usr.sbin/mountd/mountd.c Mon Aug 27 19:08:47 2012 (r239744) @@ -2461,11 +2461,11 @@ do_mount(struct exportlist *ep, struct g } if (errno == EPERM) { if (debug) - warnx("can't change attributes for %s", - dirp); + warnx("can't change attributes for %s: %s", + dirp, errmsg); syslog(LOG_ERR, - "can't change attributes for %s", - dirp); + "can't change attributes for %s: %s", + dirp, errmsg); ret = 1; goto error_exit; } ___ 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: r239745 - vendor/illumos/dist/man/man5
Author: mm Date: Mon Aug 27 19:20:58 2012 New Revision: 239745 URL: http://svn.freebsd.org/changeset/base/239745 Log: Add zpool-features.5 vendor manual page, revision 13753:2aba784c276b Obtained from:ssh://ano...@hg.illumos.org/illumos-gate Added: vendor/illumos/dist/man/man5/ vendor/illumos/dist/man/man5/zpool-features.5 Added: vendor/illumos/dist/man/man5/zpool-features.5 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/man/man5/zpool-features.5 Mon Aug 27 19:20:58 2012(r239745) @@ -0,0 +1,173 @@ +'\" te +.\" Copyright (c) 2012 by Delphix. All rights reserved. +.\" The contents of this file are subject to the terms of the Common Development +.\" and Distribution License (the "License"). You may not use this file except +.\" in compliance with the License. You can obtain a copy of the license at +.\" usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. +.\" +.\" See the License for the specific language governing permissions and +.\" limitations under the License. When distributing Covered Code, include this +.\" CDDL HEADER in each file and include the License file at +.\" usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this +.\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your +.\" own identifying information: +.\" Portions Copyright [] [name of copyright owner] +.TH ZPOOL-FEATURES 5 "Mar 16, 2012" +.SH NAME +zpool\-features \- ZFS pool feature descriptions +.SH DESCRIPTION +.sp +.LP +ZFS pool on\-disk format versions are specified via "features" which replace +the old on\-disk format numbers (the last supported on\-disk format number is +28). To enable a feature on a pool use the \fBupgrade\fR subcommand of the +\fBzpool\fR(1M) command, or set the \fBfeature@\fR\fIfeature_name\fR property +to \fBenabled\fR. +.sp +.LP +The pool format does not affect file system version compatibility or the ability +to send file systems between pools. +.sp +.LP +Since most features can be enabled independently of each other the on\-disk +format of the pool is specified by the set of all features marked as +\fBactive\fR on the pool. If the pool was created by another software version +this set may include unsupported features. +.SS "Identifying features" +.sp +.LP +Every feature has a guid of the form \fIcom.example:feature_name\fR. The reverse +DNS name ensures that the feature's guid is unique across all ZFS +implementations. When unsupported features are encountered on a pool they will +be identified by their guids. Refer to the documentation for the ZFS +implementation that created the pool for information about those features. +.sp +.LP +Each supported feature also has a short name. By convention a feature's short +name is the portion of its guid which follows the ':' (e.g. +\fIcom.example:feature_name\fR would have the short name \fIfeature_name\fR), +however a feature's short name may differ across ZFS implementations if +following the convention would result in name conflicts. +.SS "Feature states" +.sp +.LP +Features can be in one of three states: +.sp +.ne 2 +.na +\fB\fBactive\fR\fR +.ad +.RS 12n +This feature's on\-disk format changes are in effect on the pool. Support for +this feature is required to import the pool in read\-write mode. If this +feature is not read-only compatible, support is also required to import the pool +in read\-only mode (see "Read\-only compatibility"). +.RE + +.sp +.ne 2 +.na +\fB\fBenabled\fR\fR +.ad +.RS 12n +An administrator has marked this feature as enabled on the pool, but the +feature's on\-disk format changes have not been made yet. The pool can still be +imported by software that does not support this feature, but changes may be made +to the on\-disk format at any time which will move the feature to the +\fBactive\fR state. Some features may support returning to the \fBenabled\fR +state after becoming \fBactive\fR. See feature\-specific documentation for +details. +.RE + +.sp +.ne 2 +.na +\fBdisabled\fR +.ad +.RS 12n +This feature's on\-disk format changes have not been made and will not be made +unless an administrator moves the feature to the \fBenabled\fR state. Features +cannot be disabled once they have been enabled. +.RE + +.sp +.LP +The state of supported features is exposed through pool properties of the form +\fIfeature@short_name\fR. +.SS "Read\-only compatibility" +.sp +.LP +Some features may make on\-disk format changes that do not interfere with other +software's ability to read from the pool. These features are referred to as +"read\-only compatible". If all unsupported features on a pool are read\-only +compatible, the pool can be imported in read\-only mode by setting the +\fBreadonly\fR property during import (see \fBzpool\fR(1M) for details on +importing pools). +.SS "Unsupported features" +.sp +.LP +For each unsupported feat
svn commit: r239746 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zinject vendor/illumos/dist/...
Author: mm Date: Mon Aug 27 19:25:20 2012 New Revision: 239746 URL: http://svn.freebsd.org/changeset/base/239746 Log: Update vendor/illumos/dist and vendor/illumos-gate/dist to illumos-gate revision 13782:8f78aae28a63 Obtained from:ssh://ano...@hg.illumos.org/illumos-gate Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/common/zfs/zfeature_common.h vendor-sys/illumos/dist/uts/common/fs/zfs/bpobj.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deadlist.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/bpobj.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap.h vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/zinject/zinject.c vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/man/man5/zpool-features.5 Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c == --- vendor-sys/illumos/dist/common/zfs/zfeature_common.cMon Aug 27 19:20:58 2012(r239745) +++ vendor-sys/illumos/dist/common/zfs/zfeature_common.cMon Aug 27 19:25:20 2012(r239746) @@ -153,4 +153,7 @@ zpool_feature_init(void) zfeature_register(SPA_FEATURE_ASYNC_DESTROY, "com.delphix:async_destroy", "async_destroy", "Destroy filesystems asynchronously.", B_TRUE, B_FALSE, NULL); + zfeature_register(SPA_FEATURE_EMPTY_BPOBJ, + "com.delphix:empty_bpobj", "empty_bpobj", + "Snapshots use less space.", B_TRUE, B_FALSE, NULL); } Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.h == --- vendor-sys/illumos/dist/common/zfs/zfeature_common.hMon Aug 27 19:20:58 2012(r239745) +++ vendor-sys/illumos/dist/common/zfs/zfeature_common.hMon Aug 27 19:25:20 2012(r239746) @@ -51,6 +51,7 @@ typedef int (zfeature_func_t)(zfeature_i enum spa_feature { SPA_FEATURE_ASYNC_DESTROY, + SPA_FEATURE_EMPTY_BPOBJ, SPA_FEATURES } spa_feature_t; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/bpobj.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/bpobj.c Mon Aug 27 19:20:58 2012(r239745) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/bpobj.c Mon Aug 27 19:25:20 2012(r239746) @@ -20,13 +20,61 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #include #include #include #include +#include +#include + +/* + * Return an empty bpobj, preferably the empty dummy one (dp_empty_bpobj). + */ +uint64_t +bpobj_alloc_empty(objset_t *os, int blocksize, dmu_tx_t *tx) +{ + zfeature_info_t *empty_bpobj_feat = + &spa_feature_table[SPA_FEATURE_EMPTY_BPOBJ]; + spa_t *spa = dmu_objset_spa(os); + dsl_pool_t *dp = dmu_objset_pool(os); + + if (spa_feature_is_enabled(spa, empty_bpobj_feat)) { + if (!spa_feature_is_active(spa, empty_bpobj_feat)) { + ASSERT3U(dp->dp_empty_bpobj, ==, 0); + dp->dp_empty_bpobj = + bpobj_alloc(os, SPA_MAXBLOCKSIZE, tx); + VERIFY(zap_add(os, + DMU_POOL_DIRECTORY_OBJECT, + DMU_POOL_EMPTY_BPOBJ, sizeof (uint64_t), 1, + &dp->dp_empty_bpobj, tx) == 0); + } + spa_feature_incr(spa, empty_bpobj_feat, tx); + ASSERT(dp->dp_empty_bpobj != 0); + return (dp->dp_empty_bpobj); + } else { + return (bpobj_alloc(os, blocksize, tx)); + } +} + +void +bpobj_decr_empty(objset_t *os, dmu_tx_t *tx) +{ + zfeature_info_t *empty_bpobj_feat = + &spa_feature_table[SPA_FEATURE_EMPTY_BPOBJ]; + dsl_pool_t *dp = dmu_objset_pool(os); + + spa_feature_decr(dmu_objset_spa(os), empty_bpobj_feat, tx); + if (!spa_feature_is_active(dmu_objset_spa(os), empty_bpobj_feat)) { +
svn commit: r239746 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zinject vendor/illumos/dist/...
Author: mm Date: Mon Aug 27 19:25:20 2012 New Revision: 239746 URL: http://svn.freebsd.org/changeset/base/239746 Log: Update vendor/illumos/dist and vendor/illumos-gate/dist to illumos-gate revision 13782:8f78aae28a63 Obtained from:ssh://ano...@hg.illumos.org/illumos-gate Modified: vendor/illumos/dist/cmd/zinject/zinject.c vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/man/man5/zpool-features.5 Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/common/zfs/zfeature_common.h vendor-sys/illumos/dist/uts/common/fs/zfs/bpobj.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deadlist.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/bpobj.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap.h vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Modified: vendor/illumos/dist/cmd/zinject/zinject.c == --- vendor/illumos/dist/cmd/zinject/zinject.c Mon Aug 27 19:20:58 2012 (r239745) +++ vendor/illumos/dist/cmd/zinject/zinject.c Mon Aug 27 19:25:20 2012 (r239746) @@ -294,11 +294,9 @@ static int iter_handlers(int (*func)(int, const char *, zinject_record_t *, void *), void *data) { - zfs_cmd_t zc; + zfs_cmd_t zc = { 0 }; int ret; - zc.zc_guid = 0; - while (ioctl(zfs_fd, ZFS_IOC_INJECT_LIST_NEXT, &zc) == 0) if ((ret = func((int)zc.zc_guid, zc.zc_name, &zc.zc_inject_record, data)) != 0) @@ -421,7 +419,7 @@ static int cancel_one_handler(int id, const char *pool, zinject_record_t *record, void *data) { - zfs_cmd_t zc; + zfs_cmd_t zc = { 0 }; zc.zc_guid = (uint64_t)id; @@ -454,7 +452,7 @@ cancel_all_handlers(void) static int cancel_handler(int id) { - zfs_cmd_t zc; + zfs_cmd_t zc = { 0 }; zc.zc_guid = (uint64_t)id; @@ -476,7 +474,7 @@ static int register_handler(const char *pool, int flags, zinject_record_t *record, int quiet) { - zfs_cmd_t zc; + zfs_cmd_t zc = { 0 }; (void) strcpy(zc.zc_name, pool); zc.zc_inject_record = *record; @@ -533,7 +531,7 @@ register_handler(const char *pool, int f int perform_action(const char *pool, zinject_record_t *record, int cmd) { - zfs_cmd_t zc; + zfs_cmd_t zc = { 0 }; ASSERT(cmd == VDEV_STATE_DEGRADED || cmd == VDEV_STATE_FAULTED); (void) strlcpy(zc.zc_name, pool, sizeof (zc.zc_name)); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c == --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Mon Aug 27 19:20:58 2012(r239745) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Mon Aug 27 19:25:20 2012(r239746) @@ -3511,7 +3511,7 @@ zfs_rollback(zfs_handle_t *zhp, zfs_hand zhp->zfs_type == ZFS_TYPE_VOLUME); /* -* Destroy all recent snapshots and its dependends. +* Destroy all recent snapshots and their dependents. */ cb.cb_force = force; cb.cb_target = snap->zfs_name; Modified: vendor/illumos/dist/man/man5/zpool-features.5 == --- vendor/illumos/dist/man/man5/zpool-features.5 Mon Aug 27 19:20:58 2012(r239745) +++ vendor/illumos/dist/man/man5/zpool-features.5 Mon Aug 27 19:25:20 2012(r239746) @@ -169,5 +169,33 @@ through the \fBfreeing\fR property. This feature is only \fBactive\fR while \fBfreeing\fR is non\-zero. .RE + +.sp +.ne 2 +.na +\fB\fBempty_bpobj\fR\fR +.ad +.RS 4n +.TS +l l . +GUID com.delphix:empty_bpobj +READ\-ONLY COMPATIBLE yes +DEPENDENCIES none +.TE + +This feature increases the performance of creating and using a large +number of snapshots of a single filesystem or volume, and also reduces +the disk space required. + +When there are many snapshots, each snapshot uses many Block Pointer +Objects (bpobj's) to track blocks associated with that snapshot. +However, in common use cases, most of these bpobj's are empty. This +feature allows us to create each bpobj on-demand, thus el
svn commit: r239747 - head
Author: dim Date: Mon Aug 27 19:30:21 2012 New Revision: 239747 URL: http://svn.freebsd.org/changeset/base/239747 Log: Add a few other files that are obsolete if WITH_CLANG_EXTRAS is enabled, and clang is updated to 3.2. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Mon Aug 27 19:25:20 2012(r239746) +++ head/ObsoleteFiles.inc Mon Aug 27 19:30:21 2012(r239747) @@ -39,6 +39,8 @@ # done # 20120816: new clang import which bumps version from 3.1 to 3.2 +OLD_FILES+=usr/bin/llvm-ld +OLD_FILES+=usr/bin/llvm-stub OLD_FILES+=usr/include/clang/3.1/altivec.h OLD_FILES+=usr/include/clang/3.1/avx2intrin.h OLD_FILES+=usr/include/clang/3.1/avxintrin.h @@ -63,6 +65,7 @@ OLD_FILES+=usr/include/clang/3.1/wmmintr OLD_FILES+=usr/include/clang/3.1/x86intrin.h OLD_FILES+=usr/include/clang/3.1/xmmintrin.h OLD_DIRS+=usr/include/clang/3.1 +OLD_FILES+=usr/share/man/man1/llvm-ld.1.gz # 20120712: OpenSSL 1.0.1c import OLD_LIBS+=lib/libcrypto.so.6 OLD_LIBS+=usr/lib/libssl.so.6 ___ 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: r239748 - in stable/9/sys: amd64/conf conf i386/conf modules/mlx4 modules/mlx4ib modules/mlxen modules/mthca ofed/drivers/infiniband/core ofed/drivers/infiniband/ulp/ipoib ofed/drivers/...
Author: jhb Date: Mon Aug 27 19:37:02 2012 New Revision: 239748 URL: http://svn.freebsd.org/changeset/base/239748 Log: MFC 233040,233198,233870,234183: Add OFED and the associated options and drivers to x86 LINT builds: - Fix build with INET6 disabled. - Fix build of OFED bits with debugging options enabled. - Fix build on i386. - Mark 'sdp' as requiring 'inet'. - Always include "opt_inet.h" and "opt_inet6.h" and modify the IB driver Makefiles to honor WITH/WITHOUT_INET/INET6/_SUPPORT options to determine what should be enabled during a module build. - Fix the mlxen(4) driver and the core IB code to compile without if INET is disabled (including when both INET and INET6 are disabled). Modified: stable/9/sys/amd64/conf/NOTES stable/9/sys/conf/files stable/9/sys/i386/conf/NOTES stable/9/sys/modules/mlx4/Makefile stable/9/sys/modules/mlx4ib/Makefile stable/9/sys/modules/mlxen/Makefile stable/9/sys/modules/mthca/Makefile stable/9/sys/ofed/drivers/infiniband/core/addr.c stable/9/sys/ofed/drivers/infiniband/core/cma.c stable/9/sys/ofed/drivers/infiniband/core/fmr_pool.c stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c stable/9/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c stable/9/sys/ofed/drivers/net/mlx4/en_frag.c stable/9/sys/ofed/drivers/net/mlx4/en_rx.c stable/9/sys/ofed/include/linux/in.h stable/9/sys/ofed/include/linux/in6.h stable/9/sys/ofed/include/net/ip.h stable/9/sys/ofed/include/net/ipv6.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/amd64/conf/NOTES == --- stable/9/sys/amd64/conf/NOTES Mon Aug 27 19:30:21 2012 (r239747) +++ stable/9/sys/amd64/conf/NOTES Mon Aug 27 19:37:02 2012 (r239748) @@ -90,6 +90,19 @@ options DEVICE_POLLING optionsBPF_JITTER +# OpenFabrics Enterprise Distribution (Infiniband). +optionsOFED +optionsOFED_DEBUG_INIT + +# Sockets Direct Protocol +optionsSDP +optionsSDP_DEBUG + +# IP over Inifiband +optionsIPOIB +optionsIPOIB_DEBUG +optionsIPOIB_CM + # # CLOCK OPTIONS @@ -290,6 +303,9 @@ options DRM_DEBUG # Include debug print # Requires the iwi firmware module # iwn: Intel Wireless WiFi Link 4965/1000/5000/6000 802.11 network adapters # Requires the iwn firmware module +# mlx4ib: Mellanox ConnectX HCA InfiniBand +# mlxen: Mellanox ConnectX HCA Ethernet +# mthca: Mellanox HCA InfiniBand # mwl: Marvell 88W8363 IEEE 802.11 adapter # Requires the mwl firmware module # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) @@ -305,6 +321,9 @@ options ED_SIC device ipw # Intel 2100 wireless NICs. device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. device iwn # Intel 4965/1000/5000/6000 wireless NICs. +device mlx4ib # Mellanox ConnectX HCA InfiniBand +device mlxen # Mellanox ConnectX HCA Ethernet +device mthca # Mellanox HCA InfiniBand device mwl # Marvell 88W8363 802.11n wireless NICs. device nfe # nVidia nForce MCP on-board Ethernet device nve # nVidia nForce MCP on-board Ethernet Networking Modified: stable/9/sys/conf/files == --- stable/9/sys/conf/files Mon Aug 27 19:30:21 2012(r239747) +++ stable/9/sys/conf/files Mon Aug 27 19:37:02 2012(r239748) @@ -3077,19 +3077,19 @@ ofed/drivers/infiniband/ulp/ipoib/ipoib_ # no-depend \ # compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" -ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.coptional sdp
svn commit: r239749 - head/cddl/contrib/opensolaris/cmd/zpool
Author: mm Date: Mon Aug 27 19:52:55 2012 New Revision: 239749 URL: http://svn.freebsd.org/changeset/base/239749 Log: Add missing parts to zpool-features.5 manual page Obtained from:vendor/illumos/dist MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5 == --- head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5Mon Aug 27 19:37:02 2012(r239748) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5Mon Aug 27 19:52:55 2012(r239749) @@ -21,7 +21,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2012 +.Dd Aug 27, 2012 .Dt ZPOOL-FEATURES 8 .Os .Sh NAME @@ -32,8 +32,10 @@ ZFS pool on\-disk format versions are sp the old on\-disk format numbers (the last supported on\-disk format number is 28). To enable a feature on a pool use the +.Cm upgrade +subcommand of the .Xr zpool 8 -command to set the +command, or set the .Sy feature@feature_name property to .Ar enabled . @@ -154,6 +156,12 @@ The amount of space remaining to be recl available through the .Sy freeing property. +.Pp +This feature is only +.Sy active +while +.Sy freeing +is non\-zero. .Sh SEE ALSO .Xr zpool 8 .Sh AUTHORS ___ 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: r239750 - in stable/9: contrib/top usr.bin/top
Author: jhb Date: Mon Aug 27 19:55:19 2012 New Revision: 239750 URL: http://svn.freebsd.org/changeset/base/239750 Log: MFC 237646,237656,238020: - Add a new line to top that provides a brief summary of the ZFS ARC memory usage on hosts using ZFS. The new line displays the total amount of RAM used by the ARC along with the size of MFU, MRU, anonymous (in flight), headers, and other (miscellaneous) sub-categories. The line is not displayed on systems that are not using ZFS. - Clarify that the cached file data pages included in the "Wired" count in top are the BIO-level cached data (i.e. "Buf"), since the previous phrase was a bit ambiguous with the "Cache" count. Modified: stable/9/contrib/top/display.c stable/9/contrib/top/layout.h stable/9/contrib/top/machine.h stable/9/contrib/top/top.c stable/9/usr.bin/top/machine.c stable/9/usr.bin/top/top.local.1 Directory Properties: stable/9/contrib/top/ (props changed) stable/9/contrib/top/install-sh (props changed) stable/9/usr.bin/top/ (props changed) Modified: stable/9/contrib/top/display.c == --- stable/9/contrib/top/display.c Mon Aug 27 19:52:55 2012 (r239749) +++ stable/9/contrib/top/display.c Mon Aug 27 19:55:19 2012 (r239750) @@ -66,6 +66,7 @@ char *screenbuf = NULL; static char **procstate_names; static char **cpustate_names; static char **memory_names; +static char **arc_names; static char **swap_names; static int num_procstates; @@ -100,6 +101,8 @@ int x_brkdn = 15; int y_brkdn = 1; int x_mem = 5; int y_mem = 3; +int x_arc = 5; +int y_arc = 4; int x_swap = 6; int y_swap = 4; int y_message = 5; @@ -216,6 +219,8 @@ struct statics *statics; num_memory = string_count(memory_names); lmemory = (int *)malloc(num_memory * sizeof(int)); + arc_names = statics->arc_names; + /* calculate starting columns where needed */ cpustate_total_length = 0; pp = cpustate_names; @@ -627,6 +632,46 @@ int *stats; } /* + * *_arc(stats) - print "ARC: " followed by the ARC summary string + * + * Assumptions: cursor is on "lastline" + *for i_arc ONLY: cursor is on the previous line + */ +char arc_buffer[MAX_COLS]; + +i_arc(stats) + +int *stats; + +{ +if (arc_names == NULL) + return (0); + +fputs("\nARC: ", stdout); +lastline++; + +/* format and print the memory summary */ +summary_format(arc_buffer, stats, arc_names); +fputs(arc_buffer, stdout); +} + +u_arc(stats) + +int *stats; + +{ +static char new[MAX_COLS]; + +if (arc_names == NULL) + return (0); + +/* format the new line */ +summary_format(new, stats, arc_names); +line_update(arc_buffer, new, x_arc, y_arc); +} + + +/* * *_swap(stats) - print "Swap: " followed by the swap summary string * * Assumptions: cursor is on "lastline" Modified: stable/9/contrib/top/layout.h == --- stable/9/contrib/top/layout.h Mon Aug 27 19:52:55 2012 (r239749) +++ stable/9/contrib/top/layout.h Mon Aug 27 19:55:19 2012 (r239750) @@ -19,6 +19,8 @@ extern int x_brkdn; /* 15 */ extern int y_brkdn; /* 1 */ extern int x_mem; /* 5 */ extern int y_mem; /* 3 */ +extern int x_arc; /* 5 */ +extern int y_arc; /* 4 */ extern int x_swap;/* 6 */ extern int y_swap;/* 4 */ extern int y_message; /* 5 */ Modified: stable/9/contrib/top/machine.h == --- stable/9/contrib/top/machine.h Mon Aug 27 19:52:55 2012 (r239749) +++ stable/9/contrib/top/machine.h Mon Aug 27 19:55:19 2012 (r239750) @@ -16,6 +16,7 @@ struct statics char **procstate_names; char **cpustate_names; char **memory_names; +char **arc_names; char **swap_names; #ifdef ORDER char **order_names; @@ -42,6 +43,7 @@ struct system_info int*procstates; int*cpustates; int*memory; +int*arc; int*swap; struct timeval boottime; intncpus; Modified: stable/9/contrib/top/top.c == --- stable/9/contrib/top/top.c Mon Aug 27 19:52:55 2012(r239749) +++ stable/9/contrib/top/top.c Mon Aug 27 19:55:19 2012(r239750) @@ -121,6 +121,8 @@ int i_cpustates(); int u_cpustates(); int i_memory(); int u_memory(); +int i_arc(); +int u_arc(); int i_swap(); int u_swap(); int i_message(); @@ -135,6 +137,7 @@ int (*d_loadave)() = i_loadave; int (*d_procstates)() = i_procstates; int (*d_cpustates)() = i_cpustates; int (*d_memory)() = i_memory;
svn commit: r239751 - in stable/8: contrib/top usr.bin/top
Author: jhb Date: Mon Aug 27 19:55:31 2012 New Revision: 239751 URL: http://svn.freebsd.org/changeset/base/239751 Log: MFC 237646,237656,238020: - Add a new line to top that provides a brief summary of the ZFS ARC memory usage on hosts using ZFS. The new line displays the total amount of RAM used by the ARC along with the size of MFU, MRU, anonymous (in flight), headers, and other (miscellaneous) sub-categories. The line is not displayed on systems that are not using ZFS. - Clarify that the cached file data pages included in the "Wired" count in top are the BIO-level cached data (i.e. "Buf"), since the previous phrase was a bit ambiguous with the "Cache" count. Modified: stable/8/contrib/top/display.c stable/8/contrib/top/layout.h stable/8/contrib/top/machine.h stable/8/contrib/top/top.c stable/8/usr.bin/top/machine.c stable/8/usr.bin/top/top.local.1 Directory Properties: stable/8/contrib/top/ (props changed) stable/8/contrib/top/install-sh (props changed) stable/8/usr.bin/top/ (props changed) Modified: stable/8/contrib/top/display.c == --- stable/8/contrib/top/display.c Mon Aug 27 19:55:19 2012 (r239750) +++ stable/8/contrib/top/display.c Mon Aug 27 19:55:31 2012 (r239751) @@ -66,6 +66,7 @@ char *screenbuf = NULL; static char **procstate_names; static char **cpustate_names; static char **memory_names; +static char **arc_names; static char **swap_names; static int num_procstates; @@ -100,6 +101,8 @@ int x_brkdn = 15; int y_brkdn = 1; int x_mem = 5; int y_mem = 3; +int x_arc = 5; +int y_arc = 4; int x_swap = 6; int y_swap = 4; int y_message = 5; @@ -216,6 +219,8 @@ struct statics *statics; num_memory = string_count(memory_names); lmemory = (int *)malloc(num_memory * sizeof(int)); + arc_names = statics->arc_names; + /* calculate starting columns where needed */ cpustate_total_length = 0; pp = cpustate_names; @@ -627,6 +632,46 @@ int *stats; } /* + * *_arc(stats) - print "ARC: " followed by the ARC summary string + * + * Assumptions: cursor is on "lastline" + *for i_arc ONLY: cursor is on the previous line + */ +char arc_buffer[MAX_COLS]; + +i_arc(stats) + +int *stats; + +{ +if (arc_names == NULL) + return (0); + +fputs("\nARC: ", stdout); +lastline++; + +/* format and print the memory summary */ +summary_format(arc_buffer, stats, arc_names); +fputs(arc_buffer, stdout); +} + +u_arc(stats) + +int *stats; + +{ +static char new[MAX_COLS]; + +if (arc_names == NULL) + return (0); + +/* format the new line */ +summary_format(new, stats, arc_names); +line_update(arc_buffer, new, x_arc, y_arc); +} + + +/* * *_swap(stats) - print "Swap: " followed by the swap summary string * * Assumptions: cursor is on "lastline" Modified: stable/8/contrib/top/layout.h == --- stable/8/contrib/top/layout.h Mon Aug 27 19:55:19 2012 (r239750) +++ stable/8/contrib/top/layout.h Mon Aug 27 19:55:31 2012 (r239751) @@ -19,6 +19,8 @@ extern int x_brkdn; /* 15 */ extern int y_brkdn; /* 1 */ extern int x_mem; /* 5 */ extern int y_mem; /* 3 */ +extern int x_arc; /* 5 */ +extern int y_arc; /* 4 */ extern int x_swap;/* 6 */ extern int y_swap;/* 4 */ extern int y_message; /* 5 */ Modified: stable/8/contrib/top/machine.h == --- stable/8/contrib/top/machine.h Mon Aug 27 19:55:19 2012 (r239750) +++ stable/8/contrib/top/machine.h Mon Aug 27 19:55:31 2012 (r239751) @@ -16,6 +16,7 @@ struct statics char **procstate_names; char **cpustate_names; char **memory_names; +char **arc_names; char **swap_names; #ifdef ORDER char **order_names; @@ -42,6 +43,7 @@ struct system_info int*procstates; int*cpustates; int*memory; +int*arc; int*swap; struct timeval boottime; intncpus; Modified: stable/8/contrib/top/top.c == --- stable/8/contrib/top/top.c Mon Aug 27 19:55:19 2012(r239750) +++ stable/8/contrib/top/top.c Mon Aug 27 19:55:31 2012(r239751) @@ -121,6 +121,8 @@ int i_cpustates(); int u_cpustates(); int i_memory(); int u_memory(); +int i_arc(); +int u_arc(); int i_swap(); int u_swap(); int i_message(); @@ -135,6 +137,7 @@ int (*d_loadave)() = i_loadave; int (*d_procstates)() = i_procstates; int (*d_cpustates)() = i_cpustates; int (*d_memory)() = i_memory;
svn commit: r239752 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Mon Aug 27 20:03:08 2012 New Revision: 239752 URL: http://svn.freebsd.org/changeset/base/239752 Log: Fix the debugging output to correctly log CCK errors. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.cMon Aug 27 19:55:31 2012(r239751) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.cMon Aug 27 20:03:08 2012(r239752) @@ -988,7 +988,7 @@ ar5416AniPoll(struct ath_hal *ah, const params->cckTrigHigh / 1000) { HALDEBUG(ah, HAL_DEBUG_ANI, "%s: CCK err %u listenTime %u\n", __func__, -aniState->ofdmPhyErrCount, aniState->listenTime); +aniState->cckPhyErrCount, aniState->listenTime); ar5416AniCckErrTrigger(ah); ar5416AniRestart(ah, aniState); } ___ 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: r239753 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Mon Aug 27 20:10:38 2012 New Revision: 239753 URL: http://svn.freebsd.org/changeset/base/239753 Log: Ensure that all firstep values are available in ANI. The comparison assumes maxFirstepLevel is a count, rather than a maximum value. The array is 3 entries in size however 'maxFirstepLevel' is 2. This bug also exists in the AR5212 HAL. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.cMon Aug 27 20:03:08 2012(r239752) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.cMon Aug 27 20:10:38 2012(r239753) @@ -422,7 +422,7 @@ ar5416AniOfdmErrTrigger(struct ath_hal * * If weak sig detect is already off, as last resort, * raise firstep level */ - if (aniState->firstepLevel+1 < params->maxFirstepLevel) { + if (aniState->firstepLevel < params->maxFirstepLevel) { if (ar5416AniControl(ah, HAL_ANI_FIRSTEP_LEVEL, aniState->firstepLevel + 1)) return; @@ -436,7 +436,7 @@ ar5416AniOfdmErrTrigger(struct ath_hal * ar5416AniControl(ah, HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION, AH_TRUE); - if (aniState->firstepLevel+1 < params->maxFirstepLevel) + if (aniState->firstepLevel < params->maxFirstepLevel) if (ar5416AniControl(ah, HAL_ANI_FIRSTEP_LEVEL, aniState->firstepLevel + 1)) return; @@ -490,7 +490,7 @@ ar5416AniCckErrTrigger(struct ath_hal *a * Beacon signal in mid and high range, * raise firstep level. */ - if (aniState->firstepLevel+1 < params->maxFirstepLevel) + if (aniState->firstepLevel < params->maxFirstepLevel) ar5416AniControl(ah, HAL_ANI_FIRSTEP_LEVEL, aniState->firstepLevel + 1); } else { @@ -954,6 +954,8 @@ ar5416AniPoll(struct ath_hal *ah, const if (listenTime < 0) { ahp->ah_stats.ast_ani_lneg++; /* restart ANI period if listenTime is invalid */ + HALDEBUG(ah, HAL_DEBUG_ANI, "%s: invalid listenTime\n", + __func__); ar5416AniRestart(ah, aniState); } /* XXX beware of overflow? */ @@ -973,6 +975,8 @@ ar5416AniPoll(struct ath_hal *ah, const aniState->cckPhyErrCount <= aniState->listenTime * params->cckTrigLow/1000) ar5416AniLowerImmunity(ah); + HALDEBUG(ah, HAL_DEBUG_ANI, "%s: lower immunity\n", + __func__); ar5416AniRestart(ah, aniState); } else if (aniState->listenTime > params->period) { updateMIBStats(ah, aniState); ___ 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: r239754 - stable/9/sys/kern
Author: kib Date: Mon Aug 27 20:23:03 2012 New Revision: 239754 URL: http://svn.freebsd.org/changeset/base/239754 Log: MFC r239374: Deliver SIGSYS to the guilty thread, not to the process. Modified: stable/9/sys/kern/kern_sig.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_sig.c == --- stable/9/sys/kern/kern_sig.cMon Aug 27 20:10:38 2012 (r239753) +++ stable/9/sys/kern/kern_sig.cMon Aug 27 20:23:03 2012 (r239754) @@ -3313,7 +3313,7 @@ nosys(td, args) struct proc *p = td->td_proc; PROC_LOCK(p); - kern_psignal(p, SIGSYS); + tdsignal(td, SIGSYS); PROC_UNLOCK(p); return (ENOSYS); } ___ 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: r239755 - stable/9/sys/kern
Author: kib Date: Mon Aug 27 20:25:26 2012 New Revision: 239755 URL: http://svn.freebsd.org/changeset/base/239755 Log: MFC r239588: Provide some compat32 shims for sysctl vfs.conflist. It is required for getvfsbyname(3) operation when called from 32bit process, and getvfsbyname(3) is used by recent bsdtar import. Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c == --- stable/9/sys/kern/vfs_subr.cMon Aug 27 20:23:03 2012 (r239754) +++ stable/9/sys/kern/vfs_subr.cMon Aug 27 20:25:26 2012 (r239755) @@ -41,6 +41,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" #include "opt_ddb.h" #include "opt_watchdog.h" @@ -3110,22 +3111,50 @@ DB_SHOW_COMMAND(mount, db_show_mount) /* * Fill in a struct xvfsconf based on a struct vfsconf. */ -static void -vfsconf2x(struct vfsconf *vfsp, struct xvfsconf *xvfsp) +static int +vfsconf2x(struct sysctl_req *req, struct vfsconf *vfsp) { + struct xvfsconf xvfsp; - strcpy(xvfsp->vfc_name, vfsp->vfc_name); - xvfsp->vfc_typenum = vfsp->vfc_typenum; - xvfsp->vfc_refcount = vfsp->vfc_refcount; - xvfsp->vfc_flags = vfsp->vfc_flags; + bzero(&xvfsp, sizeof(xvfsp)); + strcpy(xvfsp.vfc_name, vfsp->vfc_name); + xvfsp.vfc_typenum = vfsp->vfc_typenum; + xvfsp.vfc_refcount = vfsp->vfc_refcount; + xvfsp.vfc_flags = vfsp->vfc_flags; /* * These are unused in userland, we keep them * to not break binary compatibility. */ - xvfsp->vfc_vfsops = NULL; - xvfsp->vfc_next = NULL; + xvfsp.vfc_vfsops = NULL; + xvfsp.vfc_next = NULL; + return (SYSCTL_OUT(req, &xvfsp, sizeof(xvfsp))); } +#ifdef COMPAT_FREEBSD32 +struct xvfsconf32 { + uint32_tvfc_vfsops; + charvfc_name[MFSNAMELEN]; + int32_t vfc_typenum; + int32_t vfc_refcount; + int32_t vfc_flags; + uint32_tvfc_next; +}; + +static int +vfsconf2x32(struct sysctl_req *req, struct vfsconf *vfsp) +{ + struct xvfsconf32 xvfsp; + + strcpy(xvfsp.vfc_name, vfsp->vfc_name); + xvfsp.vfc_typenum = vfsp->vfc_typenum; + xvfsp.vfc_refcount = vfsp->vfc_refcount; + xvfsp.vfc_flags = vfsp->vfc_flags; + xvfsp.vfc_vfsops = 0; + xvfsp.vfc_next = 0; + return (SYSCTL_OUT(req, &xvfsp, sizeof(xvfsp))); +} +#endif + /* * Top level filesystem related information gathering. */ @@ -3133,14 +3162,16 @@ static int sysctl_vfs_conflist(SYSCTL_HANDLER_ARGS) { struct vfsconf *vfsp; - struct xvfsconf xvfsp; int error; error = 0; TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { - bzero(&xvfsp, sizeof(xvfsp)); - vfsconf2x(vfsp, &xvfsp); - error = SYSCTL_OUT(req, &xvfsp, sizeof xvfsp); +#ifdef COMPAT_FREEBSD32 + if (req->flags & SCTL_MASK32) + error = vfsconf2x32(req, vfsp); + else +#endif + error = vfsconf2x(req, vfsp); if (error) break; } @@ -3160,7 +3191,6 @@ vfs_sysctl(SYSCTL_HANDLER_ARGS) int *name = (int *)arg1 - 1;/* XXX */ u_int namelen = arg2 + 1; /* XXX */ struct vfsconf *vfsp; - struct xvfsconf xvfsp; printf("WARNING: userland calling deprecated sysctl, " "please rebuild world\n"); @@ -3184,9 +3214,12 @@ vfs_sysctl(SYSCTL_HANDLER_ARGS) break; if (vfsp == NULL) return (EOPNOTSUPP); - bzero(&xvfsp, sizeof(xvfsp)); - vfsconf2x(vfsp, &xvfsp); - return (SYSCTL_OUT(req, &xvfsp, sizeof(xvfsp))); +#ifdef COMPAT_FREEBSD32 + if (req->flags & SCTL_MASK32) + return (vfsconf2x32(req, vfsp)); + else +#endif + return (vfsconf2x(req, vfsp)); } return (EOPNOTSUPP); } ___ 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: r239756 - head/sys/dev/ath/ath_rate/sample
Author: adrian Date: Mon Aug 27 20:30:07 2012 New Revision: 239756 URL: http://svn.freebsd.org/changeset/base/239756 Log: Improve the sample rate logging. Modified: head/sys/dev/ath/ath_rate/sample/sample.c Modified: head/sys/dev/ath/ath_rate/sample/sample.c == --- head/sys/dev/ath/ath_rate/sample/sample.c Mon Aug 27 20:25:26 2012 (r239755) +++ head/sys/dev/ath/ath_rate/sample/sample.c Mon Aug 27 20:30:07 2012 (r239756) @@ -929,7 +929,7 @@ ath_rate_tx_complete(struct ath_softc *s * Only one rate was used; optimize work. */ IEEE80211_NOTE(an->an_node.ni_vap, IEEE80211_MSG_RATECTL, -&an->an_node, "%s: size %d (%d bytes) %s rate/try %d %s/%d/%d nframes/nbad [%d/%d]", +&an->an_node, "%s: size %d (%d bytes) %s rate/short/long %d %s/%d/%d nframes/nbad [%d/%d]", __func__, bin_to_size(size_to_bin(frame_size)), frame_size, @@ -961,11 +961,12 @@ ath_rate_tx_complete(struct ath_softc *s IEEE80211_NOTE(an->an_node.ni_vap, IEEE80211_MSG_RATECTL, &an->an_node, -"%s: size %d (%d bytes) finaltsidx %d tries %d %s rate/try [%d %s/%d %d %s/%d %d %s/%d %d %s/%d] nframes/nbad [%d/%d]", +"%s: size %d (%d bytes) finaltsidx %d short %d long %d %s rate/try [%d %s/%d %d %s/%d %d %s/%d %d %s/%d] nframes/nbad [%d/%d]", __func__, bin_to_size(size_to_bin(frame_size)), frame_size, finalTSIdx, +short_tries, long_tries, status ? "FAIL" : "OK", dot11rate(rt, rc[0].rix), ___ 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: r239757 - head/sys/mips/conf
Author: adrian Date: Mon Aug 27 21:49:37 2012 New Revision: 239757 URL: http://svn.freebsd.org/changeset/base/239757 Log: Convert to using ulzma. Modified: head/sys/mips/conf/AP96 Modified: head/sys/mips/conf/AP96 == --- head/sys/mips/conf/AP96 Mon Aug 27 20:30:07 2012(r239756) +++ head/sys/mips/conf/AP96 Mon Aug 27 21:49:37 2012(r239757) @@ -25,15 +25,13 @@ options AR71XX_ENV_UBOOT optionsMSDOSFS # uncompress - to boot read-only lzma natively from flash -device geom_uzip -optionsGEOM_UZIP +device geom_uncompress +optionsGEOM_UNCOMPRESS +optionsROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\" # Used for the static uboot partition map device geom_map -# Boot off of the rootfs, as defined in the geom_map setup. -options ROOTDEVNAME=\"ufs:map/rootfs.uzip\" - # Options needed for the EEPROM based calibration/PCI configuration data. optionsAR71XX_ATH_EEPROM # Fetch EEPROM/PCI config from flash optionsATH_EEPROM_FIRMWARE # Use EEPROM from flash ___ 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: r239758 - head/sys/mips/conf
Author: adrian Date: Mon Aug 27 21:53:01 2012 New Revision: 239758 URL: http://svn.freebsd.org/changeset/base/239758 Log: Slim down the default AR724X build. The AR724X boards tend to come with minimal RAM/flash. Modified: head/sys/mips/conf/AR724X_BASE Modified: head/sys/mips/conf/AR724X_BASE == --- head/sys/mips/conf/AR724X_BASE Mon Aug 27 21:49:37 2012 (r239757) +++ head/sys/mips/conf/AR724X_BASE Mon Aug 27 21:53:01 2012 (r239758) @@ -1,8 +1,9 @@ # # AR724X -- Kernel configuration file for FreeBSD/MIPS for Atheros 724x systems # -# This includes all the common drivers for the AR724x boards along with -# the usb, net80211 and atheros driver code. +# This includes all the common drivers for the AR724x boards. +# Since the AR724x boards tend to have minimal flash (sometimes 4MB!), +# the majority of the kernel framework will be built as modules. # # $FreeBSD$ # @@ -24,21 +25,19 @@ makeoptions DEBUG=-g#Build kernel with # Build these as modules so small platform builds will have the # modules already built. -makeoptionsMODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci" +makeoptionsMODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci hwpmc" optionsDDB optionsKDB optionsSCHED_4BSD #4BSD scheduler optionsINET#InterNETworking -optionsINET6 # IPv6 - -# options NFS_CL #Network Filesystem Client - +#options INET6 # IPv6 +#options NFS_CL #Network Filesystem Client optionsPSEUDOFS#Pseudo-filesystem framework options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -# options NFS_LEGACYRPC +#options NFS_LEGACYRPC # Debugging for use in -current optionsINVARIANTS optionsINVARIANT_SUPPORT @@ -47,6 +46,10 @@ options WITNESS_SKIPSPIN optionsDEBUG_REDZONE optionsDEBUG_MEMGUARD +# Don't include the SCSI/CAM strings in the default build +optionsSCSI_NO_SENSE_STRINGS +optionsSCSI_NO_OP_STRINGS + options FFS #Berkeley Fast Filesystem # options SOFTUPDATES #Enable FFS soft updates support # options UFS_ACL #Support for access control lists @@ -60,27 +63,27 @@ device ar724x_pci optionsIEEE80211_DEBUG optionsIEEE80211_ALQ optionsIEEE80211_SUPPORT_MESH -# This option is currently broken for if_ath_tx. +optionsIEEE80211_SUPPORT_SUPERG optionsIEEE80211_SUPPORT_TDMA optionsIEEE80211_AMPDU_AGE -device wlan# 802.11 support -device wlan_wep# 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_xauth # 802.11 hostap support +#devicewlan# 802.11 support +#devicewlan_wep# 802.11 WEP support +#devicewlan_ccmp # 802.11 CCMP support +#devicewlan_tkip # 802.11 TKIP support +#devicewlan_xauth # 802.11 hostap support # Atheros wireless NICs -device ath # Atheros interface support -device ath_pci # Atheros PCI/Cardbus bus +#deviceath # Atheros interface support +#deviceath_pci # Atheros PCI/Cardbus bus optionsATH_DEBUG optionsATH_DIAGAPI optionsATH_ENABLE_11N optionsAH_DEBUG optionsAH_DEBUG_ALQ optionsALQ -device ath_hal +#deviceath_hal option AH_SUPPORT_AR5416 -device ath_rate_sample +#deviceath_rate_sample option AH_RXCFG_SDMAMW_4BYTES option AH_AR5416_INTERRUPT_MITIGATION # There's no DFS radar detection support yet so this won't actually @@ -90,15 +93,16 @@ option ATH_ENABLE_DFS device mii device arge +optionsARGE_DEBUG # Enable if_arge debugging for now -device usb +#deviceusb optionsUSB_EHCI_BIG_ENDIAN_DESC# handle big-endian byte order optionsUSB_DEBUG optionsUSB_HOST_ALIGN=32 # AR724X (MIPS in general?) requires this -device ehci +#devic
svn commit: r239759 - head/sys/mips/conf
Author: adrian Date: Mon Aug 27 21:59:52 2012 New Revision: 239759 URL: http://svn.freebsd.org/changeset/base/239759 Log: Convert AP93 to use the new AR724X_BASE configuration file. Modified: head/sys/mips/conf/AP93 head/sys/mips/conf/AP93.hints Modified: head/sys/mips/conf/AP93 == --- head/sys/mips/conf/AP93 Mon Aug 27 21:53:01 2012(r239758) +++ head/sys/mips/conf/AP93 Mon Aug 27 21:59:52 2012(r239759) @@ -1,136 +1,44 @@ # -# AP93 -- Kernel configuration file for FreeBSD/mips for Atheros AP93 reference -# board (AR7240) +# Specific board setup for the Atheros AP91 reference board. # -# $FreeBSD$ +# The AP93 has the following hardware: # +# + AR7240 CPU SoC +# + AR9280 Wifi +# + Integrated switch (XXX speed?) +# + 16MB flash +# + 64MB RAM +# + uboot environment -ident AP93 +# $FreeBSD$ -# XXX The default load address in the Uboot environment is 0x8001 -makeoptionsKERNLOADADDR=0x8005 -optionsHZ=1000 +include"AR724X_BASE" +ident "AP93" +hints "AP93.hints" -# The AP93 has 64mb of RAM; hard-code that optionsAR71XX_REALMEM=64*1024*1024 -# It's UBOOT, not Redboot - without this, things will hang at startup optionsAR71XX_ENV_UBOOT -makeoptionsMODULES_OVERRIDE="ath ath_pci ath_ahb bridgestp if_bridge if_gif if_gre random wlan wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt wlan_tkip wlan_wep wlan_xauth usb ar71xx" - -hints "AP93.hints" -include"../atheros/std.ar71xx" - -makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols -makeoptionsMODULES_OVERRIDE="" +# For DOS - enable if required +optionsMSDOSFS -optionsDDB -optionsKDB - -optionsSCHED_4BSD #4BSD scheduler -optionsINET#InterNETworking -# Can't do IPv6 - it just doesn't fit. -# options INET6 -# options NFSCL #Network Filesystem Client -optionsPSEUDOFS#Pseudo-filesystem framework -options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -optionsALQ - -# Debugging for use in -current -optionsDEADLKRES -optionsINVARIANTS -optionsINVARIANT_SUPPORT -optionsWITNESS -optionsWITNESS_SKIPSPIN -options FFS #Berkeley Fast Filesystem - -# Support uncompress lzma rootfs +# uncompress - to boot read-only lzma natively from flash device geom_uncompress optionsGEOM_UNCOMPRESS optionsROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\" -# PCI bus -device pci -device ar724x_pci -# Enable the AR71xx EEPROM PCI(e) workaround -optionsAR71XX_ATH_EEPROM - -# NVRAM U-Boot Environment -> Kernel environment -device nvram2env - -# Wireless NIC cards -optionsIEEE80211_DEBUG -optionsIEEE80211_SUPPORT_MESH -optionsIEEE80211_SUPPORT_TDMA -optionsIEEE80211_ALQ - -device wlan# 802.11 support -device wlan_wep# 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_xauth # 802.11 hostap support - -device ath # Atheros pci/cardbus NIC's -device ath_pci # PCI/PCIe bus glue -optionsATH_DEBUG -optionsATH_ENABLE_11N -optionsATH_DIAGAPI -device firmware -optionsATH_EEPROM_FIRMWARE - -device ath_hal -optionsAH_SUPPORT_AR5416 -optionsAH_DEBUG -optionsAH_DEBUG_ALQ - -device ath_rate_sample - -device mii -device arge -device miiproxy -optionsARGE_DEBUG -optionsARGE_MDIO -device etherswitch -device arswitch +# Used for the static uboot partition map +device geom_map -# USB devices - (todo: does AR7240 have OHCI, or just EHCI?) +# Options needed for the EEPROM based calibration/PCI configuration data. +optionsAR71XX_ATH_EEPROM # Fetch EEPROM/PCI config from flash +optionsATH_EEPROM_FIRMWARE # Use EEPROM from flash +device firmware# Used by the above + +# Options required for miiproxy and mdiobus +optionsARGE_MDIO # Export an MDIO bus separate from arge +device miiproxy# MDIO bus <-> MII PHY rendezvous -#deviceusb -optionsUSB_EHCI_BIG_ENDIAN_DESC# handle big-endian byte order -optionsUSB_DEBUG -optionsUSB_HOS
svn commit: r239760 - head/sys/dev/wtap
Author: adrian Date: Mon Aug 27 23:18:41 2012 New Revision: 239760 URL: http://svn.freebsd.org/changeset/base/239760 Log: Don't grab an unreferenced pointer to the VAP bss node. Modified: head/sys/dev/wtap/if_wtap.c Modified: head/sys/dev/wtap/if_wtap.c == --- head/sys/dev/wtap/if_wtap.c Mon Aug 27 21:59:52 2012(r239759) +++ head/sys/dev/wtap/if_wtap.c Mon Aug 27 23:18:41 2012(r239760) @@ -268,7 +268,7 @@ wtap_newstate(struct ieee80211vap *vap, DWTAP_PRINTF("%s\n", __func__); - ni = vap->iv_bss; + ni = ieee80211_ref_node(vap->iv_bss); /* * Invoke the parent method to do net80211 work. */ @@ -278,7 +278,8 @@ wtap_newstate(struct ieee80211vap *vap, if (nstate == IEEE80211_S_RUN) { /* NB: collect bss node again, it may have changed */ - ni = vap->iv_bss; + ieee80211_free_node(ni); + ni = ieee80211_ref_node(vap->iv_bss); switch (vap->iv_opmode) { case IEEE80211_M_MBSS: error = wtap_beacon_alloc(sc, ni); @@ -294,9 +295,11 @@ wtap_newstate(struct ieee80211vap *vap, } else if (nstate == IEEE80211_S_INIT) { callout_stop(&avp->av_swba); } + ieee80211_free_node(ni); return 0; bad: printf("%s: bad\n", __func__); + ieee80211_free_node(ni); return error; } @@ -319,6 +322,7 @@ wtap_vap_create(struct ieee80211com *ic, struct ieee80211vap *vap; struct wtap_vap *avp; int error; + struct ieee80211_node *ni; DWTAP_PRINTF("%s\n", __func__); @@ -347,7 +351,9 @@ wtap_vap_create(struct ieee80211com *ic, (const char *)ic->ic_ifp->if_xname); /* TODO this is a hack to force it to choose the rate we want */ - vap->iv_bss->ni_txrate = 130; + ni = ieee80211_ref_node(vap->iv_bss); + ni->ni_txrate = 130; + ieee80211_free_node(ni); return vap; } ___ 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: r239761 - head/sys/dev/ath
Author: adrian Date: Mon Aug 27 23:27:41 2012 New Revision: 239761 URL: http://svn.freebsd.org/changeset/base/239761 Log: Only print the descriptor contents! Found by: magical CLANG build environments Submitted by: Sevan Modified: head/sys/dev/ath/if_ath_debug.c Modified: head/sys/dev/ath/if_ath_debug.c == --- head/sys/dev/ath/if_ath_debug.c Mon Aug 27 23:18:41 2012 (r239760) +++ head/sys/dev/ath/if_ath_debug.c Mon Aug 27 23:27:41 2012 (r239761) @@ -178,10 +178,10 @@ ath_printtxbuf_edma(struct ath_softc *sc eds->ds_hw[8], eds->ds_hw[9], eds->ds_hw[10], eds->ds_hw[11], eds->ds_hw[12], eds->ds_hw[13]); - printf("%08x %08x %08x %08x %08x %08x %08x %08x\n", + printf("%08x %08x %08x %08x %08x %08x %08x\n", eds->ds_hw[14], eds->ds_hw[15], eds->ds_hw[16], eds->ds_hw[17], eds->ds_hw[18], eds->ds_hw[19], - eds->ds_hw[20], eds->ds_hw[21]); + eds->ds_hw[20]); #if 0 printf("%08x %08x %08x %08x %08x %08x %08x %08x\n", ds->ds_hw[22],ds->ds_hw[23],ds->ds_hw[24], ___ 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: r239762 - head/sys/arm/at91
Author: imp Date: Tue Aug 28 01:28:52 2012 New Revision: 239762 URL: http://svn.freebsd.org/changeset/base/239762 Log: Bring in the multi-block patches for mci. These required extensive restructuring of the driver. I've tried to preserve the other silicon workarounds that we've added over the years, but haven't had a chance to extensively test on other hardware. On my AT91RM9200 with 30MHz/1 wire/64 block transfers, I've been able to go from ~.66MB/s to 2.25MB/s in the simple tests I performed, almost a 3.5x improvement. This cuts the boot time almost in half when everything else goes right (timed from rtc message to login: prompt). PR: 155214 Submitted by: Ian Lapore Modified: head/sys/arm/at91/at91_mci.c Modified: head/sys/arm/at91/at91_mci.c == --- head/sys/arm/at91/at91_mci.cMon Aug 27 23:27:41 2012 (r239761) +++ head/sys/arm/at91/at91_mci.cTue Aug 28 01:28:52 2012 (r239762) @@ -114,7 +114,24 @@ __FBSDID("$FreeBSD$"); #define AT91_MCI_USE_30MHZ 1 #endif -#define BBSZ 512 +/* + * Allocate 2 bounce buffers we'll use to endian-swap the data due to the rm9200 + * erratum. We use a pair of buffers because when reading that lets us begin + * endian-swapping the data in the first buffer while the DMA is reading into + * the second buffer. (We can't use the same trick for writing because we might + * not get all the data in the 2nd buffer swapped before the hardware needs it; + * dealing with that would add complexity to the driver.) + * + * The buffers are sized at 16K each due to the way the busdma cache sync + * operations work on arm. A dcache_inv_range() operation on a range larger + * than 16K gets turned into a dcache_wbinv_all(). That needlessly flushes the + * entire data cache, impacting overall system performance. + */ +#define BBCOUNT 2 +#define BBSIZE (16*1024) +#define MAX_BLOCKS ((BBSIZE*BBCOUNT)/512) + +static int mci_debug; struct at91_mci_softc { void *intrhand; /* Interrupt handle */ @@ -123,21 +140,25 @@ struct at91_mci_softc { #defineCAP_HAS_4WIRE 1 /* Has 4 wire bus */ #defineCAP_NEEDS_BYTESWAP 2 /* broken hardware needing bounce */ int flags; -#define CMD_STARTED1 -#define STOP_STARTED 2 +#define PENDING_CMD0x01 +#define PENDING_STOP 0x02 +#define CMD_MULTIREAD 0x10 +#define CMD_MULTIWRITE 0x20 int has_4wire; int use_30mhz; struct resource *irq_res; /* IRQ resource */ struct resource *mem_res; /* Memory resource */ struct mtx sc_mtx; bus_dma_tag_t dmatag; - bus_dmamap_t map; - int mapped; struct mmc_host host; int bus_busy; struct mmc_request *req; struct mmc_command *curcmd; - char bounce_buffer[BBSZ]; + bus_dmamap_t bbuf_map[BBCOUNT]; + char * bbuf_vaddr[BBCOUNT]; /* bounce bufs in KVA space */ + uint32_t bbuf_len[BBCOUNT]; /* len currently queued for bounce buf */ + uint32_t bbuf_curidx; /* which bbuf is the active DMA buffer */ + uint32_t xfer_offset; /* offset so far into caller's buf */ }; static inline uint32_t @@ -172,6 +193,51 @@ static int at91_mci_is_mci1rev2xx(void); #define AT91_MCI_ASSERT_LOCKED(_sc)mtx_assert(&_sc->sc_mtx, MA_OWNED); #define AT91_MCI_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +static void +at91_bswap_buf(struct at91_mci_softc *sc, void * dptr, void * sptr, uint32_t memsize) +{ + uint32_t * dst = (uint32_t *)dptr; + uint32_t * src = (uint32_t *)sptr; + uint32_t i; + + /* +* If the hardware doesn't need byte-swapping, let bcopy() do the +* work. Use bounce buffer even if we don't need byteswap, since +* buffer may straddle a page boundry, and we don't handle +* multi-segment transfers in hardware. Seen from 'bsdlabel -w' which +* uses raw geom access to the volume. Greg Ansley (gja (at) +* ansley.com) +*/ + if (!(sc->sc_cap & CAP_NEEDS_BYTESWAP)) { + bcopy(dptr, sptr, memsize); + return; + } + + /* +* Nice performance boost for slightly unrolling this loop. +* (But very little extra boost for further unrolling it.) +*/ + for (i = 0; i < memsize; i += 16) { + *dst++ = bswap32(*src++); + *dst++ = bswap32(*src++); + *dst++ = bswap32(*src++); + *dst++ = bswap32(*src++); + } + + /* Mop up the last 1-3 words, if any. */ + for (i = 0; i < (memsize & 0x0F); i += 4) { + *dst++ = bswap32(*src++); + } +} + +static void +at91_mci_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + if (error != 0) + return; + *(
svn commit: r239763 - head/sys/arm/at91
Author: imp Date: Tue Aug 28 03:27:48 2012 New Revision: 239763 URL: http://svn.freebsd.org/changeset/base/239763 Log: Style: Move these routines to be before the forward declared functions as is the normal practice. Modified: head/sys/arm/at91/at91_mci.c Modified: head/sys/arm/at91/at91_mci.c == --- head/sys/arm/at91/at91_mci.cTue Aug 28 01:28:52 2012 (r239762) +++ head/sys/arm/at91/at91_mci.cTue Aug 28 03:27:48 2012 (r239763) @@ -161,18 +161,6 @@ struct at91_mci_softc { uint32_t xfer_offset; /* offset so far into caller's buf */ }; -static inline uint32_t -RD4(struct at91_mci_softc *sc, bus_size_t off) -{ - return (bus_read_4(sc->mem_res, off)); -} - -static inline void -WR4(struct at91_mci_softc *sc, bus_size_t off, uint32_t val) -{ - bus_write_4(sc->mem_res, off, val); -} - /* bus entry points */ static int at91_mci_probe(device_t dev); static int at91_mci_attach(device_t dev); @@ -193,6 +181,18 @@ static int at91_mci_is_mci1rev2xx(void); #define AT91_MCI_ASSERT_LOCKED(_sc)mtx_assert(&_sc->sc_mtx, MA_OWNED); #define AT91_MCI_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +static inline uint32_t +RD4(struct at91_mci_softc *sc, bus_size_t off) +{ + return (bus_read_4(sc->mem_res, off)); +} + +static inline void +WR4(struct at91_mci_softc *sc, bus_size_t off, uint32_t val) +{ + bus_write_4(sc->mem_res, off, val); +} + static void at91_bswap_buf(struct at91_mci_softc *sc, void * dptr, void * sptr, uint32_t memsize) { ___ 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: r239764 - head/sys/arm/at91
Author: imp Date: Tue Aug 28 03:46:31 2012 New Revision: 239764 URL: http://svn.freebsd.org/changeset/base/239764 Log: Move to using a flag instead of checking the CPU type each transaction for the MCI1 rev 2.x write workarounds. Modified: head/sys/arm/at91/at91_mci.c Modified: head/sys/arm/at91/at91_mci.c == --- head/sys/arm/at91/at91_mci.cTue Aug 28 03:27:48 2012 (r239763) +++ head/sys/arm/at91/at91_mci.cTue Aug 28 03:46:31 2012 (r239764) @@ -139,6 +139,7 @@ struct at91_mci_softc { int sc_cap; #defineCAP_HAS_4WIRE 1 /* Has 4 wire bus */ #defineCAP_NEEDS_BYTESWAP 2 /* broken hardware needing bounce */ +#defineCAP_MCI1_REV2XX 4 /* MCI 1 rev 2.x */ int flags; #define PENDING_CMD0x01 #define PENDING_STOP 0x02 @@ -307,7 +308,7 @@ at91_mci_init(device_t dev) WR4(sc, MCI_DTOR, MCI_DTOR_DTOMUL_1M | 1); val = MCI_MR_PDCMODE; val |= 0x34a; /* PWSDIV = 3; CLKDIV = 74 */ - if (at91_mci_is_mci1rev2xx()) + if (sc->sc_cap & CAP_MCI1_REV2XX) val |= MCI_MR_RDPROOF | MCI_MR_WRPROOF; WR4(sc, MCI_MR, val); #ifndef AT91_MCI_SLOT_B @@ -407,6 +408,12 @@ at91_mci_attach(device_t dev) } /* +* MCI1 Rev 2 controllers need some workarounds, flag if so. +*/ + if (at91_mci_is_mci1rev2xx()) + sc->sc_cap |= CAP_MCI1_REV2XX; + + /* * Allow 4-wire to be initially set via #define. * Allow a device hint to override that. * Allow a sysctl to override that. @@ -767,7 +774,7 @@ at91_mci_start_cmd(struct at91_mci_softc * a work-around for the "Data Write Operation and * number of bytes" erratum. */ - if (at91_mci_is_mci1rev2xx() && data->len < 12) { + if ((sc->sc_cap & CAP_MCI1_REV2XX) && data->len < 12) { len = 12; memset(data->data, 0, 12); } ___ 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: r239765 - head/sys/mips/conf
Author: adrian Date: Tue Aug 28 06:17:44 2012 New Revision: 239765 URL: http://svn.freebsd.org/changeset/base/239765 Log: This is an initial board configuration for the D-Link DIR-825 dual-band 802.11n router. The flash layout defaults to a 1 MiB section for the kernel so I'm trying very hard to squeeze a minimialistic (LZMA compressde) kernel image into that. I've verified that it boots through to single user mode fine. Issues: * USB doesn't yet work as a module - I need to add something else to the USB AR71xx build before that will work. * There's no switch PHY support - but for now it quite happily behaves as a useful dumb switch out of the box. Phew. * Since a previous flash attempt trashed my radio configuration block, I haven't yet verified whether the wireless works correctly. I'll test that out shortly (read: once I re-calibrate the board somehow.) Thanks to ray@ and the zrouter project for doing some of the initial hard work in figuring out how to bring this board up. Added: head/sys/mips/conf/DIR-825 (contents, props changed) head/sys/mips/conf/DIR-825.hints (contents, props changed) Added: head/sys/mips/conf/DIR-825 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/DIR-825 Tue Aug 28 06:17:44 2012(r239765) @@ -0,0 +1,68 @@ +# +# Specific board setup for the D-Link DIR-825 router. +# +# The DIR-825 has the following hardware: +# +# + AR7161 CPU SoC +# + AR9223 2.4GHz 11n +# + AR9220 5GHz 11n +# + RealTek RTL8366S Gigabit switch +# + m25p64 based 8MB flash +# + 64MB RAM +# + uboot environment + +# $FreeBSD$ + +include"AR71XX_BASE" +ident "DIR-825" +hints "DIR-825.hints" + +# Since the kernel image must fit inside 1024KiB, we have to build almost +# everything as modules. +nodevice random +nodevice gpio +nodevice gpioled +nodevice gif +nodevice gre +nodevice bridge +nodevice usb +nodevice ehci +nodevice wlan +nodevice wlan_xauth +nodevice wlan_acl +nodevice wlan_wep +nodevice wlan_tkip +nodevice wlan_ccmp +nodevice wlan_rssadapt +nodevice wlan_amrr +nodevice ath +nodevice ath_pci +nodevice ath_hal +nodevice umass +nodevice ath_rate_sample + +nooptions INET6 + +# Don't include the SCSI/CAM strings in the default build +optionsSCSI_NO_SENSE_STRINGS +optionsSCSI_NO_OP_STRINGS + +# .. And no sysctl strings +optionsNO_SYSCTL_DESCR + +# GEOM modules +device geom_map# to get access to the SPI flash partitions +device geom_uncompress # compressed in-memory filesystem hackery! +optionsGEOM_UNCOMPRESS + +optionsROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\" +optionsAR71XX_REALMEM=64*1024*1024 + +optionsAR71XX_ENV_UBOOT + +# options MD_ROOT +# options MD_ROOT_SIZE="6144" + +optionsAR71XX_ATH_EEPROM # Fetch EEPROM/PCI config from flash +optionsATH_EEPROM_FIRMWARE # Use EEPROM from flash +device firmware# Used by the above Added: head/sys/mips/conf/DIR-825.hints == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/DIR-825.hintsTue Aug 28 06:17:44 2012 (r239765) @@ -0,0 +1,67 @@ +# $FreeBSD$ + +# arge0 is connected to the LAN side of the switch PHY. +# arge1 is connected to the single port WAN side of the switch PHY. + +hint.arge.0.phymask=0x0 +hint.arge.0.media=1000 +hint.arge.0.fduplex=1 + +# XXX grab these from uboot? +# hint.arge.0.eeprommac=0x1f01fc00 + +hint.arge.1.phymask=0x0 +hint.arge.1.media=1000 +hint.arge.1.fduplex=1 + +# ath0 - slot 17 +hint.pcib.0.bus.0.17.0.ath_fixup_addr=0x1fff1000 +hint.pcib.0.bus.0.17.0.ath_fixup_size=4096 + +# ath1 - slot 18 +hint.pcib.0.bus.0.18.0.ath_fixup_addr=0x1fff5000 +hint.pcib.0.bus.0.18.0.ath_fixup_size=4096 + +# .. and now, telling each ath(4) NIC where to find the firmware +# image. +hint.ath.0.eeprom_firmware="pcib.0.bus.0.17.0.eeprom_firmware" +hint.ath.1.eeprom_firmware="pcib.0.bus.0.18.0.eeprom_firmware" + +# TODO: gpio LEDs + +# Geom MAP + +# mtdparts=ar7100-nor0:256k(uboot),64k(Config),1024k(vmlinux),5184k(rootfs),64k(caldata) + +hint.map.0.at="flash/spi0" +hint.map.0.start=0x +hint.map.0.end=0x4 +hint.map.0.name="uboot" +hint.map.0.readonly=1 + +# This config partition is the D-Link specific configuration area. +# I'm re-purposing it for FreeBSD. +hint.map.1.at="flash/spi0" +hint.map.1.start=0x0004 +hint.map.1.end=0x0005 +hint.map.1.name="cfg" +hint.map.1.readonly=1 + +hint.map.2.at="flash/spi0" +hint.map.2.start=0x005 +hint.map.2.end=0x0015 +hint.map.2.name="kernel" +hint.map.2.readonly=1 + +hint.map.3.at="flash/spi0" +hint.map.3.start=0x0015 +hint.map.3.end=0x
svn commit: r239766 - stable/9/usr.bin/clang/clang
Author: dim Date: Tue Aug 28 06:47:21 2012 New Revision: 239766 URL: http://svn.freebsd.org/changeset/base/239766 Log: MFC r239509: Support the WITH_SHARED_TOOLCHAIN setting that was introduced in r234782 for the clang executable. Build it statically by default, like the gcc executables, which should improve performance a little bit. Modified: stable/9/usr.bin/clang/clang/Makefile Directory Properties: stable/9/usr.bin/clang/ (props changed) Modified: stable/9/usr.bin/clang/clang/Makefile == --- stable/9/usr.bin/clang/clang/Makefile Tue Aug 28 06:17:44 2012 (r239765) +++ stable/9/usr.bin/clang/clang/Makefile Tue Aug 28 06:47:21 2012 (r239766) @@ -9,6 +9,10 @@ SRCS= cc1_main.cpp \ cc1as_main.cpp \ driver.cpp +.if ${MK_SHARED_TOOLCHAIN} == "no" +NO_SHARED?= yes +.endif + LINKS= ${BINDIR}/clang ${BINDIR}/clang++ \ ${BINDIR}/clang ${BINDIR}/clang-cpp MLINKS=clang.1 clang++.1 \ ___ 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: r239767 - stable/9/usr.bin/clang
Author: dim Date: Tue Aug 28 06:49:33 2012 New Revision: 239767 URL: http://svn.freebsd.org/changeset/base/239767 Log: MFC r239513: When WITH_CLANG_EXTRAS is enabled, avoid needlessly building the llvm and clang extras in the cross-tools stage. Modified: stable/9/usr.bin/clang/Makefile Directory Properties: stable/9/usr.bin/clang/ (props changed) Modified: stable/9/usr.bin/clang/Makefile == --- stable/9/usr.bin/clang/Makefile Tue Aug 28 06:47:21 2012 (r239766) +++ stable/9/usr.bin/clang/Makefile Tue Aug 28 06:49:33 2012 (r239767) @@ -4,7 +4,7 @@ SUBDIR=clang clang-tblgen tblgen -.if ${MK_CLANG_EXTRAS} != "no" +.if ${MK_CLANG_EXTRAS} != "no" && !defined(TOOLS_PREFIX) SUBDIR+=bugpoint \ llc \ lli \ ___ 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: r239768 - head/sys/mips/conf
Author: adrian Date: Tue Aug 28 06:52:00 2012 New Revision: 239768 URL: http://svn.freebsd.org/changeset/base/239768 Log: oops, make cfg read-write. Modified: head/sys/mips/conf/DIR-825.hints Modified: head/sys/mips/conf/DIR-825.hints == --- head/sys/mips/conf/DIR-825.hintsTue Aug 28 06:49:33 2012 (r239767) +++ head/sys/mips/conf/DIR-825.hintsTue Aug 28 06:52:00 2012 (r239768) @@ -45,7 +45,7 @@ hint.map.1.at="flash/spi0" hint.map.1.start=0x0004 hint.map.1.end=0x0005 hint.map.1.name="cfg" -hint.map.1.readonly=1 +hint.map.1.readonly=0 hint.map.2.at="flash/spi0" hint.map.2.start=0x005 ___ 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"