• James Bottomley's avatar
    AUTOSENSE bug in NCR5380.c · f342aeef
    James Bottomley authored
    From: 	Kenn Humborg <kenn@linux.ie>
    
    round line 2470 in NCR5380.c, if a command fails, and AUTOSENSE is on,
    the current command is converted into a REQUEST_SENSE command and
    put at the top of the request queue.  Part of this setup, is setting
    up cmd->SCp to point at the sense_buffer, so that the received sense
    data goes straight into the sense buffer.
    
    Around line 1730, NCR5380_select() calls initialize_SCp() which ends
    up clobbering cmd->SCp, and the sense data get written into the 
    original request buffer.
    
    This is what happens if cmd->use_sg = 0.  I haven't looked at what
    happens if use_sg is non-zero, but I expect the effect will be the same.
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
    f342aeef
NCR5380.c 97.9 KB