1052 | | if (iop->cmnd[0] == 0x85 && iop->cmnd[1] == 0x06) { |
1053 | | if(report > 0) |
1054 | | pout("Rejecting SMART/ATA command to controller\n"); |
1055 | | // Emulate SMART STATUS CHECK drive reply |
1056 | | // smartctl fail to work without this |
1057 | | if(iop->cmnd[2]==0x2c) { |
1058 | | iop->resp_sense_len=22; // copied from real response |
1059 | | iop->sensep[0]=0x72; // descriptor format |
1060 | | iop->sensep[7]=0x0e; // additional length |
1061 | | iop->sensep[8]=0x09; // description pointer |
1062 | | iop->sensep[17]=0x4f; // low cylinder GOOD smart status |
1063 | | iop->sensep[19]=0xc2; // high cylinder GOOD smart status |
1064 | | } |
1065 | | return true; |
| 1052 | |
| 1053 | if (iop->cmnd[0] == 0xa1 || iop->cmnd[0] == 0x85) { // SAT_ATA_PASSTHROUGH_12/16 |
| 1054 | // Controller does not return ATA output registers in SAT sense data |
| 1055 | if (iop->cmnd[2] & (1 << 5)) // chk_cond |
| 1056 | return set_err(ENOSYS, "ATA output registers not supported"); |
| 1057 | // TODO: Controller rejects Enable SMART |