To use this patch, su to root and cd to /etc/hotplug. Make a backup
copy of hotplug.functions (cp hotplug.functions hotplug.functions.orig),
and run patch:
patch -p2 < /path/to/hotplug-multilun.patch
Unplug the USB card reader, and plug it back in, and then look at
/proc/scsi/scsi to see if you have more than one device for you card
reader. I have only tested it a few times, but it works for me. Let me
know how it works for you. If it works for you, I'll post it on
bugzilla.
Forrest
------------------------------------------------------------------------
--- /etc/hotplug/hotplug.functions.orig 2003-11-24 12:12:27.000000000 -0800
+++ /etc/hotplug/hotplug.functions 2003-11-24 12:23:16.000000000 -0800
@@ -171,6 +171,19 @@
fi
if echo "$MODULE" | grep -q "usb-storage" > /dev/null 2>&1 ; then
[ -x /usr/sbin/updfstab ] && /usr/sbin/updfstab
+
+ # Grab the scsi variables from /proc/scsi/scsi
+ SCSI=`grep -B 1 "USB Card Reader" /proc/scsi/scsi | grep Host | awk '{print $2}' | awk -Fscsi '{print $2}'`
+ CHANNEL=`grep -B 1 "USB Card Reader" /proc/scsi/scsi | grep Host | awk '{print $4}' | bc -l`
+ ID=`grep -B 1 "USB Card Reader" /proc/scsi/scsi | grep Host | awk '{print $6}' | bc -l`
+
+ mesg Adding multi-LUN support
+ # Add LUNs 1-15
+ i=1
+ while [[ $i -lt 16 ]];do
+ echo "scsi-add-single-device $SCSI $CHANNEL $ID $i" >> /proc/scsi/scsi
+ i=`echo "$i+1" | bc -l`
+ done
fi
done
}