lkml.org 
[lkml]   [2000]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patches in this message
    /
    From
    Date
    This patch prevents scsi_ioctl_send_command() from overwriting the SEND
    DIAGNOSTICS (Drive Self Test) reserved bits in cmd[1], as found in SCSI-3.
    Code provided by Michael Landrus of Dell.

    Comments are requested. If there are no objections, Linus and Alan please
    apply.
    Below are patches to kernels 2.2.18-pre8 and 2.4.0-test9-pre1.

    Thanks,
    Matt Domsch
    Dell Enterprise Systems Group
    Linux Development Team

    --- 2.2.18-pre8-linux/drivers/scsi/scsi_ioctl.c.orig Mon Sep 18 07:47:45
    2000
    +++ 2.2.18-pre8-linux/drivers/scsi/scsi_ioctl.c Mon Sep 18 07:48:29 2000
    @@ -254,7 +254,8 @@
    /*
    * Set the lun field to the correct value.
    */
    - cmd[1] = ( cmd[1] & 0x1f ) | (dev->lun << 5);
    + if ( cmd[0] != 0x1d ) // don't overwrite the SCSI-3 SEND DIAGNOSTICS
    reserved bits
    + cmd[1] = (cmd[1] & 0x1f) | (dev->lun << 5);

    switch (opcode)
    {

    --- 2.4.0-test9-pre1-linux/drivers/scsi/scsi_ioctl.c.orig Mon Sep 18
    07:37:36 2000
    +++ 2.4.0-test9-pre1-linux/drivers/scsi/scsi_ioctl.c Mon Sep 18 07:41:36
    2000
    @@ -266,7 +266,8 @@
    /*
    * Set the lun field to the correct value.
    */
    - cmd[1] = (cmd[1] & 0x1f) | (dev->lun << 5);
    + if ( cmd[0] != 0x1d ) // don't overwrite the SCSI-3 SEND
    DIAGNOSTICS reserved bits
    + cmd[1] = (cmd[1] & 0x1f) | (dev->lun << 5);

    switch (opcode) {
    case FORMAT_UNIT:
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 12:39    [W:0.024 / U:0.040 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site