• Andries E. Brouwer's avatar
    [PATCH] scsi stuff · a19bafa6
    Andries E. Brouwer authored
    The patch below cleans up some SCSI stuff.
    
    The main purpose is to avoid trying to read the partition table
    of a removable disk when the drive has told us that no media
    are present. (Right now we try to read a 4K block and fail and
    retry and fail, and give an I/O error on the first sector,
    then try to read the second sector and fail and retry ...)
    
    Unused fields  sector_bit_size  and  sector_bit_shift  in
    struct scsi_disk were removed. The field  has_part_table
    (that has nothing to do with partition tables) was
    renamed to  has_been_registered . The field  ready  was
    renamed to  media_present .
    The overly long  sd_init_onedisk()  was split up.
    
    When we notice that no media are present anymore, the
    partitions are removed from /proc/partitions, but the
    drive remains, with size 0.
    
    A future patch will remove the field  capacity  - there are
    all too many places where capacities are stored - but the
    present patch is large enough already.
    
    There is also a quite independent patch in scsi_error.c
    (yesterday someone had an infinite loop retrying to read
    bad media) - this patch honours the SCpnt->retries.
    In case you applied this already, just ignore the scsi_error.c part.
    
    Also some "Overrides for Emacs" were removed.
    a19bafa6
NCR53C9x.c 101 KB