mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-29 01:34:00 +00:00
ataflop: switch from req->errors to req->error_count
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
4590879596
commit
c8e90782e1
1 changed files with 7 additions and 5 deletions
|
@ -617,12 +617,12 @@ static void fd_error( void )
|
||||||
if (!fd_request)
|
if (!fd_request)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fd_request->errors++;
|
fd_request->error_count++;
|
||||||
if (fd_request->errors >= MAX_ERRORS) {
|
if (fd_request->error_count >= MAX_ERRORS) {
|
||||||
printk(KERN_ERR "fd%d: too many errors.\n", SelectedDrive );
|
printk(KERN_ERR "fd%d: too many errors.\n", SelectedDrive );
|
||||||
fd_end_request_cur(-EIO);
|
fd_end_request_cur(-EIO);
|
||||||
}
|
}
|
||||||
else if (fd_request->errors == RECALIBRATE_ERRORS) {
|
else if (fd_request->error_count == RECALIBRATE_ERRORS) {
|
||||||
printk(KERN_WARNING "fd%d: recalibrating\n", SelectedDrive );
|
printk(KERN_WARNING "fd%d: recalibrating\n", SelectedDrive );
|
||||||
if (SelectedDrive != -1)
|
if (SelectedDrive != -1)
|
||||||
SUD.track = -1;
|
SUD.track = -1;
|
||||||
|
@ -1386,7 +1386,7 @@ static void setup_req_params( int drive )
|
||||||
ReqData = ReqBuffer + 512 * ReqCnt;
|
ReqData = ReqBuffer + 512 * ReqCnt;
|
||||||
|
|
||||||
if (UseTrackbuffer)
|
if (UseTrackbuffer)
|
||||||
read_track = (ReqCmd == READ && fd_request->errors == 0);
|
read_track = (ReqCmd == READ && fd_request->error_count == 0);
|
||||||
else
|
else
|
||||||
read_track = 0;
|
read_track = 0;
|
||||||
|
|
||||||
|
@ -1409,8 +1409,10 @@ static struct request *set_next_request(void)
|
||||||
fdc_queue = 0;
|
fdc_queue = 0;
|
||||||
if (q) {
|
if (q) {
|
||||||
rq = blk_fetch_request(q);
|
rq = blk_fetch_request(q);
|
||||||
if (rq)
|
if (rq) {
|
||||||
|
rq->error_count = 0;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} while (fdc_queue != old_pos);
|
} while (fdc_queue != old_pos);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue