Control device and computer-readable recording medium having stored therein control program

A control device includes a controller that controls a target device, and the controller includes a power supply controller, a detector, an obtainer, and a setting changer. The power supply controller shifts, when a port connected to another device via a cable comes into an unused state, a power supply mode to the target device and to the control device from a normal power supply mode into a power saving mode capable of receiving activation interruption. The obtainer obtains, when the detector detects the change in the mounting state of the cable, type information representing a type of the cable. The setting changer that changes setting of the cable in accordance with the type information obtained by the obtainer. This makes it possible to be surely restored to the normal power supply mode even when a cable is replaced with another type of cable in a power saving mode.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of the prior Japanese Application No. 2015-186688 filed on Sep. 24, 2015 in Japan, the entire contents of which are hereby incorporated by reference.

FIELD

The embodiments herein relate to a controller device and a computer-readable recording medium having stored therein a control program.

BACKGROUND

Some storage devices each have a large storage capacity provided by connecting multiple memory devices to one another via, for example, expander modules. An example of an expander module is an SAS expander, and examples of the memory device are an HDD and an SSD. Hereinafter, a memory device is sometimes referred to as a disk.

The term “SAS” is an abbreviation for Serial Attached SCSI; the term SCSI is an abbreviation for Small Computer System Interface. The term “HDD” is an abbreviation for a Hard Disk Drive, and the term “SSD” is an abbreviation for Solid State Drive.

Such a storage device includes a Drive Enclosure (DE) that includes multiple disks and an SAS expander, and a controller module (CM) that controls the DE. The multiple disks in the DE are connected to the CM via the SAS expander.

The SAS expander is provided with multiple SAS ports (PHYs). The multiple SAS ports include an upper connection port connected to the CM or an SAS port of an upper DE and a lower connection port connected to the upper connection port of a lower DE. Two SAS ports are connected to each other through an SAS cable.

Some recent SAS expanders (expander chips) are provided with a function of Wake on SAS. An SAS expander with the function of Wake on SAS automatically turns on and off the power source for the DE in synchronization with a link-up state of the upper connection port. For this purpose, the firmware of the SAS expander monitors, for example, the link-up state of the upper connection port. Upon detection of continuing a link-down state of all the upper connection ports for a predetermined time period (e.g., two seconds), the firmware switches the power supply to the disks and the expander chip in the DE to a consumption-power saving mode (Low Power), so that the power supply to the DE can be made into a state of being close to zero.

After being switched into the consumption-power saving mode by the above function of Wake on SAS, the SAS expander keeps only the activation interruption receiver that receives, as activation interruption, an SAS packet (Out Of Band: OOB) for restoring the power supply state to a normal power supply mode to a resident state (i.e., in a state of turning on the power supply). Then, the SAS expander turns off the power supply to the parts and elements in the DE except for the activation interruption receiver. Examples of the parts and elements in the DE except for the activation interruption receiver correspond to the multiple disks and the elements and parts in the SAS expander except for the activation interruption receiver.

The activation interruption receiver interrupts the SAS expander upon receipt and detection of an SAS packet (OOB) in the consumption-power saving mode. In response to the interruption, the firmware of the SAS expander switches the power supply state thereof from the consumption-power saving mode into a normal power supply mode, and thereby activates (Wakes up) all the disks and the entire SAS expander in the DE.

A typical SAS cable that connects SAS ports is made of Copper (hereinafter, such a cable is referred to as a Copper cable) while also an Active Optical Cable (AOC cable) has been recently used as a SAS cable. For the above, an SAS expander (expander chip) has dealt with an AOC cable as well as a Copper cable.

The specification of a Copper cable is different from that of an AOC cable. For the above, the firmware of an SAS expander specifies the type of the SAS cable (here whether the SAS cable is a Copper cable or an AOC cable), and changes the setting of an SAS port on the expander chip in accordance with the type of an SAS cable. Unless a correct setting in accordance with the type of an SAS cable is set for the SAS port, the SAS expander does not successfully receive an SAS packet for activation interruption and consequently does not restore the power supply state from the consumption-power saving mode to the normal power supply mode.

For example, when an SAS cable has been hot-swapped from a Copper cable to an AOC cable, the monitoring function of the firmware of the SAS expander detects a change in the mounting state of the SAS cable (unplugging and plugging of a cable). Detection of a change in the mounting state of the SAS cable causes the firmware to specify the type of the replacement SAS cable and changes the setting of the SAS cable in accordance with the specified type.

In contrast, when an SAS cable has been cold-swapped from a Copper cable to an AOC cable after the SAS expander is switched into the consumption-power saving mode by the above function of Wake on SAS, the functional elements of the SAS expander except for the activation interruption receiver are in the off state. Under this state, the SAS expander is not allowed to change the setting of the SAS cable. Furthermore, the SAS expander is incapable of receiving an SAS packet (OOB) as activation interruption even if the activation interruption receiver is in the resident state, so that the SAS expander would be fallen into a dead-lock state where the above function of Wake on SAS is incapable of activating the DE.

SUMMARY

According to an aspect of the embodiments, a control device includes a controller that controls a target device, and the controller includes a power supply controller, a detector, an obtainer, and a setting changer. The power supply controller shifts, when a port connected to another device via a cable comes into an unused state, a power supply state to the target device and to the control device from a normal power supply mode into a power saving mode capable of receiving activation interruption. The detector detects a change in a mounting state of the cable in the power-saving mode. The obtainer obtains, when the detector detects the change in the mounting state of the cable, type information representing a type of the cable. The setting changer changes setting of the cable in accordance with the type information obtained by the obtainer.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Hereinafter, description will now be made in relation to a control device and a computer-readable recording medium having stored therein a control program disclosed herein with reference to the drawings. The following embodiments are exemplary, so there is no intention to exclude application of various modifications and techniques not suggested in the following description to the embodiments. Namely, various changes and modifications to the embodiments can be suggested without departing from the spirit of the present invention. The accompanying drawings do not intend to include only the elements appearing therein, but may include additional elements and functions. The embodiments can be combined as far as not incurring a contradiction in the process.

(1) Hardware Configuration of a Storage Device to which the Present Invention is to be Applied

First, description will now be made in relation to a storage device1including an SAS expander (control device)32or32A according to a first or a second embodiment of the present invention by referring toFIG. 1. Here,FIG. 1is a block diagram schematically illustrating an example of the hardware configuration of a storage device1including a control device (SAS expander)32or32A according to the first or second embodiment of the present invention.

The storage device1forms virtual storage environment by, for example, virtualizing memory devices31stored in a drive enclosure (DE)30, and provides a virtual volume to a host device2.

The storage device1is communicably connected to one or more (one in the example ofFIG. 1) host devices2. Each host device2is connected to the storage device1via Communication Adaptors (CAs)101and102that are to be described below.

The host device2is an information processor having a server function, and transmits and receives commands of Network Attached Storage (NAS) and Storage Area Network (SAN) to and from the storage device1. For example, the host device2writes and reads data into and from a volume that the storage device1provides by transmitting an NAS storage access command for reading/writing to storage device1.

In response to an input-output request (e.g., a reading command or writing command) that the host device2made for the volume, the storage device1reads and writes data from and into a memory device31corresponding to the requested volume. Hereinafter, an input-output request from the host device2is sometimes referred to as an IO request and an IO command.

One host device2appears in the example ofFIG. 1. However, the number of host device2is not limited to one. Alternatively, two or more host devices2may be connected to a single storage device1.

A manager terminal3is communicably connected to the storage device1. The manager terminal3is an information processor equipped with an input device such as a keyboard and/or a mouse and a display monitor, and the user such as a system manager inputs various pieces of information into the manager terminal3. For example, the user inputs information related to various settings via the manager terminal3. The information input into the manager terminal3is transmitted to the host device2or the storage device1.

As illustrated inFIG. 1, the storage device1includes multiple (two in this embodiment) CMs100aand100band multiple stages (two stages in the example ofFIG. 1) of DEs30. The CMs100aand100bare mounted on a Controller Enclosure (CE)40.

Each DE30is accommodatable of one or more (four in the example ofFIG. 1) memory devices31and provides the storage regions (real volume, real storage) of the memory devices31to the storage device1.

For example, each DE30includes multiple stage of slots (not illustrated) and is capable of occasionally varying a real volume capacity by placing the memory devices31into these slots. In addition, the DE30is capable of configure Redundant Arrays of Inexpensive Disks (RAID) by using multiple memory devices31. Examples of a memory device31are a HDD and an SSD that stores therein various pieces of data. Hereinafter, a memory device31may sometimes be referred to as a disk.

Each DE30includes a pair of SAS expanders32,32(32A,32A). Each SAS expander32(32A) has a function of controlling a disk31, which is a control target device of the DE30. Each SAS expander32(32A) includes an upper connection port (SAS port, PHY)32aand a lower connection port (SAS port, PHY)32b, so that an added DE30(disk31) can be connected to the DE30.

Hereinafter, the upper connection port may also be referred to as an SAS input port and an upstream port while the lower connection port may also be referred to as an SAS output port and a downstream port. The SAS expander32corresponds to a control device of the first embodiment that is to be detailed below with reference toFIG. 2, and the SAS expander32A corresponds to a control device of the second embodiment that is to be detailed below with reference toFIG. 7.

A first-stage (upper side inFIG. 1) DE30is connected to the CMs100aand100bincluded in the CM40. More specifically, the upper connection port32aof one of the SAS expanders32(32A) in the first-stage DE30is connected to an SAS port109(to be detailed below) of an SAS expander103of the CM100avia an SAS cable50. Likewise, the upper connection port32aof the other of the SAS expanders32(32A) in the first-stage DE30is connected to an SAS port109(to be detailed below) of an SAS expander103of the CM100bvia an SAS cable50.

The DE30on the second stage (lower side ofFIG. 1) is connected to the lower end of the first-state DE30. More specifically, the lower connection port32bof one of the SAS expanders32(32A) in the first-stage DE30is connected to the upper connection port32aof one of the SAS expanders32(32A) of the second-stage DE30via an SAS cable50. Likewise, the lower connection port32bof the other of the SAS expanders32(32A) in the first-stage DE30is connected to the upper connection port32aof the other of the SAS expanders32(32A) of the second-stage DE30via an SAS cable50.

Likewise the connection between the first-stage DE30and the second-stage DE30, the third- and subsequent-stage DEs30can be successively connected to the lower end of the second-stage DE30via SAS cables50.

As described above, multiple stages of DEs30are connected to the lower end (the SAS ports109of the SAS expanders103of CMs100aand100b) via SAS cables50. This structure allows both the CMs100aand100bto access each DE30for data reading and writing. Namely, each disk31in each DE30is connected to both the CMs100aand100b, which means an access paths to the disk31is made redundant.

The CMs100aand100bare controllers (storage control devices) each of which controls the operation in the storage device1and specifically control various operations, such as data access to a disk31of a DE30in obedience to an IO command transmitted from the host device2. The CMs100aand100bare the same in configuration. Hereinafter, a particular one of the CMs is specified by a reference number100aand100b, but an arbitrary CM is represented by a reference number100. In addition, the CM100aand the CM100bare sometimes referred to as CM#1 and CM#2, respectively.

The CMs100aand100bform a redundant system, and under a normal state, the CM100a(CM#1) functions as a primary module in charge of various controls. In case where the primary CM100afails, the secondary CM100b(CM#2) functions as the primary device and takes over the operation of the CM100a.

The CMs100aand100bare connected to the host device2via CAs101and102. The CMs100aand100breceive an IO command such as a reading/writing command from the host device2and control a disk31via the SAS expanders103and32(32A) in obedience to the IO command. Furthermore, the CMs100aand100bare communicably connected to each other via a non-illustrated interface conforming to, for example, the Peripheral Component Interconnect express (PCIe).

As illustrated inFIG. 1, a CM100includes a Central Processing Unit (CPU)105, a memory106, a flash memory107, and an Input Output Controller (IOC)108in addition to the CAs101and102and the SAS expander103. The CAs101and102, the SAS expander103, the CPU105, the memory106, the flash memory107, and the IOC108are communicably connected to one another via, for example, a PCIe interface104.

The CAs101and102receive data transmitted from the host device2and the manager terminal3, and transmit data output from the CM100to the host device2and the manager terminal3. This means that the CAs101and102control data Input-Output (IO) into and from an external device such as the host device2.

The CA101is a network adaptor that communicably connects the local CM100to the host device2and the manager terminal3via the NAS, and is exemplified by a Local Area Network (LAN) interface. Each CM100is connected to, for example, the host device2at the CA101via a non-illustrated communication line by means of the NAS, and, with this configuration, receives an IO command and receives and transmits data. In the example ofFIG. 1, each of CMs100aand100bincludes two CAs101,101.

The CA102is a network adaptor that communicably connects the local CM100to the host device2via the SAN, and is exemplified by an Internet Small Computer System Interface (iSCSI) interface and a Fibre Channel (FC) interface. Each CM100is connected to, for example, the host device2at the CA102through a non-illustrated communication line by means of the SAN, and with this configuration, receives an IO command and transmits and receives data. In the example ofFIG. 1, one CA102is provided to each of the CMs100aand100b.

The SAS expander103is an interface that communicably connects the local CM100to the disks31and the SAS expander32(32A) in a DE30, and includes one or more SAS ports (PHYs)109. As described above, to the SAS port109, the SAS expander32(32A) in the first-stage DE30is connected via the SAS cable50. With this configuration, each CM100controls an access to a disk31on the basis of an IO command received from the host device2through the SAS expander103, the SAS cable50, and SAS expander32(32A). This means that both CM100aand100bwrite and read data into and from a disk31of a DE30.

The flash memory107is a memory device that stores therein a program to be executed by the CPU105and various pieces of data.

The memory106is a memory device that temporarily stores therein various pieces of data and a program, and is provided with, for example, a cache region and an application region. The cache region temporarily stores therein data received from the host device2and data to be transmitted to the host device2. The application region temporarily stores therein data and an application program when the CPU105is to execute the application program. The application program is, for example, a program that the CPU105executes to achieve the function of storage control of this embodiments. The application program is stored in the memory106or the flash memory107.

The IOC108is a control device that controls data forwarding in the local CM100, and achieves, for example, Direct Memory Access (DMA) forwarding capable of forwarding data stored in the memory106without the aid of the CPU105.

The CPU105is a processor that carries out various controls and calculations and is exemplified by a multicore processor (multi-CPU). The CPU105achieves various functions by executing the Operating system (OS) and an application program that are stored in the memory106and the flash memory107.

(2) Overview of a Control Device (SAS Expander) of the Present Invention

As described above, some recent SAS expanders (expander chips) are provided with the function of Wake on SAS. In the first and second embodiments to be described below, the SAS expanders32(32A) included in the DEs30are assumed to have the function of Wake on SAS while the SAS expander103of each CM100in the CE40is assumed not to be provided with the function of Wake on SAS.

The SAS expanders32(32A) having the function of Wake on SAS automatically turn on and off the power source for the DE30in synchronization with a link-up state of the upper connection ports32a. At this time, the firmware (CPU320(320A) to be described below, seeFIGS. 2 and 7) of the SAS expanders32(32A) monitors the link-up state of the upper connection ports32a. In the event of detecting continuation of a link-down state of all the upper connection ports32afor a predetermined time period (e.g., two seconds) in the above monitoring, the firmware determines all the upper connection ports32ais in an unused state. In accordance with the result of the determination, the firmware switches the power supply state to each disk31in the DE30and SAS expanders32(32A) into a consumption-power saving mode (sleep state). This makes the power supply to the DE30into a state of being almost zero.

In the consumption-power saving mode, the SAS expanders32(32A) keeps at least an activation interruption receiver325(seeFIGS. 2 and 7) that receives an SAS packet (OOB) as an activation interruption to be in a resident state (i.e., power-supplying on state). Here, an SAS packet (OOB) is a packet to restore the power supply state from the consumption-power saving mode to the normal power supply mode.

Upon receipt and detection of an SAS packet (OOB) in the consumption-power saving mode, the activation interruption receiver325interrupts the firmware of the SAS expanders32(32A). In response to the interruption, the firmware of the SAS expanders32(32A) switches the power supply state from the consumption-power saving mode to the normal power supply mode, and wakes up all the disks31in the DE30and the entire of the SAS expanders32(32A).

The SAS cables50that connect the SAS port109to the SAS port32aand connect the SAS port32ato the SAS port32bmay be Copper cables and AOC cables. For the above, the SAS expanders32(32A) of the DE30of the first and second embodiments to be detailed below are configured to deal with both a Copper cable and an AOC cable.

The specification of a Copper cable is different from that of an AOC cable. For the above, the firmware of the SAS expanders32(32A) specifies the type of the SAS cable50(here whether the SAS cable is a Copper cable or an AOC cable), and changes the setting of an SAS port32ain accordance with the type of an SAS cable50. The detailed contents of the setting will be described below with reference toFIG. 3.

Unless a correct setting in accordance with the type of an SAS cable50is set for the SAS port32a, the SAS expanders32(32A) do not successfully receive an SAS packet (OOB) for activation interruption, and consequently do not restore the power supply state from the consumption-power saving mode to the normal power supply mode.

As described above, when an SAS cable50has been hot-swapped from a different type of cable, the firmware of the SAS expanders32(32A) detects a change in the mounting state of the SAS cable50(unplugging and plugging of the cable50). Detection of a change in the mounting state of the SAS cable50causes the firmware to specify the type of the replacement SAS cable50and changes the setting of the SAS cable in accordance with the specified type.

In contrast, when an SAS cable50has been cold-swapped from a different type of cable after the power supply state is shifted into the consumption-power saving mode by the above the function of Wake on SAS, the type of the replacement SAS cable50is not reflected in the setting. Namely, the setting conforming to the type of the SAS cable50is not correctly made, the activation interruption receiver325, even in the resident state, fails to receive an SAS packet (OOB) as activation interruption. Accordingly, the SAS expanders32,32A would sometimes be fallen into a dead-lock state where the above function of Wake on SAS is incapable of activating the DE30.

For the above, the control device (SAS expander32or32A) of the present invention is configured to be capable of being surely restored to a normal power supply mode even when the SAS cable50is replaced with a different type of an SAS cable in the consumption-power saving mode (sleep state). In other words, the SAS expander32or32A is configured as follows such that the function of Wake on SAS correctly operates even when the SAS cable50is replaced with a different type of an SAS cable in the consumption-power saving mode (sleep state).

The SAS expander32or32A includes a controller (firmware)320or320A (seeFIGS. 2 and 7) that control the disks (target device)31in the DE30. The controller320or320A includes at least a power supply controller321or321A, a detector322or322A, an obtainer323, and a setting changer324(seeFIGS. 2 and 7).

The power supply controller321or321A shifts the power supply state to the disks31and the SAS expander32or32A from the normal power supply mode to the consumption-power saving mode, during which activation interruption can be received, when the upper connection port32aconnected to another devices100and30via the SAS cable50comes into an unused state. The detector322or322A detects a change in the mounting state of the SAS cable50in the consumption-power saving mode. When the detector322or322A detects a change in the mounting state of the SAS cable50, the obtainer323obtains the type information representing the type of the SAS cable. The setting changer324changes the setting of the SAS cable50in the controller320or320A in accordance with the type information obtained by the obtainer323. For example, when an SAS packet (OOB) is received as activation interruption in the consumption-power saving mode, the power supply controllers321and321A are activated and shift the power supply state from the consumption-power saving mode to the normal power supply mode.

This configuration allows the control device (SAS expander)32or32A of the present invention to surely restore the power supply state to a normal power supply mode when the SAS cable50is replaced with a different type of the SAS cable50in the consumption-power saving mode (sleep state). This means that the SAS expanders32,32A can receive an SAS packet (OOB) as activation interruption even when the SAS cable50is cold-swapped with a different type of the SAS cable50in the consumption-power saving mode, so that the above deadlock state can be cancelled and the function of Wake on SAS efficiently operates. Accordingly, the SAS expander32or32A effectively use the function of Wake on SAS, so that the power to drive the DE30can be saved.

(3) First Embodiment

Next, description will now be made with reference to the control device (SAS expander)32of the first embodiment by referring toFIGS. 2-5.

First, description will now be made in relation to the hardware and functional configurations of the SAS expander32of the first embodiment of the present invention by referring toFIG. 2.FIG. 2is a block diagram illustrating an example of the hardware and functional configurations of the SAS expander32.

The SAS expander32of the first embodiment includes at least SAS ports32a-32c, a CPU320, and a memory330.

As described above by referring toFIG. 1, the SAS port32ais an upper connection port connected to the SAS port109of the CM100or to an SAS port (lower connection port)32bof the SAS expander32included in another DE30via the SAS cable50.

Also as described above by referring toFIG. 1, the SAS port32bis a lower connection port connected to an SAS port (upper connection port)32aof the SAS expander32included in another DE30via the SAS cable50.

The SAS port32cis a port (PHY) connected to each disk31included in the DE30.

One port is illustrated for each of the SAS ports32a-32cinFIGS. 1 and 2. Alternatively, two or more ports may be provided for each of the SAS ports32a-32c.

The memory330is a memory device, such as a Random Access Memory (RAM), that stores therein various pieces of data and a program. The memory330stores therein a control program331that causes the CPU320to function as a controller (firmware) of the SAS expander32. In addition, the memory330includes a memory region332for a setting information table that stores therein a setting information table being related to the setting information of the type of SAS cable and being depicted inFIG. 3.

The control program331is provided in the form of being recorded in a non-transitory computer-readable portable recording medium. Examples of the recording medium are a magnetic disk, an optical disk, and a magneto-optical disk. Examples of an optical disk are a Compact Disk (CD), a Digital Versatile Disk (DVD), and a Blu-ray disk. Examples of a CD are a CD-ROM (Read Only Memory), and a CD-R(Recordable)/RW(ReWritable). Examples of a DVD are a DVD-RAM, a DVD-ROM, a DVD-R, a DVD+R, a DVD-RW, a DVD+RW, and a HD (High Definition) DVD.

The CPU320reads the control program331from the recording medium and stores the read control program331into an internal memory device (e.g., memory330) or into an external memory device for later use. Alternatively, the CPU320may receive the control program331through a network (not illustrated) and store the control program331in an internal or external memory device for later use.

A setting information table stored in the memory region332for a setting information table includes, for example, information as illustrated inFIG. 3.FIG. 3is a diagram illustrating an example of the setting (setting information table) for each type of the SAS cable50. As described above, the embodiments (the first and second embodiments) of the present invention use either one of a Copper cable and an AOC cable as the SAS cable50that connects SAS ports. As described above, the SAS expander32or32A is configured to be capable of dealing with both a Copper cable and an AOC cable.

As illustrated inFIG. 3, the CPU320sets the following contents for each type of SAS cable in the setting information table. The setting contents include setting for a communication device, such as on/off information of a Vact and Ptt, for each type of SAS cable50. Specifically, in cases where the type of SAS cable50connected to the SAS port32ais a Copper cable, Vact is set to “off” while Ptt is set to “on”. When the type of SAS cable50connected to the SAS port32ais an AOC cable, Vact is set to “on” while Ptt is set to “off”. The terms “Vact” and “Ptt” are abbreviations for “Voltage for active cable” and “Physical transmitter training”, respectively.

As illustrated inFIG. 2, for example, the SAS cable50of the first and second embodiments has a connector51disposed at an end thereof and a register52is attached to the connector51. The connector51is plugged into and unplugged from the SAS ports32aand32b. Whether the connector51(SAS cable50) is unplugged and plugged is detectable by the CPU320(detector322). Into the register52, type information (whether the SAS cable50is a Copper cable or an AOC cable) representing the type of SAS cable50is stored. The type information of the SAS cable50stored in the register52is obtainable by the CPU320(obtainer323).

The CPU320functions as a controller that controls the disks31in the DE30by executing the control program331stored in the memory330. Specifically, the CPU320of the first embodiment functions as at least a power supply controller321, a detector322, an obtainer323, a setting changer324, and an activation interruption receiver325.

The CPU320may also be referred to as a controller, a processor, a computer, firmware, and an expander chip. The controller may be achieved by a Micro Processing Unit (MPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), and a Field Programmable Gate Array (FPGA) in place of the CPU320. Further alternatively, the controller may be a combination of two or more of a CPU, an MPU, a DSP, an ASIC, a PLD, and an FPGA.

The consumption-power saving mode of the first embodiment corresponds to a first power saving mode that stops power supply to the disks31and the functional elements, in the SAS expander32, except for the activation interruption receiver325.

Here, the activation interruption receiver325receives, as activation interruption, an SAS packet (OOB) to restore the power supply state into a normal power supply mode in the first power saving mode. The function of the activation interruption receiver325of the first embodiment is achieved by the CPU320, but alternatively, may be achieved by a different hardware device from the CPU320.

The power supply controller321accomplishes the function of Wake on SAS. In other words, when the SAS port32acomes to be in the unused state in the normal power supply mode, the power supply controller321shifts the power supply state to the disks31and the SAS expander32from the normal power supply mode into a first power saving mode in which activation interruption can be received. When an SAS packet (OOB) is received as activation interruption (link-up interruption) in the first power saving mode, the power supply controller321is activated and shifts the power supply state from the first power saving mode into the normal power supply mode.

Here, the power supply controller321of the first embodiment has a function of monitoring a link-up state of an SAS port32a. Upon detection of continuing the link-down state of the SAS port32afor a predetermined time period (e.g., two seconds) by using this function, the power supply controller321determines that the SAS port32ais in unused state.

Specifically, the power supply controller321of the first embodiment is activated at a predetermined timing (e.g., at every one second) in the first power saving mode by using a timer function, and then temporarily supplies power to the SAS expander32. When power is temporarily supplied to the SAS expander32, only the SAS expander32is activated while the DC-power supply to the disks31and a Light Emitting Diode (LED, not illustrated) is remained to be “off” state (DC off).

The detector322detects, in the first power saving mode, whether the mounting state of the SAS cable50has been changed, which means, whether the SAS cable50(connector51) has been unplugged from and plugged into the SAS port32a.

When the detector322detects unplugging and plugging of the SAS cable50, the obtainer323obtains type information representing the type of the SAS cable50. In this event, the obtainer323reads the type information of the replacement SAS cable50that has been newly-plugged into the register52attached to the SAS cable50.

Using the type information obtained by the obtainer323as a key, the setting changer324retrieves the setting (e.g., setting for a communication device) associated with the type information from the setting information table (seeFIG. 3) that is expanded from a memory region332of the memory330on the CPU320. Then the setting changer324changes the setting of the SAS cable50held in the CPU320into setting corresponding to the obtained type information.

When the detector322detects no unplugging and plugging (replacement) of the SAS cable50or when the setting changer324completes the changing of the setting of the SAS cable50, the power supply controller321finishes the temporal power supply to the SAS expander32. Consequently, the power supply state to the disks31and the SAS expander32comes into the first power saving mode.

Next, description will now be made in relation to the operation of the above SAS expander32of the first embodiment in the normal power supply mode with reference to a flow diagramFIG. 4(steps S11-S13).

In the normal power supply mode, the power supply controller321monitors the link-up state of the SAS port32a(steps S11, S12). If the monitoring detects the link-down state of the SAS port32a(YES route in step S11), the power supply controller321further determines whether the link-down state is continuing for a predetermined time period (e.g., two seconds) (step S12). In cases where multiple SAS ports32aare provided, each SAS port32ais determined as to whether the link-down state of the SAS port32acontinues for the predetermined time period.

If the SAS port32ais not in the link-down state (NO route in step S11) or when the link-down state has been continuing for a time less than the predetermined time period (Yes route in step S11and NO route in step S12), the power supply controller321returns to the process of step S11.

In contrast, if the link-down state is continuing for the predetermined time period (YES route in step S12), the power supply controller321determines that the SAS port32ais in the unused state. When determining that the SAS port32ahas come into the unused state, the power supply controller321shifts the power supply state to the disks31and the SAS expander32from the normal power supply mode to the first power saving mode (step S13).

Next, description will now be made in relation to the operation of the SAS expander32of the first embodiment when being shifted into the first power saving mode as the above with reference to a flow diagramFIG. 5(steps S21-S29).

In the first power saving mode, the SAS expander32determines whether the activation interruption receiver325receives an SAS packet (OOB) as activation interruption (link-up interruption) (step S21). If the activation interruption receiver325receives an SAS packet (OOB) (YES route in step S21), the power supply controller321is activated and shifts the power supply state from the first power saving mode to the normal power supply mode (step S22). This makes the DE30(the disks31and the SAS expander32) into an on-line operating state.

In contrast, if the activation interruption receiver325does not receive an SAS packet (OOB) (NO route in step S21), the power supply controller321determines, by using a timer function or the like, whether one second elapses (step S23). If one second does not elapse (NO route in step S23), the power supply controller321returns to the process of step S21.

In contrast, if one second elapses (YES route in step S23), which means that unless activation interruption is not received, the power supply controller321is activated at every one second and temporarily supplies power to the SAS expander32(CPU320) (step S24). In this event, only the SAS expander32is activated while the DC-power supply to the disks31and the LED is remained to be “off” state.

After the temporal power supply to the SAS expander32(CPU320) is started, the detector322detects whether the mounting state of the SAS cable50has been changed, which means, whether the SAS cable50has been unplugged from and plugged into the SAS port32a(step S25).

When the detector322detects no unplugging and plugging of the SAS cable50(NO route in step S25), the power supply controller321finishes the temporal power supply to the SAS expander32(step S29). This turns the power supply state to the disks31and the SAS expander32into the first power saving mode. After that, the CPU320returns to the process of step S21.

When the detector322detects unplugging and plugging of the SAS cable50(YES route in step S25), the obtainer323obtains type information representing the type of the SAS cable50. Then the obtainer323determines whether the replacement SAS cable50(the SAS cable50newly plugged into the connector51) is an AOC cable (step S26). In this determination, the obtainer323obtains the type information of the replacement SAS cable50from the register52attached to the replacement SAS cable50.

If the replacement SAS cable50is an AOC cable (YES route in step S26), the setting changer324obtains the setting (i.e., Vact=on; Ptt=off) determined for an AOC cable by referring to the setting information table (seeFIG. 3) and changes the setting of the SAS cable in the CPU320into the obtained setting (step S27). After that, the CPU320moves to step S29.

If the replacement SAS cable50is not an AOC cable (NO route in step S26), the setting changer324determines that the replacement SAS cable50is a Copper cable. Then, the setting changer324obtains the setting (i.e., Vact=off; Ptt=on) determined for a Copper cable by referring to the setting information table (seeFIG. 3) and changes the setting of the SAS cable in the CPU320into the obtained setting (step S28). After that, the CPU320moves to step S29.

As described above, after the function for Wake on SAS shifts the power supply state to the first power saving mode in the SAS expander32of the first embodiment, the presence of a change in mounting state of the SAS cable50being connected to the SAS port32ais checked regularly (e.g., at every one second). In other words, SAS expander32in the first power saving mode is temporarily supplied with power at regular intervals, so that the SAS expander32(CPU320) is regularly activated, keeping the disks31and the LED to be in the “off” state. This can regularly check a change in mounting state of the SAS cable50.

If the above regular check detects a change in the mounting state of the SAS cable50, the necessary setting (Vact, Ptt) is changed and then the temporal power supply to the SAS expander32(CPU320) is finished. Consequently, the power supply state comes into the first power saving mode again. After that, if the SAS expander32receives activation interruption after the upper connection port32aof the SAS expander32comes into a link-up state, the SAS expander32can be avoided from falling into a dead-lock state and can activate the DE30by means of the function of Wake on SAS.

Accordingly, even when the SAS cable50is replaced with a different type of SAS cable50during the first power saving mode, the SAS expander32of the first embodiment can surely restore the power supply state into the normal power supply mode. This means that, even when the SAS cable50is clod-swapped with a different type of cable in the first power saving mode, the SAS expander32can receive an SAS packet (OOB) as activation interruption to cancel the dead-lock state. This enables the function for Wake on SAS to effectively operate. Consequently, this allows the DE30to operate while saving the consumption power by effectively using the function for Wake on SAS.

(4) Modification to the First Embodiment

If the type of the unplugged SAS cable50is the same as the type of the newly-plugged replacement SAS cable50, the setting of the SAS cable50is unchanged between the unplugging and the plugging and there is no need to change the setting of the SAS cable50. However, even in this case, the obtainer323and the setting changer324of the first embodiment unnecessarily change the setting of the SAS cable50in steps S26-S28ofFIG. 5.

As a solution to the above, if the setting of the SAS cable50is unchanged between the unplugging and the plugging, the obtainer323and the setting changer324of the SAS expander32of this modification to the first embodiment skip the changing of the setting of the SAS cable50(see steps S26-S28ofFIG. 6). In other words, the obtainer323and the setting changer324of this modification to the first embodiment have an additional function of skipping, if the type of the SAS cable50is unchanged between the unplugging and the plugging, a process of changing the setting of the SAS cable50.

Next, description will now be made in relation to the operation of the SAS expander32of the modification to the first embodiment after being shifted into the first power saving mode with reference to a flow diagramFIG. 6(steps S21-S30). The flow diagramFIG. 6of the modification to the first embodiment additionally has step S30between steps S25and S26of the flow diagramFIG. 5. Here, the description will focus on the process related to step S30. The steps inFIG. 6having the same number as those in step S5designate the same or the substantially same process as those inFIG. 5.

When the detector322detects unplugging and plugging of the SAS cable50(YES route in step S25), the obtainer323obtains type information representing the type of the SAS cable50. The obtainer323determines whether the type of the unplugged SAS cable50is the same as the type of the newly-plugged replacement SAS cable50(step S30).

If the types are the same (YES route in step S30), the CPU320skips steps S26-S28and moves to step S29. In contrast, if the type of the unplugged SAS cable50is not the same as the type of the newly-plugged replacement SAS cable50(NO route in step S30), the CPU320moves to step S26.

As the above, in this modification to the first embodiment, when the SAS cable50is replaced with the same type of cable (Copper cable or AOC cable), the setting of the SAS cable50is unchanged to allow the process of steps S26-S28inFIG. 6to be skipped or omitted. This can prevent the controller320from carrying out unnecessary changing of the setting of the SAS cable50, which contributes to improving process efficiency and saving consumption power.

(5) Second Embodiment

Next, description will now be made in relation to the controlling device (SAS expander)32A of the second embodiment with reference toFIGS. 7-9.

First, description will now be made in relation to the hardware and functional configurations of the SAS expander32A of the second embodiment with reference toFIG. 7.FIG. 7is a block diagram schematically illustrating an example of the hardware and functional configurations. Like reference numbers inFIG. 7designate the same or substantially same elements and parts as those described above.

The SAS expander32A of the second embodiment includes at least the SAS ports32a-32c, a controller320A, and the memory330.

The memory330stores therein a control program331A that causes the CPU320A to function as the controller of the SAS expander32A in place of the control program331of the first embodiment.

The control program331A is provided in the form of being recorded in a non-transitory computer-readable portable recording medium. Examples of the recording medium are a magnetic disk, an optical disk, and a magneto-optical disk. Examples of an optical disk is a CD, a DVD, and a Blu-ray disk. Examples of a CD are a CD-ROM, and a CD-R/RW. Examples of a DVD are a DVD-RAM, a DVD-ROM, a DVD-R, a DVD+R, a DVD-RW, a DVD+RW, and a HD DVD.

The CPU320A reads the control program331A from the recording medium and stores the read control program331A into an internal memory device (e.g., memory330) or into an external memory device for later use. Alternatively, the CPU320A may receive the control program331A through a network (not illustrated) and store the control program331A in an internal or external memory device for later use.

The CPU320A functions as a controller that controls the disks31in the DE30by executing the control program331A stored in the memory330. Specifically, the CPU320A of the second embodiment functions as at least a power supply controller321A, a detector (mounting interruption receiver)322A, an obtainer323, a setting changer324, and an activation interruption receiver325.

The CPU320A may also be referred to as a controller, a processor, a computer, firmware, and an expander chip. The controller may be an MPU, a DSP, an ASIC, a PLD, and an FPGA in place of the CPU320A. Further alternatively, the controller may be achieved by a combination of two or more of a CPU, an MPU, a DSP, an ASIC, a PLD, and an FPGA.

The consumption-power saving mode of the second embodiment corresponds to a second power saving mode that stops power supply to the disks31and the functional elements in the SAS expander32A except for the activation interruption receiver325and the detector322A.

Here, the activation interruption receiver325receives, as activation interruption, an SAS packet (OOB) to restore the power supply state into a normal power supply mode in the second power saving mode likewise the first embodiment. The detector (mounting interruption receiver)322A receives, in the second power saving mode, mounting interruption, which is issued when, for example, the SAS cable50(connector51) is unplugged and plugged (in other words, the SAS cable50is replaced with another). The functions of the activation interruption receiver325and the detector322A of the second embodiment are achieved by the CPU320A, but alternatively, may be achieved by a different hardware device from the CPU320A.

Upon receipt of mounting interruption of the SAS cable50in the second power saving mode, the detector (mounting interruption receiver)322A detects the receipt as a change in the mounting state of the SAS cable50. In other words, the detector322A detects unplugging and plugging of the SAS cable50(connector51) from and into the SAS port32awhen receiving mounting interruption.

The power supply controller321A accomplishes the function of Wake on SAS. In other words, when the SAS port32acomes to be in the unused state in the normal power supply mode, the power supply controller321A shifts the power supply state to the disks31and the SAS expander32A from the normal power supply state into a second power saving mode in which activation interruption and mounting interruption can be received. When an SAS packet (OOB) is received as activation interruption (link-up interruption) in the second power saving mode, the power supply controller321A is activated and shifts the power supply state from the second power saving mode into the normal power supply mode.

Here, the power supply controller321A of the second embodiment includes a function of monitoring a link-up state of an SAS port32a. Upon detection of continuing the link-down state of the SAS port32afor a predetermined time period (e.g., two seconds) by using this function, the power supply controller321A determines that the SAS port32ais in the unused state.

In particular, when the detector322A detects the reception of mounting interruption, as a change in the mounting state of the SAS cable50, the power supply controller321A temporarily supplies power to the SAS expander32A. Likewise the first embodiment, when power is temporarily supplied to the SAS expander32A, only the SAS expander32A is activated while the DC-power supply to the disks31and a Light Emitting Diode (LED, not illustrated) is remained to be “off” state.

Likewise the first embodiment, when the detector322A detects unplugging and plugging (mounting interruption) of the SAS cable50, the obtainer323obtains type information representing the type of the SAS cable50. In this event, the obtainer323reads the type information of the SAS cable50that has been plugged into the register52attached to the SAS cable50.

Likewise the first embodiment, using the type information obtained by the obtainer323as a key, the setting changer324retrieves the setting (e.g., setting for a communication device) associated with the type information from the setting information table (seeFIG. 3) that is expanded from a memory region332of the memory330on the CPU320A. Then the setting changer324changes the setting of the SAS cable50in the CPU320A into setting corresponding to the obtained type information.

In the second embodiment, after the setting changer324completes the changing of the setting of the SAS cable50, the power supply controller321A finishes the temporal power supply to the SAS expander32A. Consequently, the power supply state to the disks31and the SAS expander32A comes into the second power saving mode.

Next, description will now be made in relation to the operation of the above SAS expander32A of the second embodiment in the normal power supply mode with reference to a flow diagramFIG. 8(steps S11, S12, S13A).

In the normal power supply mode, the power supply controller321A monitors the link-up state of the SAS port32a(steps S11, S12) likewise the first embodiment. If the monitoring detects the link-down state of the SAS port32a(YES route in step S11), the power supply controller321A further determines whether the link-down state is continuing for a predetermined time period (e.g., two seconds) (step S12). In cases where multiple SAS ports32aare provided, each SAS port32ais determined as to whether the link-down state of the SAS port32acontinues for the predetermined time period.

If the SAS port32ais not in the link-down state (NO route in step S11) or when the link-down state is continuing for a time less than the predetermined time period (Yes route in step S11and NO route in step S12), the power supply controller321A returns to the process of step S11.

In contrast, if the link-down state is continuing for the predetermined time period (YES route in step S12), the power supply controller321A determines that the SAS port32ais in the unused state. When determining that the SAS port32ahas come into the unused state, the power supply controller321A shifts the power supply state to the disks31and the SAS expander32A from the normal power supply mode to the second power saving mode (step S13A).

Next, description will now be made in relation to the operation of the above SAS expander32A of the second embodiment in the second power saving mode with reference to a flow diagramFIG. 9(steps S31-S37).

In the second power saving mode, the SAS expander32A first determines whether the activation interruption receiver325has received activation interruption or whether the detector (mounting interruption receiver)322A has received mounting interruption (step S31). If no interruption has been received (see the “NOT RECEIVED” route in step S31, the CPU320A returns to the process of step S31. In contrast, if activation interruption has been received (see “ACTIVATION INTERRUPTION” route in step S31), the power supply controller321A is activated and shifts the power supplying state from the second power saving mode to the normal power supply mode (step S32). This made the DE30(the disks31and the SAS expander32A) into an on-line operating state.

On the other hand, if mounting interruption has been received (see “MOUNTING INTERRUPTION” route in step S31), the power supply controller321A is activated and temporarily supplies power to the SAS expander32A (CPU320A) (step S33). In this event, only the SAS expander32A is activated while the DC-power supply to the disks31and the LED is remained to be “off” state.

During the above temporal power supply, the obtainer323obtains the type information representing the type of the SAS cable50. Then the obtainer323determines whether the replacement SAS cable50(the SAS cable50newly plugged into the connector51) is an AOC cable (step S34). In this determination, the obtainer323obtains the type information of the replacement SAS cable50from the register52attached to the replacement SAS cable50.

If the replacement SAS cable50is an AOC cable (YES route in step S34), the setting changer324obtains the setting (i.e., Vact=on; Ptt=off) determined for an AOC cable by referring to the setting information table (seeFIG. 3) and changes the setting of the SAS cable in the CPU320A into the obtained setting (step S35). After that, the CPU320A moves to step S37.

If the replacement SAS cable50is not an AOC cable (NO route in step S34), the setting changer324determines that the replacement SAS cable50is a Copper cable. Then, the setting changer324obtains the setting (i.e., Vact=off; Ptt=on) determined for a Copper cable by referring to the setting information table (seeFIG. 3) and changes the setting of the SAS cable in the CPU320A into the obtained setting (step S36). After that, the CPU320A moves to step S37.

When the setting changer324completes the change of the setting of the SAS cable50, the power supply controller321A finishes the temporal power supply to the SAS expander32A (step S37). Thereby, the power supply state to the disks31and the SAS expander32A comes into the second power saving mode. Then the CPU320A returns to the process of step S31.

The specification of the traditional technique restores the power supply state to the normal power supply mode by the function of Wake on SAS only when the SAS expander receives an SAS packet (activation interruption). Accordingly, when the SAS expander receives mounting interruption after shifting into a power saving mode, the SAS expander ignores the interruption.

As described above, upon receipt of mounting interruption of the SAS cable50after the power supply state of the SAS expander32A of the second embodiment has been shifted into the second power saving mode through the function for Wake on SAS, the SAS expander32A is temporarily supplied with power. This makes it possible to activate the SAS expander32A (CPU320A) while the power supply to the disks31and the LED is kept to be “off” state.

Consequently, the necessary setting (Vact, Ptt) is changed and then the temporal power supply to the SAS expander32A (CPU320A) is finished. Consequently, the power supply state comes into the second power saving mode again. If the SAS expander32A receives activation interruption after the upper connection port32aof the SAS expander32A comes to be in a link-up state, the SAS expander32A can be avoided from falling into a dead-lock state and can activate the DE30by means of the function of Wake on SAS.

Accordingly, the SAS expander32A of the second embodiment achieves the same effects as those of the first embodiment.

In particular, employing the above method of controlling, the CPU (expander firmware)320A of the SAS expander32A of the second embodiment is activated only once immediately after the SAS cable50is unplugged and plugged, necessarily changes the setting, and then, immediately returns to the second power saving mode. With this configuration, the second embodiment eliminates regular activation of the CPU (expander firmware)320A as performed in the first embodiment, so that power is not unnecessarily consumed.

(6) Modification to the Second Embodiment

Also as described in the above modification to the first embodiment, if the type of an unplugged SAS cable50is the same as the type of the newly-plugged replacement SAS cable50, the setting of the SAS cable50is unchanged between the unplugging and the plugging and there is no need to change the setting of the SAS cable50. However, even in this case, the obtainer323and the setting changer324of the second embodiment unnecessarily change the setting of the SAS cable50in steps S34-S36ofFIG. 9.

As a solution to the above, if the setting of the SAS cable50is unchanged between the unplugging and the plugging, the obtainer323and the setting changer324of the SAS expander32A of this modification to the second embodiment skip the changing of the setting of the SAS cable50(see steps S34-S36ofFIG. 10). In other words, the obtainer323and the setting changer324of this modification to the second embodiment each have an additional function of skipping, if the setting of the SAS cable50is unchanged between the unplugging and the plugging, a process of changing the setting of the SAS cable50.

Next, description will now be made in relation to the operation of the SAS expander32A of the modification to the second embodiment after being shifted into the second power saving mode with reference to a flow diagramFIG. 10(steps S31-S38). The flow diagramFIG. 10of the modification to the second embodiment additionally has step S38between steps S33and S34of the flow diagramFIG. 9. Here, the description will focus on the process related to step S38. The steps inFIG. 10having the same number as those in steps designate the same or the substantially same process as those described above.

Under a state of the temporal power supply in step S33, the obtainer323obtains type information representing the type of the SAS cable50. The obtainer323determines whether the type of the unplugged SAS cable50is the same as the type of the newly-plugged replacement SAS cable50(step S38).

If the types are the same (YES route in step S38), the CPU320A skips steps S34-S36and moves to the process of step S37. In contrast, if the type of the unplugged SAS cable50is not the same as the type of the newly-plugged replacement SAS cable50(NO route in step S38), the CPU320A moves to step S34.

As the above, in the modification to the second embodiment, when the SAS cable50is replaced with the same type of cable (Copper cable or AOC cable), the setting of the SAS cable50is unchanged to allow the process of steps S34-S36to be skipped or omitted. This can prevent the CPU320A from carrying out unnecessary changing of the setting of the SAS cable50, which contributes to improving process efficiency and saving consumption power.

Preferred embodiments of the present invention are described above. However, the present invention is not limited to the embodiments and various changes and modifications can be suggested without departing from the spirit of the present invention.

In the above first and second embodiments and modifications thereof, the SAS expanders32and32A are applied to storage devices. However, the present invention is not limited to this. Alternatively, the SAS expanders32and32A may be applied to a server device or a switch device and bring the same advantages as those of the foregoing embodiments and modifications.

The first and second embodiments and the modifications thereof assume that the SAS cable is of two types of a Copper cable and an AOC cable. However, the types of SAS cable are not limited to these and alternatively may be three types or more. This alternative can be applied likewise the foregoing embodiments and obtain the same effects. It should be noted that a setting information table that defines the setting of three or more types of SAS cable is prepared and used.

The above first and second embodiments and the modifications thereof change the setting of the SAS cable50to be unplugged-from and plugged-into the upper connection port (SAS input port)32a. However, the present invention is not limited to this. Alternatively, the present invention can be applied to both the upper connection port (SAS input port)32aand the lower connection port (SAS output port)32b, which brings the same effects as those of the foregoing embodiments.

The SAS expander (control device) may select either of the control method of the first embodiment and the modification thereof or the control method of the second embodiment and the modification thereof. This can select a control method according to the demand of the user and therefore contribute to the user's convenience.

The above first and second embodiments and the modifications thereof assume that the control target device of the SAS expanders32,32A is the disk (memory device) mounted on the DE30. However, the control target device of the present invention is not limited to this. Alternatively, a control target device may be another device. The foregoing embodiments can also be applied to the alternative target device and obtain the same effects.

The embodiments described herein can surely restore the power supply state to the normal power supply mode even if a cable is replaced with a different type of cable in a power saving mode.