Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187145
b: refs/heads/master
c: 0da3132
h: refs/heads/master
i:
  187143: ea9d477
v: v3
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Mar 12, 2010
1 parent 62a9472 commit 7cd82b6
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 54 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 416d8d2888db392c562fb8afaf9136730ef0da9e
refs/heads/master: 0da3132f90c01f532dd85c537b5c78a196a11e24
105 changes: 52 additions & 53 deletions trunk/drivers/block/floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2892,64 +2892,63 @@ static void redo_fd_request(void)
if (current_drive < N_DRIVE)
floppy_off(current_drive);

for (;;) {
if (!current_req) {
struct request *req;

spin_lock_irq(floppy_queue->queue_lock);
req = blk_fetch_request(floppy_queue);
spin_unlock_irq(floppy_queue->queue_lock);
if (!req) {
do_floppy = NULL;
unlock_fdc();
return;
}
current_req = req;
}
drive = (long)current_req->rq_disk->private_data;
set_fdc(drive);
reschedule_timeout(current_reqD, "redo fd request", 0);

set_floppy(drive);
raw_cmd = &default_raw_cmd;
raw_cmd->flags = 0;
if (start_motor(redo_fd_request))
do_request:
if (!current_req) {
struct request *req;

spin_lock_irq(floppy_queue->queue_lock);
req = blk_fetch_request(floppy_queue);
spin_unlock_irq(floppy_queue->queue_lock);
if (!req) {
do_floppy = NULL;
unlock_fdc();
return;
disk_change(current_drive);
if (test_bit(current_drive, &fake_change) ||
test_bit(FD_DISK_CHANGED_BIT, &DRS->flags)) {
DPRINT("disk absent or changed during operation\n");
request_done(0);
continue;
}
if (!_floppy) { /* Autodetection */
if (!probing) {
DRS->probed_format = 0;
if (next_valid_format()) {
DPRINT("no autodetectable formats\n");
_floppy = NULL;
request_done(0);
continue;
}
}
probing = 1;
_floppy =
floppy_type + DP->autodetect[DRS->probed_format];
} else
probing = 0;
errors = &(current_req->errors);
tmp = make_raw_rw_request();
if (tmp < 2) {
request_done(tmp);
continue;
}
current_req = req;
}
drive = (long)current_req->rq_disk->private_data;
set_fdc(drive);
reschedule_timeout(current_reqD, "redo fd request", 0);

if (test_bit(FD_NEED_TWADDLE_BIT, &DRS->flags))
twaddle();
schedule_bh(floppy_start);
debugt("queue fd request");
set_floppy(drive);
raw_cmd = &default_raw_cmd;
raw_cmd->flags = 0;
if (start_motor(redo_fd_request))
return;

disk_change(current_drive);
if (test_bit(current_drive, &fake_change) ||
test_bit(FD_DISK_CHANGED_BIT, &DRS->flags)) {
DPRINT("disk absent or changed during operation\n");
request_done(0);
goto do_request;
}
if (!_floppy) { /* Autodetection */
if (!probing) {
DRS->probed_format = 0;
if (next_valid_format()) {
DPRINT("no autodetectable formats\n");
_floppy = NULL;
request_done(0);
goto do_request;
}
}
probing = 1;
_floppy = floppy_type + DP->autodetect[DRS->probed_format];
} else
probing = 0;
errors = &(current_req->errors);
tmp = make_raw_rw_request();
if (tmp < 2) {
request_done(tmp);
goto do_request;
}

if (test_bit(FD_NEED_TWADDLE_BIT, &DRS->flags))
twaddle();
schedule_bh(floppy_start);
debugt("queue fd request");
return;
}

static struct cont_t rw_cont = {
Expand Down

0 comments on commit 7cd82b6

Please sign in to comment.