Index: head/etc/devd.conf =================================================================== --- head/etc/devd.conf (revision 314109) +++ head/etc/devd.conf (revision 314110) @@ -1,341 +1,341 @@ # $FreeBSD$ # # Refer to devd.conf(5) and devd(8) man pages for the details on how to # run and configure devd. # # NB: All regular expressions have an implicit ^$ around them. # NB: device-name is shorthand for 'match device-name' options { # Each "directory" directive adds a directory to the list of # directories that we scan for files. Files are loaded in the order # that they are returned from readdir(3). The rule-sets are combined # to create a DFA that's used to match events to actions. directory "/etc/devd"; directory "/usr/local/etc/devd"; pid-file "/var/run/devd.pid"; # Setup some shorthand for regex that we use later in the file. #XXX Yes, these are gross -- imp set scsi-controller-regex - "(aac|adv|adw|aha|ahb|ahc|ahd|aic|amr|bt|ciss|ct|dpt|\ + "(aac|adv|adw|aha|ahc|ahd|aic|amr|bt|ciss|ct|dpt|\ esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm)\ [0-9]+"; set wifi-driver-regex "(ath|bwi|bwn|ipw|iwi|iwm|iwn|malo|mwl|ral|rsu|rtwn|rum|run|\ uath|upgt|ural|urtw|wi|wpi|wtap|zyd)[0-9]+"; }; # Note that the attach/detach with the highest value wins, so that one can # override these general rules. # # Configure the interface on attach. Due to a historical accident, this # script is called pccard_ether. # # NB: DETACH events are ignored; the kernel should handle all cleanup # (routes, arp cache). Beware of races against immediate create # of a device with the same name; e.g. # ifconfig bridge0 destroy; ifconfig bridge0 create # notify 0 { match "system" "IFNET"; match "subsystem" "!usbus[0-9]+"; match "type" "ATTACH"; action "/etc/pccard_ether $subsystem start"; }; # # Try to start dhclient on Ethernet-like interfaces when the link comes # up. Only devices that are configured to support DHCP will actually # run it. No link down rule exists because dhclient automatically exits # when the link goes down. # notify 0 { match "system" "IFNET"; match "type" "LINK_UP"; media-type "ethernet"; action "/etc/rc.d/dhclient quietstart $subsystem"; }; # # Like Ethernet devices, but separate because 802.11 require spawning # wlan(4) interface. # attach 0 { device-name "$wifi-driver-regex"; action "/etc/pccard_ether $device-name startchildren"; }; detach 0 { device-name "$wifi-driver-regex"; action "/etc/pccard_ether $device-name stopchildren"; }; notify 0 { match "system" "IFNET"; match "type" "LINK_UP"; media-type "802.11"; action "/etc/rc.d/dhclient quietstart $subsystem"; }; # An entry like this might be in a different file, but is included here # as an example of how to override things. Normally 'ed50' would match # the above attach/detach stuff, but the value of 100 makes it # hard wired to 1.2.3.4. attach 100 { device-name "ed50"; action "ifconfig $device-name inet 1.2.3.4 netmask 0xffff0000"; }; detach 100 { device-name "ed50"; }; # When a USB Bluetooth dongle appears, activate it attach 100 { device-name "ubt[0-9]+"; action "/etc/rc.d/bluetooth quietstart $device-name"; }; detach 100 { device-name "ubt[0-9]+"; action "/etc/rc.d/bluetooth quietstop $device-name"; }; # Firmware downloader for Atheros AR3011 based USB Bluetooth devices #attach 100 { # match "vendor" "0x0cf3"; # match "product" "0x3000"; # action "sleep 2 && /usr/sbin/ath3kfw -d $device-name -f /usr/local/etc/ath3k-1.fw"; #}; # When a USB keyboard arrives, attach it as the console keyboard. attach 100 { device-name "ukbd0"; action "/etc/rc.d/syscons setkeyboard /dev/ukbd0"; }; detach 100 { device-name "ukbd0"; action "/etc/rc.d/syscons setkeyboard /dev/kbd0"; }; notify 100 { match "system" "DEVFS"; match "subsystem" "CDEV"; match "type" "CREATE"; match "cdev" "atp[0-9]+"; action "/etc/rc.d/moused quietstart $cdev"; }; notify 100 { match "system" "DEVFS"; match "subsystem" "CDEV"; match "type" "CREATE"; match "cdev" "ums[0-9]+"; action "/etc/rc.d/moused quietstart $cdev"; }; notify 100 { match "system" "DEVFS"; match "subsystem" "CDEV"; match "type" "CREATE"; match "cdev" "wsp[0-9]+"; action "/etc/rc.d/moused quietstart $cdev"; }; notify 100 { match "system" "DEVFS"; match "subsystem" "CDEV"; match "type" "DESTROY"; match "cdev" "ums[0-9]+"; action "/etc/rc.d/moused stop $cdev"; }; # Firmware download into the ActiveWire board. After the firmware download is # done, the device detaches and reappears as something new and shiny # automatically. attach 100 { match "vendor" "0x0854"; match "product" "0x0100"; match "release" "0x0000"; action "/usr/local/bin/ezdownload -f /usr/local/share/usb/firmware/0854.0100.0_01.hex $device-name"; }; # Firmware download for Entrega Serial DB25 adapter. attach 100 { match "vendor" "0x1645"; match "product" "0x8001"; match "release" "0x0101"; action "if ! kldstat -n usio > /dev/null 2>&1 ; then kldload usio; fi; /usr/sbin/ezdownload -v -f /usr/share/usb/firmware/1645.8001.0101 /dev/$device-name"; }; # This entry starts the ColdSync tool in daemon mode. Make sure you have an up # to date /usr/local/etc/palms. We override the 'listen' settings for port and # type in /usr/local/etc/coldsync.conf. notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x082d"; match "product" "0x0100"; match "release" "0x0100"; action "/usr/local/bin/coldsync -md -p /dev/$cdev -t usb"; }; # # Rescan SCSI device-names on attach, but not detach. However, it is # disabled by default due to reports of problems. # attach 0 { device-name "$scsi-controller-regex"; // action "camcontrol rescan all"; }; # Don't even try to second guess what to do about drivers that don't # match here. Instead, pass it off to syslog. Commented out for the # moment, as the pnpinfo variable isn't set in devd yet. Individual # variables within the bus supplied pnpinfo are set. nomatch 0 { # action "logger Unknown device: $pnpinfo $location $bus"; }; # Various logging of unknown devices. nomatch 10 { match "bus" "uhub[0-9]+"; action "logger Unknown USB device: vendor $vendor product $product \ bus $bus"; }; # Some PC-CARDs don't offer numerical manufacturer/product IDs, just # show the CIS info there. nomatch 20 { match "bus" "pccard[0-9]+"; match "manufacturer" "0xffffffff"; match "product" "0xffffffff"; action "logger Unknown PCCARD device: CISproduct $cisproduct \ CIS-vendor $cisvendor bus $bus"; }; nomatch 10 { match "bus" "pccard[0-9]+"; action "logger Unknown PCCARD device: manufacturer $manufacturer \ product $product CISproduct $cisproduct CIS-vendor \ $cisvendor bus $bus"; }; nomatch 10 { match "bus" "cardbus[0-9]+"; action "logger Unknown Cardbus device: device $device class $class \ vendor $vendor bus $bus"; }; # Switch power profiles when the AC line state changes. notify 10 { match "system" "ACPI"; match "subsystem" "ACAD"; action "/etc/rc.d/power_profile $notify"; }; # Notify all users before beginning emergency shutdown when we get # a _CRT or _HOT thermal event and we're going to power down the system # very soon. notify 10 { match "system" "ACPI"; match "subsystem" "Thermal"; match "notify" "0xcc"; action "logger -p kern.emerg 'WARNING: system temperature too high, shutting down soon!'"; }; # User requested suspend, so perform preparation steps and then execute # the actual suspend process. notify 10 { match "system" "ACPI"; match "subsystem" "Suspend"; action "/etc/rc.suspend acpi $notify"; }; notify 10 { match "system" "ACPI"; match "subsystem" "Resume"; action "/etc/rc.resume acpi $notify"; }; /* EXAMPLES TO END OF FILE # An example of something that a vendor might install if you were to # add their device. This might reside in /usr/local/etc/devd/deqna.conf. # A deqna is, in this hypothetical example, a pccard ethernet-like device. # Students of history may know other devices by this name, and will get # the in-jokes in this entry. nomatch 10 { match "bus" "pccard[0-9]+"; match "manufacturer" "0x1234"; match "product" "0x2323"; action "kldload -n if_deqna"; }; attach 10 { device-name "deqna[0-9]+"; action "/etc/pccard_ether $device-name start"; }; detach 10 { device-name "deqna[0-9]+"; action "/etc/pccard_ether $device-name stop"; }; # Examples of notify hooks. A notify is a generic way for a kernel # subsystem to send event notification to userland. # Here are some examples of ACPI notify handlers. ACPI subsystems that # generate notifies include the AC adapter, power/sleep buttons, # control method batteries, lid switch, and thermal zones. # # Information returned is not always the same as the ACPI notify # events. See the ACPI specification for more information about # notifies. Here is the information returned for each subsystem: # # ACAD: AC line state (0 is offline, 1 is online) # Button: Button pressed (0 for power, 1 for sleep) # CMBAT: ACPI battery events # Lid: Lid state (0 is closed, 1 is open) # Suspend, Resume: Suspend and resume notification # Thermal: ACPI thermal zone events # # This example calls a script when the AC state changes, passing the # notify value as the first argument. If the state is 0x00, it might # call some sysctls to implement economy mode. If 0x01, it might set # the mode to performance. notify 10 { match "system" "ACPI"; match "subsystem" "ACAD"; action "/etc/acpi_ac $notify"; }; # This example works around a memory leak in PostgreSQL, restarting # it when the "user:pgsql:swap:devctl=1G" rctl(8) rule gets triggered. notify 0 { match "system" "RCTL"; match "rule" "user:70:swap:.*"; action "/usr/local/etc/rc.d/postgresql restart"; }; # Discard autofs caches, useful for the -media special map. notify 100 { match "system" "GEOM"; match "subsystem" "DEV"; action "/usr/sbin/automount -c"; }; # Handle userland coredumps. # This commented out handler makes it possible to run an # automated debugging session after the core dump is generated. # Replace action with a proper coredump handler, but be aware that # it will run with elevated privileges. notify 10 { match "system" "kernel"; match "subsystem" "signal"; match "type" "coredump"; action "logger $comm $core"; }; */ Index: head/share/man/man4/adv.4 =================================================================== --- head/share/man/man4/adv.4 (revision 314109) +++ head/share/man/man4/adv.4 (revision 314110) @@ -1,227 +1,226 @@ .\" .\" Copyright (c) 1998, 2000 .\" Justin T. Gibbs. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd August 8, 2004 .Dt ADV 4 .Os .Sh NAME .Nm adv .Nd Advansys ISA/VL/PCI Narrow 8bit SCSI Host adapter driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" .Cd "device adv" .Pp For one or more VL/ISA cards: .Cd "device isa" .Pp In .Pa /boot/device.hints : .Cd hint.adv.0.at="isa" .Pp For one or more PCI cards: .Cd "device pci" .Ed .Sh DESCRIPTION This driver provides access to the narrow 8bit .Tn SCSI bus connected to the Advanced Systems Products, Inc. .Tn ASC900 , .Tn ASC1000 , .Tn ASC1090 , .Tn ASC1200 , .Tn ASC3030 , .Tn ASC3050 , and .Tn ASC3150 host adapter chips. The following tables list the AdvanSys products using these chips, their bus attachment type, maximum sync rate, and the maximum number of commands that can be handled by the adapter concurrently. .Bd -ragged -offset indent Connectivity Products: .Bl -column "ABP510/5150 " "ISA PnP " "Floppy " "MaxSync " "Commands " "Footnotes " .Em "Adapter" Ta Em "Bus" Ta Em "Floppy" Ta Em "MaxSync" Ta Em "Commands" Ta Em "Footnotes" .It "ABP510/5150" Ta "ISA" Ta "\&No" Ta "10MHz" Ta "240" Ta "1" .It "ABP5140" Ta "ISA PnP" Ta "\&No" Ta "10MHz" Ta "16" Ta "1, 3" .It "ABP5142" Ta "ISA PnP" Ta "Yes" Ta "10MHz" Ta "16" Ta "4" .It "ABP[3]902" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" .It "ABP3905" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" .It "ABP915" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" .It "ABP920" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" .It "ABP3922" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" .It "ABP3925" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" .It "ABP930" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "5" .It "ABP930U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta "" .It "ABP930UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta "" .It "ABP960" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "2" .It "ABP960U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta "2" .El .Pp Footnotes: .Bl -enum -compact .It This board has been shipped by HP with the 4020i CD-R drive. The board has no BIOS so it cannot control a boot device, but it can control any secondary SCSI device. .It This board has been sold by Iomega as a Jaz Jet PCI adapter. .It This board has been sold by SIIG as the i540 SpeedMaster. .It This board has been sold by SIIG as the i542 SpeedMaster. .It This board has been sold by SIIG as the Fast SCSI Pro PCI. .El .Ed .Bd -ragged -offset indent Single Channel Products: .Bl -column "ABPX3X940UA " "PCI " "Floppy " "MaxSync " "Commands" .Em "Adapter" Ta Em "Bus" Ta Em "Floppy" Ta Em "MaxSync" Ta Em "Commands" .It "ABP542" Ta "ISA" Ta "Yes" Ta "10MHz" Ta "240" .It "ABP842" Ta "VL" Ta "Yes" Ta "10MHz" Ta "240" .It "ABP940" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240" .It "ABP[3]940UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240" .It "ABP940U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240" .It "ABP3960UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240" .It "ABP970" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240" .It "ABP970U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240" .El .Ed .Bd -ragged -offset indent Multi Channel Products (Commands are per-channel): .Bl -column "ABPX3X980UA " "PCI " "Floppy " "MaxSync " "Commands " "Channels" .Em "Adapter" Ta Em "Bus" Ta Em "Floppy" Ta Em "MaxSync" Ta Em "Commands" Ta Em "Channels" .It "ABP852" Ta "VL" Ta "Yes" Ta "10MHz" Ta "240" Ta "2" .It "ABP950" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240" Ta "2" .It "ABP980" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240" Ta "4" .It "ABP980U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240" Ta "4" .It "ABP[3]980UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta "4" .El .Ed .Pp For ISA or Vesa Local Bus adapters, one kernel hints entry is required for every card to be attached by the system. Specific values for the port address, irq and drq may be specified. If unspecified, the driver will query the device for its current settings and use those. If the port address is unspecified, the driver will search for it at one of the possible addresses. Cards configured for ISA PNP addresses are found automatically. The possible port addresses for these card are 0x110, 0x130, 0x150, 0x190, 0x210, 0x230, 0x250, and 0x330. .Pp Per target configuration performed in the .Tn AdvanceWare menu, which is accessible at boot, is honored by this driver. This includes synchronous/asynchronous transfers, maximum synchronous negotiation rate, disconnection, tagged queueing, and the host adapter's SCSI ID. The global setting for the maximum number of tagged transactions allowed per target is not honored as the CAM SCSI system will automatically determine the maximum number of tags a device can receive as well as guarantee fair resource allocation among devices. .Sh HARDWARE The .Nm driver supports the following SCSI controllers: .Pp .Bl -bullet -compact .It AdvanSys ABP510/5150 .It AdvanSys ABP5140 .It AdvanSys ABP5142 .It AdvanSys ABP902/3902 .It AdvanSys ABP3905 .It AdvanSys ABP915 .It AdvanSys ABP920 .It AdvanSys ABP3922 .It AdvanSys ABP3925 .It AdvanSys ABP930, ABP930U, ABP930UA .It AdvanSys ABP960, ABP960U .It AdvanSys ABP542 .It AdvanSys ABP842 .It AdvanSys ABP940 .It AdvanSys ABP940UA/3940UA .It AdvanSys ABP940U .It AdvanSys ABP3960UA .It AdvanSys ABP970, ABP970U .It AdvanSys ABP852 .It AdvanSys ABP950 .It AdvanSys ABP980, ABP980U .It AdvanSys ABP980UA/3980UA .El .Sh SEE ALSO .Xr adw 4 , .Xr aha 4 , -.Xr ahb 4 , .Xr ahc 4 , .Xr cd 4 , .Xr da 4 , .Xr sa 4 , .Xr scsi 4 .Sh HISTORY The .Nm driver appeared in .Fx 3.0 . .Sh AUTHORS .An -nosplit The .Nm driver was ported by .An Justin T. Gibbs from the Linux driver written by .An Bob Frey of Advanced System Products, Inc. Many thanks to AdvanSys for providing the original driver under a suitable license for use in .Fx . Index: head/share/man/man4/ahc.4 =================================================================== --- head/share/man/man4/ahc.4 (revision 314109) +++ head/share/man/man4/ahc.4 (revision 314110) @@ -1,405 +1,405 @@ .\" .\" Copyright (c) 1995, 1996, 1997, 1998, 2000 .\" Justin T. Gibbs. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd February 15, 2017 .Dt AHC 4 .Os .Sh NAME .Nm ahc .Nd Adaptec VL/ISA/PCI SCSI host adapter driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" .Cd "device ahc" .Pp For one or more PCI cards: .Cd "device pci" .Pp To allow PCI adapters to use memory mapped I/O if enabled: .Cd options AHC_ALLOW_MEMIO .Pp To configure one or more controllers to assume the target role: .Cd options AHC_TMODE_ENABLE .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following lines in .Xr loader.conf 5 : .Bd -literal -offset indent ahc_load="YES" ahc_isa_load="YES" ahc_pci_load="YES" .Ed .Sh DESCRIPTION This driver provides access to the .Tn SCSI bus(es) connected to the Adaptec AIC77xx and AIC78xx host adapter chips. .Pp Driver features include support for twin and wide busses, fast, ultra or ultra2 synchronous transfers depending on controller type, tagged queueing, SCB paging, and target mode. .Pp Memory mapped I/O can be enabled for PCI devices with the .Dq Dv AHC_ALLOW_MEMIO configuration option. Memory mapped I/O is more efficient than the alternative, programmed I/O. Most PCI BIOSes will map devices so that either technique for communicating with the card is available. In some cases, usually when the PCI device is sitting behind a PCI->PCI bridge, the BIOS may fail to properly initialize the chip for memory mapped I/O. The typical symptom of this problem is a system hang if memory mapped I/O is attempted. Most modern motherboards perform the initialization correctly and work fine with this option enabled. .Pp Individual controllers may be configured to operate in the target role through the .Dq Dv AHC_TMODE_ENABLE configuration option. The value assigned to this option should be a bitmap of all units where target mode is desired. For example, a value of 0x25, would enable target mode on units 0, 2, and 5. A value of 0x8a enables it for units 1, 3, and 7. .Pp Per target configuration performed in the .Tn SCSI-Select menu, accessible at boot is honored by this driver. This includes synchronous/asynchronous transfers, maximum synchronous negotiation rate, wide transfers, disconnection, the host adapter's SCSI ID. For systems that store non-volatile settings in a system specific manner rather than a serial eeprom directly connected to the aic7xxx controller, the .Tn BIOS must be enabled for the driver to access this information. This restriction applies to many chip-down motherboard configurations. .Pp Performance and feature sets vary throughout the aic7xxx product line. The following table provides a comparison of the different chips supported by the .Nm driver. Note that wide and twin channel features, although always supported by a particular chip, may be disabled in a particular motherboard or card design. .Bd -ragged -offset indent .Bl -column "aic7895CX" "MIPSX" "PCI/64X" "MaxSyncX" "MaxWidthX" "SCBsX" "2 3 4 5 6 7 8X" .It Em "Chip" Ta "MIPS" Ta "Bus" Ta "MaxSync" Ta "MaxWidth" Ta "SCBs" Ta "Features" .It "aic7770" Ta "10" Ta "VL" Ta "10MHz" Ta "16Bit" Ta "4" Ta "1" .It "aic7850" Ta "10" Ta "PCI/32" Ta "10MHz" Ta "8Bit" Ta "3" Ta "" .It "aic7860" Ta "10" Ta "PCI/32" Ta "20MHz" Ta "8Bit" Ta "3" Ta "" .It "aic7870" Ta "10" Ta "PCI/32" Ta "10MHz" Ta "16Bit" Ta "16" Ta "" .It "aic7880" Ta "10" Ta "PCI/32" Ta "20MHz" Ta "16Bit" Ta "16" Ta "" .It "aic7890" Ta "20" Ta "PCI/32" Ta "40MHz" Ta "16Bit" Ta "16" Ta "3 4 5 6 7 8" .It "aic7891" Ta "20" Ta "PCI/64" Ta "40MHz" Ta "16Bit" Ta "16" Ta "3 4 5 6 7 8" .It "aic7892" Ta "20" Ta "PCI/64" Ta "80MHz" Ta "16Bit" Ta "16" Ta "3 4 5 6 7 8" .It "aic7895" Ta "15" Ta "PCI/32" Ta "20MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5" .It "aic7895C" Ta "15" Ta "PCI/32" Ta "20MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 8" .It "aic7896" Ta "20" Ta "PCI/32" Ta "40MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 6 7 8" .It "aic7897" Ta "20" Ta "PCI/64" Ta "40MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 6 7 8" .It "aic7899" Ta "20" Ta "PCI/64" Ta "80MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 6 7 8" .El .Pp .Bl -enum -compact .It Multiplexed Twin Channel Device - One controller servicing two busses. .It Multi-function Twin Channel Device - Two controllers on one chip. .It Command Channel Secondary DMA Engine - Allows scatter gather list and SCB prefetch. .It 64 Byte SCB Support - SCSI CDB is embedded in the SCB to eliminate an extra DMA. .It Block Move Instruction Support - Doubles the speed of certain sequencer operations. .It .Sq Bayonet style Scatter Gather Engine - Improves S/G prefetch performance. .It Queuing Registers - Allows queueing of new transactions without pausing the sequencer. .It Multiple Target IDs - Allows the controller to respond to selection as a target on multiple SCSI IDs. .El .Ed .Sh HARDWARE The .Nm driver supports the following .Tn SCSI host adapter chips and .Tn SCSI controller cards: .Pp .Bl -bullet -compact .It Adaptec .Tn AIC7770 host adapter chip .It Adaptec .Tn AIC7850 host adapter chip .It Adaptec .Tn AIC7860 host adapter chip .It Adaptec .Tn AIC7870 host adapter chip .It Adaptec .Tn AIC7880 host adapter chip .It Adaptec .Tn AIC7890 host adapter chip .It Adaptec .Tn AIC7891 host adapter chip .It Adaptec .Tn AIC7892 host adapter chip .It Adaptec .Tn AIC7895 host adapter chip .It Adaptec .Tn AIC7896 host adapter chip .It Adaptec .Tn AIC7897 host adapter chip .It Adaptec .Tn AIC7899 host adapter chip .It Adaptec .Tn 274X(W) .It Adaptec .Tn 274X(T) .It Adaptec .Tn 2910 .It Adaptec .Tn 2915 .It Adaptec .Tn 2920C .It Adaptec .Tn 2930C .It Adaptec .Tn 2930U2 .It Adaptec .Tn 2940 .It Adaptec .Tn 2940J .It Adaptec .Tn 2940N .It Adaptec .Tn 2940U .It Adaptec .Tn 2940AU .It Adaptec .Tn 2940UW .It Adaptec .Tn 2940UW Dual .It Adaptec .Tn 2940UW Pro .It Adaptec .Tn 2940U2W .It Adaptec .Tn 2940U2B .It Adaptec .Tn 2950U2W .It Adaptec .Tn 2950U2B .It Adaptec .Tn 19160B .It Adaptec .Tn 29160B .It Adaptec .Tn 29160N .It Adaptec .Tn 3940 .It Adaptec .Tn 3940U .It Adaptec .Tn 3940AU .It Adaptec .Tn 3940UW .It Adaptec .Tn 3940AUW .It Adaptec .Tn 3940U2W .It Adaptec .Tn 3950U2 .It Adaptec .Tn 3960 .It Adaptec .Tn 39160 .It Adaptec .Tn 3985 .It Adaptec .Tn 4944UW .It Many motherboards with on-board .Tn SCSI support .El .Sh SCSI CONTROL BLOCKS (SCBs) Every transaction sent to a device on the SCSI bus is assigned a .Sq SCSI Control Block (SCB). The SCB contains all of the information required by the controller to process a transaction. The chip feature table lists the number of SCBs that can be stored in on-chip memory. All chips with model numbers greater than or equal to 7870 allow for the on chip SCB space to be augmented with external SRAM up to a maximum of 255 SCBs. Very few Adaptec controller configurations have external SRAM. .Pp If external SRAM is not available, SCBs are a limited resource. Using the SCBs in a straight forward manner would only allow the driver to handle as many concurrent transactions as there are physical SCBs. To fully utilize the SCSI bus and the devices on it, requires much more concurrency. The solution to this problem is .Em SCB Paging , a concept similar to memory paging. SCB paging takes advantage of the fact that devices usually disconnect from the SCSI bus for long periods of time without talking to the controller. The SCBs for disconnected transactions are only of use to the controller when the transfer is resumed. When the host queues another transaction for the controller to execute, the controller firmware will use a free SCB if one is available. Otherwise, the state of the most recently disconnected (and therefore most likely to stay disconnected) SCB is saved, via dma, to host memory, and the local SCB reused to start the new transaction. This allows the controller to queue up to 255 transactions regardless of the amount of SCB space. Since the local SCB space serves as a cache for disconnected transactions, the more SCB space available, the less host bus traffic consumed saving and restoring SCB data. .Sh SEE ALSO .Xr aha 4 , -.Xr ahb 4 , +.Xr ahd 4 , .Xr cd 4 , .Xr da 4 , .Xr sa 4 , .Xr scsi 4 .Sh HISTORY The .Nm driver appeared in .Fx 2.0 . .Sh AUTHORS The .Nm driver, the .Tn AIC7xxx sequencer-code assembler, and the firmware running on the aic7xxx chips was written by .An Justin T. Gibbs . .Sh BUGS Some Quantum drives (at least the Empire 2100 and 1080s) will not run on an .Tn AIC7870 Rev B in synchronous mode at 10MHz. Controllers with this problem have a 42 MHz clock crystal on them and run slightly above 10MHz. This confuses the drive and hangs the bus. Setting a maximum synchronous negotiation rate of 8MHz in the .Tn SCSI-Select utility will allow normal operation. .Pp Although the Ultra2 and Ultra160 products have sufficient instruction ram space to support both the initiator and target roles concurrently, this configuration is disabled in favor of allowing the target role to respond on multiple target ids. A method for configuring dual role mode should be provided. .Pp Tagged Queuing is not supported in target mode. .Pp Reselection in target mode fails to function correctly on all high voltage differential boards as shipped by Adaptec. Information on how to modify HVD board to work correctly in target mode is available from Adaptec. Index: head/share/man/man4/man4.i386/aic.4 =================================================================== --- head/share/man/man4/man4.i386/aic.4 (revision 314109) +++ head/share/man/man4/man4.i386/aic.4 (revision 314110) @@ -1,80 +1,79 @@ .\" .\" Copyright (c) 1994 James A. Jegers .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd November 8, 2003 .Dt AIC 4 i386 .Os .Sh NAME .Nm aic .Nd Adaptec AIC-6260 and AIC-6360 SCSI driver .Sh SYNOPSIS .Cd "device aic" .Pp In .Pa /boot/device.hints : .Cd hint.aic.0.at="isa" .Sh DESCRIPTION The .Nm driver provides support for the Adaptec AIC-6260 and AIC-6360 SCSI controller chips. Many systems that use these controller chips do not have a boot ROM and therefore cannot be booted from. .Sh HARDWARE The adapters supported by the .Nm driver include: .Pp .Bl -bullet -compact .It Adaptec AHA-1505 (ISA) .It Adaptec AHA-1510A, AHA-1510B (ISA) .It Adaptec AHA-1520A, AHA-1520B (ISA) .It Adaptec AHA-1522A, AHA-1522B (ISA) .It Adaptec AHA-1535 (ISA) .It Creative Labs SoundBlaster SCSI host adapter (ISA) .It Adaptec AHA-1460, AHA-1460B, AHA-1460C, AHA-1460D (PC Card) .El .Sh SEE ALSO .Xr aha 4 , -.Xr ahb 4 , .Xr ahc 4 , .Xr cd 4 , .Xr ch 4 , .Xr da 4 , .Xr intro 4 , .Xr sa 4 .Sh BUGS The driver does not work well with multiple devices on the SCSI bus. The driver works well with devices like CDROMs and Tape drives. The driver works not so well with disk drives. The PC Card version appears to work better than the ISA version, but that may be due to differing levels of testing of the devices. Index: head/share/man/man4/scsi.4 =================================================================== --- head/share/man/man4/scsi.4 (revision 314109) +++ head/share/man/man4/scsi.4 (revision 314110) @@ -1,354 +1,354 @@ .\" Copyright (c) 1996 .\" Julian Elischer . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd January 15, 2017 .Dt CAM 4 .Os .Sh NAME .Nm CAM .Nd Common Access Method SCSI/ATA subsystem .Sh SYNOPSIS .Cd "device scbus" .Cd "device ada" .Cd "device cd" .Cd "device ch" .Cd "device da" .Cd "device pass" .Cd "device pt" .Cd "device sa" .Cd "options CAMDEBUG" .Cd "options CAM_DEBUG_BUS=-1" .Cd "options CAM_DEBUG_TARGET=-1" .Cd "options CAM_DEBUG_LUN=-1" .Cd "options CAM_DEBUG_COMPILE=CAM_DEBUG_INFO|CAM_DEBUG_CDB|CAM_DEBUG_PROBE" .Cd "options CAM_DEBUG_FLAGS=CAM_DEBUG_INFO|CAM_DEBUG_CDB" .Cd "options CAM_MAX_HIGHPOWER=4" .Cd "options SCSI_NO_SENSE_STRINGS" .Cd "options SCSI_NO_OP_STRINGS" .Cd "options SCSI_DELAY=8000" .Sh DESCRIPTION The .Nm subsystem provides a uniform and modular system for the implementation of drivers to control various .Tn SCSI and .Tn ATA devices, and to utilize different .Tn SCSI and .Tn ATA host adapters through host adapter drivers. When the system probes buses, it attaches any devices it finds to the appropriate drivers. The .Xr pass 4 driver, if it is configured in the kernel, will attach to all devices. .Sh KERNEL CONFIGURATION There are a number of generic kernel configuration options for the .Nm subsystem: .Bl -tag -width SCSI_NO_SENSE_STRINGS .It Dv CAMDEBUG This option compiles in all the .Nm debugging printf code. This will not actually cause any debugging information to be printed out when included by itself. See below for details. .It Dv "CAM_MAX_HIGHPOWER=4" This sets the maximum allowable number of concurrent "high power" commands. A "high power" command is a command that takes more electrical power than most to complete. An example of this is the .Tn SCSI START UNIT command. Starting a disk often takes significantly more electrical power than normal operation. This option allows the user to specify how many concurrent high power commands may be outstanding without overloading the power supply on his computer. .It Dv SCSI_NO_SENSE_STRINGS This eliminates text descriptions of each .Tn SCSI Additional Sense Code and Additional Sense Code Qualifier pair. Since this is a fairly large text database, eliminating it reduces the size of the kernel somewhat. This is primarily necessary for boot floppies and other low disk space or low memory space environments. In most cases, though, this should be enabled, since it speeds the interpretation of .Tn SCSI error messages. Do not let the "kernel bloat" zealots get to you -- leave the sense descriptions in your kernel! .It Dv SCSI_NO_OP_STRINGS This disables text descriptions of each .Tn SCSI opcode. This option, like the sense string option above, is primarily useful for environments like a boot floppy where kernel size is critical. Enabling this option for normal use is not recommended, since it slows debugging of .Tn SCSI problems. .It Dv SCSI_DELAY=8000 This is the .Tn SCSI "bus settle delay." In .Nm , it is specified in .Em milliseconds , not seconds like the old .Tn SCSI layer used to do. When the kernel boots, it sends a bus reset to each .Tn SCSI bus to tell each device to reset itself to a default set of transfer negotiations and other settings. Most .Tn SCSI devices need some amount of time to recover from a bus reset. Newer disks may need as little as 100ms, while old, slow devices may need much longer. If the .Dv SCSI_DELAY is not specified, it defaults to 2 seconds. The minimum allowable value for .Dv SCSI_DELAY is "100", or 100ms. One special case is that if the .Dv SCSI_DELAY is set to 0, that will be taken to mean the "lowest possible value." In that case, the .Dv SCSI_DELAY will be reset to 100ms. .El .Pp All devices and buses support dynamic allocation so that an upper number of devices and controllers does not need to be configured; .Cd "device da" will suffice for any number of disk drivers. .Pp The devices are either .Em wired so they appear as a particular device unit or .Em counted so that they appear as the next available unused unit. .Pp Units are wired down by setting kernel environment hints. This is usually done either interactively from the .Xr loader 8 , or automatically via the .Pa /boot/device.hints file. The basic syntax is: .Bd -literal -offset indent hint.device.unit.property="value" .Ed .Pp Individual .Nm bus numbers can be wired down to specific controllers with a config line similar to the following: .Bd -literal -offset indent hint.scbus.0.at="ahd1" .Ed .Pp This assigns .Nm bus number 0 to the .Em ahd1 driver instance. For controllers supporting more than one bus, a particular bus can be assigned as follows: .Bd -literal -offset indent hint.scbus.0.at="ahc1" hint.scbus.0.bus="1" .Ed .Pp This assigns .Nm bus 0 to the bus 1 instance on .Em ahc1 . Peripheral drivers can be wired to a specific bus, target, and lun as so: .Bd -literal -offset indent hint.da.0.at="scbus0" hint.da.0.target="0" hint.da.0.unit="0" .Ed .Pp This assigns .Em da0 to target 0, unit (lun) 0 of scbus 0. Omitting the target or unit hints will instruct .Nm to treat them as wildcards and use the first respective counted instances. These examples can be combined together to allow a peripheral device to be wired to any particular controller, bus, target, and/or unit instance. .Pp When you have a mixture of wired down and counted devices then the counting begins with the first non-wired down unit for a particular type. That is, if you have a disk wired down as .Em "device da1" , then the first non-wired disk shall come on line as .Em da2 . .Sh ADAPTERS The system allows common device drivers to work through many different types of adapters. The adapters take requests from the upper layers and do all IO between the .Tn SCSI or .Tn ATA bus and the system. The maximum size of a transfer is governed by the adapter. Most adapters can transfer 64KB in a single operation, however many can transfer larger amounts. .Sh TARGET MODE Some adapters support .Em target mode in which the system is capable of operating as a device, responding to operations initiated by another system. Target mode is supported for some adapters, but is not yet complete for this version of the .Nm .Tn SCSI subsystem. .Sh FILES see other .Nm device entries. .Sh DIAGNOSTICS An XPT_DEBUG CCB can be used to enable various amounts of tracing information on any specific bus/device from the list of options compiled into the kernel. There are currently seven debugging flags that may be compiled in and used: .Bl -tag -width CAM_DEBUG_SUBTRACE .It Dv CAM_DEBUG_INFO This flag enables general informational printfs for the device or devices in question. .It Dv CAM_DEBUG_TRACE This flag enables function-level command flow tracing. i.e.\& kernel printfs will happen at the entrance and exit of various functions. .It Dv CAM_DEBUG_SUBTRACE This flag enables debugging output internal to various functions. .It Dv CAM_DEBUG_CDB This flag will cause the kernel to print out all .Tn ATA and .Tn SCSI commands sent to a particular device or devices. .It Dv CAM_DEBUG_XPT This flag will enable command scheduler tracing. .It Dv CAM_DEBUG_PERIPH This flag will enable peripheral drivers messages. .It Dv CAM_DEBUG_PROBE This flag will enable devices probe process tracing. .El .Pp Some of these flags, most notably .Dv CAM_DEBUG_TRACE and .Dv CAM_DEBUG_SUBTRACE , will produce kernel printfs in EXTREME numbers. .Pp Users can enable debugging from their kernel config file, by using the following kernel config options: .Bl -tag -width CAM_DEBUG_COMPILE .It Dv CAMDEBUG This builds into the kernel all possible .Nm debugging. .It Dv CAM_DEBUG_COMPILE This allows to specify support for which debugging flags described above should be built into the kernel. Flags may be ORed together if the user wishes to see printfs for multiple debugging levels. .It Dv CAM_DEBUG_FLAGS This allows to set the various debugging flags from a kernel config file. .It Dv CAM_DEBUG_BUS Specify a bus to debug. To debug all buses, set this to -1. .It Dv CAM_DEBUG_TARGET Specify a target to debug. To debug all targets, set this to -1. .It Dv CAM_DEBUG_LUN Specify a lun to debug. To debug all luns, set this to -1. .El .Pp Users may also enable debugging on the fly by using the .Xr camcontrol 8 utility, if wanted options built into the kernel. See .Xr camcontrol 8 for details. .Sh SEE ALSO .Xr ada 4 , .Xr aha 4 , -.Xr ahb 4 , .Xr ahc 4 , +.Xr ahd 4 , .Xr ahci 4 , .Xr ata 4 , .Xr bt 4 , .Xr cd 4 , .Xr ch 4 , .Xr da 4 , .Xr pass 4 , .Xr pt 4 , .Xr sa 4 , .Xr xpt 4 , .Xr camcontrol 8 .Sh HISTORY The .Nm .Tn SCSI subsystem first appeared in .Fx 3.0 . The .Nm ATA support was added in .Fx 8.0 . .Sh AUTHORS .An -nosplit The .Nm .Tn SCSI subsystem was written by .An Justin Gibbs and .An Kenneth Merry . The .Nm .Tn ATA support was added by .An Alexander Motin Aq Mt mav@FreeBSD.org .