diff options
Diffstat (limited to 'drivers/block/paride/pf.c')
-rw-r--r-- | drivers/block/paride/pf.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index bef3b997ba3e..3871e3586d6d 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c | |||
@@ -750,10 +750,10 @@ static int pf_ready(void) | |||
750 | 750 | ||
751 | static struct request_queue *pf_queue; | 751 | static struct request_queue *pf_queue; |
752 | 752 | ||
753 | static void pf_end_request(int uptodate) | 753 | static void pf_end_request(int err) |
754 | { | 754 | { |
755 | if (pf_req) { | 755 | if (pf_req) { |
756 | end_request(pf_req, uptodate); | 756 | __blk_end_request_cur(pf_req, err); |
757 | pf_req = NULL; | 757 | pf_req = NULL; |
758 | } | 758 | } |
759 | } | 759 | } |
@@ -773,7 +773,7 @@ repeat: | |||
773 | pf_count = pf_req->current_nr_sectors; | 773 | pf_count = pf_req->current_nr_sectors; |
774 | 774 | ||
775 | if (pf_block + pf_count > get_capacity(pf_req->rq_disk)) { | 775 | if (pf_block + pf_count > get_capacity(pf_req->rq_disk)) { |
776 | pf_end_request(0); | 776 | pf_end_request(-EIO); |
777 | goto repeat; | 777 | goto repeat; |
778 | } | 778 | } |
779 | 779 | ||
@@ -788,7 +788,7 @@ repeat: | |||
788 | pi_do_claimed(pf_current->pi, do_pf_write); | 788 | pi_do_claimed(pf_current->pi, do_pf_write); |
789 | else { | 789 | else { |
790 | pf_busy = 0; | 790 | pf_busy = 0; |
791 | pf_end_request(0); | 791 | pf_end_request(-EIO); |
792 | goto repeat; | 792 | goto repeat; |
793 | } | 793 | } |
794 | } | 794 | } |
@@ -805,7 +805,7 @@ static int pf_next_buf(void) | |||
805 | return 1; | 805 | return 1; |
806 | if (!pf_count) { | 806 | if (!pf_count) { |
807 | spin_lock_irqsave(&pf_spin_lock, saved_flags); | 807 | spin_lock_irqsave(&pf_spin_lock, saved_flags); |
808 | pf_end_request(1); | 808 | pf_end_request(0); |
809 | pf_req = elv_next_request(pf_queue); | 809 | pf_req = elv_next_request(pf_queue); |
810 | spin_unlock_irqrestore(&pf_spin_lock, saved_flags); | 810 | spin_unlock_irqrestore(&pf_spin_lock, saved_flags); |
811 | if (!pf_req) | 811 | if (!pf_req) |
@@ -816,12 +816,12 @@ static int pf_next_buf(void) | |||
816 | return 0; | 816 | return 0; |
817 | } | 817 | } |
818 | 818 | ||
819 | static inline void next_request(int success) | 819 | static inline void next_request(int err) |
820 | { | 820 | { |
821 | unsigned long saved_flags; | 821 | unsigned long saved_flags; |
822 | 822 | ||
823 | spin_lock_irqsave(&pf_spin_lock, saved_flags); | 823 | spin_lock_irqsave(&pf_spin_lock, saved_flags); |
824 | pf_end_request(success); | 824 | pf_end_request(err); |
825 | pf_busy = 0; | 825 | pf_busy = 0; |
826 | do_pf_request(pf_queue); | 826 | do_pf_request(pf_queue); |
827 | spin_unlock_irqrestore(&pf_spin_lock, saved_flags); | 827 | spin_unlock_irqrestore(&pf_spin_lock, saved_flags); |
@@ -844,7 +844,7 @@ static void do_pf_read_start(void) | |||
844 | pi_do_claimed(pf_current->pi, do_pf_read_start); | 844 | pi_do_claimed(pf_current->pi, do_pf_read_start); |
845 | return; | 845 | return; |
846 | } | 846 | } |
847 | next_request(0); | 847 | next_request(-EIO); |
848 | return; | 848 | return; |
849 | } | 849 | } |
850 | pf_mask = STAT_DRQ; | 850 | pf_mask = STAT_DRQ; |
@@ -863,7 +863,7 @@ static void do_pf_read_drq(void) | |||
863 | pi_do_claimed(pf_current->pi, do_pf_read_start); | 863 | pi_do_claimed(pf_current->pi, do_pf_read_start); |
864 | return; | 864 | return; |
865 | } | 865 | } |
866 | next_request(0); | 866 | next_request(-EIO); |
867 | return; | 867 | return; |
868 | } | 868 | } |
869 | pi_read_block(pf_current->pi, pf_buf, 512); | 869 | pi_read_block(pf_current->pi, pf_buf, 512); |
@@ -871,7 +871,7 @@ static void do_pf_read_drq(void) | |||
871 | break; | 871 | break; |
872 | } | 872 | } |
873 | pi_disconnect(pf_current->pi); | 873 | pi_disconnect(pf_current->pi); |
874 | next_request(1); | 874 | next_request(0); |
875 | } | 875 | } |
876 | 876 | ||
877 | static void do_pf_write(void) | 877 | static void do_pf_write(void) |
@@ -890,7 +890,7 @@ static void do_pf_write_start(void) | |||
890 | pi_do_claimed(pf_current->pi, do_pf_write_start); | 890 | pi_do_claimed(pf_current->pi, do_pf_write_start); |
891 | return; | 891 | return; |
892 | } | 892 | } |
893 | next_request(0); | 893 | next_request(-EIO); |
894 | return; | 894 | return; |
895 | } | 895 | } |
896 | 896 | ||
@@ -903,7 +903,7 @@ static void do_pf_write_start(void) | |||
903 | pi_do_claimed(pf_current->pi, do_pf_write_start); | 903 | pi_do_claimed(pf_current->pi, do_pf_write_start); |
904 | return; | 904 | return; |
905 | } | 905 | } |
906 | next_request(0); | 906 | next_request(-EIO); |
907 | return; | 907 | return; |
908 | } | 908 | } |
909 | pi_write_block(pf_current->pi, pf_buf, 512); | 909 | pi_write_block(pf_current->pi, pf_buf, 512); |
@@ -923,11 +923,11 @@ static void do_pf_write_done(void) | |||
923 | pi_do_claimed(pf_current->pi, do_pf_write_start); | 923 | pi_do_claimed(pf_current->pi, do_pf_write_start); |
924 | return; | 924 | return; |
925 | } | 925 | } |
926 | next_request(0); | 926 | next_request(-EIO); |
927 | return; | 927 | return; |
928 | } | 928 | } |
929 | pi_disconnect(pf_current->pi); | 929 | pi_disconnect(pf_current->pi); |
930 | next_request(1); | 930 | next_request(0); |
931 | } | 931 | } |
932 | 932 | ||
933 | static int __init pf_init(void) | 933 | static int __init pf_init(void) |