• Tejun Heo's avatar
    [PATCH] libata: handle 0xff status properly · d1adc1bb
    Tejun Heo authored
    libata waits for !BSY even when the status register reports 0xff.
    This causes long boot delays when D8 isn't pulled down properly.  This
    patch does the followings.
    
    * don't wait if status register is 0xff in all wait functions
    
    * make ata_busy_sleep() return 0 on success and -errno on failure.
      -ENODEV is returned on 0xff status and -EBUSY on other failures.
    
    * make ata_bus_softreset() succeed on 0xff status.  0xff status is not
      reset failure.  It indicates no device.  This removes unnecessary
      retries on such ports.  Note that the code change assumes unoccupied
      port reporting 0xff status does not produce valid device signature.
    Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
    Cc: Joe Jin <lkmaillist@gmail.com>
    Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
    d1adc1bb
libata-core.c 150 KB