Patch Name: PHKL_22854 Patch Description: s700 10.20 stape cumulative patch Creation Date: 01/05/17 Post Date: 01/05/25 Hardware Platforms - OS Releases: s700: 10.20 Products: N/A Filesets: OS-Core.CORE-KRN OS-Core.KERN-RUN ProgSupport.C-INC Automatic Reboot?: Yes Status: General Release Critical: Yes PHKL_22854: PANIC The danger of panic is only valid when using Fujitsu tape drives. PHKL_18270: PANIC Panic has only been seen with a failing DLT tape drive. Path Name: /hp-ux_patches/s700/10.X/PHKL_22854 Symptoms: PHKL_22854: (SR: 8606171653 CR: JAGad40917) When using a Fujitsu tape drive, the system may panic during open due to a data page fault. The following stack trace is seen: panic+0x14 report_trap_or_int_and_panic+0x4c trap+0xea8 $RDB_trap_patch+0x38 st_fuji_mode_enable+0xfc st_open+0x1434 scsi_lun_open+0x718 stape_open+0xc4 call_open_close+0x114 opend+0x108 spec_open+0x6c vns_copen+0x48 vn_open+0x88 copen+0xdc open+0x38 syscall+0x1c8 $syscallrtn+0x0 (SR: 8606173155 CR: JAGad42415) An open to a freshly reset or powered-on DLT tape drive loaded with media attached to a FC-SCSI Bridge will fail with errno EIO. (SR: 8606185116 CR: JAGad54318) When sharing a tape drive between two servers, running the command insf or mksf on one host (HOST A) to create special device files for the tape device will cause any command on the other server (Host B) to the tape drive to fail with an EBUSY. PHKL_22285: (SR: 8606163661 CR: JAGad32965) No symptoms. Enhancement request for DLT1 and Ultrium-1 tape drive support. (SR: 8606163664 CR: JAGad32968) MTIOCGET ioctl command fails when no media is loaded in drive. PHKL_22162: (SR: 8606155162 CR: JAGad24479) When sending an MTIOCGET to a tape drive that is not responding, the command completes successfully and returns erroraneous status data. (SR: 8606155172 CR: JAGad24489) Polling of a tape device in a shared tape environment may result in excessive diagnostic log entries notifying of a RESV_CONFLICT return status. (SR: 8606155170 CR: JAGad24487) The diskinfo reports an incorrect value for the capacity of a DDS4 device. (SR: 8606155168 CR: JAGad24485) The first open of a loaded tape drive after being powered on will return EBUSY. (SR: 8606155167 CR: JAGad24484) When attempting to write to a DLT tape with an older density device file (ie DLT8k drive w/ DLT4k density), the tape is not actually written to in the older format. (SR: 8606155166 CR: JAGad24483) Enhancement to add stape support of MTERASE. PHKL_20528: (SR: 8606125218 CR: JAGac40609) No symptoms, enhancement request for DDS4 autoloader and standalone support. PHKL_20590: ( SR: 8606102798 DTS: JAGab68793) This patch completes the implementation of the tunable "st_ats_enabled" which was initiated with patch PHKL_20062. The original implementation was incomplete and did not work under all circumstances. PHKL_20508: ( SR: 8606100743 DTS: JAGab31975 ) When performing an ioscan after a write() to a tape device has hung, all further commands to the tape device LUN will stall indefinitely. A reboot is required to free the LUN. PHKL_20062: ( SR: 8606101051 DTS: JAGaa40952 ) When doing an ioscan at the same time as an open() to a DLT drive, the drive may report Unexpected Disconnect and hang. ( SR: 8606102798 DTS: JAGab68793) Enhancement: Added a new tunable "st_ats_enabled" to the config file. If st_ats_enabled is set to 0 in the system config file then the driver will not attempt to reserve a tape device using the SCSI RESERVE command. The default value of st_ats_enabled is 1, meaning the driver will attempt to reserve the tape device. ( SR: 8606103542 DTS: JAGab70420) When using a DLT drive and requesting a specific density rather than "BEST", the driver was not turning on compression on the drive even when a compressed density was used. PHKL_18270: ( SR: 1653284919 DTS: JAGaa51425 ) System may panic in st_head_pos with a faulty DLT drive. This has only been seen to happen with a defective DLT tape drive. ( SR: 4701428383 DTS: JAGab16436 ) Enable DLT 8000 tape drive ( SR: 4701428391 DTS: JAGab16438 ) Sending a "seek to EOD" command to an STK 9840 drive returns EINVAL even though the drive supports the command. PHKL_17336: SR 1653262576: mksf command doesn't recognize density values for STK 9840, STK 9490, STK SD-3, IBM 3590, DDS3, and some of the DLT densities. SR 4701411116: Poor performance with an STK 9840 drive. SR 4701411090: No customer visible symptoms. Driver sends an unnecessary command to the drive. SR 1653251611: If a tape is changed while a process has the device open, no error is reported to the process. Defect Description: PHKL_22854: (SR: 8606171653 CR: JAGad40917) A statement in a Fujitsu tape drive specific open routine that checks for a null pointer has incorrect syntax. The statement does not properly check for the null pointer causing a data page fault and subsequent panic of the system. Resolution: The syntax of the routine has been changed to properly check for a null pointer. (SR: 8606173155 CR: JAGad42415) A DLT tape drive loaded with media will queue two Unit Attentions after reset or power up. The driver will retry a reserve command to flush the Unit Attentions, but the FC-SCSI bridge intercepts the reserves as expected not allowing them to flush the drives Unit Attentions. The next command after the reserve command is sent down and fails due to the pending Unit Attentions causing the open to fail with EIO. Resolution: The tape driver will now retry test unit ready commands before the reserve command to flush any pending Unit Attentions. (SR: 8606185116 CR: JAGad54318) The routine in the stape driver that provides insf and mksf with tape drive information is issuing a reserve scsi command without sending a release scsi command when complete. The tape device is then stuck in a reserved state which causes all access from another host to fail with EBUSY. Resolution: A reserve scsi command is no longer sent to the device before retrieving tape drive information. The reserve is not needed for data integrity protection as the driver does not access the media or do tape motion when retrieving tape drive information for insf and mksf. PHKL_22285: (SR: 8606163661 CR: JAGad32965) Enhancement request for DLT1 and Ultrium-1 tape drive support. Resolution: None required - enhancement request. (SR: 8606163664 CR: JAGad32968) The MTIOCGET was previously setup to return ENXIO if the drive was offline to prevent a situation when a drive not selecting on the bus may return invalid data. Resolution: MTIOCGET no longer returns ENXIO when media is not present. PHKL_22162: (SR: 8606155162 CR: JAGad24479) The MTIOCGET routine does not pass on any error generated by the drive online status check. Resolution: MTIOCGET will return ENXIO if the drive is offline. (SR: 8606155172 CR: JAGad24489) RESV_CONFLICT status causes the driver to a create a diagnostics log entry when this status is encountered. Resolution: Removed directive to log all I/O's with RESV_CONFLICT status. (SR: 8606155170 CR: JAGad24487) When getting the capacity of any DDS device via SIOC_GET_CAPACITY, the driver has a correction factor in place to correct an old DDS1 firmware bug. It applies the correction factor without considering the device type. Resolution: Driver now checks if the device is a DDS1 device before applying the correction factor. (SR: 8606155168 CR: JAGad24485) When a loaded drive is powered on, it queues up two Unit Attentions (29 and 28). During open, the first Unit Attention is captured by a test unit ready, but Unit Attention 28 notifying that the media has changed causes the reserve to fail returning EBUSY. Resolution: Added reserve retry in open routine to get past Unit Attention 28. (SR: 8606155167 CR: JAGad24484) With media loaded, a DLT drive will not apply a density requested via mode select until a write is issued. During open, the density requested by the driver is not immediately applied to drive confusing the driver on subsequent mode selects. These subsequent mode selects set the drive back to the previous density nullifying the initial density request. Resolution: Added check for DLT device to resend the requested density via mode select when setting other parameters during open. (SR: 8606155166 CR: JAGad24483) Enhancement to add support of MTERASE command. Resolution: Added MTERASE command with immediate bit off and long bit on. PHKL_20528: (SR: 8606125218 CR: JAGac40609) No defect, adds support for DDS4 drives. Resolution: None required - enhancement request PHKL_20590: ( SR: 8606102798 DTS: JAGab68793) The original 10.20 patch PHKL_20062 did not completely implement the st_ats_enabled tunable parameter enhancement request. In some cases, auto reserve-release could not be disabled. Resolution: Made the st_ats_enabled flag a system tunable. PHKL_20508: ( SR: 8606100743 DTS: JAGab31975 ) With a tape device LUN opened by stape, an ioscan pass-thru command retry will enter stape's pass-thru clean-up routine a second time releasing the LUN semaphore to an invalid, permanently locked state. Resolution: Stape does not release the LUN semaphore for the pass-thru command if the pass-thru driver is going to retry its IO attempt. PHKL_20062: ( SR: 8606101051 DTS: JAGaa40952 ) The problem is a combination of incorrect behavior from the DLT drive, incorrect behavior in SCSI services, and unusual behavior in the stape driver while attempting to work around a 7980 firmware bug. The tape driver was slowing the connection down to asynchronous mode before the initial inquiry because 7980s do not do synchronous i/o correctly. Then, if the drive was not a 7980, it would go back to synchronous. In the mean time, if a passthrough I/O attempted to negotiate for synchronous mode, the interface layer got confused with one driver asking for sync and the other asking for async. Resolution: The code was rearranged to first do the inquiry in synchronous mode, then check for a 7980 and slow down if necessary. We found through testing that the 7980 was able to handle the synchronous mode inquiry properly. ( SR: 8606102798 DTS: JAGab68793) No defect, this is a new feature based on an enhancement request. Resolution: Made the st_ats_enabled flag a system tunable. ( SR: 8606103542 DTS: JAGab70420) DLT drives specify compression in two places - embedded within the density setting, and also separately on a mode page. The driver was selecting the correct density, but was not enabling compression on the mode page. Resolution: Added flags for the DLT drives to also enable compression via the mode page PHKL_18270: ( SR: 1653284919 DTS: JAGaa51425 ) An uninitialized sense pointer was being used without being checked. Resolution: Check for NULL before deferencing the sense pointer. ( SR: 4701428383 DTS: JAGab16436 ) Enhancement request to enable DLT 8000 tape drive. Resolution: Add DLT 8000 to drives recognized by driver ( SR: 4701428391 DTS: JAGab16438 ) Seek to EOD" command to an STK 9840 drive was not allowed by the driver. Resolution: Modify the driver to allow the seek to EOD command PHKL_17336: SR 1653262576: Request to add recognition of new device densities. Resolution: Updated code with densities for newer STK and DLT drives. SR 4701411116: The drive identifies itself as a SCSI3 device. The driver was assuming that the drive was SCSI1 and so was not negotiating for wide/fast transfers. Resolution: Changed code to negotiate for fast/wide transfers for SCSI3 devices SR 4701411090: ER to avoid sending a command that we know the device will not handle. Resolution: Changed code to return an EINVAL error in response to a request to write setmarks to a device which is known to not support setmarks. SR 1653251611: The driver would respond to a media change event by retrying the I/O rather than by returning an error. Resolution: Changed code to return an EIO error if the media is changed while the device is open. The error is returned on the next access to the device. SR: 1653251611 1653262576 1653284919 4701411090 4701411108 4701411116 8606100743 8606101051 8606102798 8606103542 8606125218 8606155162 8606155166 8606155167 8606155168 8606155170 8606155172 8606163661 8606163664 8606171653 8606173155 8606185116 Patch Files: /usr/conf/h/mtio.h /usr/conf/lib/libhp-ux.a(mt_prop.o) /usr/conf/lib/libhp-ux.a(scsi_tape.o) /usr/conf/master.d/scsi-tune /usr/conf/space.h.d/scsi-tune.h /usr/include/sys/mtio.h what(1) Output: /usr/conf/h/mtio.h: mtio.h $Date: 2001/05/16 08:34:18 $ $Revision: 1.24. 98.21 $ PATCH_10.20 (PHKL_22854) /usr/conf/lib/libhp-ux.a(mt_prop.o): mt_prop.c $Date: 2001/04/06 09:36:17 $ $Revision: 1. 5.98.8 $ PATCH_10.20 (PHKL_22854) /usr/conf/lib/libhp-ux.a(scsi_tape.o): scsi_tape.c $Date: 2001/04/06 09:30:26 $ $Revision: 1.8.98.35 $ PATCH_10.20 (PHKL_22854) /usr/conf/master.d/scsi-tune: scsi-tune $Date: 99/10/14 12:29:17 $ $Revision: 1. 1.98.3 $ PATCH_10.20 (PHKL_20062) /usr/conf/space.h.d/scsi-tune.h: scsi-tune.h $Date: 99/12/14 12:38:04 $ $Revision: 1.1.98.6 $ PATCH_10.20 (PHKL_20590) /usr/include/sys/mtio.h: mtio.h $Date: 2001/05/16 08:34:18 $ $Revision: 1.24. 98.21 $ PATCH_10.20 (PHKL_22854) cksum(1) Output: 54332828 30436 /usr/conf/h/mtio.h 110099245 16080 /usr/conf/lib/libhp-ux.a(mt_prop.o) 755987251 70668 /usr/conf/lib/libhp-ux.a(scsi_tape.o) 1776574115 476 /usr/conf/master.d/scsi-tune 2433115272 1462 /usr/conf/space.h.d/scsi-tune.h 54332828 30436 /usr/include/sys/mtio.h Patch Conflicts: None Patch Dependencies: s700: 10.20: PHKL_16750 Hardware Dependencies: None Other Dependencies: None Supersedes: PHKL_17336 PHKL_18270 PHKL_20062 PHKL_20508 PHKL_20528 PHKL_20590 PHKL_22162 PHKL_22285 Equivalent Patches: PHKL_22855: s800: 10.20 Patch Package Size: 220 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHKL_22854 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHKL_22854.depot By default swinstall will archive the original software in /var/adm/sw/patch/PHKL_22854. If you do not wish to retain a copy of the original software, you can create an empty file named /var/adm/sw/patch/PATCH_NOSAVE. WARNING: If this file exists when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. It is recommended that you move the PHKL_22854.text file to /var/adm/sw/patch for future reference. To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_22854.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: This patch depends on base patch PHKL_16750. For successful installation, please ensure that PHKL_16750 is in the same depot with this patch, or PHKL_16750 is already installed.