Commit bdfd740c authored by Julian Wiedmann's avatar Julian Wiedmann Committed by Heiko Carstens
Browse files

s390/qdio: clarify reporting of errors to the drivers



Now that all drivers use qdio_inspect_queue() and qdio's internal
queue tasklets are gone, the driver-specified queue handlers are
only called for async error reporting (eg. for an error condition in
the QEBSM code).

So take a moment to clean up the Output Queue handlers (they are
_always_ called with qdio_error != 0), and clarify which error types
can be reported through what interface. As Benjamin already suggested
a while ago, we should turn these into distinct enums at some point.

Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: default avatarBenjamin Block <bblock@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 0ae8f2af
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -291,16 +291,15 @@ struct qdio_ssqd_desc {
typedef void qdio_handler_t(struct ccw_device *, unsigned int, int,
			    int, int, unsigned long);

/* qdio errors reported to the upper-layer program */
/* qdio errors reported through the queue handlers: */
#define QDIO_ERROR_ACTIVATE			0x0001
#define QDIO_ERROR_GET_BUF_STATE		0x0002
#define QDIO_ERROR_SET_BUF_STATE		0x0004

/* extra info for completed SBALs: */
#define QDIO_ERROR_SLSB_STATE			0x0100
#define QDIO_ERROR_SLSB_PENDING			0x0200

#define QDIO_ERROR_FATAL			0x00ff
#define QDIO_ERROR_TEMPORARY			0xff00

/* for qdio_cleanup */
#define QDIO_FLAG_CLEANUP_USING_CLEAR		0x01
#define QDIO_FLAG_CLEANUP_USING_HALT		0x02
+3 −7
Original line number Diff line number Diff line
@@ -3804,15 +3804,11 @@ static void qeth_qdio_output_handler(struct ccw_device *ccwdev,
				     unsigned long card_ptr)
{
	struct qeth_card *card        = (struct qeth_card *) card_ptr;
	struct net_device *dev = card->dev;

	QETH_CARD_TEXT(card, 6, "qdouhdl");
	if (qdio_error & QDIO_ERROR_FATAL) {
	QETH_CARD_TEXT(card, 2, "achkcond");
		netif_tx_stop_all_queues(dev);
	netif_tx_stop_all_queues(card->dev);
	qeth_schedule_recovery(card);
}
}

/**
 * Note: Function assumes that we have 4 outbound queues.
+1 −4
Original line number Diff line number Diff line
@@ -69,10 +69,7 @@ static void zfcp_qdio_int_req(struct ccw_device *cdev, unsigned int qdio_err,
{
	struct zfcp_qdio *qdio = (struct zfcp_qdio *) parm;

	if (unlikely(qdio_err)) {
	zfcp_qdio_handler_error(qdio, "qdireq1", qdio_err);
		return;
	}
}

static void zfcp_qdio_request_tasklet(struct tasklet_struct *tasklet)