• Tom Yan's avatar
    libata-scsi: use u8 array to store mode page copy · d7372cb6
    Tom Yan authored
    ata_mselect_*() would initialize a char array for storing a copy of
    the current mode page. However, char could be signed char. In that
    case, bytes larger than 127 would be converted to negative number.
    
    For example, 0xff from def_control_mpage[] would become -1. This
    prevented ata_mselect_control() from working at all, since when it
    did the read-only bits check, there would always be a mismatch.
    Signed-off-by: default avatarTom Yan <tom.ty89@gmail.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    d7372cb6
libata-scsi.c 118 KB