diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2009-04-14 09:36:22 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-04-14 09:37:24 -0400 |
commit | 75cb71f3184f3dd5b78d991d5e0e047774865f5d (patch) | |
tree | d58ce30b5466e9b36433ffcc886ad383fcbadafb /drivers/s390/cio | |
parent | 43ae8a1b32735c662ba7ebf3509c4f670f75e3d5 (diff) |
[S390] qdio: remove dead timeout handler
The QDIO ccw devices are started by ccw_device_start so no timeout
can occur for the interrupt handler. Remove the dead code.
In case of an I/O error set the device state to error and wake up
a possibly running qdio_shutdown waiter.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 9e8a2914259b..accd957454e7 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
@@ -881,42 +881,6 @@ no_handler: | |||
881 | qdio_set_state(irq_ptr, QDIO_IRQ_STATE_STOPPED); | 881 | qdio_set_state(irq_ptr, QDIO_IRQ_STATE_STOPPED); |
882 | } | 882 | } |
883 | 883 | ||
884 | static void qdio_call_shutdown(struct work_struct *work) | ||
885 | { | ||
886 | struct ccw_device_private *priv; | ||
887 | struct ccw_device *cdev; | ||
888 | |||
889 | priv = container_of(work, struct ccw_device_private, kick_work); | ||
890 | cdev = priv->cdev; | ||
891 | qdio_shutdown(cdev, QDIO_FLAG_CLEANUP_USING_CLEAR); | ||
892 | put_device(&cdev->dev); | ||
893 | } | ||
894 | |||
895 | static void qdio_int_error(struct ccw_device *cdev) | ||
896 | { | ||
897 | struct qdio_irq *irq_ptr = cdev->private->qdio_data; | ||
898 | |||
899 | switch (irq_ptr->state) { | ||
900 | case QDIO_IRQ_STATE_INACTIVE: | ||
901 | case QDIO_IRQ_STATE_CLEANUP: | ||
902 | qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR); | ||
903 | break; | ||
904 | case QDIO_IRQ_STATE_ESTABLISHED: | ||
905 | case QDIO_IRQ_STATE_ACTIVE: | ||
906 | qdio_set_state(irq_ptr, QDIO_IRQ_STATE_STOPPED); | ||
907 | if (get_device(&cdev->dev)) { | ||
908 | /* Can't call shutdown from interrupt context. */ | ||
909 | PREPARE_WORK(&cdev->private->kick_work, | ||
910 | qdio_call_shutdown); | ||
911 | queue_work(ccw_device_work, &cdev->private->kick_work); | ||
912 | } | ||
913 | break; | ||
914 | default: | ||
915 | WARN_ON(1); | ||
916 | } | ||
917 | wake_up(&cdev->private->wait_q); | ||
918 | } | ||
919 | |||
920 | static int qdio_establish_check_errors(struct ccw_device *cdev, int cstat, | 884 | static int qdio_establish_check_errors(struct ccw_device *cdev, int cstat, |
921 | int dstat) | 885 | int dstat) |
922 | { | 886 | { |
@@ -973,10 +937,8 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
973 | switch (PTR_ERR(irb)) { | 937 | switch (PTR_ERR(irb)) { |
974 | case -EIO: | 938 | case -EIO: |
975 | DBF_ERROR("%4x IO error", irq_ptr->schid.sch_no); | 939 | DBF_ERROR("%4x IO error", irq_ptr->schid.sch_no); |
976 | return; | 940 | qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR); |
977 | case -ETIMEDOUT: | 941 | wake_up(&cdev->private->wait_q); |
978 | DBF_ERROR("%4x IO timeout", irq_ptr->schid.sch_no); | ||
979 | qdio_int_error(cdev); | ||
980 | return; | 942 | return; |
981 | default: | 943 | default: |
982 | WARN_ON(1); | 944 | WARN_ON(1); |
@@ -1001,7 +963,6 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1001 | case QDIO_IRQ_STATE_ACTIVE: | 963 | case QDIO_IRQ_STATE_ACTIVE: |
1002 | if (cstat & SCHN_STAT_PCI) { | 964 | if (cstat & SCHN_STAT_PCI) { |
1003 | qdio_int_handler_pci(irq_ptr); | 965 | qdio_int_handler_pci(irq_ptr); |
1004 | /* no state change so no need to wake up wait_q */ | ||
1005 | return; | 966 | return; |
1006 | } | 967 | } |
1007 | if ((cstat & ~SCHN_STAT_PCI) || dstat) { | 968 | if ((cstat & ~SCHN_STAT_PCI) || dstat) { |