mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
sdio: If sd I/O fails because of an I/O error, set the sd state
correctly. Reported-by: phk Approved-by: jkh
This commit is contained in:
parent
c87413f73b
commit
b6c7afd32c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57925
@ -891,10 +891,10 @@ sdio(struct buf *bp)
|
||||
|
||||
if (drive->state != drive_up) {
|
||||
if (sd->state >= sd_crashed) {
|
||||
if (bp->b_flags & B_WRITE) /* writing, */
|
||||
set_sd_state(sd->sdno, sd_stale, setstate_force);
|
||||
else
|
||||
if (bp->b_flags & B_READ) /* reading, */
|
||||
set_sd_state(sd->sdno, sd_crashed, setstate_force);
|
||||
else
|
||||
set_sd_state(sd->sdno, sd_stale, setstate_force);
|
||||
}
|
||||
bp->b_flags |= B_ERROR;
|
||||
bp->b_error = EIO;
|
||||
|
Loading…
Reference in New Issue
Block a user