Ticket #1314: 0001-Change-dev_jmb39x_raid-to-JMS56x.patch

File 0001-Change-dev_jmb39x_raid-to-JMS56x.patch, 1.1 KB (added by elbandi, 13 months ago)
  • dev_jmb39x_raid.cpp

    From: Elbandi <bandispam@gmail.com>
    Date: Sat, 4 Apr 2020 12:20:39 +0200
    Subject: [PATCH 1/2] Change dev_jmb39x_raid to JMS56x
    
    ---
     dev_jmb39x_raid.cpp | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/dev_jmb39x_raid.cpp b/dev_jmb39x_raid.cpp
    index 5b3cd0e..2eb6a3f 100644
    a b static void jmb_set_request_sector(uint8_t (& data)[512], uint32_t cmd_id, 
    174174{
    175175  jmbassert(4 <= cmdsize && cmdsize <= 24);
    176176  memset(data, 0, sizeof(data));
    177   jmb_put_le32(data, 0, 0x197b0322); // SCRAMLED_CMD
     177  jmb_put_le32(data, 0, 0x197b0562); // SCRAMLED_CMD
    178178  jmb_put_le32(data, 4, cmd_id);
    179179  memcpy(data + 8, cmd, cmdsize);
    180180  jmb_put_crc(data, jmb_crc(data));
    static void jmb_check_funcs() 
    210210  jmbassert(jmb_check_crc(data));
    211211  uint8_t cmd[] = {1, 2, 3, 4, 5, 6, 7};
    212212  jmb_set_request_sector(data, 42, cmd, sizeof(cmd));
    213   jmbassert(jmb_get_crc(data) == 0xb1f765d7);
     213  jmbassert(jmb_get_crc(data) == 0xde10952b);
    214214  jmbassert(jmb_check_crc(data));
    215215  jmb_xor(data);
    216216  jmbassert(jmb_get_sector_type(data) == 2);