-#ifdef HAVE_ATA_IDENTIFY_IS_CACHED
-bool legacy_ata_device::ata_identify_is_cached() const
-{
- return !!::ata_identify_is_cached(get_fd());
-}
-#endif
-
-
-/////////////////////////////////////////////////////////////////////////////
-/// Implement AMCC/3ware RAID support with old functions
-
-class legacy_escalade_device
-: public /*implements*/ ata_device_with_command_set,
- public /*extends*/ legacy_smart_device
-{
-public:
- legacy_escalade_device(smart_interface * intf, const char * dev_name,
- int escalade_type, int disknum);
-
-protected:
- virtual int ata_command_interface(smart_command_set command, int select, char * data);
-
-private:
- int m_escalade_type; ///< Type string for escalade_command_interface().
- int m_disknum; ///< Disk number.
-};
-
-legacy_escalade_device::legacy_escalade_device(smart_interface * intf, const char * dev_name,
- int escalade_type, int disknum)
-: smart_device(intf, dev_name, "3ware", "3ware"),
- legacy_smart_device(
- escalade_type==CONTROLLER_3WARE_9000_CHAR ? "ATA_3WARE_9000" :
- escalade_type==CONTROLLER_3WARE_678K_CHAR ? "ATA_3WARE_678K" :
- /* CONTROLLER_3WARE_678K */ "ATA" ),
- m_escalade_type(escalade_type), m_disknum(disknum)
-{
- set_info().info_name = strprintf("%s [3ware_disk_%02d]", dev_name, disknum);
-}
-
-int legacy_escalade_device::ata_command_interface(smart_command_set command, int select, char * data)
-{
- return ::escalade_command_interface(get_fd(), m_disknum, m_escalade_type, command, select, data);
-}
-
-
-/////////////////////////////////////////////////////////////////////////////
-/// Implement Areca RAID support with old functions
-
-class legacy_areca_device
-: public /*implements*/ ata_device_with_command_set,
- public /*extends*/ legacy_smart_device
-{
-public:
- legacy_areca_device(smart_interface * intf, const char * dev_name, int disknum);
-
-protected:
- virtual int ata_command_interface(smart_command_set command, int select, char * data);
-
-private:
- int m_disknum; ///< Disk number.
-};
-
-legacy_areca_device::legacy_areca_device(smart_interface * intf, const char * dev_name, int disknum)
-: smart_device(intf, dev_name, "areca", "areca"),
- legacy_smart_device("ATA_ARECA"),
- m_disknum(disknum)
-{
- set_info().info_name = strprintf("%s [areca_%02d]", dev_name, disknum);
-}
-
-int legacy_areca_device::ata_command_interface(smart_command_set command, int select, char * data)
-{
- return ::areca_command_interface(get_fd(), m_disknum, command, select, data);
-}
-
-
-/////////////////////////////////////////////////////////////////////////////
-/// Implement Marvell support with old functions
-
-class legacy_marvell_device
-: public /*implements*/ ata_device_with_command_set,
- public /*extends*/ legacy_smart_device
-{
-public:
- legacy_marvell_device(smart_interface * intf, const char * dev_name, const char * req_type);
-
-protected:
- virtual int ata_command_interface(smart_command_set command, int select, char * data);
-};
-
-
-legacy_marvell_device::legacy_marvell_device(smart_interface * intf,
- const char * dev_name, const char * req_type)
-: smart_device(intf, dev_name, "marvell", req_type),
- legacy_smart_device("ATA")
-{
-}
-
-int legacy_marvell_device::ata_command_interface(smart_command_set command, int select, char * data)
-{
- return ::marvell_command_interface(get_fd(), command, select, data);
-}
-
-
-/////////////////////////////////////////////////////////////////////////////
-/// Implement Highpoint RAID support with old functions
-
-class legacy_highpoint_device
-: public /*implements*/ ata_device_with_command_set,
- public /*extends*/ legacy_smart_device
-{
-public:
- legacy_highpoint_device(smart_interface * intf, const char * dev_name,
- unsigned char controller, unsigned char channel, unsigned char port);
-
-protected:
- virtual int ata_command_interface(smart_command_set command, int select, char * data);
-
-private:
- unsigned char m_hpt_data[3]; ///< controller/channel/port
-};
-
-
-legacy_highpoint_device::legacy_highpoint_device(smart_interface * intf, const char * dev_name,
- unsigned char controller, unsigned char channel, unsigned char port)
-: smart_device(intf, dev_name, "hpt", "hpt"),
- legacy_smart_device("ATA")
-{
- m_hpt_data[0] = controller; m_hpt_data[1] = channel; m_hpt_data[2] = port;
- set_info().info_name = strprintf("%s [hpt_disk_%u/%u/%u]", dev_name, m_hpt_data[0], m_hpt_data[1], m_hpt_data[2]);
-}
-
-int legacy_highpoint_device::ata_command_interface(smart_command_set command, int select, char * data)
-{
- unsigned char old_hpt_data[3];
- memcpy(old_hpt_data, con->hpt_data, 3);
- memcpy(con->hpt_data, m_hpt_data, 3);
- int status = ::highpoint_command_interface(get_fd(), command, select, data);
- memcpy(con->hpt_data, old_hpt_data, 3);
- return status;
-}
-