Abstract:
Apparatus and method for implementing a local proactive hot plug request/acknowledge scheme is disclosed. In a preferred embodiment, each hot pluggable device installable on a computer bus, such as a SCSI bus, is provided with a physical user interface comprising a mechanical request initiator, such as a button or two-position switch, for allowing a user to generate a hot swap request to a controller associated with the bus prior to actual installation of the device on, or removal of the device from, the bus. Upon receipt of the request, the controller determines whether the requested action may be performed, provides a visual indication of its determination to the user via an LED on the user interface and, if installation or removal is determined to be prudent, performs the hot installation/removal in an orderly manner so as not to adversely affect ongoing system operations.

Description:
This is a continuation of application Ser. No. 08/271,617 filed on Jul. 7, 1994 U.S. Pat. No. 5,579,491. 
    
    
     TECHNICAL FIELD 
     The invention relates generally to systems for enabling hot installation of peripheral devices on and hot removal of peripheral devices from a computer bus and, more specifically, to an apparatus and a method for implementing a local proactive hot swap request/acknowledge scheme. 
     BACKGROUND OF THE INVENTION 
     Numerous apparatuses and methods for enabling hot installation of peripheral devices, control circuits and power supplies on and hot removal of same from computer buses are known in the art. Historically, in order to minimize the potentially detrimental effects of plugging into a bus, the preferred procedure has been to shut down the bus, thereby preventing a newly installed device from disrupting data flow on the bus. In contrast, &#34;hot plugging,&#34; or &#34;hot swapping,&#34; methods provide both power and data transfer interconnections between a computer bus and a newly installed device without requiring power to be removed from the bus. Hot plugging is commonly implemented in fault tolerant computer systems, which normally employ device or field replaceable unit redundancy coupled with operational comparison and checking logic to ensure correct operation. When a fault is detected, an indication of the failing device is provided to service personnel, who then simply remove the failing device and install a replacement therefor. Such removal and installation procedures are performed without regard to bus activity; therefore, both the bus architecture and device electronics must be carefully designed to achieve such hot plugging capability. 
     In many hot plug schemes, there is no provision for indicating to the system that a drive is to be installed on or removed from the bus. In other words, a drive is simply installed or removed without first &#34;consulting&#34; with the system to determine whether such installation or removal will adversely affect the system. For example, a common prior art method of implementing hot pluggable small computer systems interface (SCSI) drive systems relies on a SCSI bus reset after a drive has already been removed or inserted. Such interface systems suffer several deficiencies. 
     For example, initiating a SCSI reset in response to the occurrence of a hot plug event causes a considerable time delay where the host operating system is stalled while waiting for data transactions to resume with the SCSI host adapter subsystem. This delay is believed to be unacceptable for certain operating systems. Furthermore, not providing an electrical power decoupling interface for each SCSI drive is considered by many skilled artisans to be electrically unreliable. SCSI drives monitor their +5 volt and +12 volt power forms and can reset themselves if a fault condition beyond their threshold range is detected. Electrically installing a SCSI drive causes a momentary power glitch which can appear to adjacent local physical drives as a power fault. In addition, removal of a drive that is not redundant, as well as removal of a drive during a diagnostics or configuration/maintenance program, will typically result in system failure. User error could easily result in such an action. Finally, electrically introducing a &#34;bad&#34; drive (i.e., one that fails normal inquiry and/or initialization) may also cause system failure. 
     Clearly, therefore, a priori knowledge that a device is about to be installed on or removed from an active bus would reduce system complexity and increase system reliability because such knowledge would (1) allow the system to determine how to deal with the additional or missing device and (2) enable the bus to be placed in a known electrical state prior to the electrical connection or disconnection of the device. 
     One known method of ameliorating the foregoing problems is to include in a computer system a proactive software interface, which enables the user to inform the system that a device is to be installed or removed prior to its respective installation or removal. Though such software interfaces do communicate a priori knowledge of the impending installation/removal of a device prior to the actual installation/removal, such software interfaces may not be implemented in many cases. 
     Therefore, what is needed is an apparatus and a method for implementing a fault tolerant hot swap request/acknowledge scheme for enabling hot swapping of a device on a computer bus without adversely affecting the integrity of the bus and/or the computer system. 
     SUMMARY OF THE INVENTION 
     The foregoing problems are solved and a technical advance is achieved by an apparatus and a method for implementing a local proactive hot plug request/acknowledge scheme. In a departure from the art, each hot pluggable device installable on a computer bus, such as a SCSI drive, is provided with a physical user interface comprising a mechanical request initiator, such as a button or two-position switch, which may be depressed or switched to generate a hot swap request to a controller associated with the bus prior to actual installation of the device on, or removal of the device from, the bus. Upon receipt of the request, the controller determines whether the hot swap may be performed, provides a visual indication of its determination via the user interface and, if installation or removal is not imprudent, performs the hot installation/removal in an orderly manner so as not to adversely affect system operations. 
     In one aspect of the invention, when a drive is to be installed onto an active bus, which installation is referred to as a &#34;hot install,&#34; the drive is first physically connected to the bus and the associated user interface button is then depressed. Depression of the button generates a hot install request, in the form of an interrupt signal, and transmits the request to the controller. Upon receipt by the controller of the hot install request, the controller generates an acknowledge signal and transmits the signal to the user interface of the drive to cause an associated light emitting diode (LED) to flash on and off. In this manner, a visual indication that the hot install request has been received and is being processed is provided. The controller then determines whether the drive may be installed on the active bus. If the controller determines that the drive should not be installed on the active bus because, for example, the drive is defective or the host (not shown) is performing maintenance or diagnostics procedures, the controller turns the LED off and the drive remains uninstalled on the bus. Alternatively, if the controller determines that the drive may be installed on the bus, it signals this determination by illuminating the LED and installing the drive on the bus in an orderly manner. 
     In another aspect of the present invention, when a drive is to be removed, from the active bus, which removal is referred to as a &#34;hot removal,&#34; the associated user interface button is depressed prior to physically, and thereby electrically, disconnecting the drive from the bus. Depression of the button generates a hot removal request, in the form of an interrupt signal to the controller. Upon receipt by the controller of the hot removal request, the controller generates an acknowledge signal to the user interface of the drive to cause the associated LED to flash on and off. In this manner, a visual indication that the hot removal request has been received and is being processed is provided. The controller then determines whether the drive may be removed from the active bus without adversely affecting system functions. If so, then the controller electrically disconnects the drive from the bus in an orderly manner. Once the drive is electrically disconnected from the bus, the controller generates a signal to the user interface to turn the LED off, indicating thereby that the drive may be physically disconnected therefrom. 
     A technical advantage achieved with the present invention is that it can determine whether a device to be removed from the bus is actually redundant and/or not critical to system operation. The results of the determination can also be indicated visually before such removal takes place. 
     Another technical advantage achieved with the present invention is that it can determine, before the installation of a device on the bus, whether the device is defective and will therefore be detrimental to the system. If the device is found defective, then installation can be prevented. 
     Another technical advantage achieved with the invention is that it provides a priori knowledge to the bus that a device is about to be removed or installed, thereby enabling the bus to be placed in a known state and a determination to be made as to how such installation or removal is to be dealt with. 
     A further technical advantage achieved with the invention is that it need not be implemented in a proprietary environment and may be implemented in a PC environment. 
     Still a further technical advantage achieved with the invention is that, in a SCSI drive system environment, it provides an electrical power decoupling interface for each SCSI drive. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a schematic block diagram of a computer system embodying features of the present invention. 
     FIGS. 2 and 3 are flowcharts illustrating control logic for performing hot installation of a drive onto and hot removal of a drive from the system of FIG. 1. 
     FIG. 4 is a schematic block diagram of an alternative embodiment of the system of FIG. 1. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 1 is a schematic block diagram of a computer subsystem 10 embodying features of the present invention. The subsystem 10, which, for illustrative purposes is considered to be a SCSI drive subsystem, is connected to a main system 11, in this case a server. The subsystem 10 comprises at least one SCSI drive 12 contained within a mechanical drive carrier 14. In a preferred embodiment, the SCSI drive 12 is connectable to a SCSI bus 16, located on a SCSI backplane 18, via special complementary connectors (not shown) mounted on the carrier 14 and a drive bay 20, which bay 20 is electrically connectable to the bus 16. The bus 16 is further connected to the server 11 via a backplane controller 22 and a SCSI controller 24 for purposes that will subsequently be described in detail. In the preferred embodiment, the backplane controller 22 need only comprise sufficient intelligence to provide a control interface between the drive 12 and the SCSI controller 24. In accordance with a feature of the present invention, a user interface comprising a request initiator, such as a mechanical switch or button 26, and a visual indicator, such as a light emitting diode (LED) 28, associated with the SCSI drive 12 is mounted on the user-accessible front panel of the carrier 14. 
     Although for purposes of explanation, only one SCSI drive is shown in FIG. 1 as being connectable to the bus 16, it should be understood that a plurality of SCSI drives, each being contained in a mechanical drive carrier upon which is mounted a user interface, may be connected to the bus 16. 
     In one aspect of the present invention, when a user wants to install the SCSI drive 12 onto the bus 16 while the bus 16 is active (a &#34;hot install&#34;), the user first connects the carrier 14 to the bay 20 on the backplane 18 to physically connect the drive 12 to the bus 16 and then depresses the button 26 on the front panel of the carrier 14. Depression of the button 26 generates a hot install request, in the form of an interrupt signal, to the controller 24 via a line 32. Although not shown, it should be understood that debouncing and decoding of the interrupt signal may be performed by special circuitry on the backplane 18. Responsive to receipt of the hot install request, under the control of control logic 30 embodied therein, the SCSI controller 24 generates an acknowledge signal to the drive carrier 14, via a line 34, to cause the LED 28 to flash on and off. In this manner, a visual indication that the hot install request has been received and is being processed is provided to the user. As will be described in detail with reference to FIG. 2, the controller 24, again under the control of control logic 30, determines whether the drive 12 may be installed on the active bus 16. If the SCSI controller 24 determines that the drive 12 may not be installed on the active bus 16 because, for example, the drive 12 is defective or the host (not shown) is performing maintenance or diagnostics procedures, the SCSI controller 24 turns the LED 28 off, using signals on the line 34, and the bay 20 remains &#34;cold.&#34; In other words, while the drive 12 may remain physically connected to the bus 16, it is not electrically connected thereto and hence cannot be communicated with. Alternatively, if the SCSI controller 24 determines that the drive 12 may be installed on the bus 16, it signals this determination to the user by illuminating the LED 28, using signals on the line 34, and then installs the drive 12 on the bus 16 in an orderly manner such that the subsystem 10 and host may communicate therewith, i.e., the bay 20 is &#34;hot.&#34; 
     Similarly, in another aspect of the present invention, prior to removal of the drive 12 from the active bus 16 (a &#34;hot removal&#34;), the user depress the button 26 on the front panel of the carrier 14 prior to physically disconnecting the carrier 14 from the bay 20. Depression of the button 26 generates a hot removal request, in the form of an interrupt signal on the line 32, to the controller 24. Again, although not shown, it should be understood that debouncing and decoding of the interrupt signal may be performed by special circuitry on the backplane 18. Responsive to receipt of the hot removal request, the SCSI controller 24 generates an acknowledge signal to the drive carrier 14 via the line 34 to cause the LED 28 to flash on and off. In this manner, a visual indication that the hot removal request has been received and is being processed is provided to the user. As will be described in detail with reference to FIG. 3, under the control of the control logic 30, the SCSI controller 24 determines whether the drive 12 may be removed from the subsystem 11 without adversely affecting system 10 functions. If so, the SCSI controller 24 electrically disconnects the drive 12 from the active bus 16 in an orderly manner. Once the drive 12 is electrically disconnected, the SCSI controller 24 generates signals to the carrier 14 on the line 34 to turn the LED 28 off, indicating to the user that the bay is cold and the carrier 14 may be physically disconnected therefrom. 
     FIGS. 2 and 3 are flowcharts of control logic implemented by the SCSI controller 24 for performing hot installation and hot removal of the drive 12, respectively, in accordance with the present invention. In step 200, the controller awaits receipt of an interrupt from the carrier 14 on the line 32. As previously discussed, such an interrupt is generated when the button 26 is depressed to initiate a hot install/remove request. Upon receipt of an interrupt, execution proceeds to step 204, in which a determination is made whether the interrupt is a hot install request. If the interrupt is not a hot install request, i.e., it is a hot removal request, execution proceeds to step 304 (FIG. 3). Otherwise, execution proceeds to step 206, in which a signal is generated to the carrier 14 to cause the LED 28 to flash on and off to acknowledge receipt of the hot install request. In step 208, a determination is made whether the system 10 can accept an additional drive at the present time. If not, execution proceeds to step 210, in which the SCSI controller 24 turns the LED 28 off and the bay 20 remains cold, and then returns to step 200 to await additional interrupts. The fact that the system 10 is performing routine maintenance or diagnostics procedures, for example, may prevent it from being able to accept an additional drive. 
     If in step 208 it is determined that the system is capable of accepting an additional drive, execution proceeds to step 212, in which the drive 12 is electrically connected to the active bus 16. In step 214, a determination is made whether the drive 12 passes inquiry by the controller 24. Such inquiry typically includes at least a determination by the SCSI controller 24 as to physical parameters (such as the number of bytes or sectors) of the drive 12. If in step 214 it is determined that the drive 12 does not pass inquiry, execution proceeds to step 216, in which the drive 12 is electrically disconnected from the bus, and then to step 210, in which the LED 28 is turned off, indicating that the bay is cold. Finally, execution returns to step 200. 
     If in step 214 it is determined that the drive 12 does pass inquiry, execution proceeds to step 218, in which the SCSI controller 24 waits for the drive 12 to spin up, and then to step 220, in which a determination is made whether the drive 12 can be initialized. If in step 220 it is determined that the drive 12 cannot be initialized, e.g., it is defective, execution proceeds to step 216, in which the drive 12 is electrically disconnected from the active bus 16, and then to step 210, in which the LED 28 is turned off, indicating that the bay 20 is cold. Finally, execution returns to step 200. 
     If in step 220 it is determined that the drive 12 can be initialized, execution proceeds to step 222, in which the SCSI controller 24 changes the LED 28 from a flashing state to a continuous on state, indicating that the bay 20 is hot, and the drive 12 is installed on the active bus 16 in a known manner. Execution then returns to step 200. 
     If in step 204, it is determined that the interrupt is not a hot install request, i.e., it is a hot removal request, execution proceeds to step 304 (FIG. 3). In step 304, the SCSI controller 24 acknowledges receipt of the interrupt by flashing the LED 28. In step 306, a determination is made whether the drive 12 may be removed without adversely affecting the system 10, i.e., whether the drive is redundant, or a spare, or not in use. If in step 306 it is determined that the drive 12 is not redundant or a spare, execution proceeds to step 308, in which the controller illuminates the LED 28, indicating that the bay 20 is hot and that the carrier 14 should not be disconnected from the bay 20, and then returns to step 200. 
     If in step 306 it is determined that the drive is redundant or a spare, execution proceeds to step 310. In step 310, a determination is made whether the system 10 is capable of removing the drive 12. For example, the system 10 may be incapable of removing a drive while it is running a diagnostics or maintenance program. If in step 310 it is determined that the system 10 is not capable of removing a drive, execution proceeds to step 308, in which the SCSI controller 24 illuminates the LED 28, indicating that the bay is still hot and that the carrier 14 should not be disconnected from the bay 20, and then returns to step 200 (FIG. 2). 
     If in step 310 it is determined that the system 10 is capable of removing a drive, execution proceeds to step 312, in which the drive 12 is electrically disconnected from the bus 16. In step 314, the SCSI controller 24 waits for the drive 12 to spin down and then proceeds to step 316, in which the SCSI controller 24 turns off the LED 28 to indicate to the user that the bay 20 is cold and the drive 12 may be physically disconnected from the backplane 18. Execution then returns to step 200 (FIG. 2). 
     Referring to FIG. 4, at the most basic level, the system of the present invention may be used for enabling the hot swapping of any type of storage, power supply, or peripheral devices which lend themselves to a redundant array. In FIG. 4, an alternative embodiment of the subsystem 10 of FIG. 1, designated by reference numeral 400, comprises an array of redundant devices 402a-402c, each including an associated a user interface 403a-403c and connected to a main, or host, system 404 via an intelligent interface 406. As previously indicated, the devices 402a-402c may comprise any number of types of storage, power supply or peripheral devices which lend themselves to a redundant array. Referring to both FIGS. 1 and 4, it should be clear that the combination of the button 26 and the LED 28 of FIG. 1 correspond to the user interfaces 403a-403c of FIG. 4, the SCSI drive 12 corresponds to the devices 402a-402c, the combination of the SCSI bus 16, SCSI backplane 18, backplane controller 22 and SCSI controller 24 of FIG. 1 correspond to the intelligent interface 406 of FIG. 4 and the server 11 of FIG. 1 corresponds to the host system 404 of FIG. 4. 
     Operation of the system shown in FIG. 4 is nearly identical to the operation of the system of FIG. 1, depending on the identity of the devices 402a-402c. For example, assuming a user wants to initiate a hot removal of the device 402b from the system 404, the user simply depresses a request initiator on the user interface 403b associated with the device 402b, responsive to which action the intelligent interface 406 determines whether the removal of the device 402b would disrupt system operations. The results of the determination of the intelligent interface 406 are then indicated to the user via a visual indicator on the associated user interface 403b, and, assuming that the interface 406 determines that removal would not disrupt system operations, the device 402b is electrically disconnected from the system 404 in an orderly manner. 
     Alternatively, assuming the user now wants to initiate a hot reinstallation of the device 402b, the user physically connects the device 402b to the interface 406 and then depresses the request initiator on the user interface 403b, responsive to which action, the interface 406 determines whether installation of the device is appropriate, substantially in accordance with the logic illustrated in FIG. 2. 
     It is understood that the present invention can take many forms and embodiments. The embodiments shown herein are intended to illustrate rather than to limit the invention, it being appreciated that variations may be made without departing from the spirit or the scope of the invention. For example, the subsystem 10 need not be a SCSI subsystem. 
     Furthermore, the SCSI drive 12 may comprise any other type of device, such as a redundant power supply. In addition, a visual indication means other than the LED 28 may be used, or an indication means other than a visual indication means, e.g., an audio indication means, such as a tone or an alarm, may be used. 
     Although illustrative embodiments of the invention have been shown and described, a wide range of modification, change and substitution is intended in the foregoing disclosure and in some instances some features of the present invention may be employed without a corresponding use of the other features. Accordingly, it is appropriate that the appended claims be construed broadly and in a manner consistent with the scope of the invention.