ƒµZ237683 163 5495 123 126 158 157 208 531 106 121 128 161 153 162 128 218 177 341 147 147 139 235 204 111 146 146 269 269 269 161 562 560 229 183 242 573 325 231 231 176 176 164 325 355 241 242 242 135 211 413 413 148 219 178 213 629 384 384 230 182 186 166 156 107 283 283 769 127 150 114 146 200 146 178 178 148 148 149 149 181 181 149 149 189 189 172 172 155 155 178 178 241 803 417 318 382 416 263 417 351 208 212 131 140 110 492 206 174 174 154 230 354 151 176 430 906 906 153 306 361 235 445 445 470 470 256 466 209 209 115 275 387 201 394 394 502 207 193 159 387 791 791 1066 1443 2418 2893 1148 158 196 252 201 146 184 153 134 182 182 173 173 164 345 347 305 147 K 10 svn:author V 3 ken K 8 svn:date V 27 2012-06-28T03:48:54.516188Z K 7 svn:log V 5401 Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version 14.00.00.01-fbsd. Their description of the changes is as follows: 1. Copyright contents has been changed in all respective .c and .h files 2. Support for WRITE12 and READ12 for direct-io (warpdrive only) has been added. 3. Driver has added checks to see if Drive has READ_CAP_16 support before sending it down to the device. If SPC3_SID_PROTECT flag is set in the inquiry data, the device supports protection information, and must support the 16 byte read capacity command, otherwise continue without sending read cap 16. This will optimize driver performance, since it will not send READ_CAP_16 to the drive which does not have support of READ_CAP_16. 4. With new approach, "MPTIOCTL_RESET_ADAPTER" IOCTL will not use DELAY() which is busy loop implementation. It will use (Better way to sleep without busy loop). Also from the HBA reset code path and some other places, DELAY() is replaced with msleep() or "pause()", which is based on sleep/wakeup style calls. Driver use msleep()/pause() instead of DELAY based on CAN_SLEEP/NO_SLEEP flags to avoid busy loop which is not required all the time.e.a a. While driver is getting loaded, driver calls most of the commands with NO_SLEEP. b. When Driver is functional and it needs Reinit of HBA, CAN_SLEEP flag is used. 5. driver is not Endian safe. It will not work on Big Endian machines like Sparc and PowerPC platforms because it assumes it is running on a Little Endian machine. Driver code is modified such way that it does not assume CPU arch is Little Endian. a. All places where Driver interacts from HBA to Host, it converts Little Endian format to CPU format. b. All places where Driver interacts from Host to HBA, it converts CPU format to Little Endian. 6. Findout memory leaks in FreeBSD Driver and resolve those, such as memory leak in targ's luns creation/deletion. Also added additional checks to see memory allocation success/fail. 7. Add loginfo prints as debug message, i.e. When FW sends any loginfo, Driver should print those as debug message. This will help for debugging purpose. 8. There is possibility to get config request timeout. Current driver is able to detect config request timetout, but it does not do anything on config_request timeout. Driver should call mps_reinit() if any request_poll (which is called as part of config_request) is time out. 9. cdb length check is required for 32 byte CDB. Add correct mpi control value for 32 bit CDB as below while submitting SCSI IO Request to controller. mpi_control |= 4 << MPI2_SCSIIO_CONTROL_ADDCDBLEN_SHIFT; 10. Check the actual status of Message unit reset (mps_message_unit_reset).Previously FreeBSD Driver just writes MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET and never check the ack (it just wait for 50 millisecond). So, Driver now check the status of "MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET" after writing it to the FW. Now it also checking for whether doorbell ack uses msleep with proper sleep flags, instead of . 11. Previously CAM does not detect Multi-Lun Devices. In order to detect Multi-Lun Devices by CAM the driver needs following change set: a. There is "max_lun" field which Driver need to set based on hw/fw support. Currently LSI released driver does not set this field. b. Default of "max_lun" should not be 0 in OS, but it is currently set to 0 in CAM layer. c. Export max_lun capacity to 255 12. Driver will not reset target info after port enable complete and also do Device removal when Device remove from FW. The detail description is as follows a. When Driver receive WD PD add events, it will add all information in driver local data structure. b. Only for WD, we have below checks after port enable completes, where driver clear off all information retrieved at #1. if ((sc->WD_available && (sc->WD_hide_expose == MPS_WD_HIDE_ALWAYS)) || (sc->WD_valid_config && (sc->WD_hide_expose == MPS_WD_HIDE_IF_VOLUME)) { // clear off target data structure. } It is mainly not to attach PDs to OS. FreeBSD does bus rescan as older Parallel scsi style. So Driver needs to handle which Drive is visible to OS. That is a reason we have to clear off targ information for PDs. Again, above logic was implemented long time ago. Similar concept we have for non-wd also. For that, LSI have introduced different logic to hide PDs. Eventually, because of above gap, when Phy goes offline, we observe below failure. That is what Driver is not doing complete removal of device with FW. (which was pointed by Scott) Apr 5 02:39:24 Freebsd7 kernel: mpslsi0: mpssas_prepare_remove Apr 5 02:39:24 Freebsd7 kernel: mpssas_prepare_remove 497 : invalid handle 0xe Now Driver will not reset target info after port enable complete and also will do Device removal when Device remove from FW. 13. Returning "CAM_SEL_TIMEOUT" instead of "CAM_TID_INVALID" error code on request to the Target IDs that have no devices conected at that moment. As if "CAM_TID_INVALID" error code is returned to the CAM Layaer then it results in a huge chain of errors in verbose kernel messages on boot and every hot-plug event. Submitted by: Sreekanth Reddy MFC after: 3 days END K 10 svn:author V 3 alc K 8 svn:date V 27 2012-06-28T05:42:04.234218Z K 7 svn:log V 31 Optimize pmap_pv_demote_pde(). END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-06-28T05:48:58.325461Z K 7 svn:log V 35 Revert r237294. Requested by: jhb END K 10 svn:author V 3 alc K 8 svn:date V 27 2012-06-28T06:13:52.186395Z K 7 svn:log V 66 Retire this branch. Similar changes have been committed to HEAD. END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-06-28T06:49:04.111244Z K 7 svn:log V 65 octeon_uart_class was removed some time ago everywhere but here. END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-06-28T06:58:12.096420Z K 7 svn:log V 116 Don't try to detect GEOM's signature in the last sector. This is the path to the Dark Side. Discussed with: marcel END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-06-28T07:01:48.676602Z K 7 svn:log V 438 Add a sysctl to set the cdrom timeout. Data recovery operations from a CD or DVD drive with a damaged disc often benefit from a shorter timeout. Also, when retries are set to 0, an application is expecting errors and recovering them so do not print the error into the log. The number of expected errors can literally be in the hundreds of thousands which significantly slows data recovery. Reviewed by: ken@ (but quite some time ago). END K 10 svn:author V 7 linimon K 8 svn:date V 27 2012-06-28T07:02:15.737301Z K 7 svn:log V 10 add mips. END K 10 svn:author V 7 delphij K 8 svn:date V 27 2012-06-28T07:08:48.698553Z K 7 svn:log V 25 MFC r237410: zlib 1.2.7. END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-06-28T07:26:44.480954Z K 7 svn:log V 36 Simplify resource activation a bit. END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-06-28T07:28:39.242101Z K 7 svn:log V 69 Document some MP assumptions for sio. Submitted by: bde (years ago) END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-06-28T07:33:43.274874Z K 7 svn:log V 61 Remove an old hack I noticed years ago, but never committed. END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-06-28T07:37:46.331401Z K 7 svn:log V 70 Turns out the emulators still need/want a_magic, so put it back here. END K 10 svn:author V 5 gabor K 8 svn:date V 27 2012-06-28T08:22:00.070156Z K 7 svn:log V 34 - Add UPDATING entry for BSD sort END K 10 svn:author V 5 maxim K 8 svn:date V 27 2012-06-28T08:25:19.209742Z K 7 svn:log V 123 o Restore -u getopt(3) flag somehow killed in r234712. PR: bin/169490 Submitted by: amdmi3 MFC after: 2 weeks END K 10 svn:author V 5 gabor K 8 svn:date V 27 2012-06-28T09:18:11.665934Z K 7 svn:log V 83 MFC 236028, 236185, 236972 - Add support for BSD iconv when it is built into libc END K 10 svn:author V 6 issyl0 K 8 svn:date V 27 2012-06-28T10:05:45.727865Z K 7 svn:log V 245 Merge head revisions 237393, 237409: Locale-specific man page edits: - libc/string/strcoll.3 - libc/string/strstr.3 - libc/string/strxfrm.3 - libc/string/strcasecmp.3 - libc/string/Makefile.inc Approved by: gabor (mentor) END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2012-06-28T10:12:46.214392Z K 7 svn:log V 50 Automatically generate hardware notes for bxe(4). END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2012-06-28T10:21:25.630775Z K 7 svn:log V 50 Automatically generate hardware notes for bwn(4). END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-06-28T10:40:57.589339Z K 7 svn:log V 48 Don't forget call disk_close() on disk closing. END K 10 svn:author V 4 fjoe K 8 svn:date V 27 2012-06-28T11:15:48.285521Z K 7 svn:log V 141 MFC: r237350, r237357 Add support for the following Moxa PCIe multiport serial boards: - CP102E - CP102EL - CP114EL - CP118EL-A - CP168EL-A END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-06-28T11:46:14.422713Z K 7 svn:log V 112 Rename uboot's disk.c into storage.c. Use new API in the uboot's disk driver to get access to partition tables. END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-06-28T11:58:10.182533Z K 7 svn:log V 20 Fix copy/paste bug. END K 10 svn:author V 6 wblock K 8 svn:date V 27 2012-06-28T13:04:55.634454Z K 7 svn:log V 51 MFC r237620: Use possessive "its", no apostrophe. END K 10 svn:author V 6 wblock K 8 svn:date V 27 2012-06-28T13:05:56.994848Z K 7 svn:log V 51 MFC r237620: Use possessive "its", no apostrophe. END K 10 svn:author V 6 wblock K 8 svn:date V 27 2012-06-28T13:10:36.360687Z K 7 svn:log V 173 MFC r237655: Point out that /usr/src, /usr/doc, and /usr/ports may be empty or not exist until populated with csup(1) or svn(1). PR: 169487 Submitted by: Moritz Wilhelmy END K 10 svn:author V 6 wblock K 8 svn:date V 27 2012-06-28T13:11:34.556050Z K 7 svn:log V 173 MFC r237655: Point out that /usr/src, /usr/doc, and /usr/ports may be empty or not exist until populated with csup(1) or svn(1). PR: 169487 Submitted by: Moritz Wilhelmy END K 10 svn:author V 6 wblock K 8 svn:date V 27 2012-06-28T13:12:34.488350Z K 7 svn:log V 173 MFC r237655: Point out that /usr/src, /usr/doc, and /usr/ports may be empty or not exist until populated with csup(1) or svn(1). PR: 169487 Submitted by: Moritz Wilhelmy END K 10 svn:author V 6 cherry K 8 svn:date V 27 2012-06-28T13:47:07.335857Z K 7 svn:log V 66 Allow non-SMP builds for amd64/xen Approved by: gibbs (implicit) END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-06-28T14:13:45.495232Z K 7 svn:log V 469 MFC r237058: Eliminate the static buffer used to read the first page of the mapped object, and eliminate the pread(2) call as well. Mmap the first page of the object temporaly, and unmap it on error or last use. Potentially, this leaves one-page gap between succeeding dlopen(3), but there are other mmap(2) consumers as well. Fix several cases were the whole mapping of the object leaked on error. Use MAP_PREFAULT_READ for mmap(2) calls which map real object pages END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-06-28T14:26:55.608642Z K 7 svn:log V 467 Fix unbounded-length malloc, controlled from usermode. The added check is performed before exact size of the buffer is calculated, but the buffer cannot have size greater then the total space allocated for extended attributes. The existing check is executing with precise size, but it is too late, since buffer needs to be allocated in advance. Also, adapt to uio_resid being of ssize_t type. Use lblktosize instead of multiplying by fs block size by hand as well. END K 10 svn:author V 3 pfg K 8 svn:date V 27 2012-06-28T15:38:14.282274Z K 7 svn:log V 136 Fix build with Clang. error: format specifies type 'long long' but the argument has type 'int64_t' (aka 'long') Reported by: Ed Maste END K 10 svn:author V 6 tuexen K 8 svn:date V 27 2012-06-28T16:01:08.154034Z K 7 svn:log V 88 Pass the src and dst address of a received packet explicitly around. MFC after: 3 days END K 10 svn:author V 3 pfg K 8 svn:date V 27 2012-06-28T16:44:29.767338Z K 7 svn:log V 149 Safer fix for building with Clang. error: format specifies type 'long long' but the argument has type 'int64_t' (aka 'long') Reported by: Ed Maste END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-06-28T16:54:10.968337Z K 7 svn:log V 480 MFC r237366: Fix unbounded-length malloc, controlled from usermode. The added check is performed before exact size of the buffer is calculated, but the buffer cannot have size greater then the total space allocated for extended attributes. The existing check is executing with precise size, but it is too late, since buffer needs to be allocated in advance. Also, adapt to uio_resid being of ssize_t type. Use lblktosize instead of multiplying by fs block size by hand as well. END K 10 svn:author V 3 mav K 8 svn:date V 27 2012-06-28T17:15:16.701908Z K 7 svn:log V 232 Fix millisecond to ticks conversion in drm_msleep(). On systems with HZ=100 it caused Intel eDP video output initialization (and Xorg startup) to take several minutes instead of several seconds. Reviewed by: kib MFC after: 3 days END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-28T18:38:24.960584Z K 7 svn:log V 138 MFC 234494: Include the associated wait channel message for context switch ktrace records. kdump supports both the old and new messages. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-28T18:38:50.557727Z K 7 svn:log V 138 MFC 234494: Include the associated wait channel message for context switch ktrace records. kdump supports both the old and new messages. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-28T18:52:33.320717Z K 7 svn:log V 84 MFC 235132: Display dropped transmit packets in the daily network interface output. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-28T18:52:40.730871Z K 7 svn:log V 84 MFC 235132: Display dropped transmit packets in the daily network interface output. END K 10 svn:author V 6 cherry K 8 svn:date V 27 2012-06-28T19:19:38.220210Z K 7 svn:log V 69 Initialise kernel and process0 pmaps. Approved by: gibbs (implicit) END K 10 svn:author V 6 cherry K 8 svn:date V 27 2012-06-28T19:27:54.570526Z K 7 svn:log V 229 later initialisation code for the bootstrap vcpu, that depends on uma(9) and malloc(9) initialisation routines having been run. This happens during mi_startup() after SI_SUB_VM init hooks are run. Approved by: gibbs (implicit) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-28T19:34:23.576682Z K 7 svn:log V 262 MFC 236404: Extend VERBOSE_SYSINIT to also print out the name of variables passed to SYSINIT routines if they can be resolved via symbol look up in DDB. To avoid false positives, only honor a name if the symbol resolves exactly to the pointer value (no offset). END K 10 svn:author V 3 ken K 8 svn:date V 27 2012-06-28T19:39:30.945405Z K 7 svn:log V 148 Add a loader tunable, kern.cam.ctl.disable, that will disable loading CTL. This may be useful in very low memory installations. MFC after: 3 days END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-28T19:55:26.032574Z K 7 svn:log V 149 MFC 236405: Remove unnecessary initializations. The BSS of boot2 is in fact zero'd when boot2 begins execution by the _start() routine in btxcsu.S. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-28T19:55:46.871597Z K 7 svn:log V 149 MFC 236405: Remove unnecessary initializations. The BSS of boot2 is in fact zero'd when boot2 begins execution by the _start() routine in btxcsu.S. END K 10 svn:author V 6 emaste K 8 svn:date V 27 2012-06-28T20:10:43.534193Z K 7 svn:log V 40 Fix ioctl type for compiling with clang END K 10 svn:author V 3 ken K 8 svn:date V 27 2012-06-28T20:48:24.587125Z K 7 svn:log V 118 Now that the mps(4) driver is endian-safe, add it to the powerpc and sparc64 GENERIC config files. MFC after: 3 days END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-28T21:24:09.119327Z K 7 svn:log V 320 MFC 228161,230774,230822,236415: Add a new -e flag to pciconf(8)'s list mode to display PCI error details. Currently this dumps the status of any error bits in the PCI status register and PCI-express device status register. It also lists any errors indicated by version 1 of PCI-express Advanced Error Reporting (AER). END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-28T21:24:56.379383Z K 7 svn:log V 320 MFC 228161,230774,230822,236415: Add a new -e flag to pciconf(8)'s list mode to display PCI error details. Currently this dumps the status of any error bits in the PCI status register and PCI-express device status register. It also lists any errors indicated by version 1 of PCI-express Advanced Error Reporting (AER). END K 10 svn:author V 3 alc K 8 svn:date V 27 2012-06-28T22:03:59.000824Z K 7 svn:log V 56 Avoid some unnecessary PV list locking in pmap_enter(). END K 10 svn:author V 3 bms K 8 svn:date V 27 2012-06-28T23:44:47.084982Z K 7 svn:log V 126 In MLDv2 general query processing, do not enforce the strict check on query origins. Submitted by: Gu Yong MFC after: 3 days END K 10 svn:author V 3 bms K 8 svn:date V 27 2012-06-28T23:45:37.116146Z K 7 svn:log V 86 Fix a typo in MLD query exponent processing. Submitted by: rpaulo@ MFC after: 3 days END K 10 svn:author V 3 bms K 8 svn:date V 27 2012-06-28T23:48:40.541545Z K 7 svn:log V 120 Kick the current-state report timer when a V1 group report would be triggered. Submitted by: rpaulo@ MFC after: 3 days END K 10 svn:author V 6 rpaulo K 8 svn:date V 27 2012-06-29T01:55:20.741810Z K 7 svn:log V 533 The `end' symbol doesn't match the end of the kernel image because it's relative to the start address (unless the start address is 0, which is not the case). This is currently not a problem because all powerpc architectures are using loader(8) which passes metadata to the kernel including the correct `endkernel' address. If we don't use loader(8), register 4 and 5 will have the size of the kernel ELF file, not its end address. We fix that simply by adding `kernel_text' to `end' to compute `endkernel'. Discussed with: nathanw END K 10 svn:author V 3 pfg K 8 svn:date V 27 2012-06-29T03:01:38.743917Z K 7 svn:log V 291 MFC r237448: Merge changes from upstream libedit. Here we update most of the files to at least match the version available in NetBSD's snapshot of 20091228. This version was chosen because it still doesn't include wide character support (UTF-8), which involves many changes and new files. END K 10 svn:author V 3 pfg K 8 svn:date V 27 2012-06-29T03:03:42.649888Z K 7 svn:log V 291 MFC r237448: Merge changes from upstream libedit. Here we update most of the files to at least match the version available in NetBSD's snapshot of 20091228. This version was chosen because it still doesn't include wide character support (UTF-8), which involves many changes and new files. END K 10 svn:author V 6 scottl K 8 svn:date V 27 2012-06-29T03:37:23.150549Z K 7 svn:log V 134 Merge the firmware download functionality into camcontrol, as well as several other minor code changes. Obtained from: Netflix, Inc. END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-06-29T04:13:31.880327Z K 7 svn:log V 90 All xscale ports are armeb, so mark it here. This should reduce universe times a little. END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-06-29T04:18:52.332523Z K 7 svn:log V 94 Initital support for AT91SAM9X25 SoC and the SAM9X25-EK evaluation board. Much work remains. END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-06-29T04:49:50.227291Z K 7 svn:log V 74 Ooops, replaced the at91sam9g20 interrupt list with the at91sam9x25 ones. END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-06-29T06:05:44.288517Z K 7 svn:log V 64 Add PIOD, make at91sam9x25 a standard SoC, tweak some comments. END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-06-29T06:06:19.884950Z K 7 svn:log V 15 Tweak comment. END K 10 svn:author V 2 mm K 8 svn:date V 27 2012-06-29T06:41:03.457622Z K 7 svn:log V 191 MFC r237458: Import Illumos revision 13736:9f1d48e1681f 2901 ZFS receive fails for exabyte sparse files References: https://www.illumos.org/issues/2901 Obtained from: illumos (issue #2901) END K 10 svn:author V 2 mm K 8 svn:date V 27 2012-06-29T06:41:19.994447Z K 7 svn:log V 191 MFC r237458: Import Illumos revision 13736:9f1d48e1681f 2901 ZFS receive fails for exabyte sparse files References: https://www.illumos.org/issues/2901 Obtained from: illumos (issue #2901) END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T07:35:37.520616Z K 7 svn:log V 676 dtrace instruction decoder: add 0x0f 0x1f NOP opcode support According to the AMD manual the whole range from 0x09 to 0x1f are NOPs. Intel manual mentions only 0x1f. Use only Intel one for now, it seems to be the one actually generated by compilers. Use gdb mnemonic for the operation: "nopw". [1] AMD64 Architecture Programmer's Manual Volume 3: General-Purpose and System Instructions [2] Software Optimization Guide for AMD Family 10h Processors [3] Intel(R) 64 and IA-32 Architectures Software Developer’s Manual Volume 2 (2A, 2B & 2C): Instruction Set Reference, A-Z Tested by: Fabian Keil (earlier version) MFC after: 3 days END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-06-29T08:39:30.190153Z K 7 svn:log V 36 is no longer needed. END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-06-29T08:41:13.878031Z K 7 svn:log V 59 Turn on the build of MBR and GPT support in the arm/uboot. END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-06-29T09:03:47.884808Z K 7 svn:log V 18 Fix module build. END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T09:17:49.732376Z K 7 svn:log V 54 MFC r235153: sys/boot: add common CTASSERT definition END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-06-29T09:41:09.118246Z K 7 svn:log V 107 MFC r237430: Reserve AT_TIMEKEEP auxv entry for providing usermode the pointer to timekeeping information. END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T09:56:22.452759Z K 7 svn:log V 54 MFC r235153: sys/boot: add common CTASSERT definition END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:01:52.048127Z K 7 svn:log V 86 MFC r235154,r235158: btxldr: future-proof argument passing from boot1/2-ish to loader END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:01:56.615395Z K 7 svn:log V 86 MFC r235154,r235158: btxldr: future-proof argument passing from boot1/2-ish to loader END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:04:23.564203Z K 7 svn:log V 56 MFC r235155: i386 boot: consolidate MAXBDDEV definition END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:06:37.347557Z K 7 svn:log V 56 MFC r235155: i386 boot: consolidate MAXBDDEV definition END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:07:16.491461Z K 7 svn:log V 57 MFC r235156: i386 zfsloader: rename LIBZFS to LIBZFSBOOT END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:08:31.398283Z K 7 svn:log V 57 MFC r235156: i386 zfsloader: rename LIBZFS to LIBZFSBOOT END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:10:16.878953Z K 7 svn:log V 89 MFC r235219: cdboot, pxeldr: make use of bootargs.h instead of redefining flag constants END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:10:43.215013Z K 7 svn:log V 89 MFC r235219: cdboot, pxeldr: make use of bootargs.h instead of redefining flag constants END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:12:18.326980Z K 7 svn:log V 57 MFC r235264: MFi386: improve argument passing via btxldr END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:12:27.289107Z K 7 svn:log V 57 MFC r235264: MFi386: improve argument passing via btxldr END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:18:36.106662Z K 7 svn:log V 97 MFC r235329,235343,235361,235364: zfsboot/zfsloader: support accessing filesystems within a pool END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:19:15.324202Z K 7 svn:log V 97 MFC r235329,235343,235361,235364: zfsboot/zfsloader: support accessing filesystems within a pool END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:22:20.587693Z K 7 svn:log V 80 MFC r235330: zfs boot: try to set vfs.root.mountfrom from currdev as a fallback END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:22:35.741470Z K 7 svn:log V 80 MFC r235330: zfs boot: try to set vfs.root.mountfrom from currdev as a fallback END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:28:40.681819Z K 7 svn:log V 63 MFC r235392,235394,235395: fixes and cleanups for zfs boot MFC END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:28:46.045134Z K 7 svn:log V 63 MFC r235392,235394,235395: fixes and cleanups for zfs boot MFC END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:30:59.437662Z K 7 svn:log V 86 MFC r235390: zfs boot code: mark spa_t arguments as const where they are used as such END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T10:31:26.738405Z K 7 svn:log V 86 MFC r235390: zfs boot code: mark spa_t arguments as const where they are used as such END K 10 svn:author V 8 jhibbits K 8 svn:date V 27 2012-06-29T10:39:42.623941Z K 7 svn:log V 143 MFC r237480 Release the ADB keyboard mutex when handling the power button press/release. Found by WITNESS. Approved by: nwhitehorn (mentor) END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-06-29T12:05:19.591634Z K 7 svn:log V 706 Merge r233773 from head: Historically arp(8) did a route lookup for the entry it is about to add, and failed if it exist and had invalid data link type. Later on, in r201282, this check morphed to other code, but message "proxy entry exists for non 802 device" still left, and now it is printed in a case if route prefix found is equal to current address being added. In other words, when we are trying to add ARP entry for a network address. The message is absolutely unrelated and disappointing in this case. I don't see anything bad with setting ARP entries for network addresses. While useless in usual network, in a /31 RFC3021 it may be necessary. This, remove this code. END K 10 svn:author V 3 pho K 8 svn:date V 27 2012-06-29T12:08:26.970326Z K 7 svn:log V 324 MFC: r237219 In tty_makedev() the following construction: dev = make_dev_cred(); dev->si_drv1 = tp; leaves a small window where the newly created device may be opened and si_drv1 is NULL. As this is a vary rare situation, using a lock to close the window seems overkill. Instead just wait for the assignment of si_drv1. END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-06-29T12:11:31.999895Z K 7 svn:log V 221 Merge r236364 from head by eri@: Correct table counter functionality to not panic. This was caused by not proper initialization of necessary parameters. PR: 168200 Reviewed by: bz@, glebius@ MFC after: 1 week END K 10 svn:author V 4 ache K 8 svn:date V 27 2012-06-29T12:55:36.135234Z K 7 svn:log V 288 Call set_terminal_mode() after video mode change, not before, because video mode change always reset terminal mode to xterm. It allows things like 'vidcontrol -T cons25 80x30' works as supposed, and allows 'allscreens_flags="-T cons25 80x30"' in /etc/rc.conf too. MFC after: 1 week END K 10 svn:author V 4 bapt K 8 svn:date V 27 2012-06-29T13:00:28.863756Z K 7 svn:log V 322 MFC: r237268 early MFC to get this important bugfix into 9.1 Revert user comparison back to user names as some user can share uids (root/toor for example) get the username information from old_pw structures to still allow renaming of a user. Reported by: Claude Buisson Approved by: des (mentor) END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-29T13:02:46.130237Z K 7 svn:log V 170 fix a mismerge in r237765 sys/boot stable/8 doesn't have Makefile.spac64, instead it has spar64-specific blocks in Makefile. This is a direct commit. Pointyhat to: avg END K 10 svn:author V 3 pho K 8 svn:date V 27 2012-06-29T14:14:49.631168Z K 7 svn:log V 324 MFC: r237219 In tty_makedev() the following construction: dev = make_dev_cred(); dev->si_drv1 = tp; leaves a small window where the newly created device may be opened and si_drv1 is NULL. As this is a vary rare situation, using a lock to close the window seems overkill. Instead just wait for the assignment of si_drv1. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2012-06-29T14:15:54.921606Z K 7 svn:log V 254 Introduce a new allocator backed by numa to replace mmu_alloc() as long as it is safe to go with it. Please note that the interface needs to be cleaned up in order to just allow page size allocation and not pass an arbitrary length. Reviewed by: cherry END K 10 svn:author V 7 attilio K 8 svn:date V 27 2012-06-29T14:33:00.696353Z K 7 svn:log V 111 For the time being, untile single-user doesn't boot and work, disable SMP option for XEN. Approved by: cherry END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-06-29T14:39:04.072659Z K 7 svn:log V 115 - Make hash sizes configurable via loader tunables. - Reduce default size to a more conservative value of 32768. END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-06-29T14:55:57.345746Z K 7 svn:log V 35 Document loader tunables of pf(4). END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-06-29T15:09:38.347410Z K 7 svn:log V 44 Remove a couple of meaningless XXX from me. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2012-06-29T15:10:54.873577Z K 7 svn:log V 14 MFC @ r237782 END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T15:21:34.936837Z K 7 svn:log V 399 Hold GIF_LOCK() for almost all of gif_start(). It is required to be held across in_gif_output() and in6_gif_output() anyway, and once it is held across those it might as well be held for the entire loop. This simplifies the code and removes the need for the custom IFF_GIF_WANTED flag (which belonged in the softc and not as an IFF_* flag anyway). Tested by: Vincent Hoffman vince unsane co uk END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-06-29T15:24:42.980774Z K 7 svn:log V 109 As Robert suggested provide mbuf to pf_socket_lookup() and utilize in_pcblookup_mbuf()/in6_pcblookup_mbuf(). END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T15:24:46.765920Z K 7 svn:log V 82 MFC 236577: Allow the -p argument to kdump to accept either a PID or a thread ID. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T15:24:55.357658Z K 7 svn:log V 82 MFC 236577: Allow the -p argument to kdump to accept either a PID or a thread ID. END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-06-29T15:27:17.908198Z K 7 svn:log V 58 The locking problem between pf and PCBs no longer exists. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T15:30:14.871516Z K 7 svn:log V 137 MFC 236717: Teach procstat_get_shm_info_kvm() how to fetch the pathname of a SHM file descriptor from a core and set it in fts->fs_path. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2012-06-29T15:47:03.828235Z K 7 svn:log V 257 - Remove the possibility to pass an arbitrary size to the mmu_map_mbackend alloc structures. They will now allocate a single page size chunk of memory. - Fix the prototype for pmtb_mappedfree to match with the expected prototype. Approved by: cherry END K 10 svn:author V 6 obrien K 8 svn:date V 27 2012-06-29T15:54:07.860298Z K 7 svn:log V 56 Support also running a 32-bit test on 64-bit platforms. END K 10 svn:author V 6 obrien K 8 svn:date V 27 2012-06-29T15:57:25.071492Z K 7 svn:log V 81 MFC: r236592 r236593 r236594 r236620 r236621 r236622 r236637 r237794: filemon(4) END K 10 svn:author V 6 davide K 8 svn:date V 27 2012-06-29T16:06:06.133592Z K 7 svn:log V 334 Experiment a new approach used for low-precision events, try to align them to some time borders on insert. This approach can make system load more bursty, but it is very cheap to be implemented and may be quite effective. Moreover, it can easily coexist with the previously implemented "real-time aggregation". Discussed with: mav END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T16:29:38.034400Z K 7 svn:log V 813 MFC 237008,237271,237272,237673: - Fix a couple of bugs that prevented windows in PCI-PCI bridges from growing "downward" (moving the start address down). First, an off by one error caused the end address to be moved down an extra alignment chunk unnecessarily. Second, when aligning the new candidate starting address, the wrong bits were masked off. - Add a 'wmask' variable to hold the expression '(1ul << w->step) - 1' in pcib_grow_window(). - For subtractively decoding bridges, don't try to grow windows but pass the request up the tree in order to be on the safe side. Growing windows in this case would mean to switch resources to positive decoding and it's unclear how to correctly handle this. At least with ALi/ULi M5249 PCI-PCI bridges, this also just doesn't work out of the box. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T16:30:15.922369Z K 7 svn:log V 813 MFC 237008,237271,237272,237673: - Fix a couple of bugs that prevented windows in PCI-PCI bridges from growing "downward" (moving the start address down). First, an off by one error caused the end address to be moved down an extra alignment chunk unnecessarily. Second, when aligning the new candidate starting address, the wrong bits were masked off. - Add a 'wmask' variable to hold the expression '(1ul << w->step) - 1' in pcib_grow_window(). - For subtractively decoding bridges, don't try to grow windows but pass the request up the tree in order to be on the safe side. Growing windows in this case would mean to switch resources to positive decoding and it's unclear how to correctly handle this. At least with ALi/ULi M5249 PCI-PCI bridges, this also just doesn't work out of the box. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-06-29T16:50:52.736687Z K 7 svn:log V 62 cxgbe(4): support for IPv6 hardware checksumming (rx and tx). END K 10 svn:author V 3 ken K 8 svn:date V 27 2012-06-29T17:00:52.023345Z K 7 svn:log V 213 Change the mps(4) driver to only scan a target if that is what is needed instead of scanning the full bus every time. Submitted by: mav Discussed with: Sreekanth Reddy MFC after: 3 days END K 10 svn:author V 7 attilio K 8 svn:date V 27 2012-06-29T17:04:42.640627Z K 7 svn:log V 264 PMTB addresses are tought to be mostly opaque, so they are not turned at all in void ptrs. However, vm_offset_t is not a correct choice because it doesn't express at all the concept. Simply handle the virutal addresses involved as uintptr_t. Reviewed by: cherry END K 10 svn:author V 6 davide K 8 svn:date V 27 2012-06-29T17:05:13.428173Z K 7 svn:log V 139 Introduce the delta_bintime_in_msecs() as suggested by Bruce Evans. While here, make an attempt to fix some style bugs. Reported by: bde END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T17:12:03.940307Z K 7 svn:log V 352 MFC 237334: Move the per-thread deferred user map entries list into a private list in vm_map_process_deferred() which is then iterated to release map entries. This avoids having a nested vm map unlock operation called from the loop body attempt to recuse into vm_map_process_deferred(). This can happen if the vm_map_remove() triggers the OOM killer. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T17:12:26.138038Z K 7 svn:log V 352 MFC 237334: Move the per-thread deferred user map entries list into a private list in vm_map_process_deferred() which is then iterated to release map entries. This avoids having a nested vm map unlock operation called from the loop body attempt to recuse into vm_map_process_deferred(). This can happen if the vm_map_remove() triggers the OOM killer. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T17:21:19.527658Z K 7 svn:log V 377 MFC 233191: Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger than 4GB. Specifically, the inlined version of 'ptoa' of the the 'int' count of pages overflowed on 64-bit platforms. While here, change vm_object_madvise() to accept two vm_pindex_t parameters (start and end) rather than a (start, count) tuple to match other VM APIs as suggested by alc@. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T17:21:46.803112Z K 7 svn:log V 377 MFC 233191: Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger than 4GB. Specifically, the inlined version of 'ptoa' of the the 'int' count of pages overflowed on 64-bit platforms. While here, change vm_object_madvise() to accept two vm_pindex_t parameters (start and end) rather than a (start, count) tuple to match other VM APIs as suggested by alc@. END K 10 svn:author V 6 davide K 8 svn:date V 27 2012-06-29T17:26:37.965685Z K 7 svn:log V 160 Take in account that time_t is not 64 bits long on all the architectures supported. Remove an unneeded check. Reported by: bde [1], mav [2] Reviewed by: mav END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T17:28:03.594095Z K 7 svn:log V 373 MFC 197552: Silence warning printed by getfsspec(3) when /etc/fstab does not exist fstab: /etc/fstab:0: No such file or directory and from dump(8) when setfsent(3) fails due to /etc/fstab not existing: DUMP: Can't open /etc/fstab for dump table information: No such... This makes daily and security periodic runs somewhat cleaner in jails which lack /etc/fstab files. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T17:28:48.962509Z K 7 svn:log V 116 MFC 237337: Only output a list of file systems that need to be dumped if the system has a non-empty dumpdates file. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T17:28:58.741574Z K 7 svn:log V 116 MFC 237337: Only output a list of file systems that need to be dumped if the system has a non-empty dumpdates file. END K 10 svn:author V 6 davide K 8 svn:date V 27 2012-06-29T17:39:40.283749Z K 7 svn:log V 20 MFC as per r237808. END K 10 svn:author V 3 dim K 8 svn:date V 27 2012-06-29T18:09:39.365226Z K 7 svn:log V 182 MFC r235281: Fix sys/boot/i386/cdboot/cdboot.S compilation with clang after r235219. This file uses .code16 directives, which are not yet supported by clang's integrated assembler. END K 10 svn:author V 3 alc K 8 svn:date V 27 2012-06-29T18:15:56.993964Z K 7 svn:log V 294 In r237592, I forgot that pmap_enter() might already hold a PV list lock at the point that it calls get_pv_entry(). Thus, pmap_enter()'s PV list lock pointer must be passed to get_pv_entry() for those rare occasions when get_pv_entry() calls reclaim_pv_chunk(). Update some related comments. END K 10 svn:author V 3 dim K 8 svn:date V 27 2012-06-29T18:18:51.192754Z K 7 svn:log V 108 MFC r236810: Amend r227797 by also passing ${STATIC_CXXFLAGS} for the other supported C++ file extensions. END K 10 svn:author V 6 marius K 8 svn:date V 27 2012-06-29T18:39:22.963954Z K 7 svn:log V 298 MFC: r236581 The loaddev environment variable is not modifiable once set, so it is not update for ZFS. It seems that this does not really affect anything except the help command. Nevertheless, rearrange things so loaddev is set only once in all cases in order to get it right. Pointed out by: avg END K 10 svn:author V 6 marius K 8 svn:date V 27 2012-06-29T18:39:31.107877Z K 7 svn:log V 298 MFC: r236581 The loaddev environment variable is not modifiable once set, so it is not update for ZFS. It seems that this does not really affect anything except the help command. Nevertheless, rearrange things so loaddev is set only once in all cases in order to get it right. Pointed out by: avg END K 10 svn:author V 3 pfg K 8 svn:date V 27 2012-06-29T18:49:14.662271Z K 7 svn:log V 409 Bump dtrace_helper_actions_max from 32 to 128 Dave Pacheco from Joyent (and Dtrace.org) bumped the cap to 1024 but, according to his blog, 128 is the recommended minimum. For now bump it safely to 128 although we may have to bump it further if there is demand in the future. Reference: http://www.illumos.org/issues/2558 http://dtrace.org/blogs/dap/2012/01/50/where-does-your-node-program-spend-its-time/ END K 10 svn:author V 4 joel K 8 svn:date V 27 2012-06-29T19:05:29.655582Z K 7 svn:log V 113 Reduce diffs between GENERIC and GENERIC64. Also fix a few whitespace nits while I'm here. No functional change. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-06-29T19:51:06.749919Z K 7 svn:log V 101 cxgbe(4): support for IPv6 TSO and LRO. Submitted by: bz (this is a modified version of that patch) END K 10 svn:author V 6 brooks K 8 svn:date V 27 2012-06-29T20:15:00.426629Z K 7 svn:log V 64 MFP4 #212266 Fix compile on MIPS64. Sponsored by: DARPA, AFRL END K 10 svn:author V 3 ken K 8 svn:date V 27 2012-06-29T21:19:24.792665Z K 7 svn:log V 294 MFC r232604: r232604 | trasz | 2012-03-06 06:43:57 -0700 (Tue, 06 Mar 2012) | 6 lines Add LUN resizing to CTL. Also make it possible to explicitly set size when creating file-backed or device-backed LUN. Reviewed by: ken (earlier version) Sponsored by: The FreeBSD Foundation END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T21:24:56.798668Z K 7 svn:log V 698 MFC 235024,235029,235556,235834,235845: Use MADT to match ACPI Processor objects to CPUs. MADT and DSDT/SSDTs may list CPUs in different orders, especially for disabled logical cores. Now we match ACPI IDs from the MADT with Processor objects, strictly order CPUs accordingly, and ignore disabled cores. This prevents us from executing methods for other CPUs, e. g., _PSS for disabled logical core, which may not exist. Unfortunately, it is known that there are a few systems with buggy BIOSes that do not have unique ACPI IDs for MADT and Processor objects. To work around these problems, 'debug.acpi.cpu_unordered' tunable is added. Set this to a non-zero value to restore the old behavior. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-06-29T21:25:24.083373Z K 7 svn:log V 698 MFC 235024,235029,235556,235834,235845: Use MADT to match ACPI Processor objects to CPUs. MADT and DSDT/SSDTs may list CPUs in different orders, especially for disabled logical cores. Now we match ACPI IDs from the MADT with Processor objects, strictly order CPUs accordingly, and ignore disabled cores. This prevents us from executing methods for other CPUs, e. g., _PSS for disabled logical core, which may not exist. Unfortunately, it is known that there are a few systems with buggy BIOSes that do not have unique ACPI IDs for MADT and Processor objects. To work around these problems, 'debug.acpi.cpu_unordered' tunable is added. Set this to a non-zero value to restore the old behavior. END K 10 svn:author V 3 ken K 8 svn:date V 27 2012-06-29T21:27:37.965562Z K 7 svn:log V 973 MFC r233963: r233963 | ken | 2012-04-06 16:23:13 -0600 (Fri, 06 Apr 2012) | 27 lines Change the SCSI INQUIRY peripheral qualifier that CTL reports for LUNs that don't exist. Anecdotal evidence indicates that it is better to return 011b (bad LUN) than 001b (LUN offline). However, this change also gives the user a sysctl/tunable, kern.cam.ctl.inquiry_pq_no_lun, to override the change and return to the previous behavior. (The previous behavior was to return 001b, or LUN offline.) ctl.c: Change the default inquiry peripheral qualifier to 011b, and add a sysctl and tunable to allow the user to change it back to 001b if needed. Don't insert a Copan copyright statement in the inquiry data. The copyright statements on the files are sufficient. ctl_private.h:Add sysctl variable context to the CTL softc. ctl_cmd_table.c, ctl_frontend_internal.c, ctl_frontend.c, ctl_backend.c, ctl_error.c: Include sys/sysctl.h. END K 10 svn:author V 3 ken K 8 svn:date V 27 2012-06-29T21:33:36.595890Z K 7 svn:log V 1349 MFC r237601: r237601 | ken | 2012-06-26 08:51:35 -0600 (Tue, 26 Jun 2012) | 38 lines Fix an issue that caused the kernel to panic inside CTL when trying to attach to target capable HBAs that implement the old immediate notify (XPT_IMMED_NOTIFY) and notify acknowledge (XPT_NOTIFY_ACK) CCBs. The new API has been in place since SVN change 196008 in 2009. The solution is two-fold: fix CTL to handle the responses from the HBAs, and convert the HBA drivers in question to use the new API. These drivers have not been tested with CTL, so how well they will interoperate with CTL is unknown. scsi_target.c:Update the userland target example code to use the new immediate notify API. scsi_ctl.c: Detect when an immediate notify CCB is returned with CAM_REQ_INVALID or CAM_PROVIDE_FAIL status, and just free it. Fix a duplicate assignment. aic79xx.c, aic79xx_osm.c:Update the aic79xx driver to use the new API. Target mode is not enabled on for this driver, so the changes will have no practical effect. aic7xxx.c, aic7xxx_osm.c:Update the aic7xxx driver to use the new API. sbp_targ.c: Update the firewire target code to work with the new API. mpt_cam.c: Update the mpt(4) driver to work with the new API. Target mode is only enabled for Fibre Channel mpt(4) devices. END K 10 svn:author V 3 ken K 8 svn:date V 27 2012-06-29T22:00:30.285354Z K 7 svn:log V 2324 MFC r236138, with the exception of scsi_enc.c: r236138 | ken | 2012-05-27 00:11:09 -0600 (Sun, 27 May 2012) | 64 lines Work around a race condition in devfs by changing the way closes are handled in most CAM peripheral drivers that are not handled by GEOM's disk class. The usual character driver open and close semantics are that the driver gets N open calls, but only one close, when the last caller closes the device. CAM peripheral drivers expect that behavior to be honored to the letter, and the CAM peripheral driver code (specifically cam_periph_release_locked_busses()) panics if it is done incorrectly. Since devfs has to drop its locks while it calls a driver's close routine, and it does not have a way to delay or prevent open calls while it is calling the close routine, there is a race. The sequence of events, simplified a bit, is: - devfs acquires a lock - devfs checks the reference count, and if it is 1, continues to close. - devfs releases the lock - 2nd process open call on the device happens here - devfs calls the driver's close routine - devfs acquires a lock - devfs decrements the reference count - devfs releases the lock - 2nd process close call on the device happens here At the second close, we get a panic in cam_periph_release_locked_busses(), complaining that peripheral has been released when the reference count is already 0. This is because we have gotten two closes in a row, which should not happen. The fix is to add the D_TRACKCLOSE flag to the driver's cdevsw, so that we get a close() call for each open(). That does happen reliably, so we can make sure that our reference counts are correct. Note that the sa(4) and pt(4) drivers only allow one context through the open routine. So these drivers aren't exposed to the same race condition. scsi_ch.c, scsi_enc.c, scsi_enc_internal.h, scsi_pass.c, scsi_sg.c: For these drivers, change the open() routine to increment the reference count for every open, and just decrement the reference count in the close. Call cam_periph_release_locked() in some scenarios to avoid additional lock and unlock calls. scsi_pt.c: Call cam_periph_release_locked() in some scenarios to avoid additional lock and unlock calls. END K 10 svn:author V 3 ken K 8 svn:date V 27 2012-06-29T22:28:31.007578Z K 7 svn:log V 2799 MFC r237328, except for the scsi_enc.c changes: r237328 | ken | 2012-06-20 11:08:00 -0600 (Wed, 20 Jun 2012) | 69 lines Fix several reference counting and object lifetime issues between the pass(4) and enc(4) drivers and devfs. The pass(4) driver uses the destroy_dev_sched() routine to schedule its device node for destruction in a separate thread context. It does this because the passcleanup() routine can get called indirectly from the passclose() routine, and that would cause a deadlock if the close routine tried to destroy its own device node. In any case, once a particular passthrough driver number, e.g. pass3, is destroyed, CAM considers that unit number (3 in this case) available for reuse. The problem is that devfs may not be done cleaning up the previous instance of pass3, and will panic if isn't done cleaning up the previous instance. The solution is to get a callback from devfs when the device node is removed, and make sure we hold a reference to the peripheral until that happens. Testing exposed some other cases where we have reference counting issues, and those were also fixed in the pass(4) driver. cam_periph.c: In camperiphfree(), reorder some of the operations. The peripheral destructor needs to be called before the peripheral is removed from the peripheral is removed from the list. This is because once we remove the peripheral from the list, and drop the topology lock, the peripheral number may be reused. But if the destructor hasn't been called yet, there may still be resources hanging around (like devfs nodes) that haven't been fully cleaned up. cam_xpt.c: Add an argument to xpt_remove_periph() to indicate whether the topology lock is already held. scsi_enc.c: Acquire an extra reference to the peripheral during registration, and release it once we get a callback from devfs indicating that the device node is gone. Call destroy_dev_sched_cb() in enc_oninvalidate() instead of calling destroy_dev() in the cleanup routine. scsi_pass.c: Add reference counting to handle peripheral and devfs object lifetime issues. Add a reference to the peripheral and the devfs node in the peripheral registration. Don't attempt to add a physical path alias if the peripheral has been marked invalid. Release the devfs reference once the initial physical path alias taskqueue run has completed. Schedule devfs node destruction in the passoninvalidate(), and release our peripheral reference in a new routine, passdevgonecb() once the devfs node is gone. This allows the peripheral to fully go away, and the peripheral destructor, passcleanup(), will get called. Sponsored by: Spectra Logic END K 10 svn:author V 3 ken K 8 svn:date V 27 2012-06-29T22:33:48.126644Z K 7 svn:log V 1054 MFC r237452: r237452 | ken | 2012-06-22 12:57:06 -0600 (Fri, 22 Jun 2012) | 25 lines Change 'camcontrol defects' to first probe a drive to find out how much defect information it has before grabbing the full defect list. This works around a bug with some Hitachi drives that generate data overrun errors when they are asked for more defect data than they have. The change is done in a spec-compliant way, so it should have no negative impact on drives that don't have this issue. This is based on work originally done at Sandvine. scsi_da.h: Add a define for the maximum amount of data that can be contained in a defect list. camcontrol.c: Update the readdefects() function to issue an initial command to determine the length of the defect list, and then use that length in the request for the full defect list. camcontrol.8: Add a note that some drives will report 0 defects available if you don't request either the PLIST or GLIST. Submitted by: Mark Johnston (original version) END K 10 svn:author V 2 bz K 8 svn:date V 27 2012-06-30T00:12:29.659062Z K 7 svn:log V 67 gnn to mentor davidcs. Thanks for helping out. Approved by: core END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-06-30T01:40:29.587549Z K 7 svn:log V 100 Bump this up - that way the AR9300 and later MACs get covered (for now) by the AR5416 register map. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-06-30T02:05:09.546053Z K 7 svn:log V 160 - Assign (don't OR) the CSUM_XXX bits to csum_flags in the rx checksum code. - Fix TSO/TSO4 mixup. - Add IFCAP_LINKSTATE to the available/enabled capabilities. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-06-30T02:11:53.959892Z K 7 svn:log V 109 cxgb(4): IPv6 rx/tx hw checksum, IPv6 TSO and LRO too. (Some parts already worked, this makes it complete). END K 10 svn:author V 2 mm K 8 svn:date V 27 2012-06-30T07:23:22.060524Z K 7 svn:log V 55 Copy opensolaris/dist to illumos/dist in vendor branch END K 10 svn:author V 2 mm K 8 svn:date V 27 2012-06-30T07:46:38.882208Z K 7 svn:log V 93 Update illumos/dist to revision 13742:b6bbdd77139c ZFS bits will follow in a separate commit END K 10 svn:author V 2 mm K 8 svn:date V 27 2012-06-30T07:52:06.491946Z K 7 svn:log V 62 Update vendor dtrace manpage from usr/src/man/man1m/dtrace.1m END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2012-06-30T13:17:21.616008Z K 7 svn:log V 37 mps(4) is endian safe as of r237683. END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-30T14:05:35.809018Z K 7 svn:log V 90 MFC r236504: cpucontrol: use CPUCTL_UPDATE ioctl on correct file descriptor (in amd case) END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-30T14:06:17.050415Z K 7 svn:log V 90 MFC r236504: cpucontrol: use CPUCTL_UPDATE ioctl on correct file descriptor (in amd case) END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-30T14:17:59.859955Z K 7 svn:log V 81 MFC r236503: free wdog_kern_pat calls in post-panic paths from under SW_WATCHDOG END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-06-30T14:18:04.027245Z K 7 svn:log V 81 MFC r236503: free wdog_kern_pat calls in post-panic paths from under SW_WATCHDOG END K 10 svn:author V 6 marius K 8 svn:date V 27 2012-06-30T14:48:52.052209Z K 7 svn:log V 69 Exclude at91sam9x25 support, which just wastes space for Ethernut 5. END K 10 svn:author V 6 marius K 8 svn:date V 27 2012-06-30T14:55:36.803521Z K 7 svn:log V 249 Switch back to the 4BSD scheduler for now. There is some more or less recent regression with ULE, causing processes to get stuck in getblk as well as interrupt handler execution delays to rise above the command timeout of mpt(4). MFC after: 3 days END K 10 svn:author V 6 marcel K 8 svn:date V 27 2012-06-30T15:55:40.613757Z K 7 svn:log V 251 Add some section headers. I expect this file to grow fairly rapidly now that I can focus on the various load functions and with it the bounce buffering support. Having something to search for as a way to jump through this file seems like a good idea. END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-06-30T16:20:01.951289Z K 7 svn:log V 212 Initialize procs closer to the place were it is used. Free can properly handle NULL pointer (but keep free() call on the premise that the code might be reused). Show errno when realloc failed. MFC after: 3 days END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-06-30T16:21:51.642146Z K 7 svn:log V 55 Only initialize array of mibs once. MFC after: 3 days END