When I tried to rebuild the 2.2.5 kernel from the kernel
sources, I got the following undefined symbols in sg.c:
SG_EMULATED_HOST
SG_SET_TRANSFORM
SG_GET_TRANSFORM
as well as this one in scsi.c:
TYPE_ENCLOSURE
I was able to get around it by adding these constants to
sg.h and scsi.h, respectively.