- case CHECK_POWER_MODE:
- //printf("command = CHECK_POWER_MODE\n");
- ata_cmd->command = ATA_CHECK_POWER_MODE;
- break;
- case READ_VALUES:
- //printf("command = READ_VALUES\n");
- ata_cmd->features = ATA_SMART_READ_VALUES;
- break;
- case READ_THRESHOLDS:
- //printf("command = READ_THRESHOLDS\n");
- ata_cmd->features = ATA_SMART_READ_THRESHOLDS;
- break;
- case READ_LOG:
- //printf("command = READ_LOG\n");
- ata_cmd->features = ATA_SMART_READ_LOG_SECTOR;
- ata_cmd->sector_number = select;
- break;
- case WRITE_LOG:
- //printf("command = WRITE_LOG\n");
- ata_cmd->features = ATA_SMART_WRITE_LOG_SECTOR;
- memcpy(ata_cmd->data, data, 512);
- ata_cmd->sector_count = 1;
- ata_cmd->sector_number = select;
- break;
- case IDENTIFY:
- //printf("command = IDENTIFY\n");
- ata_cmd->command = ATA_IDENTIFY_DEVICE;
- break;
- case PIDENTIFY:
- //printf("command = PIDENTIFY\n");
- errno=ENODEV;
- return -1;
- case ENABLE:
- //printf("command = ENABLE\n");
- ata_cmd->features = ATA_SMART_ENABLE;
- break;
- case DISABLE:
- //printf("command = DISABLE\n");
- ata_cmd->features = ATA_SMART_DISABLE;
- break;
- case AUTO_OFFLINE:
- //printf("command = AUTO_OFFLINE\n");
- ata_cmd->features = ATA_SMART_AUTO_OFFLINE;
- // Enable or disable?
- ata_cmd->sector_count = select;
- break;
- case AUTOSAVE:
- //printf("command = AUTOSAVE\n");
- ata_cmd->features = ATA_SMART_AUTOSAVE;
- // Enable or disable?
- ata_cmd->sector_count = select;
- break;
- case IMMEDIATE_OFFLINE:
- //printf("command = IMMEDIATE_OFFLINE\n");
- ata_cmd->features = ATA_SMART_IMMEDIATE_OFFLINE;
- // What test type to run?
- ata_cmd->sector_number = select;
- break;
- case STATUS_CHECK:
- //printf("command = STATUS_CHECK\n");
- ata_cmd->features = ATA_SMART_STATUS;
- break;
- case STATUS:
- //printf("command = STATUS\n");
- ata_cmd->features = ATA_SMART_STATUS;
- break;
- default:
- //printf("command = UNKNOWN\n");
- errno=ENOSYS;
- return -1;
- };
+ // the commands will write data
+ memcpy(ata_cmd->data, in.buffer, in.size);
+ areca_packet[6] = 0x14;
+ }
+ else {
+ // COMMAND NOT SUPPORTED VIA ARECA IOCTL INTERFACE
+ return set_err(ENOTSUP, "DATA OUT not supported for this Areca controller type");
+ }