aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/swim3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/swim3.c')
-rw-r--r--drivers/block/swim3.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index 612965307ba0..5904f7b73c6e 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -320,15 +320,15 @@ static void start_request(struct floppy_state *fs)
320#endif 320#endif
321 321
322 if (req->sector < 0 || req->sector >= fs->total_secs) { 322 if (req->sector < 0 || req->sector >= fs->total_secs) {
323 end_request(req, 0); 323 __blk_end_request_cur(req, -EIO);
324 continue; 324 continue;
325 } 325 }
326 if (req->current_nr_sectors == 0) { 326 if (req->current_nr_sectors == 0) {
327 end_request(req, 1); 327 __blk_end_request_cur(req, 0);
328 continue; 328 continue;
329 } 329 }
330 if (fs->ejected) { 330 if (fs->ejected) {
331 end_request(req, 0); 331 __blk_end_request_cur(req, -EIO);
332 continue; 332 continue;
333 } 333 }
334 334
@@ -336,7 +336,7 @@ static void start_request(struct floppy_state *fs)
336 if (fs->write_prot < 0) 336 if (fs->write_prot < 0)
337 fs->write_prot = swim3_readbit(fs, WRITE_PROT); 337 fs->write_prot = swim3_readbit(fs, WRITE_PROT);
338 if (fs->write_prot) { 338 if (fs->write_prot) {
339 end_request(req, 0); 339 __blk_end_request_cur(req, -EIO);
340 continue; 340 continue;
341 } 341 }
342 } 342 }
@@ -508,7 +508,7 @@ static void act(struct floppy_state *fs)
508 case do_transfer: 508 case do_transfer:
509 if (fs->cur_cyl != fs->req_cyl) { 509 if (fs->cur_cyl != fs->req_cyl) {
510 if (fs->retries > 5) { 510 if (fs->retries > 5) {
511 end_request(fd_req, 0); 511 __blk_end_request_cur(fd_req, -EIO);
512 fs->state = idle; 512 fs->state = idle;
513 return; 513 return;
514 } 514 }
@@ -540,7 +540,7 @@ static void scan_timeout(unsigned long data)
540 out_8(&sw->intr_enable, 0); 540 out_8(&sw->intr_enable, 0);
541 fs->cur_cyl = -1; 541 fs->cur_cyl = -1;
542 if (fs->retries > 5) { 542 if (fs->retries > 5) {
543 end_request(fd_req, 0); 543 __blk_end_request_cur(fd_req, -EIO);
544 fs->state = idle; 544 fs->state = idle;
545 start_request(fs); 545 start_request(fs);
546 } else { 546 } else {
@@ -559,7 +559,7 @@ static void seek_timeout(unsigned long data)
559 out_8(&sw->select, RELAX); 559 out_8(&sw->select, RELAX);
560 out_8(&sw->intr_enable, 0); 560 out_8(&sw->intr_enable, 0);
561 printk(KERN_ERR "swim3: seek timeout\n"); 561 printk(KERN_ERR "swim3: seek timeout\n");
562 end_request(fd_req, 0); 562 __blk_end_request_cur(fd_req, -EIO);
563 fs->state = idle; 563 fs->state = idle;
564 start_request(fs); 564 start_request(fs);
565} 565}
@@ -583,7 +583,7 @@ static void settle_timeout(unsigned long data)
583 return; 583 return;
584 } 584 }
585 printk(KERN_ERR "swim3: seek settle timeout\n"); 585 printk(KERN_ERR "swim3: seek settle timeout\n");
586 end_request(fd_req, 0); 586 __blk_end_request_cur(fd_req, -EIO);
587 fs->state = idle; 587 fs->state = idle;
588 start_request(fs); 588 start_request(fs);
589} 589}
@@ -615,7 +615,7 @@ static void xfer_timeout(unsigned long data)
615 fd_req->current_nr_sectors -= s; 615 fd_req->current_nr_sectors -= s;
616 printk(KERN_ERR "swim3: timeout %sing sector %ld\n", 616 printk(KERN_ERR "swim3: timeout %sing sector %ld\n",
617 (rq_data_dir(fd_req)==WRITE? "writ": "read"), (long)fd_req->sector); 617 (rq_data_dir(fd_req)==WRITE? "writ": "read"), (long)fd_req->sector);
618 end_request(fd_req, 0); 618 __blk_end_request_cur(fd_req, -EIO);
619 fs->state = idle; 619 fs->state = idle;
620 start_request(fs); 620 start_request(fs);
621} 621}
@@ -646,7 +646,7 @@ static irqreturn_t swim3_interrupt(int irq, void *dev_id)
646 printk(KERN_ERR "swim3: seen sector but cyl=ff?\n"); 646 printk(KERN_ERR "swim3: seen sector but cyl=ff?\n");
647 fs->cur_cyl = -1; 647 fs->cur_cyl = -1;
648 if (fs->retries > 5) { 648 if (fs->retries > 5) {
649 end_request(fd_req, 0); 649 __blk_end_request_cur(fd_req, -EIO);
650 fs->state = idle; 650 fs->state = idle;
651 start_request(fs); 651 start_request(fs);
652 } else { 652 } else {
@@ -731,7 +731,7 @@ static irqreturn_t swim3_interrupt(int irq, void *dev_id)
731 printk("swim3: error %sing block %ld (err=%x)\n", 731 printk("swim3: error %sing block %ld (err=%x)\n",
732 rq_data_dir(fd_req) == WRITE? "writ": "read", 732 rq_data_dir(fd_req) == WRITE? "writ": "read",
733 (long)fd_req->sector, err); 733 (long)fd_req->sector, err);
734 end_request(fd_req, 0); 734 __blk_end_request_cur(fd_req, -EIO);
735 fs->state = idle; 735 fs->state = idle;
736 } 736 }
737 } else { 737 } else {
@@ -740,7 +740,7 @@ static irqreturn_t swim3_interrupt(int irq, void *dev_id)
740 printk(KERN_ERR "swim3: fd dma: stat=%x resid=%d\n", stat, resid); 740 printk(KERN_ERR "swim3: fd dma: stat=%x resid=%d\n", stat, resid);
741 printk(KERN_ERR " state=%d, dir=%x, intr=%x, err=%x\n", 741 printk(KERN_ERR " state=%d, dir=%x, intr=%x, err=%x\n",
742 fs->state, rq_data_dir(fd_req), intr, err); 742 fs->state, rq_data_dir(fd_req), intr, err);
743 end_request(fd_req, 0); 743 __blk_end_request_cur(fd_req, -EIO);
744 fs->state = idle; 744 fs->state = idle;
745 start_request(fs); 745 start_request(fs);
746 break; 746 break;
@@ -749,7 +749,7 @@ static irqreturn_t swim3_interrupt(int irq, void *dev_id)
749 fd_req->current_nr_sectors -= fs->scount; 749 fd_req->current_nr_sectors -= fs->scount;
750 fd_req->buffer += fs->scount * 512; 750 fd_req->buffer += fs->scount * 512;
751 if (fd_req->current_nr_sectors <= 0) { 751 if (fd_req->current_nr_sectors <= 0) {
752 end_request(fd_req, 1); 752 __blk_end_request_cur(fd_req, 0);
753 fs->state = idle; 753 fs->state = idle;
754 } else { 754 } else {
755 fs->req_sector += fs->scount; 755 fs->req_sector += fs->scount;