• James Bottomley's avatar
    [PATCH] make the SCSI mid-layer obey the device online flag · 70e528ed
    James Bottomley authored
    It has been pointed out by the USB people that the mid-layer doesn't
    obey its own online flag.
    
    The attached patch should fix this.  However, there are a few caveats to
    offlining (read that as devices should still be prepared to process
    commands).
    
    1. Any special command will still be accepted (that's a command either
    via the SCSI_IOCTL_SEND_COMMAND, or an internally generated command).
    2. Outstanding already processed commands in the queue (i.e. commands
    which have already been through the upper layer drivers but needed
    requeuing for some reason like QUEUE_FULL or device busy).
    
    I'm willing to consider changing 2., it just requires more speciallised
    logic to distinguish between a command that has been prepared by the
    upper level drivers and a command sent via 1.
    
    However, not that LLDs may not assume they will receive no commands just
    because scsi_device->online is zero.
    70e528ed
scsi_lib.c 36.6 KB