From 636b4d086809ef48174e4e2b019fb3bc579d903b Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Mon, 8 Oct 2007 12:38:22 +0000 Subject: [PATCH] Find scsi id accorind refnum and vice-versa --- second/driver.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/second/driver.h b/second/driver.h index f7ad9e2..0d56604 100644 --- a/second/driver.h +++ b/second/driver.h @@ -1,7 +1,17 @@ /* * - * (c) 2005 Laurent Vivier + * (c) 2005-2007 Laurent Vivier * */ +static inline int refnum_to_scsi_id(signed short refnum) +{ + return (~refnum) - 32; +} + +static inline signed short scsi_id_to_refnum(int scsi_id) +{ + return ~((signed short)scsi_id + 32); +} + extern void turn_off_interrupts();