1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun========================================= 4*4882a593SmuzhiyunHPSA - Hewlett Packard Smart Array driver 5*4882a593Smuzhiyun========================================= 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThis file describes the hpsa SCSI driver for HP Smart Array controllers. 8*4882a593SmuzhiyunThe hpsa driver is intended to supplant the cciss driver for newer 9*4882a593SmuzhiyunSmart Array controllers. The hpsa driver is a SCSI driver, while the 10*4882a593Smuzhiyuncciss driver is a "block" driver. Actually cciss is both a block 11*4882a593Smuzhiyundriver (for logical drives) AND a SCSI driver (for tape drives). This 12*4882a593Smuzhiyun"split-brained" design of the cciss driver is a source of excess 13*4882a593Smuzhiyuncomplexity and eliminating that complexity is one of the reasons 14*4882a593Smuzhiyunfor hpsa to exist. 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunSupported devices 17*4882a593Smuzhiyun================= 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun- Smart Array P212 20*4882a593Smuzhiyun- Smart Array P410 21*4882a593Smuzhiyun- Smart Array P410i 22*4882a593Smuzhiyun- Smart Array P411 23*4882a593Smuzhiyun- Smart Array P812 24*4882a593Smuzhiyun- Smart Array P712m 25*4882a593Smuzhiyun- Smart Array P711m 26*4882a593Smuzhiyun- StorageWorks P1210m 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunAdditionally, older Smart Arrays may work with the hpsa driver if the kernel 29*4882a593Smuzhiyunboot parameter "hpsa_allow_any=1" is specified, however these are not tested 30*4882a593Smuzhiyunnor supported by HP with this driver. For older Smart Arrays, the cciss 31*4882a593Smuzhiyundriver should still be used. 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunThe "hpsa_simple_mode=1" boot parameter may be used to prevent the driver from 34*4882a593Smuzhiyunputting the controller into "performant" mode. The difference is that with simple 35*4882a593Smuzhiyunmode, each command completion requires an interrupt, while with "performant mode" 36*4882a593Smuzhiyun(the default, and ordinarily better performing) it is possible to have multiple 37*4882a593Smuzhiyuncommand completions indicated by a single interrupt. 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunHPSA specific entries in /sys 40*4882a593Smuzhiyun============================= 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun In addition to the generic SCSI attributes available in /sys, hpsa supports 43*4882a593Smuzhiyun the following attributes: 44*4882a593Smuzhiyun 45*4882a593SmuzhiyunHPSA specific host attributes 46*4882a593Smuzhiyun============================= 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun :: 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun /sys/class/scsi_host/host*/rescan 51*4882a593Smuzhiyun /sys/class/scsi_host/host*/firmware_revision 52*4882a593Smuzhiyun /sys/class/scsi_host/host*/resettable 53*4882a593Smuzhiyun /sys/class/scsi_host/host*/transport_mode 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun the host "rescan" attribute is a write only attribute. Writing to this 56*4882a593Smuzhiyun attribute will cause the driver to scan for new, changed, or removed devices 57*4882a593Smuzhiyun (e.g. hot-plugged tape drives, or newly configured or deleted logical drives, 58*4882a593Smuzhiyun etc.) and notify the SCSI midlayer of any changes detected. Normally this is 59*4882a593Smuzhiyun triggered automatically by HP's Array Configuration Utility (either the GUI or 60*4882a593Smuzhiyun command line variety) so for logical drive changes, the user should not 61*4882a593Smuzhiyun normally have to use this. It may be useful when hot plugging devices like 62*4882a593Smuzhiyun tape drives, or entire storage boxes containing pre-configured logical drives. 63*4882a593Smuzhiyun 64*4882a593Smuzhiyun The "firmware_revision" attribute contains the firmware version of the Smart Array. 65*4882a593Smuzhiyun For example:: 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun root@host:/sys/class/scsi_host/host4# cat firmware_revision 68*4882a593Smuzhiyun 7.14 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun The transport_mode indicates whether the controller is in "performant" 71*4882a593Smuzhiyun or "simple" mode. This is controlled by the "hpsa_simple_mode" module 72*4882a593Smuzhiyun parameter. 73*4882a593Smuzhiyun 74*4882a593Smuzhiyun The "resettable" read-only attribute indicates whether a particular 75*4882a593Smuzhiyun controller is able to honor the "reset_devices" kernel parameter. If the 76*4882a593Smuzhiyun device is resettable, this file will contain a "1", otherwise, a "0". This 77*4882a593Smuzhiyun parameter is used by kdump, for example, to reset the controller at driver 78*4882a593Smuzhiyun load time to eliminate any outstanding commands on the controller and get the 79*4882a593Smuzhiyun controller into a known state so that the kdump initiated i/o will work right 80*4882a593Smuzhiyun and not be disrupted in any way by stale commands or other stale state 81*4882a593Smuzhiyun remaining on the controller from the previous kernel. This attribute enables 82*4882a593Smuzhiyun kexec tools to warn the user if they attempt to designate a device which is 83*4882a593Smuzhiyun unable to honor the reset_devices kernel parameter as a dump device. 84*4882a593Smuzhiyun 85*4882a593SmuzhiyunHPSA specific disk attributes 86*4882a593Smuzhiyun----------------------------- 87*4882a593Smuzhiyun 88*4882a593Smuzhiyun :: 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun /sys/class/scsi_disk/c:b:t:l/device/unique_id 91*4882a593Smuzhiyun /sys/class/scsi_disk/c:b:t:l/device/raid_level 92*4882a593Smuzhiyun /sys/class/scsi_disk/c:b:t:l/device/lunid 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun (where c:b:t:l are the controller, bus, target and lun of the device) 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun For example:: 97*4882a593Smuzhiyun 98*4882a593Smuzhiyun root@host:/sys/class/scsi_disk/4:0:0:0/device# cat unique_id 99*4882a593Smuzhiyun 600508B1001044395355323037570F77 100*4882a593Smuzhiyun root@host:/sys/class/scsi_disk/4:0:0:0/device# cat lunid 101*4882a593Smuzhiyun 0x0000004000000000 102*4882a593Smuzhiyun root@host:/sys/class/scsi_disk/4:0:0:0/device# cat raid_level 103*4882a593Smuzhiyun RAID 0 104*4882a593Smuzhiyun 105*4882a593SmuzhiyunHPSA specific ioctls 106*4882a593Smuzhiyun==================== 107*4882a593Smuzhiyun 108*4882a593Smuzhiyun For compatibility with applications written for the cciss driver, many, but 109*4882a593Smuzhiyun not all of the ioctls supported by the cciss driver are also supported by the 110*4882a593Smuzhiyun hpsa driver. The data structures used by these are described in 111*4882a593Smuzhiyun include/linux/cciss_ioctl.h 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun CCISS_DEREGDISK, CCISS_REGNEWDISK, CCISS_REGNEWD 114*4882a593Smuzhiyun The above three ioctls all do exactly the same thing, which is to cause the driver 115*4882a593Smuzhiyun to rescan for new devices. This does exactly the same thing as writing to the 116*4882a593Smuzhiyun hpsa specific host "rescan" attribute. 117*4882a593Smuzhiyun 118*4882a593Smuzhiyun CCISS_GETPCIINFO 119*4882a593Smuzhiyun Returns PCI domain, bus, device and function and "board ID" (PCI subsystem ID). 120*4882a593Smuzhiyun 121*4882a593Smuzhiyun CCISS_GETDRIVVER 122*4882a593Smuzhiyun Returns driver version in three bytes encoded as:: 123*4882a593Smuzhiyun 124*4882a593Smuzhiyun (major_version << 16) | (minor_version << 8) | (subminor_version) 125*4882a593Smuzhiyun 126*4882a593Smuzhiyun CCISS_PASSTHRU, CCISS_BIG_PASSTHRU 127*4882a593Smuzhiyun Allows "BMIC" and "CISS" commands to be passed through to the Smart Array. 128*4882a593Smuzhiyun These are used extensively by the HP Array Configuration Utility, SNMP storage 129*4882a593Smuzhiyun agents, etc. See cciss_vol_status at http://cciss.sf.net for some examples. 130