idedrv Reject drive request if idedrv->current_req != NULL
This commit is contained in:
@@ -286,6 +286,9 @@ DEFINE_DEVICE_OP (idedrv_read) {
|
||||
if (sector + sector_count > idedrv->sector_count)
|
||||
return -ST_OOB_ERROR;
|
||||
|
||||
if (idedrv->current_req != NULL)
|
||||
return -ST_TRY_AGAIN;
|
||||
|
||||
if (!ide_wait (idedrv->io, 100000, false, false))
|
||||
return -ST_XDRV_READ_ERROR;
|
||||
|
||||
@@ -347,6 +350,9 @@ DEFINE_DEVICE_OP (idedrv_write) {
|
||||
if (sector + sector_count > idedrv->sector_count)
|
||||
return -ST_OOB_ERROR;
|
||||
|
||||
if (idedrv->current_req != NULL)
|
||||
return -ST_TRY_AGAIN;
|
||||
|
||||
if (!ide_wait (idedrv->io, 100000, false, false))
|
||||
return -ST_XDRV_WRITE_ERROR;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user