dasd.c (a8931ef380c92d121ae74ecfb03b2d63f72eea6f) dasd.c (23d805b647db6c2063a13089497615efa9deacdd)
1/*
2 * File...........: linux/drivers/s390/block/dasd.c
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Horst Hummel <Horst.Hummel@de.ibm.com>
5 * Carsten Otte <Cotte@de.ibm.com>
6 * Martin Schwidefsky <schwidefsky@de.ibm.com>
7 * Bugreports.to..: <Linux390@de.ibm.com>
8 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001

--- 981 unchanged lines hidden (view full) ---

990 }
991 dasd_handle_killed_request(cdev, intparm);
992 return;
993 }
994
995 now = get_clock();
996
997 DBF_EVENT(DBF_ERR, "Interrupt: bus_id %s CS/DS %04x ip %08x",
1/*
2 * File...........: linux/drivers/s390/block/dasd.c
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Horst Hummel <Horst.Hummel@de.ibm.com>
5 * Carsten Otte <Cotte@de.ibm.com>
6 * Martin Schwidefsky <schwidefsky@de.ibm.com>
7 * Bugreports.to..: <Linux390@de.ibm.com>
8 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001

--- 981 unchanged lines hidden (view full) ---

990 }
991 dasd_handle_killed_request(cdev, intparm);
992 return;
993 }
994
995 now = get_clock();
996
997 DBF_EVENT(DBF_ERR, "Interrupt: bus_id %s CS/DS %04x ip %08x",
998 cdev->dev.bus_id, ((irb->scsw.cstat<<8)|irb->scsw.dstat),
999 (unsigned int) intparm);
998 cdev->dev.bus_id, ((irb->scsw.cmd.cstat << 8) |
999 irb->scsw.cmd.dstat), (unsigned int) intparm);
1000
1001 /* check for unsolicited interrupts */
1002 cqr = (struct dasd_ccw_req *) intparm;
1000
1001 /* check for unsolicited interrupts */
1002 cqr = (struct dasd_ccw_req *) intparm;
1003 if (!cqr || ((irb->scsw.cc == 1) &&
1004 (irb->scsw.fctl & SCSW_FCTL_START_FUNC) &&
1005 (irb->scsw.stctl & SCSW_STCTL_STATUS_PEND)) ) {
1003 if (!cqr || ((irb->scsw.cmd.cc == 1) &&
1004 (irb->scsw.cmd.fctl & SCSW_FCTL_START_FUNC) &&
1005 (irb->scsw.cmd.stctl & SCSW_STCTL_STATUS_PEND))) {
1006 if (cqr && cqr->status == DASD_CQR_IN_IO)
1007 cqr->status = DASD_CQR_QUEUED;
1008 device = dasd_device_from_cdev_locked(cdev);
1009 if (!IS_ERR(device)) {
1010 dasd_device_clear_timer(device);
1011 device->discipline->handle_unsolicited_interrupt(device,
1012 irb);
1013 dasd_put_device(device);

--- 6 unchanged lines hidden (view full) ---

1020 strncmp(device->discipline->ebcname, (char *) &cqr->magic, 4)) {
1021 MESSAGE(KERN_DEBUG, "invalid device in request: bus_id %s",
1022 cdev->dev.bus_id);
1023 return;
1024 }
1025
1026 /* Check for clear pending */
1027 if (cqr->status == DASD_CQR_CLEAR_PENDING &&
1006 if (cqr && cqr->status == DASD_CQR_IN_IO)
1007 cqr->status = DASD_CQR_QUEUED;
1008 device = dasd_device_from_cdev_locked(cdev);
1009 if (!IS_ERR(device)) {
1010 dasd_device_clear_timer(device);
1011 device->discipline->handle_unsolicited_interrupt(device,
1012 irb);
1013 dasd_put_device(device);

--- 6 unchanged lines hidden (view full) ---

1020 strncmp(device->discipline->ebcname, (char *) &cqr->magic, 4)) {
1021 MESSAGE(KERN_DEBUG, "invalid device in request: bus_id %s",
1022 cdev->dev.bus_id);
1023 return;
1024 }
1025
1026 /* Check for clear pending */
1027 if (cqr->status == DASD_CQR_CLEAR_PENDING &&
1028 irb->scsw.fctl & SCSW_FCTL_CLEAR_FUNC) {
1028 irb->scsw.cmd.fctl & SCSW_FCTL_CLEAR_FUNC) {
1029 cqr->status = DASD_CQR_CLEARED;
1030 dasd_device_clear_timer(device);
1031 wake_up(&dasd_flush_wq);
1032 dasd_schedule_device_bh(device);
1033 return;
1034 }
1035
1036 /* check status - the request might have been killed by dyn detach */
1037 if (cqr->status != DASD_CQR_IN_IO) {
1038 MESSAGE(KERN_DEBUG,
1039 "invalid status: bus_id %s, status %02x",
1040 cdev->dev.bus_id, cqr->status);
1041 return;
1042 }
1043 DBF_DEV_EVENT(DBF_DEBUG, device, "Int: CS/DS 0x%04x for cqr %p",
1029 cqr->status = DASD_CQR_CLEARED;
1030 dasd_device_clear_timer(device);
1031 wake_up(&dasd_flush_wq);
1032 dasd_schedule_device_bh(device);
1033 return;
1034 }
1035
1036 /* check status - the request might have been killed by dyn detach */
1037 if (cqr->status != DASD_CQR_IN_IO) {
1038 MESSAGE(KERN_DEBUG,
1039 "invalid status: bus_id %s, status %02x",
1040 cdev->dev.bus_id, cqr->status);
1041 return;
1042 }
1043 DBF_DEV_EVENT(DBF_DEBUG, device, "Int: CS/DS 0x%04x for cqr %p",
1044 ((irb->scsw.cstat << 8) | irb->scsw.dstat), cqr);
1044 ((irb->scsw.cmd.cstat << 8) | irb->scsw.cmd.dstat), cqr);
1045 next = NULL;
1046 expires = 0;
1045 next = NULL;
1046 expires = 0;
1047 if (irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END) &&
1048 irb->scsw.cstat == 0 && !irb->esw.esw0.erw.cons) {
1047 if (irb->scsw.cmd.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END) &&
1048 irb->scsw.cmd.cstat == 0 && !irb->esw.esw0.erw.cons) {
1049 /* request was completed successfully */
1050 cqr->status = DASD_CQR_SUCCESS;
1051 cqr->stopclk = now;
1052 /* Start first request on queue if possible -> fast_io. */
1053 if (cqr->devlist.next != &device->ccw_queue) {
1054 next = list_entry(cqr->devlist.next,
1055 struct dasd_ccw_req, devlist);
1056 }

--- 1453 unchanged lines hidden ---
1049 /* request was completed successfully */
1050 cqr->status = DASD_CQR_SUCCESS;
1051 cqr->stopclk = now;
1052 /* Start first request on queue if possible -> fast_io. */
1053 if (cqr->devlist.next != &device->ccw_queue) {
1054 next = list_entry(cqr->devlist.next,
1055 struct dasd_ccw_req, devlist);
1056 }

--- 1453 unchanged lines hidden ---