summaryrefslogtreecommitdiffstats
path: root/tapset/scsi.stp
diff options
context:
space:
mode:
Diffstat (limited to 'tapset/scsi.stp')
-rw-r--r--tapset/scsi.stp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tapset/scsi.stp b/tapset/scsi.stp
index 7787b6d6..ed96b430 100644
--- a/tapset/scsi.stp
+++ b/tapset/scsi.stp
@@ -87,7 +87,14 @@ probe scsi.iocompleted
function scsi_timer_pending:long(var:long)
%{ /* pure */
struct scsi_cmnd *cmd = (struct scsi_cmnd *)((long)THIS->var);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
THIS->__retvalue = timer_pending(&cmd->eh_timeout); /* FIXME: deref hazard! */
+#else
+ struct request *req = (struct request *)kread(&cmd->request);
+ struct request_queue *rq = (struct request_queue *)kread(&req->q);
+ THIS->__retvalue = timer_pending(&rq->timeout); /* FIXME: deref hazard! */
+ CATCH_DEREF_FAULT();
+#endif
%}
function get_devstate_from_req:long(var:long)